From nobody Fri Dec 19 13:29:05 2025 Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) (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 2E92D27FD74 for ; Tue, 16 Dec 2025 01:47:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765849673; cv=none; b=T03iIInsSFTX9jPoAvI6WmpknedMbr5uYhKWRVqUKIDBT8NS36bJRMexlMz2mLUEbEKtiXedG7tFp9wA5Sx9NRqysOy0IHNegO3JfxujwPKYMASjVF2PFpw8425V9P3pjdedt4g3TJ9f2OfevQff3L84Zhxpr/psUxdjAaeZWHg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765849673; c=relaxed/simple; bh=dxxUXPsKpc+ktrYr3NX238Ynrv7KxxIKYL2RCz+WmHQ=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=SY5gC9/d34/pPw5VFvLUIeeMy4D6yE7DXhRWUp9Yu/oX0fNYNJ5Osrd6ulhv8l/WeMm20hR1EbMZQUoM7uvxPPhJTls1v4Q5SWMuN2EqX9glCwJYJeW9kvuwZ6bylJqlnJ75EI2rGYGJXJiqP2QHRIYzAlqrA2qBzWw9p2h2auA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b=g3dqHXx6; arc=none smtp.client-ip=209.85.210.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="g3dqHXx6" Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-7f1243792f2so2658383b3a.1 for ; Mon, 15 Dec 2025 17:47:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1765849671; x=1766454471; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=HQt8uoJWMBYj/YlVtM/kz+RuiqvE92xrlYMKIfu5C3o=; b=g3dqHXx64g4NxoJBvMgwNKHuEl+d8v6k0mc/NRPR0IXilgmIzg3TeN0wHeXBXxUXal ck399q1FcUVy54ylRlE+aISXUZ/d3h+RiIBKa1I+QwIGfhz1RSNwGRng139WauQ4alTp hBCB0Tgqh7YPFaQJmmdL7w4yrauY2XK7ABtN7pioIRsUawiMn1G/dh3+UAiPkVTkyqtG YXeuXyQD8i4ieyVWK0Eki4+GaJYuV+LO1i7hNla94ycsRZv62L2t5Qal/+M6cE3H34/H h0QfuTfEv7cZts+ElUVUQtVhaDORhoCgF2Ib/5o1qcr+lC8YS2KABuh+1HYsWYTjLODH KpHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765849671; x=1766454471; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=HQt8uoJWMBYj/YlVtM/kz+RuiqvE92xrlYMKIfu5C3o=; b=fcQ8D+iW5lTcpfPeIwrv35PEb8Zj8iqRGtsD4gTKGH2PALemAc8bhTVOkdDc/Ilfob 1h7Mq0jpxfuLgf86ufO72gpuK/H0yNWi2TjCM+rUYJyflTVWJKtmhohd+UY+i2btSNjC zRw6WKgjxrtrABMh5WRX8L7PjN05JfCKEk4VkXJbui3hfGDziUeSR8v4UWMgYUAOshUf L7hzk97k6mLU8y8jTSFbSSrccfLm4CEB1zHJV1P3TT2cIg3IH8bxJSY0FnllHUMfjPAQ A4ftFZ8c9I8p5ZMPnWwyuFgcjLVlXo9DUOBh38wxCePtGhMocNZOwZqMH0E5haf1oiLG UXQw== X-Forwarded-Encrypted: i=1; AJvYcCWJsJQGUdydTtNpBwUsrzE+GRRizrFr7Q4bwPcYtMbsYpYTH5UOpnM5HKS1AK7dMnWtVqICRe+0/FR8Jxw=@vger.kernel.org X-Gm-Message-State: AOJu0Yx1pYbz1STFpEgPeuGJ7g4MQpxs7NrHlYKXkmeiztubWwtCP1kD AzY3GleCN6pEqfti0kRJeUDNmpw/bC+7kyOhc6eg6g6B+/X8HrRRyXHQefZ9KzmQ0Iw= X-Gm-Gg: AY/fxX5SqCGIAaY8AftSPpurJ4aZyibqvVgjaYFmmT8JK1PY2GH2WAE0fZofgOfIwPb b4iyVrSCRzLpH/eh03ZV7dqY4BHWQ084QuBAB3KmD1EGHY82VL5zXsfTzmZwa77w7mDXqdiwvHj Bm/zHYKjlA/D9XlCBCR/KHjcaTPNdzysYgveWnXeIDvOF/he8033hlz4HkPLL5pDDxvKc2tK9F+ f67et86ifgtc+FD3LmLKXkLghkxjEKqAipDdtf5gXceNzUBD4/dKZCq5ckaUwyNNfpruXSjfxMF sAke+91lX/e+Z5IxEUQ8Xg01QWzXNmvlC0he3wl4mxNePZ+EZCvCcAekuexAxTgliPW+8VljBqj AmBGjDHRpNKOn1aFsEhPXD67X9o3QIhebPy5vzQbMAqk+4KDeS6Po/qCPNEwpV1+OKVOYpsLooe 32weMTYPvrXvMw34nANQS1O6HIckKK9QsYsY0atRNlOX3+ X-Google-Smtp-Source: AGHT+IE5/ROoI003OCaxm/0k3SuDfxUIEDBUTPu0GmjjWMBKr4s+4vh/dmnl09LKvowuDGy06jqmLQ== X-Received: by 2002:a05:6a20:4320:b0:366:14af:9bcc with SMTP id adf61e73a8af0-369afdf778bmr12452247637.66.1765849671148; Mon, 15 Dec 2025 17:47:51 -0800 (PST) Received: from L6YN4KR4K9.bytedance.net ([139.177.225.224]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-c0c2c963b53sm13632790a12.36.2025.12.15.17.47.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 15 Dec 2025 17:47:50 -0800 (PST) From: Yunhui Cui To: 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, cuiyunhui@bytedance.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, yury.norov@gmail.com, zong.li@sifive.com Subject: [PATCH v3 1/3] riscv: remove irqflags.h inclusion in asm/bitops.h Date: Tue, 16 Dec 2025 09:47:19 +0800 Message-Id: <20251216014721.42262-2-cuiyunhui@bytedance.com> X-Mailer: git-send-email 2.39.2 (Apple Git-143) In-Reply-To: <20251216014721.42262-1-cuiyunhui@bytedance.com> References: <20251216014721.42262-1-cuiyunhui@bytedance.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 '__ff= s' [-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/bitop= s.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 */ =20 #include -#include #include #include =20 --=20 2.39.5