| To: | linux-mips@linux-mips.org |
|---|---|
| Subject: | [PATCH] MIPS: Use ALIGN(x, bytes) instead of __ALIGN_MASK(x, bytes - 1) |
| From: | Matt Turner <mattst88@gmail.com> |
| Date: | Wed, 24 Feb 2010 23:30:14 -0500 |
| Cc: | Matt Turner <mattst88@gmail.com>, Ralf Baechle <ralf@linux-mips.org>, David Daney <ddaney@caviumnetworks.com> |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:to:cc:subject :date:message-id:x-mailer; bh=FEmir0ebNHbSfDfBi/GyysU89U/gs/q3dlfP4px0TTI=; b=Md6ntPmRLmi7ABgdzCfQIphTKUA2+TwFH+QdXj9UHUeKpAcGMgz6Mt6WheI3UD/gXS IOKGSObaZk7ru10k9oymJTLrnUSozAAfd7LoUdcvTfbkArkNGhiUowAnYgzS+jU7Zei2 p86v0KhiuSMGssq0g/5UfRq5/QjDdZBnIbLeU= |
| Domainkey-signature: | a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=MNgf3m4PqMzqpWmJ8HEmv8DMg+kRxgtggNJBc41g7JF+60uufuuz0n8FfPbkjzO9KL cO0xMiMGQYvqJjhuoKUSVzFAPxBGMH3qPKv0Cn0UH3WoAaL18xXzbZYkRDaFk9MsTkse pGlotRl85MW10UapSAL3sgrcWAQFg+aKmOu0w= |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| Sender: | linux-mips-bounce@linux-mips.org |
ALIGN(x, bytes) expands to __ALIGN_MASK(x, bytes - 1), so use the one
that is most clear.
CC: Ralf Baechle <ralf@linux-mips.org>
CC: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
---
arch/mips/cavium-octeon/executive/cvmx-bootmem.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/mips/cavium-octeon/executive/cvmx-bootmem.c
b/arch/mips/cavium-octeon/executive/cvmx-bootmem.c
index 25666da..fdf5f19 100644
--- a/arch/mips/cavium-octeon/executive/cvmx-bootmem.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-bootmem.c
@@ -253,7 +253,7 @@ int64_t cvmx_bootmem_phy_alloc(uint64_t req_size, uint64_t
address_min,
* impossible requests up front. (NOP for address_min == 0)
*/
if (alignment)
- address_min = __ALIGN_MASK(address_min, (alignment - 1));
+ address_min = ALIGN(address_min, alignment);
/*
* Reject inconsistent args. We have adjusted these, so this
@@ -291,7 +291,7 @@ int64_t cvmx_bootmem_phy_alloc(uint64_t req_size, uint64_t
address_min,
* satisfy request.
*/
usable_base =
- __ALIGN_MASK(max(address_min, ent_addr), alignment - 1);
+ ALIGN(max(address_min, ent_addr), alignment);
usable_max = min(address_max, ent_addr + ent_size);
/*
* We should be able to allocate block at address
@@ -671,7 +671,7 @@ int64_t cvmx_bootmem_phy_named_block_alloc(uint64_t size,
uint64_t min_addr,
* coallesced when they are freed. The alloc routine does the
* same rounding up on all allocations.
*/
- size = __ALIGN_MASK(size, (CVMX_BOOTMEM_ALIGNMENT_SIZE - 1));
+ size = ALIGN(size, CVMX_BOOTMEM_ALIGNMENT_SIZE);
addr_allocated = cvmx_bootmem_phy_alloc(size, min_addr, max_addr,
alignment,
--
1.6.4.4
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: RFC: [MIPS] BCM1480/BCM1480HT remove io_offset, Bjorn Helgaas |
|---|---|
| Next by Date: | [PATCH 0/3] XBurst JZ4730 support, Graham Gower |
| Previous by Thread: | udelay() too slow by a factor of 2 on Cavium chips, Brian Daniels |
| Next by Thread: | Re: [PATCH] MIPS: Use ALIGN(x, bytes) instead of __ALIGN_MASK(x, bytes - 1), Ralf Baechle |
| Indexes: | [Date] [Thread] [Top] [All Lists] |