aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'amd-iommu/2.6.32' of ↵Ingo Molnar2009-09-0453-662/+1313
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux-2.6-iommu into core/iommu
| * Merge branch 'amd-iommu/pagetable' into amd-iommu/2.6.32Joerg Roedel2009-09-032-113/+178
| |\ | | | | | | | | | | | | Conflicts: arch/x86/kernel/amd_iommu.c
| | * x86/amd-iommu: Change iommu_map_page to support multiple page sizesJoerg Roedel2009-09-032-11/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a map_size parameter to the iommu_map_page function which makes it generic enough to handle multiple page sizes. This also requires a change to alloc_pte which is also done in this patch. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | * x86/amd-iommu: Support higher level PTEs in iommu_page_unmapJoerg Roedel2009-09-032-8/+14
| | | | | | | | | | | | | | | | | | | | | This patch changes fetch_pte and iommu_page_unmap to support different page sizes too. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | * x86/amd-iommu: Remove old page table handling macrosJoerg Roedel2009-09-031-19/+0
| | | | | | | | | | | | | | | | | | These macros are not longer required. So remove them. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | * x86/amd-iommu: Use 2-level page tables for dma_ops domainsJoerg Roedel2009-09-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The driver now supports a dynamic number of levels for IO page tables. This allows to reduce the number of levels for dma_ops domains by one because a dma_ops domain has usually an address space size between 128MB and 4G. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | * x86/amd-iommu: Remove bus_addr check in iommu_map_pageJoerg Roedel2009-09-031-2/+1
| | | | | | | | | | | | | | | | | | | | | The driver now supports full 64 bit device address spaces. So this check is not longer required. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | * x86/amd-iommu: Remove last usages of IOMMU_PTE_L0_INDEXJoerg Roedel2009-09-031-2/+2
| | | | | | | | | | | | | | | | | | This change allows to remove these old macros later. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | * x86/amd-iommu: Change alloc_pte to support 64 bit address spaceJoerg Roedel2009-09-031-24/+20
| | | | | | | | | | | | | | | | | | | | | | | | This patch changes the alloc_pte function to be able to map pages into the whole 64 bit address space supported by AMD IOMMU hardware from the old limit of 2**39 bytes. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | * x86/amd-iommu: Introduce increase_address_space functionJoerg Roedel2009-09-032-0/+31
| | | | | | | | | | | | | | | | | | | | | This function will be used to increase the address space size of a protection domain. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | * x86/amd-iommu: Flush domains if address space size was increasedJoerg Roedel2009-09-032-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | Thist patch introduces the update_domain function which propagates the larger address space of a protection domain to the device table and flushes all relevant DTEs and the domain TLB. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | * x86/amd-iommu: Introduce set_dte_entry functionJoerg Roedel2009-09-031-10/+17
| | | | | | | | | | | | | | | | | | | | | | | | This function factors out some logic of attach_device to a seperate function. This new function will be used to update device table entries when necessary. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | * x86/amd-iommu: Add a gneric version of amd_iommu_flush_all_devicesJoerg Roedel2009-09-031-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds a generic variant of amd_iommu_flush_all_devices function which flushes only the DTEs for a given protection domain. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | * x86/amd-iommu: Use fetch_pte in amd_iommu_iova_to_physJoerg Roedel2009-09-031-14/+2
| | | | | | | | | | | | | | | | | | | | | Don't reimplement the page table walker in this function. Use the generic one. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | * x86/amd-iommu: Use fetch_pte in iommu_unmap_pageJoerg Roedel2009-09-031-16/+3
| | | | | | | | | | | | | | | | | | | | | Instead of reimplementing existing logic use fetch_pte to walk the page table in iommu_unmap_page. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | * x86/amd-iommu: Make fetch_pte aware of dynamic mapping levelsJoerg Roedel2009-09-032-11/+22
| | | | | | | | | | | | | | | | | | | | | This patch changes the fetch_pte function in the AMD IOMMU driver to support dynamic mapping levels. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| * | Merge branch 'amd-iommu/passthrough' into amd-iommu/2.6.32Joerg Roedel2009-09-035-20/+143
| |\ \ | | | | | | | | | | | | | | | | | | | | Conflicts: arch/x86/kernel/amd_iommu.c arch/x86/kernel/amd_iommu_init.c
| | * | x86/amd-iommu: Initialize passthrough mode when requestedJoerg Roedel2009-09-031-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enables the passthrough mode for AMD IOMMU by running the initialization function when iommu=pt is passed on the kernel command line. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | * | x86/amd-iommu: Don't detach device from pt domain on driver unbindJoerg Roedel2009-09-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes sure a device is not detached from the passthrough domain when the device driver is unloaded or does otherwise release the device. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | * | x86/amd-iommu: Make sure a device is assigned in passthrough modeJoerg Roedel2009-09-031-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the IOMMU driver runs in passthrough mode it has to make sure that every device not assigned to an IOMMU-API domain must be put into the passthrough domain instead of keeping it unassigned. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | * | x86/amd-iommu: Align locking between attach_device and detach_deviceJoerg Roedel2009-09-031-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes the locking behavior between the functions attach_device and __attach_device consistent with the locking behavior between detach_device and __detach_device. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | * | x86/amd-iommu: Fix device table write orderJoerg Roedel2009-09-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The V bit of the device table entry has to be set after the rest of the entry is written to not confuse the hardware. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | * | x86/amd-iommu: Add passthrough mode initialization functionsJoerg Roedel2009-09-033-8/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When iommu=pt is passed on kernel command line the devices should run untranslated. This requires the allocation of a special domain for that purpose. This patch implements the allocation and initialization path for iommu=pt. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | * | x86/amd-iommu: Add core functions for pd allocation/freeingJoerg Roedel2009-09-031-4/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch factors some code of protection domain allocation into seperate functions. This way the logic can be used to allocate the passthrough domain later. As a side effect this patch fixes an unlikely domain id leakage bug. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | * | x86/dma: Mark iommu_pass_through as __read_mostlyJoerg Roedel2009-09-031-1/+8
| | |/ | | | | | | | | | | | | | | | | | | | | | This variable is read most of the time. This patch marks it as such. It also documents the meaning the this variable while at it. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | |
| | \
| *-. \ Merge branches 'gart/fixes', 'amd-iommu/fixes+cleanups' and ↵Joerg Roedel2009-09-033-41/+120
| |\ \ \ | | | | | | | | | | | | | | | 'amd-iommu/fault-handling' into amd-iommu/2.6.32
| | | * | x86/amd-iommu: Reset command buffer if wait loop failsJoerg Roedel2009-09-031-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of a panic on an comletion wait loop failure, try to recover from that event from resetting the command buffer. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | | * | x86/amd-iommu: Panic if IOMMU command buffer reset failsJoerg Roedel2009-09-032-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To prevent the driver from doing recursive command buffer resets, just panic when that recursion happens. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | | * | x86/amd-iommu: Reset command buffer on ILLEGAL_COMMAND_ERRORJoerg Roedel2009-09-031-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On an ILLEGAL_COMMAND_ERROR the IOMMU stops executing further commands. This patch changes the code to handle this case better by resetting the command buffer in the IOMMU. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | | * | x86/amd-iommu: Add reset function for command buffersJoerg Roedel2009-09-032-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch factors parts of the command buffer initialization code into a seperate function which can be used to reset the command buffer later. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | | * | x86/amd-iommu: Add function to flush all DTEs on one IOMMUJoerg Roedel2009-09-031-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function flushes all DTE entries on one IOMMU for all devices behind this IOMMU. This is required for command buffer resetting later. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | | * | x86/amd-iommu: Introduce function for iommu-local domain flushJoerg Roedel2009-09-031-16/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces a function to flush all domain tlbs for on one given IOMMU. This is required later to reset the command buffer on one IOMMU. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | | * | x86/amd-iommu: Dump illegal command on ILLEGAL_COMMAND_ERRORJoerg Roedel2009-09-031-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds code to dump the command which caused an ILLEGAL_COMMAND_ERROR raised by the IOMMU hardware. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | | * | x86/amd-iommu: Dump fault entry on DTE errorJoerg Roedel2009-09-031-0/+10
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds code to dump the content of the device table entry which caused an ILLEGAL_DEV_TABLE_ENTRY error from the IOMMU hardware. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | * | x86/amd-iommu: fix broken check in amd_iommu_flush_all_devicesJoerg Roedel2009-09-031-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The amd_iommu_pd_table is indexed by protection domain number and not by device id. So this check is broken and must be removed. Cc: stable@kernel.org Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | * | x86/amd-iommu: Remove redundant 'IOMMU' stringJoerg Roedel2009-09-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'IOMMU: ' prefix is not necessary because the DUMP_printk macro already prints its own prefix. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | * | x86/amd-iommu: replace "AMD IOMMU" by "AMD-Vi"Joerg Roedel2009-09-033-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch replaces the "AMD IOMMU" printk strings with the official name for the hardware: "AMD-Vi". Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | * | x86/amd-iommu: Remove some merge helper codeJoerg Roedel2009-09-031-6/+0
| | |/ | | | | | | | | | | | | | | | | | | This patch removes some left-overs which where put into the code to simplify merging code which also depends on changes in other trees. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| * / x86/gart: Do not select AGP for GART_IOMMUPavel Vasilyev2009-09-031-1/+0
| |/ | | | | | | | | | | | | | | | | There is no dependency from the gart code to the agp code. And since a lot of systems today do not have agp anymore remove this dependency from the kernel configuration. Signed-off-by: Pavel Vasilyev <pavel@pavlinux.ru> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| * x86: Fix vSMP boot crashYinghai Lu2009-08-261-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2.6.31-rc7 does not boot on vSMP systems: [ 8.501108] CPU31: Thermal monitoring enabled (TM1) [ 8.501127] CPU 31 MCA banks SHD:2 SHD:3 SHD:5 SHD:6 SHD:8 [ 8.650254] CPU31: Intel(R) Xeon(R) CPU E5540 @ 2.53GHz stepping 04 [ 8.710324] Brought up 32 CPUs [ 8.713916] Total of 32 processors activated (162314.96 BogoMIPS). [ 8.721489] ERROR: parent span is not a superset of domain->span [ 8.727686] ERROR: domain->groups does not contain CPU0 [ 8.733091] ERROR: groups don't span domain->span [ 8.737975] ERROR: domain->cpu_power not set [ 8.742416] Ravikiran Thirumalai bisected it to: | commit 2759c3287de27266e06f1f4e82cbd2d65f6a044c | x86: don't call read_apic_id if !cpu_has_apic The problem is that on vSMP systems the CPUID derived initial-APICIDs are overlapping - so we need to fall back on hard_smp_processor_id() which reads the local APIC. Both come from the hardware (influenced by firmware though) so it's a tough call which one to trust. Doing the quirk expresses the vSMP property properly and also does not affect other systems, so we go for this solution instead of a revert. Reported-and-Tested-by: Ravikiran Thirumalai <kiran@scalex86.org> Signed-off-by: Yinghai Lu <yinghai@kernel.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Cyrill Gorcunov <gorcunov@gmail.com> Cc: Shai Fultheim <shai@scalex86.org> Cc: Suresh Siddha <suresh.b.siddha@intel.com> LKML-Reference: <4A944D3C.5030100@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
| * x86, xen: Initialize cx to suppress warningH. Peter Anvin2009-08-251-0/+1
| | | | | | | | | | | | | | | | Initialize cx before calling xen_cpuid(), in order to suppress the "may be used uninitialized in this function" warning. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org>
| * x86, xen: Suppress WP test on XenJeremy Fitzhardinge2009-08-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Xen always runs on CPUs which properly support WP enforcement in privileged mode, so there's no need to test for it. This also works around a crash reported by Arnd Hannemann, though I think its just a band-aid for that case. Reported-by: Arnd Hannemann <hannemann@nets.rwth-aachen.de> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Acked-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Merge branch 'timers-fixes-for-linus' of ↵Linus Torvalds2009-08-251-5/+1
| |\ | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: clockevent: Prevent dead lock on clockevents_lock timers: Drop write permission on /proc/timer_list
| | * clockevent: Prevent dead lock on clockevents_lockSuresh Siddha2009-08-191-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently clockevents_notify() is called with interrupts enabled at some places and interrupts disabled at some other places. This results in a deadlock in this scenario. cpu A holds clockevents_lock in clockevents_notify() with irqs enabled cpu B waits for clockevents_lock in clockevents_notify() with irqs disabled cpu C doing set_mtrr() which will try to rendezvous of all the cpus. This will result in C and A come to the rendezvous point and waiting for B. B is stuck forever waiting for the spinlock and thus not reaching the rendezvous point. Fix the clockevents code so that clockevents_lock is taken with interrupts disabled and thus avoid the above deadlock. Also call lapic_timer_propagate_broadcast() on the destination cpu so that we avoid calling smp_call_function() in the clockevents notifier chain. This issue left us wondering if we need to change the MTRR rendezvous logic to use stop machine logic (instead of smp_call_function) or add a check in spinlock debug code to see if there are other spinlocks which gets taken under both interrupts enabled/disabled conditions. Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Cc: "Pallipadi Venkatesh" <venkatesh.pallipadi@intel.com> Cc: "Brown Len" <len.brown@intel.com> LKML-Reference: <1250544899.2709.210.camel@sbs-t61.sc.intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * | Merge branch 'x86-fixes-for-linus' of ↵Linus Torvalds2009-08-259-103/+80
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Fix build with older binutils and consolidate linker script x86: Fix an incorrect argument of reserve_bootmem() x86: add vmlinux.lds to targets in arch/x86/boot/compressed/Makefile xen: rearrange things to fix stackprotector x86: make sure load_percpu_segment has no stackprotector i386: Fix section mismatches for init code with !HOTPLUG_CPU x86, pat: Allow ISA memory range uncacheable mapping requests
| | * | x86: Fix build with older binutils and consolidate linker scriptJan Beulich2009-08-251-79/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | binutils prior to 2.17 can't deal with the currently possible situation of a new segment following the per-CPU segment, but that new segment being empty - objcopy misplaces the .bss (and perhaps also the .brk) sections outside of any segment. However, the current ordering of sections really just appears to be the effect of cumulative unrelated changes; re-ordering things allows to easily guarantee that the segment following the per-CPU one is non-empty, and at once eliminates the need for the bogus data.init2 segment. Once touching this code, also use the various data section helper macros from include/asm-generic/vmlinux.lds.h. -v2: fix !SMP builds. Signed-off-by: Jan Beulich <jbeulich@novell.com> Cc: <sam@ravnborg.org> LKML-Reference: <4A94085D02000078000119A5@vpn.id2.novell.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
| | * | x86: Fix an incorrect argument of reserve_bootmem()Amerigo Wang2009-08-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This line looks suspicious, because if this is true, then the 'flags' parameter of function reserve_bootmem_generic() will be unused when !CONFIG_NUMA. I don't think this is what we want. Signed-off-by: WANG Cong <amwang@redhat.com> Cc: Yinghai Lu <yinghai@kernel.org> Cc: akpm@linux-foundation.org LKML-Reference: <20090821083709.5098.52505.sendpatchset@localhost.localdomain> Signed-off-by: Ingo Molnar <mingo@elte.hu>
| | * | x86: add vmlinux.lds to targets in arch/x86/boot/compressed/MakefileJan Beulich2009-08-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The absence of vmlinux.lds here keeps .vmlinux.lds.cmd from being included, which in turn leads to it and all its dependents always getting rebuilt independent of whether they are already up-to-date. Signed-off-by: Jan Beulich <jbeulich@novell.com> LKML-Reference: <4A8D84670200007800010D31@vpn.id2.novell.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| | * | Merge branch 'bugfix' of ↵Ingo Molnar2009-08-203-12/+18
| | |\ \ | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen into x86/urgent
| | | * | xen: rearrange things to fix stackprotectorJeremy Fitzhardinge2009-08-192-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure the stack-protector segment registers are properly set up before calling any functions which may have stack-protection compiled into them. [ Impact: prevent Xen early-boot crash when stack-protector is enabled ] Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>