diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-01 21:22:55 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-01 21:22:55 -0500 |
commit | 6bba07c613e6663e5b8977eafec3cd3e63241e1c (patch) | |
tree | a650baf4e935976b10911306ffbe6b53d66f88c7 /arch | |
parent | d7e53922aa47b7a5a91bc34da00348e6ee0ed242 (diff) | |
parent | 892365ab4d29ed861709ee8611b53587ca2bb75f (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 fixes from Martin Schwidefsky
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
[S390] memory hotplug: prevent memory zone interleave
[S390] crash_dump: remove duplicate include
[S390] KEYS: Enable the compat keyctl wrapper on s390x
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/Kconfig | 3 | ||||
-rw-r--r-- | arch/s390/kernel/crash_dump.c | 1 | ||||
-rw-r--r-- | arch/s390/mm/init.c | 30 |
3 files changed, 29 insertions, 5 deletions
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index d1727584230a..6d99a5fcc090 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -227,6 +227,9 @@ config COMPAT | |||
227 | config SYSVIPC_COMPAT | 227 | config SYSVIPC_COMPAT |
228 | def_bool y if COMPAT && SYSVIPC | 228 | def_bool y if COMPAT && SYSVIPC |
229 | 229 | ||
230 | config KEYS_COMPAT | ||
231 | def_bool y if COMPAT && KEYS | ||
232 | |||
230 | config AUDIT_ARCH | 233 | config AUDIT_ARCH |
231 | def_bool y | 234 | def_bool y |
232 | 235 | ||
diff --git a/arch/s390/kernel/crash_dump.c b/arch/s390/kernel/crash_dump.c index 39f8fd4438fc..c383ce440d99 100644 --- a/arch/s390/kernel/crash_dump.c +++ b/arch/s390/kernel/crash_dump.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/gfp.h> | 12 | #include <linux/gfp.h> |
13 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
14 | #include <linux/crash_dump.h> | ||
15 | #include <linux/bootmem.h> | 14 | #include <linux/bootmem.h> |
16 | #include <linux/elf.h> | 15 | #include <linux/elf.h> |
17 | #include <asm/ipl.h> | 16 | #include <asm/ipl.h> |
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index 5d633019d8f3..50236610de83 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c | |||
@@ -223,16 +223,38 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
223 | #ifdef CONFIG_MEMORY_HOTPLUG | 223 | #ifdef CONFIG_MEMORY_HOTPLUG |
224 | int arch_add_memory(int nid, u64 start, u64 size) | 224 | int arch_add_memory(int nid, u64 start, u64 size) |
225 | { | 225 | { |
226 | struct pglist_data *pgdat; | 226 | unsigned long zone_start_pfn, zone_end_pfn, nr_pages; |
227 | unsigned long start_pfn = PFN_DOWN(start); | ||
228 | unsigned long size_pages = PFN_DOWN(size); | ||
227 | struct zone *zone; | 229 | struct zone *zone; |
228 | int rc; | 230 | int rc; |
229 | 231 | ||
230 | pgdat = NODE_DATA(nid); | ||
231 | zone = pgdat->node_zones + ZONE_MOVABLE; | ||
232 | rc = vmem_add_mapping(start, size); | 232 | rc = vmem_add_mapping(start, size); |
233 | if (rc) | 233 | if (rc) |
234 | return rc; | 234 | return rc; |
235 | rc = __add_pages(nid, zone, PFN_DOWN(start), PFN_DOWN(size)); | 235 | for_each_zone(zone) { |
236 | if (zone_idx(zone) != ZONE_MOVABLE) { | ||
237 | /* Add range within existing zone limits */ | ||
238 | zone_start_pfn = zone->zone_start_pfn; | ||
239 | zone_end_pfn = zone->zone_start_pfn + | ||
240 | zone->spanned_pages; | ||
241 | } else { | ||
242 | /* Add remaining range to ZONE_MOVABLE */ | ||
243 | zone_start_pfn = start_pfn; | ||
244 | zone_end_pfn = start_pfn + size_pages; | ||
245 | } | ||
246 | if (start_pfn < zone_start_pfn || start_pfn >= zone_end_pfn) | ||
247 | continue; | ||
248 | nr_pages = (start_pfn + size_pages > zone_end_pfn) ? | ||
249 | zone_end_pfn - start_pfn : size_pages; | ||
250 | rc = __add_pages(nid, zone, start_pfn, nr_pages); | ||
251 | if (rc) | ||
252 | break; | ||
253 | start_pfn += nr_pages; | ||
254 | size_pages -= nr_pages; | ||
255 | if (!size_pages) | ||
256 | break; | ||
257 | } | ||
236 | if (rc) | 258 | if (rc) |
237 | vmem_remove_mapping(start, size); | 259 | vmem_remove_mapping(start, size); |
238 | return rc; | 260 | return rc; |