memblock: make memblock_set_node() support different memblock_type
[sfr@canb.auug.org.au: fix powerpc build] Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com> Reviewed-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: "Rafael J . Wysocki" <rjw@sisk.pl> Cc: Chen Tang <imtangchen@gmail.com> Cc: Gong Chen <gong.chen@linux.intel.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Jiang Liu <jiang.liu@huawei.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Lai Jiangshan <laijs@cn.fujitsu.com> Cc: Larry Woodman <lwoodman@redhat.com> Cc: Len Brown <lenb@kernel.org> Cc: Liu Jiang <jiang.liu@huawei.com> Cc: Mel Gorman <mgorman@suse.de> Cc: Michal Nazarewicz <mina86@mina86.com> Cc: Minchan Kim <minchan@kernel.org> Cc: Prarit Bhargava <prarit@redhat.com> Cc: Rik van Riel <riel@redhat.com> Cc: Taku Izumi <izumi.taku@jp.fujitsu.com> Cc: Tejun Heo <tj@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Thomas Renninger <trenn@suse.de> Cc: Toshi Kani <toshi.kani@hp.com> Cc: Vasilis Liaskovitis <vasilis.liaskovitis@profitbricks.com> Cc: Wanpeng Li <liwanp@linux.vnet.ibm.com> Cc: Wen Congyang <wency@cn.fujitsu.com> Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> Cc: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
66b16edf9e
commit
e7e8de5918
12 changed files with 28 additions and 19 deletions
|
@ -911,18 +911,18 @@ void __init_memblock __next_mem_pfn_range(int *idx, int nid,
|
|||
* memblock_set_node - set node ID on memblock regions
|
||||
* @base: base of area to set node ID for
|
||||
* @size: size of area to set node ID for
|
||||
* @type: memblock type to set node ID for
|
||||
* @nid: node ID to set
|
||||
*
|
||||
* Set the nid of memblock memory regions in [@base,@base+@size) to @nid.
|
||||
* Set the nid of memblock @type regions in [@base,@base+@size) to @nid.
|
||||
* Regions which cross the area boundaries are split as necessary.
|
||||
*
|
||||
* RETURNS:
|
||||
* 0 on success, -errno on failure.
|
||||
*/
|
||||
int __init_memblock memblock_set_node(phys_addr_t base, phys_addr_t size,
|
||||
int nid)
|
||||
struct memblock_type *type, int nid)
|
||||
{
|
||||
struct memblock_type *type = &memblock.memory;
|
||||
int start_rgn, end_rgn;
|
||||
int i, ret;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue