On 2024/03/11 18:08, Tang Yulong wrote:
Hi, Kazu:
> On 2024/03/01 17:48, Tao Liu wrote:
>
> hmm, as far as I know, not many kernels are configured with
> CONFIG_IKCONFIG=y, e.g. RHEL kernels don't have it. so if it depends
> only on ikconfig, it will not work on many kernels.
>
Thank you for the correction.
> It's good to use ikconfig, but isn't there any other way?
>
> For example, it looks like it's always set to y on x86. so maybe we can
> have a default value depending on architecture, for no ikconfig kernels.
>
> config X86
> ...
> select HAVE_EFFICIENT_UNALIGNED_ACCESS
>
> Thanks,
> Kazu
Yes, it seems that some architectures have this configuration enabled by default, such as
ARM, ARM64, and X86. These are also commonly used architectures.
So setting the default to CONFIG_Y for these architectures and CONFIG_N for others. Then,
we can check whether IKCONFIG is enabled to retrieve the actual value. Do you think this
is acceptable?
like this:
- bool efficient_unaligned_access =
(get_kernel_config("CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS", NULL) ==
IKCONFIG_Y);
+ bool efficient_unaligned_access;
+
+#if defined(ARM) || defined(ARM64) || defined(X86)
+ efficient_unaligned_access = true;
Yes. Looking at arch/*/Kconfig, it looks like the following
architectures will have 'y' IIUC, please use these.
X86, X86_64, ARM, ARM64, PPC, PPC64, S390, S390X
(LOONGARCH64 and RISCV64 can have 'n' depending on configs.)
With respect to lzo-rle user library, Tao is asking the kernel
developers. (Thanks Tao)
Thanks,
Kazu
> +#else
> + efficient_unaligned_access = false;
> +#endif
> +
> + if (kt->ikconfig_flags & IKCONFIG_AVAIL)
> + efficient_unaligned_access =
(get_kernel_config("CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS", NULL) ==
IKCONFIG_Y);
>
> Thanks,
> Yulong
> --
> Crash-utility mailing list -- devel(a)lists.crash-utility.osci.io
> To unsubscribe send an email to devel-leave(a)lists.crash-utility.osci.io
> https://${domain_name}/admin/lists/devel.lists.crash-utility.osci.io/
> Contribution Guidelines:
https://github.com/crash-utility/crash/wiki