diff --git a/arch/loongarch/include/asm/percpu.h b/arch/loongarch/include/asm/percpu.h index b9f567e6601668..6d359859db40c1 100644 --- a/arch/loongarch/include/asm/percpu.h +++ b/arch/loongarch/include/asm/percpu.h @@ -15,7 +15,11 @@ */ #if defined(MODULE) && defined(CONFIG_AS_HAS_EXPLICIT_RELOCS) # if __has_attribute(model) -# define PER_CPU_ATTRIBUTES __attribute__((model("extreme"))) +# ifdef __clang__ +# define PER_CPU_ATTRIBUTES __attribute__((model("large"))) +# else +# define PER_CPU_ATTRIBUTES __attribute__((model("extreme"))) +# endif # else # error compiler support for the model attribute is necessary when a recent assembler is used # endif