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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id A5526C4345F for ; Fri, 19 Apr 2024 12:39:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc: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=3RCjHbBunPlJD8P/SY11n6gShOaCT2EPIce+DucxfTU=; b=SRDzoTkdWkoMUS k6ZxC7M47LiqSDiOFR0YWW6fY+REolUyHFcXKTPFt+ybwXdwNxaJxRvz2RluWF0RB55mm7R0ADPln BExx/QHXxKq5mOWMQnZtYr2V0SImv2B0OROwGaIaUAGSRkUFhCtWAxl80XSbuDWpfxWMMoApdx5yD SuSJXL2Lh7iDj9f0IGEecbTL6obhjATqmF1GczjBaT1C/z1RfmVBLnyRqA1LgLULPdDtMC8dZR4at x6w942wvXeYB4j+UIc9jQ3bdg1RCNkHrf9d9XeDJD5ek4QjNnxMEso4LtBysRuHGC+hnggisZ5OW6 7udi1Fdi0o/6v335kPvQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxnW8-00000005cxO-0OH1; Fri, 19 Apr 2024 12:39:00 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxnW4-00000005cvD-3TDY for linux-arm-kernel@lists.infradead.org; Fri, 19 Apr 2024 12:38:58 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 69E772F; Fri, 19 Apr 2024 05:39:21 -0700 (PDT) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1A9ED3F64C; Fri, 19 Apr 2024 05:38:49 -0700 (PDT) Date: Fri, 19 Apr 2024 13:38:47 +0100 From: Sudeep Holla To: Florian Fainelli Cc: Elliot Berman , Bjorn Andersson , Sudeep Holla , Konrad Dybcio , Sebastian Reichel , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul , Andy Yan , Lorenzo Pieralisi , Mark Rutland , Bartosz Golaszewski , Satya Durga Srinivasu Prabhala , Melody Olvera , Shivendra Pratap , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH v2 0/4] Implement vendor resets for PSCI SYSTEM_RESET2 Message-ID: <20240419123847.ica22nft3sejqnm7@bogus> References: <20240414-arm-psci-system_reset2-vendor-reboots-v2-0-da9a055a648f@quicinc.com> <48f366f5-4a17-474c-a8e3-6d79c9092d62@broadcom.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <48f366f5-4a17-474c-a8e3-6d79c9092d62@broadcom.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240419_053856_938059_995BEAF7 X-CRM114-Status: GOOD ( 27.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Apr 17, 2024 at 10:50:07AM -0700, Florian Fainelli wrote: > On 4/16/24 02:35, Sudeep Holla wrote: > > On Sun, Apr 14, 2024 at 12:30:23PM -0700, Elliot Berman wrote: > > > The PSCI SYSTEM_RESET2 call allows vendor firmware to define additional > > > reset types which could be mapped to the reboot argument. > > > > > > Setting up reboot on Qualcomm devices can be inconsistent from chipset > > > to chipset. > > > > That doesn't sound good. Do you mean PSCI SYSTEM_RESET doesn't work as > > expected ? Does it mean it is not conformant to the specification ? > > > > > Generally, there is a PMIC register that gets written to > > > decide the reboot type. There is also sometimes a cookie that can be > > > written to indicate that the bootloader should behave differently than a > > > regular boot. These knobs evolve over product generations and require > > > more drivers. Qualcomm firmwares are beginning to expose vendor > > > SYSTEM_RESET2 types to simplify driver requirements from Linux. > > > > > > > Why can't this be fully userspace driven ? What is the need to keep the > > cookie in the DT ? > > > > > > Using the second example in the Device Tree: > > mode-bootloader = <1 2>; > > are you suggesting that within psci_vendor_sys_reset2() we would look at the > data argument and assume that we have something like this in memory: > > const char *cmd = data; > > cmd[] = "bootloader 2" > > where "bootloader" is the reboot command, and "2" is the cookie? From an > util-linux, busybox, toybox, etc. we would have to concatenate those > arguments with a space, but I suppose that would be doable. > Yes that was my thought when I wrote the email. But since I have looked at existing bindings and support in the kernel in little more detail I would say. So I am not sure what would be the better choice for PSCI SYSTEM_RESET2 especially when there is some ground support to build. So I am open for alternatives including this approach. -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel