From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 92426D2A530 for ; Wed, 16 Oct 2024 16:09:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=9A2M3l9xrLracluunXQqaUIfsa0L4iWpemVG+XIr3TY=; b=fu0FC+3M0KJSXXid9viK9zc8rv /z8rkoUhe3jmQ3fuSjTF4GlLM8gR5ciMKcWggVZnB5s01KSK3sHSEad+iEYHq9xvRUC/qJgMzp8P2 2ZEzUPohlU4Oo/Yn6C2+FmYlvRJZK0v2ksBK+VSNlfbWt1pMy31mx0XiBTxxpYB2ehLaR3GVFIdtI aCYDJXF5q16jhQotwlFL0Kw1cByLkrDwaArZvi31Juxs62DjAM4sAJxIYvX8vCXnnDQ38VvbMAZAB NTpqmD7zFiG48hs1Jy/7B4OBKq1YTKmt7q9dLmQ5Ew4KyXXBIZ4JrRI2hX/h6tBXWddOccYFlfiw0 orNQlKkg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t16ab-0000000CMnd-49VZ; Wed, 16 Oct 2024 16:09:34 +0000 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t16VB-0000000CLTi-1U0R for linux-arm-kernel@lists.infradead.org; Wed, 16 Oct 2024 16:03:58 +0000 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-71e6f1a5a19so2231290b3a.3 for ; Wed, 16 Oct 2024 09:03:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729094636; x=1729699436; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=9A2M3l9xrLracluunXQqaUIfsa0L4iWpemVG+XIr3TY=; b=xUl7p7/pGfs5xuN0JWynW2XOncyyAmljzVLo74ZfgMTPMvlRz123Qvm98koNRn8bRW G2xN8TQPV4KJ/5ckYn8v/077vcA7hMYQY984ztpfzkpKSp0QYZZ1obvCuFJ1hZA49eUY lwG8HOuop11EQq8BGDVCCaRjxEevySziPI3148cMCClXrRQBUW4TdU46VFnV4IlNl/Kw Zine+JjhZw3TBuXaWJFyz5skBBO1fgrEIvF5zuGZgxQN+eTsQ1Zs1+hh+IVmCU4qQ1fz yrFniYm+kWbWE0S1/PPWYbjwF9uVHVc0UM/MqnWpkD0jqVssfByGXgRN57x9IqtpDcEP U0Tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729094636; x=1729699436; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=9A2M3l9xrLracluunXQqaUIfsa0L4iWpemVG+XIr3TY=; b=ak7fmM99uwKytrZJjVvAd+lqONGdFcHkO60bNj0lqGTfjOxnLmoqEAqugtqduBtRDM mKrZzOumSpWc9nAJ8Nai8IaE6GJSqlHGGS6KJu7rJY5X3K1UESKS9tAiYrtAkM5LDTZM phI+xgGtsmGJ/KMSyGTAvLH2yQuAMWHg4uL+wC91IWwGPnowbQ1HleVkF3ej0YQLKlhY FG4N5huUfeurjJaqQWlzBLYetjG9HWOKwHBPvHops3909W4+A3pxR+8DwiarkrIjkv6j e0estpeKo0UwXFX0y0rgzsE9pZUG7Z/zG974fmaz+t9r9+sZNWj395BnbrLdP2vsvODk rmPQ== X-Forwarded-Encrypted: i=1; AJvYcCVZ79Ar+BE/EFAcPnIww1ladjMsX31lrgGA90zJADWa13gEsGWPTXR4YKqR4Uu+k/0MfMFBwbgiRW9hh+ePVr6K@lists.infradead.org X-Gm-Message-State: AOJu0Yz3fqISLEiFaB2amIPQpxdv64j3/tXxdGbwO/fvQCUrDtDvBlkg 4eP/fCFZSMyYltyrK2Le/9oSfixM9GfD/N1S/r5B4TlDM+zu1hZG3rpAUJnenE4= X-Google-Smtp-Source: AGHT+IFnobAnzJkSiUdU1I3b1rXS40/87QouJg7Eja2z0OpdeH1cg34MQqLrXEfnUMVAVSZABkiRgg== X-Received: by 2002:a05:6a00:2d9d:b0:71e:7d52:fa6d with SMTP id d2e1a72fcca58-71e7daef151mr6268997b3a.21.1729094635890; Wed, 16 Oct 2024 09:03:55 -0700 (PDT) Received: from p14s ([2604:3d09:148c:c800:2add:7601:8402:667]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71e774a4251sm3204256b3a.128.2024.10.16.09.03.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 09:03:55 -0700 (PDT) Date: Wed, 16 Oct 2024 10:03:52 -0600 From: Mathieu Poirier To: Zeng Heng Cc: nm@ti.com, kristo@kernel.org, ssantosh@kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, bobo.shaobowang@huawei.com Subject: Re: [PATCH] firmware: ti_sci: Fix compilation failure when CONFIG_TI_SCI_PROTOCOL=m Message-ID: References: <20241016013922.1392290-1-zengheng4@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241016013922.1392290-1-zengheng4@huawei.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241016_090357_418361_6E1152AA X-CRM114-Status: GOOD ( 21.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Oct 16, 2024 at 09:39:22AM +0800, Zeng Heng wrote: > When build with CONFIG_TI_SCI_PROTOCOL=m && CONFIG_TI_K3_M4_REMOTEPROC=y, > compilation tool chain would throw the following error message: > > arm-linux-gnueabi-ld: drivers/remoteproc/ti_k3_m4_remoteproc.o: > in function `k3_m4_rproc_probe': > ti_k3_m4_remoteproc.c:(.text+0xc24): > undefined reference to `devm_ti_sci_get_by_phandle' > > This is because devm_ti_sci_get_by_phandle() is compiled into the driver > module rather than compiled into kernel, it causes compilation couldn't > find the reference of devm_ti_sci_get_by_phandle() when tool chain tries > to link ti_k3_m4_remoteproc.o into kernel image. > > Replace IS_ENABLED with IS_REACHABLE to fix the problem. > > Reported-by: kernel test robot > Closes: https://lore.kernel.org/all/202410150837.FOGlkGvW-lkp@intel.com/ > Fixes: aa276781a64a ("firmware: Add basic support for TI System Control Interface (TI-SCI) protocol") > Signed-off-by: Zeng Heng > --- > include/linux/soc/ti/ti_sci_protocol.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/soc/ti/ti_sci_protocol.h b/include/linux/soc/ti/ti_sci_protocol.h > index bd0d11af76c5..cd44ee7f294b 100644 > --- a/include/linux/soc/ti/ti_sci_protocol.h > +++ b/include/linux/soc/ti/ti_sci_protocol.h > @@ -572,7 +572,7 @@ struct ti_sci_resource { > struct ti_sci_resource_desc *desc; > }; > > -#if IS_ENABLED(CONFIG_TI_SCI_PROTOCOL) > +#if IS_REACHABLE(CONFIG_TI_SCI_PROTOCOL) I have applied Arnd's patch [1] to fix this problem. Thanks, Mathieu [1]. https://lore.kernel.org/lkml/e6c84b91-20ce-474a-87f8-9faeb64f3724@app.fastmail.com/T/ > const struct ti_sci_handle *ti_sci_get_handle(struct device *dev); > int ti_sci_put_handle(const struct ti_sci_handle *handle); > const struct ti_sci_handle *devm_ti_sci_get_handle(struct device *dev); > -- > 2.25.1 > >