All of lore.kernel.org
 help / color / mirror / Atom feed
From: Uros Bizjak <ubizjak@gmail.com>
To: x86@kernel.org, linux-crypto@vger.kernel.org,
	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, linux-kernel@vger.kernel.org
Cc: Uros Bizjak <ubizjak@gmail.com>, "Theodore Ts'o" <tytso@mit.edu>,
	"Jason A. Donenfeld" <Jason@zx2c4.com>,
	Kent Overstreet <kent.overstreet@linux.dev>
Subject: [PATCH v3 19/19] prandom: Include <linux/percpu.h> in <linux/prandom.h>
Date: Mon, 30 Sep 2024 14:33:30 +0200	[thread overview]
Message-ID: <20240930123702.803617-20-ubizjak@gmail.com> (raw)
In-Reply-To: <20240930123702.803617-1-ubizjak@gmail.com>

<linux/percpu.h> include was removed from <linux/prandom.h>
in d9f29deb7fe8 ("prandom: Remove unused include") because
this inclusion broke arm64 due to a circular dependency
on include files.

__percpu tag is defined in include/linux/compiler_types.h, so there
is currently 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>.

The circular dependency was removed in ddd8e37ebaa1 ("random: Do not
include <linux/prandom.h> in <linux/random.h>") and it cleared
the path for the inclusion of <linux/percpu.h> in <linux/prandom.h>.

This patch is basically a revert of d9f29deb7fe8
("prandom: Remove unused include").

[1] https://lore.kernel.org/lkml/20240812115945.484051-4-ubizjak@gmail.com/

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: Kent Overstreet <kent.overstreet@linux.dev>
---
 include/linux/prandom.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/prandom.h b/include/linux/prandom.h
index f7f1e5251c67..f2ed5b72b3d6 100644
--- a/include/linux/prandom.h
+++ b/include/linux/prandom.h
@@ -10,6 +10,7 @@
 
 #include <linux/types.h>
 #include <linux/once.h>
+#include <linux/percpu.h>
 #include <linux/random.h>
 
 struct rnd_state {
-- 
2.46.2


WARNING: multiple messages have this Message-ID (diff)
From: Uros Bizjak <ubizjak@gmail.com>
To: x86@kernel.org, linux-crypto@vger.kernel.org,
	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, linux-kernel@vger.kernel.org
Cc: Uros Bizjak <ubizjak@gmail.com>, "Theodore Ts'o" <tytso@mit.edu>,
	"Jason A. Donenfeld" <Jason@zx2c4.com>,
	Kent Overstreet <kent.overstreet@linux.dev>
Subject: [PATCH v3 19/19] prandom: Include <linux/percpu.h> in <linux/prandom.h>
Date: Mon, 30 Sep 2024 14:33:30 +0200	[thread overview]
Message-ID: <20240930123702.803617-20-ubizjak@gmail.com> (raw)
In-Reply-To: <20240930123702.803617-1-ubizjak@gmail.com>

<linux/percpu.h> include was removed from <linux/prandom.h>
in d9f29deb7fe8 ("prandom: Remove unused include") because
this inclusion broke arm64 due to a circular dependency
on include files.

__percpu tag is defined in include/linux/compiler_types.h, so there
is currently 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>.

The circular dependency was removed in ddd8e37ebaa1 ("random: Do not
include <linux/prandom.h> in <linux/random.h>") and it cleared
the path for the inclusion of <linux/percpu.h> in <linux/prandom.h>.

This patch is basically a revert of d9f29deb7fe8
("prandom: Remove unused include").

[1] https://lore.kernel.org/lkml/20240812115945.484051-4-ubizjak@gmail.com/

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: Kent Overstreet <kent.overstreet@linux.dev>
---
 include/linux/prandom.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/prandom.h b/include/linux/prandom.h
index f7f1e5251c67..f2ed5b72b3d6 100644
--- a/include/linux/prandom.h
+++ b/include/linux/prandom.h
@@ -10,6 +10,7 @@
 
 #include <linux/types.h>
 #include <linux/once.h>
+#include <linux/percpu.h>
 #include <linux/random.h>
 
 struct rnd_state {
-- 
2.46.2


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  parent reply	other threads:[~2024-09-30 12:37 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-30 12:33 [PATCH v3 00/19] random: Resolve circular include dependency and include <linux/percpu.h> Uros Bizjak
2024-09-30 12:33 ` Uros Bizjak
2024-09-30 12:33 ` [PATCH v3 01/19] x86/kaslr: Include <linux/prandom.h> instead of <linux/random.h> Uros Bizjak
2024-09-30 12:33   ` Uros Bizjak
2024-09-30 12:33 ` [PATCH v3 02/19] crypto: testmgr: " Uros Bizjak
2024-09-30 12:33   ` Uros Bizjak
2024-10-01  0:37   ` Herbert Xu
2024-10-01  0:37     ` Herbert Xu
2024-09-30 12:33 ` [PATCH v3 03/19] drm/i915/selftests: " Uros Bizjak
2024-09-30 12:33   ` Uros Bizjak
2024-09-30 12:33 ` [PATCH v3 04/19] drm/lib: " Uros Bizjak
2024-09-30 12:33   ` Uros Bizjak
2024-09-30 12:33 ` [PATCH v3 05/19] media: vivid: Include <linux/prandom.h> in vivid-vid-cap.c Uros Bizjak
2024-09-30 12:33   ` Uros Bizjak
2024-09-30 12:33 ` [PATCH v3 06/19] mtd: tests: Include <linux/prandom.h> instead of <linux/random.h> Uros Bizjak
2024-09-30 12:33   ` Uros Bizjak
2024-09-30 12:33 ` [PATCH v3 07/19] fscrypt: Include <linux/once.h> in fs/crypto/keyring.c Uros Bizjak
2024-09-30 12:33   ` Uros Bizjak
2024-09-30 12:33 ` [PATCH v3 08/19] scsi: libfcoe: Include <linux/prandom.h> instead of <linux/random.h> Uros Bizjak
2024-09-30 12:33   ` Uros Bizjak
2024-09-30 12:33 ` [PATCH v3 09/19] bpf: " Uros Bizjak
2024-09-30 12:33   ` Uros Bizjak
2024-09-30 12:33 ` [PATCH v3 10/19] lib/interval_tree_test.c: " Uros Bizjak
2024-09-30 12:33   ` Uros Bizjak
2024-09-30 12:33 ` [PATCH v3 11/19] kunit: string-stream-test: Include <linux/prandom.h> Uros Bizjak
2024-09-30 12:33   ` Uros Bizjak
2024-09-30 12:33 ` [PATCH v3 12/19] random32: Include <linux/prandom.h> instead of <linux/random.h> Uros Bizjak
2024-09-30 12:33   ` Uros Bizjak
2024-09-30 12:33 ` [PATCH v3 13/19] lib/rbtree-test: " Uros Bizjak
2024-09-30 12:33   ` Uros Bizjak
2024-09-30 12:33 ` [PATCH v3 14/19] bpf/tests: " Uros Bizjak
2024-09-30 12:33   ` Uros Bizjak
2024-09-30 12:33 ` [PATCH v3 15/19] lib/test_parman: " Uros Bizjak
2024-09-30 12:33   ` Uros Bizjak
2024-09-30 12:33 ` [PATCH v3 16/19] lib/test_scanf: " Uros Bizjak
2024-09-30 12:33   ` Uros Bizjak
2024-09-30 12:33 ` [PATCH v3 17/19] netem: Include <linux/prandom.h> in sch_netem.c Uros Bizjak
2024-09-30 12:33   ` Uros Bizjak
2024-09-30 15:40   ` Stephen Hemminger
2024-09-30 15:40     ` Stephen Hemminger
2024-09-30 12:33 ` [PATCH v3 18/19] random: Do not include <linux/prandom.h> in <linux/random.h> Uros Bizjak
2024-09-30 12:33   ` Uros Bizjak
2024-09-30 12:33 ` Uros Bizjak [this message]
2024-09-30 12:33   ` [PATCH v3 19/19] prandom: Include <linux/percpu.h> in <linux/prandom.h> Uros Bizjak
2024-09-30 13:25 ` [PATCH v3 00/19] random: Resolve circular include dependency and include <linux/percpu.h> Jason A. Donenfeld
2024-09-30 13:25   ` Jason A. Donenfeld
2024-10-01 14:35 ` ✗ Fi.CI.CHECKPATCH: warning for random: Resolve circular include dependency and include <linux/percpu.h> (rev3) Patchwork
2024-10-01 14:35 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-10-01 14:44 ` ✓ Fi.CI.BAT: success " Patchwork
2024-10-02  9:40 ` ✗ Fi.CI.IGT: failure " Patchwork

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=20240930123702.803617-20-ubizjak@gmail.com \
    --to=ubizjak@gmail.com \
    --cc=Jason@zx2c4.com \
    --cc=bpf@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=kent.overstreet@linux.dev \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-crypto@vger.kernel.org \
    --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=tytso@mit.edu \
    --cc=x86@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.