]> Git Repo - linux.git/commitdiff
prandom: Include <linux/percpu.h> in <linux/prandom.h>
authorUros Bizjak <[email protected]>
Mon, 30 Sep 2024 12:33:30 +0000 (14:33 +0200)
committerJason A. Donenfeld <[email protected]>
Thu, 3 Oct 2024 16:21:07 +0000 (18:21 +0200)
<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[email protected]/

Signed-off-by: Uros Bizjak <[email protected]>
Cc: Theodore Ts'o <[email protected]>
Cc: Jason A. Donenfeld <[email protected]>
Cc: Kent Overstreet <[email protected]>
Signed-off-by: Jason A. Donenfeld <[email protected]>
include/linux/prandom.h

index f7f1e5251c679e04ddab002d06ad52827252d0a8..f2ed5b72b3d6f21c2c893cf37153c8a565456c9c 100644 (file)
@@ -10,6 +10,7 @@
 
 #include <linux/types.h>
 #include <linux/once.h>
+#include <linux/percpu.h>
 #include <linux/random.h>
 
 struct rnd_state {
This page took 0.050202 seconds and 4 git commands to generate.