Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+29 -5
+3
arch/s390/Kconfig
··· 227 227 config SYSVIPC_COMPAT 228 228 def_bool y if COMPAT && SYSVIPC 229 229 230 + config KEYS_COMPAT 231 + def_bool y if COMPAT && KEYS 232 + 230 233 config AUDIT_ARCH 231 234 def_bool y 232 235
-1
arch/s390/kernel/crash_dump.c
··· 11 11 #include <linux/module.h> 12 12 #include <linux/gfp.h> 13 13 #include <linux/slab.h> 14 - #include <linux/crash_dump.h> 15 14 #include <linux/bootmem.h> 16 15 #include <linux/elf.h> 17 16 #include <asm/ipl.h>
+26 -4
arch/s390/mm/init.c
··· 223 223 #ifdef CONFIG_MEMORY_HOTPLUG 224 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 229 struct zone *zone; 228 230 int rc; 229 231 230 - pgdat = NODE_DATA(nid); 231 - zone = pgdat->node_zones + ZONE_MOVABLE; 232 232 rc = vmem_add_mapping(start, size); 233 233 if (rc) 234 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 258 if (rc) 237 259 vmem_remove_mapping(start, size); 238 260 return rc;