Skip to content

Commit e2d3b15

Browse files
authored
Merge pull request #1233 from martin-frbg/cpuid-fix
Fix unintentional fall-through cases in get_cacheinfo
2 parents d5ef0de + 4a012c3 commit e2d3b15

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

cpuid_x86.c

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -637,12 +637,13 @@ int get_cacheinfo(int type, cache_info_t *cacheinfo){
637637
LD1.linesize = 64;
638638
break;
639639
case 0x63 :
640-
DTB.size = 2048;
641-
DTB.associative = 4;
642-
DTB.linesize = 32;
643-
LDTB.size = 4096;
644-
LDTB.associative= 4;
645-
LDTB.linesize = 32;
640+
DTB.size = 2048;
641+
DTB.associative = 4;
642+
DTB.linesize = 32;
643+
LDTB.size = 4096;
644+
LDTB.associative= 4;
645+
LDTB.linesize = 32;
646+
break;
646647
case 0x66 :
647648
LD1.size = 8;
648649
LD1.associative = 4;
@@ -675,12 +676,13 @@ int get_cacheinfo(int type, cache_info_t *cacheinfo){
675676
LC1.associative = 8;
676677
break;
677678
case 0x76 :
678-
ITB.size = 2048;
679-
ITB.associative = 0;
680-
ITB.linesize = 8;
681-
LITB.size = 4096;
682-
LITB.associative= 0;
683-
LITB.linesize = 8;
679+
ITB.size = 2048;
680+
ITB.associative = 0;
681+
ITB.linesize = 8;
682+
LITB.size = 4096;
683+
LITB.associative= 0;
684+
LITB.linesize = 8;
685+
break;
684686
case 0x77 :
685687
LC1.size = 16;
686688
LC1.associative = 4;

0 commit comments

Comments
 (0)