linux/arch/sparc/kernel/ioport.c
/*
 * Map a chunk of memory so that devices can see it.
 * CPU view of this memory may be inconsistent with
 * a device view and explicit flushing is necessary.
 */
Map a chunk of memory so that devices can see it.
CPU view of this memory may be inconsistent with
a device view and explicit flushing is necessary.
Map a chunk of memory so that devices can see it . CPU view of this memory may be inconsistent with a device view and explicit flushing is necessary .
static dma_addr_t sbus_map_page(struct device *dev, struct page *page,
				unsigned long offset, size_t len,
				enum dma_data_direction dir,
				unsigned long attrs)
{
	void *va = page_address(page) + offset;
	if (len <= 0) {
		return 0;
	}
	if (len > 256*1024) {			
		return 0;
	}
	return mmu_get_scsi_one(dev, va, len);
}
static dma_addr_t sbus_map_page ( struct device * dev , struct page * page , unsigned long offset , size_t len , enum dma_data_direction dir , unsigned long attrs ) { void * va = page_address ( page ) + offset ; if ( len <= 0 ) { return 0 ; } if ( len > 256 * 1024 ) { return 0 ; } return mmu_get_scsi_one ( dev , va , len ) ; }
Map a chunk of memory so that devices can see it.
Map a chunk of memory so that devices can see it .
/* XXX why are some lengths signed, others unsigned? */ /* XXX So what is maxphys for us and how do drivers know it? */ /* __get_free_pages() limit */