Message ID | 1405914402-66212-7-git-send-email-wangnan0@huawei.com |
---|---|
State | Accepted |
Commit | 6e90b58be7545c2cb2306fa186ccf5888c76c559 |
Headers | show
Return-Path: <patchwork-forward+bncBD2YXXXCQEBBB7M7WKPAKGQEUT6FSGQ@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f69.google.com (mail-pa0-f69.google.com [209.85.220.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 854CD20492 for <linaro@patches.linaro.org>; Mon, 21 Jul 2014 03:58:54 +0000 (UTC) Received: by mail-pa0-f69.google.com with SMTP id kx10sf51737225pab.8 for <linaro@patches.linaro.org>; Sun, 20 Jul 2014 20:58:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=cigiBlwaKJ/x2dUpsKxjVhnrEv0WSC4lsA6Z8FxK8yQ=; b=f5GjVqHEfaUnVAb3zza4qqRI0vFlmvVes2143OvusmGJnsOewQR+I7vdogwwBCkQUX 6dKZQpcfZj5e7E3WIYFKH54B5zrnOKAsOZRal3dbp29kGwNQZYLe1UXftxllOsxjm85A JobRwUyY0m1R9pCD1Gs9YaN3cfnl6vL7nQlopTKQilKtTxx/dLPRyq7QTL/WyvwBu/pz LQ/TkxceWwwTivsRcS89Z8qVkQXBoXbypakNFco11ETXBQBgXMcz3A+rnswBpXUuTNKK yzixoD8ywxUl9zQhnFRK2f02MetfSxgPNNjJLxGjYpgfCLGkKzIWgrScZ2pZTiV2sPxL h3xw== X-Gm-Message-State: ALoCoQk348hhopI0n+pDgELfZ6pfXdOz6u1VvTXF1ONtqOjG4OODamFdV8fT9Iivd2Eo0ReOduSb X-Received: by 10.68.222.194 with SMTP id qo2mr6055980pbc.6.1405915133851; Sun, 20 Jul 2014 20:58:53 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.94.13 with SMTP id f13ls1761637qge.65.gmail; Sun, 20 Jul 2014 20:58:53 -0700 (PDT) X-Received: by 10.52.154.106 with SMTP id vn10mr17984194vdb.36.1405915133740; Sun, 20 Jul 2014 20:58:53 -0700 (PDT) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id m4si10638975vda.8.2014.07.20.20.58.53 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 20 Jul 2014 20:58:53 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.174 as permitted sender) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id la4so11021392vcb.5 for <patchwork-forward@linaro.org>; Sun, 20 Jul 2014 20:58:53 -0700 (PDT) X-Received: by 10.221.41.135 with SMTP id tu7mr594594vcb.70.1405915133632; Sun, 20 Jul 2014 20:58:53 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp80031vcb; Sun, 20 Jul 2014 20:58:53 -0700 (PDT) X-Received: by 10.70.123.102 with SMTP id lz6mr22634509pdb.61.1405915132773; Sun, 20 Jul 2014 20:58:52 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id sk7si12888998pab.106.2014.07.20.20.58.52; Sun, 20 Jul 2014 20:58:52 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752841AbaGUD5H (ORCPT <rfc822;yi.li@linaro.org> + 9 others); Sun, 20 Jul 2014 23:57:07 -0400 Received: from szxga01-in.huawei.com ([119.145.14.64]:25254 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752089AbaGUD46 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 20 Jul 2014 23:56:58 -0400 Received: from 172.24.2.119 (EHLO lggeml420-hub.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id BYZ66478; Mon, 21 Jul 2014 11:56:47 +0800 (CST) Received: from kernel-host.huawei (10.107.197.247) by lggeml420-hub.china.huawei.com (10.72.61.115) with Microsoft SMTP Server id 14.3.158.1; Mon, 21 Jul 2014 11:56:36 +0800 From: Wang Nan <wangnan0@huawei.com> To: Ingo Molnar <mingo@redhat.com>, Yinghai Lu <yinghai@kernel.org>, "Mel Gorman" <mgorman@suse.de>, Andrew Morton <akpm@linux-foundation.org>, "Dave Hansen" <dave.hansen@intel.com>, Zhang Yanfei <zhangyanfei@cn.fujitsu.com> CC: <peifeiyue@huawei.com>, <linux-mm@kvack.org>, <x86@kernel.org>, <linux-ia64@vger.kernel.org>, <linuxppc-dev@lists.ozlabs.org>, <linux-sh@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <wangnan0@huawei.com> Subject: [PATCH v2 6/7] memory-hotplug: sh: suitable memory should go to ZONE_MOVABLE Date: Mon, 21 Jul 2014 11:46:41 +0800 Message-ID: <1405914402-66212-7-git-send-email-wangnan0@huawei.com> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1405914402-66212-1-git-send-email-wangnan0@huawei.com> References: <1405914402-66212-1-git-send-email-wangnan0@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.107.197.247] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: <patchwork-forward.linaro.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: wangnan0@huawei.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.174 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> Content-Type: text/plain |
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c index 2d089fe..2790b6a 100644 --- a/arch/sh/mm/init.c +++ b/arch/sh/mm/init.c @@ -495,8 +495,9 @@ int arch_add_memory(int nid, u64 start, u64 size) pgdat = NODE_DATA(nid); /* We only have ZONE_NORMAL, so this is easy.. */ - ret = __add_pages(nid, pgdat->node_zones + ZONE_NORMAL, - start_pfn, nr_pages); + ret = __add_pages(nid, pgdat->node_zones + + zone_for_memory(nid, start, size, ZONE_NORMAL), + start_pfn, nr_pages); if (unlikely(ret)) printk("%s: Failed, __add_pages() == %d\n", __func__, ret);
This patch introduces zone_for_memory() to arch_add_memory() on sh to ensure new, higher memory added into ZONE_MOVABLE if movable zone has already setup. Signed-off-by: Wang Nan <wangnan0@huawei.com> Cc: Zhang Yanfei <zhangyanfei@cn.fujitsu.com> Cc: Dave Hansen <dave.hansen@intel.com> --- arch/sh/mm/init.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)