Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp434623pxb; Fri, 3 Sep 2021 05:40:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyhxzUeYc9BalDZs/nFYcKpZsuj7+Biwwlfa4a0yEyUsVDnnp6LiwO7aO5PVByxFllSsy+i X-Received: by 2002:a92:d9d0:: with SMTP id n16mr2374377ilq.45.1630672815655; Fri, 03 Sep 2021 05:40:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630672815; cv=none; d=google.com; s=arc-20160816; b=c7yTwSpLB7Ax8tbV/6qWGAUurhzRbbcjU7vEl3sh9N/Q8CORRFt6ydho4galM0kVcD xiwyQWM8iQm9w2ZmtdW9zKGAFZ9NizxP8Uqe6Ebn/Vnm/g45PZlhv6c+qL3TD8I88kZV UtbzqOYnKy+tw0c4a/hX5MCXoF4G/AnkMnJ40xXNRI7TybkMAvTrC6zg/GN+F27aj2D6 XEtDb/2BMUPcxk1DKxfieHRIymydBBIstkFGx61Ox4X1kDiWWsbIjmrdcts/S83AHz7+ mvozprKAdHOPSqXIsqf26f2hpEOUog0/WW+cytYzUQGQOp/S+HD/mk5316mHXPM1cW1A 4L9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=TcvXhki+AZCsG8k5bcS5hzcHvlj1oVWLxA0TqdRmBW4=; b=ScWdLu/aYJ/e4dJvKGPup3+AYaj8uYtqLFTHcNYXT2Ik+qBMUFrIEioXvSW+9DNH7H aOYsgBV6PLhNG5uLg7tLtOBIebgk9+DeRtLa5xXeUw79UArCBG4Az8FdPOu2tO33B77k hckR3MtPKoIHA3ZZ/RjR70qi1yi7r4TP58Hb/LZd8RIrjvvK4u1tOdgQGxLl+mFecLEK H2+s9q9SQo+0qC4PQPfgpm3x8XXfk7Gr8FHz0v2EKL9wH5ZY0tivLIY/8NEZevf8PsYJ 7CGMJR7ZqyiHK/XxOs2oa0ZujeWHbVDhiCRzMzM2YcPGa8QeyZ4V/yhMwYEx/2UfZIoi 0FcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AXVe52q+; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k7si47424ior.112.2021.09.03.05.39.57; Fri, 03 Sep 2021 05:40:15 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AXVe52q+; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234740AbhICJKA (ORCPT + 99 others); Fri, 3 Sep 2021 05:10:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:47724 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231734AbhICJKA (ORCPT ); Fri, 3 Sep 2021 05:10:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 22EDB60FA0; Fri, 3 Sep 2021 09:08:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1630660140; bh=DcjjJ2WAyz1ejKxh5caZx2UjPxskQXotN1KC+CVTphM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AXVe52q+2qENaWaDMiNqezmL4BsUWssD8bJgO6b/o7VEIMHLNCgzHRygULaFTLwRR oGz0JvrwOuCyWgZZPRJsgjb88aE0JCr9iBHnqDnHyutHvuocaJmuo0+o0dzEvLEmh3 rgQwV9xE7s8/DBL80QGApRESQeCjgwrWCZXPWS2g= Date: Fri, 3 Sep 2021 11:08:58 +0200 From: Greg Kroah-Hartman To: Juergen Gross Cc: xen-devel@lists.xenproject.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, "Rafael J. Wysocki" , Len Brown , Pavel Machek , "Rafael J. Wysocki" , stable@vger.kernel.org Subject: Re: [PATCH 1/2] PM: base: power: don't try to use non-existing RTC for storing data Message-ID: References: <20210903084937.19392-1-jgross@suse.com> <20210903084937.19392-2-jgross@suse.com> <1b6a8f9c-2a5f-e97e-c89d-5983ceeb20e5@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1b6a8f9c-2a5f-e97e-c89d-5983ceeb20e5@suse.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 03, 2021 at 11:01:58AM +0200, Juergen Gross wrote: > On 03.09.21 10:56, Greg Kroah-Hartman wrote: > > On Fri, Sep 03, 2021 at 10:49:36AM +0200, Juergen Gross wrote: > > > In there is no legacy RTC device, don't try to use it for storing trace > > > data across suspend/resume. > > > > > > Cc: > > > Signed-off-by: Juergen Gross > > > --- > > > drivers/base/power/trace.c | 10 ++++++++++ > > > 1 file changed, 10 insertions(+) > > > > > > diff --git a/drivers/base/power/trace.c b/drivers/base/power/trace.c > > > index a97f33d0c59f..b7c80849455c 100644 > > > --- a/drivers/base/power/trace.c > > > +++ b/drivers/base/power/trace.c > > > @@ -13,6 +13,7 @@ > > > #include > > > #include > > > #include > > > +#include > > > #include > > > @@ -165,6 +166,9 @@ void generate_pm_trace(const void *tracedata, unsigned int user) > > > const char *file = *(const char **)(tracedata + 2); > > > unsigned int user_hash_value, file_hash_value; > > > + if (!x86_platform.legacy.rtc) > > > + return 0; > > > > Why does the driver core code here care about a platform/arch-specific > > thing at all? Did you just break all other arches? > > This file is only compiled for x86. It depends on CONFIG_PM_TRACE_RTC, > which has a "depends on X86" attribute. Odd, and not obvious at all :( Ok, I'll let Rafael review this...