File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
arch/x86/kernel/cpu/resctrl Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,8 @@ static const struct class pseudo_lock_class = {
84
84
*/
85
85
u64 resctrl_arch_get_prefetch_disable_bits (void )
86
86
{
87
+ prefetch_disable_bits = 0 ;
88
+
87
89
if (boot_cpu_data .x86_vendor != X86_VENDOR_INTEL ||
88
90
boot_cpu_data .x86 != 6 )
89
91
return 0 ;
@@ -99,7 +101,8 @@ u64 resctrl_arch_get_prefetch_disable_bits(void)
99
101
* 3 DCU IP Prefetcher Disable (R/W)
100
102
* 63:4 Reserved
101
103
*/
102
- return 0xF ;
104
+ prefetch_disable_bits = 0xF ;
105
+ break ;
103
106
case INTEL_ATOM_GOLDMONT :
104
107
case INTEL_ATOM_GOLDMONT_PLUS :
105
108
/*
@@ -110,10 +113,11 @@ u64 resctrl_arch_get_prefetch_disable_bits(void)
110
113
* 2 DCU Hardware Prefetcher Disable (R/W)
111
114
* 63:3 Reserved
112
115
*/
113
- return 0x5 ;
116
+ prefetch_disable_bits = 0x5 ;
117
+ break ;
114
118
}
115
119
116
- return 0 ;
120
+ return prefetch_disable_bits ;
117
121
}
118
122
119
123
/**
@@ -713,8 +717,7 @@ int rdtgroup_locksetup_enter(struct rdtgroup *rdtgrp)
713
717
* Not knowing the bits to disable prefetching implies that this
714
718
* platform does not support Cache Pseudo-Locking.
715
719
*/
716
- prefetch_disable_bits = resctrl_arch_get_prefetch_disable_bits ();
717
- if (prefetch_disable_bits == 0 ) {
720
+ if (resctrl_arch_get_prefetch_disable_bits () == 0 ) {
718
721
rdt_last_cmd_puts ("Pseudo-locking not supported\n" );
719
722
return - EINVAL ;
720
723
}
You can’t perform that action at this time.
0 commit comments