diff options
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/fixmap.h | 3 | ||||
-rw-r--r-- | include/asm-generic/pgtable.h | 31 | ||||
-rw-r--r-- | include/asm-generic/resource.h | 2 | ||||
-rw-r--r-- | include/asm-generic/word-at-a-time.h | 8 |
4 files changed, 29 insertions, 15 deletions
diff --git a/include/asm-generic/fixmap.h b/include/asm-generic/fixmap.h index 5a64ca4621f3..f23174fb9ec4 100644 --- a/include/asm-generic/fixmap.h +++ b/include/asm-generic/fixmap.h | |||
@@ -93,5 +93,8 @@ static inline unsigned long virt_to_fix(const unsigned long vaddr) | |||
93 | #define set_fixmap_io(idx, phys) \ | 93 | #define set_fixmap_io(idx, phys) \ |
94 | __set_fixmap(idx, phys, FIXMAP_PAGE_IO) | 94 | __set_fixmap(idx, phys, FIXMAP_PAGE_IO) |
95 | 95 | ||
96 | #define set_fixmap_offset_io(idx, phys) \ | ||
97 | __set_fixmap_offset(idx, phys, FIXMAP_PAGE_IO) | ||
98 | |||
96 | #endif /* __ASSEMBLY__ */ | 99 | #endif /* __ASSEMBLY__ */ |
97 | #endif /* __ASM_GENERIC_FIXMAP_H */ | 100 | #endif /* __ASM_GENERIC_FIXMAP_H */ |
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index 1ec08c198b66..a8015a7a55bb 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h | |||
@@ -693,24 +693,35 @@ static inline int pmd_numa(pmd_t pmd) | |||
693 | #ifndef pte_mknonnuma | 693 | #ifndef pte_mknonnuma |
694 | static inline pte_t pte_mknonnuma(pte_t pte) | 694 | static inline pte_t pte_mknonnuma(pte_t pte) |
695 | { | 695 | { |
696 | pte = pte_clear_flags(pte, _PAGE_NUMA); | 696 | pteval_t val = pte_val(pte); |
697 | return pte_set_flags(pte, _PAGE_PRESENT|_PAGE_ACCESSED); | 697 | |
698 | val &= ~_PAGE_NUMA; | ||
699 | val |= (_PAGE_PRESENT|_PAGE_ACCESSED); | ||
700 | return __pte(val); | ||
698 | } | 701 | } |
699 | #endif | 702 | #endif |
700 | 703 | ||
701 | #ifndef pmd_mknonnuma | 704 | #ifndef pmd_mknonnuma |
702 | static inline pmd_t pmd_mknonnuma(pmd_t pmd) | 705 | static inline pmd_t pmd_mknonnuma(pmd_t pmd) |
703 | { | 706 | { |
704 | pmd = pmd_clear_flags(pmd, _PAGE_NUMA); | 707 | pmdval_t val = pmd_val(pmd); |
705 | return pmd_set_flags(pmd, _PAGE_PRESENT|_PAGE_ACCESSED); | 708 | |
709 | val &= ~_PAGE_NUMA; | ||
710 | val |= (_PAGE_PRESENT|_PAGE_ACCESSED); | ||
711 | |||
712 | return __pmd(val); | ||
706 | } | 713 | } |
707 | #endif | 714 | #endif |
708 | 715 | ||
709 | #ifndef pte_mknuma | 716 | #ifndef pte_mknuma |
710 | static inline pte_t pte_mknuma(pte_t pte) | 717 | static inline pte_t pte_mknuma(pte_t pte) |
711 | { | 718 | { |
712 | pte = pte_set_flags(pte, _PAGE_NUMA); | 719 | pteval_t val = pte_val(pte); |
713 | return pte_clear_flags(pte, _PAGE_PRESENT); | 720 | |
721 | val &= ~_PAGE_PRESENT; | ||
722 | val |= _PAGE_NUMA; | ||
723 | |||
724 | return __pte(val); | ||
714 | } | 725 | } |
715 | #endif | 726 | #endif |
716 | 727 | ||
@@ -729,8 +740,12 @@ static inline void ptep_set_numa(struct mm_struct *mm, unsigned long addr, | |||
729 | #ifndef pmd_mknuma | 740 | #ifndef pmd_mknuma |
730 | static inline pmd_t pmd_mknuma(pmd_t pmd) | 741 | static inline pmd_t pmd_mknuma(pmd_t pmd) |
731 | { | 742 | { |
732 | pmd = pmd_set_flags(pmd, _PAGE_NUMA); | 743 | pmdval_t val = pmd_val(pmd); |
733 | return pmd_clear_flags(pmd, _PAGE_PRESENT); | 744 | |
745 | val &= ~_PAGE_PRESENT; | ||
746 | val |= _PAGE_NUMA; | ||
747 | |||
748 | return __pmd(val); | ||
734 | } | 749 | } |
735 | #endif | 750 | #endif |
736 | 751 | ||
diff --git a/include/asm-generic/resource.h b/include/asm-generic/resource.h index b4ea8f50fc65..5e752b959054 100644 --- a/include/asm-generic/resource.h +++ b/include/asm-generic/resource.h | |||
@@ -12,7 +12,7 @@ | |||
12 | [RLIMIT_CPU] = { RLIM_INFINITY, RLIM_INFINITY }, \ | 12 | [RLIMIT_CPU] = { RLIM_INFINITY, RLIM_INFINITY }, \ |
13 | [RLIMIT_FSIZE] = { RLIM_INFINITY, RLIM_INFINITY }, \ | 13 | [RLIMIT_FSIZE] = { RLIM_INFINITY, RLIM_INFINITY }, \ |
14 | [RLIMIT_DATA] = { RLIM_INFINITY, RLIM_INFINITY }, \ | 14 | [RLIMIT_DATA] = { RLIM_INFINITY, RLIM_INFINITY }, \ |
15 | [RLIMIT_STACK] = { _STK_LIM, _STK_LIM_MAX }, \ | 15 | [RLIMIT_STACK] = { _STK_LIM, RLIM_INFINITY }, \ |
16 | [RLIMIT_CORE] = { 0, RLIM_INFINITY }, \ | 16 | [RLIMIT_CORE] = { 0, RLIM_INFINITY }, \ |
17 | [RLIMIT_RSS] = { RLIM_INFINITY, RLIM_INFINITY }, \ | 17 | [RLIMIT_RSS] = { RLIM_INFINITY, RLIM_INFINITY }, \ |
18 | [RLIMIT_NPROC] = { 0, 0 }, \ | 18 | [RLIMIT_NPROC] = { 0, 0 }, \ |
diff --git a/include/asm-generic/word-at-a-time.h b/include/asm-generic/word-at-a-time.h index d3909effd725..94f9ea8abcae 100644 --- a/include/asm-generic/word-at-a-time.h +++ b/include/asm-generic/word-at-a-time.h | |||
@@ -50,11 +50,7 @@ static inline bool has_zero(unsigned long val, unsigned long *data, const struct | |||
50 | } | 50 | } |
51 | 51 | ||
52 | #ifndef zero_bytemask | 52 | #ifndef zero_bytemask |
53 | #ifdef CONFIG_64BIT | 53 | #define zero_bytemask(mask) (~1ul << __fls(mask)) |
54 | #define zero_bytemask(mask) (~0ul << fls64(mask)) | 54 | #endif |
55 | #else | ||
56 | #define zero_bytemask(mask) (~0ul << fls(mask)) | ||
57 | #endif /* CONFIG_64BIT */ | ||
58 | #endif /* zero_bytemask */ | ||
59 | 55 | ||
60 | #endif /* _ASM_WORD_AT_A_TIME_H */ | 56 | #endif /* _ASM_WORD_AT_A_TIME_H */ |