[PATCH v2 08/39] xen/riscv: introduce asm/cpufeature.h

Oleksii Kurochko posted 39 patches 2 years ago
There is a newer version of this series
[PATCH v2 08/39] xen/riscv: introduce asm/cpufeature.h
Posted by Oleksii Kurochko 2 years ago
Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
---
Changes in V2:
 - Nothing changed. Only rebase.
---
 xen/arch/riscv/include/asm/cpufeature.h | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 xen/arch/riscv/include/asm/cpufeature.h

diff --git a/xen/arch/riscv/include/asm/cpufeature.h b/xen/arch/riscv/include/asm/cpufeature.h
new file mode 100644
index 0000000000..211827f816
--- /dev/null
+++ b/xen/arch/riscv/include/asm/cpufeature.h
@@ -0,0 +1,22 @@
+#ifndef __ASM_RISCV_CPUFEATURE_H
+#define __ASM_RISCV_CPUFEATURE_H
+
+#ifndef __ASSEMBLY__
+
+static inline int cpu_nr_siblings(unsigned int cpu)
+{
+    return 1;
+}
+
+#endif /* __ASSEMBLY__ */
+
+#endif
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
+
-- 
2.42.0
Re: [PATCH v2 08/39] xen/riscv: introduce asm/cpufeature.h
Posted by Jan Beulich 2 years ago
On 24.11.2023 11:30, Oleksii Kurochko wrote:
> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>

Acked-by: Jan Beulich <jbeulich@suse.com>

Would have been nice ...

> --- /dev/null
> +++ b/xen/arch/riscv/include/asm/cpufeature.h
> @@ -0,0 +1,22 @@
> +#ifndef __ASM_RISCV_CPUFEATURE_H
> +#define __ASM_RISCV_CPUFEATURE_H
> +
> +#ifndef __ASSEMBLY__
> +
> +static inline int cpu_nr_siblings(unsigned int cpu)

... for this to have return type unsigned int, but I see you're staying in
line with oddities elsewhere. Just one more place to touch down the road.

Jan
Re: [PATCH v2 08/39] xen/riscv: introduce asm/cpufeature.h
Posted by Jan Beulich 2 years ago
On 07.12.2023 15:19, Jan Beulich wrote:
> On 24.11.2023 11:30, Oleksii Kurochko wrote:
>> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
> 
> Acked-by: Jan Beulich <jbeulich@suse.com>

Actually - with an SPDX header added. I only now realize that I
committed the earlier two patches without paying attention to this
aspect. I'd appreciate if in the next version you could include an
incremental change. And obviously in all other new headers such a
comment (and perhaps also a formatting footer) wants introducing
as well.

Jan
Re: [PATCH v2 08/39] xen/riscv: introduce asm/cpufeature.h
Posted by Oleksii 2 years ago
On Thu, 2023-12-07 at 15:25 +0100, Jan Beulich wrote:
> On 07.12.2023 15:19, Jan Beulich wrote:
> > On 24.11.2023 11:30, Oleksii Kurochko wrote:
> > > Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
> > 
> > Acked-by: Jan Beulich <jbeulich@suse.com>
> 
> Actually - with an SPDX header added. I only now realize that I
> committed the earlier two patches without paying attention to this
> aspect. I'd appreciate if in the next version you could include an
> incremental change. And obviously in all other new headers such a
> comment (and perhaps also a formatting footer) wants introducing
> as well.
Thanks a lot. I'll add SPDX headers.

~ Oleksii