aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2015-05-14 01:01:37 +0000
committerJohannes Weiner <hannes@cmpxchg.org>2015-05-14 01:01:37 +0000
commit6af2c7bafad4d2db3cb9f8f211b77fd497fa1166 (patch)
tree9e09da2ce53f2c3f28eef82f5c8bfa5dc054ead5
parent7535fc5e57e5801748f8f1b62992c963207190bb (diff)
downloadmm-next-6af2c7bafad4d2db3cb9f8f211b77fd497fa1166.tar.gz
mm-meminit-finish-initialisation-of-struct-pages-before-basic-setup-fix
include rwsem.h, use DECLARE_RWSEM, fix comment, remove unneeded cast Cc: Daniel J Blueman <daniel@numascale.com> Cc: Dave Hansen <dave.hansen@intel.com> Cc: Mel Gorman <mgorman@suse.de> Cc: Nathan Zimmer <nzimmer@sgi.com> Cc: Scott Norton <scott.norton@hp.com> Cc: Waiman Long <waiman.long@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--mm/page_alloc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index de92dabdb66a18..d358ab52edbfa4 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -18,6 +18,7 @@
#include <linux/mm.h>
#include <linux/swap.h>
#include <linux/interrupt.h>
+#include <linux/rwsem.h>
#include <linux/pagemap.h>
#include <linux/jiffies.h>
#include <linux/bootmem.h>
@@ -1075,12 +1076,12 @@ static void __init deferred_free_range(struct page *page,
__free_pages_boot_core(page, pfn, 0);
}
-static struct rw_semaphore __initdata pgdat_init_rwsem;
+static __initdata DECLARE_RWSEM(pgdat_init_rwsem);
/* Initialise remaining memory on a node */
static int __init deferred_init_memmap(void *data)
{
- pg_data_t *pgdat = (pg_data_t *)data;
+ pg_data_t *pgdat = data;
int nid = pgdat->node_id;
struct mminit_pfnnid_cache nid_init_state = { };
unsigned long start = jiffies;
@@ -1096,7 +1097,7 @@ static int __init deferred_init_memmap(void *data)
return 0;
}
- /* Bound memory initialisation to a local node if possible */
+ /* Bind memory initialisation thread to a local node if possible */
if (!cpumask_empty(cpumask))
set_cpus_allowed_ptr(current, cpumask);
@@ -1200,7 +1201,6 @@ void __init page_alloc_init_late(void)
{
int nid;
- init_rwsem(&pgdat_init_rwsem);
for_each_node_state(nid, N_MEMORY) {
down_read(&pgdat_init_rwsem);
kthread_run(deferred_init_memmap, NODE_DATA(nid), "pgdatinit%d", nid);