Joerg Roedel
c6da992e16
x86, AMD IOMMU: add amd_iommu.h to export functions to the generic x86 dma code
...
This patch adds the amd_iommu.h file which will be included in the generic
code.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com >
Cc: iommu@lists.linux-foundation.org
Cc: bhavna.sarathy@amd.com
Cc: Sebastian.Biemueller@amd.com
Cc: robert.richter@amd.com
Cc: joro@8bytes.org
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-06-27 10:12:21 +02:00
Joerg Roedel
6631ee9d00
x86, AMD IOMMU: add dma_ops initialization function
...
This patch adds the function to initialize the dma_ops for the AMD IOMMU.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com >
Cc: iommu@lists.linux-foundation.org
Cc: bhavna.sarathy@amd.com
Cc: Sebastian.Biemueller@amd.com
Cc: robert.richter@amd.com
Cc: joro@8bytes.org
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-06-27 10:12:20 +02:00
Joerg Roedel
c432f3df8e
x86, AMD IOMMU: add pre-allocation of protection domains
...
This patch adds a function to pre-allocate protection domains. So we don't have
to allocate it on the first request for a device (which can happen in atomic
mode).
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com >
Cc: iommu@lists.linux-foundation.org
Cc: bhavna.sarathy@amd.com
Cc: Sebastian.Biemueller@amd.com
Cc: robert.richter@amd.com
Cc: joro@8bytes.org
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-06-27 10:12:20 +02:00
Joerg Roedel
5d8b53cf3f
x86, AMD IOMMU: add mapping functions for coherent mappings
...
This patch adds the dma_ops functions for coherent mappings.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com >
Cc: iommu@lists.linux-foundation.org
Cc: bhavna.sarathy@amd.com
Cc: Sebastian.Biemueller@amd.com
Cc: robert.richter@amd.com
Cc: joro@8bytes.org
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-06-27 10:12:19 +02:00
Joerg Roedel
65b050adbf
x86, AMD IOMMU: add mapping functions for scatter gather lists
...
This patch adds the dma_ops functions for mapping and unmapping scatter gather
lists.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com >
Cc: iommu@lists.linux-foundation.org
Cc: bhavna.sarathy@amd.com
Cc: Sebastian.Biemueller@amd.com
Cc: robert.richter@amd.com
Cc: joro@8bytes.org
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-06-27 10:12:19 +02:00
Joerg Roedel
4da70b9e4f
x86, AMD IOMMU: add dma_ops mapping functions for single mappings
...
This patch adds the dma_ops specific mapping functions for single mappings.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com >
Cc: iommu@lists.linux-foundation.org
Cc: bhavna.sarathy@amd.com
Cc: Sebastian.Biemueller@amd.com
Cc: robert.richter@amd.com
Cc: joro@8bytes.org
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-06-27 10:12:18 +02:00
Joerg Roedel
cb76c32297
x86, AMD IOMMU: add generic dma_ops mapping functions
...
This patch adds the generic functions to map and unmap pages to a protection
domain for dma_ops usage.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com >
Cc: iommu@lists.linux-foundation.org
Cc: bhavna.sarathy@amd.com
Cc: Sebastian.Biemueller@amd.com
Cc: robert.richter@amd.com
Cc: joro@8bytes.org
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-06-27 10:12:18 +02:00
Joerg Roedel
b20ac0d4d6
x86, AMD IOMMU: add functions to find IOMMU device resources
...
This patch adds functions necessary to find the IOMMU resources for a specific
device.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com >
Cc: iommu@lists.linux-foundation.org
Cc: bhavna.sarathy@amd.com
Cc: Sebastian.Biemueller@amd.com
Cc: robert.richter@amd.com
Cc: joro@8bytes.org
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-06-27 10:12:17 +02:00
Joerg Roedel
ec487d1a11
x86, AMD IOMMU: add domain allocation and deallocation functions
...
This patch adds the functions to allocate and free protection domains for the
IOMMU.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com >
Cc: iommu@lists.linux-foundation.org
Cc: bhavna.sarathy@amd.com
Cc: Sebastian.Biemueller@amd.com
Cc: robert.richter@amd.com
Cc: joro@8bytes.org
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-06-27 10:12:17 +02:00
Joerg Roedel
d3086444b2
x86, AMD IOMMU: add address allocation and deallocation functions
...
This patch adds the address allocator to the AMD IOMMU code.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com >
Cc: iommu@lists.linux-foundation.org
Cc: bhavna.sarathy@amd.com
Cc: Sebastian.Biemueller@amd.com
Cc: robert.richter@amd.com
Cc: joro@8bytes.org
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-06-27 10:12:16 +02:00
Joerg Roedel
bd0e521158
x86, AMD IOMMU: add functions to initialize unity mappings
...
This patch adds the functions which will initialize the unity mappings in the
device page tables.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com >
Cc: iommu@lists.linux-foundation.org
Cc: bhavna.sarathy@amd.com
Cc: Sebastian.Biemueller@amd.com
Cc: robert.richter@amd.com
Cc: joro@8bytes.org
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-06-27 10:12:16 +02:00
Joerg Roedel
a19ae1eccf
x86, AMD IOMMU: add functions to send IOMMU commands
...
This patch adds generic handling function as well as all functions to send
specific commands to the IOMMU hardware as required by this driver.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com >
Cc: iommu@lists.linux-foundation.org
Cc: bhavna.sarathy@amd.com
Cc: Sebastian.Biemueller@amd.com
Cc: robert.richter@amd.com
Cc: joro@8bytes.org
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-06-27 10:12:15 +02:00
Joerg Roedel
000fca2dfc
x86, AMD IOMMU: add amd_iommu.c to Makefile
...
This patch adds the new amd_iommu.c file to the architecture kernel Makefile
for x86.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com >
Cc: iommu@lists.linux-foundation.org
Cc: bhavna.sarathy@amd.com
Cc: Sebastian.Biemueller@amd.com
Cc: robert.richter@amd.com
Cc: joro@8bytes.org
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-06-27 10:12:15 +02:00
Joerg Roedel
b6c02715cf
x86, AMD IOMMU: add generic defines and structures for mapping code
...
This patch adds generic stuff used by the mapping and unmapping code for the
AMD IOMMU.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com >
Cc: iommu@lists.linux-foundation.org
Cc: bhavna.sarathy@amd.com
Cc: Sebastian.Biemueller@amd.com
Cc: robert.richter@amd.com
Cc: joro@8bytes.org
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-06-27 10:12:14 +02:00
Joerg Roedel
918ad6c54d
x86, AMD IOMMU: add kernel command line parameters for AMD IOMMU
...
This patch adds two parameters to the kernel command line to control behavior
of the AMD IOMMU.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com >
Cc: iommu@lists.linux-foundation.org
Cc: bhavna.sarathy@amd.com
Cc: Sebastian.Biemueller@amd.com
Cc: robert.richter@amd.com
Cc: joro@8bytes.org
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-06-27 10:12:14 +02:00
Joerg Roedel
ae7877de9c
x86, AMD IOMMU: add early detection code
...
This patch adds code to detect an AMD IOMMU early during boot before the early
detection code of other IOMMUs run.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com >
Cc: iommu@lists.linux-foundation.org
Cc: bhavna.sarathy@amd.com
Cc: Sebastian.Biemueller@amd.com
Cc: robert.richter@amd.com
Cc: joro@8bytes.org
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-06-27 10:12:13 +02:00
Joerg Roedel
fe74c9cf39
x86, AMD IOMMU: clue initialization code together
...
This patch puts the AMD IOMMU ACPI table parsing and hardware initialization
functions together to the main intialization routine.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com >
Cc: iommu@lists.linux-foundation.org
Cc: bhavna.sarathy@amd.com
Cc: Sebastian.Biemueller@amd.com
Cc: robert.richter@amd.com
Cc: joro@8bytes.org
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-06-27 10:12:13 +02:00
Joerg Roedel
be2a022c0d
x86, AMD IOMMU: add functions to parse IOMMU memory mapping requirements for devices
...
This patch adds the functions to parse the information about IOMMU exclusion
ranges and required unity mappings for the devices handled by the IOMMU.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com >
Cc: iommu@lists.linux-foundation.org
Cc: bhavna.sarathy@amd.com
Cc: Sebastian.Biemueller@amd.com
Cc: robert.richter@amd.com
Cc: joro@8bytes.org
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-06-27 10:12:12 +02:00
Joerg Roedel
e47d402d2d
x86, AMD IOMMU: add detect code for AMD IOMMU hardware
...
This patch adds the detection of AMD IOMMU hardware provided on information
from ACPI provided by the BIOS.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com >
Cc: iommu@lists.linux-foundation.org
Cc: bhavna.sarathy@amd.com
Cc: Sebastian.Biemueller@amd.com
Cc: robert.richter@amd.com
Cc: joro@8bytes.org
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-06-27 10:12:12 +02:00
Joerg Roedel
5d0c8e49f8
x86, AMD IOMMU: add functions for IOMMU hardware initialization from ACPI
...
This patch adds functions to initialize the IOMMU hardware with information
from ACPI and PCI.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com >
Cc: iommu@lists.linux-foundation.org
Cc: bhavna.sarathy@amd.com
Cc: Sebastian.Biemueller@amd.com
Cc: robert.richter@amd.com
Cc: joro@8bytes.org
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-06-27 10:12:11 +02:00
Joerg Roedel
3566b7786a
x86, AMD IOMMU: add device table initialization functions
...
This patch adds functions necessary to initialize the device table from the
ACPI definitions.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com >
Cc: iommu@lists.linux-foundation.org
Cc: bhavna.sarathy@amd.com
Cc: Sebastian.Biemueller@amd.com
Cc: robert.richter@amd.com
Cc: joro@8bytes.org
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-06-27 10:12:11 +02:00
Joerg Roedel
b36ca91e1d
x86, AMD IOMMU: add command buffer (de-)allocation
...
This patch adds the functions to allocate and deallocate the command buffer for
one IOMMU in the system.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com >
Cc: iommu@lists.linux-foundation.org
Cc: bhavna.sarathy@amd.com
Cc: Sebastian.Biemueller@amd.com
Cc: robert.richter@amd.com
Cc: joro@8bytes.org
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-06-27 10:12:10 +02:00
Joerg Roedel
b2026aa2dc
x86, AMD IOMMU: add functions for programming IOMMU MMIO space
...
This patch adds the functions required to programm the IOMMU with the MMIO
space.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com >
Cc: iommu@lists.linux-foundation.org
Cc: bhavna.sarathy@amd.com
Cc: Sebastian.Biemueller@amd.com
Cc: robert.richter@amd.com
Cc: joro@8bytes.org
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-06-27 10:12:10 +02:00
Joerg Roedel
6c56747b46
x86, AMD IOMMU: add functions for mapping/unmapping the MMIO space
...
This patch contains two functions to map and unmap the MMIO region of an IOMMU.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com >
Cc: iommu@lists.linux-foundation.org
Cc: bhavna.sarathy@amd.com
Cc: Sebastian.Biemueller@amd.com
Cc: robert.richter@amd.com
Cc: joro@8bytes.org
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-06-27 10:12:09 +02:00
Joerg Roedel
ca7ed057ae
x86, AMD IOMMU: add amd_iommu_init.c to Makefile
...
This patch adds the source file amd_iommu_init.c to the kernel Makefile for the
x86 architecture.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com >
Cc: iommu@lists.linux-foundation.org
Cc: bhavna.sarathy@amd.com
Cc: Sebastian.Biemueller@amd.com
Cc: robert.richter@amd.com
Cc: joro@8bytes.org
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-06-27 10:12:09 +02:00
Joerg Roedel
3e8064ba59
x86, AMD IOMMU: add functions to find last possible PCI device for IOMMU
...
This patch adds functions to find the last PCI bus/device/function the IOMMU
driver has to handle. This information is used later to allocate the memory for
the data structures.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com >
Cc: iommu@lists.linux-foundation.org
Cc: bhavna.sarathy@amd.com
Cc: Sebastian.Biemueller@amd.com
Cc: robert.richter@amd.com
Cc: joro@8bytes.org
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-06-27 10:12:08 +02:00
Joerg Roedel
928abd2545
x86, AMD IOMMU: add data structures to manage the IOMMUs in the system
...
This patch adds the data structures which will contain the information read
from the ACPI table.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com >
Cc: iommu@lists.linux-foundation.org
Cc: bhavna.sarathy@amd.com
Cc: Sebastian.Biemueller@amd.com
Cc: robert.richter@amd.com
Cc: joro@8bytes.org
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-06-27 10:12:08 +02:00
Joerg Roedel
f6e2e6b6fc
x86, AMD IOMMU: add defines and structures for ACPI scanning code
...
This patch adds the required data structures and constants required to parse
the ACPI table for the AMD IOMMU.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com >
Cc: iommu@lists.linux-foundation.org
Cc: bhavna.sarathy@amd.com
Cc: Sebastian.Biemueller@amd.com
Cc: robert.richter@amd.com
Cc: joro@8bytes.org
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-06-27 10:12:07 +02:00
Pavel Machek
fa3d319ac6
pci-gart_64.c: could we get better explanation?
...
Add better explanation to pci-gart.
Signed-off-by: Pavel Machek <pavel@suse.cz >
Cc: Dave Jones <davej@codemonkey.org.uk >
Cc: Andi Kleen <andi@firstfloor.org >
Cc: Trivial patch monkey <trivial@kernel.org >
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-06-26 15:17:18 +02:00
Jens Axboe
15c8b6c1aa
on_each_cpu(): kill unused 'retry' parameter
...
It's not even passed on to smp_call_function() anymore, since that
was removed. So kill it.
Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com >
Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com >
Signed-off-by: Jens Axboe <jens.axboe@oracle.com >
2008-06-26 11:24:38 +02:00
Jens Axboe
8691e5a8f6
smp_call_function: get rid of the unused nonatomic/retry argument
...
It's never used and the comments refer to nonatomic and retry
interchangably. So get rid of it.
Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com >
Signed-off-by: Jens Axboe <jens.axboe@oracle.com >
2008-06-26 11:24:35 +02:00
Jens Axboe
3b16cf8748
x86: convert to generic helpers for IPI function calls
...
This converts x86, x86-64, and xen to use the new helpers for
smp_call_function() and friends, and adds support for
smp_call_function_single().
Acked-by: Ingo Molnar <mingo@elte.hu >
Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com >
Signed-off-by: Jens Axboe <jens.axboe@oracle.com >
2008-06-26 11:21:54 +02:00
Jeremy Fitzhardinge
08b882c627
paravirt: add hooks for ptep_modify_prot_start/commit
...
This patch adds paravirt-ops hooks in pv_mmu_ops for ptep_modify_prot_start and
ptep_modify_prot_commit. This allows the hypervisor-specific backends to
implement these in some more efficient way.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com >
Acked-by: Linus Torvalds <torvalds@linux-foundation.org >
Acked-by: Hugh Dickins <hugh@veritas.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-06-25 15:16:00 +02:00
Ingo Molnar
f6477cc76c
Merge branch 'linus' into x86/timers
2008-06-25 12:36:55 +02:00
Ingo Molnar
da7878d75b
Merge branch 'linus' into x86/pebs
2008-06-25 12:32:01 +02:00
Ingo Molnar
8700600a74
Merge branch 'linus' into x86/nmi
2008-06-25 12:31:28 +02:00
Ingo Molnar
cbd6712406
Merge branch 'linus' into x86/irq
2008-06-25 12:30:49 +02:00
Ingo Molnar
48cf937f48
Merge branch 'linus' into x86/i8259
2008-06-25 12:30:33 +02:00
Ingo Molnar
037a6079eb
Merge branch 'linus' into x86/gart
2008-06-25 12:30:26 +02:00
Ingo Molnar
8b7ef4ec5b
Merge branch 'linus' into x86/fixmap
2008-06-25 12:30:21 +02:00
Ingo Molnar
28f73e51d0
Merge branch 'linus' into x86/delay
...
Conflicts:
arch/x86/kernel/tsc_32.c
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-06-25 12:30:10 +02:00
Ingo Molnar
1262b0088f
Merge branch 'linus' into x86/cleanups
2008-06-25 12:29:32 +02:00
Ingo Molnar
97e6722b8d
Merge branch 'linus' into tracing/ftrace
2008-06-25 12:27:56 +02:00
Ingo Molnar
5ce001b0e5
Merge branch 'linus' into stackprotector
2008-06-25 12:27:29 +02:00
Ingo Molnar
d02859ecb3
Merge commit 'v2.6.26-rc8' into x86/xen
...
Conflicts:
arch/x86/xen/enlighten.c
arch/x86/xen/mmu.c
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-06-25 12:16:51 +02:00
Gerd Hoffmann
f6e16d5ad4
x86: KVM guest: Use the paravirt clocksource structs and functions
...
This patch updates the kvm host code to use the pvclock structs
and functions, thereby making it compatible with Xen.
The patch also fixes an initialization bug: on SMP systems the
per-cpu has two different locations early at boot and after CPU
bringup. kvmclock must take that in account when registering the
physical address within the host.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
Signed-off-by: Avi Kivity <avi@qumranet.com >
2008-06-24 21:02:33 +03:00
Gerd Hoffmann
7af192c954
x86: Add structs and functions for paravirt clocksource
...
This patch adds structs for the paravirt clocksource ABI
used by both xen and kvm (pvclock-abi.h).
It also adds some helper functions to read system time and
wall clock time from a paravirtual clocksource (pvclock.[ch]).
They are based on the xen code. They are enabled using
CONFIG_PARAVIRT_CLOCK.
Subsequent patches of this series will put the code in use.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com >
Signed-off-by: Avi Kivity <avi@qumranet.com >
2008-06-24 21:02:31 +03:00
WANG Cong
378fc6eedc
x86: arch/x86/kernel/machine_kexec_32.c: remove extra semicolons
...
I can't see any reason to keep these semicolons.
Signed-off-by: WANG Cong <wangcong@zeuux.org >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-06-24 18:37:49 +02:00
Alok Kataria
f3f3149f35
x86: use cpu_khz for loops_per_jiffy calculation, cleanup
...
As suggested by Ingo, remove all references to tsc from init/calibrate.c
TSC is x86 specific, and using tsc in variable names in a generic file should
be avoided. lpj_tsc is now called lpj_fine, since it is related to fine tuning
of lpj value. Also tsc_rate_* is called timer_rate_*
Signed-off-by: Alok N Kataria <akataria@vmware.com >
Cc: Arjan van de Ven <arjan@infradead.org >
Cc: Daniel Hecht <dhecht@vmware.com >
Cc: Tim Mann <mann@vmware.com >
Cc: Zach Amsden <zach@vmware.com >
Cc: Sahil Rihan <srihan@vmware.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-06-24 13:53:46 +02:00
Ingo Molnar
6ff10de374
x86: fix "x86: use cpu_khz for loops_per_jiffy calculation"
...
fix:
arch/x86/kernel/tsc_32.c: In function ‘tsc_init':
arch/x86/kernel/tsc_32.c:421: error: ‘lpj_tsc' undeclared (first use in this function)
arch/x86/kernel/tsc_32.c:421: error: (Each undeclared identifier is reported only once
arch/x86/kernel/tsc_32.c:421: error: for each function it appears in.)
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-06-24 09:29:03 +02:00