Message ID | 20191027203317.852806511@linuxfoundation.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp2531264ill; Sun, 27 Oct 2019 14:08:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqyHJmOxujP11VQRZs96/bIqVeLV4RsGTsb4FXIb9ut1KKug/qew2s/tXQyheN8ASQj7Gqk6 X-Received: by 2002:a17:906:6146:: with SMTP id p6mr13968236ejl.268.1572210536198; Sun, 27 Oct 2019 14:08:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572210536; cv=none; d=google.com; s=arc-20160816; b=gu6sejf6bBh6L3MEBIM/AOiR/+4PtmwN8tw77tuqSzIYvybOeADUQmUy0FaZgbJ/m3 m2NtE9pV0zV2HYnhKpl0byCIxAJQzpD7RAJbvjGRLEzoQsjjTQI1cui11Tu4KdHx1A4i fBITeKPtxG28xD+J27Kir0yzoAIarLqFB28s4W45VZQeTr++76qO03fLXl77ah5EnBev 02W/d/amnmqnluLr18L20JLkmFk7i1NMNsmDgFxxfX19VuMIFxrtw8Zo3ba0EnQdsH13 o1076ctaCvCYFGjvXAk0CPHXT9TSiuUImssEnywLuGAxpaUCnvKbO1fiGrqLBdeLEmXf OmKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=VU5xwZ0KOqMEVZ+6hVlb3xw8t7zZiLK4D+mcsG1fQ/k=; b=BqiQOH/ZH39qTinkyMP4cn66GJ56uJStb4M9G2UG9p451kWzzVWXc8la/FP/1Yw6ow KDmVbUzIexQOEUUxHSMH51tThIE9w7BXewIjUL5+01+auGUcShqQRlCpCfO2IsaKZsu2 +h2U5KeqG8HrZS9QptrgcCricKgeuO9eqBMKhn64DemoLcpYcO+Lb+itdw2qlHP/8KMb FkOGdDlTFk5xbPpQnHyzhOTLl1sK2XPus8X5mO4ZJEbS12xRtfMoDODmS7zjLiBafv1I ceL2KyUPOVBs6lICREV3y6+uqzURQiWtX7P0M8QdiCztsnZCOgV7NXJ3pqo2e7KXR7W7 g9cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MFyovkcd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ec22si1122132ejb.232.2019.10.27.14.08.55; Sun, 27 Oct 2019 14:08:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MFyovkcd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729433AbfJ0VIx (ORCPT <rfc822;lee.jones@linaro.org> + 26 others); Sun, 27 Oct 2019 17:08:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:55188 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729407AbfJ0VIv (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 27 Oct 2019 17:08:51 -0400 Received: from localhost (100.50.158.77.rev.sfr.net [77.158.50.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7730A20B7C; Sun, 27 Oct 2019 21:08:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572210531; bh=0P04B2adEBHzzhOJCXQeGs0nSkHAwogVAekqy2RDdKE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MFyovkcd9jlh1mPjpZUS4MOLgiuGUoAwUxGOcEfUimIxTLbWxzQI8FNX/0qNXprxl L0CXmbCQinaQcO1fLOj/xqIU/M1RzLI81e2gRbKl0T+pZpCzjMbuV42sW1yZRrV67e 361GUbW/9HhtOXb4+TgHs+o4uIde0oeL6cf03JHQ= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Mark Rutland <mark.rutland@arm.com>, Dave Martin <dave.martin@arm.com>, Catalin Marinas <catalin.marinas@arm.com>, Marc Zyngier <marc.zyngier@arm.com>, Ard Biesheuvel <ard.biesheuvel@linaro.org> Subject: [PATCH 4.14 045/119] arm64: Introduce sysreg_clear_set() Date: Sun, 27 Oct 2019 22:00:22 +0100 Message-Id: <20191027203317.852806511@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191027203259.948006506@linuxfoundation.org> References: <20191027203259.948006506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
None
|
expand
|
--- a/arch/arm64/include/asm/sysreg.h +++ b/arch/arm64/include/asm/sysreg.h @@ -584,6 +584,17 @@ asm( asm volatile("msr_s " __stringify(r) ", %x0" : : "rZ" (__val)); \ } while (0) +/* + * Modify bits in a sysreg. Bits in the clear mask are zeroed, then bits in the + * set mask are set. Other bits are left as-is. + */ +#define sysreg_clear_set(sysreg, clear, set) do { \ + u64 __scs_val = read_sysreg(sysreg); \ + u64 __scs_new = (__scs_val & ~(u64)(clear)) | (set); \ + if (__scs_new != __scs_val) \ + write_sysreg(__scs_new, sysreg); \ +} while (0) + static inline void config_sctlr_el1(u32 clear, u32 set) { u32 val;