Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp4939596pxb; Tue, 28 Sep 2021 07:19:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVVU6yueOONzohhkyK/+afIaG+mpswarYfqLChN+MvtSNhvsBF9IWOx/+xroAkOSxv1duX X-Received: by 2002:a17:906:c20d:: with SMTP id d13mr6946392ejz.259.1632838799447; Tue, 28 Sep 2021 07:19:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632838799; cv=none; d=google.com; s=arc-20160816; b=jnpWzuUQI+/546TEHT0yrMWTw8MkeUuVvQt/URX+P8IapAMgFbsUGZRBB1RxpFncRv FPMDijIybLeRfLCxXJzpV7MI0EPF1PAM+lvguZcCaFS91qNVh2xHQ0JJi0duMQMRl8zo hYfwJyUDbcBRMHqmDydsPULk22yIrQ4s7ornnOxAY7R9Lyt/r6wx1ZKCRkFLChd/Ljgl dEvGHzeJlpkNts1l8tvB2d+lF80UNjlO+067x4KB86ICPUm8hNH8Vp/DQQtKSfbXjJEQ k24QqSciesORPDtxXFnICID1Q4LpsCGckTxkJKHEiWBdMnc91U53eoIz1emQJIKM1t4M vxjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=AWD5TlJk9nEWaPVGYxsFMEI0pK3OkzOISyOGy4sUKVk=; b=xJ9aHsQU3cMGeUKOprplGwlc9atbp4Tk9HQldOTfTzPewCvGlw+DOiAA1gbTcI3qxv EYHb3qsTIk99vcmX8m0dNTxEEw8jxaJ3wJ30J36SphO08zLBX5VeLmBvlcgJ9zwIrUio /wVEK1ikGvOSHA3hfkWz7knzHA/dUDKmlVRIjzVhuYpXycEkJG9eCfiY5Y57YXOprM74 3B0SCo+Hug+BDz/mV/kMdrbGSnTfSNHAqesAbDTnDzoMIm8D8qRfWBHxxX5HtARmAORG xExOjnrUtpyBTDCU269dvUPFG2LtjyGXNYTj3oWVGgITHNxQ6XtlbGPNEnVh4Vwb3nkZ gYxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=U4MTJA1i; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i2si29968175ejw.120.2021.09.28.07.19.33; Tue, 28 Sep 2021 07:19:59 -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=@redhat.com header.s=mimecast20190719 header.b=U4MTJA1i; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241263AbhI1ORd (ORCPT + 99 others); Tue, 28 Sep 2021 10:17:33 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:22922 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241191AbhI1ORd (ORCPT ); Tue, 28 Sep 2021 10:17:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632838553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AWD5TlJk9nEWaPVGYxsFMEI0pK3OkzOISyOGy4sUKVk=; b=U4MTJA1ip221059GlNadnLFluwpl1ZP+OnNPjv2t2oiaJIcpbRPaR3L0PoFRQXaJ2T2kNV fr/JDwbYzo8Lj/K+TOfzaNGu5FFDwcvQzQPQfHFOP0JPLS8a3GOwsteAQmEiVljjydywQ2 hQfEAaK6qFsKGgol6DFHLN7e1ouFwcU= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-593-Vod1PK04NwubKA0XeWnX-g-1; Tue, 28 Sep 2021 10:15:52 -0400 X-MC-Unique: Vod1PK04NwubKA0XeWnX-g-1 Received: by mail-ed1-f70.google.com with SMTP id h15-20020aa7de0f000000b003d02f9592d6so21899144edv.17 for ; Tue, 28 Sep 2021 07:15:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=AWD5TlJk9nEWaPVGYxsFMEI0pK3OkzOISyOGy4sUKVk=; b=3FTh1cpNUpxDf4Sc2PvdNW74O5Omloo3Dq/tbgZLeffrjmZLHKi0xqJApOWL+gurqi gMZMr07Gqm2NR5e1B33xcGEIjgjXZ3587FWm1Ee92edfUTRvAXV/91eeNOlCh2JOGLt1 O6U2PLE3r43eSc/VyGtU6Uz/aIXjx1JVga1QfvFHrukbRxsu/7gFmJAG0aEwqwC/v1MA ixsjl2DJggoKtF2wR3/TWighunyLvUYcPymbQxtS4aqN7RyJk54ACvm5DsF9Xi3C8rHc D6d87XWfipUpRa2XPrWDkYTzHm5MKoyBMOlCog6jCzLmd8Ogfo9h9qmeuscJ4lGau7gj JQTA== X-Gm-Message-State: AOAM530UMUFVj5SB3def3EgfWd5tYrU8l5D01QgIb4a85saHp+4NwoH7 YY/Ghvbwnnvpu61UzNcCLDGY3MDTOgc9Ca2EpgpQzKTPZa/6HjDWIW0n2lPCb4uSDpG19bYtTZY HNf/siBpcQdXIoBkiuxwKx6tUttM62xkpM0F9Mf4trp07Tux87i2WVerMUjxrONHk1EfMYs38da Gt X-Received: by 2002:aa7:cd41:: with SMTP id v1mr7736201edw.393.1632838550554; Tue, 28 Sep 2021 07:15:50 -0700 (PDT) X-Received: by 2002:aa7:cd41:: with SMTP id v1mr7736179edw.393.1632838550363; Tue, 28 Sep 2021 07:15:50 -0700 (PDT) Received: from x1.localdomain (2001-1c00-0c1e-bf00-1054-9d19-e0f0-8214.cable.dynamic.v6.ziggo.nl. [2001:1c00:c1e:bf00:1054:9d19:e0f0:8214]) by smtp.gmail.com with ESMTPSA id k18sm12063530edv.41.2021.09.28.07.15.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Sep 2021 07:15:49 -0700 (PDT) Subject: Re: [PATCH v2] platform/x86: amd-pmc: Export Idlemask values based on the APU To: Nathan Chancellor , Sanket Goswami Cc: Shyam-sundar.S-k@amd.com, mgross@linux.intel.com, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210916124002.2529-1-Sanket.Goswami@amd.com> From: Hans de Goede Message-ID: <09b3489b-3474-c626-d312-cde1cb023397@redhat.com> Date: Tue, 28 Sep 2021 16:15:49 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 9/23/21 11:50 PM, Nathan Chancellor wrote: > On Thu, Sep 16, 2021 at 06:10:02PM +0530, Sanket Goswami wrote: >> IdleMask is the metric used by the PM firmware to know the status of each >> of the Hardware IP blocks monitored by the PM firmware. >> >> Knowing this value is key to get the information of s2idle suspend/resume >> status. This value is mapped to PMC scratch registers, retrieve them >> accordingly based on the CPU family and the underlying firmware support. >> >> Co-developed-by: Shyam Sundar S K >> Signed-off-by: Shyam Sundar S K >> Signed-off-by: Sanket Goswami > > This patch as commit f6045de1f532 ("platform/x86: amd-pmc: Export > Idlemask values based on the APU") in -next causes the following errors > when CONFIG_DEBUG_FS is disabled: > > drivers/platform/x86/amd-pmc.c:424:2: error: implicit declaration of function 'amd_pmc_idlemask_read' [-Werror,-Wimplicit-function-declaration] > amd_pmc_idlemask_read(pdev, dev, NULL); > ^ > drivers/platform/x86/amd-pmc.c:424:2: note: did you mean 'amd_pmc_reg_read'? > drivers/platform/x86/amd-pmc.c:131:19: note: 'amd_pmc_reg_read' declared here > static inline u32 amd_pmc_reg_read(struct amd_pmc_dev *dev, int reg_offset) > ^ > drivers/platform/x86/amd-pmc.c:448:2: error: implicit declaration of function 'amd_pmc_idlemask_read' [-Werror,-Wimplicit-function-declaration] > amd_pmc_idlemask_read(pdev, dev, NULL); > ^ > drivers/platform/x86/amd-pmc.c:536:2: error: implicit declaration of function 'amd_pmc_get_smu_version' [-Werror,-Wimplicit-function-declaration] > amd_pmc_get_smu_version(dev); > ^ > 3 errors generated. > > Should these functions be stubbed or should there be a different fix? Thank you for the bug report. Since these functions are also used outside of the debugfs show functions they simply need to be moved outside of the #ifdef CONFIG_DEBUG_FS block. I'll add a patch fixing this to pdx86/review-hans and include it in my next pdx86-fixes pull-req to Linus. Regards, Hans