From: broonie@kernel•org
To: Yury Norov <yury.norov@gmail•com>
Cc: "Jason A . Donenfeld" <Jason@zx2c4•com>,
Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
Linux Next Mailing List <linux-next@vger•kernel.org>
Subject: linux-next: manual merge of the bitmap tree with the random tree
Date: Wed, 3 Aug 2022 00:59:03 +0100 [thread overview]
Message-ID: <20220802235903.2660083-1-broonie@kernel.org> (raw)
Hi all,
Today's linux-next merge of the bitmap tree got a conflict in:
arch/powerpc/include/asm/archrandom.h
between commit:
d349ab99eec7a ("random: handle archrandom with multiple longs")
from the random tree and commit:
3e731203153de ("powerpc: drop dependency on <asm/machdep.h> in archrandom.h")
from the bitmap tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
diff --cc arch/powerpc/include/asm/archrandom.h
index 564859e6a807c,21def59ef1a68..0000000000000
--- a/arch/powerpc/include/asm/archrandom.h
+++ b/arch/powerpc/include/asm/archrandom.h
@@@ -2,22 -2,41 +2,17 @@@
#ifndef _ASM_POWERPC_ARCHRANDOM_H
#define _ASM_POWERPC_ARCHRANDOM_H
-#ifdef CONFIG_ARCH_RANDOM
+#include <asm/machdep.h>
-bool __must_check arch_get_random_seed_long(unsigned long *v);
-
-static inline bool __must_check arch_get_random_long(unsigned long *v)
+static inline size_t __must_check arch_get_random_longs(unsigned long *v, size_t max_longs)
{
- return false;
+ return 0;
}
- static inline size_t __must_check arch_get_random_seed_longs(unsigned long *v, size_t max_longs)
-static inline bool __must_check arch_get_random_int(unsigned int *v)
--{
- if (max_longs && ppc_md.get_random_seed && ppc_md.get_random_seed(v))
- return 1;
- return 0;
- return false;
-}
-
-
-static inline bool __must_check arch_get_random_seed_int(unsigned int *v)
-{
- unsigned long val;
- bool rc;
-
- rc = arch_get_random_seed_long(&val);
- if (rc)
- *v = val;
-
- return rc;
--}
-#endif /* CONFIG_ARCH_RANDOM */
++size_t __must_check arch_get_random_seed_longs(unsigned long *v, size_t max_longs);
#ifdef CONFIG_PPC_POWERNV
-int powernv_hwrng_present(void);
-int powernv_get_random_long(unsigned long *v);
-int powernv_get_random_real_mode(unsigned long *v);
-#else
-static inline int powernv_hwrng_present(void) { return 0; }
-static inline int powernv_get_random_real_mode(unsigned long *v) { return 0; }
+int pnv_get_random_long(unsigned long *v);
#endif
#endif /* _ASM_POWERPC_ARCHRANDOM_H */
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 3b1cf9ca4814b..951822145600e 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -172,12 +172,12 @@ void (*pm_power_off)(void);
EXPORT_SYMBOL_GPL(pm_power_off);
#ifdef CONFIG_ARCH_RANDOM
-bool __must_check arch_get_random_seed_long(unsigned long *v)
+size_T __must_check arch_get_random_seed_longs(unsigned long *v, size_t max_longs)
{
- if (ppc_md.get_random_seed)
- return ppc_md.get_random_seed(v);
+ if (max_longs && ppc_md.get_random_seed && ppc_md.get_random_seed(v))
+ return 1;
- return false;
+ return 0;
}
EXPORT_SYMBOL(arch_get_random_seed_long);
next reply other threads:[~2022-08-02 23:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-02 23:59 broonie [this message]
2022-08-06 5:40 ` linux-next: manual merge of the bitmap tree with the random tree Michael Ellerman
-- strict thread matches above, loose matches on Subject: below --
2022-10-07 5:14 Stephen Rothwell
2022-10-11 21:46 ` Stephen Rothwell
2022-10-11 23:33 ` Jason A. Donenfeld
2022-07-26 8:56 Stephen Rothwell
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=20220802235903.2660083-1-broonie@kernel.org \
--to=broonie@kernel$(echo .)org \
--cc=Jason@zx2c4$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=yury.norov@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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