[PATCH v3 11/13] crypto: hisilicon/sec2: Remove check of CONFIG_CPU_LITTLE_ENDIAN
liulongfang
liulongfang at huawei.com
Wed Sep 23 00:04:11 PDT 2026
On 2026/9/18 22:52, Will Deacon wrote:
> The hisilicon "sec" driver targets arm64 but can be compile-tested on
> other 64-bit architectures. In preparation for removing the definition
> of CONFIG_CPU_LITTLE_ENDIAN for arm64 (since it will be little-endian
> only), invert the check in sec_set_endian() so that it behaves as
> little-endian by default.
>
> Cc: Chenghai Huang <huangchenghai2 at huawei.com>
> Cc: Weili Qian <qianweili at huawei.com>
> Cc: Zaibo Xu <xuzaibo at huawei.com>
> Cc: Longfang Liu <liulongfang at huawei.com>
> Cc: Kai Ye <yekai13 at huawei.com>
> Cc: Wei Zhang <zhangwei375 at huawei.com>
> Signed-off-by: Will Deacon <will at kernel.org>
> ---
> drivers/crypto/hisilicon/sec2/sec_main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/crypto/hisilicon/sec2/sec_main.c b/drivers/crypto/hisilicon/sec2/sec_main.c
> index 752565200c16..03523cfbb28e 100644
> --- a/drivers/crypto/hisilicon/sec2/sec_main.c
> +++ b/drivers/crypto/hisilicon/sec2/sec_main.c
> @@ -484,7 +484,7 @@ static void sec_set_endian(struct hisi_qm *qm)
> if (!IS_ENABLED(CONFIG_64BIT))
> reg |= BIT(1);
>
> - if (!IS_ENABLED(CONFIG_CPU_LITTLE_ENDIAN))
> + if (IS_ENABLED(CONFIG_CPU_BIG_ENDIAN))
> reg |= BIT(0);
>
Reviewed-by: Longfang Liu <liulongfang at huawei.com>
Thanks.
> writel_relaxed(reg, qm->io_base + SEC_CONTROL_REG);
>
More information about the linux-arm-kernel
mailing list