File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ impl RdRand {
1010 pub fn new ( ) -> Option < Self > {
1111 // RDRAND support indicated by CPUID page 01h, ecx bit 30
1212 // https://en.wikipedia.org/wiki/RdRand#Overview
13+ #[ allow( unused_unsafe) ]
1314 let cpuid = unsafe { core:: arch:: x86_64:: __cpuid ( 0x1 ) } ;
1415 if cpuid. ecx & ( 1 << 30 ) != 0 {
1516 Some ( RdRand ( ( ) ) )
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ impl Smap {
3535 /// CR4.
3636 pub fn new ( ) -> Option < Self > {
3737 // Check if the CPU supports `stac` and `clac`.
38+ #[ allow( unused_unsafe) ]
3839 let cpuid = unsafe { core:: arch:: x86_64:: __cpuid ( 7 ) } ;
3940 if cpuid. ebx . get_bit ( 20 ) {
4041 Some ( Self ( ( ) ) )
Original file line number Diff line number Diff line change @@ -160,6 +160,7 @@ impl Invlpgb {
160160 assert_eq ! ( cs. rpl( ) , PrivilegeLevel :: Ring0 ) ;
161161
162162 // Check if the `INVLPGB` and `TLBSYNC` instruction are supported.
163+ #[ allow( unused_unsafe) ]
163164 let cpuid = unsafe { core:: arch:: x86_64:: __cpuid ( 0x8000_0008 ) } ;
164165 if !cpuid. ebx . get_bit ( 3 ) {
165166 return None ;
@@ -169,6 +170,7 @@ impl Invlpgb {
169170 let invlpgb_count_max = cpuid. edx . get_bits ( 0 ..=15 ) as u16 ;
170171
171172 // Figure out the number of supported ASIDs.
173+ #[ allow( unused_unsafe) ]
172174 let cpuid = unsafe { core:: arch:: x86_64:: __cpuid ( 0x8000_000a ) } ;
173175 let nasid = cpuid. ebx ;
174176
You can’t perform that action at this time.
0 commit comments