From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yw1-f179.google.com (mail-yw1-f179.google.com [209.85.128.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C7F08258ECA for ; Tue, 16 Dec 2025 17:39:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765906771; cv=none; b=dtABcxcBAHYNCu37PJ/9fe22zD/NgfkJyR/vKYkyGdXV8nkOTgieJpP5OtzeYffhEQTnblj3sEqrT0r5wybLZFKNX2tTTR6NGCPV0Go+hMGdk3yaf4Bk16DhhMFRFUGPFRR1fV3cTZrzT4CoAVGiY/SMuNpCKA0c/yC+YghxgZ4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765906771; c=relaxed/simple; bh=LHgW3pQ94auFS6QXdkB8ekFBN1VodJgyFKRiNodMnyc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Pi+xW3MCjbM7zQD0QDfoqU4/ygdeusjkWZ3lEulRFdAvB1Ru/A+Rg4hcRMyAqv5M/ksmN2VzvnChqiDnpB7KTTO9pMbIvkbmSouKYmKPvc95QbiM8q9+jL2qR1MzHs3TW4pKAdoTVyChp5nr7IZG3omQQcydXiVoZNya1cwKpe0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=cXENxXeL; arc=none smtp.client-ip=209.85.128.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="cXENxXeL" Received: by mail-yw1-f179.google.com with SMTP id 00721157ae682-78e765f9997so25054797b3.1 for ; Tue, 16 Dec 2025 09:39:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1765906768; x=1766511568; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=wDRVcNBtR+iW6Yf99Q/xL+9AQK2g/UaoVu1pJaWUN/8=; b=cXENxXeLhV56mtFSNBrNFOt8ybK2HfOgC5XoIiGld9g2Ul+UuWn0a5AWcFjytrH6Rk jNg0mklC9hVZSZ6Ybh4Vjbr8cZ1MOnsrddBfVjkECjSXdqtoUCgBD7vuAC6jJZlQAcnX eKkmACuPIGDEM061ITaXPPMLziEygz5K1VVePoAsqruehDFgsQAKE9Rj/li9lsYxxIC+ xiruYwQCkeNzSTkgMBhwZkzezGW1CZnnmBD0ecZbtnZc59Yjt1esN7OswbTF6QtvwLza YWfXTpEikqDEhwZwEayVXkTlSLlXBaDRQfLN89XYCoQRXccH+rKNu72Ov5yz0qbrLcAy t2Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765906768; x=1766511568; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wDRVcNBtR+iW6Yf99Q/xL+9AQK2g/UaoVu1pJaWUN/8=; b=pCQgCGqpMVwGKmVSeuEmpstYdDe6rp25Gwvt0hxco5QqBkC4zcfXRinu5bbdn/8s5f FaebcfwckyT9M6NzQ8/71Y9cevj9UIwPTnkVvKsVwsZL9I30ggZ6cOpxOAI5F8PHcHO0 /5bJzFveNF6GzzRzLNLFKzs0nWNjGi7JtbACEcfdwC8nFB/Z8WONnDVDNhofDku4Olq+ q7JxB0LWAakleI1CkGnXVmd8aLpBBJGnApfh2Rsv9Qx5D0nfoWKjOUWFmJsb6FIPNVD5 Js27zEhVxAfqFYBjCWEvSFm7S35g44QCnOO6TX1kFDjj80x3gxNBYrM+WKUkRrhy5+a5 RTWQ== X-Forwarded-Encrypted: i=1; AJvYcCWEp53Bf2NvH4E1gCBaJxjJzYriowbAr+2dPVoLpiFUo6+1iCqrK0vCAb/Wrkh1/M+4LoF9+hZZBHeD6d4=@vger.kernel.org X-Gm-Message-State: AOJu0Ywt57rrayPXPsG7y1i0U95L6pgAsZFYIrR2dSpvNTxBUUH30nGN fGZUKCm3f7F5gXRduG3FV74cvfG0PjYFYqzq5BNg7pV/2kcbpWKr4tTb X-Gm-Gg: AY/fxX4+Pjjer5jqZE92NaYwxzudnYy87nwtgEwzhDSGDH6A9rHcJjqCQtTN/WHEFJo u6Fr3DqEhfOJ6AgrQfSgkHFm9nsQvkFUJjblwPKiZI6J4xihCKDj19SqgrVgLU1mAWKyzNX92O5 ZYhWHibsjJgsrG5bl/Jv2e0oYQBoEYgFkC73N4g/gKkFQImfrySitfSTMGNY6tgvCzhpiqjNBuw Ew0E/i8hqbJC1InL5bOaonVJCI+5ny8JWAvxUg/46s4e/oh2VYZ1vU1bq3qKT3IoZVnS3MPdJjw wwbvENOfxpXg/E+Y+SlXNLWcKR48Gk7kXWco+k3zeSGvluNpTIsqZdqsK1mojYCaDvSsv7v3RpH 8uf+i5NZoV+VJx+ZMgcbAaEaKgZe+w6U5lFthkEP07DEwSnq9fzkE9n6zTrkhlH6vuT6QKIliew HBfofbunwMWhr6H2kYGQ== X-Google-Smtp-Source: AGHT+IE3NinGFdKlAN7UhDAbPKCkBHxHtNBkcwDeZ6wptkYuBgdRACzHAMbsJH1rL1T21esZqKIaWg== X-Received: by 2002:a05:690e:1248:b0:641:f5bc:68e1 with SMTP id 956f58d0204a3-645556680bamr11330010d50.78.1765906767566; Tue, 16 Dec 2025 09:39:27 -0800 (PST) Received: from localhost ([2601:346:0:79bd:7f3c:658f:3c84:2aa3]) by smtp.gmail.com with ESMTPSA id 00721157ae682-78e74a57202sm41212187b3.57.2025.12.16.09.39.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Dec 2025 09:39:27 -0800 (PST) Date: Tue, 16 Dec 2025 12:39:26 -0500 From: Yury Norov To: Yunhui Cui Cc: aou@eecs.berkeley.edu, alex@ghiti.fr, andii@kernel.org, andybnac@gmail.com, apatel@ventanamicro.com, ast@kernel.org, ben.dooks@codethink.co.uk, bjorn@kernel.org, bpf@vger.kernel.org, charlie@rivosinc.com, cl@gentwo.org, conor.dooley@microchip.com, cyrilbur@tenstorrent.com, daniel@iogearbox.net, debug@rivosinc.com, dennis@kernel.org, eddyz87@gmail.com, haoluo@google.com, john.fastabend@gmail.com, jolsa@kernel.org, kpsingh@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org, linux@rasmusvillemoes.dk, martin.lau@linux.dev, palmer@dabbelt.com, pjw@kernel.org, puranjay@kernel.org, pulehui@huawei.com, ruanjinjie@huawei.com, rkrcmar@ventanamicro.com, samuel.holland@sifive.com, sdf@fomichev.me, song@kernel.org, tglx@linutronix.de, tj@kernel.org, thuth@redhat.com, yonghong.song@linux.dev, zong.li@sifive.com Subject: Re: [PATCH v3 1/3] riscv: remove irqflags.h inclusion in asm/bitops.h Message-ID: References: <20251216014721.42262-1-cuiyunhui@bytedance.com> <20251216014721.42262-2-cuiyunhui@bytedance.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20251216014721.42262-2-cuiyunhui@bytedance.com> On Tue, Dec 16, 2025 at 09:47:19AM +0800, Yunhui Cui wrote: > The arch/riscv/include/asm/bitops.h does not functionally require > including /linux/irqflags.h. Additionally, adding > arch/riscv/include/asm/percpu.h causes a circular inclusion: > kernel/bounds.c > ->include/linux/log2.h > ->include/linux/bitops.h > ->arch/riscv/include/asm/bitops.h > ->include/linux/irqflags.h > ->include/linux/find.h > ->return val ? __ffs(val) : size; > ->arch/riscv/include/asm/bitops.h > > The compilation log is as follows: > CC kernel/bounds.s > In file included from ./include/linux/bitmap.h:11, > from ./include/linux/cpumask.h:12, > from ./arch/riscv/include/asm/processor.h:55, > from ./arch/riscv/include/asm/thread_info.h:42, > from ./include/linux/thread_info.h:60, > from ./include/asm-generic/preempt.h:5, > from ./arch/riscv/include/generated/asm/preempt.h:1, > from ./include/linux/preempt.h:79, > from ./arch/riscv/include/asm/percpu.h:8, > from ./include/linux/irqflags.h:19, > from ./arch/riscv/include/asm/bitops.h:14, > from ./include/linux/bitops.h:68, > from ./include/linux/log2.h:12, > from kernel/bounds.c:13: > ./include/linux/find.h: In function 'find_next_bit': > ./include/linux/find.h:66:30: error: implicit declaration of function '__ffs' [-Wimplicit-function-declaration] > 66 | return val ? __ffs(val) : size; > | ^~~~~ > > Signed-off-by: Yunhui Cui Acked-by: Yury Norov (NVIDIA) > --- > arch/riscv/include/asm/bitops.h | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/arch/riscv/include/asm/bitops.h b/arch/riscv/include/asm/bitops.h > index 238092125c118..3c1a15be54d80 100644 > --- a/arch/riscv/include/asm/bitops.h > +++ b/arch/riscv/include/asm/bitops.h > @@ -11,7 +11,6 @@ > #endif /* _LINUX_BITOPS_H */ > > #include > -#include > #include > #include > > -- > 2.39.5