projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into gfs2
[powerpc.git]
/
arch
/
x86_64
/
kernel
/
pci-nommu.c
diff --git
a/arch/x86_64/kernel/pci-nommu.c
b/arch/x86_64/kernel/pci-nommu.c
index
1f6ecc6
..
df09ab0
100644
(file)
--- a/
arch/x86_64/kernel/pci-nommu.c
+++ b/
arch/x86_64/kernel/pci-nommu.c
@@
-4,6
+4,8
@@
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/string.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/string.h>
+#include <linux/dma-mapping.h>
+
#include <asm/proto.h>
#include <asm/processor.h>
#include <asm/dma.h>
#include <asm/proto.h>
#include <asm/processor.h>
#include <asm/dma.h>
@@
-12,10
+14,11
@@
static int
check_addr(char *name, struct device *hwdev, dma_addr_t bus, size_t size)
{
if (hwdev && bus + size > *hwdev->dma_mask) {
check_addr(char *name, struct device *hwdev, dma_addr_t bus, size_t size)
{
if (hwdev && bus + size > *hwdev->dma_mask) {
- if (*hwdev->dma_mask >=
0xffffffffULL
)
+ if (*hwdev->dma_mask >=
DMA_32BIT_MASK
)
printk(KERN_ERR
printk(KERN_ERR
- "nommu_%s: overflow %Lx+%lu of device mask %Lx\n",
- name, (long long)bus, size, (long long)*hwdev->dma_mask);
+ "nommu_%s: overflow %Lx+%zu of device mask %Lx\n",
+ name, (long long)bus, size,
+ (long long)*hwdev->dma_mask);
return 0;
}
return 1;
return 0;
}
return 1;
@@
-56,7
+59,6
@@
int nommu_map_sg(struct device *hwdev, struct scatterlist *sg,
{
int i;
{
int i;
- BUG_ON(direction == DMA_NONE);
for (i = 0; i < nents; i++ ) {
struct scatterlist *s = &sg[i];
BUG_ON(!s->page);
for (i = 0; i < nents; i++ ) {
struct scatterlist *s = &sg[i];
BUG_ON(!s->page);
@@
-89,5
+91,7
@@
void __init no_iommu_init(void)
{
if (dma_ops)
return;
{
if (dma_ops)
return;
+
+ force_iommu = 0; /* no HW IOMMU */
dma_ops = &nommu_dma_ops;
}
dma_ops = &nommu_dma_ops;
}