[PATCH] um: enable the use of optimized xor routines in UML
Johannes Berg
johannes at sipsolutions.net
Wed Nov 11 11:43:34 EST 2020
On Wed, 2020-11-11 at 15:01 +0000, anton.ivanov at cambridgegreys.com
wrote:
>
> +++ b/arch/um/include/asm/xor.h
> @@ -1,7 +1,22 @@
> /* SPDX-License-Identifier: GPL-2.0 */
> -#include <asm-generic/xor.h>
> +#ifndef _ASM_UM_XOR_H
> +#define _ASM_UM_XOR_H
> +
> +#ifdef CONFIG_64BIT
> +#undef CONFIG_X86_32
> +#else
> +#define CONFIG_X86_32 "Y"
> +#endif
Should that be '1' instead of '"Y"' to match what gets into the kernel's
autoconf.h, i.e. just '#define CONFIG_X86_32 1'?
Probably just used with #ifdef, but still, the string looks odd.
> +++ b/arch/um/kernel/um_arch.c
> @@ -48,9 +48,16 @@ static void __init add_arg(char *arg)
> */
> struct cpuinfo_um boot_cpu_data = {
> .loops_per_jiffy = 0,
> - .ipi_pipe = { -1, -1 }
> + .ipi_pipe = { -1, -1 },
> + .host_features = 0
Don't _really_ need to 0-initialize, but also doesn't hurt :)
Might want to add a , at the end to make the next change easier.
> +const char* host_cpu_feature_names[] = {"mmx", "xmm", "avx", "rep_good", "erms"};
> +#define MAX_UM_CPU_FEATURES 5
Why the define rather than ARRAY_SIZE()?
johannes
More information about the linux-um
mailing list