File tree Expand file tree Collapse file tree 2 files changed +8
-14
lines changed Expand file tree Collapse file tree 2 files changed +8
-14
lines changed Original file line number Diff line number Diff line change 3838#include <asm/page.h>
3939#include <asm/mmu.h>
4040#include <asm-generic/pgtable-nopmd.h>
41+ #include <linux/const.h>
4142
4243/**************************************************************************
4344 * Page Table Flags
207208#define PGDIR_SIZE (1UL << PGDIR_SHIFT) /* vaddr span, not PDG sz */
208209#define PGDIR_MASK (~(PGDIR_SIZE-1))
209210
210- #ifdef __ASSEMBLY__
211- #define PTRS_PER_PTE (1 << BITS_FOR_PTE)
212- #define PTRS_PER_PGD (1 << BITS_FOR_PGD)
213- #else
214- #define PTRS_PER_PTE (1UL << BITS_FOR_PTE)
215- #define PTRS_PER_PGD (1UL << BITS_FOR_PGD)
216- #endif
211+ #define PTRS_PER_PTE _BITUL(BITS_FOR_PTE)
212+ #define PTRS_PER_PGD _BITUL(BITS_FOR_PGD)
213+
217214/*
218215 * Number of entries a user land program use.
219216 * TASK_SIZE is the maximum vaddr that can be used by a userland program.
Original file line number Diff line number Diff line change 99#ifndef _UAPI__ASM_ARC_PAGE_H
1010#define _UAPI__ASM_ARC_PAGE_H
1111
12+ #include <linux/const.h>
13+
1214/* PAGE_SHIFT determines the page size */
1315#if defined(CONFIG_ARC_PAGE_SIZE_16K )
1416#define PAGE_SHIFT 14
2527#define PAGE_SHIFT 13
2628#endif
2729
28- #ifdef __ASSEMBLY__
29- #define PAGE_SIZE (1 << PAGE_SHIFT)
30- #define PAGE_OFFSET (0x80000000)
31- #else
32- #define PAGE_SIZE (1UL << PAGE_SHIFT) /* Default 8K */
33- #define PAGE_OFFSET (0x80000000UL) /* Kernel starts at 2G onwards */
34- #endif
30+ #define PAGE_SIZE _BITUL(PAGE_SHIFT) /* Default 8K */
31+ #define PAGE_OFFSET _AC(0x80000000, UL) /* Kernel starts at 2G onwrds */
3532
3633#define PAGE_MASK (~(PAGE_SIZE-1))
3734
You can’t perform that action at this time.
0 commit comments