Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp181610imb; Thu, 28 Feb 2019 20:24:42 -0800 (PST) X-Google-Smtp-Source: APXvYqwAiI3ODn3UKkG6Dh/T9ZvyPiABxQcRgTj6+idK1A5PQDD825lB0XQaKDdD9MTC7W6IGpeZ X-Received: by 2002:a62:110c:: with SMTP id z12mr3547348pfi.184.1551414282828; Thu, 28 Feb 2019 20:24:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551414282; cv=none; d=google.com; s=arc-20160816; b=K5QFB0wke3xPgVoJ4XzJ/+RRR2Xm5YUtyv6ZTK+0Pz5Ma8PFz+m/mFpMNQShYzxxCS m4LXd34wHXtLLPuYKA+VFcI02rP9EtCaWYjtCKj+ZzKWNwqlntt/lsWUyXtmVKSiAZiG S8kANAQBphH+wOIsq0nnBjZzYdLdEWz9ArZprGbGrMPt/al/ua0vk0cW/rKsttIIuMf/ B1OSKzF/nRJjfvYD/goNfYOfNVKS8lt2Ckwg5dNEQxFrN+lf+8sn6LJ20QGgOm0WElaj RnAam5LXuHoDIpjtwP4fCFFw1vyH2G/RvKS9LSgGW+GU925Jxp2iL8si49CUEahHriaA OmvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=XqWVLQo+0c9TMh3Jp82Vt/m+tyYOsGfEqM4JMup8HNA=; b=w8KczmBD5zuotA2s2YJ9rnr6Q2Azija9j4oRSZOw4xOnaiDkeDwd8Lr96HuUKaRQm8 SLL/Jn4sTpIqyHhTLP03Tb3VBExI5pAH68W3eJCS7MmIDheJKD1tyK9LL+i0KCTY/lyo 6k707Gi8Yhm5ZEdrDy2G/77ZKar52oPRJpIv3LNoGf1qaUXMU9lWTRMKahr0oOF+k/kF QB8inm4fkMF+tE99i5D1jxNlbY9+E7Q8jacmFbSq4A+1x79Nex3Q3IPr5U/XTsE4X5VP CoO1+H4hesBa8rsQjayX7Ko6h7Duz9ZYwHDLIOj+r6RehaG+q5KWwjnLBF4GickJ+rZK mPKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=LUcg4niK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y19si20578308pfc.229.2019.02.28.20.24.27; Thu, 28 Feb 2019 20:24:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=LUcg4niK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728873AbfCAEVb (ORCPT + 99 others); Thu, 28 Feb 2019 23:21:31 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:32969 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726066AbfCAEVa (ORCPT ); Thu, 28 Feb 2019 23:21:30 -0500 Received: by mail-pf1-f194.google.com with SMTP id i19so10809879pfd.0; Thu, 28 Feb 2019 20:21:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=XqWVLQo+0c9TMh3Jp82Vt/m+tyYOsGfEqM4JMup8HNA=; b=LUcg4niKjE27Y8LmQgoEEhMDZJJEKw4pSB0/BMVZsYvLv52w6RjN9wJulvsU7fF3of kf6yFvAfhDaJdyNnLkM/mILiru97vQv5tA73hkpC5595F6X80MSAJ5RVjC5waLLBJZX3 2yZxVB4isMzlpVBx6IDh7zj8LJ7hm2B2vLY9AYbf/CJXGTTgIyOUXUxaJMS9B0EUyhHC 7Be1cDLtEwNXbfP2myk32eOjg8+Wdu/8O8WBBnADc2+zqhX9ddxoyHekkC003DS8bf/z IbTuvwqdQHXKudVADOpGPzVQPQ3WHMYJGRdFzsBpS++bMpvCv2g+MBSpm+Q99nMHxXm9 nVbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=XqWVLQo+0c9TMh3Jp82Vt/m+tyYOsGfEqM4JMup8HNA=; b=f68do5QKFObH90lf1++vGU7rdr/hlhmavYUoSgFYjRylAMBFurmj6KDG2nn3wgoZf2 7wltHg5FGWnDfYmyuYaSpZEEilAYVGGK6g9AF7Pk0tHdVJ83U+R9S2QacJkOzrayiNVW IQsan26zwOzyBGEv0QuO8PAWA2opgvXgIm5XiiGFDUi6RyJ0+TJE1NZ8MzuM0/cAZSpg kLQ4uvNqdK+prEyRDTCJicylKCxEOl231ZvceXZDugeJ6krp4T0bNWapTK4G7OQKz+h5 OdBFlVEjJniTDBDNX9vPFjp3eQytytxef6Vea0QyY9NYqhS6oVZjQ4tHropWMiXtIY5P W0PA== X-Gm-Message-State: AHQUAuaDuRpMd38NyI0KUzsShKOrIwz7IB/LBsDOH7xtHXlEx+T06W+W Q0W50LTb+RzOFoS2E5YeBk0= X-Received: by 2002:a62:4389:: with SMTP id l9mr3626528pfi.170.1551414089381; Thu, 28 Feb 2019 20:21:29 -0800 (PST) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id s2sm25611493pgc.67.2019.02.28.20.21.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Feb 2019 20:21:28 -0800 (PST) Subject: Re: [PATCH V4 1/2] watchdog: imx_sc: Add i.MX system controller watchdog support To: Anson Huang , "catalin.marinas@arm.com" , "will.deacon@arm.com" , "wim@linux-watchdog.org" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , Andy Gross , "heiko@sntech.de" , "horms+renesas@verge.net.au" , "arnd@arndb.de" , "olof@lixom.net" , "jagan@amarulasolutions.com" , "bjorn.andersson@linaro.org" , "enric.balletbo@collabora.com" , "marc.w.gonzalez@free.fr" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "linux-watchdog@vger.kernel.org" Cc: dl-linux-imx References: <1551340510-2324-1-git-send-email-Anson.Huang@nxp.com> <575f5a40-5590-12fc-e117-a97577982844@roeck-us.net> From: Guenter Roeck Message-ID: Date: Thu, 28 Feb 2019 20:21:26 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/28/19 7:46 PM, Anson Huang wrote: > Hi, Guenter > > Best Regards! > Anson Huang > >> -----Original Message----- >> From: Guenter Roeck [mailto:groeck7@gmail.com] On Behalf Of Guenter >> Roeck >> Sent: 2019年2月28日 22:58 >> To: Anson Huang ; catalin.marinas@arm.com; >> will.deacon@arm.com; wim@linux-watchdog.org; shawnguo@kernel.org; >> s.hauer@pengutronix.de; kernel@pengutronix.de; festevam@gmail.com; >> Andy Gross ; heiko@sntech.de; >> horms+renesas@verge.net.au; arnd@arndb.de; olof@lixom.net; >> jagan@amarulasolutions.com; bjorn.andersson@linaro.org; >> enric.balletbo@collabora.com; marc.w.gonzalez@free.fr; linux-arm- >> kernel@lists.infradead.org; linux-kernel@vger.kernel.org; linux- >> watchdog@vger.kernel.org >> Cc: dl-linux-imx >> Subject: Re: [PATCH V4 1/2] watchdog: imx_sc: Add i.MX system controller >> watchdog support >> >> On 2/27/19 11:59 PM, Anson Huang wrote: >>> i.MX8QXP is an ARMv8 SoC which has a Cortex-M4 system controller >>> inside, the system controller is in charge of controlling power, clock >>> and watchdog etc.. >>> >>> This patch adds i.MX system controller watchdog driver support, >>> watchdog operation needs to be done in secure EL3 mode via >>> ARM-Trusted-Firmware, using SMC call, CPU will trap into >>> ARM-Trusted-Firmware and then it will request system controller to do >>> watchdog operation via IPC. >>> >>> Signed-off-by: Anson Huang >>> --- >>> Changes since V3: >>> - add ARM64 dependency for this driver; >>> - change SPDX license to GPL-2.0 to match module license; >>> - register platform device in driver instead of getting from dts; >>> - return linux error code instead of system controller firmware error >> code for watchdog operation >>> failed case. >>> --- >>> drivers/watchdog/Kconfig | 13 +++ >>> drivers/watchdog/Makefile | 1 + >>> drivers/watchdog/imx_sc_wdt.c | 201 >> ++++++++++++++++++++++++++++++++++++++++++ >>> 3 files changed, 215 insertions(+) >>> create mode 100644 drivers/watchdog/imx_sc_wdt.c >>> >>> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index >>> 65c3c42..8c6575e 100644 >>> --- a/drivers/watchdog/Kconfig >>> +++ b/drivers/watchdog/Kconfig >>> @@ -625,6 +625,19 @@ config IMX2_WDT >>> To compile this driver as a module, choose M here: the >>> module will be called imx2_wdt. >>> >>> +config IMX_SC_WDT >>> + tristate "IMX SC Watchdog" >>> + depends on (ARCH_MXC && ARM64) || COMPILE_TEST >>> + select WATCHDOG_CORE >>> + help >>> + This is the driver for the system controller watchdog >>> + on the NXP i.MX SoCs with system controller inside. >>> + If you have one of these processors and wish to have >>> + watchdog support enabled, say Y, otherwise say N. >>> + >>> + To compile this driver as a module, choose M here: the >>> + module will be called imx_sc_wdt. >>> + >> >> With this patch applied, alpha:allmodconfig and almost all other >> allmodconfig/allyesconfig builds fail with: >> >> ERROR: "__arm_smccc_smc" [drivers/watchdog/imx_sc_wdt.ko] undefined! >> scripts/Makefile.modpost:92: recipe for target '__modpost' failed >> make[1]: *** [__modpost] Error 1 >> Makefile:1260: recipe for target 'modules' failed >> >> as I told you before would happen. For the future, please consider that >> forcing me to "prove" such failures does take a significant amount of time, >> which is not always readily available. > > Sorry for wasting your time, it is just because I misunderstand your point, NOT > that I did NOT force you to prove it. > > I am a little confuse, since this is new to me about these configs, I looked into > other drivers which also use arm_smccc_smc, they do NOT add special config > dependency for the failure build cause as you said, can you be more detail about > this build issue, I tried below build, but the failure I met is other, so could you please > advise how to fix such dependency issue, adding dummy function looks like NOT > a good way since this arm_smccc_smc() API is widely used in kernel, there should be > some common solution for it, Thanks in advanced and appreciate for your time. > I am quite sure that the other drivers calling arm_smccc_smc don't have "|| COMPILE_TEST" as dependency, or they have a secondary dependency. Randomly picking some RTC_DRV_IMX_SC - no. ARM_RK3399_DMC_DEVFREQ - no. PHY_MVEBU_A3700_COMPHY - yes, but it also has "depends on HAVE_ARM_SMCCC" as separate line, limiting its scope. You can either drop "|| COMPILE_TEST" or add "depends on HAVE_ARM_SMCCC" in a separate line. There may be other options, but I did not explore them. Guenter