summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crc32.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/crc32.c b/crc32.c
index 14920a2..e07bbed 100644
--- a/crc32.c
+++ b/crc32.c
@@ -3,8 +3,6 @@
#include "crc32.h"
-#define BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL << (n)) - 1))
-
/* Table computed with Mark Adler's makecrc.c utility. */
static const uint32_t crc32_table[256] = {
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419,
@@ -67,7 +65,7 @@ uint32_t crc32(uint32_t crc, uint8_t *buf, size_t len)
crc = ~crc;
for (end = buf + len; buf < end; buf++)
- crc = crc32_table[(crc ^ *buf) & BIT_MASK(8)] ^ (crc >> 8);
+ crc = crc32_table[(crc ^ *buf) & 0xff] ^ (crc >> 8);
return ~crc;
}
n though (1) occurs in generic mm code, it is wrapped by #ifdef CONFIG_MOVABLE_NODE, which depends on X86_64. This means that when we extend CONFIG_MOVABLE_NODE to non-x86 arches, things will be unbalanced. (1) will happen for them, but (2) will not. This toggle was added in the first place because x86 has a delay between adding memblocks and marking them as hotpluggable. Since other arches do this marking either immediately or not at all, they do not require the bottom-up toggle. So, resolve things by moving (1) from cmdline_parse_movable_node() to x86's setup_arch(), immediately after the movable_node parameter has been parsed. Link: http://lkml.kernel.org/r/1479160961-25840-3-git-send-email-arbab@linux.vnet.ibm.com Signed-off-by: Reza Arbab <arbab@linux.vnet.ibm.com> Acked-by: Balbir Singh <bsingharora@gmail.com> Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Alistair Popple <apopple@au1.ibm.com> Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Bharata B Rao <bharata@linux.vnet.ibm.com> Cc: Frank Rowand <frowand.list@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Nathan Fontenot <nfont@linux.vnet.ibm.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Rob Herring <robh+dt@kernel.org> Cc: Stewart Smith <stewart@linux.vnet.ibm.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')