Received: by 2002:ab2:2994:0:b0:1ef:ca3e:3cd5 with SMTP id n20csp10283lqb; Thu, 14 Mar 2024 04:09:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWP/9MdGx535rWi9BHi7G4p96tkvsafhM6q4ZTNpQ9F7BnbfyxO1m5MAFC8Wy6jym+5+sw+gGIvqIS52YlPcCKQz+Dh1vzI1IGcL3MwzQ== X-Google-Smtp-Source: AGHT+IE6T0tRkA+RJFHOEji8If3wnJzkJ8LfwDc/vHFNL+y/yolIoXM0wsQdQ26aaEpoQiW3hFzf X-Received: by 2002:a17:903:943:b0:1dd:88d5:bf17 with SMTP id ma3-20020a170903094300b001dd88d5bf17mr1731376plb.54.1710414572224; Thu, 14 Mar 2024 04:09:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710414572; cv=pass; d=google.com; s=arc-20160816; b=jP88SGuClRy8r360ln9fqUTqmfNQ3LfsIbYw2zlDqNZPmg1OX9lQnT2z2gCCiS7TLW 8iukdNzdjpNltenGubkCe3IETv/qONF7QqB7oZ+wuiUIDU6tJd3Q+4zWaG1Bf/CP0OaN m+1ZZsWlxSX+Cyv3TVclgXltvPChRonwyVroS1nrbWXgWZ1x1CgCjTl9uKtxNm+OgZb+ yUz+V91VczOP68cQyc0DOx6A7U/dcP3Y6xXpcqmzm2DZhbt9WCS9DC6zyuANsOEFzUiw +pbEN+gegBAsbdoXBZoXLktPNOH1f8wB7PV1XE2zred2hlp2LfA6UTe3zFlfNQwJi7nK fOPA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date; bh=6BdARhoBU9tqSp7ir1itHAMzpT4LjrEbo4TEjprV4zk=; fh=nrEVBruJIunMYW1syRajrffZGYDACNJ1WNxpXpso66w=; b=Z+ZjCjwuwx23X/kz7fl01yGkLfudQM488MwRJiaIfxw0/EAOPLHjQummxJwRvLuA0K SMynNttPvPw2sE3ju6kfPJKJgkehFYKQZEmBr9qxE2t0EyVjUCZFmnKdk4yAvCIQnbXF SlACiBETqMsXkmUOA9QpkUvHHymzLF0MKbjmEUdfSc30lCb7kpV3REVHYcgvdUhkiZG4 YyVlKbNYoxKWmSFanZDpYZ1MBFyV+pBpHlFAMJoiyVEIZXMCx0A/s3T3mAe4qTdfmPZw vVON+ujKpYJpyuuLnMsIAgUdLWp6WgLXicmeXr5+fNfe9o+3w72LpNclTlGAQvMynIe3 0yhw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-103157-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-103157-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id w16-20020a170902e89000b001dd7e21af5fsi1287657plg.149.2024.03.14.04.09.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Mar 2024 04:09:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-103157-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-103157-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-103157-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id A1032284588 for ; Thu, 14 Mar 2024 11:09:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B7E346EB65; Thu, 14 Mar 2024 11:09:21 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E03826D1A1; Thu, 14 Mar 2024 11:09:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710414561; cv=none; b=WWnP6qTSH4uXXjnn03vWl6l/DXz7vaxNBO3yehMWe0iDBfrW8dlj7nVPP/z18j92d4RrokaxNPCIgkJ0OsFAHI0NprSH5Jq7PEqwHkKX+QakeikO0G2tzBSRj2YzSfOxM6R6zbPAd/IY8cZ4DzejlOXDB66HOA/VNtF/fEKXOgs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710414561; c=relaxed/simple; bh=6BdARhoBU9tqSp7ir1itHAMzpT4LjrEbo4TEjprV4zk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VQUd8Db7ylpBsc3UWpJAxXmoUXg92DN/DklsRmtmLWP/eKyccjsRawgFsKZ+QE6nYBoKJIjbx6S4ikURXYfu1ESf2jrTLuEk7PQbntIIQhTgIY7Jsbjbzf+kap10Jn8DjLhR0uciiydCl1X83+UC6PR7ZGKyKfmTrgz0H6Ex7G0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com 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 15778DA7; Thu, 14 Mar 2024 04:09:54 -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 929A73F73F; Thu, 14 Mar 2024 04:09:14 -0700 (PDT) Date: Thu, 14 Mar 2024 11:09:11 +0000 From: Sudeep Holla To: David Woodhouse Cc: linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, Paolo Bonzini , Sudeep Holla , Jonathan Corbet , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , Will Deacon , Mark Rutland , Lorenzo Pieralisi , "Rafael J. Wysocki" , Len Brown , Pavel Machek , Mostafa Saleh , Jean-Philippe Brucker , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, linux-pm@vger.kernel.org Subject: Re: [RFC PATCH 2/2] arm64: Use SYSTEM_OFF2 PSCI call to power off for hibernate Message-ID: References: <20240312135958.727765-1-dwmw2@infradead.org> <20240312135958.727765-3-dwmw2@infradead.org> <520ce28050c29cca754493f0595d4a64d45796ee.camel@infradead.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Wed, Mar 13, 2024 at 03:34:44PM +0000, Sudeep Holla wrote: > On Tue, Mar 12, 2024 at 04:36:05PM +0000, David Woodhouse wrote: > > On Tue, 2024-03-12 at 15:57 +0000, Sudeep Holla wrote: > > > Looked briefly at register_sys_off_handler and it should be OK to call > > > it from psci_init_system_off2() below. Any particular reason for having > > > separate initcall to do this ? We can even eliminate the need for > > > psci_init_system_off2 if it can be called from there. What am I missing ? > > > > My first attempt did that. I don't think we can kmalloc that early: > > > > That was was initial guess. But a quick hack on my setup and running it on > the FVP model didn't complain. I think either I messed up or something else > wrong, I must check on some h/w. Anyways sorry for the noise and thanks for > the response. > OK, it was indeed giving -ENOMEM which in my hack didn't get propogated properly ????. I assume you have some configs that is resulting in the crash instead of -ENOMEM as I see in my setup(FVP as well as hardware). Sorry for the noise. -- Regards, Sudeep