Received: by 10.223.185.116 with SMTP id b49csp3956233wrg; Mon, 19 Feb 2018 08:37:59 -0800 (PST) X-Google-Smtp-Source: AH8x224+Nsftws0q2B9CAsJkMk3F/JdeQW65LgrHhSkrj3TWGWcAnf8OjFH3Nn3MYoTIlFxRuIs1 X-Received: by 10.98.52.194 with SMTP id b185mr15159012pfa.216.1519058279186; Mon, 19 Feb 2018 08:37:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519058279; cv=none; d=google.com; s=arc-20160816; b=TUlf10tLJ2a1PZUVJQIIDeOaT0dL3hD2QXjCqWRWPBoPAVW1xJl2ZkisrhZ0HG3QgP nn1pxEgV0t9abSJUpyFdTS+5r6OR3HAJetloSZG1Ks3t3tA5VmzbY8q+tOUTI0VKbYR9 xSoEin2WKeUQoatL3LMzuAxuTJlz2N12Z/7InmebnqcdO0PAAVTWjJZ5sXmn27z8NVh4 9zDITzIpJPY2b0YOASMNJDHI4Sl5pWvJyzjZzpTZc1PgMCeMnoBOC3Mwl9Osdd7UgXEi oGEPee07UbNw1RTCRqrN/An3UADCCOiXxA8cXPuuu/RnRodpaW4Zu4REB+ZZO9n724h/ wIUw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:reply-to:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=SI38A4l5niIBlv3k5+gPL/s6wKlkNYZQx3mPHMAP4bw=; b=AzaXOWdepGAlsVXOPyoJFNifi65xFnsndZtXUijYhMTwzbwQd8naTnYmBQuE9ibDOd fFopYu4whUSK35CMlNl9dDHL4yQQzITqa9rnlUOt5RMg+nt1tEK4kAXnTgIziQFdxh1e EKHwQtRvrsdTBjhYQPkv/Me3m7LtfNBwLxlSSO2SSz93CPNorm6q1d003NxnBM5XMOyW Y35g0uQFhgcpVO0imwu8WiVQ8soBV/crsx1+Ainw3E3l6/Qt59Ml5WQiZt56NLLAtCnI p15VGrIqCjnbboLGnkAU6zoAeo7/AX9peW+7lKPy9ZOi/6QJ6dAZjg4a/ZnfAfC1x+EC 5ysA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=cjk2JUxD; dkim=pass header.i=@codeaurora.org header.s=default header.b=hi+gbFXc; 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: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e1-v6si1206705pls.184.2018.02.19.08.37.45; Mon, 19 Feb 2018 08:37:59 -0800 (PST) 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=@codeaurora.org header.s=default header.b=cjk2JUxD; dkim=pass header.i=@codeaurora.org header.s=default header.b=hi+gbFXc; 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 S1753214AbeBSQgV (ORCPT + 99 others); Mon, 19 Feb 2018 11:36:21 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:57326 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752692AbeBSQgT (ORCPT ); Mon, 19 Feb 2018 11:36:19 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 85E3B6032D; Mon, 19 Feb 2018 16:36:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1519058179; bh=Ju61IRcV/NE0Y2t4bMWrUKeiOHFCvldYZUIorSKnjCM=; h=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From; b=cjk2JUxDa00G5Xfvx2DAIdplg8ibL+VLm6do1iSY6VRAUjLUXC5xApwh3Caxs9LID xf6yGo2yGvtvJt+KZ4UCPjJBFcGPdFFqbHjUx6PU4aMlNO3BTEOM0aWxvL2gU8Hj3N MF3TE9oFYwysPprUUinKBmyjVh2VGVHDLI0XhyCo= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [10.0.2.15] (unknown [70.123.43.153]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: shankerd@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id C7F956032D; Mon, 19 Feb 2018 16:36:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1519058178; bh=Ju61IRcV/NE0Y2t4bMWrUKeiOHFCvldYZUIorSKnjCM=; h=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From; b=hi+gbFXcvEapS17z9aqoLj1WG1MLu3ihWKO2UREv3GJj15i6yZ1CE5dA4MYo1+juN MaFAVpxF3ikA/v/y4vyG7j8agrb9Ij82mLYHZcx/pKjYtZVhZql7sUe7yDznoUM/rW ALKQ8ITY9F/cwQYl72kzQglVA4TI3yxehxftGDl4= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org C7F956032D Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=shankerd@codeaurora.org Reply-To: shankerd@codeaurora.org Subject: Re: [PATCH] arm64: Add support for new control bits CTR_EL0.IDC and CTR_EL0.IDC To: Will Deacon Cc: Philip Elcan , Vikram Sethi , Marc Zyngier , Catalin Marinas , linux-kernel , kvmarm , linux-arm-kernel References: <1518829066-3558-1-git-send-email-shankerd@codeaurora.org> <20180219144346.GF30394@arm.com> From: Shanker Donthineni Message-ID: Date: Mon, 19 Feb 2018 10:36:16 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180219144346.GF30394@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Will, On 02/19/2018 08:43 AM, Will Deacon wrote: > Hi Shanker, > > On Fri, Feb 16, 2018 at 06:57:46PM -0600, Shanker Donthineni wrote: >> Two point of unification cache maintenance operations 'DC CVAU' and >> 'IC IVAU' are optional for implementors as per ARMv8 specification. >> This patch parses the updated CTR_EL0 register definition and adds >> the required changes to skip POU operations if the hardware reports >> CTR_EL0.IDC and/or CTR_EL0.IDC. >> >> CTR_EL0.DIC: Instruction cache invalidation requirements for >> instruction to data coherence. The meaning of this bit[29]. >> 0: Instruction cache invalidation to the point of unification >> is required for instruction to data coherence. >> 1: Instruction cache cleaning to the point of unification is >> not required for instruction to data coherence. >> >> CTR_EL0.IDC: Data cache clean requirements for instruction to data >> coherence. The meaning of this bit[28]. >> 0: Data cache clean to the point of unification is required for >> instruction to data coherence, unless CLIDR_EL1.LoC == 0b000 >> or (CLIDR_EL1.LoUIS == 0b000 && CLIDR_EL1.LoUU == 0b000). >> 1: Data cache clean to the point of unification is not required >> for instruction to data coherence. >> >> Signed-off-by: Philip Elcan >> Signed-off-by: Shanker Donthineni >> --- >> arch/arm64/include/asm/assembler.h | 48 ++++++++++++++++++++++++-------------- >> arch/arm64/include/asm/cache.h | 2 ++ >> arch/arm64/kernel/cpufeature.c | 2 ++ >> arch/arm64/mm/cache.S | 26 ++++++++++++++------- >> 4 files changed, 51 insertions(+), 27 deletions(-) > > I was looking at our CTR_EL0 code last week but forgot to post the patch I > wrote fixing up some of the fields. I just send it now, so please can > you rebase on top of: > > http://lists.infradead.org/pipermail/linux-arm-kernel/2018-February/560488.html > > Also: > >> diff --git a/arch/arm64/include/asm/cache.h b/arch/arm64/include/asm/cache.h >> index ea9bb4e..aea533b 100644 >> --- a/arch/arm64/include/asm/cache.h >> +++ b/arch/arm64/include/asm/cache.h >> @@ -22,6 +22,8 @@ >> #define CTR_L1IP_MASK 3 >> #define CTR_CWG_SHIFT 24 >> #define CTR_CWG_MASK 15 >> +#define CTR_IDC_SHIFT 28 >> +#define CTR_DIC_SHIFT 29 >> >> #define CTR_L1IP(ctr) (((ctr) >> CTR_L1IP_SHIFT) & CTR_L1IP_MASK) >> >> diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c >> index 29b1f87..f42bb5a 100644 >> --- a/arch/arm64/kernel/cpufeature.c >> +++ b/arch/arm64/kernel/cpufeature.c >> @@ -200,6 +200,8 @@ static int __init register_cpu_hwcaps_dumper(void) >> >> static const struct arm64_ftr_bits ftr_ctr[] = { >> ARM64_FTR_BITS(FTR_VISIBLE, FTR_STRICT, FTR_EXACT, 31, 1, 1), /* RAO */ >> + ARM64_FTR_BITS(FTR_VISIBLE, FTR_STRICT, FTR_LOWER_SAFE, CTR_DIC_SHIFT, 1, 0), /* DIC */ >> + ARM64_FTR_BITS(FTR_VISIBLE, FTR_STRICT, FTR_LOWER_SAFE, CTR_IDC_SHIFT, 1, 0), /* IDC */ >> ARM64_FTR_BITS(FTR_VISIBLE, FTR_STRICT, FTR_HIGHER_SAFE, 24, 4, 0), /* CWG */ >> ARM64_FTR_BITS(FTR_VISIBLE, FTR_STRICT, FTR_LOWER_SAFE, 20, 4, 0), /* ERG */ >> ARM64_FTR_BITS(FTR_VISIBLE, FTR_STRICT, FTR_LOWER_SAFE, 16, 4, 1), /* DminLine */ > > Could you update the other table entries here to use the CTR_*_SHIFT values > as well? > I'll do. > Thanks, > > Will > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > -- Shanker Donthineni Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.