diff for duplicates of <4FF6ADD9.7040600@cn.fujitsu.com> diff --git a/a/1.txt b/N1/1.txt index 5f1a83b..118e4c2 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -311,10 +311,4 @@ Wen Congyang > > > -> - --- -To unsubscribe, send a message with 'unsubscribe linux-mm' in -the body to majordomo@kvack.org. For more info on Linux MM, -see: http://www.linux-mm.org/ . -Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> +> diff --git a/a/content_digest b/N1/content_digest index 7a3056e..cead1af 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -10,19 +10,18 @@ "Subject\0Re: [RFC PATCH v2 4/13] memory-hotplug : remove /sys/firmware/memmap/X sysfs\0" "Date\0Fri, 06 Jul 2012 17:20:25 +0800\0" "To\0Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>\0" - "Cc\0linux-mm@kvack.org" - linux-kernel@vger.kernel.org - linuxppc-dev@lists.ozlabs.org + "Cc\0len.brown@intel.com" linux-acpi@vger.kernel.org - rientjes@google.com - liuj97@gmail.com - len.brown@intel.com - benh@kernel.crashing.org + linux-kernel@vger.kernel.org + linux-mm@kvack.org paulus@samba.org - cl@linux.com minchan.kim@gmail.com + kosaki.motohiro@jp.fujitsu.com + rientjes@google.com + cl@linux.com + linuxppc-dev@lists.ozlabs.org akpm@linux-foundation.org - " kosaki.motohiro@jp.fujitsu.com\0" + " liuj97@gmail.com\0" "\00:1\0" "b\0" "At 07/06/2012 04:27 PM, Yasuaki Ishimatsu Wrote:\n" @@ -338,12 +337,6 @@ "> \n" "> \n" "> \n" - "> \n" - "\n" - "--\n" - "To unsubscribe, send a message with 'unsubscribe linux-mm' in\n" - "the body to majordomo@kvack.org. For more info on Linux MM,\n" - "see: http://www.linux-mm.org/ .\n" - "Don't email: <a href=mailto:\"dont@kvack.org\"> email@kvack.org </a>" + > -849295ae3893541141a25ab1a24def7c895f35437aa1dc5679b67161d388e995 +984254188b55c7442803ca6bb863b83275f8d1076b2c1788ef7d6bc9fead38b4
diff --git a/a/1.txt b/N2/1.txt index 5f1a83b..5a6692c 100644 --- a/a/1.txt +++ b/N2/1.txt @@ -111,210 +111,3 @@ At 07/06/2012 04:27 PM, Yasuaki Ishimatsu Wrote: > How did you check it? Could you send your debug patch? When the memory is not allocated from slab, the flags is 0x10000000008000. - ->From 8dd51368d6c03edf7edc89cab17441e3741c39c7 Mon Sep 17 00:00:00 2001 -From: Wen Congyang <wency@cn.fujitsu.com> -Date: Wed, 4 Jul 2012 16:05:26 +0800 -Subject: [PATCH] debug - ---- - drivers/firmware/memmap.c | 7 +++++++ - 1 files changed, 7 insertions(+), 0 deletions(-) - -diff --git a/drivers/firmware/memmap.c b/drivers/firmware/memmap.c -index adc0710..993ba3f 100644 ---- a/drivers/firmware/memmap.c -+++ b/drivers/firmware/memmap.c -@@ -21,6 +21,7 @@ - #include <linux/types.h> - #include <linux/bootmem.h> - #include <linux/slab.h> -+#include <linux/mm.h> - - /* - * Data types ------------------------------------------------------------------ -@@ -160,11 +161,17 @@ static int add_sysfs_fw_map_entry(struct firmware_map_entry *entry) - int __meminit firmware_map_add_hotplug(u64 start, u64 end, const char *type) - { - struct firmware_map_entry *entry; -+ struct page *entry_page; - - entry = kzalloc(sizeof(struct firmware_map_entry), GFP_ATOMIC); - if (!entry) - return -ENOMEM; - -+ entry_page = virt_to_page(entry); -+ printk(KERN_WARNING "flags: %lx\n", entry_page->flags); -+ if (PageSlab(entry_page)) { -+ printk(KERN_WARNING "page is allocated from slab\n"); -+ } - firmware_map_add_entry(start, end, type, entry); - /* create the memmap entry */ - add_sysfs_fw_map_entry(entry); --- -1.7.1 - -Thanks -Wen Congyang - -> -> Thanks, -> Yasuaki Ishimatsu -> ->> Thanks ->> Wen Congyang ->> ->>> ->>> Thanks, ->>> Yasuaki Ishimatsu ->>> ->>>> ->>>> Thanks ->>>> Wen Congyang. ->>>> ->>>>> So we can check whether the entry was allocated by bootmem or not. ->>>>> If the eantry was allocated by kzalloc(), we can free the entry by kfree(). ->>>>> But if the entry was allocated by bootmem, we have no way to free the entry. ->>>>> ->>>>> Thanks, ->>>>> Yasuaki Ishimatsu ->>>>> ->>>>>> ->>>>>> Thanks ->>>>>> Wen Congyang ->>>>>> ->>>>>>> +} ->>>>>>> + ->>>>>>> static struct kobj_type memmap_ktype = { ->>>>>>> + .release = release_firmware_map_entry, ->>>>>>> .sysfs_ops = &memmap_attr_ops, ->>>>>>> .default_attrs = def_attrs, ->>>>>>> }; ->>>>>>> @@ -123,6 +132,16 @@ static int firmware_map_add_entry(u64 st ->>>>>>> return 0; ->>>>>>> } ->>>>>>> ->>>>>>> +/** ->>>>>>> + * firmware_map_remove_entry() - Does the real work to remove a firmware ->>>>>>> + * memmap entry. ->>>>>>> + * @entry: removed entry. ->>>>>>> + **/ ->>>>>>> +static inline void firmware_map_remove_entry(struct firmware_map_entry *entry) ->>>>>>> +{ ->>>>>>> + list_del(&entry->list); ->>>>>>> +} ->>>>>>> + ->>>>>>> /* ->>>>>>> * Add memmap entry on sysfs ->>>>>>> */ ->>>>>>> @@ -144,6 +163,31 @@ static int add_sysfs_fw_map_entry(struct ->>>>>>> return 0; ->>>>>>> } ->>>>>>> ->>>>>>> +/* ->>>>>>> + * Remove memmap entry on sysfs ->>>>>>> + */ ->>>>>>> +static inline void remove_sysfs_fw_map_entry(struct firmware_map_entry *entry) ->>>>>>> +{ ->>>>>>> + kobject_put(&entry->kobj); ->>>>>>> +} ->>>>>>> + ->>>>>>> +/* ->>>>>>> + * Search memmap entry ->>>>>>> + */ ->>>>>>> + ->>>>>>> +struct firmware_map_entry * __meminit ->>>>>>> +find_firmware_map_entry(u64 start, u64 end, const char *type) ->>>>>>> +{ ->>>>>>> + struct firmware_map_entry *entry; ->>>>>>> + ->>>>>>> + list_for_each_entry(entry, &map_entries, list) ->>>>>>> + if ((entry->start == start) && (entry->end == end) && ->>>>>>> + (!strcmp(entry->type, type))) ->>>>>>> + return entry; ->>>>>>> + ->>>>>>> + return NULL; ->>>>>>> +} ->>>>>>> + ->>>>>>> /** ->>>>>>> * firmware_map_add_hotplug() - Adds a firmware mapping entry when we do ->>>>>>> * memory hotplug. ->>>>>>> @@ -196,6 +240,32 @@ int __init firmware_map_add_early(u64 st ->>>>>>> return firmware_map_add_entry(start, end, type, entry); ->>>>>>> } ->>>>>>> ->>>>>>> +/** ->>>>>>> + * firmware_map_remove() - remove a firmware mapping entry ->>>>>>> + * @start: Start of the memory range. ->>>>>>> + * @end: End of the memory range (inclusive). ->>>>>>> + * @type: Type of the memory range. ->>>>>>> + * ->>>>>>> + * removes a firmware mapping entry. ->>>>>>> + * ->>>>>>> + * Returns 0 on success, or -EINVAL if no entry. ->>>>>>> + **/ ->>>>>>> +int __meminit firmware_map_remove(u64 start, u64 end, const char *type) ->>>>>>> +{ ->>>>>>> + struct firmware_map_entry *entry; ->>>>>>> + ->>>>>>> + entry = find_firmware_map_entry(start, end, type); ->>>>>>> + if (!entry) ->>>>>>> + return -EINVAL; ->>>>>>> + ->>>>>>> + /* remove the memmap entry */ ->>>>>>> + remove_sysfs_fw_map_entry(entry); ->>>>>>> + ->>>>>>> + firmware_map_remove_entry(entry); ->>>>>>> + ->>>>>>> + return 0; ->>>>>>> +} ->>>>>>> + ->>>>>>> /* ->>>>>>> * Sysfs functions ------------------------------------------------------------- ->>>>>>> */ ->>>>>>> ->>>>>>> -- ->>>>>>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in ->>>>>>> the body of a message to majordomo@vger.kernel.org ->>>>>>> More majordomo info at http://vger.kernel.org/majordomo-info.html ->>>>>>> Please read the FAQ at http://www.tux.org/lkml/ ->>>>>>> ->>>>>> ->>>>>> -- ->>>>>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in ->>>>>> the body of a message to majordomo@vger.kernel.org ->>>>>> More majordomo info at http://vger.kernel.org/majordomo-info.html ->>>>>> Please read the FAQ at http://www.tux.org/lkml/ ->>>>>> ->>>>> ->>>>> ->>>>> ->>>>> ->>>> ->>>> -- ->>>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in ->>>> the body of a message to majordomo@vger.kernel.org ->>>> More majordomo info at http://vger.kernel.org/majordomo-info.html ->>>> Please read the FAQ at http://www.tux.org/lkml/ ->>>> ->>> ->>> ->>> ->>> ->> ->> -- ->> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in ->> the body of a message to majordomo@vger.kernel.org ->> More majordomo info at http://vger.kernel.org/majordomo-info.html ->> Please read the FAQ at http://www.tux.org/lkml/ ->> -> -> -> -> - --- -To unsubscribe, send a message with 'unsubscribe linux-mm' in -the body to majordomo@kvack.org. For more info on Linux MM, -see: http://www.linux-mm.org/ . -Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> diff --git a/a/content_digest b/N2/content_digest index 7a3056e..3a3847d 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -137,213 +137,6 @@ "> \n" "> How did you check it? Could you send your debug patch?\n" "\n" - "When the memory is not allocated from slab, the flags is 0x10000000008000.\n" - "\n" - ">From 8dd51368d6c03edf7edc89cab17441e3741c39c7 Mon Sep 17 00:00:00 2001\n" - "From: Wen Congyang <wency@cn.fujitsu.com>\n" - "Date: Wed, 4 Jul 2012 16:05:26 +0800\n" - "Subject: [PATCH] debug\n" - "\n" - "---\n" - " drivers/firmware/memmap.c | 7 +++++++\n" - " 1 files changed, 7 insertions(+), 0 deletions(-)\n" - "\n" - "diff --git a/drivers/firmware/memmap.c b/drivers/firmware/memmap.c\n" - "index adc0710..993ba3f 100644\n" - "--- a/drivers/firmware/memmap.c\n" - "+++ b/drivers/firmware/memmap.c\n" - "@@ -21,6 +21,7 @@\n" - " #include <linux/types.h>\n" - " #include <linux/bootmem.h>\n" - " #include <linux/slab.h>\n" - "+#include <linux/mm.h>\n" - " \n" - " /*\n" - " * Data types ------------------------------------------------------------------\n" - "@@ -160,11 +161,17 @@ static int add_sysfs_fw_map_entry(struct firmware_map_entry *entry)\n" - " int __meminit firmware_map_add_hotplug(u64 start, u64 end, const char *type)\n" - " {\n" - " \tstruct firmware_map_entry *entry;\n" - "+\tstruct page *entry_page;\n" - " \n" - " \tentry = kzalloc(sizeof(struct firmware_map_entry), GFP_ATOMIC);\n" - " \tif (!entry)\n" - " \t\treturn -ENOMEM;\n" - " \n" - "+\tentry_page = virt_to_page(entry);\n" - "+\tprintk(KERN_WARNING \"flags: %lx\\n\", entry_page->flags);\n" - "+\tif (PageSlab(entry_page)) {\n" - "+\t\tprintk(KERN_WARNING \"page is allocated from slab\\n\");\n" - "+\t}\n" - " \tfirmware_map_add_entry(start, end, type, entry);\n" - " \t/* create the memmap entry */\n" - " \tadd_sysfs_fw_map_entry(entry);\n" - "-- \n" - "1.7.1\n" - "\n" - "Thanks\n" - "Wen Congyang\n" - "\n" - "> \n" - "> Thanks,\n" - "> Yasuaki Ishimatsu\n" - "> \n" - ">> Thanks\n" - ">> Wen Congyang\n" - ">>\n" - ">>>\n" - ">>> Thanks,\n" - ">>> Yasuaki Ishimatsu\n" - ">>>\n" - ">>>>\n" - ">>>> Thanks\n" - ">>>> Wen Congyang.\n" - ">>>>\n" - ">>>>> So we can check whether the entry was allocated by bootmem or not.\n" - ">>>>> If the eantry was allocated by kzalloc(), we can free the entry by kfree().\n" - ">>>>> But if the entry was allocated by bootmem, we have no way to free the entry.\n" - ">>>>>\n" - ">>>>> Thanks,\n" - ">>>>> Yasuaki Ishimatsu\n" - ">>>>>\n" - ">>>>>>\n" - ">>>>>> Thanks\n" - ">>>>>> Wen Congyang\n" - ">>>>>>\n" - ">>>>>>> +}\n" - ">>>>>>> +\n" - ">>>>>>> static struct kobj_type memmap_ktype = {\n" - ">>>>>>> +\t.release\t= release_firmware_map_entry,\n" - ">>>>>>> \t.sysfs_ops\t= &memmap_attr_ops,\n" - ">>>>>>> \t.default_attrs\t= def_attrs,\n" - ">>>>>>> };\n" - ">>>>>>> @@ -123,6 +132,16 @@ static int firmware_map_add_entry(u64 st\n" - ">>>>>>> \treturn 0;\n" - ">>>>>>> }\n" - ">>>>>>>\n" - ">>>>>>> +/**\n" - ">>>>>>> + * firmware_map_remove_entry() - Does the real work to remove a firmware\n" - ">>>>>>> + * memmap entry.\n" - ">>>>>>> + * @entry: removed entry.\n" - ">>>>>>> + **/\n" - ">>>>>>> +static inline void firmware_map_remove_entry(struct firmware_map_entry *entry)\n" - ">>>>>>> +{\n" - ">>>>>>> +\tlist_del(&entry->list);\n" - ">>>>>>> +}\n" - ">>>>>>> +\n" - ">>>>>>> /*\n" - ">>>>>>> * Add memmap entry on sysfs\n" - ">>>>>>> */\n" - ">>>>>>> @@ -144,6 +163,31 @@ static int add_sysfs_fw_map_entry(struct\n" - ">>>>>>> \treturn 0;\n" - ">>>>>>> }\n" - ">>>>>>>\n" - ">>>>>>> +/*\n" - ">>>>>>> + * Remove memmap entry on sysfs\n" - ">>>>>>> + */\n" - ">>>>>>> +static inline void remove_sysfs_fw_map_entry(struct firmware_map_entry *entry)\n" - ">>>>>>> +{\n" - ">>>>>>> +\tkobject_put(&entry->kobj);\n" - ">>>>>>> +}\n" - ">>>>>>> +\n" - ">>>>>>> +/*\n" - ">>>>>>> + * Search memmap entry\n" - ">>>>>>> + */\n" - ">>>>>>> +\n" - ">>>>>>> +struct firmware_map_entry * __meminit\n" - ">>>>>>> +find_firmware_map_entry(u64 start, u64 end, const char *type)\n" - ">>>>>>> +{\n" - ">>>>>>> +\tstruct firmware_map_entry *entry;\n" - ">>>>>>> +\n" - ">>>>>>> +\tlist_for_each_entry(entry, &map_entries, list)\n" - ">>>>>>> +\t\tif ((entry->start == start) && (entry->end == end) &&\n" - ">>>>>>> +\t\t (!strcmp(entry->type, type)))\n" - ">>>>>>> +\t\t\treturn entry;\n" - ">>>>>>> +\n" - ">>>>>>> +\treturn NULL;\n" - ">>>>>>> +}\n" - ">>>>>>> +\n" - ">>>>>>> /**\n" - ">>>>>>> * firmware_map_add_hotplug() - Adds a firmware mapping entry when we do\n" - ">>>>>>> * memory hotplug.\n" - ">>>>>>> @@ -196,6 +240,32 @@ int __init firmware_map_add_early(u64 st\n" - ">>>>>>> \treturn firmware_map_add_entry(start, end, type, entry);\n" - ">>>>>>> }\n" - ">>>>>>>\n" - ">>>>>>> +/**\n" - ">>>>>>> + * firmware_map_remove() - remove a firmware mapping entry\n" - ">>>>>>> + * @start: Start of the memory range.\n" - ">>>>>>> + * @end: End of the memory range (inclusive).\n" - ">>>>>>> + * @type: Type of the memory range.\n" - ">>>>>>> + *\n" - ">>>>>>> + * removes a firmware mapping entry.\n" - ">>>>>>> + *\n" - ">>>>>>> + * Returns 0 on success, or -EINVAL if no entry.\n" - ">>>>>>> + **/\n" - ">>>>>>> +int __meminit firmware_map_remove(u64 start, u64 end, const char *type)\n" - ">>>>>>> +{\n" - ">>>>>>> +\tstruct firmware_map_entry *entry;\n" - ">>>>>>> +\n" - ">>>>>>> +\tentry = find_firmware_map_entry(start, end, type);\n" - ">>>>>>> +\tif (!entry)\n" - ">>>>>>> +\t\treturn -EINVAL;\n" - ">>>>>>> +\n" - ">>>>>>> +\t/* remove the memmap entry */\n" - ">>>>>>> +\tremove_sysfs_fw_map_entry(entry);\n" - ">>>>>>> +\n" - ">>>>>>> +\tfirmware_map_remove_entry(entry);\n" - ">>>>>>> +\n" - ">>>>>>> +\treturn 0;\n" - ">>>>>>> +}\n" - ">>>>>>> +\n" - ">>>>>>> /*\n" - ">>>>>>> * Sysfs functions -------------------------------------------------------------\n" - ">>>>>>> */\n" - ">>>>>>>\n" - ">>>>>>> --\n" - ">>>>>>> To unsubscribe from this list: send the line \"unsubscribe linux-kernel\" in\n" - ">>>>>>> the body of a message to majordomo@vger.kernel.org\n" - ">>>>>>> More majordomo info at http://vger.kernel.org/majordomo-info.html\n" - ">>>>>>> Please read the FAQ at http://www.tux.org/lkml/\n" - ">>>>>>>\n" - ">>>>>>\n" - ">>>>>> --\n" - ">>>>>> To unsubscribe from this list: send the line \"unsubscribe linux-kernel\" in\n" - ">>>>>> the body of a message to majordomo@vger.kernel.org\n" - ">>>>>> More majordomo info at http://vger.kernel.org/majordomo-info.html\n" - ">>>>>> Please read the FAQ at http://www.tux.org/lkml/\n" - ">>>>>>\n" - ">>>>>\n" - ">>>>>\n" - ">>>>>\n" - ">>>>>\n" - ">>>>\n" - ">>>> --\n" - ">>>> To unsubscribe from this list: send the line \"unsubscribe linux-kernel\" in\n" - ">>>> the body of a message to majordomo@vger.kernel.org\n" - ">>>> More majordomo info at http://vger.kernel.org/majordomo-info.html\n" - ">>>> Please read the FAQ at http://www.tux.org/lkml/\n" - ">>>>\n" - ">>>\n" - ">>>\n" - ">>>\n" - ">>>\n" - ">>\n" - ">> --\n" - ">> To unsubscribe from this list: send the line \"unsubscribe linux-kernel\" in\n" - ">> the body of a message to majordomo@vger.kernel.org\n" - ">> More majordomo info at http://vger.kernel.org/majordomo-info.html\n" - ">> Please read the FAQ at http://www.tux.org/lkml/\n" - ">>\n" - "> \n" - "> \n" - "> \n" - "> \n" - "\n" - "--\n" - "To unsubscribe, send a message with 'unsubscribe linux-mm' in\n" - "the body to majordomo@kvack.org. For more info on Linux MM,\n" - "see: http://www.linux-mm.org/ .\n" - "Don't email: <a href=mailto:\"dont@kvack.org\"> email@kvack.org </a>" + When the memory is not allocated from slab, the flags is 0x10000000008000. -849295ae3893541141a25ab1a24def7c895f35437aa1dc5679b67161d388e995 +5d678df35a0aa76f1146183e2a3977796ec24dba9369e51c6ddf6d9c8c25bf98
diff --git a/a/1.txt b/N3/1.txt index 5f1a83b..118e4c2 100644 --- a/a/1.txt +++ b/N3/1.txt @@ -311,10 +311,4 @@ Wen Congyang > > > -> - --- -To unsubscribe, send a message with 'unsubscribe linux-mm' in -the body to majordomo@kvack.org. For more info on Linux MM, -see: http://www.linux-mm.org/ . -Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> +> diff --git a/a/content_digest b/N3/content_digest index 7a3056e..1a51024 100644 --- a/a/content_digest +++ b/N3/content_digest @@ -338,12 +338,6 @@ "> \n" "> \n" "> \n" - "> \n" - "\n" - "--\n" - "To unsubscribe, send a message with 'unsubscribe linux-mm' in\n" - "the body to majordomo@kvack.org. For more info on Linux MM,\n" - "see: http://www.linux-mm.org/ .\n" - "Don't email: <a href=mailto:\"dont@kvack.org\"> email@kvack.org </a>" + > -849295ae3893541141a25ab1a24def7c895f35437aa1dc5679b67161d388e995 +51b1475603665d537607604d054305578917ea9f4db8e10d10ab2d0365ed89e3
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.