summaryrefslogtreecommitdiffstats
path: root/arch/arc/include/asm/arcregs.h
diff options
context:
space:
mode:
authorVineet Gupta2013-01-18 10:42:20 +0100
committerVineet Gupta2013-02-15 18:45:54 +0100
commitc121c5063c0674fad6811f0b0d86ec3bc6eecbbd (patch)
tree956c6f18fcf72d3e20a86168669237ecdabd8a13 /arch/arc/include/asm/arcregs.h
parentARC: I/O and DMA Mappings (diff)
downloadkernel-qcow2-linux-c121c5063c0674fad6811f0b0d86ec3bc6eecbbd.tar.gz
kernel-qcow2-linux-c121c5063c0674fad6811f0b0d86ec3bc6eecbbd.tar.xz
kernel-qcow2-linux-c121c5063c0674fad6811f0b0d86ec3bc6eecbbd.zip
ARC: Boot #1: low-level, setup_arch(), /proc/cpuinfo, mem init
Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arc/include/asm/arcregs.h')
-rw-r--r--arch/arc/include/asm/arcregs.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arc/include/asm/arcregs.h b/arch/arc/include/asm/arcregs.h
index 1c24485fd04b..9e42611e39d3 100644
--- a/arch/arc/include/asm/arcregs.h
+++ b/arch/arc/include/asm/arcregs.h
@@ -258,6 +258,11 @@
} \
}
+/* Helpers */
+#define TO_KB(bytes) ((bytes) >> 10)
+#define TO_MB(bytes) (TO_KB(bytes) >> 10)
+#define PAGES_TO_KB(n_pages) ((n_pages) << (PAGE_SHIFT - 10))
+#define PAGES_TO_MB(n_pages) (PAGES_TO_KB(n_pages) >> 10)
#ifdef CONFIG_ARC_FPU_SAVE_RESTORE
/* These DPFP regs need to be saved/restored across ctx-sw */