mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 22:54:01 +00:00
arm64: memory: Cosmetic cleanups
Cleanup memory.h so that the indentation is consistent, remove pointless line-wrapping and use consistent parameter names for different versions of the same macro. Reviewed-by: Steve Capper <steve.capper@arm.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Reviewed-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Will Deacon <will@kernel.org>
This commit is contained in:
parent
68933aa973
commit
d0b3c32ed9
1 changed files with 11 additions and 12 deletions
|
@ -12,10 +12,10 @@
|
||||||
|
|
||||||
#include <linux/compiler.h>
|
#include <linux/compiler.h>
|
||||||
#include <linux/const.h>
|
#include <linux/const.h>
|
||||||
|
#include <linux/sizes.h>
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <asm/bug.h>
|
#include <asm/bug.h>
|
||||||
#include <asm/page-def.h>
|
#include <asm/page-def.h>
|
||||||
#include <linux/sizes.h>
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Size of the PCI I/O space. This must remain a power of two so that
|
* Size of the PCI I/O space. This must remain a power of two so that
|
||||||
|
@ -253,8 +253,7 @@ static inline const void *__tag_set(const void *addr, u8 tag)
|
||||||
|
|
||||||
#define __virt_to_phys_nodebug(x) ({ \
|
#define __virt_to_phys_nodebug(x) ({ \
|
||||||
phys_addr_t __x = (phys_addr_t)(__tag_reset(x)); \
|
phys_addr_t __x = (phys_addr_t)(__tag_reset(x)); \
|
||||||
__is_lm_address(__x) ? __lm_to_phys(__x) : \
|
__is_lm_address(__x) ? __lm_to_phys(__x) : __kimg_to_phys(__x); \
|
||||||
__kimg_to_phys(__x); \
|
|
||||||
})
|
})
|
||||||
|
|
||||||
#define __pa_symbol_nodebug(x) __kimg_to_phys((phys_addr_t)(x))
|
#define __pa_symbol_nodebug(x) __kimg_to_phys((phys_addr_t)(x))
|
||||||
|
@ -305,13 +304,13 @@ static inline void *phys_to_virt(phys_addr_t x)
|
||||||
#define sym_to_pfn(x) __phys_to_pfn(__pa_symbol(x))
|
#define sym_to_pfn(x) __phys_to_pfn(__pa_symbol(x))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* virt_to_page(k) convert a _valid_ virtual address to struct page *
|
* virt_to_page(x) convert a _valid_ virtual address to struct page *
|
||||||
* virt_addr_valid(k) indicates whether a virtual address is valid
|
* virt_addr_valid(x) indicates whether a virtual address is valid
|
||||||
*/
|
*/
|
||||||
#define ARCH_PFN_OFFSET ((unsigned long)PHYS_PFN_OFFSET)
|
#define ARCH_PFN_OFFSET ((unsigned long)PHYS_PFN_OFFSET)
|
||||||
|
|
||||||
#if !defined(CONFIG_SPARSEMEM_VMEMMAP) || defined(CONFIG_DEBUG_VIRTUAL)
|
#if !defined(CONFIG_SPARSEMEM_VMEMMAP) || defined(CONFIG_DEBUG_VIRTUAL)
|
||||||
#define virt_to_page(kaddr) pfn_to_page(virt_to_pfn(kaddr))
|
#define virt_to_page(x) pfn_to_page(virt_to_pfn(x))
|
||||||
#else
|
#else
|
||||||
#define page_to_virt(x) ({ \
|
#define page_to_virt(x) ({ \
|
||||||
__typeof__(x) __page = x; \
|
__typeof__(x) __page = x; \
|
||||||
|
|
Loading…
Reference in a new issue