From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9EEB633A9D6 for ; Sun, 31 May 2026 08:41:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780216907; cv=none; b=AEyQHLaK1nkN0iI3vGk9HzoiVDVrXS3LumhBZ6OcJHBwELuNACmaUjOHYMyYdNJCmg2kLS2fJqfWmrMnm8434Vk/ltuAuxQ3aBuRbK18ORsitws8EiUbDhle8QFmrXFVv7hq41o2q49w+X5Rs25DNfD+42b6j/Mtlp7lx/M5oBs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780216907; c=relaxed/simple; bh=WjW2TCULk7ImYaO1PL/U9lqUXRRTZGUQQU7iKntLWoY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=jz3Krvltbgu4qhbXgIL2SMDD6uqJXEyLlmKDLmxVD9MywbHScsSESDPevJbtQdoHJuuRg79+k9FuswGuEN740dG6dV5wLD2RRS+TPrQUNRcPkwtCpIPCcGVA0/9qxxRDSil5sxtPGzGaAo3L7kzNZKwWeA3mWwj7aLcZZQ+rbI0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=cZ4EEOxo; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=LHBlHxnR; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="cZ4EEOxo"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="LHBlHxnR" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64UKhIZB2514076 for ; Sun, 31 May 2026 08:41:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= LSSHczkNGcyBGltE9n3/Qlzx5H59gm8hjXNQO9LCZb8=; b=cZ4EEOxo0R0xP1cU uqEA0gxK3qJB1dGa68+Nwb6j4ak5fuDQlS+mSQwNHLxzaWQugt7N/jSHX7xGjQHU /Wx7Biv29sb+3uEqCwmeL/3HlvBvd7Ez9cXTqGkIyr7H9GzeA1vrscAzIxVlcQTz QKPhnJiszl/4ncCOB0uKTz2mvSS+s8D1QTjL7TCYZe373Pf2EweWbOmho5rKUzlt iWmuHqsHfVwtdjZmdEqtxeCeGfm1drRIff/3atjIOM84xaQftodrJRA190q8/nup ezmg/o/mi5XtNKReiCHe7kjKMgR/E4o7FGHPRtGaqMmCHaIuIHdyZEd592EaJDY+ 2CMboQ== Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4efr41b78k-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sun, 31 May 2026 08:41:44 +0000 (GMT) Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-516da5a1db4so181621121cf.0 for ; Sun, 31 May 2026 01:41:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1780216904; x=1780821704; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=LSSHczkNGcyBGltE9n3/Qlzx5H59gm8hjXNQO9LCZb8=; b=LHBlHxnRHCCgqLdecEXHfTMGAu27KQ7omV1851KNQxWERdG3JgsANpnFTZ5BiO2hw5 If1hzlr5WuDiV3LagljqhmsqPSNArFh4JmYHvGO1iJUqGaaSPQJbBG5iZTYMARYEsGSc RPti7nHDNAP2FOxWGZc/noGpVkQA/1w/f4mGaLo+3mdWT0Iv6x059abRrXo/PG9IJjxu 3JSLXdPpbEfp0eIiFjwohUehRPKEhuziHDbBoyf5ttLVdiUsvb1sBdDZmST+PrHge+Yf CZIsFGaxIs6YZjTt6N3KnVLAkUh/pVi0dPVU038PuCO6mlUKcg6hjv4Qk8vmzbMWFl3s G0Jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780216904; x=1780821704; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=LSSHczkNGcyBGltE9n3/Qlzx5H59gm8hjXNQO9LCZb8=; b=RDGG/eYON836vX6dTNjrSZ11ZU6XSzvunf2F27qDShvwM4Zu4ld0BId915caZMBPt8 R0ibattKoQkHFzP8lDg1ig2DRzzDknr1/t4RXppvfiXnJHBsUkdKjV/HlOGlhts0ZY6j rV57YXZ7J5ZrWMlzTsz7BOxKBm9aU0NjF5PmxOaEgxmRpdV6YkwYsVc8s31w2c59qn+7 8v2dWZVG0kxH5JPId2ivsGfx5ULngrQxVJJ+VR4ohw7PNrz8HxJhqAQNHRj3OqqgdUm4 IdhUyM6o10WRfwoRX3+LRS3TQUAXvcgVrKA7ZfaH37ess8TQpTbkdnM2hB/GHPtHouik B0oQ== X-Forwarded-Encrypted: i=1; AFNElJ9t88R7DHAERuTRJQUH/I0SZreG8ZIPXiAVurtm7rurcmQJteiYby/UMQP4/EdccoG4zduGMZx8KfPnMKw=@vger.kernel.org X-Gm-Message-State: AOJu0YwFMA1obt54s3osliW8cEZMWELqPaiBfReayK4JSTfGAvBU/Q2A TBi3Scr58YgQPkBfCDOHzIw9sxCUtc2rBbPJupQpbz/N4JLJcztVSsC271va9fTga3muAi9oRV1 VlgyI/tn94qyj/g+cZW/gnShmz4Qc6yBmh9f2rUJdBG9PBLCK2j+IsTYf5t39KXlSXI8= X-Gm-Gg: Acq92OEG1rgRJMXsSnIudKMt+RLSPKrropBv202kl1Xf/9HwNxL7t8c63TIANMbLT36 2F93GTQYeu6GTsmANDuiOlflBzjOYtGxeRwP/eq6FfkmD7gwAIpIrlV1MGy8pJ20HLtUlt/2tGN CFihPEuqOxaQw0SRAQ5JEzVwd8LnpTP4KV7a7BNda/gM67UzVMWt0ztjaMJKtWOHIZ8vPCHXJ2B CBVKhyb+vj4G/lNOYx0W2vsqAAVQmqitrmYtb8M969pUHPNkhjGnVFIIlWSls6jXfGkebOCgOGk 79I4TG+D7ws9Cm7+4kzPVRFha7+hZe2DZBdj+cc5mqJxX+re0QtsGM2TQhEJMQ4zydPtazcd/Ix 6ZyPdTQdRJFPQ12AnFEQP0kwUj/D2tNjka4IBTx+Ig6hSVbjzZ1lLf3nYPoe20yZwI56c9KOjoq w4 X-Received: by 2002:a05:622a:4d43:b0:516:e031:9321 with SMTP id d75a77b69052e-5173a6ce03amr101633851cf.11.1780216903607; Sun, 31 May 2026 01:41:43 -0700 (PDT) X-Received: by 2002:a05:622a:4d43:b0:516:e031:9321 with SMTP id d75a77b69052e-5173a6ce03amr101633501cf.11.1780216903167; Sun, 31 May 2026 01:41:43 -0700 (PDT) Received: from [192.168.2.1] (146725694.box.freepro.com. [130.180.211.218]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4909cabfd6esm166065495e9.15.2026.05.31.01.41.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 31 May 2026 01:41:42 -0700 (PDT) Message-ID: <8c11a91b-cfbf-4b9c-a46f-907989bf8305@oss.qualcomm.com> Date: Sun, 31 May 2026 10:41:33 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] firmware: meson: sm: add stub functions when CONFIG_MESON_SM is disabled To: linux-kernel-dev@aliel.fr, Neil Armstrong , Daniel Lezcano , Zhang Rui , "Rafael J. Wysocki" , Lukasz Luba Cc: Guillaume La Roque , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Mark Brown , kernel test robot References: <20260531-fix-missing-meson_sm-symbol-v2-1-1def8c3c169f@aliel.fr> Content-Language: en-US From: Daniel Lezcano In-Reply-To: <20260531-fix-missing-meson_sm-symbol-v2-1-1def8c3c169f@aliel.fr> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Authority-Analysis: v=2.4 cv=fOEJG5ae c=1 sm=1 tr=0 ts=6a1bf448 cx=c_pps a=EVbN6Ke/fEF3bsl7X48z0g==:117 a=uw/3876vWhRnNVL35W6mqQ==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=VwQbUJbxAAAA:8 a=QyXUC8HyAAAA:8 a=QjikovrxREX5USwBPxUA:9 a=QEXdDO2ut3YA:10 a=a_PwQJl-kcHnX1M80qC6:22 X-Proofpoint-ORIG-GUID: H4aHVauT0v79Hth_eq6LfNaTI93uyP2E X-Proofpoint-GUID: H4aHVauT0v79Hth_eq6LfNaTI93uyP2E X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTMxMDA5NSBTYWx0ZWRfXxlIiAOB0HfmY sNJZykrEN8jSGHIp1+SfqdwPZ605KYO5ckMZ2sfuQ7ghsSvEX2gpyUB46JQ7jJ+K6puGV3pt+Fp mO1QAdqtxh6T/OHGCpNsIpnwklIchFQZzyR4FexzPBwxsI6EPcQbKSuCoQRcHdGpt6mUiLsoqz8 /scteY9x7pZ7PY3hCzCz+uN6umPBS64Em+MkYcIZlSKJguw/IaWEE8lDVVqHLFyAU1eROnoFXgI aAD8N10csOlGmm4GBmFKFgNRGmt8eAKpZaW5uy2t3s1Vc6W1oCNg2yfTNL8Rgv7I2C3968/+Oih Bw2lPiGl91hGqr7dqLb+MKB1XNeX7A2hbHKbIVTp7S4hLuLtNcB6yMmJOrqwYA+eLU6FZlfpw3k 0UUiDkL3Vsgu8OgF8QxZ6hLdHrLscbqwzU/nvUTPO/GGCvSwfLh/ue3/nPtIlZp7GxwD8luDSRa d6ekXfz9NVZX2yYJYdg== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-05-31_03,2026-05-28_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 bulkscore=0 priorityscore=1501 impostorscore=0 malwarescore=0 lowpriorityscore=0 adultscore=0 suspectscore=0 spamscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605210000 definitions=main-2605310095 On 5/31/26 09:51, Ronald Claveau via B4 Relay wrote: > From: Ronald Claveau > > After merging the thermal tree, linux-next build (arm_multi_v7 > defconfig) failed like this: > > arm-linux-gnueabihf-ld: drivers/thermal/amlogic_thermal.o: in function `amlogic_thermal_probe_sm': > /tmp/next/build/drivers/thermal/amlogic_thermal.c:196:(.text+0x2f4): undefined reference to `meson_sm_get' > arm-linux-gnueabihf-ld: /tmp/next/build/drivers/thermal/amlogic_thermal.c:205:(.text+0x320): undefined reference to `meson_sm_get_thermal_calib' > > Add inline stub implementations of meson_sm_get() and > meson_sm_get_thermal_calib() behind an #else guard so that drivers > including this header can be compiled without CONFIG_MESON_SM . > > Fixes: b21d88de6918 ("thermal/drivers/amlogic: Add support for secure monitor calibration readout") > Closes: https://lore.kernel.org/oe-kbuild-all/202605291530.en7aGn7w-lkp@intel.com/ > Reported-by: Mark Brown > Reported-by: kernel test robot > Signed-off-by: Ronald Claveau > --- > Changes in v2: > - Replace #ifdef CONFIG_MESON_SM by #if IS_ENABLED(CONFIG_MESON_SM) > to cover builtin and module in config. > - Add missing trailers for kernel test robot. > - Link to v1: https://lore.kernel.org/r/20260530-fix-missing-meson_sm-symbol-v1-1-3fb672b989d4@aliel.fr > --- > include/linux/firmware/meson/meson_sm.h | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > > diff --git a/include/linux/firmware/meson/meson_sm.h b/include/linux/firmware/meson/meson_sm.h > index 3ebc2bd9a9760..baecdaf263f41 100644 > --- a/include/linux/firmware/meson/meson_sm.h > +++ b/include/linux/firmware/meson/meson_sm.h > @@ -27,8 +27,25 @@ int meson_sm_call_write(struct meson_sm_firmware *fw, void *buffer, > int meson_sm_call_read(struct meson_sm_firmware *fw, void *buffer, > unsigned int bsize, unsigned int cmd_index, u32 arg0, > u32 arg1, u32 arg2, u32 arg3, u32 arg4); > + > +#if IS_ENABLED(CONFIG_MESON_SM) > + > struct meson_sm_firmware *meson_sm_get(struct device_node *firmware_node); > int meson_sm_get_thermal_calib(struct meson_sm_firmware *fw, u32 *trim_info, > u32 tsensor_id); Do you really want to compile meson_sm as a module ?