Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp3008466ybk; Mon, 18 May 2020 13:28:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmv380eg8XH1MLjI6n19DOukGb1qG/6F2a7EfpTK28YcgIkh0S0fdQ+CRtkTIjP2iSRHCC X-Received: by 2002:a17:906:1542:: with SMTP id c2mr6092014ejd.267.1589833695294; Mon, 18 May 2020 13:28:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589833695; cv=none; d=google.com; s=arc-20160816; b=ws2ck0MKcM4UIQ1f53oVZ59CQgZI+12PSmL6uLy2TgH01h+FZOT9oe1cH6KQlspqE9 2qFE/kWQa0Ge28+44MeoSQWSaXILWRVtmTA5qYHzjCl5aeC+KYMqLJVkyulnd8IjDpgU 9Nj0araikNJlqChwawaJ1coCNSNkC1Z2FLv5HbI3KNrmlVLfmopDTtfh0/oZDWAQjzyu JHAGJZUdYGh6WR2mfsf6NMNlUzN97YkRHrtP9omlatQZz481I2aaGgP/WgZQsSkIylkc JiHyGFR1Ci73sM3HsMDyPTCazCBt4dQ+UXuP1cZsQcYMnraucNxLYWeGobyod8lSeCsU p/Bw== 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=5B0bvyb+czYXibRbo3frDkeWMomKS71UWI1iUCkQxS8=; b=MCymqdgx0OHFRia9NDcy47Uu38xvbmqUR6wy/l13eSqGpGBLx9byJNe5whY+ApWSq5 BVs4tfpJs5hjoafuHCaWzHgBdGJebNdus5DOFnW8h3AtW8YgEqz6oyl0tqwoV4+E3hp3 4lrC7EGk3ZDEB1kTE3/ExB6Oj34+584ZDO6wc4/AWODBNzTjrbO/w/ifzFppzGBS7t6R 1Iz2AdEZe3wO33n00RzDttn+sXjwIgB2m8WlKTW79OnfoDnshzAY7wDT59eeaPaYFzrL 90+qUAD7M5TxuuWauc0Ub5QgZ7U9cmJ0uo4UoJ4ZtwxEWe0jWQ+FIv/sQGLDBIkPIKob hdWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=H1xrtfIJ; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id sd4si7000553ejb.221.2020.05.18.13.27.51; Mon, 18 May 2020 13:28:15 -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=@linaro.org header.s=google header.b=H1xrtfIJ; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726640AbgERUYD (ORCPT + 99 others); Mon, 18 May 2020 16:24:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726250AbgERUYD (ORCPT ); Mon, 18 May 2020 16:24:03 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADCEFC061A0C for ; Mon, 18 May 2020 13:24:02 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id i15so13305856wrx.10 for ; Mon, 18 May 2020 13:24:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=5B0bvyb+czYXibRbo3frDkeWMomKS71UWI1iUCkQxS8=; b=H1xrtfIJsEgJbCyguOTKrsaF7WUbw/aM1YPdMJ53dhZz2PctJVBahR4Dlix3h9RpPO TRfbTX5dArJn57NI+zOx8ju3PdHlAU5buJNt7sKD29mDpp4bk1b7q10o2qCe2CcG2SfF VvwHzCZSj+D+0KW3p+0UDYynUca0TMEXbP5ZBUkIn4hsiF5ahUNoOZ+7aR46RHos2hh7 MiaGdLwfeMY4/4Kj9dwrknNyGleySWethq75DXFaopaLm4Jzc1De+HYw2Oh7hG7KKg9e jirlcwI6Qev8P8jee/iNmR95QtJtKnr5CCz96Bl0FECiHXOs+EpKD4+l5SKFbH6nvTc5 oYwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; 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=5B0bvyb+czYXibRbo3frDkeWMomKS71UWI1iUCkQxS8=; b=oTw4Pbazt2aC3Ao6qW+Zva2XBOxFcK7Xu3hfRwJ2RnjPr6bLScCAhZ2KLT/Ijk7UWn pwQqoXHU5z26JGiaHosC7Uz9kowpw7uymnS/DfD4SUbXm5IyP187xjbUxScbc/Sd0tZA qSBdrS1M2nja/xgtY3d43SG1mJapQtlExkBm+OxUDeyxckLB5f9Qh/zc0Vm1kSrO3kvn rDBG12scbwMZnRlzq9KIpDCmdMtDbNvKlY5E9UmRG6abGsonc/3sdz3kT2GEwjOn8lvj 6QNU4SQFecgNLi490Sz75rTc5MqreRb5q6fiZDtVwArSzZ9Ye1U/OrpRGuqpbTapKkVI eq9Q== X-Gm-Message-State: AOAM531ZRTzC9CEqQ9vzInC66vkRyPvlTA5DzzqGIDfvvkFWGq3Ngb5S 4LF/LRafHNIVvn0WYCAPvAGywg== X-Received: by 2002:a5d:6605:: with SMTP id n5mr23240499wru.198.1589833441326; Mon, 18 May 2020 13:24:01 -0700 (PDT) Received: from ?IPv6:2a01:e34:ed2f:f020:9e7:3ac5:a930:2cd8? ([2a01:e34:ed2f:f020:9e7:3ac5:a930:2cd8]) by smtp.googlemail.com with ESMTPSA id w9sm19689253wrc.27.2020.05.18.13.24.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 May 2020 13:24:00 -0700 (PDT) Subject: Re: [PATCH 09/10] timer-riscv: Fix undefined riscv_time_val To: Kefeng Wang , Palmer Dabbelt , tglx@linutronix.de Cc: Paul Walmsley , aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, hulkci@huawei.com References: <66121f9a-48f3-d3a5-7c96-d71397e12aed@linaro.org> <0bc3eb36-7b9d-7c86-130c-68b566e85c10@huawei.com> From: Daniel Lezcano Message-ID: Date: Mon, 18 May 2020 22:23:59 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <0bc3eb36-7b9d-7c86-130c-68b566e85c10@huawei.com> Content-Type: text/plain; charset=utf-8 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 Hi Kefeng, On 18/05/2020 17:40, Kefeng Wang wrote: > > On 2020/5/18 22:09, Daniel Lezcano wrote: >> On 13/05/2020 23:14, Palmer Dabbelt wrote: >>> On Sun, 10 May 2020 19:20:00 PDT (-0700), wangkefeng.wang@huawei.com >>> wrote: >>>> ERROR: modpost: "riscv_time_val" [crypto/tcrypt.ko] undefined! >>>> >>>> Reported-by: Hulk Robot >>>> Signed-off-by: Kefeng Wang >>>> --- >>>>   drivers/clocksource/timer-riscv.c | 1 + >>>>   1 file changed, 1 insertion(+) >>>> >>>> diff --git a/drivers/clocksource/timer-riscv.c >>>> b/drivers/clocksource/timer-riscv.c >>>> index c4f15c4068c0..071b8c144027 100644 >>>> --- a/drivers/clocksource/timer-riscv.c >>>> +++ b/drivers/clocksource/timer-riscv.c >>>> @@ -19,6 +19,7 @@ >>>> >>>>   u64 __iomem *riscv_time_cmp; >>>>   u64 __iomem *riscv_time_val; >>>> +EXPORT_SYMBOL(riscv_time_val); >>>> >>>>   static inline void mmio_set_timer(u64 val) >>>>   { >>> Reviewed-by: Palmer Dabbelt >>> Acked-by: Palmer Dabbelt >>> >>> Adding the clocksource maintainers.  Let me know if you want this >>> through my >>> tree, I'm assuming you want it through your tree. >> How can we end up by an export symbol here ?! > > Hi Danile, s/Danile/Daniel/ > Found this build error when CONFIG_RISCV_M_MODE=y and CONFIG_RISCV_SBI > is not, > > see patch "4f9bbcefa142 riscv: add support for MMIO access to the timer > registers" Thanks for the pointer. The question still remains, how do we end up with this EXPORT_SYMBOL? There is something wrong if the fix is an EXPORT_SYMBOL for a global variable. -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog