linux-2.6.33/__arm_ioremap_pfn()(arm)
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#rbaa18bd]
#backlinks
*説明 [#pa38e088]
-パス: [[linux-2.6.33/arch/arm/mm/ioremap.c]]
-FIXME: これは何?
--説明
**引数 [#h875a9e8]
-unsigned long pfn
--
-unsigned long offset
--
-size_t size
--
-unsigned int mtype
--
**返り値 [#w6b5e815]
-void __iomem *
--
--[[linux-2.6.33/__iomem]]
**参考 [#j8f93111]
*実装 [#oc484937]
/*
* Remap an arbitrary physical address space into the ke...
* address space. Needed when the kernel wants to access...
* directly.
*
* NOTE! We need to allow non-page-aligned mappings too:...
* have to convert them into an offset in a page-aligned...
* caller shouldn't need to know that small detail.
*
* 'flags' are the extra L_PTE_ flags that you want to s...
* mapping. See <asm/pgtable.h> for more information.
*/
void __iomem *
__arm_ioremap_pfn(unsigned long pfn, unsigned long offse...
unsigned int mtype)
{
const struct mem_type *type;
int err;
unsigned long addr;
struct vm_struct * area;
-
--[[linux-2.6.33/mem_type]]
-
--[[linux-2.6.33/vm_struct]]
/*
* High mappings must be supersection aligned
*/
if (pfn >= 0x100000 && (__pfn_to_phys(pfn) & ~SUPERSECT...
return NULL;
-
--[[linux-2.6.33/__pfn_to_phys()]]
-
--[[linux-2.6.33/SUPERSECTION_MASK]]
type = get_mem_type(mtype);
if (!type)
return NULL;
-
--[[linux-2.6.33/get_mem_type()]]
/*
* Page align the mapping size, taking account of any o...
*/
size = PAGE_ALIGN(offset + size);
-
--[[linux-2.6.33/PAGE_ALIGN()]]
area = get_vm_area(size, VM_IOREMAP);
if (!area)
return NULL;
addr = (unsigned long)area->addr;
-
--[[linux-2.6.33/get_vm_area()]]
-
--[[linux-2.6.33/VM_IOREMAP]]
#ifndef CONFIG_SMP
-smp 向けではないとき。
--[[linux-2.6.33/CONFIG_SMP]]
if (DOMAIN_IO == 0 &&
(((cpu_architecture() >= CPU_ARCH_ARMv6) && (get_cr...
cpu_is_xsc3()) && pfn >= 0x100000 &&
!((__pfn_to_phys(pfn) | size | addr) & ~SUPERSEC...
-
--[[linux-2.6.33/DOMAIN_IO]]
-
--[[linux-2.6.33/cpu_architecture()]]
-
--[[linux-2.6.33/CPU_ARCH_ARMV6]]
-
--[[linux-2.6.33/get_cr()]]
-
--[[linux-2.6.33/CR_XP]]
-
--[[linux-2.6.33/cpu_is_xsc3()]]
-
--[[linux-2.6.33/__pfn_to_phys()]]
-
--[[linux-2.6.33/SUPERSECTION_MASK]]
area->flags |= VM_ARM_SECTION_MAPPING;
err = remap_area_supersections(addr, pfn, size, type);
-
--[[linux-2.6.33/VM_ARM_SECTION_MAPPING]]
-
--[[linux-2.6.33/remap_area_supersections()]]
} else if (!((__pfn_to_phys(pfn) | size | addr) & ~PMD_...
-
--[[linux-2.6.33/PMD_MASK]]
area->flags |= VM_ARM_SECTION_MAPPING;
err = remap_area_sections(addr, pfn, size, type);
-
--[[linux-2.6.33/VM_ARM_SECTION_MAPPING]]
-
--[[linux-2.6.33/remap_area_sections()]]
} else
#endif
err = remap_area_pages(addr, pfn, size, type);
-
--[[linux-2.6.33/remap_area_pages()]]
if (err) {
vunmap((void *)addr);
return NULL;
-
--[[linux-2.6.33/vunmap()]]
}
flush_cache_vmap(addr, addr + size);
return (void __iomem *) (offset + addr);
-
--[[linux-2.6.33/flush_cache_vmap()]]
}
EXPORT_SYMBOL(__arm_ioremap_pfn);
-特にライセンスを区別せずシンボルを公開する。
--[[linux-2.6.33/EXPORT_SYMBOL()]]
*コメント [#b7e2091d]
終了行:
*参照元 [#rbaa18bd]
#backlinks
*説明 [#pa38e088]
-パス: [[linux-2.6.33/arch/arm/mm/ioremap.c]]
-FIXME: これは何?
--説明
**引数 [#h875a9e8]
-unsigned long pfn
--
-unsigned long offset
--
-size_t size
--
-unsigned int mtype
--
**返り値 [#w6b5e815]
-void __iomem *
--
--[[linux-2.6.33/__iomem]]
**参考 [#j8f93111]
*実装 [#oc484937]
/*
* Remap an arbitrary physical address space into the ke...
* address space. Needed when the kernel wants to access...
* directly.
*
* NOTE! We need to allow non-page-aligned mappings too:...
* have to convert them into an offset in a page-aligned...
* caller shouldn't need to know that small detail.
*
* 'flags' are the extra L_PTE_ flags that you want to s...
* mapping. See <asm/pgtable.h> for more information.
*/
void __iomem *
__arm_ioremap_pfn(unsigned long pfn, unsigned long offse...
unsigned int mtype)
{
const struct mem_type *type;
int err;
unsigned long addr;
struct vm_struct * area;
-
--[[linux-2.6.33/mem_type]]
-
--[[linux-2.6.33/vm_struct]]
/*
* High mappings must be supersection aligned
*/
if (pfn >= 0x100000 && (__pfn_to_phys(pfn) & ~SUPERSECT...
return NULL;
-
--[[linux-2.6.33/__pfn_to_phys()]]
-
--[[linux-2.6.33/SUPERSECTION_MASK]]
type = get_mem_type(mtype);
if (!type)
return NULL;
-
--[[linux-2.6.33/get_mem_type()]]
/*
* Page align the mapping size, taking account of any o...
*/
size = PAGE_ALIGN(offset + size);
-
--[[linux-2.6.33/PAGE_ALIGN()]]
area = get_vm_area(size, VM_IOREMAP);
if (!area)
return NULL;
addr = (unsigned long)area->addr;
-
--[[linux-2.6.33/get_vm_area()]]
-
--[[linux-2.6.33/VM_IOREMAP]]
#ifndef CONFIG_SMP
-smp 向けではないとき。
--[[linux-2.6.33/CONFIG_SMP]]
if (DOMAIN_IO == 0 &&
(((cpu_architecture() >= CPU_ARCH_ARMv6) && (get_cr...
cpu_is_xsc3()) && pfn >= 0x100000 &&
!((__pfn_to_phys(pfn) | size | addr) & ~SUPERSEC...
-
--[[linux-2.6.33/DOMAIN_IO]]
-
--[[linux-2.6.33/cpu_architecture()]]
-
--[[linux-2.6.33/CPU_ARCH_ARMV6]]
-
--[[linux-2.6.33/get_cr()]]
-
--[[linux-2.6.33/CR_XP]]
-
--[[linux-2.6.33/cpu_is_xsc3()]]
-
--[[linux-2.6.33/__pfn_to_phys()]]
-
--[[linux-2.6.33/SUPERSECTION_MASK]]
area->flags |= VM_ARM_SECTION_MAPPING;
err = remap_area_supersections(addr, pfn, size, type);
-
--[[linux-2.6.33/VM_ARM_SECTION_MAPPING]]
-
--[[linux-2.6.33/remap_area_supersections()]]
} else if (!((__pfn_to_phys(pfn) | size | addr) & ~PMD_...
-
--[[linux-2.6.33/PMD_MASK]]
area->flags |= VM_ARM_SECTION_MAPPING;
err = remap_area_sections(addr, pfn, size, type);
-
--[[linux-2.6.33/VM_ARM_SECTION_MAPPING]]
-
--[[linux-2.6.33/remap_area_sections()]]
} else
#endif
err = remap_area_pages(addr, pfn, size, type);
-
--[[linux-2.6.33/remap_area_pages()]]
if (err) {
vunmap((void *)addr);
return NULL;
-
--[[linux-2.6.33/vunmap()]]
}
flush_cache_vmap(addr, addr + size);
return (void __iomem *) (offset + addr);
-
--[[linux-2.6.33/flush_cache_vmap()]]
}
EXPORT_SYMBOL(__arm_ioremap_pfn);
-特にライセンスを区別せずシンボルを公開する。
--[[linux-2.6.33/EXPORT_SYMBOL()]]
*コメント [#b7e2091d]
ページ名: