Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp639023pxu; Fri, 23 Oct 2020 09:32:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgcQ/rra9FQORlNHE+s+2EuOxO7xwGjuH4fNL12hZzOnHt+Bt/yjt8oxVqWrlDCcXq+qmy X-Received: by 2002:a50:b765:: with SMTP id g92mr3114826ede.380.1603470774011; Fri, 23 Oct 2020 09:32:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603470774; cv=none; d=google.com; s=arc-20160816; b=dWnD4a7xxhFD5826yaFtvXVknZIIKLaMnEPW1927yIr87ZfkQZxXPno/g23T1qO9lo Ho+b86Vufxghl188N2GCP4hoL1sLiux/BIZgQnLyivMe2Yevr6r/xmaEuXQUUnioa2qe eriasAxykMH5zPK0vtYZIw6AsKbEh4QoUHKb/5i1K4PxAne6kGGenSM5k+jM4J7kEqoV n6POw7u1ZxT2+DFPQKeeauLAmnwMGzFmZrq6eCUQoTEiTHibPsBV0KimAZ7jncWLOY7e Ro1Nm6oX0xUCMo4QU21ax/VU41A7PslkRDjcI4sXXrNeXuaDJQE1S4obTAkx5/4XgYe2 Yonw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=ZlQj3tCPCckSi6+6CPaqt3RogJk3rxEtfc4wg6bSbS4=; b=X91yrGwRr2oGS8QAGkUFQfFIoAwdorD3BrZBRPrSUPoK32SePHSb3P2kddsLHJms9E U3IAVGi433ADGbst2jdvvcH3w5cw48DuyBmLyHizoOeO/ujl6SwYixrhPSXsC/rGhnOB btgX2GvAOiwowS6+ZbT2rmprqwkDwTTG7ZUb6xgwK/XEP8ks4MI9Knq+A10ZiCrxAz4e KuDbz5lpm90vtZ59ctj8uay0KLuqgAd3AG8tsJXu5ySMw+8M4FfWlijuArcwjn08GzNh irlGTPEZOar7TjjUYiBwlyUNyOBlR33+BKOXoCu8q/dV1PXhbJ4q1OJfn2U5uz/KI7Tz pKJw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bu8si1349412edb.95.2020.10.23.09.32.31; Fri, 23 Oct 2020 09:32:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S465283AbgJWOst (ORCPT + 99 others); Fri, 23 Oct 2020 10:48:49 -0400 Received: from foss.arm.com ([217.140.110.172]:54314 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S375546AbgJWOss (ORCPT ); Fri, 23 Oct 2020 10:48:48 -0400 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 AF27A113E; Fri, 23 Oct 2020 07:48:47 -0700 (PDT) Received: from bogus (unknown [10.57.15.80]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6CC673F66E; Fri, 23 Oct 2020 07:48:45 -0700 (PDT) Date: Fri, 23 Oct 2020 15:48:42 +0100 From: Sudeep Holla To: claude yen Cc: "Rafael J . Wysocki" , Len Brown , Pavel Machek , Sudeep Holla , Matthias Brugger , wsd_upstream@mediatek.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] PM / s2idle: Export s2idle_set_ops Message-ID: <20201023144842.zos4pvpwv4r3rv4j@bogus> References: <20201022061748.13730-1-claude.yen@mediatek.com> <20201022061748.13730-2-claude.yen@mediatek.com> <20201022070154.hqvksoj4nss3er2e@bogus> <1603427300.7573.6.camel@mtkswgap22> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1603427300.7573.6.camel@mtkswgap22> User-Agent: NeoMutt/20171215 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 23, 2020 at 12:28:20PM +0800, claude yen wrote: > On Thu, 2020-10-22 at 08:02 +0100, Sudeep Holla wrote: > > On Thu, Oct 22, 2020 at 02:17:48PM +0800, Claude Yen wrote: > > > As suspend_set_ops is exported in commit a5e4fd8783a2 > > > ("PM / Suspend: Export suspend_set_ops, suspend_valid_only_mem"), > > > exporting s2idle_set_ops to make kernel module setup s2idle ops too. > > > > > > In this way, kernel module can hook platform suspend > > > functions regardless of Suspend-to-Ram(S2R) or > > > Suspend-to-Idle(S2I) > > > > > > > If this is for arm64 platform, then NACK. You must use PSCI and it will > > set the ops and it can't be module. > > > > PSCI uses suspend_set_ops instead. And suspend_set_ops has been > exported years ago. > > Suspend-to_Idle(S2I) is another suspend method supported by linux > kernel. The corresponding s2idle_ops can be hooked by s2idle_set_ops > by underlying platforms. For example, S2I is now introduced into > Mediatek SoC platforms. Besides, power management driver is built as > kernel module. > > Mobile platforms are now call for kernel drivers to be kernel modules. > This could help drivers easier to migrate to newer linux kernel. > Ref: https://linuxplumbersconf.org/event/7/contributions/790/ > I understand that. But I am interested in looking at the module you want to use this and how that interacts with PSCI. If this is arm64, you must use PSCI for system suspend and cpu suspend. What does this module do on top of those is what I want to know. Please post that module or point me if it is already present in the tree. -- Regards, Sudeep