Message ID | 8b81101d59a31f4927016c17e49be96754a23380.1673204461.git.christophe.jaillet@wanadoo.fr |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1818108wrt; Sun, 8 Jan 2023 11:06:29 -0800 (PST) X-Google-Smtp-Source: AMrXdXv40rfPvWpbtl3X7esYYnNtG1MkpVEA1hzybHah4tTcvCW00fQqtRqG8M08LExyIxWbdRi/ X-Received: by 2002:a17:907:c203:b0:7ad:84c7:503a with SMTP id ti3-20020a170907c20300b007ad84c7503amr51634612ejc.72.1673204789335; Sun, 08 Jan 2023 11:06:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673204789; cv=none; d=google.com; s=arc-20160816; b=DfB5w5mVGrbcKRBmWuLBhWSAmdtYrkzaXjd+YKlYBqlbxI8pMrYcQ0G9w34pqFM8I4 Hvjqr3K9B1Zp3AhsEdqGcKeymFHQwHqb2hnlQuqcr8ZGU7mW9NZcF5Ll5Xiy7exVwvgm tX4GmGPYxM08UxpMBSPEoRmn5hqSwNMXAceEJDbJ+HgZONAlaQcX7UjSO/wvtI+uMvQN Q5piFa6MTD7kovAXuI39n2jrmIimftPnT8GCqW3y1g8jLaTCkY+/mJNfLhzu3C9/qJL4 ghXMTXhWXOvIW2Z+ZkSGZip4tMQAB78Ad+NdBXFQ/5PkmoN8dQUFhHQmQ+7/xrWe45si vHyQ== 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:date:subject:cc:to:from; bh=uV0pDz/XS54UJ6EmzS44ralKCoJ2bloUaSsYy+ozd6o=; b=a8GGyXqL1MSqbni98YO0l9VzG9GmveoO9aVz1zC8qfKocALiVVl11HGdYuZhYyLm9r 9IT9+yD4VMT4826ZoPFqHGgjpEbZA5Qr6YhmCYgRVGMKH1dHybEBsxsGXGUy5AkgJH2p YPdyAtJr4Qpccwn4JhiTBzNLCvi2SyeydPcwvRZx0CiVWQ+CfMprXUoTkmXXduxuu++O 0JAtSb/iHDkFbxR/G6aQuEYHhqNVL47k9VVnEJtfFtat8u8w+W73NFl+XaefDpv3UfXK a+tkqBKuReKBtcAzRx32f26fwwZYSBPa0LlsQm2lQydvwF8YOC+PttVcUMQT1/BBPZAn +ZEQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dr5-20020a170907720500b007c12e19ba40si7539426ejc.666.2023.01.08.11.06.06; Sun, 08 Jan 2023 11:06:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231292AbjAHTE6 (ORCPT <rfc822;dolce.eric@gmail.com> + 99 others); Sun, 8 Jan 2023 14:04:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230211AbjAHTE4 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 8 Jan 2023 14:04:56 -0500 Received: from smtp.smtpout.orange.fr (smtp-21.smtpout.orange.fr [80.12.242.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 439B3E00B for <linux-kernel@vger.kernel.org>; Sun, 8 Jan 2023 11:04:54 -0800 (PST) Received: from pop-os.home ([86.243.100.34]) by smtp.orange.fr with ESMTPA id EayQpvONwvuBYEayQps48G; Sun, 08 Jan 2023 20:04:52 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 08 Jan 2023 20:04:52 +0100 X-ME-IP: 86.243.100.34 From: Christophe JAILLET <christophe.jaillet@wanadoo.fr> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Vineet Gupta <vgupta@kernel.org>, Dan Carpenter <error27@gmail.com> Cc: linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET <christophe.jaillet@wanadoo.fr> Subject: [PATCH] bit_spinlock: Include <asm/processor.h> Date: Sun, 8 Jan 2023 20:04:44 +0100 Message-Id: <8b81101d59a31f4927016c17e49be96754a23380.1673204461.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754482385291535569?= X-GMAIL-MSGID: =?utf-8?q?1754482385291535569?= |
Series |
bit_spinlock: Include <asm/processor.h>
|
|
Commit Message
Christophe JAILLET
Jan. 8, 2023, 7:04 p.m. UTC
In an attempt to simplify some includes in <include/dcache.h>, it
appeared, when compiling fs/ecryptfs/dentry.c, that <linux/bit_spinlock.h>
was relying on other includes to get the definition of cpu_relax().
(see [1])
It broke on arc.
Include <asm/processor.h> in <linux/bit_spinlock.h> to fix the issue.
This will help remove some un-needed includes from <include/dcache.h>.
[1]: https://lore.kernel.org/all/202301082130.LXMj5qkD-lkp@intel.com/
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
Not sure who to send this to.
get_maintainer.pl is of no help, and the file is untouched from a too long
time.
Greg? Dan? Any pointer?
---
include/linux/bit_spinlock.h | 1 +
1 file changed, 1 insertion(+)
Comments
On Sun, Jan 08, 2023 at 08:04:44PM +0100, Christophe JAILLET wrote: > In an attempt to simplify some includes in <include/dcache.h>, it > appeared, when compiling fs/ecryptfs/dentry.c, that <linux/bit_spinlock.h> > was relying on other includes to get the definition of cpu_relax(). > (see [1]) > > It broke on arc. > > Include <asm/processor.h> in <linux/bit_spinlock.h> to fix the issue. > This will help remove some un-needed includes from <include/dcache.h>. > > [1]: https://lore.kernel.org/all/202301082130.LXMj5qkD-lkp@intel.com/ > > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> > --- > Not sure who to send this to. > get_maintainer.pl is of no help, and the file is untouched from a too long > time. > > Greg? Dan? Any pointer? Andrew Morton is the maintainer of last resort. Plus spinlocks seem like something he would be interested in. Otherwise Ingo, Peter Z and the x86 team. regards, dan carpenter
On Sun, 8 Jan 2023 20:04:44 +0100 Christophe JAILLET <christophe.jaillet@wanadoo.fr> wrote: > In an attempt to simplify some includes in <include/dcache.h>, it > appeared, when compiling fs/ecryptfs/dentry.c, that <linux/bit_spinlock.h> > was relying on other includes to get the definition of cpu_relax(). > (see [1]) > > It broke on arc. > > Include <asm/processor.h> in <linux/bit_spinlock.h> to fix the issue. > This will help remove some un-needed includes from <include/dcache.h>. > > [1]: https://lore.kernel.org/all/202301082130.LXMj5qkD-lkp@intel.com/ > > ... > > --- a/include/linux/bit_spinlock.h > +++ b/include/linux/bit_spinlock.h > @@ -2,6 +2,7 @@ > #ifndef __LINUX_BIT_SPINLOCK_H > #define __LINUX_BIT_SPINLOCK_H > > +#include <asm/processor.h> > #include <linux/kernel.h> > #include <linux/preempt.h> > #include <linux/atomic.h> linux/processor.h would be preferable, rather than diving straight into asm/?
On 1/8/23 11:04, Christophe JAILLET wrote: > In an attempt to simplify some includes in <include/dcache.h>, it > appeared, when compiling fs/ecryptfs/dentry.c, that <linux/bit_spinlock.h> > was relying on other includes to get the definition of cpu_relax(). > (see [1]) > > It broke on arc. It its just ARC that broke, maybe we can do something there ? > Include <asm/processor.h> in <linux/bit_spinlock.h> to fix the issue. > This will help remove some un-needed includes from <include/dcache.h>. > > [1]: https://lore.kernel.org/all/202301082130.LXMj5qkD-lkp@intel.com/ > > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> > --- > Not sure who to send this to. > get_maintainer.pl is of no help, and the file is untouched from a too long > time. > > Greg? Dan? Any pointer? > --- > include/linux/bit_spinlock.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/linux/bit_spinlock.h b/include/linux/bit_spinlock.h > index bbc4730a6505..d0fd2a7afca2 100644 > --- a/include/linux/bit_spinlock.h > +++ b/include/linux/bit_spinlock.h > @@ -2,6 +2,7 @@ > #ifndef __LINUX_BIT_SPINLOCK_H > #define __LINUX_BIT_SPINLOCK_H > > +#include <asm/processor.h> > #include <linux/kernel.h> > #include <linux/preempt.h> > #include <linux/atomic.h>
Le 10/01/2023 à 08:19, Vineet Gupta a écrit : > > On 1/8/23 11:04, Christophe JAILLET wrote: >> In an attempt to simplify some includes in <include/dcache.h>, it >> appeared, when compiling fs/ecryptfs/dentry.c, that >> <linux/bit_spinlock.h> >> was relying on other includes to get the definition of cpu_relax(). >> (see [1]) >> >> It broke on arc. > > It its just ARC that broke, maybe we can do something there ? Hi, It is all what build-bots have spotted so far :) I don't think that "fixing" it in ARC is the right approach, unless I missed something. <linux/bit_spinlock.h> does use cpu_relax(), so it should include what is need for that, and not rely on other black magic. CJ > >> Include <asm/processor.h> in <linux/bit_spinlock.h> to fix the issue. >> This will help remove some un-needed includes from <include/dcache.h>. >> >> [1]: https://lore.kernel.org/all/202301082130.LXMj5qkD-lkp@intel.com/ >> >> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> >> --- >> Not sure who to send this to. >> get_maintainer.pl is of no help, and the file is untouched from a too >> long >> time. >> >> Greg? Dan? Any pointer? >> --- >> include/linux/bit_spinlock.h | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/include/linux/bit_spinlock.h b/include/linux/bit_spinlock.h >> index bbc4730a6505..d0fd2a7afca2 100644 >> --- a/include/linux/bit_spinlock.h >> +++ b/include/linux/bit_spinlock.h >> @@ -2,6 +2,7 @@ >> #ifndef __LINUX_BIT_SPINLOCK_H >> #define __LINUX_BIT_SPINLOCK_H >> +#include <asm/processor.h> >> #include <linux/kernel.h> >> #include <linux/preempt.h> >> #include <linux/atomic.h> > >
On Tue, Jan 10, 2023 at 07:08:33PM +0100, Christophe JAILLET wrote: > Le 10/01/2023 à 08:19, Vineet Gupta a écrit : > > > > On 1/8/23 11:04, Christophe JAILLET wrote: > > > In an attempt to simplify some includes in <include/dcache.h>, it > > > appeared, when compiling fs/ecryptfs/dentry.c, that > > > <linux/bit_spinlock.h> > > > was relying on other includes to get the definition of cpu_relax(). > > > (see [1]) > > > > > > It broke on arc. > > > > It its just ARC that broke, maybe we can do something there ? > > Hi, > > It is all what build-bots have spotted so far :) > > I don't think that "fixing" it in ARC is the right approach, unless I missed > something. > > <linux/bit_spinlock.h> does use cpu_relax(), so it should include what is > need for that, and not rely on other black magic. Umm... That's not obvious - it only uses cpu_relax() in macros, so missing include would not cause problems if all actual users of those macros happen to pull the needed header by other means. Said that, we have 1) defined directly in asm/processor.h, using nothing but the stuff provided by compiler.h: alpha, arc, csky, loongarch, m68k, microblaze, nios2, openrisc, parisc, s390, sh, xtensa 2) same, using something in headers pulled by asm/processor.h itself: ia64 (needs asm/intrinsic.h) hexagon (needs asm/hexagon_vm.h) um (needs arch/um/include/linux/time-internal.h) 3) same, but defined in something pulled by asm/processor.h rather than in asm/processor.h itself; asm/vdso/processor.h is the common location - those are the cases when we share the same definition for kernel and vdso builds sparc (asm/processor_32.h or asm/processor_64.h) arm (asm/vdso/processor.h) arm64 (asm/vdso/processor.h) powerpc (asm/vdso/processor.h) x86 (asm/vdso/processor.h) riscv (asm/vdso/processor.h; needs several headers included there - jump_label.h, etc.) mips (asm/vdso/processor.h, needs asm/barrier.h, pulled from asm/processor.h by way of linux/atomic.h -> asm/atomic.h -> asm/barrier.h) So asm/processor.h is sufficient for working cpu_relax() and if some arch-independent code wants cpu_relax() it should pull either asm/processor.h or linux/processor.h
diff --git a/include/linux/bit_spinlock.h b/include/linux/bit_spinlock.h index bbc4730a6505..d0fd2a7afca2 100644 --- a/include/linux/bit_spinlock.h +++ b/include/linux/bit_spinlock.h @@ -2,6 +2,7 @@ #ifndef __LINUX_BIT_SPINLOCK_H #define __LINUX_BIT_SPINLOCK_H +#include <asm/processor.h> #include <linux/kernel.h> #include <linux/preempt.h> #include <linux/atomic.h>