aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/pgtable.h
AgeCommit message (Collapse)AuthorFilesLines
2011-01-13thp: no paravirt version of pmd opsAndrea Arcangeli1-0/+3
No paravirt version of set_pmd_at/pmd_update/pmd_update_defer. Signed-off-by: Andrea Arcangeli <[email protected]> Acked-by: Rik van Riel <[email protected]> Acked-by: Mel Gorman <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-01-13thp: add native_set_pmd_atAndrea Arcangeli1-0/+6
Used by paravirt and not paravirt set_pmd_at. Signed-off-by: Andrea Arcangeli <[email protected]> Acked-by: Rik van Riel <[email protected]> Acked-by: Mel Gorman <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-10-19x86, mm: Hold mm->page_table_lock while doing vmalloc_syncJeremy Fitzhardinge1-0/+2
Take mm->page_table_lock while syncing the vmalloc region. This prevents a race with the Xen pagetable pin/unpin code, which expects that the page_table_lock is already held. If this race occurs, then Xen can see an inconsistent page type (a page can either be read/write or a pagetable page, and pin/unpin converts it between them), which will cause either the pin or the set_p[gm]d to fail; either will crash the kernel. vmalloc_sync_all() should be called rarely, so this extra use of page_table_lock should not interfere with its normal users. The mm pointer is stashed in the pgd page's index field, as that won't be otherwise used for pgds. Reported-by: Ian Campbell <[email protected]> Originally-by: Jan Beulich <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Jeremy Fitzhardinge <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>
2010-08-23x86, mm: Avoid unnecessary TLB flushShaohua Li1-0/+2
In x86, access and dirty bits are set automatically by CPU when CPU accesses memory. When we go into the code path of below flush_tlb_fix_spurious_fault(), we already set dirty bit for pte and don't need flush tlb. This might mean tlb entry in some CPUs hasn't dirty bit set, but this doesn't matter. When the CPUs do page write, they will automatically check the bit and no software involved. On the other hand, flush tlb in below position is harmful. Test creates CPU number of threads, each thread writes to a same but random address in same vma range and we measure the total time. Under a 4 socket system, original time is 1.96s, while with the patch, the time is 0.8s. Under a 2 socket system, there is 20% time cut too. perf shows a lot of time are taking to send ipi/handle ipi for tlb flush. Signed-off-by: Shaohua Li <[email protected]> LKML-Reference: <[email protected]> Acked-by: Suresh Siddha <[email protected]> Cc: Andrea Archangeli <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>
2009-11-23x86, mm: is_untracked_pat_range() takes a normal semiclosed rangeH. Peter Anvin1-1/+1
is_untracked_pat_range() -- like its components, is_ISA_range() and is_GRU_range(), takes a normal semiclosed interval (>=, <) whereas the PAT code called it as if it took a closed range (>=, <=). Fix. Although this is a bug, I believe it is non-manifest, simply because none of the callers will call this with non-page-aligned addresses. Signed-off-by: H. Peter Anvin <[email protected]> Acked-by: Thomas Gleixner <[email protected]> Acked-by: Suresh Siddha <[email protected]> LKML-Reference: <[email protected]>
2009-11-23x86, mm: Call is_untracked_pat_range() rather than is_ISA_range()H. Peter Anvin1-2/+4
Checkin fd12a0d69aee6d90fa9b9890db24368a897f8423 made the PAT untracked range a platform configurable, but missed on occurrence of is_ISA_range() which still refers to PAT-untracked memory, and therefore should be using the configurable. Signed-off-by: H. Peter Anvin <[email protected]> Cc: Jack Steiner <[email protected]> Cc: Suresh Siddha <[email protected]> LKML-Reference: <[email protected]>
2009-09-18Merge branch 'x86-platform-for-linus' of ↵Linus Torvalds1-10/+0
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (38 commits) x86: Move get/set_wallclock to x86_platform_ops x86: platform: Fix section annotations x86: apic namespace cleanup x86: Distangle ioapic and i8259 x86: Add Moorestown early detection x86: Add hardware_subarch ID for Moorestown x86: Add early platform detection x86: Move tsc_init to late_time_init x86: Move tsc_calibration to x86_init_ops x86: Replace the now identical time_32/64.c by time.c x86: time_32/64.c unify profile_pc x86: Move calibrate_cpu to tsc.c x86: Make timer setup and global variables the same in time_32/64.c x86: Remove mca bus ifdef from timer interrupt x86: Simplify timer_ack magic in time_32.c x86: Prepare unification of time_32/64.c x86: Remove do_timer hook x86: Add timer_init to x86_init_ops x86: Move percpu clockevents setup to x86_init_ops x86: Move xen_post_allocator_init into xen_pagetable_setup_done ... Fix up conflicts in arch/x86/include/asm/io_apic.h
2009-09-14Merge branch 'x86-mm-for-linus' of ↵Linus Torvalds1-8/+8
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86, highmem_32.c: Clean up comment x86, pgtable.h: Clean up types x86: Clean up dump_pagetable()
2009-08-31x86: Move paravirt pagetable_setup to x86_init_opsThomas Gleixner1-10/+0
Replace more paravirt hackery by proper x86_init_ops. Signed-off-by: Thomas Gleixner <[email protected]>
2009-08-17x86, pat: Allow ISA memory range uncacheable mapping requestsSuresh Siddha1-2/+10
Max Vozeler reported: > Bug 13877 - bogl-term broken with CONFIG_X86_PAT=y, works with =n > > strace of bogl-term: > 814 mmap2(NULL, 65536, PROT_READ|PROT_WRITE, MAP_SHARED, 4, 0) > = -1 EAGAIN (Resource temporarily unavailable) > 814 write(2, "bogl: mmaping /dev/fb0: Resource temporarily unavailable\n", > 57) = 57 PAT code maps the ISA memory range as WB in the PAT attribute, so that fixed range MTRR registers define the actual memory type (UC/WC/WT etc). But the upper level is_new_memtype_allowed() API checks are failing, as the request here is for UC and the return tracked type is WB (Tracked type is WB as MTRR type for this legacy range potentially will be different for each 4k page). Fix is_new_memtype_allowed() by always succeeding the ISA address range checks, as the null PAT (WB) and def MTRR fixed range register settings satisfy the memory type needs of the applications that map the ISA address range. Reported-and-Tested-by: Max Vozeler <[email protected]> Signed-off-by: Suresh Siddha <[email protected]> Signed-off-by: Venkatesh Pallipadi <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>
2009-06-29x86, pgtable.h: Clean up typesFigo.zhang1-3/+3
Use "unsigned long" consistently, not "unsigned". Signed-off-by: Figo.zhang <[email protected]> LKML-Reference: <1246183659.2530.4.camel@myhost> Signed-off-by: Ingo Molnar <[email protected]>
2009-06-29x86: Clean up dump_pagetable()Akinobu Mita1-5/+5
Use pgtable access helpers for 32-bit version dump_pagetable() and get rid of __typeof__() operators. This needs to make pmd_pfn() available for 2-level pgtable. Also, remove some casts for 64-bit version dump_pagetable(). Signed-off-by: Akinobu Mita <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2009-06-15x86: unify pte_hiddenJeremy Fitzhardinge1-6/+2
Unify and demacro pte_hidden. Signed-off-by: Jeremy Fitzhardinge <[email protected]> [rebased for mainline inclusion] Signed-off-by: Vegard Nossum <[email protected]>
2009-06-13kmemcheck: add the kmemcheck coreVegard Nossum1-0/+9
General description: kmemcheck is a patch to the linux kernel that detects use of uninitialized memory. It does this by trapping every read and write to memory that was allocated dynamically (e.g. using kmalloc()). If a memory address is read that has not previously been written to, a message is printed to the kernel log. Thanks to Andi Kleen for the set_memory_4k() solution. Andrew Morton suggested documenting the shadow member of struct page. Signed-off-by: Vegard Nossum <[email protected]> Signed-off-by: Pekka Enberg <[email protected]> [export kmemcheck_mark_initialized] [build fix for setup_max_cpus] Signed-off-by: Ingo Molnar <[email protected]> [rebased for mainline inclusion] Signed-off-by: Vegard Nossum <[email protected]>
2009-06-10Merge branch 'x86-xen-for-linus' of ↵Linus Torvalds1-0/+2
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-xen-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (42 commits) xen: cache cr0 value to avoid trap'n'emulate for read_cr0 xen/x86-64: clean up warnings about IST-using traps xen/x86-64: fix breakpoints and hardware watchpoints xen: reserve Xen start_info rather than e820 reserving xen: add FIX_TEXT_POKE to fixmap lguest: update lazy mmu changes to match lguest's use of kvm hypercalls xen: honour VCPU availability on boot xen: add "capabilities" file xen: drop kexec bits from /sys/hypervisor since kexec isn't implemented yet xen/sys/hypervisor: change writable_pt to features xen: add /sys/hypervisor support xen/xenbus: export xenbus_dev_changed xen: use device model for suspending xenbus devices xen: remove suspend_cancel hook xen/dev-evtchn: clean up locking in evtchn xen: export ioctl headers to userspace xen: add /dev/xen/evtchn driver xen: add irq_from_evtchn xen: clean up gate trap/interrupt constants xen: set _PAGE_NX in __supported_pte_mask before pagetable construction ...
2009-04-12x86: clean up declarations and variablesJaswinder Singh Rajput1-0/+2
Impact: cleanup, no code changed - syscalls.h update declarations due to unifications - irq.c declare smp_generic_interrupt() before it gets used - process.c declare sys_fork() and sys_vfork() before they get used - tsc.c rename tsc_khz shadowed variable - apic/probe_32.c declare apic_default before it gets used - apic/nmi.c prev_nmi_count should be unsigned - apic/io_apic.c declare smp_irq_move_cleanup_interrupt() before it gets used - mm/init.c declare direct_gbpages and free_initrd_mem before they get used Signed-off-by: Jaswinder Singh Rajput <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2009-04-07Merge commit 'origin/master' into for-linus/xen/masterJeremy Fitzhardinge1-2/+0
* commit 'origin/master': (4825 commits) Fix build errors due to CONFIG_BRANCH_TRACER=y parport: Use the PCI IRQ if offered tty: jsm cleanups Adjust path to gpio headers KGDB_SERIAL_CONSOLE check for module Change KCONFIG name tty: Blackin CTS/RTS Change hardware flow control from poll to interrupt driven Add support for the MAX3100 SPI UART. lanana: assign a device name and numbering for MAX3100 serqt: initial clean up pass for tty side tty: Use the generic RS485 ioctl on CRIS tty: Correct inline types for tty_driver_kref_get() splice: fix deadlock in splicing to file nilfs2: support nanosecond timestamp nilfs2: introduce secondary super block nilfs2: simplify handling of active state of segments nilfs2: mark minor flag for checkpoint created by internal operation nilfs2: clean up sketch file nilfs2: super block operations fix endian bug ... Conflicts: arch/x86/include/asm/thread_info.h arch/x86/lguest/boot.c drivers/xen/manage.c
2009-03-29x86/paravirt: finish change from lazy cpu to context switch start/endJeremy Fitzhardinge1-0/+2
Impact: fix lazy context switch API Pass the previous and next tasks into the context switch start end calls, so that the called functions can properly access the task state (esp in end_context_switch, in which the next task is not yet completely current). Signed-off-by: Jeremy Fitzhardinge <[email protected]> Acked-by: Peter Zijlstra <[email protected]>
2009-03-19x86: with the last user gone, remove set_pte_presentJeremy Fitzhardinge1-2/+0
Impact: cleanup set_pte_present() is no longer used, directly or indirectly, so remove it. Signed-off-by: Jeremy Fitzhardinge <[email protected]> Cc: Xen-devel <[email protected]> Cc: Jeremy Fitzhardinge <[email protected]> Cc: Alok Kataria <[email protected]> Cc: Marcelo Tosatti <[email protected]> Cc: Avi Kivity <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2009-02-24Merge branch 'tj-percpu' of ↵Ingo Molnar1-0/+2
git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc into core/percpu Conflicts: arch/x86/include/asm/pgtable.h
2009-02-24x86: update populate_extra_pte() and add populate_extra_pmd()Tejun Heo1-1/+2
Impact: minor change to populate_extra_pte() and addition of pmd flavor Update populate_extra_pte() to return pointer to the pte_t for the specified address and add populate_extra_pmd() which only populates till the pmd and returns pointer to the pmd entry for the address. For 64bit, pud/pmd/pte fill functions are separated out from set_pte_vaddr[_pud]() and used for set_pte_vaddr[_pud]() and populate_extra_{pte|pmd}(). Signed-off-by: Tejun Heo <[email protected]>
2009-02-20x86: convert to the new dynamic percpu allocatorTejun Heo1-0/+1
Impact: use new dynamic allocator, unified access to static/dynamic percpu memory Convert to the new dynamic percpu allocator. * implement populate_extra_pte() for both 32 and 64 * update setup_per_cpu_areas() to use pcpu_setup_static() * define __addr_to_pcpu_ptr() and __pcpu_ptr_to_addr() * define config HAVE_DYNAMIC_PER_CPU_AREA Signed-off-by: Tejun Heo <[email protected]>
2009-02-13x86 headers: remove duplicate pud_large() definitionIngo Molnar1-7/+0
Signed-off-by: Ingo Molnar <[email protected]>
2009-02-13Merge branch 'x86/untangle2' of ↵Ingo Molnar1-255/+67
git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen into x86/headers Conflicts: arch/x86/include/asm/page.h arch/x86/include/asm/pgtable.h arch/x86/mach-voyager/voyager_smp.c arch/x86/mm/fault.c
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]>