dma-mapping.c (cf6f3976045468049038cfc45586b8b16c33dd05) dma-mapping.c (a254129e8686bff7a340b58f35241b04927e81c0)
1/*
2 * linux/arch/arm/mm/dma-mapping.c
3 *
4 * Copyright (C) 2000-2004 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.

--- 12 unchanged lines hidden (view full) ---

21#include <linux/dma-contiguous.h>
22#include <linux/highmem.h>
23#include <linux/memblock.h>
24#include <linux/slab.h>
25#include <linux/iommu.h>
26#include <linux/io.h>
27#include <linux/vmalloc.h>
28#include <linux/sizes.h>
1/*
2 * linux/arch/arm/mm/dma-mapping.c
3 *
4 * Copyright (C) 2000-2004 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.

--- 12 unchanged lines hidden (view full) ---

21#include <linux/dma-contiguous.h>
22#include <linux/highmem.h>
23#include <linux/memblock.h>
24#include <linux/slab.h>
25#include <linux/iommu.h>
26#include <linux/io.h>
27#include <linux/vmalloc.h>
28#include <linux/sizes.h>
29#include <linux/cma.h>
29
30#include <asm/memory.h>
31#include <asm/highmem.h>
32#include <asm/cacheflush.h>
33#include <asm/tlbflush.h>
34#include <asm/mach/arch.h>
35#include <asm/dma-iommu.h>
36#include <asm/mach/map.h>

--- 419 unchanged lines hidden (view full) ---

456 continue;
457
458 map.pfn = __phys_to_pfn(start);
459 map.virtual = __phys_to_virt(start);
460 map.length = end - start;
461 map.type = MT_MEMORY_DMA_READY;
462
463 /*
30
31#include <asm/memory.h>
32#include <asm/highmem.h>
33#include <asm/cacheflush.h>
34#include <asm/tlbflush.h>
35#include <asm/mach/arch.h>
36#include <asm/dma-iommu.h>
37#include <asm/mach/map.h>

--- 419 unchanged lines hidden (view full) ---

457 continue;
458
459 map.pfn = __phys_to_pfn(start);
460 map.virtual = __phys_to_virt(start);
461 map.length = end - start;
462 map.type = MT_MEMORY_DMA_READY;
463
464 /*
464 * Clear previous low-memory mapping
465 * Clear previous low-memory mapping to ensure that the
466 * TLB does not see any conflicting entries, then flush
467 * the TLB of the old entries before creating new mappings.
468 *
469 * This ensures that any speculatively loaded TLB entries
470 * (even though they may be rare) can not cause any problems,
471 * and ensures that this code is architecturally compliant.
465 */
466 for (addr = __phys_to_virt(start); addr < __phys_to_virt(end);
467 addr += PMD_SIZE)
468 pmd_clear(pmd_off_k(addr));
469
472 */
473 for (addr = __phys_to_virt(start); addr < __phys_to_virt(end);
474 addr += PMD_SIZE)
475 pmd_clear(pmd_off_k(addr));
476
477 flush_tlb_kernel_range(__phys_to_virt(start),
478 __phys_to_virt(end));
479
470 iotable_init(&map, 1);
471 }
472}
473
474static int __dma_update_pte(pte_t *pte, pgtable_t token, unsigned long addr,
475 void *data)
476{
477 struct page *page = virt_to_page(addr);

--- 1606 unchanged lines hidden ---
480 iotable_init(&map, 1);
481 }
482}
483
484static int __dma_update_pte(pte_t *pte, pgtable_t token, unsigned long addr,
485 void *data)
486{
487 struct page *page = virt_to_page(addr);

--- 1606 unchanged lines hidden ---