summaryrefslogtreecommitdiffstats
path: root/arch/x86
AgeCommit message (Collapse)AuthorFilesLines
2009-06-01Merge branch 'linus' into irq/numaIngo Molnar29-82/+151
Conflicts: arch/mips/sibyte/bcm1480/irq.c arch/mips/sibyte/sb1250/irq.c Merge reason: we gathered a few conflicts plus update to latest upstream fixes. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-05-29acpi-cpufreq: fix printk typo and indentationJoe Perches1-2/+2
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
2009-05-29x86: ignore VM_LOCKED when determining if hugetlb-backed page tables can be ↵Mel Gorman1-1/+5
shared or not Addresses http://bugzilla.kernel.org/show_bug.cgi?id=13302 On x86 and x86-64, it is possible that page tables are shared beween shared mappings backed by hugetlbfs. As part of this, page_table_shareable() checks a pair of vma->vm_flags and they must match if they are to be shared. All VMA flags are taken into account, including VM_LOCKED. The problem is that VM_LOCKED is cleared on fork(). When a process with a shared memory segment forks() to exec() a helper, there will be shared VMAs with different flags. The impact is that the shared segment is sometimes considered shareable and other times not, depending on what process is checking. What happens is that the segment page tables are being shared but the count is inaccurate depending on the ordering of events. As the page tables are freed with put_page(), bad pmd's are found when some of the children exit. The hugepage counters also get corrupted and the Total and Free count will no longer match even when all the hugepage-backed regions are freed. This requires a reboot of the machine to "fix". This patch addresses the problem by comparing all flags except VM_LOCKED when deciding if pagetables should be shared or not for hugetlbfs-backed mapping. Signed-off-by: Mel Gorman <mel@csn.ul.ie> Acked-by: Hugh Dickins <hugh.dickins@tiscali.co.uk> Cc: Ingo Molnar <mingo@elte.hu> Cc: <stable@kernel.org> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: <starlight@binnacle.cx> Cc: Eric B Munson <ebmunson@us.ibm.com> Cc: Adam Litke <agl@us.ibm.com> Cc: Andy Whitcroft <apw@canonical.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-05-28Merge branches 'amd-iommu/fixes', 'amd-iommu/debug', ↵Joerg Roedel5-224/+594
'amd-iommu/suspend-resume' and 'amd-iommu/extended-allocator' into amd-iommu/2.6.31 Conflicts: arch/x86/kernel/amd_iommu.c arch/x86/kernel/amd_iommu_init.c
2009-05-28amd-iommu: don't free dma adresses below 512MB with CONFIG_IOMMU_STRESSJoerg Roedel1-0/+5
This will test the automatic aperture enlargement code. This is important because only very few devices will ever trigger this code path. So force it under CONFIG_IOMMU_STRESS. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-05-28amd-iommu: don't preallocate page tables with CONFIG_IOMMU_STRESSJoerg Roedel1-0/+4
This forces testing of on-demand page table allocation code. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-05-28amd-iommu: disable round-robin allocator for CONFIG_IOMMU_STRESSJoerg Roedel1-0/+5
Disabling the round-robin allocator results in reusing the same dma-addresses again very fast. This is a good test if the iotlb flushing is working correctly. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-05-28amd-iommu: remove amd_iommu_size kernel parameterJoerg Roedel2-29/+4
This parameter is not longer necessary when aperture increases dynamically. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-05-28amd-iommu: enlarge the aperture dynamicallyJoerg Roedel1-2/+18
By dynamically increasing the aperture the extended allocator is now ready for use. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-05-28amd-iommu: handle exlusion ranges and unity mappings in alloc_new_rangeJoerg Roedel1-11/+60
This patch makes sure no reserved addresses are allocated in an dma_ops domain when the aperture is increased dynamically. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-05-28amd-iommu: move aperture_range allocation code to seperate functionJoerg Roedel1-36/+59
This patch prepares the dynamic increasement of dma_ops domain apertures. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-05-28amd-iommu: change dma_dom->next_bit to dma_dom->next_addressJoerg Roedel2-9/+10
Simplify the code a little bit by using the same unit for all address space related state in the dma_ops domain structure. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-05-28amd-iommu: make address allocator aware of multiple aperture rangesJoerg Roedel2-39/+110
This patch changes the AMD IOMMU address allocator to allow up to 32 aperture ranges per dma_ops domain. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-05-28amd-iommu: handle page table allocation failures in dma_ops codeJoerg Roedel1-2/+18
The code will be required when the aperture size increases dynamically in the extended address allocator. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-05-28amd-iommu: move page table allocation code to seperate functionJoerg Roedel1-25/+61
This patch makes page table allocation usable for dma_ops code. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-05-28amd-iommu: introduce aperture_range structureJoerg Roedel2-35/+43
This is a preperation for extended address allocator. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-05-28amd-iommu: implement suspend/resumeJoerg Roedel1-1/+20
This patch puts everything together and enables suspend/resume support in the AMD IOMMU driver. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-05-28amd_iommu: un __init functions required for suspend/resumeJoerg Roedel1-5/+5
This patch makes sure that no function required for suspend/resume of AMD IOMMU driver is thrown away after boot. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-05-28amd-iommu: add function to flush tlb for all devicesJoerg Roedel2-0/+19
This function is required for suspend/resume support with AMD IOMMU enabled. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-05-28amd-iommu: add function to flush tlb for all domainsJoerg Roedel2-0/+12
This function is required for suspend/resume support with AMD IOMMU enabled. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-05-28amd-iommu: add function to disable all iommusJoerg Roedel1-0/+13
This function is required for suspend/resume support with AMD IOMMU enabled. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-05-28amd-iommu: remove support for msi-xJoerg Roedel1-43/+1
Current hardware uses msi instead of msi-x so this code it not necessary and can not be tested. The best thing is to drop this code. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-05-28amd-iommu: drop pointless iommu-loop in msi setup codeJoerg Roedel1-7/+1
It is not necessary to loop again over all IOMMUs in this code. So drop the loop. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-05-28amd-iommu: consolidate hardware initialization to one functionJoerg Roedel1-18/+32
This patch restructures the AMD IOMMU initialization code to initialize all hardware registers with one single function call. This is helpful for suspend/resume support. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-05-28amd-iommu: introduce for_each_iommu* macrosJoerg Roedel3-8/+16
This patch introduces the for_each_iommu and for_each_iommu_safe macros to simplify the developers life when having to iterate over all AMD IOMMUs in the system. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-05-28amd iommu: properly detach from protection domain on ->removeChris Wright1-1/+5
Some drivers may use the dma api during ->remove which will cause a protection domain to get reattached to a device. Delay the detach until after the driver is completely unbound. [ joro: added a little merge helper ] [ Impact: fix too early device<->domain removal ] Signed-off-by: Chris Wright <chrisw@redhat.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-05-28amd-iommu: make sure only ivmd entries are parsedJoerg Roedel1-0/+2
The bug never triggered. But it should be fixed to protect against broken ACPI tables in the future. [ Impact: protect against broken ivrs acpi table ] Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-05-28amd-iommu: fix the handling of device aliases in the AMD IOMMU driver.Neil Turton1-1/+1
The devid parameter to set_dev_entry_from_acpi is the requester ID rather than the device ID since it is used to index the IOMMU device table. The handling of IVHD_DEV_ALIAS used to pass the device ID. This patch fixes it to pass the requester ID. [ Impact: fix setting the wrong req-id in acpi-table parsing ] Signed-off-by: Neil Turton <nturton@solarflare.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-05-28amd-iommu: fix an off-by-one error in the AMD IOMMU driver.Neil Turton1-1/+1
The variable amd_iommu_last_bdf holds the maximum bdf of any device controlled by an IOMMU, so the number of device entries needed is amd_iommu_last_bdf+1. The function tbl_size used amd_iommu_last_bdf instead. This would be a problem if the last device were a large enough power of 2. [ Impact: fix amd_iommu_last_bdf off-by-one error ] Signed-off-by: Neil Turton <nturton@solarflare.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-05-28amd-iommu: disable device isolation with CONFIG_IOMMU_STRESSJoerg Roedel1-0/+6
With device isolation disabled we can test better for race conditions in dma_ops related code. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-05-28x86/iommu: add IOMMU_STRESS Kconfig entryJoerg Roedel1-0/+8
This Kconfig option is intended to enable various code paths or parameters in IOMMU implementations to stress test the code and/or the hardware. This can also be done by disabling optimizations in the code when this option is switched on. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2009-05-28amd-iommu: move protection domain printk to dump codeJoerg Roedel1-4/+6
This information is only helpful for debugging. Don't print it anymore unless explicitly requested. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-05-28amd-iommu: print ivmd information to dmesg when requestedJoerg Roedel1-0/+11
Add information about device memory mapping requirements for the IOMMU as described in the IVRS ACPI table to the kernel log if amd_iommu_dump was specified on the kernel command line. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-05-28amd-iommu: print ivhd information to dmesg when requestedJoerg Roedel1-0/+73
Add information about devices belonging to an IOMMU as described in the IVRS ACPI table to the kernel log if amd_iommu_dump was specified on the kernel command line. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-05-28amd-iommu: add dump for iommus described in ivrs tableJoerg Roedel1-0/+9
Add information about IOMMU devices described in the IVRS ACPI table to the kernel log if amd_iommu_dump was specified on the kernel command line. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-05-28amd-iommu: add amd_iommu_dump parameterJoerg Roedel2-0/+16
This kernel parameter will be useful to get some AMD IOMMU related information in dmesg that is not necessary for the default user but may be helpful in debug situations. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-05-28x86: move rdtsc_barrier() into the TSC vread methodPetr Tesarik2-9/+10
The *fence instructions were moved to vsyscall_64.c by commit cb9e35dce94a1b9c59d46224e8a94377d673e204. But this breaks the vDSO, because vread methods are also called from there. Besides, the synchronization might be unnecessary for other time sources than TSC. [ Impact: fix potential time warp in VDSO ] Signed-off-by: Petr Tesarik <ptesarik@suse.cz> LKML-Reference: <9d0ea9ea0f866bdc1f4d76831221ae117f11ea67.1243241859.git.ptesarik@suse.cz> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: <stable@kernel.org>
2009-05-28x86: enable_update_mptable should be a macroYinghai Lu1-9/+2
instead of declaring one variant as an inline function... because other case is a variable Signed-off-by: Yinghai Lu <yinghai@kernel.org> LKML-Reference: <4A13B344.7030307@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-05-26Merge branch 'x86-fixes-for-linus' of ↵Linus Torvalds2-16/+8
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: avoid back to back on_each_cpu in cpa_flush_array x86, relocs: ignore R_386_NONE in kernel relocation entries
2009-05-26x86: avoid back to back on_each_cpu in cpa_flush_arrayPallipadi, Venkatesh1-14/+3
Cleanup cpa_flush_array() to avoid back to back on_each_cpu() calls. [ Impact: optimizes fix 0af48f42df15b97080b450d24219dd95db7b929a ] Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-05-26[CPUFREQ] powernow-k8: determine exact CPU frequency for HW PstatesAndreas Herrmann1-2/+21
Slightly modified by trenn@suse.de -> only do this on fam 10h and fam 11h. Currently powernow-k8 determines CPU frequency from ACPI PSS objects, but according to AMD family 11h BKDG this frequency is just a rounded value: "CoreFreq (MHz) = The CPU COF specified by MSRC001_00[6B:64][CpuFid] rounded to the nearest 100 Mhz." As a consequnce powernow-k8 reports wrong CPU frequency on some systems, e.g. on Turion X2 Ultra: powernow-k8: Found 1 AMD Turion(tm)X2 Ultra DualCore Mobile ZM-82 processors (2 cpu cores) (version 2.20.00) powernow-k8: 0 : pstate 0 (2200 MHz) powernow-k8: 1 : pstate 1 (1100 MHz) powernow-k8: 2 : pstate 2 (600 MHz) But this is wrong as frequency for Pstate2 is 550 MHz. x86info reports it correctly: #x86info -a |grep Pstate ... Pstate-0: fid=e, did=0, vid=24 (2200MHz) Pstate-1: fid=e, did=1, vid=30 (1100MHz) Pstate-2: fid=e, did=2, vid=3c (550MHz) (current) Solution is to determine the frequency directly from Pstate MSRs instead of using rounded values from ACPI table. Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com> Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Dave Jones <davej@redhat.com>
2009-05-26[CPUFREQ] powernow-k8 cleanup msg if BIOS does not export ACPI _PSS cpufreq dataThomas Renninger1-14/+5
- Make the message shorter and easier to grep for - Use printk_once instead of WARN_ONCE (functionality of these was mixed) Signed-off-by: Thomas Renninger <trenn@suse.de> Cc: Langsdorf, Mark <mark.langsdorf@amd.com> Signed-off-by: Dave Jones <davej@redhat.com>
2009-05-26[CPUFREQ] powernow-k7 build fix when ACPI=nDave Jones1-0/+2
arch/x86/kernel/cpu/cpufreq/powernow-k7.c:172: warning: 'invalidate_entry' defined but not used Reported-by: Toralf Förster <toralf.foerster@gmx.de> Signed-off-by: Dave Jones <davej@redhat.com>
2009-05-26[CPUFREQ] add atom family to p4-clockmodJarod Wilson1-0/+1
Some atom procs don't do freq scaling (such as the atom 330 on my own littlefalls2 board). By adding the atom family here, we at least get the benefit of passive cooling in a thermal emergency. Not sure how to see that its actually helping any, but the driver does bind and claim its functioning on my atom 330. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Dave Jones <davej@redhat.com>
2009-05-25x86, relocs: ignore R_386_NONE in kernel relocation entriesTejun Heo1-2/+5
For relocatable 32bit kernels, boot/compressed/relocs.c processes relocation entries in the kernel image and appends it to the kernel image such that boot/compressed/head_32.S can relocate the kernel. The kernel image is one statically linked object and only uses two relocation types - R_386_PC32 and R_386_32, of the two only the latter needs massaging during kernel relocation and thus handled by relocs. R_386_PC32 is ignored and all other relocation types are considered error. When the target of a relocation resides in a discarded section, binutils doesn't throw away the relocation record but nullifies it by changing it to R_386_NONE, which unfortunately makes relocs fail. The problem was triggered by yet out-of-tree x86 stack unwind patches but given the binutils behavior, ignoring R_386_NONE is the right thing to do. The problem has been tracked down to binutils behavior by Jan Beulich. [ Impact: fix build with certain binutils by ignoring R_386_NONE ] Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Jan Beulich <JBeulich@novell.com> Cc: Ingo Molnar <mingo@elte.hu> LKML-Reference: <4A1B8150.40702@kernel.org> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-05-25Merge branch 'kvm-updates/2.6.30' of git://git.kernel.org/pub/scm/virt/kvm/kvmLinus Torvalds2-3/+6
* 'kvm-updates/2.6.30' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: Fix PDPTR reloading on CR4 writes KVM: Make paravirt tlb flush also reload the PAE PDPTRs
2009-05-25KVM: Fix PDPTR reloading on CR4 writesAvi Kivity1-1/+5
The processor is documented to reload the PDPTRs while in PAE mode if any of the CR4 bits PSE, PGE, or PAE change. Linux relies on this behaviour when zapping the low mappings of PAE kernels during boot. The code already handled changes to CR4.PAE; augment it to also notice changes to PSE and PGE. This triggered while booting an F11 PAE kernel; the futex initialization code runs before any CR3 reloads and writes to a NULL pointer; the futex subsystem ended up uninitialized, killing PI futexes and pulseaudio which uses them. Cc: stable@kernel.org Signed-off-by: Avi Kivity <avi@redhat.com>
2009-05-25KVM: Make paravirt tlb flush also reload the PAE PDPTRsAvi Kivity1-2/+1
The paravirt tlb flush may be used not only to flush TLBs, but also to reload the four page-directory-pointer-table entries, as it is used as a replacement for reloading CR3. Change the code to do the entire CR3 reloading dance instead of simply flushing the TLB. Cc: stable@kernel.org Signed-off-by: Avi Kivity <avi@redhat.com>
2009-05-25x86: Remove remap percpu allocator for the time beingTejun Heo1-1/+3
Remap percpu allocator has subtle bug when combined with page attribute changing. Remap percpu allocator aliases PMD pages for the first chunk and as pageattr doesn't know about the alias it ends up updating page attributes of the original mapping thus leaving the alises in inconsistent state which might lead to subtle data corruption. Please read the following threads for more information: http://thread.gmane.org/gmane.linux.kernel/835783 The following is the proposed fix which teaches pageattr about percpu aliases. http://thread.gmane.org/gmane.linux.kernel/837157 However, the above changes are deemed too pervasive for upstream inclusion for 2.6.30 release, so this patch essentially disables the remap allocator for the time being. Signed-off-by: Tejun Heo <tj@kernel.org> LKML-Reference: <4A1A0A27.4050301@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-05-23Merge branch 'x86/urgent' into x86/setupH. Peter Anvin86-571/+849
Resolved conflicts: arch/x86/boot/memory.c Signed-off-by: H. Peter Anvin <hpa@zytor.com>