Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
3e5621ed
Commit
3e5621ed
authored
Dec 23, 2008
by
Ingo Molnar
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'x86/iommu' into x86/core
parents
be9a1d3c
181de82e
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
42 additions
and
48 deletions
+42
-48
arch/x86/Kconfig
arch/x86/Kconfig
+1
-1
arch/x86/include/asm/dma-mapping.h
arch/x86/include/asm/dma-mapping.h
+0
-2
arch/x86/include/asm/gart.h
arch/x86/include/asm/gart.h
+33
-0
arch/x86/include/asm/io.h
arch/x86/include/asm/io.h
+0
-2
arch/x86/include/asm/io_64.h
arch/x86/include/asm/io_64.h
+0
-2
arch/x86/include/asm/iommu.h
arch/x86/include/asm/iommu.h
+0
-33
arch/x86/kernel/amd_iommu.c
arch/x86/kernel/amd_iommu.c
+1
-0
arch/x86/kernel/amd_iommu_init.c
arch/x86/kernel/amd_iommu_init.c
+1
-0
arch/x86/kernel/aperture_64.c
arch/x86/kernel/aperture_64.c
+3
-2
arch/x86/kernel/early-quirks.c
arch/x86/kernel/early-quirks.c
+1
-0
arch/x86/kernel/pci-dma.c
arch/x86/kernel/pci-dma.c
+1
-6
arch/x86/kernel/setup.c
arch/x86/kernel/setup.c
+1
-0
No files found.
arch/x86/Kconfig
View file @
3e5621ed
...
@@ -563,7 +563,7 @@ config AMD_IOMMU
...
@@ -563,7 +563,7 @@ config AMD_IOMMU
# need this always selected by IOMMU for the VIA workaround
# need this always selected by IOMMU for the VIA workaround
config SWIOTLB
config SWIOTLB
bool
def_bool y if X86_64
help
help
Support for software bounce buffers used on x86-64 systems
Support for software bounce buffers used on x86-64 systems
which don't have a hardware IOMMU (e.g. the current generation
which don't have a hardware IOMMU (e.g. the current generation
...
...
arch/x86/include/asm/dma-mapping.h
View file @
3e5621ed
...
@@ -71,12 +71,10 @@ static inline struct dma_mapping_ops *get_dma_ops(struct device *dev)
...
@@ -71,12 +71,10 @@ static inline struct dma_mapping_ops *get_dma_ops(struct device *dev)
/* Make sure we keep the same behaviour */
/* Make sure we keep the same behaviour */
static
inline
int
dma_mapping_error
(
struct
device
*
dev
,
dma_addr_t
dma_addr
)
static
inline
int
dma_mapping_error
(
struct
device
*
dev
,
dma_addr_t
dma_addr
)
{
{
#ifdef CONFIG_X86_64
struct
dma_mapping_ops
*
ops
=
get_dma_ops
(
dev
);
struct
dma_mapping_ops
*
ops
=
get_dma_ops
(
dev
);
if
(
ops
->
mapping_error
)
if
(
ops
->
mapping_error
)
return
ops
->
mapping_error
(
dev
,
dma_addr
);
return
ops
->
mapping_error
(
dev
,
dma_addr
);
#endif
return
(
dma_addr
==
bad_dma_address
);
return
(
dma_addr
==
bad_dma_address
);
}
}
...
...
arch/x86/include/asm/gart.h
View file @
3e5621ed
...
@@ -29,6 +29,39 @@ extern int fix_aperture;
...
@@ -29,6 +29,39 @@ extern int fix_aperture;
#define AMD64_GARTCACHECTL 0x9c
#define AMD64_GARTCACHECTL 0x9c
#define AMD64_GARTEN (1<<0)
#define AMD64_GARTEN (1<<0)
#ifdef CONFIG_GART_IOMMU
extern
int
gart_iommu_aperture
;
extern
int
gart_iommu_aperture_allowed
;
extern
int
gart_iommu_aperture_disabled
;
extern
void
early_gart_iommu_check
(
void
);
extern
void
gart_iommu_init
(
void
);
extern
void
gart_iommu_shutdown
(
void
);
extern
void
__init
gart_parse_options
(
char
*
);
extern
void
gart_iommu_hole_init
(
void
);
#else
#define gart_iommu_aperture 0
#define gart_iommu_aperture_allowed 0
#define gart_iommu_aperture_disabled 1
static
inline
void
early_gart_iommu_check
(
void
)
{
}
static
inline
void
gart_iommu_init
(
void
)
{
}
static
inline
void
gart_iommu_shutdown
(
void
)
{
}
static
inline
void
gart_parse_options
(
char
*
options
)
{
}
static
inline
void
gart_iommu_hole_init
(
void
)
{
}
#endif
extern
int
agp_amd64_init
(
void
);
extern
int
agp_amd64_init
(
void
);
static
inline
void
enable_gart_translation
(
struct
pci_dev
*
dev
,
u64
addr
)
static
inline
void
enable_gart_translation
(
struct
pci_dev
*
dev
,
u64
addr
)
...
...
arch/x86/include/asm/io.h
View file @
3e5621ed
...
@@ -80,8 +80,6 @@ static inline void writeq(__u64 val, volatile void __iomem *addr)
...
@@ -80,8 +80,6 @@ static inline void writeq(__u64 val, volatile void __iomem *addr)
#define readq readq
#define readq readq
#define writeq writeq
#define writeq writeq
extern
int
iommu_bio_merge
;
#ifdef CONFIG_X86_32
#ifdef CONFIG_X86_32
# include "io_32.h"
# include "io_32.h"
#else
#else
...
...
arch/x86/include/asm/io_64.h
View file @
3e5621ed
...
@@ -232,8 +232,6 @@ void memset_io(volatile void __iomem *a, int b, size_t c);
...
@@ -232,8 +232,6 @@ void memset_io(volatile void __iomem *a, int b, size_t c);
#define flush_write_buffers()
#define flush_write_buffers()
#define BIO_VMERGE_BOUNDARY iommu_bio_merge
/*
/*
* Convert a virtual cached pointer to an uncached pointer
* Convert a virtual cached pointer to an uncached pointer
*/
*/
...
...
arch/x86/include/asm/iommu.h
View file @
3e5621ed
...
@@ -12,37 +12,4 @@ extern unsigned long iommu_nr_pages(unsigned long addr, unsigned long len);
...
@@ -12,37 +12,4 @@ extern unsigned long iommu_nr_pages(unsigned long addr, unsigned long len);
/* 10 seconds */
/* 10 seconds */
#define DMAR_OPERATION_TIMEOUT ((cycles_t) tsc_khz*10*1000)
#define DMAR_OPERATION_TIMEOUT ((cycles_t) tsc_khz*10*1000)
#ifdef CONFIG_GART_IOMMU
extern
int
gart_iommu_aperture
;
extern
int
gart_iommu_aperture_allowed
;
extern
int
gart_iommu_aperture_disabled
;
extern
void
early_gart_iommu_check
(
void
);
extern
void
gart_iommu_init
(
void
);
extern
void
gart_iommu_shutdown
(
void
);
extern
void
__init
gart_parse_options
(
char
*
);
extern
void
gart_iommu_hole_init
(
void
);
#else
#define gart_iommu_aperture 0
#define gart_iommu_aperture_allowed 0
#define gart_iommu_aperture_disabled 1
static
inline
void
early_gart_iommu_check
(
void
)
{
}
static
inline
void
gart_iommu_init
(
void
)
{
}
static
inline
void
gart_iommu_shutdown
(
void
)
{
}
static
inline
void
gart_parse_options
(
char
*
options
)
{
}
static
inline
void
gart_iommu_hole_init
(
void
)
{
}
#endif
#endif
/* _ASM_X86_IOMMU_H */
#endif
/* _ASM_X86_IOMMU_H */
arch/x86/kernel/amd_iommu.c
View file @
3e5621ed
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#include <linux/iommu-helper.h>
#include <linux/iommu-helper.h>
#include <asm/proto.h>
#include <asm/proto.h>
#include <asm/iommu.h>
#include <asm/iommu.h>
#include <asm/gart.h>
#include <asm/amd_iommu_types.h>
#include <asm/amd_iommu_types.h>
#include <asm/amd_iommu.h>
#include <asm/amd_iommu.h>
...
...
arch/x86/kernel/amd_iommu_init.c
View file @
3e5621ed
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#include <asm/amd_iommu_types.h>
#include <asm/amd_iommu_types.h>
#include <asm/amd_iommu.h>
#include <asm/amd_iommu.h>
#include <asm/iommu.h>
#include <asm/iommu.h>
#include <asm/gart.h>
/*
/*
* definitions for the ACPI scanning code
* definitions for the ACPI scanning code
...
...
arch/x86/kernel/aperture_64.c
View file @
3e5621ed
/*
/*
* Firmware replacement code.
* Firmware replacement code.
*
*
* Work around broken BIOSes that don't set an aperture or only set the
* Work around broken BIOSes that don't set an aperture, only set the
* aperture in the AGP bridge.
* aperture in the AGP bridge, or set too small aperture.
*
* If all fails map the aperture over some low memory. This is cheaper than
* If all fails map the aperture over some low memory. This is cheaper than
* doing bounce buffering. The memory is lost. This is done at early boot
* doing bounce buffering. The memory is lost. This is done at early boot
* because only the bootmem allocator can allocate 32+MB.
* because only the bootmem allocator can allocate 32+MB.
...
...
arch/x86/kernel/early-quirks.c
View file @
3e5621ed
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
#include <asm/io_apic.h>
#include <asm/io_apic.h>
#include <asm/apic.h>
#include <asm/apic.h>
#include <asm/iommu.h>
#include <asm/iommu.h>
#include <asm/gart.h>
static
void
__init
fix_hypertransport_config
(
int
num
,
int
slot
,
int
func
)
static
void
__init
fix_hypertransport_config
(
int
num
,
int
slot
,
int
func
)
{
{
...
...
arch/x86/kernel/pci-dma.c
View file @
3e5621ed
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
#include <asm/proto.h>
#include <asm/proto.h>
#include <asm/dma.h>
#include <asm/dma.h>
#include <asm/iommu.h>
#include <asm/iommu.h>
#include <asm/gart.h>
#include <asm/calgary.h>
#include <asm/calgary.h>
#include <asm/amd_iommu.h>
#include <asm/amd_iommu.h>
...
@@ -30,11 +31,6 @@ int no_iommu __read_mostly;
...
@@ -30,11 +31,6 @@ int no_iommu __read_mostly;
/* Set this to 1 if there is a HW IOMMU in the system */
/* Set this to 1 if there is a HW IOMMU in the system */
int
iommu_detected
__read_mostly
=
0
;
int
iommu_detected
__read_mostly
=
0
;
/* This tells the BIO block layer to assume merging. Default to off
because we cannot guarantee merging later. */
int
iommu_bio_merge
__read_mostly
=
0
;
EXPORT_SYMBOL
(
iommu_bio_merge
);
dma_addr_t
bad_dma_address
__read_mostly
=
0
;
dma_addr_t
bad_dma_address
__read_mostly
=
0
;
EXPORT_SYMBOL
(
bad_dma_address
);
EXPORT_SYMBOL
(
bad_dma_address
);
...
@@ -188,7 +184,6 @@ static __init int iommu_setup(char *p)
...
@@ -188,7 +184,6 @@ static __init int iommu_setup(char *p)
}
}
if
(
!
strncmp
(
p
,
"biomerge"
,
8
))
{
if
(
!
strncmp
(
p
,
"biomerge"
,
8
))
{
iommu_bio_merge
=
4096
;
iommu_merge
=
1
;
iommu_merge
=
1
;
force_iommu
=
1
;
force_iommu
=
1
;
}
}
...
...
arch/x86/kernel/setup.c
View file @
3e5621ed
...
@@ -93,6 +93,7 @@
...
@@ -93,6 +93,7 @@
#include <asm/desc.h>
#include <asm/desc.h>
#include <asm/dma.h>
#include <asm/dma.h>
#include <asm/iommu.h>
#include <asm/iommu.h>
#include <asm/gart.h>
#include <asm/mmu_context.h>
#include <asm/mmu_context.h>
#include <asm/proto.h>
#include <asm/proto.h>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment