Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp4041056ima; Mon, 4 Feb 2019 09:14:09 -0800 (PST) X-Google-Smtp-Source: AHgI3Iauev+nUnO2KMW6rZLTcTFxl6D6V6N+z+cRIr9bUcUspLnuNn5EoVEWmp2NdlZoURzJSaIP X-Received: by 2002:a63:c64f:: with SMTP id x15mr398023pgg.16.1549300449098; Mon, 04 Feb 2019 09:14:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549300449; cv=none; d=google.com; s=arc-20160816; b=X2Nb7aglH+09Az1rU8W27yuhBgD8BiRpzNcy0iVkiFmAdeZWAGu5d0bRF8BU82PnAo VO9ZmddcxRausB/1yAmuR/+32pzE5ldGvMfNEKWyBD8fO5X6yVgjLJkKGQVeu4sOR6VG EB/4VgBhFpmJhLZuO2GKpoO4TyYuKmvPeJ5TbSW6ODs3zGRhayDNH2944zXHTP6fDeJQ dtBLxhgvBRUuHeXvUSX4/7Ln0m5QvU2s+iGwTccpRyeDNBgKumRbzW4G1Z3zdEJ8N0LA BneO1J0+SO4Hc/xxcluYeyLMGwVUa61AbdUYrWL7gDOT5UND7vsOekTWW7mXmYJJolWk 2YyQ== 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:dkim-signature; bh=ha/+uI+vnvjtCcDb9XN7QBU6CQGohtEqCq/OYFexh8U=; b=L2CqO143a3e7L72v0PO0Kbc5vXpBN7bMEpTNmEDQ98JigTstH1Fcz9CPjSVGiwokiF 2uY/FRmKlUy3OjlGGERAQ8WnijfpCSmSUrT50eS6PKWB0xdzZnqi7xq5DKHlqIVKtjD4 nH5AvmJtkVVWr0FNpX78YAKDcbNErNSj81ucBNwjiJS+NzXMkfweyx3SrPOUq+FSe7FF 56ZPa/B4xiA7BtjdmbRbPlDCGfzquTQZrZriQkgeaGiygfEAZeMxD4WdDM/mqKAgTKwl 7LYGa622YIt0ViYQZEQhy3hfUq9ha9cK1yMiyYg4QYp5XANMhnAcRati2nkYdou7z/J3 Y0Rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sAZBIaf0; 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 y10si437961pgp.348.2019.02.04.09.13.51; Mon, 04 Feb 2019 09:14:09 -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; dkim=pass header.i=@kernel.org header.s=default header.b=sAZBIaf0; 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 S1731427AbfBDPo1 (ORCPT + 99 others); Mon, 4 Feb 2019 10:44:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:57552 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728992AbfBDPo0 (ORCPT ); Mon, 4 Feb 2019 10:44:26 -0500 Received: from localhost (unknown [62.119.166.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3961C2082E; Mon, 4 Feb 2019 15:44:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549295065; bh=e5nki5FDDmx8mX6HmwJkUVX2wgXI/UQQ4Og4+Il/kBg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sAZBIaf0alTIQ2A26rG+4CwfBxEcw2mE1qpIT9pfCkiuF5c0Qn/fBohQ/Ie2C9q7b 1VDkclwga97f7p6mYuNS+ULxAw0l/FQASMo+bL99DZ7hKHzh/oqg6znFo4rncUaBHN euQ9Eqq1JUsjuCAeCPMscOay9KcUALzrReJ7sVRE= Date: Mon, 4 Feb 2019 16:44:21 +0100 From: Greg Kroah-Hartman To: Sudeep Holla Cc: "Rafael J. Wysocki" , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Jisheng Zhang , Steve Longerbeam , Eugeniu Rosca , Joshua Frkuska Subject: Re: [RFC PATCH] drivers core: cpu: add hotplug callback to update cpu_dev state to resumed Message-ID: <20190204154421.GA14330@kroah.com> References: <20190125130701.GA855@vmlxhi-102.adit-jv.com> <20190125150906.27614-1-sudeep.holla@arm.com> <2397404.eE4apdlqQK@aspire.rjw.lan> <20190131160559.GA32759@e107155-lin> <20190204153720.GA24131@e107155-lin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190204153720.GA24131@e107155-lin> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 04, 2019 at 03:37:20PM +0000, Sudeep Holla wrote: > On Thu, Jan 31, 2019 at 04:05:59PM +0000, Sudeep Holla wrote: > > On Thu, Jan 31, 2019 at 12:48:49AM +0100, Rafael J. Wysocki wrote: > > > On Friday, January 25, 2019 4:09:06 PM CET Sudeep Holla wrote: > > > > The sysfs for the cpu caches are managed by adding devices with cpu > > > > as the parent in cpu_device_create() when secondary cpu is brought > > > > onlin. Generally when the secondary CPUs are hotplugged back is as part > > > > of resume from suspend-to-ram, we call cpu_device_create() from the cpu > > > > hotplug state machine while the cpu device associated with that CPU is > > > > not yet ready to be resumed as the device_resume() call happens bit later. > > > > It's not really needed to set the flag is_prepared for cpu devices are > > > > they are mostly pseudo device and hotplug framework deals with state > > > > machine and not managed through the cpu device. > > > > > > > > This often results in annoying warning when resuming: > > > > Enabling non-boot CPUs ... > > > > CPU1: Booted secondary processor > > > > cache: parent cpu1 should not be sleeping > > > > CPU1 is up > > > > CPU2: Booted secondary processor > > > > cache: parent cpu2 should not be sleeping > > > > CPU2 is up > > > > .... and so on. > > > > > > > > Just fix the warning by updating the device state quite early. > > > > > > > > Cc: "Rafael J. Wysocki" > > > > Reported-by: Jisheng Zhang > > > > Reported-by: Steve Longerbeam > > > > Reported-by: Eugeniu Rosca > > > > Signed-off-by: Sudeep Holla > > > > --- > > > > drivers/base/cpu.c | 20 +++++++++++++++++++- > > > > include/linux/cpuhotplug.h | 1 + > > > > 2 files changed, 20 insertions(+), 1 deletion(-) > > > > > > > > Hi Rafael, > > > > > > > > This is getting reported for quite some time. Let me know if you have > > > > better solution to fix this harmless yet annoying warnings during system > > > > resume. > > > > > > I'd rather have a flag in struct dev_pm_info that will cause the message to > > > be suppressed if set. > > > > > > It could be used for other purposes too then in princple (like skipping the > > > creation of empty "power" attr groups in sysfs for devices that don't > > > need them etc.). > > > > > Thanks for the suggestion. I did quick hack and came up with something > > below. I wanted to run through you once before I materialise it into > > a formal patch to check if I understood your suggestion correctly. > > We can move no_pm_required outside dev_pm_info struct and rename with > > any better names. > > > > Sorry for the nag, since the title has RFC, thought there are chances of > this getting lost. Let me know if the below idea aligns with your suggestion ? Personally, I ignore RFC patches unless I'm accidentally interested in them, as it shows that the author doesn't feel good enough to propose them as a real solution :) But that's just me... thanks, greg k-h