This set of functions and macros deal with the mapping of addresses and pages to PTE's and the setting the individual entries.
mk_pte takes a physical page and protection bits and combines them together to form the pte_t that needs to be inserted into the page table. A similar macro mk_pte_phys exists which treats the address as a physical address.
pte_page returns the struct page which corresponds to the PTE entry. pmd_page returns the struct page containing the set of PTE's.
set_pte takes a pte_t such as that returned by mk_pte and places it within the processes page tables. pte_clear is the reverse operation. An additional function is provided called ptep_get_and_clear which clears an entry from the process page table and returns the pte_t. This is important when some modification needs to be made to either the PTE protection or the struct page itself.