From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, USER_AGENT_MUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5DD0BC282C0 for ; Fri, 25 Jan 2019 16:52:25 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2A165218CD for ; Fri, 25 Jan 2019 16:52:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TP0QIUG/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2A165218CD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=sjRMdDsbx7IpfHonw4uzZIH0zirWC0oQJPh8+cZPAt0=; b=TP0QIUG/wRzayy kAb0oKoRDw2Ge82oTTiejcKxS402NtX9LME+qQXUka2uNzGdP7zM0vm0Nh8hj6TjDLlrkFndS8Ipl jq6gfuB8K7XLcUuWDeHLxF3opjwamPcbtr2IN99LvwyFJME7k/N11XuF6Vxix99DFHjDr9p7aIJ6E 0G0g2fXFZmT378SS+/J4KOsRjy54Rd5Iu9XMPhBCPX4bj9QPApKvznJ1efHjAnpiPpSXRweL4oXT+ OouePKIEqBqDo9tzEtBSZdXHs6Rzk69cfi7OK7MeYX0UTp7jsnsirfDicuv5bUoQGRutGCBRSAahQ gSzM/R1AumeU4zajJCJw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gn4iM-0004H8-38; Fri, 25 Jan 2019 16:52:22 +0000 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gn4iI-0004ED-5p for linux-arm-kernel@lists.infradead.org; Fri, 25 Jan 2019 16:52:20 +0000 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 2249FA78; Fri, 25 Jan 2019 08:52:14 -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 B741D3F5AF; Fri, 25 Jan 2019 08:52:11 -0800 (PST) Date: Fri, 25 Jan 2019 16:52:04 +0000 From: Sudeep Holla To: Pramod Kumar Subject: Re: [PATCH RFC 1/1] arm64: Use PSCI calls for CPU stop when hotplug is supported Message-ID: <20190125165204.GA20168@e107155-lin> References: <1547790380-6276-1-git-send-email-pramod.kumar@broadcom.com> <20190118113242.GA8928@e107155-lin> <20190123164801.GA55887@lakrids.cambridge.arm.com> <20190123173343.GC55887@lakrids.cambridge.arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190125_085218_270956_E640E120 X-CRM114-Status: GOOD ( 22.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Rob Herring , Lorenzo Pieralisi , Suzuki K Poulose , Catalin Marinas , Scott Branden , Will Deacon , linux-kernel@vger.kernel.org, BCM Kernel Feedback , Sudeep Holla , Dave Martin , linux-arm-kernel@lists.infradead.org, Steve Capper Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Jan 25, 2019 at 12:33:56PM +0530, Pramod Kumar wrote: [...] > > This is an GPIO interrupt. This can not be marked secure as for that > we need to mark whole GPIO controller as secure which is not possible > as GPIO controller is meant for non-secure world having more than 100 > lines connected. > > I agree we have work around where we invoke handler in Linux and > switch to ATF via SMC and from ATF we need bring all secondary CPU to > ATF via sending SGI and and then respective core flushes the L1/L2 and > bring himself out of coherency domain and cluster and MCU shutdowns > the CPU subsystem gracefully. This could work for our requirement. > Need to check ATF support for that. > Yes platform specific requirement and platform specific solution, happy ending :). > But What about generic system? This patch address the generic > multi-master system's requirement. Why do we need to address this in generic system ? And what exactly is this multi-master system's requirement ? Linux runs on one or more masters and will own it completely. Shutdown must involve everything it owns if it needs to be graceful. > Consider system where shutting down the linux does not mean shutting > down the complete system. Why is that the case ? Is it forceful shutdown ? Does Linux just own CPUs and don't care about other blocks in the system ? Irrespective of what it owns, system shutdown will take care. > Lets take an example of smartnic case Where NIC master and CPUs access > cachable DDR. In smarnic its quite common to bring CPUs on demand means > when needed via MCU help. Yes you are talking about CPU hotplug or system here ? The above indicates, it's just CPU hotplug and a solution already exists for that. > Now in full-fledged system. if CPU subsystem is shutdown via poweroff > command which does not bring secondary CPUs out of coherency domain, > it will bring the complete system unstable when NIC master tries to > access DDR and snoop is send to CPUs as well which is not available. > Fabric/System hangs... > That's because your custom solution just sends ipi to stop CPUs. If you shutdown the system, all the required information is save to non-volatile memory and system is powered off gracefully. > I feel While shutting down the CPUs subsystem or powering off, All > secondary CPUs must be shutdown properly by bring-out of coherency > domain to remain rest of subsystem usable. I agree that introducing > PSCI call introduce delay for shutdown/reboot case but stability > matter than little delay. IPI_STOP is not designed to do a graceful shutdown of CPU subsystem. Use CPU hotplug. You are trying to make you custom requirement a generic one. We have CPU hotplug framework to do what you want, you just have to use it. Infact you are doing almost the same with you patch, I don't see any point as why CPU hotplug can't be used. -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel