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: 4585051 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A7C08C0514 for ; Fri, 18 Jul 2014 14:03:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EF9302011B for ; Fri, 18 Jul 2014 14:03:57 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (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 23E1620117 for ; Fri, 18 Jul 2014 14:03:57 +0000 (UTC) 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-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=kvNNa3UlNwJEpMJr+4FSqvSMZNhvUAz76k81bwgiTEo=; b=haRQshmgb5dRXftrQcvrVjbEBFcSVZ8SA5xHmB5libjM5YyisGK0tEefUMFxQsrWMu 7E+a+y2sglDouuMHLBiqXPO27d8KnO1Oe6dN0QQ2rABAOeobA48VRla42hNuY+RoXJee nzwdnb4SeAu1WTor0wSysOTf9ugyp1IirweGCC1aCWlT0fvgtDuSJPyhMZnbsLsLOluB DEfU8v9qi4VBvCaln++1T/wrLvKBYvLT0KjGCvuMZHh+pVHm7g38pedPavZ4cWCkXchG rs8EzUFnQVojyFm/3xUDwm/YkngEOIfo7W5A9PxN2Q5oJxhFRCfoFMBnYdRk9dfJghdE AIxw== X-Gm-Message-State: ALoCoQnDAFH5VSj4xdWaxIMF/vV/JjCXyBA5RkHQZCt6WdvMP6KNzozNk9mP5jEaCir5DHEq+ruv 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 (/) 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+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 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__ */