sh: Bump up dma_ops initialization far earlier in the boot process.
Presently this was tacked on to the dma debug init bits from fs_initcall(), which is far too late for devices setting up their own per-device coherent areas. Throw this in the beginning of mem_init(), as per the x86 iommu allocation. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
parent
4c978ca319
commit
94c285108e
|
@ -27,8 +27,6 @@ EXPORT_SYMBOL(dma_ops);
|
||||||
static int __init dma_init(void)
|
static int __init dma_init(void)
|
||||||
{
|
{
|
||||||
dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES);
|
dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES);
|
||||||
|
|
||||||
no_iommu_init();
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
fs_initcall(dma_init);
|
fs_initcall(dma_init);
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#include <linux/pagemap.h>
|
#include <linux/pagemap.h>
|
||||||
#include <linux/percpu.h>
|
#include <linux/percpu.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
|
#include <linux/dma-mapping.h>
|
||||||
#include <asm/mmu_context.h>
|
#include <asm/mmu_context.h>
|
||||||
#include <asm/tlb.h>
|
#include <asm/tlb.h>
|
||||||
#include <asm/cacheflush.h>
|
#include <asm/cacheflush.h>
|
||||||
|
@ -186,11 +187,21 @@ void __init paging_init(void)
|
||||||
set_fixmap_nocache(FIX_UNCACHED, __pa(&__uncached_start));
|
set_fixmap_nocache(FIX_UNCACHED, __pa(&__uncached_start));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Early initialization for any I/O MMUs we might have.
|
||||||
|
*/
|
||||||
|
static void __init iommu_init(void)
|
||||||
|
{
|
||||||
|
no_iommu_init();
|
||||||
|
}
|
||||||
|
|
||||||
void __init mem_init(void)
|
void __init mem_init(void)
|
||||||
{
|
{
|
||||||
int codesize, datasize, initsize;
|
int codesize, datasize, initsize;
|
||||||
int nid;
|
int nid;
|
||||||
|
|
||||||
|
iommu_init();
|
||||||
|
|
||||||
num_physpages = 0;
|
num_physpages = 0;
|
||||||
high_memory = NULL;
|
high_memory = NULL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue