aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/pgtable.h
AgeCommit message (Collapse)AuthorFilesLines
2009-02-13Merge branches 'x86/acpi', 'x86/asm', 'x86/cpudetect', 'x86/crashdump', ↵Ingo Molnar1-1/+187
'x86/debug', 'x86/defconfig', 'x86/doc', 'x86/header-fixes', 'x86/headers' and 'x86/minor-fixes' into x86/core
2009-02-11x86: move pte types into pgtable*.hJeremy Fitzhardinge1-43/+60
pgtable*.h is intended for definitions relating to actual pagetables and their entries, so move all the definitions for (pte|pmd|pud|pgd)(val)?_t to the appropriate pgtable*.h headers. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2009-02-11x86: define pud_flags and pud_large properly to allow non-PAE buildsJeremy Fitzhardinge1-1/+6
2009-02-11Split pgtable.h into pgtable_types.h and pgtable.hJeremy Fitzhardinge1-211/+1
Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2009-02-11Merge commit 'remotes/tip/x86/paravirt' into x86/untangle2Jeremy Fitzhardinge1-12/+26
* commit 'remotes/tip/x86/paravirt': (175 commits) xen: use direct ops on 64-bit xen: make direct versions of irq_enable/disable/save/restore to common code xen: setup percpu data pointers xen: fix 32-bit build resulting from mmu move x86/paravirt: return full 64-bit result x86, percpu: fix kexec with vmlinux x86/vmi: fix interrupt enable/disable/save/restore calling convention. x86/paravirt: don't restore second return reg xen: setup percpu data pointers x86: split loading percpu segments from loading gdt x86: pass in cpu number to switch_to_new_gdt() x86: UV fix uv_flush_send_and_wait() x86/paravirt: fix missing callee-save call on pud_val x86/paravirt: use callee-saved convention for pte_val/make_pte/etc x86/paravirt: implement PVOP_CALL macros for callee-save functions x86/paravirt: add register-saving thunks to reduce caller register pressure x86/paravirt: selectively save/restore regs around pvops calls x86: fix paravirt clobber in entry_64.S x86/pvops: add a paravirt_ident functions to allow special patching xen: move remaining mmu-related stuff into mmu.c ... Conflicts: arch/x86/mach-voyager/voyager_smp.c arch/x86/mm/fault.c
2009-02-10Merge branch 'x86/urgent' into core/percpuIngo Molnar1-6/+20
Conflicts: arch/x86/kernel/acpi/boot.c
2009-02-09x86, pgtable.h: fix 2-level 32-bit buildIngo Molnar1-0/+9
- pmd_flags() needs to be available on 2-levels too - provide pud_large() wrapper as well - include page.h - it provides basic types relied on by pgtable.h Signed-off-by: Ingo Molnar <[email protected]>
2009-02-09x86, pgtable.h: macro-ify *_page() methodsIngo Molnar1-12/+15
The p?d_page() methods still rely on highlevel types and methods: In file included from arch/x86/kernel/early_printk.c:18: /home/mingo/tip/arch/x86/include/asm/pgtable.h: In function ‘pmd_page’: /home/mingo/tip/arch/x86/include/asm/pgtable.h:516: error: implicit declaration of function ‘__pfn_to_section’ /home/mingo/tip/arch/x86/include/asm/pgtable.h:516: error: initialization makes pointer from integer without a cast /home/mingo/tip/arch/x86/include/asm/pgtable.h:516: error: implicit declaration of function ‘__section_mem_map_addr’ /home/mingo/tip/arch/x86/include/asm/pgtable.h:516: error: return makes pointer from integer without a cast So convert them to macros and document the type dependency. Signed-off-by: Ingo Molnar <[email protected]>
2009-02-06x86: make pgd/pud/pmd/pte_none consistentJeremy Fitzhardinge1-3/+3
The _none test is done differently for every level of the pagetable. Standardize them by: 1: Use the native_X_val to extract the raw entry, with no need to go via paravirt_ops, diff -r 1d0646d0d319 arch/x86/include/asm/pgtable.h, and 2: Compare with 0 rather than using a boolean !, since they are actually values and not booleans. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2009-02-06x86: add and use pgd/pud/pmd_flagsJeremy Fitzhardinge1-8/+8
Add pgd/pud/pmd_flags which are analogous to pte_flags, and use them where-ever we only care about testing the flags portions of the respective entries. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2009-02-06x86: unify io_remap_pfn_rangeJeremy Fitzhardinge1-0/+3
Impact: cleanup Unify io_remap_pfn_range. Don't demacro yet. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2009-02-06x86: unify pgd_noneJeremy Fitzhardinge1-0/+5
Impact: cleanup Unify and demacro pgd_none. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2009-02-06x86: unify pud_noneJeremy Fitzhardinge1-0/+5
Impact: cleanup Unify and demacro pud_none. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2009-02-06x86: unify pages_to_mbJeremy Fitzhardinge1-0/+5
Impact: cleanup Unify and demacro pages_to_mb. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2009-02-06x86: unify pmd_badJeremy Fitzhardinge1-0/+5
Impact: cleanup Unify and demacro pmd_bad. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2009-02-06x86: unify pgd_badJeremy Fitzhardinge1-0/+5
Impact: cleanup Unify and demacro pgd_bad. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2009-02-06x86: unify pgd_badJeremy Fitzhardinge1-0/+5
Impact: cleanup Unify and demacro pgd_bad. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2009-02-06x86: unify pud_largeJeremy Fitzhardinge1-0/+6
Impact: cleanup Unify and demacro pud_large. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2009-02-06x86: unify pte_offset_kernelJeremy Fitzhardinge1-0/+5
Impact: cleanup Unify and demacro pte_offset_kernel. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2009-02-06x86: unify pte_indexJeremy Fitzhardinge1-0/+11
Impact: cleanup Unify and demacro pte_index. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2009-02-06x86: unify pmd_pfnJeremy Fitzhardinge1-0/+9
Impact: cleanup Unify pmd_pfn. Unfortunately it can't be demacroed because it has a cyclic dependency on linux/mm.h:page_to_nid(). Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2009-02-06x86: unify pmd_pfnJeremy Fitzhardinge1-0/+5
Impact: cleanup Unify and demacro pmd_pfn. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2009-02-06x86: unify pmd_offsetJeremy Fitzhardinge1-0/+6
Impact: cleanup Unify and demacro pmd_offset. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2009-02-06x86: unify pmd_indexJeremy Fitzhardinge1-0/+11
Impact: cleanup Unify and demacro pmd_index. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2009-02-06x86: unify pmd_pageJeremy Fitzhardinge1-0/+5
Impact: cleanup Unify and demacro pmd_page. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2009-02-06x86: unify pmd_page_vaddrJeremy Fitzhardinge1-0/+5
Impact: cleanup Unify and demacro pmd_page_vaddr. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2009-02-06x86: unify pud_offsetJeremy Fitzhardinge1-0/+5
Impact: cleanup Unify and demacro pud_offset. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2009-02-06x86: unify pud_indexJeremy Fitzhardinge1-0/+6
Impact: cleanup Unify and demacro pud_index. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2009-02-06x86: unify pgd_pageJeremy Fitzhardinge1-0/+5
Impact: cleanup Unify and demacro pgd_page. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2009-02-06x86: unify pud_pageJeremy Fitzhardinge1-0/+6
Impact: cleanup Unify and demacro pud_page. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2009-02-06x86: include pgtable_SIZE.h earlierJeremy Fitzhardinge1-6/+10
We'll need the definitions sooner. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2009-02-06x86: unify pud_page_vaddrJeremy Fitzhardinge1-0/+5
Impact: cleanup Unify and demacro pud_page_vaddr. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2009-02-06x86: unify pgd_page_vaddrJeremy Fitzhardinge1-0/+5
Impact: cleanup Unify and demacro pgd_page_vaddr. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2009-02-06x86: unify pmd_noneJeremy Fitzhardinge1-0/+7
Impact: cleanup Unify and demacro pmd_none. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2009-02-06x86: unify pmd_presentJeremy Fitzhardinge1-0/+5
Impact: cleanup Unify and demacro pmd_present. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2009-02-06x86: unify pgd_presentJeremy Fitzhardinge1-0/+7
Impact: cleanup Unify and demacro pgd_present. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2009-02-06x86: unify pud_presentJeremy Fitzhardinge1-0/+7
Impact: cleanup Unify and demacro pud_present. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2009-02-06x86: unify pte_presentJeremy Fitzhardinge1-0/+5
Impact: cleanup Unify and demacro pte_present. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2009-02-06x86: unify pte_sameJeremy Fitzhardinge1-0/+6
Impact: cleanup Unify and demacro pte_same. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2009-02-06x86: unify pte_noneJeremy Fitzhardinge1-0/+5
Impact: cleanup Unify and demacro pte_none. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2009-02-05Merge branch 'x86/urgent' into x86/apicIngo Molnar1-6/+20
Conflicts: arch/x86/mach-default/setup.c Semantic merge: arch/x86/kernel/irqinit_32.c Signed-off-by: Ingo Molnar <[email protected]>
2009-02-04x86: don't apply __supported_pte_mask to non-present ptesJeremy Fitzhardinge1-6/+20
On an x86 system which doesn't support global mappings, __supported_pte_mask has _PAGE_GLOBAL clear, to make sure it never appears in the PTE. pfn_pte() and so on will enforce it with: static inline pte_t pfn_pte(unsigned long page_nr, pgprot_t pgprot) { return __pte((((phys_addr_t)page_nr << PAGE_SHIFT) | pgprot_val(pgprot)) & __supported_pte_mask); } However, we overload _PAGE_GLOBAL with _PAGE_PROTNONE on non-present ptes to distinguish them from swap entries. However, applying __supported_pte_mask indiscriminately will clear the bit and corrupt the pte. I guess the best fix is to only apply __supported_pte_mask to present ptes. This seems like the right solution to me, as it means we can completely ignore the issue of overlaps between the present pte bits and the non-present pte-as-swap entry use of the bits. __supported_pte_mask contains the set of flags we support on the current hardware. We also use bits in the pte for things like logically present ptes with no permissions, and swap entries for swapped out pages. We should only apply __supported_pte_mask to present ptes, because otherwise we may destroy other information being stored in the ptes. Signed-off-by: Jeremy Fitzhardinge <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>
2009-01-22x86: add pte_set_flags/clear_flags for pte flag manipulationJeremy Fitzhardinge1-12/+26
It's not necessary to deconstruct and reconstruct a pte every time its flags are being updated. Introduce pte_set_flags and pte_clear_flags to set and clear flags in a pte. This allows the flag manipulation code to be inlined, and avoids calls via paravirt-ops. Signed-off-by: Jeremy Fitzhardinge <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2009-01-13x86 PAT: consolidate old memtype new memtype check into a function[email protected]1-0/+19
Impact: cleanup Move the new memtype old memtype allowed check to header so that is can be shared by other users. Subsequent patch uses this in pat.c in remap_pfn_range() code path. No functionality change in this patch. Signed-off-by: Venkatesh Pallipadi <[email protected]> Signed-off-by: Suresh Siddha <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2008-12-23Merge branches 'x86/apic', 'x86/cleanups', 'x86/cpufeature', ↵Ingo Molnar1-6/+22
'x86/crashdump', 'x86/debug', 'x86/defconfig', 'x86/detect-hyper', 'x86/doc', 'x86/dumpstack', 'x86/early-printk', 'x86/fpu', 'x86/idle', 'x86/io', 'x86/memory-corruption-check', 'x86/microcode', 'x86/mm', 'x86/mtrr', 'x86/nmi-watchdog', 'x86/pat2', 'x86/pci-ioapic-boot-irq-quirks', 'x86/ptrace', 'x86/quirks', 'x86/reboot', 'x86/setup-memory', 'x86/signal', 'x86/sparse-fixes', 'x86/time', 'x86/uv' and 'x86/xen' into x86/core
2008-12-19x86: PAT: move track untrack pfnmap stubs to asm-generic[email protected]1-4/+2
Impact: Cleanup and branch hints only. Move the track and untrack pfn stub routines from memory.c to asm-generic. Also add unlikely to pfnmap related calls in fork and exit path. Signed-off-by: Venkatesh Pallipadi <[email protected]> Signed-off-by: Suresh Siddha <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>
2008-12-19x86: PAT: remove follow_pfnmap_pte in favor of follow_phys[email protected]1-5/+0
Impact: Cleanup - removes a new function in favor of a recently modified older one. Replace follow_pfnmap_pte in pat code with follow_phys. follow_phys lso returns protection eliminating the need of pte_pgprot call. Using follow_phys also eliminates the need for pte_pa. Signed-off-by: Venkatesh Pallipadi <[email protected]> Signed-off-by: Suresh Siddha <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>
2008-12-18x86: PAT: add pgprot_writecombine() interface for drivers - v3[email protected]1-0/+3
Impact: New mm functionality. Add pgprot_writecombine. pgprot_writecombine will be aliased to pgprot_noncached when not supported by the architecture. Signed-off-by: Venkatesh Pallipadi <[email protected]> Signed-off-by: Suresh Siddha <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>
2008-12-18x86: PAT: change pgprot_noncached to uc_minus instead of strong uc - v3[email protected]1-0/+8
Impact: mm behavior change. Make pgprot_noncached uc_minus instead of strong UC. This will make pgprot_noncached to be in line with ioremap_nocache() and all the other APIs that map page uc_minus on uc request. Signed-off-by: Venkatesh Pallipadi <[email protected]> Signed-off-by: Suresh Siddha <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>
2008-12-18x86: PAT: implement track/untrack of pfnmap regions for x86 - v3[email protected]1-0/+10
Impact: New mm functionality. Hookup remap_pfn_range and vm_insert_pfn and corresponding copy and free routines with reserve and free tracking. reserve and free here only takes care of non RAM region mapping. For RAM region, driver should use set_memory_[uc|wc|wb] to set the cache type and then setup the mapping for user pte. We can bypass below reserve/free in that case. Signed-off-by: Venkatesh Pallipadi <[email protected]> Signed-off-by: Suresh Siddha <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>