]> git.karo-electronics.de Git - karo-tx-linux.git/commit
memory-hotplug: remove /sys/firmware/memmap/X sysfs
authorYasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Wed, 20 Feb 2013 02:14:10 +0000 (13:14 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Feb 2013 05:52:27 +0000 (16:52 +1100)
commit64d008147ae4f2e6654a78278108c34e5108821d
tree8e30535eaf217a686b7fee97cae353bcd065131f
parentad6424c76c4dc9e509a37326dfd575d504092cdc
memory-hotplug: remove /sys/firmware/memmap/X sysfs

When (hot)adding memory into system, /sys/firmware/memmap/X/{end, start,
type} sysfs files are created.  But there is no code to remove these
files.  The patch implements the function to remove them.

The code does not free firmware_map_entry which is allocated by bootmem,
which is a slight memory leak.  But that memory is reused when the sysfs
file is recreated, so the leak is bounded.

Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Signed-off-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
Reviewed-by: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Jiang Liu <jiang.liu@huawei.com>
Cc: Jianguo Wu <wujianguo@huawei.com>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Tang Chen <tangchen@cn.fujitsu.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/firmware/memmap.c
include/linux/firmware-map.h
mm/memory_hotplug.c