]> 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>
Thu, 7 Feb 2013 01:26:22 +0000 (12:26 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 18 Feb 2013 05:46:23 +0000 (16:46 +1100)
commit596cc0035214b5fe8c2ab8ada3f2624f0c8f5ac8
tree004faf3d4715ac9a581b5fe409428b45ccc27b38
parente9a489999a6e2d2f50d42cb6cd9d145523e576e6
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