linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Steve Capper <Steve.Capper@arm.com>
To: Will Deacon <will@kernel.org>
Cc: Mark Rutland <Mark.Rutland@arm.com>,
	Catalin Marinas <Catalin.Marinas@arm.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Andrey Konovalov <andreyknvl@google.com>, Qian Cai <cai@lca.pw>,
	nd <nd@arm.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 8/8] arm64: memory: Cosmetic cleanups
Date: Tue, 13 Aug 2019 18:57:23 +0000	[thread overview]
Message-ID: <20190813185721.GI19835@capper-ampere.manchester.arm.com> (raw)
In-Reply-To: <20190813170149.26037-9-will@kernel.org>

On Tue, Aug 13, 2019 at 06:01:49PM +0100, Will Deacon wrote:
> 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.
> 
> Signed-off-by: Will Deacon <will@kernel.org>

Reviewed-by: Steve Capper <steve.capper@arm.com>

> ---
>  arch/arm64/include/asm/memory.h | 23 +++++++++++------------
>  1 file changed, 11 insertions(+), 12 deletions(-)
> 
> diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h
> index d31e4b6e349f..69f4cecb7241 100644
> --- a/arch/arm64/include/asm/memory.h
> +++ b/arch/arm64/include/asm/memory.h
> @@ -12,10 +12,10 @@
>  
>  #include <linux/compiler.h>
>  #include <linux/const.h>
> +#include <linux/sizes.h>
>  #include <linux/types.h>
>  #include <asm/bug.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
> @@ -66,8 +66,8 @@
>  
>  #define _VA_START(va)		(-(UL(1) << ((va) - 1)))
>  
> -#define KERNEL_START      _text
> -#define KERNEL_END        _end
> +#define KERNEL_START		_text
> +#define KERNEL_END		_end
>  
>  #ifdef CONFIG_ARM64_VA_BITS_52
>  #define MAX_USER_VA_BITS	52
> @@ -132,14 +132,14 @@
>   * 16 KB granule: 128 level 3 entries, with contiguous bit
>   * 64 KB granule:  32 level 3 entries, with contiguous bit
>   */
> -#define SEGMENT_ALIGN			SZ_2M
> +#define SEGMENT_ALIGN		SZ_2M
>  #else
>  /*
>   *  4 KB granule:  16 level 3 entries, with contiguous bit
>   * 16 KB granule:   4 level 3 entries, without contiguous bit
>   * 64 KB granule:   1 level 3 entry
>   */
> -#define SEGMENT_ALIGN			SZ_64K
> +#define SEGMENT_ALIGN		SZ_64K
>  #endif
>  
>  /*
> @@ -253,8 +253,7 @@ static inline const void *__tag_set(const void *addr, u8 tag)
>  
>  #define __virt_to_phys_nodebug(x) ({					\
>  	phys_addr_t __x = (phys_addr_t)(__tag_reset(x));		\
> -	__is_lm_address(__x) ? __lm_to_phys(__x) :			\
> -			       __kimg_to_phys(__x);			\
> +	__is_lm_address(__x) ? __lm_to_phys(__x) : __kimg_to_phys(__x);	\
>  })
>  
>  #define __pa_symbol_nodebug(x)	__kimg_to_phys((phys_addr_t)(x))
> @@ -301,17 +300,17 @@ static inline void *phys_to_virt(phys_addr_t x)
>  #define __pa_nodebug(x)		__virt_to_phys_nodebug((unsigned long)(x))
>  #define __va(x)			((void *)__phys_to_virt((phys_addr_t)(x)))
>  #define pfn_to_kaddr(pfn)	__va((pfn) << PAGE_SHIFT)
> -#define virt_to_pfn(x)      __phys_to_pfn(__virt_to_phys((unsigned long)(x)))
> -#define sym_to_pfn(x)	    __phys_to_pfn(__pa_symbol(x))
> +#define virt_to_pfn(x)		__phys_to_pfn(__virt_to_phys((unsigned long)(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_addr_valid(k)	indicates whether a virtual address is valid
> + *  virt_to_page(x)	convert a _valid_ virtual address to struct page *
> + *  virt_addr_valid(x)	indicates whether a virtual address is valid
>   */
>  #define ARCH_PFN_OFFSET		((unsigned long)PHYS_PFN_OFFSET)
>  
>  #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
>  #define page_to_virt(x)	({						\
>  	__typeof__(x) __page = x;					\
> -- 
> 2.11.0
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-08-13 18:57 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-13 17:01 [PATCH 0/8] Fix issues with 52-bit kernel virtual addressing Will Deacon
2019-08-13 17:01 ` [PATCH 1/8] arm64: memory: Fix virt_addr_valid() using __is_lm_address() Will Deacon
2019-08-13 18:09   ` Ard Biesheuvel
2019-08-13 19:11     ` Steve Capper
2019-08-13 19:25       ` Ard Biesheuvel
2019-08-13 20:34         ` Steve Capper
2019-08-14 15:17           ` Ard Biesheuvel
2019-08-14  8:32       ` Will Deacon
2019-08-13 18:53   ` Steve Capper
2019-08-14  9:19   ` Catalin Marinas
2019-08-14  9:48     ` Will Deacon
2019-08-14 10:40       ` Catalin Marinas
2019-08-14 12:02         ` Will Deacon
2019-08-13 17:01 ` [PATCH 2/8] arm64: memory: Ensure address tag is masked in conversion macros Will Deacon
2019-08-13 18:54   ` Steve Capper
2019-08-14  9:23   ` Catalin Marinas
2019-08-13 17:01 ` [PATCH 3/8] arm64: memory: Rewrite default page_to_virt()/virt_to_page() Will Deacon
2019-08-13 18:54   ` Steve Capper
2019-08-14  9:30   ` Catalin Marinas
2019-08-14  9:41     ` Will Deacon
2019-08-14 10:56       ` Mark Rutland
2019-08-14 11:17         ` Will Deacon
2019-08-14 11:26           ` Mark Rutland
2019-08-13 17:01 ` [PATCH 4/8] arm64: memory: Simplify virt_to_page() implementation Will Deacon
2019-08-13 18:55   ` Steve Capper
2019-08-14  9:32   ` Catalin Marinas
2019-08-13 17:01 ` [PATCH 5/8] arm64: memory: Simplify _VA_START and _PAGE_OFFSET definitions Will Deacon
2019-08-13 18:55   ` Steve Capper
2019-08-14  9:33   ` Catalin Marinas
2019-08-14 11:23   ` Mark Rutland
2019-08-14 12:00     ` Will Deacon
2019-08-14 13:18       ` Mark Rutland
2019-08-13 17:01 ` [PATCH 6/8] arm64: memory: Implement __tag_set() as common function Will Deacon
2019-08-13 18:56   ` Steve Capper
2019-08-14  9:34   ` Catalin Marinas
2019-08-13 17:01 ` [PATCH 7/8] arm64: memory: Add comments to end of non-trivial #ifdef blocks Will Deacon
2019-08-13 18:57   ` Steve Capper
2019-08-14  9:35   ` Catalin Marinas
2019-08-13 17:01 ` [PATCH 8/8] arm64: memory: Cosmetic cleanups Will Deacon
2019-08-13 18:57   ` Steve Capper [this message]
2019-08-14  9:35   ` Catalin Marinas
2019-08-13 18:53 ` [PATCH 0/8] Fix issues with 52-bit kernel virtual addressing Steve Capper
2019-08-14  8:01 ` Geert Uytterhoeven
2019-08-14 11:29 ` Mark Rutland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190813185721.GI19835@capper-ampere.manchester.arm.com \
    --to=steve.capper@arm.com \
    --cc=Catalin.Marinas@arm.com \
    --cc=Mark.Rutland@arm.com \
    --cc=andreyknvl@google.com \
    --cc=cai@lca.pw \
    --cc=geert@linux-m68k.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=nd@arm.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).