Received: by 10.223.185.116 with SMTP id b49csp4001700wrg; Mon, 19 Feb 2018 09:20:28 -0800 (PST) X-Google-Smtp-Source: AH8x226mDaZPZe2S8mje9N9BSWbo6IeQrvL/Vl7ZyCJmnMlPY9yU1eIuuhQ8vqoLUGzwWtSVz61Q X-Received: by 10.99.120.205 with SMTP id t196mr12454326pgc.392.1519060828196; Mon, 19 Feb 2018 09:20:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519060828; cv=none; d=google.com; s=arc-20160816; b=QeztC2cWL7xrBycdnRzeYRmDhCQCiabgquwtGjUZnAYBrr3OvwoA1h9iMRdrfZYEi5 vHae9g5zAeRC33bK0bo4Vt+2lItTH5xiXwhNfTbJU1M6CIovh2XG0FxrPEakTZ10yQoi eN31ziAYy7ppF6bm6x7yBaKsAYlQSw4rruz01fN0e9OJ/sFcHYot3CZDNfCSRXPcVaGI 7jaeTDIWtYR7/riokvnrBMRY5bqyAlGQWkvL6/GQ+XWdCwUol1vrMYk8jRpNj5uFclqz ZYBRisujuVVfgfm3H/Lf6d/F3bAFa4P6rHeApyz1juHDED+TtS8gDwveBfrhijr2rMI2 jWqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=AWQHqPWRsxR3Iy1/qINjGjWPKvNyHDR1fFKAULCQfko=; b=xnk6wvhYXh59N7U1uox9sRhNe3j8iKsf8hxeJ2eEUQwTyPIvPei6LdVwvuryUFwLlD XQUUORldqEhjK6Ll0eCPtCG/SKRWtFDHnqwDFc2UIDL6ZH8XawIcL+sorS9FhCnztiE4 cdA2aFF1XG17FwkwrX+uJh7O62vZ2DV6wIhmUgzKmvHTpj57zto5HeseB7n5PKXOHPRB +SxYX+xhmXRnKpMQ+Q1gfACZfLOLCdzp7FN7dJ4nxskjZzbVn3krUl8qH12unIltrnLR mAT4N/4WmBFirJ3e/rWu8YSgS1fmlFBLVyLI8G6wTch/+iAJ9rP0AKQXHJoW4Obgk/is 3Jlg== ARC-Authentication-Results: i=1; mx.google.com; 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 z67si5983302pfb.223.2018.02.19.09.20.14; Mon, 19 Feb 2018 09:20:28 -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; 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 S1753410AbeBSRS6 (ORCPT + 99 others); Mon, 19 Feb 2018 12:18:58 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:34048 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753215AbeBSRS5 (ORCPT ); Mon, 19 Feb 2018 12:18:57 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E5FF01529; Mon, 19 Feb 2018 09:18:56 -0800 (PST) Received: from armageddon.cambridge.arm.com (armageddon.cambridge.arm.com [10.1.206.84]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6B9513F25C; Mon, 19 Feb 2018 09:18:55 -0800 (PST) Date: Mon, 19 Feb 2018 17:18:52 +0000 From: Catalin Marinas To: Shanker Donthineni Cc: Philip Elcan , Vikram Sethi , Marc Zyngier , Will Deacon , linux-kernel , kvmarm , linux-arm-kernel Subject: Re: [PATCH] arm64: Add support for new control bits CTR_EL0.IDC and CTR_EL0.IDC Message-ID: <20180219171852.jsbzawbsyv7v5yi7@armageddon.cambridge.arm.com> References: <1518829066-3558-1-git-send-email-shankerd@codeaurora.org> <20180219143820.5oxc2kendvq4bbtt@armageddon.cambridge.arm.com> <92836754-2ab3-d5db-f0be-7ee3e10f368f@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <92836754-2ab3-d5db-f0be-7ee3e10f368f@codeaurora.org> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 19, 2018 at 10:35:30AM -0600, Shanker Donthineni wrote: > On 02/19/2018 08:38 AM, Catalin Marinas wrote: > > On the patch, I'd rather have an alternative framework entry for no VAU > > cache maint required and some ret instruction at the beginning of the > > cache maint function rather than jumping out of the loop somewhere > > inside the cache maintenance code, penalising the CPUs that do require > > it. > > Alternative framework might break things in case of CPU hotplug. I need one > more confirmation from you on incorporating alternative framework. CPU hotplug can be an issue but it should be handled like other similar cases: if a CPU comes online late and its features are incompatible, it should not be brought online. The cpufeature code handles this. With Will's patch for CTR_EL0, we handle different CPU features during boot, defaulting to the lowest value for the IDC/DIC bits. I suggest you add new ARM64_HAS_* feature bits and enable them based on CTR_EL0.IDC and DIC. You could check for both being 1 with a single feature bit but I guess an implementation is allowed to have these different (e.g. DIC == 0 and IDC == 1). -- Catalin