Browse Source

LoongArch64: Temporarily disable LASX and LSX optimization by default

pull/3723/head
gxw 3 years ago
parent
commit
26eee97b38
2 changed files with 24 additions and 4 deletions
  1. +12
    -2
      cpuid_loongarch64.c
  2. +12
    -2
      driver/others/dynamic_loongarch64.c

+ 12
- 2
cpuid_loongarch64.c View File

@@ -230,14 +230,24 @@ int detect(void) {
switch (prid & PRID_SERIES_MASK) {
case (PRID_SERIES_LA464):
if (support_lasx())
return CPU_LA464;
/* TODO: Temporarily disable LASX optimization by default.
* When other upstream like kernel and gcc support LASX,
* return CPU_LA464.
*/
//return CPU_LA464;
return CPU_GENERIC;
else
return CPU_GENERIC;
break;

case (PRID_SERIES_LA264):
if (support_lsx())
return CPU_LA264;
/* TODO: Temporarily disable LSX optimization by default.
* When other upstream like kernel and gcc support LSX,
* return CPU_LA264.
*/
//return CPU_LA264;
return CPU_GENERIC;
else
return CPU_GENERIC;
break;


+ 12
- 2
driver/others/dynamic_loongarch64.c View File

@@ -124,14 +124,24 @@ static gotoblas_t *get_coretype(void) {
switch (prid & PRID_SERIES_MASK) {
case (PRID_SERIES_LA464):
if (support_lasx())
return &gotoblas_LA464;
/* TODO: Temporarily disable LASX optimization by default.
* When other upstream like kernel and gcc support LASX,
* return &gotoblas_LA464.
*/
//return &gotoblas_LA464;
return &gotoblas_LA64_GENERIC;
else
return &gotoblas_LA64_GENERIC;
break;

case (PRID_SERIES_LA264):
if (support_lsx())
return &gotoblas_LA264;
/* TODO: Temporarily disable LSX optimization by default.
* When other upstream like kernel and gcc support LSX,
* return &gotoblas_LA264.
*/
//return &gotoblas_LA264;
return &gotoblas_LA64_GENERIC;
else
return &gotoblas_LA64_GENERIC;
break;


Loading…
Cancel
Save