Re: [PATCH] ppc64: update to use the new 4L headers

From: Nick Piggin
Date: Wed Apr 27 2005 - 20:51:50 EST


Benjamin Herrenschmidt wrote:
Hi !

This patch converts ppc64 to use the generic pgtable-nopud.h instead of
the "fixup" header.


Great! Nice work Ben.

-
-static void unmap_im_area_pmd(pgd_t *dir, unsigned long address,
- unsigned long size)
-{
- unsigned long base, end;
- pmd_t *pmd;
-
- if (pgd_none(*dir))
- return;
- if (pgd_bad(*dir)) {
- pgd_ERROR(*dir);
- pgd_clear(dir);
- return;
- }
-
- pmd = pmd_offset(dir, address);
- base = address & PGDIR_MASK;
- address &= ~PGDIR_MASK;
- end = address + size;
- if (end > PGDIR_SIZE)
- end = PGDIR_SIZE;
-
- do {
- unmap_im_area_pte(pmd, base + address, end - address);
- address = (address + PMD_SIZE) & PMD_MASK;
- pmd++;
- } while (address < end);
-}

Just a bit off-topic: I wonder how many more of these open
coded pt walks exist in arch code (yes I see you've cleaned
yours up - good).

I guess they don't matter much? They will probably get
converted when arches convert to the 4L headers.

--
SUSE Labs, Novell Inc.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/