Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp284316pxb; Fri, 3 Sep 2021 01:58:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjJxs0491+OjIOERCWsnAHxPpiM7TSp/5Nnui5fdIm78jv0vX+qKV8byPeDaKh2w2ILgir X-Received: by 2002:a05:6638:2257:: with SMTP id m23mr1707419jas.137.1630659506964; Fri, 03 Sep 2021 01:58:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630659506; cv=none; d=google.com; s=arc-20160816; b=PWdXREgjRkiCXITaTQ4Jpb+t5wZO9kCrk4LoLZDHdwnlPCYuRTAlS/fEDNLWLuMBtJ PBVzJKFH8r/btWe2xRp3pAa9Bo97m372PaXtL8c268DJQpyY/YffAPjX2at8Q7B342dS Os7wFJZnq0JGWhFrsy8G4gz93g0lQADC5MtfTCDK3qIpNUnXzgGqpdlhWB7jvP0jnqrc Rw8azin9ei+8iJ4fyyQ5QQENeLjRY36zFLjCQIihw4keREtMecC8Ptb38hoJ68uBu0WS dXmcVfroHlieegfUFfo19W3oh+xWpCmG3gOKr0APwClmvTcmAVucnsAx4U6qmxt0Oo/E VkwQ== 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=KPwbEGPpljfMAfT1TxPfzYiAaVv2385jfyjF6YplDBk=; b=l56L46DQTym8ftLmzU6hdKq+hvUChrJ6SQ339UF5GOcZeHA/SuL9UX8mE2hc+naTiz PMezKrxYOOcCEtbX/KyYXYApGPg5wQd78BwzTCv8N+21N2xcniz1GkSmbtRbLlGDwat5 OR2SZci8eWLPouCNKI+cJHD+VMv99M73D8IyC4D9vEpqyxNO0mfUr2kSQdEG4+AM2pQ4 G5xVB+63XIIhUFQzn756kE1Fn3WD4jg5CwhldoXX7QMPp9HNCWgDpR+VaD57PugpJ0oH cydjyLawk9I9Nzw9QZxIrSXV5BIHAUTrcfbvN/YDKCF8syislTby44p4fTj8n6caZxb0 ShYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="HIACXt/Y"; 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 u2si4708714ioc.87.2021.09.03.01.58.15; Fri, 03 Sep 2021 01:58:26 -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="HIACXt/Y"; 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 S1348555AbhICI5g (ORCPT + 99 others); Fri, 3 Sep 2021 04:57:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:40744 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348461AbhICI5e (ORCPT ); Fri, 3 Sep 2021 04:57:34 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F1B3161051; Fri, 3 Sep 2021 08:56:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1630659392; bh=SsjjbztlEwoQ2/FB20kOEWlK/4U11FZMfaPIS5UzwPA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HIACXt/YT6pWCqM1ZXgIK14DP/a+8b2wZJAtH533JTB7bHiNh5hQjPgWr4l844+Hp fsqjfJdlFyq4d5jAQMavIFBifH1me5UlrWLbbRy3fBUFxN2leYC9fYTFblIYrARotV Weq2nXrRWULvKRmXB2e4DIi5A9/LS26+/JVxSY+U= Date: Fri, 3 Sep 2021 10:56:29 +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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210903084937.19392-2-jgross@suse.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? thanks, greg k-h