On 24/08/2017 17:23, Yu Zhang wrote:
Is there any case where e < s? I can see that MAXPHYADDR=63 givesSorry? I do not quite understand. When will e = s - 1?static inline u64 rsvd_bits(int s, int e)e = s - 1 is already supported; why do you need e <= s - 2?
{
+ if (e < s)
+ return 0;
+
return ((1ULL << (e - s + 1)) - 1) << s;
}
rsvd_bits(63, 62), but that works.
In practice, MAXPHYADDR will never be 59 even because the PKRU bits are
at bits 59..62.
Paolo