From patchwork Wed Feb 5 17:03:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 3587501 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 A50E99F2E9 for ; Wed, 5 Feb 2014 17:07:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D6DFB20123 for ; Wed, 5 Feb 2014 17:07:02 +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 F17CA2011E for ; Wed, 5 Feb 2014 17:07:01 +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 1WB5vb-0003k5-W9; Wed, 05 Feb 2014 17:06:24 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WB5vR-0001hg-G9; Wed, 05 Feb 2014 17:06:13 +0000 Received: from mail-wg0-f53.google.com ([74.125.82.53]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WB5uq-0001YN-59 for linux-arm-kernel@lists.infradead.org; Wed, 05 Feb 2014 17:05:38 +0000 Received: by mail-wg0-f53.google.com with SMTP id y10so491601wgg.8 for ; Wed, 05 Feb 2014 09:05:14 -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=X/7rR1E/WN4xmmcyWibj4JvihlY8o3oeZhE/y5WQPLw=; b=jtJzgpSyIXR7UBNinjcgdRZTAJfA/J1kV1nV5r7glytQKZRbBiSRkojqKy5CPfvbMc S0RPbyJCHMCOMoBmAfsfyndXWpU6lnghzJLCODMkdcgo1xfYW+CVKwLrYMcZpfTrmkT4 GMyW+ze2mievpvLMXYoPhc+Zy9kFoaf3x54UysqW+Mm7vOAA7joXzg1iAeU5ujBiTL0h oDv3Yo/ggS+HX+GfppDNFCKLKy+O6IUPV5TFqAuExSk2UVnPjP6+Pd3mcde8xrTG7njH Gfa1GT0Qnk2QWJ7ArggmrOqbLIP6if4cKQpk7J4OZPcaFF0gRvl7MxFtUYF3uGjBhXBr 8+0g== X-Gm-Message-State: ALoCoQmOwjC24bj2GH5X08RLksotO+iWimONhsSv9dwVvOgDtDDJAGJha4XqYBdhpfaS2tFSgYNw X-Received: by 10.180.187.16 with SMTP id fo16mr17741911wic.26.1391619911857; Wed, 05 Feb 2014 09:05:11 -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 p1sm47427211wie.1.2014.02.05.09.05.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Feb 2014 09:05:11 -0800 (PST) From: Leif Lindholm To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-efi@vger.kernel.org Subject: [PATCH 02/22] arm: add new asm macro update_sctlr Date: Wed, 5 Feb 2014 17:03:53 +0000 Message-Id: <1391619853-10601-3-git-send-email-leif.lindholm@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1391619853-10601-1-git-send-email-leif.lindholm@linaro.org> References: <1391619853-10601-1-git-send-email-leif.lindholm@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140205_120536_371321_0DA6C04F X-CRM114-Status: UNSURE ( 7.85 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) Cc: Will Deacon , Leif Lindholm , patches@linaro.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.7 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 Cc: 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 5c22851..e8ca24b 100644 --- a/arch/arm/include/asm/assembler.h +++ b/arch/arm/include/asm/assembler.h @@ -383,4 +383,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, \set + .endif + .ifnc \clear, + bic \tmp, \tmp, \clear + .endif + mcr p15, 0, \tmp, c1, c0, 0 + .endm +#endif + #endif /* __ASM_ASSEMBLER_H__ */