linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@c-s.fr>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	aneesh.kumar@linux.vnet.ibm.com
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: [PATCH v3 05/14] powerpc: use _ALIGN_DOWN macro for VMALLOC_BASE
Date: Tue, 29 May 2018 15:50:24 +0000 (UTC)	[thread overview]
Message-ID: <b2cb4870e05c2a2ff95817c900d64c5a5126b505.1527608397.git.christophe.leroy@c-s.fr> (raw)
In-Reply-To: <cover.1527608397.git.christophe.leroy@c-s.fr>

Use _ALIGN_DOWN macro instead of open coding in define of VMALLOC_BASE

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 arch/powerpc/include/asm/nohash/32/pgtable.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/include/asm/nohash/32/pgtable.h b/arch/powerpc/include/asm/nohash/32/pgtable.h
index db4e530dd5f3..810945afe677 100644
--- a/arch/powerpc/include/asm/nohash/32/pgtable.h
+++ b/arch/powerpc/include/asm/nohash/32/pgtable.h
@@ -110,9 +110,9 @@ extern int icache_44x_need_flush;
  */
 #define VMALLOC_OFFSET (0x1000000) /* 16M */
 #ifdef PPC_PIN_SIZE
-#define VMALLOC_BASE (((_ALIGN((long)high_memory, PPC_PIN_SIZE) + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)))
+#define VMALLOC_BASE _ALIGN_DOWN(_ALIGN((long)high_memory, PPC_PIN_SIZE) + VMALLOC_OFFSET, VMALLOC_OFFSET)
 #else
-#define VMALLOC_BASE ((((long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)))
+#define VMALLOC_BASE _ALIGN_DOWN((long)high_memory + VMALLOC_OFFSET, VMALLOC_OFFSET)
 #endif
 #define VMALLOC_START	ioremap_bot
 #define VMALLOC_END	IOREMAP_END
-- 
2.13.3

  parent reply	other threads:[~2018-05-29 15:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-29 15:50 [PATCH v3 00/14] Implement use of HW assistance on TLB table walk on 8xx Christophe Leroy
2018-05-29 15:50 ` [PATCH v3 01/14] Revert "powerpc/8xx: Use L1 entry APG to handle _PAGE_ACCESSED for CONFIG_SWAP" Christophe Leroy
2018-05-29 15:50 ` [PATCH v3 02/14] powerpc: move io mapping functions into ioremap.c Christophe Leroy
2018-05-29 15:50 ` [PATCH v3 03/14] powerpc: make ioremap_bot common to PPC32 and PPC64 Christophe Leroy
2018-05-29 15:50 ` [PATCH v3 04/14] powerpc: common ioremap functions Christophe Leroy
2018-05-29 15:50 ` Christophe Leroy [this message]
2018-05-29 15:50 ` [PATCH v3 06/14] powerpc/nohash32: allow setting GUARDED attribute in the PMD directly Christophe Leroy
2018-05-29 15:50 ` [PATCH v3 07/14] powerpc/8xx: set " Christophe Leroy
2018-05-29 15:50 ` [PATCH v3 08/14] powerpc/8xx: Remove PTE_ATOMIC_UPDATES Christophe Leroy
2018-05-29 15:50 ` [PATCH v3 09/14] powerpc/mm: Use hardware assistance in TLB handlers on the 8xx Christophe Leroy
2018-05-29 15:50 ` [PATCH v3 10/14] powerpc/8xx: reunify TLB handler routines Christophe Leroy
2018-05-29 15:50 ` [PATCH v3 11/14] powerpc/8xx: Free up SPRN_SPRG_SCRATCH2 Christophe Leroy
2018-05-29 15:50 ` [PATCH v3 12/14] powerpc/mm: Make pte_fragment_alloc() common to PPC32 and PPC64 Christophe Leroy
2018-05-29 15:50 ` [PATCH v3 13/14] powerpc/mm: Use pte_fragment_alloc() on 8xx Christophe Leroy
2018-05-29 15:50 ` [PATCH v3 14/14] powerpc/8xx: Move SW perf counters in first 32kb of memory Christophe Leroy
2018-08-07  7:57 ` [PATCH v3 00/14] Implement use of HW assistance on TLB table walk on 8xx Christophe LEROY

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=b2cb4870e05c2a2ff95817c900d64c5a5126b505.1527608397.git.christophe.leroy@c-s.fr \
    --to=christophe.leroy@c-s.fr \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.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).