Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp3474194ybk; Tue, 19 May 2020 05:43:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/b7cvJ+i1uavQB+CcpMNAWewbKiwUGtfUI5TvKR0Px3AmE4eOl18gzUb2pAzTPgM/vfxS X-Received: by 2002:a17:906:7c59:: with SMTP id g25mr467403ejp.393.1589892228864; Tue, 19 May 2020 05:43:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589892228; cv=none; d=google.com; s=arc-20160816; b=pxcwO+kc7pQrzu22dr3IJkV3zNN5BXR+/45AxEr4zPBTdOMSR9GPJ6o/XEyFMf/gA6 LWrTwOSyD37mh9mR2PL8CongoYiaQetMrBvcGEzOvOzY2GA05Azq4iJHm3ErkW8c2LvH tUjV/nMJ2j145QnRYGNPDCSdZD4UBb2dUGX4wRYEFTAax0Op1oK6cYyx5esPZLGH1jOq vmstpqXzL4ZRm00gu+o4FjTmkqR3yCBeXo6zEI8AWB8E468/FQN84nl6S5dNvlpvs2fp IkY/KOO9Z57Ta8sBmiir5YJg6HSKJZxf0lrxS1OYGAljbYP3S8nZMKsTqqxaK8ITVG87 lkkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=UZwDbbsAuwTTDP1KU08igc8/ftip3GVigjtT5GpyxrU=; b=A49F52/jGJo/5as867xAZF1fmR286GfZl2FyBsJDSgAtkUwtkMi8aLjsMpZei3DMwS OaJZkhs7q19fR00VahzhOdr88Pt8D0xk/zf/1j5FcU1AlyxmlXX6Bp4aM660uUfmVMgW gRBDjuGkvMpUKyL3bxyAYrtwfczjyZUd6CNlawPrvQS2iaLO9jjZ/X3fS2FNse7kv+zr W9C1wpa2/Yucz4D4RNLAeBkzk9uCjfV3FP+4qhU2BWPcc7Dfhu92FuNijtdl5jseWf+Y OmPubnv7VFTsYp4FPuaYbjYDKaN254wIpCEmcVtB1i6h2E+rm8CZvTpIeg/7Toyz+vHD Xl+w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p16si7789680ejd.80.2020.05.19.05.43.24; Tue, 19 May 2020 05:43:48 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727077AbgESMj6 (ORCPT + 99 others); Tue, 19 May 2020 08:39:58 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:4869 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726471AbgESMj6 (ORCPT ); Tue, 19 May 2020 08:39:58 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 6B2DFB1E1AA97F3E3C6C; Tue, 19 May 2020 20:39:56 +0800 (CST) Received: from [127.0.0.1] (10.166.215.93) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.487.0; Tue, 19 May 2020 20:39:46 +0800 Subject: Re: [PATCH 09/10] timer-riscv: Fix undefined riscv_time_val To: Daniel Lezcano , Palmer Dabbelt , CC: Paul Walmsley , , , , References: <66121f9a-48f3-d3a5-7c96-d71397e12aed@linaro.org> <0bc3eb36-7b9d-7c86-130c-68b566e85c10@huawei.com> From: Kefeng Wang Message-ID: <29dc112e-d8c2-2749-7f5d-7c0c19aa9092@huawei.com> Date: Tue, 19 May 2020 20:39:45 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [10.166.215.93] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/5/19 4:23, Daniel Lezcano wrote: > 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/ Sorry for typing error. > >> 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. Not very clear, there are some global variable( eg, acpi_disabled, memstart_addr in arm64,) is exported by EXPORT_SYMBOL,  do you mean that export riscv_time_val is wrong way? > > >