From patchwork Sat Jan 11 13:05:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 3469291 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7F8379F2E9 for ; Sat, 11 Jan 2014 13:13:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 927E82015D for ; Sat, 11 Jan 2014 13:13:29 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7D4B82015B for ; Sat, 11 Jan 2014 13:13:28 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W1yN6-0003m1-9g; Sat, 11 Jan 2014 13:13:04 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1W1yMw-0004Vy-2E; Sat, 11 Jan 2014 13:12:54 +0000 Received: from mail-we0-f179.google.com ([74.125.82.179]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W1yMt-0004Ud-R3 for linux-arm-kernel@lists.infradead.org; Sat, 11 Jan 2014 13:12:52 +0000 Received: by mail-we0-f179.google.com with SMTP id q59so5150062wes.10 for ; Sat, 11 Jan 2014 05:12:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=xRmbqr8J0iss/gz0cYq8L/lM4YlQjPcz8lQg0CbGjCk=; b=T6/F9FMQU9j+gzBI3XEi291Rd5Q20ElHWYq2iegF6XR3Wa8+wYcdIV9z5DKw+hKpPE Cf+Bq1724vWjEVslT3kKMrhGhJaHw/uoPBq1zJ19nIFxZwo4w+L0rOJlgnx5FrgIPwHT 2mSvsUBnUHEtNr2Sxb2cvPLUa9kRojQpOaBfJbXPOQ5Lcf9HmjCROtxUNDZpUE1cGiCi 8Ux9PyfyE7eJPz/7wI5w6pQuE91QVmBOxcNEnVYWJIG/XQ+wHOWxns5ggVYgB9xmsYBa /WA6DwMK+OH7GIaqg0D7Y1khpy03onAEryhHeMHGi15+/3K6V1/9vk5Efq/bE4uH4vsM fe2Q== X-Gm-Message-State: ALoCoQkKXBWNdNHBkF55MzzHJvQFNFPkW8dIHVHJKlMse3plw1y3avl0FGmwEPr9mZN/w11tInzw X-Received: by 10.180.211.161 with SMTP id nd1mr5157141wic.41.1389445557532; Sat, 11 Jan 2014 05:05:57 -0800 (PST) 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 f7sm6549731wjb.7.2014.01.11.05.05.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Jan 2014 05:05:56 -0800 (PST) From: Leif Lindholm To: linux-kernel@vger.kernel.org Subject: [PATCH v4 2/5] arm: add new asm macro update_sctlr Date: Sat, 11 Jan 2014 13:05:21 +0000 Message-Id: <1389445524-30623-3-git-send-email-leif.lindholm@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1389445524-30623-1-git-send-email-leif.lindholm@linaro.org> References: <1389445524-30623-1-git-send-email-leif.lindholm@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140111_081251_968608_F2EFD78C X-CRM114-Status: UNSURE ( 7.92 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) Cc: grant.likely@secretlab.ca, linux-efi@vger.kernel.org, linux@arm.linux.org.uk, patches@linaro.org, Leif Lindholm , roy.franz@linaro.org, matt.fleming@intel.com, msalter@redhat.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 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+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP A new macro for setting/clearing bits in the SCTLR. Signed-off-by: Leif Lindholm Suggested-by: Will Deacon --- arch/arm/include/asm/assembler.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h index 5c22851..aba6458 100644 --- a/arch/arm/include/asm/assembler.h +++ b/arch/arm/include/asm/assembler.h @@ -383,4 +383,17 @@ THUMB( orr \reg , \reg , #PSR_T_BIT ) #endif .endm +#ifdef CONFIG_CPU_CP15 +/* Macro for setting/clearing bits in sctlr */ + .macro update_sctlr, set:req, clear:req, tmp:req, tmp2:req + mrc p15, 0, \tmp, c1, c0, 0 + ldr \tmp2, =\set + orr \tmp, \tmp, \tmp2 + ldr \tmp2, =\clear + mvn \tmp2, \tmp2 + and \tmp, \tmp, \tmp2 + mcr p15, 0, \tmp, c1, c0, 0 + .endm +#endif + #endif /* __ASM_ASSEMBLER_H__ */