Re: [PATCH v1 13/13] KVM: s390: remove the last user of page->index

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




+static inline unsigned long gmap_pgste_get_index(unsigned long *pgt)
+{
+	unsigned long *pgstes, res;
+
+	pgstes = pgt + _PAGE_ENTRIES;
+
+	res = (pgstes[0] & PGSTE_ST2_MASK) << 16;
+	res |= pgstes[1] & PGSTE_ST2_MASK;
+	res |= (pgstes[2] & PGSTE_ST2_MASK) >> 16;
+	res |= (pgstes[3] & PGSTE_ST2_MASK) >> 32;
+
+	return res;
+}

I have to think about that change for a bit before I post an opinion.

I'm wondering if we should just do what Willy suggested and use ptdesc -> pt_index instead?

It's not like we must "force" this removal here. If we'll simply allocate a ptdesc memdesc in the future for these page tables (just like for any other page table), we have that extra space easily available.

The important part is getting rid of page->index now, but not necessarily ptdesc->pt_index.

--
Cheers,

David / dhildenb





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux