linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Add Zhaoxin HW RNG support
@ 2023-07-31  8:45 LeoLiu-oc
  2023-07-31  8:45 ` [PATCH v2 1/2] hwrng: via-rng: convert to x86_cpu_id probing LeoLiu-oc
  2023-07-31  8:45 ` [PATCH v2 2/2] hwrng: add Zhaoxin HW RNG driver LeoLiu-oc
  0 siblings, 2 replies; 7+ messages in thread
From: LeoLiu-oc @ 2023-07-31  8:45 UTC (permalink / raw)
  To: olivia, herbert, jiajie.ho, conor.dooley, martin, mmyangfl,
	jenny.zhang, linux-kernel, linux-crypto
  Cc: leoliu, CobeChen, YunShen, TonyWWang, leoliu-oc

From: leoliu-oc <leoliu-oc@zhaoxin.com>

Implemented Zhaoxin rng driver to add support for Zhaoxin HW RNG.
Both Zhaoxin-rng and via-rng rely on the XSTORE feature,
but the actual implementation is different. So add Vendor ID/Family
restrictions in via-rng module.

v1->v2:
    * Modify via-rng in a separate patch.
    * Fix some formatting issues.

leoliu-oc (2):
  hwrng: via-rng: convert to x86_cpu_id probing
  hwrng: add Zhaoxin HW RNG driver

 drivers/char/hw_random/Kconfig       | 13 +++++
 drivers/char/hw_random/Makefile      |  1 +
 drivers/char/hw_random/via-rng.c     | 15 +++--
 drivers/char/hw_random/zhaoxin-rng.c | 87 ++++++++++++++++++++++++++++
 4 files changed, 108 insertions(+), 8 deletions(-)
 create mode 100644 drivers/char/hw_random/zhaoxin-rng.c

-- 
2.34.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 1/2] hwrng: via-rng: convert to x86_cpu_id probing
  2023-07-31  8:45 [PATCH v2 0/2] Add Zhaoxin HW RNG support LeoLiu-oc
@ 2023-07-31  8:45 ` LeoLiu-oc
  2023-07-31  8:45 ` [PATCH v2 2/2] hwrng: add Zhaoxin HW RNG driver LeoLiu-oc
  1 sibling, 0 replies; 7+ messages in thread
From: LeoLiu-oc @ 2023-07-31  8:45 UTC (permalink / raw)
  To: olivia, herbert, jiajie.ho, conor.dooley, martin, mmyangfl,
	jenny.zhang, linux-kernel, linux-crypto
  Cc: leoliu, CobeChen, YunShen, TonyWWang, leoliu-oc

From: leoliu-oc <leoliu-oc@zhaoxin.com>

With this, In addition to the Feature matching check,
add the CPU Vendor ID/Family check.

Signed-off-by: leoliu-oc <leoliu-oc@zhaoxin.com>
---
 drivers/char/hw_random/via-rng.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/drivers/char/hw_random/via-rng.c b/drivers/char/hw_random/via-rng.c
index a9a0a3b09c8b..d7feb3923819 100644
--- a/drivers/char/hw_random/via-rng.c
+++ b/drivers/char/hw_random/via-rng.c
@@ -135,7 +135,7 @@ static int via_rng_init(struct hwrng *rng)
 	 * is always enabled if CPUID rng_en is set.  There is no
 	 * RNG configuration like it used to be the case in this
 	 * register */
-	if (((c->x86 == 6) && (c->x86_model >= 0x0f))  || (c->x86 > 6)){
+	if (((c->x86 == 6) && (c->x86_model >= 0x0f))) {
 		if (!boot_cpu_has(X86_FEATURE_XSTORE_EN)) {
 			pr_err(PFX "can't enable hardware RNG "
 				"if XSTORE is not enabled\n");
@@ -191,12 +191,17 @@ static struct hwrng via_rng = {
 	.data_read	= via_rng_data_read,
 };
 
+static const struct x86_cpu_id via_rng_cpu_ids[] = {
+	X86_MATCH_VENDOR_FAM_FEATURE(CENTAUR, 6, X86_FEATURE_XSTORE, NULL),
+	{}
+};
+MODULE_DEVICE_TABLE(x86cpu, via_rng_cpu_ids);
 
 static int __init via_rng_mod_init(void)
 {
 	int err;
 
-	if (!boot_cpu_has(X86_FEATURE_XSTORE))
+	if (!x86_match_cpu(via_rng_cpu_ids))
 		return -ENODEV;
 
 	pr_info("VIA RNG detected\n");
@@ -217,11 +222,5 @@ static void __exit via_rng_mod_exit(void)
 }
 module_exit(via_rng_mod_exit);
 
-static struct x86_cpu_id __maybe_unused via_rng_cpu_id[] = {
-	X86_MATCH_FEATURE(X86_FEATURE_XSTORE, NULL),
-	{}
-};
-MODULE_DEVICE_TABLE(x86cpu, via_rng_cpu_id);
-
 MODULE_DESCRIPTION("H/W RNG driver for VIA CPU with PadLock");
 MODULE_LICENSE("GPL");
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 2/2] hwrng: add Zhaoxin HW RNG driver
  2023-07-31  8:45 [PATCH v2 0/2] Add Zhaoxin HW RNG support LeoLiu-oc
  2023-07-31  8:45 ` [PATCH v2 1/2] hwrng: via-rng: convert to x86_cpu_id probing LeoLiu-oc
@ 2023-07-31  8:45 ` LeoLiu-oc
  2023-07-31 10:22   ` kernel test robot
                     ` (3 more replies)
  1 sibling, 4 replies; 7+ messages in thread
From: LeoLiu-oc @ 2023-07-31  8:45 UTC (permalink / raw)
  To: olivia, herbert, jiajie.ho, conor.dooley, martin, mmyangfl,
	jenny.zhang, linux-kernel, linux-crypto
  Cc: leoliu, CobeChen, YunShen, TonyWWang, leoliu-oc

From: leoliu-oc <leoliu-oc@zhaoxin.com>

Add support for Zhaoxin HW RNG.

Signed-off-by: leoliu-oc <leoliu-oc@zhaoxin.com>
---
 drivers/char/hw_random/Kconfig       | 13 +++++
 drivers/char/hw_random/Makefile      |  1 +
 drivers/char/hw_random/zhaoxin-rng.c | 87 ++++++++++++++++++++++++++++
 3 files changed, 101 insertions(+)
 create mode 100644 drivers/char/hw_random/zhaoxin-rng.c

diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig
index e0b3786ca51b..e315cd444c77 100644
--- a/drivers/char/hw_random/Kconfig
+++ b/drivers/char/hw_random/Kconfig
@@ -150,6 +150,19 @@ config HW_RANDOM_VIA
 
 	  If unsure, say Y.
 
+config HW_RANDOM_ZHAOXIN
+	tristate "Zhaoxin HW Random Number Generator support"
+	depends on X86 || COMPILE_TEST
+	default HW_RANDOM
+	help
+	  This driver provides kernel-side support for the Random Number
+	  Generator hardware found on Zhaoxin based motherboards.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called zhaoxin-rng.
+
+	  If unsure, say Y.
+
 config HW_RANDOM_IXP4XX
 	tristate "Intel IXP4xx NPU HW Pseudo-Random Number Generator support"
 	depends on ARCH_IXP4XX || COMPILE_TEST
diff --git a/drivers/char/hw_random/Makefile b/drivers/char/hw_random/Makefile
index 32549a1186dc..ef5b3ae0794d 100644
--- a/drivers/char/hw_random/Makefile
+++ b/drivers/char/hw_random/Makefile
@@ -14,6 +14,7 @@ obj-$(CONFIG_HW_RANDOM_GEODE) += geode-rng.o
 obj-$(CONFIG_HW_RANDOM_N2RNG) += n2-rng.o
 n2-rng-y := n2-drv.o n2-asm.o
 obj-$(CONFIG_HW_RANDOM_VIA) += via-rng.o
+obj-$(CONFIG_HW_RANDOM_ZHAOXIN) += zhaoxin-rng.o
 obj-$(CONFIG_HW_RANDOM_EXYNOS) += exynos-trng.o
 obj-$(CONFIG_HW_RANDOM_IXP4XX) += ixp4xx-rng.o
 obj-$(CONFIG_HW_RANDOM_OMAP) += omap-rng.o
diff --git a/drivers/char/hw_random/zhaoxin-rng.c b/drivers/char/hw_random/zhaoxin-rng.c
new file mode 100644
index 000000000000..0ceeb9c3f989
--- /dev/null
+++ b/drivers/char/hw_random/zhaoxin-rng.c
@@ -0,0 +1,87 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * RNG driver for Zhaoxin RNGs
+ *
+ * Copyright 2023 (c) Zhaoxin Semiconductor Co., Ltd.
+ *
+ */
+
+#include <crypto/padlock.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/hw_random.h>
+#include <linux/delay.h>
+#include <linux/io.h>
+#include <linux/cpufeature.h>
+#include <asm/cpu_device_id.h>
+#include <asm/fpu/api.h>
+
+enum {
+	ZHAOXIN_RNG_CHUNK_8		= 0x00, /* 64 rand bits, 64 stored bits*/
+	ZHAOXIN_RNG_CHUNK_4		= 0x01, /* 32 rand bits, 32 stored bits */
+	ZHAOXIN_RNG_CHUNK_2		= 0x02, /* 16 rand bits, 32 stored bits */
+	ZHAOXIN_RNG_CHUNK_1		= 0x03, /* 8 rand bits, 32 stored bits */
+	ZHAOXIN_RNG_MAX_SIZE		= (128*1024),
+};
+
+static int zhaoxin_rng_init(struct hwrng *rng)
+{
+	if (!boot_cpu_has(X86_FEATURE_XSTORE_EN)) {
+		pr_err(PFX "can't enable hardware RNG if XSTORE is not enabled\n");
+		return -ENODEV;
+	}
+	return 0;
+}
+
+static inline void rep_xstore(size_t size, size_t factor, void *result)
+{
+	asm(".byte 0xF3, 0x0F, 0xA7, 0xC0 /*rep xstore*/"
+		: "=m" (*(size_t *)result), "+c" (size), "+d" (factor), "+D" (result));
+}
+
+static int zhaoxin_rng_read(struct hwrng *rng, void *data, size_t max, bool wait)
+{
+	if (max > ZHAOXIN_RNG_MAX_SIZE)
+		max = ZHAOXIN_RNG_MAX_SIZE;
+	rep_xstore(max, ZHAOXIN_RNG_CHUNK_1, data);
+	return max;
+}
+
+static struct hwrng zhaoxin_rng = {
+	.name   = "zhaoxin",
+	.init   = zhaoxin_rng_init,
+	.read   = zhaoxin_rng_read,
+};
+
+static const struct x86_cpu_id zhaoxin_rng_cpu_ids[] = {
+	X86_MATCH_VENDOR_FAM_FEATURE(ZHAOXIN, 6, X86_FEATURE_XSTORE, NULL),
+	X86_MATCH_VENDOR_FAM_FEATURE(ZHAOXIN, 7, X86_FEATURE_XSTORE, NULL),
+	X86_MATCH_VENDOR_FAM_FEATURE(CENTAUR, 7, X86_FEATURE_XSTORE, NULL),
+	{}
+};
+MODULE_DEVICE_TABLE(x86cpu, zhaoxin_rng_cpu_ids);
+
+static int __init zhaoxin_rng_mod_init(void)
+{
+	int err;
+
+	if (!x86_match_cpu(zhaoxin_rng_cpu_ids))
+		return -ENODEV;
+
+	pr_info("Zhaoxin RNG detected\n");
+	err = hwrng_register(&zhaoxin_rng);
+	if (err)
+		pr_err(PFX "RNG registering failed (%d)\n", err);
+
+	return err;
+}
+module_init(zhaoxin_rng_mod_init);
+
+static void __exit zhaoxin_rng_mod_exit(void)
+{
+	hwrng_unregister(&zhaoxin_rng);
+}
+module_exit(zhaoxin_rng_mod_exit);
+MODULE_DESCRIPTION("H/W RNG driver for Zhaoxin CPU");
+MODULE_AUTHOR("YunShen@zhaoxin.com");
+MODULE_LICENSE("GPL");
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/2] hwrng: add Zhaoxin HW RNG driver
  2023-07-31  8:45 ` [PATCH v2 2/2] hwrng: add Zhaoxin HW RNG driver LeoLiu-oc
@ 2023-07-31 10:22   ` kernel test robot
  2023-07-31 12:04   ` kernel test robot
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2023-07-31 10:22 UTC (permalink / raw)
  To: LeoLiu-oc, olivia, herbert, jiajie.ho, conor.dooley, martin,
	mmyangfl, jenny.zhang, linux-kernel, linux-crypto
  Cc: oe-kbuild-all, leoliu, CobeChen, YunShen, TonyWWang, leoliu-oc

Hi LeoLiu-oc,

kernel test robot noticed the following build warnings:

[auto build test WARNING on char-misc/char-misc-testing]
[also build test WARNING on char-misc/char-misc-next char-misc/char-misc-linus herbert-cryptodev-2.6/master linus/master v6.5-rc4 next-20230731]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/LeoLiu-oc/hwrng-via-rng-convert-to-x86_cpu_id-probing/20230731-164950
base:   char-misc/char-misc-testing
patch link:    https://lore.kernel.org/r/20230731084515.2057375-3-LeoLiu-oc%40zhaoxin.com
patch subject: [PATCH v2 2/2] hwrng: add Zhaoxin HW RNG driver
config: loongarch-allyesconfig (https://download.01.org/0day-ci/archive/20230731/202307311838.VQTSuKH4-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230731/202307311838.VQTSuKH4-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307311838.VQTSuKH4-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from arch/loongarch/include/asm/inst.h:10,
                    from arch/loongarch/include/asm/uprobes.h:5,
                    from include/linux/uprobes.h:49,
                    from include/linux/mm_types.h:16,
                    from include/linux/buildid.h:5,
                    from include/linux/module.h:14,
                    from drivers/char/hw_random/zhaoxin-rng.c:10:
>> arch/loongarch/include/asm/asm.h:35: warning: "STACK_ALIGN" redefined
      35 | #define STACK_ALIGN     ~(0xf)
         | 
   In file included from drivers/char/hw_random/zhaoxin-rng.c:9:
   include/crypto/padlock.h:19: note: this is the location of the previous definition
      19 | #define STACK_ALIGN 16
         | 
   drivers/char/hw_random/zhaoxin-rng.c:16:10: fatal error: asm/cpu_device_id.h: No such file or directory
      16 | #include <asm/cpu_device_id.h>
         |          ^~~~~~~~~~~~~~~~~~~~~
   compilation terminated.


vim +/STACK_ALIGN +35 arch/loongarch/include/asm/asm.h

b738c106f7355e Huacai Chen 2022-05-31  31  
b738c106f7355e Huacai Chen 2022-05-31  32  /*
b738c106f7355e Huacai Chen 2022-05-31  33   * Stack alignment
b738c106f7355e Huacai Chen 2022-05-31  34   */
b738c106f7355e Huacai Chen 2022-05-31 @35  #define STACK_ALIGN	~(0xf)
b738c106f7355e Huacai Chen 2022-05-31  36  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/2] hwrng: add Zhaoxin HW RNG driver
  2023-07-31  8:45 ` [PATCH v2 2/2] hwrng: add Zhaoxin HW RNG driver LeoLiu-oc
  2023-07-31 10:22   ` kernel test robot
@ 2023-07-31 12:04   ` kernel test robot
  2023-07-31 12:04   ` kernel test robot
  2023-07-31 13:06   ` kernel test robot
  3 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2023-07-31 12:04 UTC (permalink / raw)
  To: LeoLiu-oc, olivia, herbert, jiajie.ho, conor.dooley, martin,
	mmyangfl, jenny.zhang, linux-kernel, linux-crypto
  Cc: llvm, oe-kbuild-all, leoliu, CobeChen, YunShen, TonyWWang,
	leoliu-oc

Hi LeoLiu-oc,

kernel test robot noticed the following build errors:

[auto build test ERROR on char-misc/char-misc-testing]
[also build test ERROR on char-misc/char-misc-next char-misc/char-misc-linus herbert-cryptodev-2.6/master linus/master v6.5-rc4 next-20230731]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/LeoLiu-oc/hwrng-via-rng-convert-to-x86_cpu_id-probing/20230731-164950
base:   char-misc/char-misc-testing
patch link:    https://lore.kernel.org/r/20230731084515.2057375-3-LeoLiu-oc%40zhaoxin.com
patch subject: [PATCH v2 2/2] hwrng: add Zhaoxin HW RNG driver
config: hexagon-randconfig-r024-20230731 (https://download.01.org/0day-ci/archive/20230731/202307311920.0ZdHwXvk-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project.git f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce: (https://download.01.org/0day-ci/archive/20230731/202307311920.0ZdHwXvk-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307311920.0ZdHwXvk-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/char/hw_random/zhaoxin-rng.c:14:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:334:
   include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __raw_readb(PCI_IOBASE + addr);
                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
   #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
                                                     ^
   In file included from drivers/char/hw_random/zhaoxin-rng.c:14:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:334:
   include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
   #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                                                     ^
   In file included from drivers/char/hw_random/zhaoxin-rng.c:14:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:334:
   include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writeb(value, PCI_IOBASE + addr);
                               ~~~~~~~~~~ ^
   include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
>> drivers/char/hw_random/zhaoxin-rng.c:16:10: fatal error: 'asm/cpu_device_id.h' file not found
   #include <asm/cpu_device_id.h>
            ^~~~~~~~~~~~~~~~~~~~~
   6 warnings and 1 error generated.


vim +16 drivers/char/hw_random/zhaoxin-rng.c

  > 16	#include <asm/cpu_device_id.h>
    17	#include <asm/fpu/api.h>
    18	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/2] hwrng: add Zhaoxin HW RNG driver
  2023-07-31  8:45 ` [PATCH v2 2/2] hwrng: add Zhaoxin HW RNG driver LeoLiu-oc
  2023-07-31 10:22   ` kernel test robot
  2023-07-31 12:04   ` kernel test robot
@ 2023-07-31 12:04   ` kernel test robot
  2023-07-31 13:06   ` kernel test robot
  3 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2023-07-31 12:04 UTC (permalink / raw)
  To: LeoLiu-oc, olivia, herbert, jiajie.ho, conor.dooley, martin,
	mmyangfl, jenny.zhang, linux-kernel, linux-crypto
  Cc: oe-kbuild-all, leoliu, CobeChen, YunShen, TonyWWang, leoliu-oc

Hi LeoLiu-oc,

kernel test robot noticed the following build errors:

[auto build test ERROR on char-misc/char-misc-testing]
[also build test ERROR on char-misc/char-misc-next char-misc/char-misc-linus herbert-cryptodev-2.6/master linus/master v6.5-rc4 next-20230731]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/LeoLiu-oc/hwrng-via-rng-convert-to-x86_cpu_id-probing/20230731-164950
base:   char-misc/char-misc-testing
patch link:    https://lore.kernel.org/r/20230731084515.2057375-3-LeoLiu-oc%40zhaoxin.com
patch subject: [PATCH v2 2/2] hwrng: add Zhaoxin HW RNG driver
config: openrisc-randconfig-r025-20230731 (https://download.01.org/0day-ci/archive/20230731/202307311942.Qpu13qjG-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230731/202307311942.Qpu13qjG-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307311942.Qpu13qjG-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/char/hw_random/zhaoxin-rng.c:16:10: fatal error: asm/cpu_device_id.h: No such file or directory
      16 | #include <asm/cpu_device_id.h>
         |          ^~~~~~~~~~~~~~~~~~~~~
   compilation terminated.


vim +16 drivers/char/hw_random/zhaoxin-rng.c

  > 16	#include <asm/cpu_device_id.h>
    17	#include <asm/fpu/api.h>
    18	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/2] hwrng: add Zhaoxin HW RNG driver
  2023-07-31  8:45 ` [PATCH v2 2/2] hwrng: add Zhaoxin HW RNG driver LeoLiu-oc
                     ` (2 preceding siblings ...)
  2023-07-31 12:04   ` kernel test robot
@ 2023-07-31 13:06   ` kernel test robot
  3 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2023-07-31 13:06 UTC (permalink / raw)
  To: LeoLiu-oc, olivia, herbert, jiajie.ho, conor.dooley, martin,
	mmyangfl, jenny.zhang, linux-kernel, linux-crypto
  Cc: oe-kbuild-all, leoliu, CobeChen, YunShen, TonyWWang, leoliu-oc

Hi LeoLiu-oc,

kernel test robot noticed the following build errors:

[auto build test ERROR on char-misc/char-misc-testing]
[also build test ERROR on char-misc/char-misc-next char-misc/char-misc-linus herbert-cryptodev-2.6/master linus/master v6.5-rc4 next-20230731]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/LeoLiu-oc/hwrng-via-rng-convert-to-x86_cpu_id-probing/20230731-164950
base:   char-misc/char-misc-testing
patch link:    https://lore.kernel.org/r/20230731084515.2057375-3-LeoLiu-oc%40zhaoxin.com
patch subject: [PATCH v2 2/2] hwrng: add Zhaoxin HW RNG driver
config: openrisc-randconfig-r003-20230731 (https://download.01.org/0day-ci/archive/20230731/202307312040.d5kTGcBX-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230731/202307312040.d5kTGcBX-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307312040.d5kTGcBX-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/char/hw_random/zhaoxin-rng.c:16:10: fatal error: asm/cpu_device_id.h: No such file or directory
      16 | #include <asm/cpu_device_id.h>
         |          ^~~~~~~~~~~~~~~~~~~~~
   compilation terminated.


vim +16 drivers/char/hw_random/zhaoxin-rng.c

  > 16	#include <asm/cpu_device_id.h>
    17	#include <asm/fpu/api.h>
    18	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-07-31 13:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-31  8:45 [PATCH v2 0/2] Add Zhaoxin HW RNG support LeoLiu-oc
2023-07-31  8:45 ` [PATCH v2 1/2] hwrng: via-rng: convert to x86_cpu_id probing LeoLiu-oc
2023-07-31  8:45 ` [PATCH v2 2/2] hwrng: add Zhaoxin HW RNG driver LeoLiu-oc
2023-07-31 10:22   ` kernel test robot
2023-07-31 12:04   ` kernel test robot
2023-07-31 12:04   ` kernel test robot
2023-07-31 13:06   ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).