aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-04-18 19:40:31 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-18 19:40:31 -0400
commitea2388f2813ec7871c40a8b18afb80b5674d6e1d (patch)
treeed2a1e6efac1ea9fe515c97fa5d1811918ecfacd /include
parent38137a5188b83ddf8b0054f6fb80265878c60888 (diff)
parentb5a8cad376eebbd8598642697e92a27983aee802 (diff)
Merge branch 'akpm' (incoming from Andrew)
Merge misc fixes from Andrew Morton: "13 fixes" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: thp: close race between split and zap huge pages mm: fix new kernel-doc warning in filemap.c mm: fix CONFIG_DEBUG_VM_RB description mm: use paravirt friendly ops for NUMA hinting ptes mips: export flush_icache_range mm/hugetlb.c: add cond_resched_lock() in return_unused_surplus_pages() wait: explain the shadowing and type inconsistencies Shiraz has moved Documentation/vm/numa_memory_policy.txt: fix wrong document in numa_memory_policy.txt powerpc/mm: fix ".__node_distance" undefined kernel/watchdog.c:touch_softlockup_watchdog(): use raw_cpu_write() init/Kconfig: move the trusted keyring config option to general setup vmscan: reclaim_clean_pages_from_list() must use mod_zone_page_state()
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/pgtable.h31
-rw-r--r--include/linux/mtd/spear_smi.h2
-rw-r--r--include/linux/wait.h14
3 files changed, 37 insertions, 10 deletions
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
694static inline pte_t pte_mknonnuma(pte_t pte) 694static 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
702static inline pmd_t pmd_mknonnuma(pmd_t pmd) 705static 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
710static inline pte_t pte_mknuma(pte_t pte) 717static 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
730static inline pmd_t pmd_mknuma(pmd_t pmd) 741static 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/linux/mtd/spear_smi.h b/include/linux/mtd/spear_smi.h
index 8ae1726044c3..581603ac1277 100644
--- a/include/linux/mtd/spear_smi.h
+++ b/include/linux/mtd/spear_smi.h
@@ -1,6 +1,6 @@
1/* 1/*
2 * Copyright © 2010 ST Microelectronics 2 * Copyright © 2010 ST Microelectronics
3 * Shiraz Hashim <shiraz.hashim@st.com> 3 * Shiraz Hashim <shiraz.linux.kernel@gmail.com>
4 * 4 *
5 * This file is licensed under the terms of the GNU General Public 5 * This file is licensed under the terms of the GNU General Public
6 * License version 2. This program is licensed "as is" without any 6 * License version 2. This program is licensed "as is" without any
diff --git a/include/linux/wait.h b/include/linux/wait.h
index e7d9d9ed14f5..bd68819f0815 100644
--- a/include/linux/wait.h
+++ b/include/linux/wait.h
@@ -191,11 +191,23 @@ wait_queue_head_t *bit_waitqueue(void *, int);
191 (!__builtin_constant_p(state) || \ 191 (!__builtin_constant_p(state) || \
192 state == TASK_INTERRUPTIBLE || state == TASK_KILLABLE) \ 192 state == TASK_INTERRUPTIBLE || state == TASK_KILLABLE) \
193 193
194/*
195 * The below macro ___wait_event() has an explicit shadow of the __ret
196 * variable when used from the wait_event_*() macros.
197 *
198 * This is so that both can use the ___wait_cond_timeout() construct
199 * to wrap the condition.
200 *
201 * The type inconsistency of the wait_event_*() __ret variable is also
202 * on purpose; we use long where we can return timeout values and int
203 * otherwise.
204 */
205
194#define ___wait_event(wq, condition, state, exclusive, ret, cmd) \ 206#define ___wait_event(wq, condition, state, exclusive, ret, cmd) \
195({ \ 207({ \
196 __label__ __out; \ 208 __label__ __out; \
197 wait_queue_t __wait; \ 209 wait_queue_t __wait; \
198 long __ret = ret; \ 210 long __ret = ret; /* explicit shadow */ \
199 \ 211 \
200 INIT_LIST_HEAD(&__wait.task_list); \ 212 INIT_LIST_HEAD(&__wait.task_list); \
201 if (exclusive) \ 213 if (exclusive) \