Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp669498imu; Fri, 25 Jan 2019 08:54:13 -0800 (PST) X-Google-Smtp-Source: ALg8bN5rZE3xAIkblpbiB1AjPmVD1JTSSHmsb6XlZGrJGxodC+TyaX4cYDoU9lj8mLt76mEK1fiL X-Received: by 2002:a63:6ac5:: with SMTP id f188mr10741330pgc.165.1548435253898; Fri, 25 Jan 2019 08:54:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548435253; cv=none; d=google.com; s=arc-20160816; b=QU6fosaPdPpyQyWWyzF6CyHtkOiG7jrg2WqGUrs5j43lBgzz2A8UoZgqLpk714Izzf ch+b1LxvXUpt9B+jnBOQCm6cJcnI0HC25GbvIzrPK4AtMFEOPinUeaZ0ENEJK5K8R9kF 2S2z1GiN7FwT71/oXimTx8Wnm0J4KGzk6b7fbOK8Y0wDOFqyn3QMHt0lZJ8zKIQlTDb5 LY74dCSk4I9ChE0myKPqU9B93nBA2CXxTBXjVBLHsnAHTwJhXC97MSLexOX6N9p115kL Ylelmenge6pzg7g/kzyuT8614RC48bh14sbZ8QW5SP/Sp55D3SczLf4/D2tzBQ7Na0Nh PiRQ== 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=ACt8Zfm0Wk/N6no3tWsUNSg+GoVsgkju6RBjCuEjxEs=; b=ZTaSRWsIZR9c7GIgEbkNtAOhnQp10d+09R/rQKd9KkJZ8H0buXQNz+nD6/Vseekg86 4IZw0LVa7BZCO3LCb8zTdNjXXVZUUY7AcXSfhg1xuOOxs7I5/hhpD5KiHyK7Ejt8ihPU l/Cx3+WHyHGs0plb90k3fsbkDxtCvB/29VK2UANbLnnNE29qk/r2e0hnYb6O0MeMq77a 8dzc5qLYd9Jk1pG4GHVs8cNK9nD8gX7uG5oxJT+zqrwltxkgYq97Q848nqxqBEWJYkTP nPS+ZNvxAMRgCp7Tp0ygZfb3V3/KlkfAIRdBOdNuebTMFSXNotp/FSfUAurz2GBM/5P+ o9kA== 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 q8si3730367pli.284.2019.01.25.08.53.58; Fri, 25 Jan 2019 08:54:13 -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 S1729041AbfAYQwO (ORCPT + 99 others); Fri, 25 Jan 2019 11:52:14 -0500 Received: from foss.arm.com ([217.140.101.70]:50502 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726108AbfAYQwO (ORCPT ); Fri, 25 Jan 2019 11:52:14 -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 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 Cc: Mark Rutland , Scott Branden , Catalin Marinas , Will Deacon , Suzuki K Poulose , Dave Martin , 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: <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-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 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