On Fri, 10 Nov 2017, Dave Hansen wrote: > > +/* There are 12 bits of space for ASIDS in CR3 */ > +#define CR3_HW_ASID_BITS 12 > +/* When enabled, KAISER consumes a single bit for user/kernel switches */ > +#define KAISER_CONSUMED_ASID_BITS 0 > + > +#define CR3_AVAIL_ASID_BITS (CR3_HW_ASID_BITS-KAISER_CONSUMED_ASID_BITS) Spaces around '-' please. Same for other operators. > +/* > + * ASIDs are zero-based: 0->MAX_AVAIL_ASID are valid. -1 below > + * to account for them being zero-absed. Another -1 is because ASID 0 s/absed/based/ > + * is reserved for use by non-PCID-aware users. > + */ > +#define MAX_ASID_AVAILABLE ((1<<CR3_AVAIL_ASID_BITS) - 2) > + > /* Thanks, tglx -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>