lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9094cea1-602e-6e71-4ff7-c06fd04af6c5@amd.com>
Date:   Wed, 21 Jul 2021 08:29:43 +0200
From:   Christian König <christian.koenig@....com>
To:     Anson Jacob <Anson.Jacob@....com>, mpe@...erman.id.au,
        benh@...nel.crashing.org, paulus@...ba.org,
        christophe.leroy@...roup.eu, linuxppc-dev@...ts.ozlabs.org,
        amd-gfx@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Cc:     Harry.Wentland@....com, Sunpeng.Li@....com,
        Bhawanpreet.Lakha@....com, Rodrigo.Siqueira@....com,
        Aurabindo.Pillai@....com, qingqing.zhuo@....com, bindu.r@....com,
        roman.li@....com, Christoph Hellwig <hch@...radead.org>
Subject: Re: [RFC v2 2/2] drm/amd/display: Use PPC FPU functions

Am 21.07.21 um 06:48 schrieb Anson Jacob:
> Use kernel_fpu_begin & kernel_fpu_end for PPC
>
> Depends on "ppc/fpu: Add generic FPU api similar to x86"
>
> v2:
> - Got rid of macro switch for PPC as header file with same
>    name as x86 is added by previous patch in the series
>
> Signed-off-by: Anson Jacob <Anson.Jacob@....com>
> CC: Christoph Hellwig <hch@...radead.org>
> CC: Rodrigo Siqueira <Rodrigo.Siqueira@....com>
> CC: Harry Wentland <harry.wentland@....com>
> CC: Christian König <christian.koenig@....com>

Looks good in general, but question is what about other architectures 
like ARM?

Regards,
Christian.

> ---
>   drivers/gpu/drm/amd/display/dc/os_types.h | 29 -----------------------
>   1 file changed, 29 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..47ef434f93d8 100644
> --- a/drivers/gpu/drm/amd/display/dc/os_types.h
> +++ b/drivers/gpu/drm/amd/display/dc/os_types.h
> @@ -51,38 +51,9 @@
>   #define dm_error(fmt, ...) DRM_ERROR(fmt, ##__VA_ARGS__)
>   
>   #if defined(CONFIG_DRM_AMD_DC_DCN)
> -#if defined(CONFIG_X86)
>   #include <asm/fpu/api.h>
>   #define DC_FP_START() kernel_fpu_begin()
>   #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
>   #endif
>   
>   /*

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ