aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64')
-rw-r--r--arch/sparc64/mm/init.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c
index 177d8aaeec42..8c2b50e8abc6 100644
--- a/arch/sparc64/mm/init.c
+++ b/arch/sparc64/mm/init.c
@@ -1699,9 +1699,21 @@ void __init paging_init(void)
1699 * functions like clear_dcache_dirty_cpu use the cpu mask 1699 * functions like clear_dcache_dirty_cpu use the cpu mask
1700 * in 13-bit signed-immediate instruction fields. 1700 * in 13-bit signed-immediate instruction fields.
1701 */ 1701 */
1702 BUILD_BUG_ON(FLAGS_RESERVED != 32); 1702
1703 /*
1704 * Page flags must not reach into upper 32 bits that are used
1705 * for the cpu number
1706 */
1707 BUILD_BUG_ON(NR_PAGEFLAGS > 32);
1708
1709 /*
1710 * The bit fields placed in the high range must not reach below
1711 * the 32 bit boundary. Otherwise we cannot place the cpu field
1712 * at the 32 bit boundary.
1713 */
1703 BUILD_BUG_ON(SECTIONS_WIDTH + NODES_WIDTH + ZONES_WIDTH + 1714 BUILD_BUG_ON(SECTIONS_WIDTH + NODES_WIDTH + ZONES_WIDTH +
1704 ilog2(roundup_pow_of_two(NR_CPUS)) > FLAGS_RESERVED); 1715 ilog2(roundup_pow_of_two(NR_CPUS)) > 32);
1716
1705 BUILD_BUG_ON(NR_CPUS > 4096); 1717 BUILD_BUG_ON(NR_CPUS > 4096);
1706 1718
1707 kern_base = (prom_boot_mapping_phys_low >> 22UL) << 22UL; 1719 kern_base = (prom_boot_mapping_phys_low >> 22UL) << 22UL;