K2LL33D SHELL

 Apache/2.4.7 (Ubuntu)
 Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64
 uid=33(www-data) gid=33(www-data) groups=33(www-data)
 safemode : OFF
 MySQL: ON | Perl: ON | cURL: OFF | WGet: ON
  >  / usr / src / linux-headers-3.13.0-24 / arch / frv / include / asm /
server ip : 172.67.156.115

your ip : 172.70.80.170

H O M E


Filename/usr/src/linux-headers-3.13.0-24/arch/frv/include/asm/virtconvert.h
Size1.09 kb
Permissionrw-r--r--
Ownerroot : root
Create time27-Apr-2025 09:50
Last modified20-Jan-2014 10:40
Last accessed06-Jul-2025 22:02
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
/* virtconvert.h: virtual/physical/page address conversion
*
* Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
* Written by David Howells ([email protected])
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#ifndef _ASM_VIRTCONVERT_H
#define _ASM_VIRTCONVERT_H

/*
* Macros used for converting between virtual and physical mappings.
*/

#ifdef __KERNEL__

#include <asm/setup.h>

#ifdef CONFIG_MMU

#define phys_to_virt(vaddr) ((void *) ((unsigned long)(vaddr) + PAGE_OFFSET))
#define virt_to_phys(vaddr) ((unsigned long) (vaddr) - PAGE_OFFSET)

#else

#define phys_to_virt(vaddr) ((void *) (vaddr))
#define virt_to_phys(vaddr) ((unsigned long) (vaddr))

#endif

#define virt_to_bus virt_to_phys
#define bus_to_virt phys_to_virt

#define __page_address(page) (PAGE_OFFSET + (((page) - mem_map) << PAGE_SHIFT))
#define page_to_phys(page) virt_to_phys((void *)__page_address(page))

#endif
#endif