Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 16753
b: refs/heads/master
c: 313cbb5
h: refs/heads/master
i:
  16751: fe8e640
v: v3
  • Loading branch information
Rod Whitby authored and Russell King committed Jan 4, 2006
1 parent 53627bf commit 3853c51
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 24 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8d27e6992bc6a7ca7eaa1d29fb1a8d6cb6022c45
refs/heads/master: 313cbb5519405966e3e65fca86c0305ab24f2a3b
23 changes: 23 additions & 0 deletions trunk/arch/arm/mach-ixp4xx/common-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,29 @@ int dma_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size)
return (dev->bus == &pci_bus_type ) && ((dma_addr + size) >= SZ_64M);
}

/*
* Only first 64MB of memory can be accessed via PCI.
* We use GFP_DMA to allocate safe buffers to do map/unmap.
* This is really ugly and we need a better way of specifying
* DMA-capable regions of memory.
*/
void __init ixp4xx_adjust_zones(int node, unsigned long *zone_size,
unsigned long *zhole_size)
{
unsigned int sz = SZ_64M >> PAGE_SHIFT;

/*
* Only adjust if > 64M on current system
*/
if (node || (zone_size[0] <= sz))
return;

zone_size[1] = zone_size[0] - sz;
zone_size[0] = sz;
zhole_size[1] = zhole_size[0];
zhole_size[0] = 0;
}

void __init ixp4xx_pci_preinit(void)
{
unsigned long processor_id;
Expand Down
25 changes: 2 additions & 23 deletions trunk/include/asm-arm/arch-ixp4xx/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,10 @@

#ifndef __ASSEMBLY__

/*
* Only first 64MB of memory can be accessed via PCI.
* We use GFP_DMA to allocate safe buffers to do map/unmap.
* This is really ugly and we need a better way of specifying
* DMA-capable regions of memory.
*/
static inline void __arch_adjust_zones(int node, unsigned long *zone_size,
unsigned long *zhole_size)
{
unsigned int sz = SZ_64M >> PAGE_SHIFT;

/*
* Only adjust if > 64M on current system
*/
if (node || (zone_size[0] <= sz))
return;

zone_size[1] = zone_size[0] - sz;
zone_size[0] = sz;
zhole_size[1] = zhole_size[0];
zhole_size[0] = 0;
}
void ixp4xx_adjust_zones(int node, unsigned long *size, unsigned long *holes);

#define arch_adjust_zones(node, size, holes) \
__arch_adjust_zones(node, size, holes)
ixp4xx_adjust_zones(node, size, holes)

#define ISA_DMA_THRESHOLD (SZ_64M - 1)

Expand Down

0 comments on commit 3853c51

Please sign in to comment.