From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Uros Bizjak <ubizjak@gmail.com>
Cc: linux-kernel@vger.kernel.org,
Dave Hansen <dave.hansen@linux.intel.com>,
Andy Lutomirski <luto@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Jani Nikula <jani.nikula@linux.intel.com>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
Tvrtko Ursulin <tursulin@ursulin.net>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
Hans Verkuil <hverkuil@xs4all.nl>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Eric Biggers <ebiggers@kernel.org>,
"Theodore Y. Ts'o" <tytso@mit.edu>,
Jaegeuk Kim <jaegeuk@kernel.org>,
"Jason A. Donenfeld" <Jason@zx2c4.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Hannes Reinecke <hare@suse.de>,
"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
John Fastabend <john.fastabend@gmail.com>,
Andrii Nakryiko <andrii@kernel.org>,
Martin KaFai Lau <martin.lau@linux.dev>,
Eduard Zingerman <eddyz87@gmail.com>, Song Liu <song@kernel.org>,
Yonghong Song <yonghong.song@linux.dev>,
KP Singh <kpsingh@kernel.org>,
Stanislav Fomichev <sdf@fomichev.me>, Hao Luo <haoluo@google.com>,
Jiri Olsa <jolsa@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Brendan Higgins <brendan.higgins@linux.dev>,
David Gow <davidgow@google.com>, Rae Moar <rmoar@google.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Jiri Pirko <jiri@resnulli.us>, Petr Mladek <pmladek@suse.com>,
Steven Rostedt <rostedt@goodmis.org>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Stephen Hemminger <stephen@networkplumber.org>,
Jamal Hadi Salim <jhs@mojatatu.com>,
Cong Wang <xiyou.wangcong@gmail.com>,
Kent Overstreet <kent.overstreet@linux.dev>,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-media@vger.kernel.org, linux-mtd@lists.infradead.org,
linux-fscrypt@vger.kernel.org, linux-scsi@vger.kernel.org,
bpf@vger.kernel.org, linux-kselftest@vger.kernel.org,
kunit-dev@googlegroups.com
Subject: Re: [PATCH 00/18] random: Include <linux/percpu.h> and resolve circular include dependency
Date: Thu, 5 Sep 2024 15:40:51 +0300 [thread overview]
Message-ID: <Ztmm00eLBQGtiwRM@smile.fi.intel.com> (raw)
In-Reply-To: <20240905122020.872466-1-ubizjak@gmail.com>
On Thu, Sep 05, 2024 at 02:17:08PM +0200, Uros Bizjak wrote:
> There were several attempts to resolve circular include dependency
> after the addition of percpu.h: 1c9df907da83 ("random: fix circular
> include dependency on arm64 after addition of percpu.h"), c0842fbc1b18
> ("random32: move the pseudo-random 32-bit definitions to prandom.h") and
> finally d9f29deb7fe8 ("prandom: Remove unused include") that completely
> removes inclusion of <linux/percpu.h>.
>
> Due to legacy reasons, <linux/random.h> includes <linux/prandom.h>, but
> with the commit entry remark:
>
> --quote--
> A further cleanup step would be to remove this from <linux/random.h>
> entirely, and make people who use the prandom infrastructure include
> just the new header file. That's a bit of a churn patch, but grepping
> for "prandom_" and "next_pseudo_random32" "struct rnd_state" should
> catch most users.
>
> But it turns out that that nice cleanup step is fairly painful, because
> a _lot_ of code currently seems to depend on the implicit include of
> <linux/random.h>, which can currently come in a lot of ways, including
> such fairly core headfers as <linux/net.h>.
>
> So the "nice cleanup" part may or may never happen.
> --/quote--
>
> __percpu tag is currently defined in include/linux/compiler_types.h,
> so there is no direct need for the inclusion of <linux/percpu.h>.
> However, in [1] we would like to repurpose __percpu tag as a named
> address space qualifier, where __percpu macro uses defines from
> <linux/percpu.h>.
>
> This patch series is the "nice cleanup" part, and allows us to finally
> include <linux/percpu.h> in prandom.h.
>
> The whole series was tested by compiling the kernel for x86_64 allconfig
> and some popular architectures, namely arm64 defconfig, powerpc defconfig
> and loongarch defconfig.
Obvious question(s) is(are):
1) have you seen the Ingo's gigantic patch series towards resolving issues with
the headers?
2) if not, please look at the preliminary work and take something from there, I
believe there are many useful changes already waiting for a couple of years to
be applied.
Because I haven't found any references nor mentions of that in the cover letter
here and explanation why it was not taking into consideration.
> [1] https://lore.kernel.org/lkml/20240812115945.484051-4-ubizjak@gmail.com/
--
With Best Regards,
Andy Shevchenko
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2024-09-05 12:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-05 12:17 [PATCH 00/18] random: Include <linux/percpu.h> and resolve circular include dependency Uros Bizjak
2024-09-05 12:17 ` [PATCH 05/18] mtd: tests: Include <linux/prandom.h> instead of <linux/random.h> Uros Bizjak
2024-09-06 15:10 ` Miquel Raynal
2024-09-06 15:58 ` Uros Bizjak
2024-09-09 9:49 ` Miquel Raynal
2024-09-05 12:40 ` Andy Shevchenko [this message]
2024-09-05 13:03 ` [PATCH 00/18] random: Include <linux/percpu.h> and resolve circular include dependency Uros Bizjak
2024-09-05 15:36 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Ztmm00eLBQGtiwRM@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=Jason@zx2c4.com \
--cc=airlied@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bp@alien8.de \
--cc=bpf@vger.kernel.org \
--cc=brendan.higgins@linux.dev \
--cc=daniel@ffwll.ch \
--cc=daniel@iogearbox.net \
--cc=dave.hansen@linux.intel.com \
--cc=davem@davemloft.net \
--cc=davidgow@google.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=ebiggers@kernel.org \
--cc=eddyz87@gmail.com \
--cc=edumazet@google.com \
--cc=haoluo@google.com \
--cc=hare@suse.de \
--cc=hpa@zytor.com \
--cc=hverkuil@xs4all.nl \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jaegeuk@kernel.org \
--cc=jani.nikula@linux.intel.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=joonas.lahtinen@linux.intel.com \
--cc=kent.overstreet@linux.dev \
--cc=kpsingh@kernel.org \
--cc=kuba@kernel.org \
--cc=kunit-dev@googlegroups.com \
--cc=linux-fscrypt@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=luto@kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=martin.lau@linux.dev \
--cc=martin.petersen@oracle.com \
--cc=mchehab@kernel.org \
--cc=mingo@redhat.com \
--cc=miquel.raynal@bootlin.com \
--cc=mripard@kernel.org \
--cc=pabeni@redhat.com \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--cc=richard@nod.at \
--cc=rmoar@google.com \
--cc=rodrigo.vivi@intel.com \
--cc=rostedt@goodmis.org \
--cc=sdf@fomichev.me \
--cc=senozhatsky@chromium.org \
--cc=song@kernel.org \
--cc=stephen@networkplumber.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=tursulin@ursulin.net \
--cc=tytso@mit.edu \
--cc=tzimmermann@suse.de \
--cc=ubizjak@gmail.com \
--cc=vigneshr@ti.com \
--cc=x86@kernel.org \
--cc=xiyou.wangcong@gmail.com \
--cc=yonghong.song@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox