Received: by 10.223.185.116 with SMTP id b49csp4071790wrg; Mon, 19 Feb 2018 10:33:16 -0800 (PST) X-Google-Smtp-Source: AH8x227aJA48OHnaUEk7ZicYb52BC2DHZQu4gkjFIOx0WrqrXlG2nSC63z/ZNwEBaK5A7bsuONvQ X-Received: by 10.98.163.143 with SMTP id q15mr5115605pfl.94.1519065196390; Mon, 19 Feb 2018 10:33:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519065196; cv=none; d=google.com; s=arc-20160816; b=x3waRzkrOzzKeyVIrRhKnJualyGEeKkZm8MS34blYXpJrIKTW7l1tZ3+DLe37cQQwr 0I42WvmAbCMZhh7MtcUDhPkwJM7wdond1eHQ2fII0s43bue2qufWwT7Rid7VTEj6HZx2 zjsB3SFRtMOWGnUtX7F4A+KHn/MYOIqQ+0UCXfgaKWOaoJ4IhyprqVGYADSsOefn2SNM XabnDMLWPQ0Qf2gbOE6QexmokZ431DIyRS9szaJdg5sn7LVp3JOZ8+FAjFjS0BMg0I+x rQJEMsvejvDBz0nD2CEUZsGGvciRN3S9DwUUjxOUCy4rSWrQnzMqyY97fl9sW49nZ1IE erow== 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=TC5akKtMyw3GvXg/Sqhc2wQnyA49ZQ96gLi1nIPkIPA=; b=bgNQKSX/ljUeHNfmZHSOaqpgMXqFl05b3miZFZ3IaY8f6juC48q1kkRCJhqBQSuO5t du5vf4zA7F0x53IAoCFO8YeJfspe2mRrc/Xl8aPFsqXDYBj0KJzmvEfDsby41yJJn4ZB 68OlG2L8twOAp+jaVc/cxld9aI8sJi1l43ESmL0NvJaq/f69ZPpHSAGV7/9UuItoF2/3 3BHth7blrtn1UBIMjBJN2bBJwYKnRz504EH5L4SlJU0Q7A0P/gqYsN1meHL8ey8CiGF5 vF7HO7PeN045mENChYrMYw7liOnMpK4/j0L8E1hKNFZB8tyVky7vLtwxI3/Fo0XNfzBK A+KQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=cqio+tBA; dkim=pass header.i=@codeaurora.org header.s=default header.b=lYDx+CDD; 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 b65si4012080pfk.283.2018.02.19.10.33.02; Mon, 19 Feb 2018 10:33:16 -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=cqio+tBA; dkim=pass header.i=@codeaurora.org header.s=default header.b=lYDx+CDD; 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 S1753493AbeBSSau (ORCPT + 99 others); Mon, 19 Feb 2018 13:30:50 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:40212 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753272AbeBSSat (ORCPT ); Mon, 19 Feb 2018 13:30:49 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 2E2966043F; Mon, 19 Feb 2018 18:30:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1519065049; bh=yHm/MhD4bXb7o9+B0royYZ1d1lRtMVRG1vdXRUXyDls=; h=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From; b=cqio+tBABMOS02oTB2PoiPJUXy3+5lnDa0Qj/jScFO4IgI88oJfmUC7Wxd0Jqua5H tjPZAtAUSVrJ2YsFUPARCHZd1zDzGDfRTGNrFz2daGh7AIN2lVd4DYKbjYKzouP9sf F6cnyzOOubaCELidETMY/Z4DSszWflX6MZ3eVuvc= 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 DF7E56032D; Mon, 19 Feb 2018 18:30:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1519065048; bh=yHm/MhD4bXb7o9+B0royYZ1d1lRtMVRG1vdXRUXyDls=; h=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From; b=lYDx+CDDTYeqdMZMPr9tWs+fS2tU6PqX7saeAi58XlIuRphjGj3EJGtnvJjlkb7lr JzSfeTxSLqAmajVc9BciyFKEwIwlC3gdyEPK0G/NiusBBJDB4O+11tRiRIA5p9xAG3 mTkcQNLxtX5ZgAx1tVemmW522OaAyK3WZ5njn6AI= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org DF7E56032D 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: Catalin Marinas Cc: Philip Elcan , Vikram Sethi , Marc Zyngier , Will Deacon , linux-kernel , kvmarm , linux-arm-kernel References: <1518829066-3558-1-git-send-email-shankerd@codeaurora.org> <20180219143820.5oxc2kendvq4bbtt@armageddon.cambridge.arm.com> <92836754-2ab3-d5db-f0be-7ee3e10f368f@codeaurora.org> <20180219171852.jsbzawbsyv7v5yi7@armageddon.cambridge.arm.com> From: Shanker Donthineni Message-ID: Date: Mon, 19 Feb 2018 12:30:46 -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: <20180219171852.jsbzawbsyv7v5yi7@armageddon.cambridge.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 Thanks Catalin for your comments. On 02/19/2018 11:18 AM, Catalin Marinas wrote: > 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). > I'll add two new features ARM64_HAS_DIC and ARM64_HAS_IDC to support all implementations. Unfortunately QCOM server chips supports IDC not DIC. -- 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.