Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2053456pxu; Tue, 24 Nov 2020 16:00:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJykKvOPPXQw7YWjkyCURYHj2Yxgf/sApu4UcW3K4kzZKsFOtt9J69ow/8Vpn+KberSTQF23 X-Received: by 2002:a17:906:4e90:: with SMTP id v16mr816332eju.477.1606262455006; Tue, 24 Nov 2020 16:00:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606262454; cv=none; d=google.com; s=arc-20160816; b=czBEfpBsFfHjEGEW/tlbpCyh1uJzuuaGpaJVKfP0u2AEJjaHlXFcWASrWoNGeaB47E 3c+kGmPGnqG5BZK0ZN3GK80fCOxr5QrRp0fJ1IFSnUywEX/nfNh9vIQ5IPbGcpQsOwd5 oIgZqwz5c2WaY4E+SgxQ8QRuXTCIrhuiORoCuNtzh4HQPnlytqQESuklexPs5hvs5k6m YqgQP5nuLARq/UhV0MdrJs6NbJsyyyrbaALNRZAI1Xd4XKi6JNIgBgw2whFT/LQ6zHTr CMgeahQrDIafDq6QZfuqUDlH8KZOkOZMYxt07QQUmu/5LXlcrpLskJHNfa86FKQLnSvo daFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:to:from:cc:in-reply-to:subject:date:dkim-signature; bh=k2UmexVgKmIao4oRvUuGEqtTpOCfNvurJXj3LvuUbJs=; b=dApfSbKk4fxkHd/ikeY9gEoM0mpiYR2Rdy7Ukw1SKF37SmAW5A1c+BPNYBBKcHCLtN mh3qGgrI6Kc2unbMWde88gXgFTq+/Det9hElg2Z4Fq+k0SXgj496HRAZ4QVcQ47WmIGG IIKACuCboYUDZgbMZQme68hmQBPS4h0k8+xA16MUekxOQ8NktORcLb7NyVfImnjdYXsg NeHx2h4/zT0By9R7qQBAVoF9A/r+W2vE7wMbH3jfM1Y9A2HJAhHjTBjQUE/5ttt3oPWC eu/vlgWvjeMbU+Hk0lNfKd1qFU/ViswFzs+k4+mXTuKWWGZC0pIyLUrFKVenHnxyz/IZ VoUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=M4+iOo+q; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cc8si190944edb.163.2020.11.24.16.00.32; Tue, 24 Nov 2020 16:00:54 -0800 (PST) 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=@google.com header.s=20161025 header.b=M4+iOo+q; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730108AbgKXVOE (ORCPT + 99 others); Tue, 24 Nov 2020 16:14:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728492AbgKXVOE (ORCPT ); Tue, 24 Nov 2020 16:14:04 -0500 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 037D3C0613D6 for ; Tue, 24 Nov 2020 13:14:04 -0800 (PST) Received: by mail-pf1-x442.google.com with SMTP id 131so242962pfb.9 for ; Tue, 24 Nov 2020 13:14:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:subject:in-reply-to:cc:from:to:message-id:mime-version :content-transfer-encoding; bh=k2UmexVgKmIao4oRvUuGEqtTpOCfNvurJXj3LvuUbJs=; b=M4+iOo+qWYooQEwHKxRvepHin66Hjmy4skldZ09AgajrtyIqvsbHGKhy1g/Z/ZOGwD Yoickv5q1PdmtAXtDUAUuxr+LXivq1oARM96mnNcExmtavlRYtC5tZoCG6iDJ5rYoep+ vbNY/qRgqIRCVwcVQ4pgfzC/9hE4Z6z9zDjt3hDAj+ffu7sp6S5eNHtWMu0tWRp3nV2b 4LzG9MBx5HK51E1KxGj5eyO72SCEIcbFu6kDyHSLTsArK98t7g8piyWqev3JtCtkGfuW DhSblj2sYpwCOSxcwgxuAzqvBAmNwolsiudQrAZu9znhQt4w9hG29+uL62BUV4rFg8oY LJ9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:subject:in-reply-to:cc:from:to:message-id :mime-version:content-transfer-encoding; bh=k2UmexVgKmIao4oRvUuGEqtTpOCfNvurJXj3LvuUbJs=; b=i22dSfMeS1AOwatNekv4rThRGhQ9CD9l3KvvDG6tl9wDKYecSQDdB/pBkDkrbmxa/v 9HVm8hCzUC1AhckeMVyyXuBkXfScGvPPK4TgJOV3ToEvrxFPvyVlNG+GhMhQ0itlzzVz qMmK98IKpn4h9b2KEBEJpv1pKtgh1JKJK9vZtNcYCub6enfdBGoIv/Uml2WLlwWSig7M b7WIYVnUew3RTwyOxHE2ZaHter1QybmwF5I8DIzTU/nQ+12ulF2wV3Cut0bjzq8suyeo yan/GmvAnTaq/9GjmfqWlS+SvR6fgCSzgNs8rjfpvNMGZ/gD4riY9HZoEcm956og2+Fm UCiw== X-Gm-Message-State: AOAM5303HxHBqu7fz91PElMhU6Ct66d0tsi/0JfnzIZq/itvRPkEbVeM T51dQHXlTRZ5aBjAu8DuDKmBLt3/69/wlCzZ X-Received: by 2002:a63:a62:: with SMTP id z34mr237913pgk.193.1606252443427; Tue, 24 Nov 2020 13:14:03 -0800 (PST) Received: from localhost (76-210-143-223.lightspeed.sntcca.sbcglobal.net. [76.210.143.223]) by smtp.gmail.com with ESMTPSA id q188sm7059158pfc.204.2020.11.24.13.14.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Nov 2020 13:14:02 -0800 (PST) Date: Tue, 24 Nov 2020 13:14:02 -0800 (PST) X-Google-Original-Date: Tue, 24 Nov 2020 13:14:00 PST (-0800) Subject: Re: drivers/clocksource/timer-riscv.c:28:16: error: implicit declaration of function 'get_cycles64' In-Reply-To: <59ba6905-baef-02af-a424-41969f3ad0b3@infradead.org> CC: lkp@intel.com, kbuild-all@lists.01.org, clang-built-linux@googlegroups.com, linux-kernel@vger.kernel.org From: Palmer Dabbelt To: rdunlap@infradead.org Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 24 Nov 2020 13:13:07 PST (-0800), rdunlap@infradead.org wrote: > On 11/21/20 6:26 AM, kernel test robot wrote: >> Hi Palmer, >> >> FYI, the error/warning still remains. >> >> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master >> head: 27bba9c532a8d21050b94224ffd310ad0058c353 >> commit: d5be89a8d118a8e8d09cd74a921a808f17fbdd09 RISC-V: Resurrect the MMIO timer implementation for M-mode systems >> date: 9 weeks ago >> config: riscv-randconfig-r034-20201121 (attached as .config) >> compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project bec968cbb367dd03439c89c1d4ef968ef662d7c0) >> reproduce (this is a W=1 build): >> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross >> chmod +x ~/bin/make.cross >> # install riscv cross compiling tool for clang build >> # apt-get install binutils-riscv64-linux-gnu >> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d5be89a8d118a8e8d09cd74a921a808f17fbdd09 >> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git >> git fetch --no-tags linus master >> git checkout d5be89a8d118a8e8d09cd74a921a808f17fbdd09 >> # save the attached .config to linux build tree >> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv >> >> If you fix the issue, kindly add following tag as appropriate >> Reported-by: kernel test robot >> >> All errors (new ones prefixed by >>): > > CONFIG_RISCV_M_MODE=y > > and that prevents get_cycles64() in > arch/riscv/include/asm/timex.h from being visible. > > I suppose that was intended? No, I have a fix for it that I'm about to send out. There's also a bit more necessary. > > >>>> drivers/clocksource/timer-riscv.c:28:16: error: implicit declaration of function 'get_cycles64' [-Werror,-Wimplicit-function-declaration] >> sbi_set_timer(get_cycles64() + delta); >> ^ >> drivers/clocksource/timer-riscv.c:28:16: note: did you mean 'get_cycles'? >> arch/riscv/include/asm/timex.h:18:24: note: 'get_cycles' declared here >> static inline cycles_t get_cycles(void) >> ^ >> drivers/clocksource/timer-riscv.c:47:9: error: implicit declaration of function 'get_cycles64' [-Werror,-Wimplicit-function-declaration] >> return get_cycles64(); >> ^ >> drivers/clocksource/timer-riscv.c:52:9: error: implicit declaration of function 'get_cycles64' [-Werror,-Wimplicit-function-declaration] >> return get_cycles64(); >> ^ >> 7 warnings and 3 errors generated. >> >> vim +/get_cycles64 +28 drivers/clocksource/timer-riscv.c >>