* [RFC 0/2] Add generic FPU api similar to x86
@ 2021-07-19 19:52 ` Anson Jacob
0 siblings, 0 replies; 15+ messages in thread
From: Anson Jacob @ 2021-07-19 19:52 UTC (permalink / raw)
To: mpe, benh, paulus, christophe.leroy, linuxppc-dev, amd-gfx
Cc: Sunpeng.Li, Harry.Wentland, qingqing.zhuo, Rodrigo.Siqueira,
roman.li, Anson.Jacob, Aurabindo.Pillai, Bhawanpreet.Lakha,
bindu.r
This is an attempt to have generic FPU enable/disable
calls similar to x86.
So that we can simplify gpu/drm/amd/display/dc/os_types.h
Also adds FPU correctness logic seen in x86.
Anson Jacob (2):
ppc/fpu: Add generic FPU api similar to x86
drm/amd/display: Use PPC FPU functions
arch/powerpc/include/asm/switch_to.h | 29 ++---
arch/powerpc/kernel/process.c | 130 ++++++++++++++++++++++
drivers/gpu/drm/amd/display/dc/os_types.h | 28 +----
3 files changed, 139 insertions(+), 48 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 15+ messages in thread
* [RFC 0/2] Add generic FPU api similar to x86
@ 2021-07-19 19:52 ` Anson Jacob
0 siblings, 0 replies; 15+ messages in thread
From: Anson Jacob @ 2021-07-19 19:52 UTC (permalink / raw)
To: mpe, benh, paulus, christophe.leroy, linuxppc-dev, amd-gfx
Cc: Sunpeng.Li, Harry.Wentland, qingqing.zhuo, Rodrigo.Siqueira,
roman.li, Anson.Jacob, Aurabindo.Pillai, Bhawanpreet.Lakha,
bindu.r
This is an attempt to have generic FPU enable/disable
calls similar to x86.
So that we can simplify gpu/drm/amd/display/dc/os_types.h
Also adds FPU correctness logic seen in x86.
Anson Jacob (2):
ppc/fpu: Add generic FPU api similar to x86
drm/amd/display: Use PPC FPU functions
arch/powerpc/include/asm/switch_to.h | 29 ++---
arch/powerpc/kernel/process.c | 130 ++++++++++++++++++++++
drivers/gpu/drm/amd/display/dc/os_types.h | 28 +----
3 files changed, 139 insertions(+), 48 deletions(-)
--
2.25.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 15+ messages in thread
* [RFC 1/2] ppc/fpu: Add generic FPU api similar to x86
2021-07-19 19:52 ` Anson Jacob
@ 2021-07-19 19:52 ` Anson Jacob
-1 siblings, 0 replies; 15+ messages in thread
From: Anson Jacob @ 2021-07-19 19:52 UTC (permalink / raw)
To: mpe, benh, paulus, christophe.leroy, linuxppc-dev, amd-gfx
Cc: Sunpeng.Li, Harry.Wentland, qingqing.zhuo, Rodrigo.Siqueira,
roman.li, Anson.Jacob, Aurabindo.Pillai, Bhawanpreet.Lakha,
bindu.r
- Add kernel_fpu_begin & kernel_fpu_end API as x86
- Add logic similar to x86 to ensure fpu
begin/end call correctness
- Add kernel_fpu_enabled to know if FPU is enabled
Signed-off-by: Anson Jacob <Anson.Jacob@amd.com>
---
arch/powerpc/include/asm/switch_to.h | 29 ++----
arch/powerpc/kernel/process.c | 130 +++++++++++++++++++++++++++
2 files changed, 137 insertions(+), 22 deletions(-)
diff --git a/arch/powerpc/include/asm/switch_to.h b/arch/powerpc/include/asm/switch_to.h
index 9d1fbd8be1c7..aded7aa661c0 100644
--- a/arch/powerpc/include/asm/switch_to.h
+++ b/arch/powerpc/include/asm/switch_to.h
@@ -41,10 +41,7 @@ extern void enable_kernel_fp(void);
extern void flush_fp_to_thread(struct task_struct *);
extern void giveup_fpu(struct task_struct *);
extern void save_fpu(struct task_struct *);
-static inline void disable_kernel_fp(void)
-{
- msr_check_and_clear(MSR_FP);
-}
+extern void disable_kernel_fp(void);
#else
static inline void save_fpu(struct task_struct *t) { }
static inline void flush_fp_to_thread(struct task_struct *t) { }
@@ -55,10 +52,7 @@ extern void enable_kernel_altivec(void);
extern void flush_altivec_to_thread(struct task_struct *);
extern void giveup_altivec(struct task_struct *);
extern void save_altivec(struct task_struct *);
-static inline void disable_kernel_altivec(void)
-{
- msr_check_and_clear(MSR_VEC);
-}
+extern void disable_kernel_altivec(void);
#else
static inline void save_altivec(struct task_struct *t) { }
static inline void __giveup_altivec(struct task_struct *t) { }
@@ -67,20 +61,7 @@ static inline void __giveup_altivec(struct task_struct *t) { }
#ifdef CONFIG_VSX
extern void enable_kernel_vsx(void);
extern void flush_vsx_to_thread(struct task_struct *);
-static inline void disable_kernel_vsx(void)
-{
- msr_check_and_clear(MSR_FP|MSR_VEC|MSR_VSX);
-}
-#else
-static inline void enable_kernel_vsx(void)
-{
- BUILD_BUG();
-}
-
-static inline void disable_kernel_vsx(void)
-{
- BUILD_BUG();
-}
+extern void disable_kernel_vsx(void);
#endif
#ifdef CONFIG_SPE
@@ -114,4 +95,8 @@ static inline void clear_task_ebb(struct task_struct *t)
extern int set_thread_tidr(struct task_struct *t);
+bool kernel_fpu_enabled(void);
+void kernel_fpu_begin(void);
+void kernel_fpu_end(void);
+
#endif /* _ASM_POWERPC_SWITCH_TO_H */
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 185beb290580..2ced8c6a3fab 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -75,6 +75,17 @@
#define TM_DEBUG(x...) do { } while(0)
#endif
+/*
+ * Track whether the kernel is using the FPU state
+ * currently.
+ *
+ * This flag is used:
+ *
+ * - kernel_fpu_begin()/end() correctness
+ * - kernel_fpu_enabled info
+ */
+static DEFINE_PER_CPU(bool, in_kernel_fpu);
+
extern unsigned long _get_SP(void);
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
@@ -212,6 +223,9 @@ void enable_kernel_fp(void)
unsigned long cpumsr;
WARN_ON(preemptible());
+ WARN_ON_ONCE(this_cpu_read(in_kernel_fpu));
+
+ this_cpu_write(in_kernel_fpu, true);
cpumsr = msr_check_and_set(MSR_FP);
@@ -231,6 +245,15 @@ void enable_kernel_fp(void)
}
}
EXPORT_SYMBOL(enable_kernel_fp);
+
+void disable_kernel_fp(void)
+{
+ WARN_ON_ONCE(!this_cpu_read(in_kernel_fpu));
+
+ this_cpu_write(in_kernel_fpu, false);
+ msr_check_and_clear(MSR_FP);
+}
+EXPORT_SYMBOL(disable_kernel_fp);
#else
static inline void __giveup_fpu(struct task_struct *tsk) { }
#endif /* CONFIG_PPC_FPU */
@@ -263,6 +286,9 @@ void enable_kernel_altivec(void)
unsigned long cpumsr;
WARN_ON(preemptible());
+ WARN_ON_ONCE(this_cpu_read(in_kernel_fpu));
+
+ this_cpu_write(in_kernel_fpu, true);
cpumsr = msr_check_and_set(MSR_VEC);
@@ -283,6 +309,14 @@ void enable_kernel_altivec(void)
}
EXPORT_SYMBOL(enable_kernel_altivec);
+void disable_kernel_altivec(void)
+{
+ WARN_ON_ONCE(!this_cpu_read(in_kernel_fpu));
+
+ this_cpu_write(in_kernel_fpu, false);
+ msr_check_and_clear(MSR_VEC);
+}
+EXPORT_SYMBOL(disable_kernel_altivec);
/*
* Make sure the VMX/Altivec register state in the
* the thread_struct is up to date for task tsk.
@@ -333,6 +367,9 @@ void enable_kernel_vsx(void)
unsigned long cpumsr;
WARN_ON(preemptible());
+ WARN_ON_ONCE(this_cpu_read(in_kernel_fpu));
+
+ this_cpu_write(in_kernel_fpu, true);
cpumsr = msr_check_and_set(MSR_FP|MSR_VEC|MSR_VSX);
@@ -354,6 +391,15 @@ void enable_kernel_vsx(void)
}
EXPORT_SYMBOL(enable_kernel_vsx);
+void disable_kernel_vsx(void)
+{
+ WARN_ON_ONCE(!this_cpu_read(in_kernel_fpu));
+
+ this_cpu_write(in_kernel_fpu, false);
+ msr_check_and_clear(MSR_FP|MSR_VEC|MSR_VSX);
+}
+EXPORT_SYMBOL(disable_kernel_vsx);
+
void flush_vsx_to_thread(struct task_struct *tsk)
{
if (tsk->thread.regs) {
@@ -406,6 +452,90 @@ void flush_spe_to_thread(struct task_struct *tsk)
}
#endif /* CONFIG_SPE */
+static bool fpu_support(void)
+{
+ if (cpu_has_feature(CPU_FTR_VSX_COMP)) {
+ return true;
+ } else if (cpu_has_feature(CPU_FTR_ALTIVEC_COMP)) {
+ return true;
+ } else if (!cpu_has_feature(CPU_FTR_FPU_UNAVAILABLE)) {
+ return true;
+ }
+
+ return false;
+}
+
+bool kernel_fpu_enabled(void)
+{
+ return this_cpu_read(in_kernel_fpu);
+}
+EXPORT_SYMBOL(kernel_fpu_enabled);
+
+void kernel_fpu_begin(void)
+{
+ if (!fpu_support()) {
+ WARN_ON_ONCE(1);
+ return;
+ }
+
+ preempt_disable();
+
+#ifdef CONFIG_VSX
+ if (cpu_has_feature(CPU_FTR_VSX_COMP)) {
+ enable_kernel_vsx();
+ return;
+ }
+#endif
+
+#ifdef CONFIG_ALTIVEC
+ if (cpu_has_feature(CPU_FTR_ALTIVEC_COMP)) {
+ enable_kernel_altivec();
+ return;
+ }
+#endif
+
+#ifdef CONFIG_PPC_FPU
+ if (!cpu_has_feature(CPU_FTR_FPU_UNAVAILABLE)) {
+ enable_kernel_fp();
+ return;
+ }
+#endif
+}
+EXPORT_SYMBOL_GPL(kernel_fpu_begin);
+
+void kernel_fpu_end(void)
+{
+ if (!fpu_support()) {
+ WARN_ON_ONCE(1);
+ return;
+ }
+
+#ifdef CONFIG_VSX
+ if (cpu_has_feature(CPU_FTR_VSX_COMP)) {
+ disable_kernel_vsx();
+ goto done;
+ }
+#endif
+
+#ifdef CONFIG_ALTIVEC
+ if (cpu_has_feature(CPU_FTR_ALTIVEC_COMP)) {
+ disable_kernel_altivec();
+ goto done;
+ }
+#endif
+
+#ifdef CONFIG_PPC_FPU
+ if (!cpu_has_feature(CPU_FTR_FPU_UNAVAILABLE)) {
+ disable_kernel_fp();
+ goto done;
+ }
+#endif
+
+done:
+ preempt_enable();
+}
+EXPORT_SYMBOL_GPL(kernel_fpu_end);
+
static unsigned long msr_all_available;
static int __init init_msr_all_available(void)
--
2.25.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [RFC 1/2] ppc/fpu: Add generic FPU api similar to x86
@ 2021-07-19 19:52 ` Anson Jacob
0 siblings, 0 replies; 15+ messages in thread
From: Anson Jacob @ 2021-07-19 19:52 UTC (permalink / raw)
To: mpe, benh, paulus, christophe.leroy, linuxppc-dev, amd-gfx
Cc: Sunpeng.Li, Harry.Wentland, qingqing.zhuo, Rodrigo.Siqueira,
roman.li, Anson.Jacob, Aurabindo.Pillai, Bhawanpreet.Lakha,
bindu.r
- Add kernel_fpu_begin & kernel_fpu_end API as x86
- Add logic similar to x86 to ensure fpu
begin/end call correctness
- Add kernel_fpu_enabled to know if FPU is enabled
Signed-off-by: Anson Jacob <Anson.Jacob@amd.com>
---
arch/powerpc/include/asm/switch_to.h | 29 ++----
arch/powerpc/kernel/process.c | 130 +++++++++++++++++++++++++++
2 files changed, 137 insertions(+), 22 deletions(-)
diff --git a/arch/powerpc/include/asm/switch_to.h b/arch/powerpc/include/asm/switch_to.h
index 9d1fbd8be1c7..aded7aa661c0 100644
--- a/arch/powerpc/include/asm/switch_to.h
+++ b/arch/powerpc/include/asm/switch_to.h
@@ -41,10 +41,7 @@ extern void enable_kernel_fp(void);
extern void flush_fp_to_thread(struct task_struct *);
extern void giveup_fpu(struct task_struct *);
extern void save_fpu(struct task_struct *);
-static inline void disable_kernel_fp(void)
-{
- msr_check_and_clear(MSR_FP);
-}
+extern void disable_kernel_fp(void);
#else
static inline void save_fpu(struct task_struct *t) { }
static inline void flush_fp_to_thread(struct task_struct *t) { }
@@ -55,10 +52,7 @@ extern void enable_kernel_altivec(void);
extern void flush_altivec_to_thread(struct task_struct *);
extern void giveup_altivec(struct task_struct *);
extern void save_altivec(struct task_struct *);
-static inline void disable_kernel_altivec(void)
-{
- msr_check_and_clear(MSR_VEC);
-}
+extern void disable_kernel_altivec(void);
#else
static inline void save_altivec(struct task_struct *t) { }
static inline void __giveup_altivec(struct task_struct *t) { }
@@ -67,20 +61,7 @@ static inline void __giveup_altivec(struct task_struct *t) { }
#ifdef CONFIG_VSX
extern void enable_kernel_vsx(void);
extern void flush_vsx_to_thread(struct task_struct *);
-static inline void disable_kernel_vsx(void)
-{
- msr_check_and_clear(MSR_FP|MSR_VEC|MSR_VSX);
-}
-#else
-static inline void enable_kernel_vsx(void)
-{
- BUILD_BUG();
-}
-
-static inline void disable_kernel_vsx(void)
-{
- BUILD_BUG();
-}
+extern void disable_kernel_vsx(void);
#endif
#ifdef CONFIG_SPE
@@ -114,4 +95,8 @@ static inline void clear_task_ebb(struct task_struct *t)
extern int set_thread_tidr(struct task_struct *t);
+bool kernel_fpu_enabled(void);
+void kernel_fpu_begin(void);
+void kernel_fpu_end(void);
+
#endif /* _ASM_POWERPC_SWITCH_TO_H */
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 185beb290580..2ced8c6a3fab 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -75,6 +75,17 @@
#define TM_DEBUG(x...) do { } while(0)
#endif
+/*
+ * Track whether the kernel is using the FPU state
+ * currently.
+ *
+ * This flag is used:
+ *
+ * - kernel_fpu_begin()/end() correctness
+ * - kernel_fpu_enabled info
+ */
+static DEFINE_PER_CPU(bool, in_kernel_fpu);
+
extern unsigned long _get_SP(void);
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
@@ -212,6 +223,9 @@ void enable_kernel_fp(void)
unsigned long cpumsr;
WARN_ON(preemptible());
+ WARN_ON_ONCE(this_cpu_read(in_kernel_fpu));
+
+ this_cpu_write(in_kernel_fpu, true);
cpumsr = msr_check_and_set(MSR_FP);
@@ -231,6 +245,15 @@ void enable_kernel_fp(void)
}
}
EXPORT_SYMBOL(enable_kernel_fp);
+
+void disable_kernel_fp(void)
+{
+ WARN_ON_ONCE(!this_cpu_read(in_kernel_fpu));
+
+ this_cpu_write(in_kernel_fpu, false);
+ msr_check_and_clear(MSR_FP);
+}
+EXPORT_SYMBOL(disable_kernel_fp);
#else
static inline void __giveup_fpu(struct task_struct *tsk) { }
#endif /* CONFIG_PPC_FPU */
@@ -263,6 +286,9 @@ void enable_kernel_altivec(void)
unsigned long cpumsr;
WARN_ON(preemptible());
+ WARN_ON_ONCE(this_cpu_read(in_kernel_fpu));
+
+ this_cpu_write(in_kernel_fpu, true);
cpumsr = msr_check_and_set(MSR_VEC);
@@ -283,6 +309,14 @@ void enable_kernel_altivec(void)
}
EXPORT_SYMBOL(enable_kernel_altivec);
+void disable_kernel_altivec(void)
+{
+ WARN_ON_ONCE(!this_cpu_read(in_kernel_fpu));
+
+ this_cpu_write(in_kernel_fpu, false);
+ msr_check_and_clear(MSR_VEC);
+}
+EXPORT_SYMBOL(disable_kernel_altivec);
/*
* Make sure the VMX/Altivec register state in the
* the thread_struct is up to date for task tsk.
@@ -333,6 +367,9 @@ void enable_kernel_vsx(void)
unsigned long cpumsr;
WARN_ON(preemptible());
+ WARN_ON_ONCE(this_cpu_read(in_kernel_fpu));
+
+ this_cpu_write(in_kernel_fpu, true);
cpumsr = msr_check_and_set(MSR_FP|MSR_VEC|MSR_VSX);
@@ -354,6 +391,15 @@ void enable_kernel_vsx(void)
}
EXPORT_SYMBOL(enable_kernel_vsx);
+void disable_kernel_vsx(void)
+{
+ WARN_ON_ONCE(!this_cpu_read(in_kernel_fpu));
+
+ this_cpu_write(in_kernel_fpu, false);
+ msr_check_and_clear(MSR_FP|MSR_VEC|MSR_VSX);
+}
+EXPORT_SYMBOL(disable_kernel_vsx);
+
void flush_vsx_to_thread(struct task_struct *tsk)
{
if (tsk->thread.regs) {
@@ -406,6 +452,90 @@ void flush_spe_to_thread(struct task_struct *tsk)
}
#endif /* CONFIG_SPE */
+static bool fpu_support(void)
+{
+ if (cpu_has_feature(CPU_FTR_VSX_COMP)) {
+ return true;
+ } else if (cpu_has_feature(CPU_FTR_ALTIVEC_COMP)) {
+ return true;
+ } else if (!cpu_has_feature(CPU_FTR_FPU_UNAVAILABLE)) {
+ return true;
+ }
+
+ return false;
+}
+
+bool kernel_fpu_enabled(void)
+{
+ return this_cpu_read(in_kernel_fpu);
+}
+EXPORT_SYMBOL(kernel_fpu_enabled);
+
+void kernel_fpu_begin(void)
+{
+ if (!fpu_support()) {
+ WARN_ON_ONCE(1);
+ return;
+ }
+
+ preempt_disable();
+
+#ifdef CONFIG_VSX
+ if (cpu_has_feature(CPU_FTR_VSX_COMP)) {
+ enable_kernel_vsx();
+ return;
+ }
+#endif
+
+#ifdef CONFIG_ALTIVEC
+ if (cpu_has_feature(CPU_FTR_ALTIVEC_COMP)) {
+ enable_kernel_altivec();
+ return;
+ }
+#endif
+
+#ifdef CONFIG_PPC_FPU
+ if (!cpu_has_feature(CPU_FTR_FPU_UNAVAILABLE)) {
+ enable_kernel_fp();
+ return;
+ }
+#endif
+}
+EXPORT_SYMBOL_GPL(kernel_fpu_begin);
+
+void kernel_fpu_end(void)
+{
+ if (!fpu_support()) {
+ WARN_ON_ONCE(1);
+ return;
+ }
+
+#ifdef CONFIG_VSX
+ if (cpu_has_feature(CPU_FTR_VSX_COMP)) {
+ disable_kernel_vsx();
+ goto done;
+ }
+#endif
+
+#ifdef CONFIG_ALTIVEC
+ if (cpu_has_feature(CPU_FTR_ALTIVEC_COMP)) {
+ disable_kernel_altivec();
+ goto done;
+ }
+#endif
+
+#ifdef CONFIG_PPC_FPU
+ if (!cpu_has_feature(CPU_FTR_FPU_UNAVAILABLE)) {
+ disable_kernel_fp();
+ goto done;
+ }
+#endif
+
+done:
+ preempt_enable();
+}
+EXPORT_SYMBOL_GPL(kernel_fpu_end);
+
static unsigned long msr_all_available;
static int __init init_msr_all_available(void)
--
2.25.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [RFC 2/2] drm/amd/display: Use PPC FPU functions
2021-07-19 19:52 ` Anson Jacob
@ 2021-07-19 19:52 ` Anson Jacob
-1 siblings, 0 replies; 15+ messages in thread
From: Anson Jacob @ 2021-07-19 19:52 UTC (permalink / raw)
To: mpe, benh, paulus, christophe.leroy, linuxppc-dev, amd-gfx
Cc: Sunpeng.Li, Harry.Wentland, qingqing.zhuo, Rodrigo.Siqueira,
roman.li, Anson.Jacob, Aurabindo.Pillai, Bhawanpreet.Lakha,
bindu.r
Use kernel_fpu_begin & kernel_fpu_end for PPC
Depends on "ppc/fpu: Add generic FPU api similar to x86"
Signed-off-by: Anson Jacob <Anson.Jacob@amd.com>
---
drivers/gpu/drm/amd/display/dc/os_types.h | 28 ++---------------------
1 file changed, 2 insertions(+), 26 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/os_types.h b/drivers/gpu/drm/amd/display/dc/os_types.h
index 126c2f3a4dd3..999c5103357e 100644
--- a/drivers/gpu/drm/amd/display/dc/os_types.h
+++ b/drivers/gpu/drm/amd/display/dc/os_types.h
@@ -57,32 +57,8 @@
#define DC_FP_END() kernel_fpu_end()
#elif defined(CONFIG_PPC64)
#include <asm/switch_to.h>
-#include <asm/cputable.h>
-#define DC_FP_START() { \
- if (cpu_has_feature(CPU_FTR_VSX_COMP)) { \
- preempt_disable(); \
- enable_kernel_vsx(); \
- } else if (cpu_has_feature(CPU_FTR_ALTIVEC_COMP)) { \
- preempt_disable(); \
- enable_kernel_altivec(); \
- } else if (!cpu_has_feature(CPU_FTR_FPU_UNAVAILABLE)) { \
- preempt_disable(); \
- enable_kernel_fp(); \
- } \
-}
-#define DC_FP_END() { \
- if (cpu_has_feature(CPU_FTR_VSX_COMP)) { \
- disable_kernel_vsx(); \
- preempt_enable(); \
- } else if (cpu_has_feature(CPU_FTR_ALTIVEC_COMP)) { \
- disable_kernel_altivec(); \
- preempt_enable(); \
- } else if (!cpu_has_feature(CPU_FTR_FPU_UNAVAILABLE)) { \
- disable_kernel_fp(); \
- preempt_enable(); \
- } \
-}
-#endif
+#define DC_FP_START() kernel_fpu_begin()
+#define DC_FP_END() kernel_fpu_end()
#endif
/*
--
2.25.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [RFC 2/2] drm/amd/display: Use PPC FPU functions
@ 2021-07-19 19:52 ` Anson Jacob
0 siblings, 0 replies; 15+ messages in thread
From: Anson Jacob @ 2021-07-19 19:52 UTC (permalink / raw)
To: mpe, benh, paulus, christophe.leroy, linuxppc-dev, amd-gfx
Cc: Sunpeng.Li, Harry.Wentland, qingqing.zhuo, Rodrigo.Siqueira,
roman.li, Anson.Jacob, Aurabindo.Pillai, Bhawanpreet.Lakha,
bindu.r
Use kernel_fpu_begin & kernel_fpu_end for PPC
Depends on "ppc/fpu: Add generic FPU api similar to x86"
Signed-off-by: Anson Jacob <Anson.Jacob@amd.com>
---
drivers/gpu/drm/amd/display/dc/os_types.h | 28 ++---------------------
1 file changed, 2 insertions(+), 26 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/os_types.h b/drivers/gpu/drm/amd/display/dc/os_types.h
index 126c2f3a4dd3..999c5103357e 100644
--- a/drivers/gpu/drm/amd/display/dc/os_types.h
+++ b/drivers/gpu/drm/amd/display/dc/os_types.h
@@ -57,32 +57,8 @@
#define DC_FP_END() kernel_fpu_end()
#elif defined(CONFIG_PPC64)
#include <asm/switch_to.h>
-#include <asm/cputable.h>
-#define DC_FP_START() { \
- if (cpu_has_feature(CPU_FTR_VSX_COMP)) { \
- preempt_disable(); \
- enable_kernel_vsx(); \
- } else if (cpu_has_feature(CPU_FTR_ALTIVEC_COMP)) { \
- preempt_disable(); \
- enable_kernel_altivec(); \
- } else if (!cpu_has_feature(CPU_FTR_FPU_UNAVAILABLE)) { \
- preempt_disable(); \
- enable_kernel_fp(); \
- } \
-}
-#define DC_FP_END() { \
- if (cpu_has_feature(CPU_FTR_VSX_COMP)) { \
- disable_kernel_vsx(); \
- preempt_enable(); \
- } else if (cpu_has_feature(CPU_FTR_ALTIVEC_COMP)) { \
- disable_kernel_altivec(); \
- preempt_enable(); \
- } else if (!cpu_has_feature(CPU_FTR_FPU_UNAVAILABLE)) { \
- disable_kernel_fp(); \
- preempt_enable(); \
- } \
-}
-#endif
+#define DC_FP_START() kernel_fpu_begin()
+#define DC_FP_END() kernel_fpu_end()
#endif
/*
--
2.25.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [RFC 1/2] ppc/fpu: Add generic FPU api similar to x86
2021-07-19 19:52 ` Anson Jacob
@ 2021-07-20 6:04 ` Christoph Hellwig
-1 siblings, 0 replies; 15+ messages in thread
From: Christoph Hellwig @ 2021-07-20 6:04 UTC (permalink / raw)
To: Anson Jacob
Cc: Harry.Wentland, Sunpeng.Li, qingqing.zhuo, Rodrigo.Siqueira,
roman.li, amd-gfx, Bhawanpreet.Lakha, Aurabindo.Pillai, paulus,
linuxppc-dev, bindu.r
On Mon, Jul 19, 2021 at 03:52:10PM -0400, Anson Jacob wrote:
> - Add kernel_fpu_begin & kernel_fpu_end API as x86
> - Add logic similar to x86 to ensure fpu
> begin/end call correctness
> - Add kernel_fpu_enabled to know if FPU is enabled
>
> Signed-off-by: Anson Jacob <Anson.Jacob@amd.com>
All the x86 FPU support is EXPORT_SYMBOL_GPL for a good reason, so
please stick to that.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [RFC 1/2] ppc/fpu: Add generic FPU api similar to x86
@ 2021-07-20 6:04 ` Christoph Hellwig
0 siblings, 0 replies; 15+ messages in thread
From: Christoph Hellwig @ 2021-07-20 6:04 UTC (permalink / raw)
To: Anson Jacob
Cc: Harry.Wentland, Sunpeng.Li, mpe, qingqing.zhuo, Rodrigo.Siqueira,
roman.li, amd-gfx, Bhawanpreet.Lakha, Aurabindo.Pillai, paulus,
christophe.leroy, benh, linuxppc-dev, bindu.r
On Mon, Jul 19, 2021 at 03:52:10PM -0400, Anson Jacob wrote:
> - Add kernel_fpu_begin & kernel_fpu_end API as x86
> - Add logic similar to x86 to ensure fpu
> begin/end call correctness
> - Add kernel_fpu_enabled to know if FPU is enabled
>
> Signed-off-by: Anson Jacob <Anson.Jacob@amd.com>
All the x86 FPU support is EXPORT_SYMBOL_GPL for a good reason, so
please stick to that.
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [RFC 2/2] drm/amd/display: Use PPC FPU functions
2021-07-19 19:52 ` Anson Jacob
@ 2021-07-20 6:06 ` Christoph Hellwig
-1 siblings, 0 replies; 15+ messages in thread
From: Christoph Hellwig @ 2021-07-20 6:06 UTC (permalink / raw)
To: Anson Jacob
Cc: Harry.Wentland, Sunpeng.Li, qingqing.zhuo, Rodrigo.Siqueira,
roman.li, amd-gfx, Bhawanpreet.Lakha, Aurabindo.Pillai, paulus,
linuxppc-dev, bindu.r
> #define DC_FP_END() kernel_fpu_end()
> #elif defined(CONFIG_PPC64)
> #include <asm/switch_to.h>
> +#define DC_FP_START() kernel_fpu_begin()
> +#define DC_FP_END() kernel_fpu_end()
> #endif
Please use the same header as x86 in your first patch and then kill
this ifdefered and the DC_FP_START/DC_FP_END definitions entirely.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [RFC 2/2] drm/amd/display: Use PPC FPU functions
@ 2021-07-20 6:06 ` Christoph Hellwig
0 siblings, 0 replies; 15+ messages in thread
From: Christoph Hellwig @ 2021-07-20 6:06 UTC (permalink / raw)
To: Anson Jacob
Cc: Harry.Wentland, Sunpeng.Li, mpe, qingqing.zhuo, Rodrigo.Siqueira,
roman.li, amd-gfx, Bhawanpreet.Lakha, Aurabindo.Pillai, paulus,
christophe.leroy, benh, linuxppc-dev, bindu.r
> #define DC_FP_END() kernel_fpu_end()
> #elif defined(CONFIG_PPC64)
> #include <asm/switch_to.h>
> +#define DC_FP_START() kernel_fpu_begin()
> +#define DC_FP_END() kernel_fpu_end()
> #endif
Please use the same header as x86 in your first patch and then kill
this ifdefered and the DC_FP_START/DC_FP_END definitions entirely.
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [RFC 0/2] Add generic FPU api similar to x86
2021-07-19 19:52 ` Anson Jacob
@ 2021-07-20 6:17 ` Christian König
-1 siblings, 0 replies; 15+ messages in thread
From: Christian König @ 2021-07-20 6:17 UTC (permalink / raw)
To: Anson Jacob, mpe, benh, paulus, christophe.leroy, linuxppc-dev, amd-gfx
Cc: Sunpeng.Li, Bhawanpreet.Lakha, qingqing.zhuo, Rodrigo.Siqueira,
roman.li, Aurabindo.Pillai, Harry.Wentland, bindu.r
While you already CCed a bunch of people stuff like that needs to go to
the appropriate mailing list and not just amd-gfx.
Especially LKML so that other core devs can take a look as well.
Regards,
Christian.
Am 19.07.21 um 21:52 schrieb Anson Jacob:
> This is an attempt to have generic FPU enable/disable
> calls similar to x86.
> So that we can simplify gpu/drm/amd/display/dc/os_types.h
>
> Also adds FPU correctness logic seen in x86.
>
> Anson Jacob (2):
> ppc/fpu: Add generic FPU api similar to x86
> drm/amd/display: Use PPC FPU functions
>
> arch/powerpc/include/asm/switch_to.h | 29 ++---
> arch/powerpc/kernel/process.c | 130 ++++++++++++++++++++++
> drivers/gpu/drm/amd/display/dc/os_types.h | 28 +----
> 3 files changed, 139 insertions(+), 48 deletions(-)
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [RFC 0/2] Add generic FPU api similar to x86
@ 2021-07-20 6:17 ` Christian König
0 siblings, 0 replies; 15+ messages in thread
From: Christian König @ 2021-07-20 6:17 UTC (permalink / raw)
To: Anson Jacob, mpe, benh, paulus, christophe.leroy, linuxppc-dev, amd-gfx
Cc: Sunpeng.Li, Bhawanpreet.Lakha, qingqing.zhuo, Rodrigo.Siqueira,
roman.li, Aurabindo.Pillai, Harry.Wentland, bindu.r
While you already CCed a bunch of people stuff like that needs to go to
the appropriate mailing list and not just amd-gfx.
Especially LKML so that other core devs can take a look as well.
Regards,
Christian.
Am 19.07.21 um 21:52 schrieb Anson Jacob:
> This is an attempt to have generic FPU enable/disable
> calls similar to x86.
> So that we can simplify gpu/drm/amd/display/dc/os_types.h
>
> Also adds FPU correctness logic seen in x86.
>
> Anson Jacob (2):
> ppc/fpu: Add generic FPU api similar to x86
> drm/amd/display: Use PPC FPU functions
>
> arch/powerpc/include/asm/switch_to.h | 29 ++---
> arch/powerpc/kernel/process.c | 130 ++++++++++++++++++++++
> drivers/gpu/drm/amd/display/dc/os_types.h | 28 +----
> 3 files changed, 139 insertions(+), 48 deletions(-)
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [RFC 1/2] ppc/fpu: Add generic FPU api similar to x86
2021-07-19 19:52 ` Anson Jacob
(?)
(?)
@ 2021-07-20 19:30 ` kernel test robot
-1 siblings, 0 replies; 15+ messages in thread
From: kernel test robot @ 2021-07-20 19:30 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2046 bytes --]
Hi Anson,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on powerpc/next]
[also build test ERROR on linus/master v5.14-rc2 next-20210720]
[cannot apply to paulus-powerpc/kvm-ppc-next]
[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]
url: https://github.com/0day-ci/linux/commits/Anson-Jacob/Add-generic-FPU-api-similar-to-x86/20210720-143354
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-stx_gp3_defconfig (attached as .config)
compiler: powerpc-linux-gcc (GCC) 10.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/5cd65b03db50b99961fa08fdc6aa8ca919cb05d4
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Anson-Jacob/Add-generic-FPU-api-similar-to-x86/20210720-143354
git checkout 5cd65b03db50b99961fa08fdc6aa8ca919cb05d4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
arch/powerpc/kernel/process.c: In function 'kernel_fpu_end':
>> arch/powerpc/kernel/process.c:534:1: error: label 'done' defined but not used [-Werror=unused-label]
534 | done:
| ^~~~
cc1: all warnings being treated as errors
vim +/done +534 arch/powerpc/kernel/process.c
533
> 534 done:
535 preempt_enable();
536 }
537 EXPORT_SYMBOL_GPL(kernel_fpu_end);
538
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 17930 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [RFC 2/2] drm/amd/display: Use PPC FPU functions
2021-07-19 19:52 ` Anson Jacob
(?)
(?)
@ 2021-07-20 23:00 ` kernel test robot
-1 siblings, 0 replies; 15+ messages in thread
From: kernel test robot @ 2021-07-20 23:00 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 23598 bytes --]
Hi Anson,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on powerpc/next]
[also build test ERROR on linus/master v5.14-rc2 next-20210720]
[cannot apply to paulus-powerpc/kvm-ppc-next]
[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]
url: https://github.com/0day-ci/linux/commits/Anson-Jacob/Add-generic-FPU-api-similar-to-x86/20210720-143354
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: alpha-buildonly-randconfig-r002-20210720 (attached as .config)
compiler: alpha-linux-gcc (GCC) 10.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/46ec3bc66107042f3b73b08f66d88f233c86f8f3
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Anson-Jacob/Add-generic-FPU-api-similar-to-x86/20210720-143354
git checkout 46ec3bc66107042f3b73b08f66d88f233c86f8f3
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=alpha SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:29,
from drivers/gpu/drm/amd/amdgpu/../include/dm_pp_interface.h:26,
from drivers/gpu/drm/amd/amdgpu/amdgpu.h:66,
from drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c:29:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:27: error: unterminated #ifndef
27 | #ifndef _OS_TYPES_H_
|
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:32,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/amdgpu/../include/dm_pp_interface.h:26,
from drivers/gpu/drm/amd/amdgpu/amdgpu.h:66,
from drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c:29:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:27: error: unterminated #ifndef
27 | #ifndef _OS_TYPES_H_
|
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:33,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/amdgpu/../include/dm_pp_interface.h:26,
from drivers/gpu/drm/amd/amdgpu/amdgpu.h:66,
from drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c:29:
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h: In function 'dc_fixpt_shl':
>> drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:212:2: error: implicit declaration of function 'ASSERT' [-Werror=implicit-function-declaration]
212 | ASSERT(((arg.value >= 0) && (arg.value <= LLONG_MAX >> shift)) ||
| ^~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/irq_types.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:34,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/amdgpu/../include/dm_pp_interface.h:26,
from drivers/gpu/drm/amd/amdgpu/amdgpu.h:66,
from drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c:29:
drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h: At top level:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:27: error: unterminated #ifndef
27 | #ifndef _OS_TYPES_H_
|
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dp_types.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:35,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/amdgpu/../include/dm_pp_interface.h:26,
from drivers/gpu/drm/amd/amdgpu/amdgpu.h:66,
from drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c:29:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:27: error: unterminated #ifndef
27 | #ifndef _OS_TYPES_H_
|
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_hw_types.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:36,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/amdgpu/../include/dm_pp_interface.h:26,
from drivers/gpu/drm/amd/amdgpu/amdgpu.h:66,
from drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c:29:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:27: error: unterminated #ifndef
27 | #ifndef _OS_TYPES_H_
|
cc1: some warnings being treated as errors
--
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:29:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:27: error: unterminated #ifndef
27 | #ifndef _OS_TYPES_H_
|
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:32,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:29:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:27: error: unterminated #ifndef
27 | #ifndef _OS_TYPES_H_
|
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:33,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:29:
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h: In function 'dc_fixpt_shl':
>> drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:212:2: error: implicit declaration of function 'ASSERT' [-Werror=implicit-function-declaration]
212 | ASSERT(((arg.value >= 0) && (arg.value <= LLONG_MAX >> shift)) ||
| ^~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/irq_types.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:34,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:29:
drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h: At top level:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:27: error: unterminated #ifndef
27 | #ifndef _OS_TYPES_H_
|
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dp_types.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:35,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:29:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:27: error: unterminated #ifndef
27 | #ifndef _OS_TYPES_H_
|
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_hw_types.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:36,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:29:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:27: error: unterminated #ifndef
27 | #ifndef _OS_TYPES_H_
|
In file included from drivers/gpu/drm/amd/amdgpu/../display/include/logger_types.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dc.h:31,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:30:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:27: error: unterminated #ifndef
27 | #ifndef _OS_TYPES_H_
|
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/inc/hw/hw_shared.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/inc/hw/opp.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dc.h:38,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:30:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:27: error: unterminated #ifndef
27 | #ifndef _OS_TYPES_H_
|
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:37:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:27: error: unterminated #ifndef
27 | #ifndef _OS_TYPES_H_
|
In file included from drivers/gpu/drm/amd/amdgpu/../display/modules/inc/mod_hdcp.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_hdcp.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:49:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:27: error: unterminated #ifndef
27 | #ifndef _OS_TYPES_H_
|
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 'amdgpu_dm_atomic_commit_tail':
>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:8983:5: error: implicit declaration of function 'DC_ERR'; did you mean 'IS_ERR'? [-Werror=implicit-function-declaration]
8983 | DC_ERR("got no status for stream %p on acrtc%p\n", dm_new_crtc_state->stream, acrtc);
| ^~~~~~
| IS_ERR
cc1: some warnings being treated as errors
--
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_irq.c:26:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:27: error: unterminated #ifndef
27 | #ifndef _OS_TYPES_H_
|
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:32,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_irq.c:26:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:27: error: unterminated #ifndef
27 | #ifndef _OS_TYPES_H_
|
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:33,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_irq.c:26:
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h: In function 'dc_fixpt_shl':
>> drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:212:2: error: implicit declaration of function 'ASSERT' [-Werror=implicit-function-declaration]
212 | ASSERT(((arg.value >= 0) && (arg.value <= LLONG_MAX >> shift)) ||
| ^~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/irq_types.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:34,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_irq.c:26:
drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h: At top level:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:27: error: unterminated #ifndef
27 | #ifndef _OS_TYPES_H_
|
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dp_types.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:35,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_irq.c:26:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:27: error: unterminated #ifndef
27 | #ifndef _OS_TYPES_H_
|
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_hw_types.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:36,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_irq.c:26:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:27: error: unterminated #ifndef
27 | #ifndef _OS_TYPES_H_
|
In file included from drivers/gpu/drm/amd/amdgpu/../display/include/logger_types.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dc.h:31,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_irq.c:27:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:27: error: unterminated #ifndef
27 | #ifndef _OS_TYPES_H_
|
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/inc/hw/hw_shared.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/inc/hw/opp.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dc.h:38,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_irq.c:27:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:27: error: unterminated #ifndef
27 | #ifndef _OS_TYPES_H_
|
cc1: some warnings being treated as errors
--
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h:35,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:29:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:27: error: unterminated #ifndef
27 | #ifndef _OS_TYPES_H_
|
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:32,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h:35,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:29:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:27: error: unterminated #ifndef
27 | #ifndef _OS_TYPES_H_
|
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:33,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h:35,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:29:
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h: In function 'dc_fixpt_shl':
>> drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:212:2: error: implicit declaration of function 'ASSERT' [-Werror=implicit-function-declaration]
212 | ASSERT(((arg.value >= 0) && (arg.value <= LLONG_MAX >> shift)) ||
| ^~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/irq_types.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:34,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h:35,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:29:
drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h: At top level:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:27: error: unterminated #ifndef
27 | #ifndef _OS_TYPES_H_
|
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dp_types.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:35,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h:35,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:29:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:27: error: unterminated #ifndef
27 | #ifndef _OS_TYPES_H_
|
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_hw_types.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:36,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h:35,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:29:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:27: error: unterminated #ifndef
27 | #ifndef _OS_TYPES_H_
|
In file included from drivers/gpu/drm/amd/amdgpu/../display/include/logger_types.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/include/logger_interface.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h:36,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:29:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:27: error: unterminated #ifndef
27 | #ifndef _OS_TYPES_H_
|
cc1: some warnings being treated as errors
--
In file included from drivers/gpu/drm/amd/amdgpu/../display/modules/inc/mod_hdcp.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_hdcp.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_hdcp.c:26:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:27: error: unterminated #ifndef
27 | #ifndef _OS_TYPES_H_
|
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:32,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dc.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_hdcp.h:31,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_hdcp.c:26:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:27: error: unterminated #ifndef
27 | #ifndef _OS_TYPES_H_
|
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:33,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dc.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_hdcp.h:31,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_hdcp.c:26:
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h: In function 'dc_fixpt_shl':
>> drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:212:2: error: implicit declaration of function 'ASSERT' [-Werror=implicit-function-declaration]
212 | ASSERT(((arg.value >= 0) && (arg.value <= LLONG_MAX >> shift)) ||
| ^~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/irq_types.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:34,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dc.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_hdcp.h:31,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_hdcp.c:26:
drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h: At top level:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:27: error: unterminated #ifndef
27 | #ifndef _OS_TYPES_H_
|
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dp_types.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:35,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dc.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_hdcp.h:31,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_hdcp.c:26:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:27: error: unterminated #ifndef
27 | #ifndef _OS_TYPES_H_
|
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_hw_types.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:36,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dc.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_hdcp.h:31,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_hdcp.c:26:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:27: error: unterminated #ifndef
27 | #ifndef _OS_TYPES_H_
|
In file included from drivers/gpu/drm/amd/amdgpu/../display/include/logger_types.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dc.h:31,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_hdcp.h:31,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_hdcp.c:26:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:27: error: unterminated #ifndef
27 | #ifndef _OS_TYPES_H_
|
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/inc/hw/hw_shared.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/inc/hw/opp.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dc.h:38,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_hdcp.h:31,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_hdcp.c:26:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:27: error: unterminated #ifndef
27 | #ifndef _OS_TYPES_H_
|
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h:35,
from drivers/gpu/drm/amd/amdgpu/../display/include/bios_parser_types.h:30,
from drivers/gpu/drm/amd/amdgpu/../display/dc/inc/clock_source.h:31,
from drivers/gpu/drm/amd/amdgpu/../display/dc/inc/hw_sequencer.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dc.h:40,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_hdcp.h:31,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_hdcp.c:26:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:27: error: unterminated #ifndef
27 | #ifndef _OS_TYPES_H_
|
cc1: some warnings being treated as errors
..
vim +27 drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h
4562236b3bc0a2 Harry Wentland 2017-09-12 @27 #ifndef _OS_TYPES_H_
4562236b3bc0a2 Harry Wentland 2017-09-12 28 #define _OS_TYPES_H_
4562236b3bc0a2 Harry Wentland 2017-09-12 29
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 33480 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [RFC 0/2] Add generic FPU api similar to x86
2021-07-19 19:52 ` Anson Jacob
` (3 preceding siblings ...)
(?)
@ 2022-03-02 16:00 ` Christophe Leroy
-1 siblings, 0 replies; 15+ messages in thread
From: Christophe Leroy @ 2022-03-02 16:00 UTC (permalink / raw)
To: Anson Jacob, mpe, benh, paulus, linuxppc-dev, amd-gfx
Cc: Sunpeng.Li, Harry.Wentland, qingqing.zhuo, Rodrigo.Siqueira,
roman.li, Aurabindo.Pillai, Bhawanpreet.Lakha, bindu.r
Le 19/07/2021 à 21:52, Anson Jacob a écrit :
> This is an attempt to have generic FPU enable/disable
> calls similar to x86.
> So that we can simplify gpu/drm/amd/display/dc/os_types.h
Seems like gpu/drm/amd/display/dc/os_types.h has been simplified through
another way via commit 96ee63730fa3 ("drm/amd/display: Add control
mechanism for FPU")
Are powerpc changes in patch 1 still relevant ? In that case please rebase.
>
> Also adds FPU correctness logic seen in x86.
>
> Anson Jacob (2):
> ppc/fpu: Add generic FPU api similar to x86
> drm/amd/display: Use PPC FPU functions
>
> arch/powerpc/include/asm/switch_to.h | 29 ++---
> arch/powerpc/kernel/process.c | 130 ++++++++++++++++++++++
> drivers/gpu/drm/amd/display/dc/os_types.h | 28 +----
> 3 files changed, 139 insertions(+), 48 deletions(-)
>
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2022-03-02 16:01 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-19 19:52 [RFC 0/2] Add generic FPU api similar to x86 Anson Jacob
2021-07-19 19:52 ` Anson Jacob
2021-07-19 19:52 ` [RFC 1/2] ppc/fpu: " Anson Jacob
2021-07-19 19:52 ` Anson Jacob
2021-07-20 6:04 ` Christoph Hellwig
2021-07-20 6:04 ` Christoph Hellwig
2021-07-20 19:30 ` kernel test robot
2021-07-19 19:52 ` [RFC 2/2] drm/amd/display: Use PPC FPU functions Anson Jacob
2021-07-19 19:52 ` Anson Jacob
2021-07-20 6:06 ` Christoph Hellwig
2021-07-20 6:06 ` Christoph Hellwig
2021-07-20 23:00 ` kernel test robot
2021-07-20 6:17 ` [RFC 0/2] Add generic FPU api similar to x86 Christian König
2021-07-20 6:17 ` Christian König
2022-03-02 16:00 ` Christophe Leroy
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.