From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90BD7C433EF for ; Mon, 23 May 2022 09:31:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233098AbiEWJbi (ORCPT ); Mon, 23 May 2022 05:31:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233245AbiEWJbV (ORCPT ); Mon, 23 May 2022 05:31:21 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4B8DC10559 for ; Mon, 23 May 2022 02:31:20 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 028DA11FB; Mon, 23 May 2022 02:31:20 -0700 (PDT) Received: from monolith.localdoman (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 728193F73D; Mon, 23 May 2022 02:31:19 -0700 (PDT) Date: Mon, 23 May 2022 10:31:34 +0100 From: Alexandru Elisei To: Dao Lu Cc: kvm@vger.kernel.org Subject: Re: [PATCH kvmtool] Fixes: 0febaae00bb6 ("Add asm/kernel.h for riscv") Message-ID: References: <20220520180946.104214-1-daolu@rivosinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220520180946.104214-1-daolu@rivosinc.com> Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Hi, When I started working on the heterogeneous PMU series, support for the riscv architecture wasn't merged in kvmtool, and after riscv was merged I missed adding the header file. This indeed fixes this compilation error: In file included from include/linux/rbtree.h:32, from include/kvm/devices.h:4, from include/kvm/pci.h:10, from include/kvm/vfio.h:6, from include/kvm/kvm-config.h:5, from include/kvm/kvm.h:6: include/linux/kernel.h:5:10: fatal error: asm/kernel.h: No such file or directory 5 | #include "asm/kernel.h" | ^~~~~~~~~~~~~~ cc1: all warnings being treated as errors compilation terminated. make: *** [Makefile:484: builtin-balloon.o] Error 1 Would be nice to include it in the commit message, so people googling for that exact error message can come across this commit. On Fri, May 20, 2022 at 11:09:46AM -0700, Dao Lu wrote: > Signed-off-by: Dao Lu > --- > riscv/include/asm/kernel.h | 8 ++++++++ > 1 file changed, 8 insertions(+) > create mode 100644 riscv/include/asm/kernel.h > > diff --git a/riscv/include/asm/kernel.h b/riscv/include/asm/kernel.h > new file mode 100644 > index 0000000..a2a8d9e > --- /dev/null > +++ b/riscv/include/asm/kernel.h > @@ -0,0 +1,8 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > + > +#ifndef __ASM_KERNEL_H > +#define __ASM_KERNEL_H > + > +#define NR_CPUS 4096 In arch/riscv/Kconfig I see this: config NR_CPUS int "Maximum number of CPUs (2-32)" range 2 32 depends on SMP default "8" Would you mind explaining where the 4096 number of CPUs comes from? Thanks, Alex > + > +#endif /* __ASM_KERNEL_H */ > -- > 2.36.0 >