Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6110080imu; Mon, 21 Jan 2019 03:24:59 -0800 (PST) X-Google-Smtp-Source: ALg8bN77QtNQhaCfNX3293Ret3OCj2KnnxBAz7hvf/MEGtSI7/vINJb5+0M5u5bEh/F/Eo+O3AT9 X-Received: by 2002:a62:3241:: with SMTP id y62mr29309800pfy.178.1548069899573; Mon, 21 Jan 2019 03:24:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548069899; cv=none; d=google.com; s=arc-20160816; b=VrQ78y2CkrcO/2PCYog/odEK/ycT7iy5eY2kw32VUDebVI2KuHVhXd+RqInsVlBad2 3J5W1H4QKdZmBB24XmRw7ul1xee79UhZk2GgIDQHQNL+yEF3zOUtNgxSg+m0q+wATzB0 5JqlIjRV2e82M9ye5KL5oHnqxzyni9QzKV+WoMocWbca6BKoWpX61X/X9fGvAPd6bUo6 8jIpyt/eyOmS81JkPYcxU0O2MalEDxE6rNdMwaZSy25VIcSz+x8qrSupHSE8rR4sPtFq waQwo9WYEmYg9hBPiKA6XMht1OLBpA40ZW85mV+1SvdPbA7m4Hm+fjQxfr5Pw0vp0PKi tb/Q== 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; bh=I7Yu9S+kT6Q7JXV+8xxpRUyfjrU6evPnyvVgDnTlIXs=; b=snpidhkFbSIx7zELif5SqzfN76uW7wtE8orSRzTeGnwTObU3cC85QDbP4bNmn9qayx BIr1/vwYxfaJASKcOFCRVDm9s2XhJ1M7IvMIlFtqo/teOkHRQkcNaG/O5nM0ToGOAGp0 iZrpd1JjR4cSYntDtBqPyI7O48zgl3dd+n18Phaf2Fvui7dXYDpFIz4EN+YZ4QJAbJBt rHfwk6BpIe+dQp/5Ph2IDgyGw2aIgvvqpsWT7NBvpMbh0HmznhlHZ5KSyr1orXLjmRdo l0jVXTWYFv+wsJqBA67sd7LYBX+ePIEoKcbLoHWoCzygWXA5fiLdBgDUvXKTp/+UJ/wt PHsA== 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 j5si12403255pfg.254.2019.01.21.03.24.44; Mon, 21 Jan 2019 03:24: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; 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 S1728164AbfAULXA (ORCPT + 99 others); Mon, 21 Jan 2019 06:23:00 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:59960 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727665AbfAULW6 (ORCPT ); Mon, 21 Jan 2019 06:22:58 -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 EFAA6EBD; Mon, 21 Jan 2019 03:22:57 -0800 (PST) Received: from e107155-lin (e107155-lin.cambridge.arm.com [10.1.196.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B7EEE3F5C1; Mon, 21 Jan 2019 03:22:55 -0800 (PST) Date: Mon, 21 Jan 2019 11:22:48 +0000 From: Sudeep Holla To: Pramod Kumar Cc: Catalin Marinas , Will Deacon , Suzuki K Poulose , Dave Martin , Mark Rutland , Rob Herring , Lorenzo Pieralisi , Steve Capper , Sudeep Holla , BCM Kernel Feedback , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC 1/1] arm64: Use PSCI calls for CPU stop when hotplug is supported Message-ID: <20190121112248.GA27784@e107155-lin> References: <1547790380-6276-1-git-send-email-pramod.kumar@broadcom.com> <20190118113242.GA8928@e107155-lin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 21, 2019 at 11:28:27AM +0530, Pramod Kumar wrote: > On Fri, Jan 18, 2019 at 5:02 PM Sudeep Holla wrote: > > On Fri, Jan 18, 2019 at 11:16:20AM +0530, Pramod Kumar wrote: > > > If CPU hotplug is supported, ipi_cpu_stop should use PSCI cpudie > > > call to stop the CPU. This call ensures L1/L2 cache flush, > > > CPUs cache-cohenrecy setting w.r.to interconnect. > > > > Firstly, this is not specific to PSCI and I don't see any PSCI calls as > > $subject claims. > > I had seen all the other cpu ops methods where only PSCI supports only > cpu_die features hence used PSCI reference in my subject line to be more > clear where this die gets converted in last. > OK, but since you are not directly dealing with PSCI APIs, it's misleading. > > Next, you fail to explain why do you have to ensure > > caches are cleaned and why do you need that in ipi_cpu_stop ? > > What's the use case ? > > > Need comes from a specific use case where one Accelerator card(SoC) is > plugged in a sever over a PCIe interface. This Card gets supply from a > battery, which could provide very less power for a very small time, in case > of any power loss. Once Card switches to battery, this has to reduce its > power consumption to its lowest point and back-up the DDR contents asap > before battery gets fully drained off. > OK, but I was expecting the complete call path for this use-case. > Since battery can provide limited power for a very short time hence need to > transition to lowest power. As per the transition process , CPUs power > domain has to be off but before that it needs to flush out its content to > system memory(L3) so that content could be backed-up by a MCU, a controller > consuming very less power. Since we can not afford plugging-out every > individual CPUs in sequence hence uses ipi_cpu_stop for all other CPUs So, you are randomly using ipi_cpu_stop for something it's not supposed to be used. What do you exactly want to achieve in that context where you need to save power ? Why system off or reset not sufficient ? -- Regards, Sudeep