Commit ea2388f2 authored by Linus Torvalds's avatar Linus Torvalds

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()
parents 38137a51 b5a8cad3
...@@ -99,6 +99,7 @@ Sachin P Sant <ssant@in.ibm.com> ...@@ -99,6 +99,7 @@ Sachin P Sant <ssant@in.ibm.com>
Sam Ravnborg <sam@mars.ravnborg.org> Sam Ravnborg <sam@mars.ravnborg.org>
Sascha Hauer <s.hauer@pengutronix.de> Sascha Hauer <s.hauer@pengutronix.de>
S.Çağlar Onur <caglar@pardus.org.tr> S.Çağlar Onur <caglar@pardus.org.tr>
Shiraz Hashim <shiraz.linux.kernel@gmail.com> <shiraz.hashim@st.com>
Simon Kelley <simon@thekelleys.org.uk> Simon Kelley <simon@thekelleys.org.uk>
Stéphane Witzmann <stephane.witzmann@ubpmes.univ-bpclermont.fr> Stéphane Witzmann <stephane.witzmann@ubpmes.univ-bpclermont.fr>
Stephen Hemminger <shemminger@osdl.org> Stephen Hemminger <shemminger@osdl.org>
......
...@@ -174,7 +174,6 @@ Components of Memory Policies ...@@ -174,7 +174,6 @@ Components of Memory Policies
allocation fails, the kernel will search other nodes, in order of allocation fails, the kernel will search other nodes, in order of
increasing distance from the preferred node based on information increasing distance from the preferred node based on information
provided by the platform firmware. provided by the platform firmware.
containing the cpu where the allocation takes place.
Internally, the Preferred policy uses a single node--the Internally, the Preferred policy uses a single node--the
preferred_node member of struct mempolicy. When the internal preferred_node member of struct mempolicy. When the internal
...@@ -275,9 +274,9 @@ Components of Memory Policies ...@@ -275,9 +274,9 @@ Components of Memory Policies
For example, consider a task that is attached to a cpuset with For example, consider a task that is attached to a cpuset with
mems 2-5 that sets an Interleave policy over the same set with mems 2-5 that sets an Interleave policy over the same set with
MPOL_F_RELATIVE_NODES. If the cpuset's mems change to 3-7, the MPOL_F_RELATIVE_NODES. If the cpuset's mems change to 3-7, the
interleave now occurs over nodes 3,5-6. If the cpuset's mems interleave now occurs over nodes 3,5-7. If the cpuset's mems
then change to 0,2-3,5, then the interleave occurs over nodes then change to 0,2-3,5, then the interleave occurs over nodes
0,3,5. 0,2-3,5.
Thanks to the consistent remapping, applications preparing Thanks to the consistent remapping, applications preparing
nodemasks to specify memory policies using this flag should nodemasks to specify memory policies using this flag should
......
...@@ -8315,7 +8315,7 @@ F: include/linux/compiler.h ...@@ -8315,7 +8315,7 @@ F: include/linux/compiler.h
SPEAR PLATFORM SUPPORT SPEAR PLATFORM SUPPORT
M: Viresh Kumar <viresh.linux@gmail.com> M: Viresh Kumar <viresh.linux@gmail.com>
M: Shiraz Hashim <shiraz.hashim@st.com> M: Shiraz Hashim <shiraz.linux.kernel@gmail.com>
L: spear-devel@list.st.com L: spear-devel@list.st.com
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
W: http://www.st.com/spear W: http://www.st.com/spear
......
/* /*
* DTS file for SPEAr320 Evaluation Baord * DTS file for SPEAr320 Evaluation Baord
* *
* Copyright 2012 Shiraz Hashim <shiraz.hashim@st.com> * Copyright 2012 Shiraz Hashim <shiraz.linux.kernel@gmail.com>
* *
* The code contained herein is licensed under the GNU General Public * The code contained herein is licensed under the GNU General Public
* License. You may obtain a copy of the GNU General Public License * License. You may obtain a copy of the GNU General Public License
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* Picked from realview * Picked from realview
* Copyright (c) 2012 ST Microelectronics Limited * Copyright (c) 2012 ST Microelectronics Limited
* Shiraz Hashim <shiraz.hashim@st.com> * Shiraz Hashim <shiraz.linux.kernel@gmail.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as * it under the terms of the GNU General Public License version 2 as
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* based upon linux/arch/arm/mach-realview/platsmp.c * based upon linux/arch/arm/mach-realview/platsmp.c
* *
* Copyright (C) 2012 ST Microelectronics Ltd. * Copyright (C) 2012 ST Microelectronics Ltd.
* Shiraz Hashim <shiraz.hashim@st.com> * Shiraz Hashim <shiraz.linux.kernel@gmail.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as * it under the terms of the GNU General Public License version 2 as
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* arch/arm/plat-spear/time.c * arch/arm/plat-spear/time.c
* *
* Copyright (C) 2010 ST Microelectronics * Copyright (C) 2010 ST Microelectronics
* Shiraz Hashim<shiraz.hashim@st.com> * Shiraz Hashim<shiraz.linux.kernel@gmail.com>
* *
* This file is licensed under the terms of the GNU General Public * This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any * License version 2. This program is licensed "as is" without any
......
...@@ -29,15 +29,15 @@ void (*flush_cache_range)(struct vm_area_struct *vma, unsigned long start, ...@@ -29,15 +29,15 @@ void (*flush_cache_range)(struct vm_area_struct *vma, unsigned long start,
void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page, void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page,
unsigned long pfn); unsigned long pfn);
void (*flush_icache_range)(unsigned long start, unsigned long end); void (*flush_icache_range)(unsigned long start, unsigned long end);
EXPORT_SYMBOL_GPL(flush_icache_range);
void (*local_flush_icache_range)(unsigned long start, unsigned long end); void (*local_flush_icache_range)(unsigned long start, unsigned long end);
void (*__flush_cache_vmap)(void); void (*__flush_cache_vmap)(void);
void (*__flush_cache_vunmap)(void); void (*__flush_cache_vunmap)(void);
void (*__flush_kernel_vmap_range)(unsigned long vaddr, int size); void (*__flush_kernel_vmap_range)(unsigned long vaddr, int size);
void (*__invalidate_kernel_vmap_range)(unsigned long vaddr, int size);
EXPORT_SYMBOL_GPL(__flush_kernel_vmap_range); EXPORT_SYMBOL_GPL(__flush_kernel_vmap_range);
void (*__invalidate_kernel_vmap_range)(unsigned long vaddr, int size);
/* MIPS specific cache operations */ /* MIPS specific cache operations */
void (*flush_cache_sigtramp)(unsigned long addr); void (*flush_cache_sigtramp)(unsigned long addr);
......
...@@ -232,6 +232,7 @@ int __node_distance(int a, int b) ...@@ -232,6 +232,7 @@ int __node_distance(int a, int b)
return distance; return distance;
} }
EXPORT_SYMBOL(__node_distance);
static void initialize_distance_lookup_table(int nid, static void initialize_distance_lookup_table(int nid,
const __be32 *associativity) const __be32 *associativity)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* SPEAr platform SPI chipselect abstraction over gpiolib * SPEAr platform SPI chipselect abstraction over gpiolib
* *
* Copyright (C) 2012 ST Microelectronics * Copyright (C) 2012 ST Microelectronics
* Shiraz Hashim <shiraz.hashim@st.com> * Shiraz Hashim <shiraz.linux.kernel@gmail.com>
* *
* This file is licensed under the terms of the GNU General Public * This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any * License version 2. This program is licensed "as is" without any
...@@ -205,6 +205,6 @@ static int __init spics_gpio_init(void) ...@@ -205,6 +205,6 @@ static int __init spics_gpio_init(void)
} }
subsys_initcall(spics_gpio_init); subsys_initcall(spics_gpio_init);
MODULE_AUTHOR("Shiraz Hashim <shiraz.hashim@st.com>"); MODULE_AUTHOR("Shiraz Hashim <shiraz.linux.kernel@gmail.com>");
MODULE_DESCRIPTION("ST Microlectronics SPEAr SPI Chip Select Abstraction"); MODULE_DESCRIPTION("ST Microlectronics SPEAr SPI Chip Select Abstraction");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Viresh Kumar <viresh.linux@gmail.com> * Viresh Kumar <viresh.linux@gmail.com>
* *
* Copyright (C) 2012 ST Microelectronics * Copyright (C) 2012 ST Microelectronics
* Shiraz Hashim <shiraz.hashim@st.com> * Shiraz Hashim <shiraz.linux.kernel@gmail.com>
* *
* This file is licensed under the terms of the GNU General Public * This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any * License version 2. This program is licensed "as is" without any
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* *
* Copyright © 2010 STMicroelectronics. * Copyright © 2010 STMicroelectronics.
* Ashish Priyadarshi * Ashish Priyadarshi
* Shiraz Hashim <shiraz.hashim@st.com> * Shiraz Hashim <shiraz.linux.kernel@gmail.com>
* *
* This file is licensed under the terms of the GNU General Public * This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any * License version 2. This program is licensed "as is" without any
...@@ -1089,5 +1089,5 @@ static struct platform_driver spear_smi_driver = { ...@@ -1089,5 +1089,5 @@ static struct platform_driver spear_smi_driver = {
module_platform_driver(spear_smi_driver); module_platform_driver(spear_smi_driver);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_AUTHOR("Ashish Priyadarshi, Shiraz Hashim <shiraz.hashim@st.com>"); MODULE_AUTHOR("Ashish Priyadarshi, Shiraz Hashim <shiraz.linux.kernel@gmail.com>");
MODULE_DESCRIPTION("MTD SMI driver for serial nor flash chips"); MODULE_DESCRIPTION("MTD SMI driver for serial nor flash chips");
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* ST Microelectronics SPEAr Pulse Width Modulator driver * ST Microelectronics SPEAr Pulse Width Modulator driver
* *
* Copyright (C) 2012 ST Microelectronics * Copyright (C) 2012 ST Microelectronics
* Shiraz Hashim <shiraz.hashim@st.com> * Shiraz Hashim <shiraz.linux.kernel@gmail.com>
* *
* This file is licensed under the terms of the GNU General Public * This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any * License version 2. This program is licensed "as is" without any
...@@ -264,6 +264,6 @@ static struct platform_driver spear_pwm_driver = { ...@@ -264,6 +264,6 @@ static struct platform_driver spear_pwm_driver = {
module_platform_driver(spear_pwm_driver); module_platform_driver(spear_pwm_driver);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_AUTHOR("Shiraz Hashim <shiraz.hashim@st.com>"); MODULE_AUTHOR("Shiraz Hashim <shiraz.linux.kernel@gmail.com>");
MODULE_AUTHOR("Viresh Kumar <viresh.kumar@linaro.com>"); MODULE_AUTHOR("Viresh Kumar <viresh.kumar@linaro.com>");
MODULE_ALIAS("platform:spear-pwm"); MODULE_ALIAS("platform:spear-pwm");
...@@ -693,24 +693,35 @@ static inline int pmd_numa(pmd_t pmd) ...@@ -693,24 +693,35 @@ static inline int pmd_numa(pmd_t pmd)
#ifndef pte_mknonnuma #ifndef pte_mknonnuma
static inline pte_t pte_mknonnuma(pte_t pte) static inline pte_t pte_mknonnuma(pte_t pte)
{ {
pte = pte_clear_flags(pte, _PAGE_NUMA); pteval_t val = pte_val(pte);
return pte_set_flags(pte, _PAGE_PRESENT|_PAGE_ACCESSED);
val &= ~_PAGE_NUMA;
val |= (_PAGE_PRESENT|_PAGE_ACCESSED);
return __pte(val);
} }
#endif #endif
#ifndef pmd_mknonnuma #ifndef pmd_mknonnuma
static inline pmd_t pmd_mknonnuma(pmd_t pmd) static inline pmd_t pmd_mknonnuma(pmd_t pmd)
{ {
pmd = pmd_clear_flags(pmd, _PAGE_NUMA); pmdval_t val = pmd_val(pmd);
return pmd_set_flags(pmd, _PAGE_PRESENT|_PAGE_ACCESSED);
val &= ~_PAGE_NUMA;
val |= (_PAGE_PRESENT|_PAGE_ACCESSED);
return __pmd(val);
} }
#endif #endif
#ifndef pte_mknuma #ifndef pte_mknuma
static inline pte_t pte_mknuma(pte_t pte) static inline pte_t pte_mknuma(pte_t pte)
{ {
pte = pte_set_flags(pte, _PAGE_NUMA); pteval_t val = pte_val(pte);
return pte_clear_flags(pte, _PAGE_PRESENT);
val &= ~_PAGE_PRESENT;
val |= _PAGE_NUMA;
return __pte(val);
} }
#endif #endif
...@@ -729,8 +740,12 @@ static inline void ptep_set_numa(struct mm_struct *mm, unsigned long addr, ...@@ -729,8 +740,12 @@ static inline void ptep_set_numa(struct mm_struct *mm, unsigned long addr,
#ifndef pmd_mknuma #ifndef pmd_mknuma
static inline pmd_t pmd_mknuma(pmd_t pmd) static inline pmd_t pmd_mknuma(pmd_t pmd)
{ {
pmd = pmd_set_flags(pmd, _PAGE_NUMA); pmdval_t val = pmd_val(pmd);
return pmd_clear_flags(pmd, _PAGE_PRESENT);
val &= ~_PAGE_PRESENT;
val |= _PAGE_NUMA;
return __pmd(val);
} }
#endif #endif
......
/* /*
* Copyright © 2010 ST Microelectronics * Copyright © 2010 ST Microelectronics
* Shiraz Hashim <shiraz.hashim@st.com> * Shiraz Hashim <shiraz.linux.kernel@gmail.com>
* *
* This file is licensed under the terms of the GNU General Public * This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any * License version 2. This program is licensed "as is" without any
......
...@@ -191,11 +191,23 @@ wait_queue_head_t *bit_waitqueue(void *, int); ...@@ -191,11 +191,23 @@ wait_queue_head_t *bit_waitqueue(void *, int);
(!__builtin_constant_p(state) || \ (!__builtin_constant_p(state) || \
state == TASK_INTERRUPTIBLE || state == TASK_KILLABLE) \ state == TASK_INTERRUPTIBLE || state == TASK_KILLABLE) \
/*
* The below macro ___wait_event() has an explicit shadow of the __ret
* variable when used from the wait_event_*() macros.
*
* This is so that both can use the ___wait_cond_timeout() construct
* to wrap the condition.
*
* The type inconsistency of the wait_event_*() __ret variable is also
* on purpose; we use long where we can return timeout values and int
* otherwise.
*/
#define ___wait_event(wq, condition, state, exclusive, ret, cmd) \ #define ___wait_event(wq, condition, state, exclusive, ret, cmd) \
({ \ ({ \
__label__ __out; \ __label__ __out; \
wait_queue_t __wait; \ wait_queue_t __wait; \
long __ret = ret; \ long __ret = ret; /* explicit shadow */ \
\ \
INIT_LIST_HEAD(&__wait.task_list); \ INIT_LIST_HEAD(&__wait.task_list); \
if (exclusive) \ if (exclusive) \
......
...@@ -1646,6 +1646,18 @@ config MMAP_ALLOW_UNINITIALIZED ...@@ -1646,6 +1646,18 @@ config MMAP_ALLOW_UNINITIALIZED
See Documentation/nommu-mmap.txt for more information. See Documentation/nommu-mmap.txt for more information.
config SYSTEM_TRUSTED_KEYRING
bool "Provide system-wide ring of trusted keys"
depends on KEYS
help
Provide a system keyring to which trusted keys can be added. Keys in
the keyring are considered to be trusted. Keys may be added at will
by the kernel from compiled-in data and from hardware key stores, but
userspace may only add extra keys if those keys can be verified by
keys already in the keyring.
Keys in this keyring are used by module signature checking.
config PROFILING config PROFILING
bool "Profiling support" bool "Profiling support"
help help
...@@ -1681,18 +1693,6 @@ config BASE_SMALL ...@@ -1681,18 +1693,6 @@ config BASE_SMALL
default 0 if BASE_FULL default 0 if BASE_FULL
default 1 if !BASE_FULL default 1 if !BASE_FULL
config SYSTEM_TRUSTED_KEYRING
bool "Provide system-wide ring of trusted keys"
depends on KEYS
help
Provide a system keyring to which trusted keys can be added. Keys in
the keyring are considered to be trusted. Keys may be added at will
by the kernel from compiled-in data and from hardware key stores, but
userspace may only add extra keys if those keys can be verified by
keys already in the keyring.
Keys in this keyring are used by module signature checking.
menuconfig MODULES menuconfig MODULES
bool "Enable loadable module support" bool "Enable loadable module support"
option modules option modules
......
...@@ -138,7 +138,11 @@ static void __touch_watchdog(void) ...@@ -138,7 +138,11 @@ static void __touch_watchdog(void)
void touch_softlockup_watchdog(void) void touch_softlockup_watchdog(void)
{ {
__this_cpu_write(watchdog_touch_ts, 0); /*
* Preemption can be enabled. It doesn't matter which CPU's timestamp
* gets zeroed here, so use the raw_ operation.
*/
raw_cpu_write(watchdog_touch_ts, 0);
} }
EXPORT_SYMBOL(touch_softlockup_watchdog); EXPORT_SYMBOL(touch_softlockup_watchdog);
......
...@@ -505,8 +505,7 @@ config DEBUG_VM_RB ...@@ -505,8 +505,7 @@ config DEBUG_VM_RB
bool "Debug VM red-black trees" bool "Debug VM red-black trees"
depends on DEBUG_VM depends on DEBUG_VM
help help
Enable this to turn on more extended checks in the virtual-memory Enable VM red-black tree debugging information and extra validations.
system that may impact performance.
If unsure, say N. If unsure, say N.
......
...@@ -2581,7 +2581,6 @@ EXPORT_SYMBOL(generic_perform_write); ...@@ -2581,7 +2581,6 @@ EXPORT_SYMBOL(generic_perform_write);
* @iocb: IO state structure (file, offset, etc.) * @iocb: IO state structure (file, offset, etc.)
* @iov: vector with data to write * @iov: vector with data to write
* @nr_segs: number of segments in the vector * @nr_segs: number of segments in the vector
* @ppos: position where to write
* *
* This function does all the work needed for actually writing data to a * This function does all the work needed for actually writing data to a
* file. It does all basic checks, removes SUID from the file, updates * file. It does all basic checks, removes SUID from the file, updates
......
...@@ -1536,16 +1536,23 @@ pmd_t *page_check_address_pmd(struct page *page, ...@@ -1536,16 +1536,23 @@ pmd_t *page_check_address_pmd(struct page *page,
enum page_check_address_pmd_flag flag, enum page_check_address_pmd_flag flag,
spinlock_t **ptl) spinlock_t **ptl)
{ {
pgd_t *pgd;
pud_t *pud;
pmd_t *pmd; pmd_t *pmd;
if (address & ~HPAGE_PMD_MASK) if (address & ~HPAGE_PMD_MASK)
return NULL; return NULL;
pmd = mm_find_pmd(mm, address); pgd = pgd_offset(mm, address);
if (!pmd) if (!pgd_present(*pgd))
return NULL; return NULL;
pud = pud_offset(pgd, address);
if (!pud_present(*pud))
return NULL;
pmd = pmd_offset(pud, address);
*ptl = pmd_lock(mm, pmd); *ptl = pmd_lock(mm, pmd);
if (pmd_none(*pmd)) if (!pmd_present(*pmd))
goto unlock; goto unlock;
if (pmd_page(*pmd) != page) if (pmd_page(*pmd) != page)
goto unlock; goto unlock;
......
...@@ -1172,6 +1172,7 @@ static void return_unused_surplus_pages(struct hstate *h, ...@@ -1172,6 +1172,7 @@ static void return_unused_surplus_pages(struct hstate *h,
while (nr_pages--) { while (nr_pages--) {
if (!free_pool_huge_page(h, &node_states[N_MEMORY], 1)) if (!free_pool_huge_page(h, &node_states[N_MEMORY], 1))
break; break;
cond_resched_lock(&hugetlb_lock);
} }
} }
......
...@@ -1158,7 +1158,7 @@ unsigned long reclaim_clean_pages_from_list(struct zone *zone, ...@@ -1158,7 +1158,7 @@ unsigned long reclaim_clean_pages_from_list(struct zone *zone,
TTU_UNMAP|TTU_IGNORE_ACCESS, TTU_UNMAP|TTU_IGNORE_ACCESS,
&dummy1, &dummy2, &dummy3, &dummy4, &dummy5, true); &dummy1, &dummy2, &dummy3, &dummy4, &dummy5, true);
list_splice(&clean_pages, page_list); list_splice(&clean_pages, page_list);
__mod_zone_page_state(zone, NR_ISOLATED_FILE, -ret); mod_zone_page_state(zone, NR_ISOLATED_FILE, -ret);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment