• Home
  • Engineering
  • Training
  • Docs
  • Community
  • Company
  • twitter
  • mastodon
  • linkedin
  • github

Bootlin logo

Elixir Cross Referencer

Open Menu / lib / raid / raid6 / loongarch / pq_arch.h

Projects

  • linux

Versions

  • FIXME
    • FIXME
      • next-20260811
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* SPDX-License-Identifier: GPL-2.0-or-later */

#include <asm/cpu-features.h>

extern const struct raid6_calls raid6_lsx;
extern const struct raid6_calls raid6_lasx;

extern const struct raid6_recov_calls raid6_recov_lsx;
extern const struct raid6_recov_calls raid6_recov_lasx;

static __always_inline void __init arch_raid6_init(void)
{
	raid6_algo_add_default();
	if (IS_ENABLED(CONFIG_CPU_HAS_LSX) && cpu_has_lsx)
		raid6_algo_add(&raid6_lsx);
	if (IS_ENABLED(CONFIG_CPU_HAS_LASX) && cpu_has_lasx)
		raid6_algo_add(&raid6_lasx);

	if (IS_ENABLED(CONFIG_CPU_HAS_LASX) && cpu_has_lasx)
		raid6_recov_algo_add(&raid6_recov_lasx);
	else if (IS_ENABLED(CONFIG_CPU_HAS_LSX) && cpu_has_lsx)
		raid6_recov_algo_add(&raid6_recov_lsx);
}
linux next-20260811 Download file Top powered by Elixir a26ba81