Skip to content
Snippets Groups Projects
Select Git revision
  • 4dcfa60071b3d23f0181f27d8519f12e37cefbb9
  • vme-testing default
  • ci-test
  • master
  • remoteproc
  • am625-sk-ov5640
  • pcal6534-upstreaming
  • lps22df-upstreaming
  • msc-upstreaming
  • imx8mp
  • iio/noa1305
  • vme-next
  • vme-next-4.14-rc4
  • v4.14-rc4
  • v4.14-rc3
  • v4.14-rc2
  • v4.14-rc1
  • v4.13
  • vme-next-4.13-rc7
  • v4.13-rc7
  • v4.13-rc6
  • v4.13-rc5
  • v4.13-rc4
  • v4.13-rc3
  • v4.13-rc2
  • v4.13-rc1
  • v4.12
  • v4.12-rc7
  • v4.12-rc6
  • v4.12-rc5
  • v4.12-rc4
  • v4.12-rc3
32 results

init.c

Blame
    • Russell King's avatar
      4dcfa600
      ARM: DMA-API: better handing of DMA masks for coherent allocations · 4dcfa600
      Russell King authored
      
      We need to start treating DMA masks as something which is specific to
      the bus that the device resides on, otherwise we're going to hit all
      sorts of nasty issues with LPAE and 32-bit DMA controllers in >32-bit
      systems, where memory is offset from PFN 0.
      
      In order to start doing this, we convert the DMA mask to a PFN using
      the device specific dma_to_pfn() macro.  This is the reverse of the
      pfn_to_dma() macro which is used to get the DMA address for the device.
      
      This gives us a PFN mask, which we can then check against the PFN
      limit of the DMA zone.
      
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      4dcfa600
      History
      ARM: DMA-API: better handing of DMA masks for coherent allocations
      Russell King authored
      
      We need to start treating DMA masks as something which is specific to
      the bus that the device resides on, otherwise we're going to hit all
      sorts of nasty issues with LPAE and 32-bit DMA controllers in >32-bit
      systems, where memory is offset from PFN 0.
      
      In order to start doing this, we convert the DMA mask to a PFN using
      the device specific dma_to_pfn() macro.  This is the reverse of the
      pfn_to_dma() macro which is used to get the DMA address for the device.
      
      This gives us a PFN mask, which we can then check against the PFN
      limit of the DMA zone.
      
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
    init.c 17.99 KiB
    /*
     *  linux/arch/arm/mm/init.c
     *
     *  Copyright (C) 1995-2005 Russell King
     *
     * This program is free software; you can redistribute it and/or modify
     * it under the terms of the GNU General Public License version 2 as
     * published by the Free Software Foundation.
     */
    #include <linux/kernel.h>
    #include <linux/errno.h>
    #include <linux/swap.h>
    #include <linux/init.h>
    #include <linux/bootmem.h>
    #include <linux/mman.h>
    #include <linux/export.h>
    #include <linux/nodemask.h>
    #include <linux/initrd.h>
    #include <linux/of_fdt.h>
    #include <linux/of_reserved_mem.h>
    #include <linux/highmem.h>
    #include <linux/gfp.h>
    #include <linux/memblock.h>
    #include <linux/dma-contiguous.h>
    #include <linux/sizes.h>
    
    #include <asm/mach-types.h>
    #include <asm/memblock.h>
    #include <asm/prom.h>
    #include <asm/sections.h>
    #include <asm/setup.h>
    #include <asm/tlb.h>
    #include <asm/fixmap.h>
    
    #include <asm/mach/arch.h>
    #include <asm/mach/map.h>
    
    #include "mm.h"
    
    static phys_addr_t phys_initrd_start __initdata = 0;
    static unsigned long phys_initrd_size __initdata = 0;
    
    static int __init early_initrd(char *p)
    {
    	phys_addr_t start;
    	unsigned long size;
    	char *endp;
    
    	start = memparse(p, &endp);
    	if (*endp == ',') {
    		size = memparse(endp + 1, NULL);
    
    		phys_initrd_start = start;
    		phys_initrd_size = size;
    	}
    	return 0;
    }
    early_param("initrd", early_initrd);
    
    static int __init parse_tag_initrd(const struct tag *tag)
    {
    	printk(KERN_WARNING "ATAG_INITRD is deprecated; "
    		"please update your bootloader.\n");
    	phys_initrd_start = __virt_to_phys(tag->u.initrd.start);
    	phys_initrd_size = tag->u.initrd.size;
    	return 0;
    }
    
    __tagtable(ATAG_INITRD, parse_tag_initrd);