Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull more s390 updates from Martin Schwidefsky:
 "This is the second batch of s390 patches for the 3.10 merge window.

  Heiko improved the memory detection, this fixes kdump for large memory
  sizes.  Some kvm related memory management work, new ipldev/condev
  keywords in cio and bug fixes."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390/mem_detect: remove artificial kdump memory types
  s390/mm: add pte invalidation notifier for kvm
  s390/zcrypt: ap bus rescan problem when toggle crypto adapters on/off
  s390/memory hotplug,sclp: get rid of per memory increment usecount
  s390/memory hotplug: provide memory_block_size_bytes() function
  s390/mem_detect: limit memory detection loop to "mem=" parameter
  s390/kdump,bootmem: fix bootmem allocator bitmap size
  s390: get rid of odd global real_memory_size
  s390/kvm: Change the virtual memory mapping location for Virtio devices
  s390/zcore: calculate real memory size using own get_mem_size function
  s390/mem_detect: add DAT sanity check
  s390/mem_detect: fix lockdep irq tracing
  s390/mem_detect: move memory detection code to mm folder
  s390/zfcpdump: exploit new cio_ignore keywords
  s390/cio: add condev keyword to cio_ignore
  s390/cio: add ipldev keyword to cio_ignore
  s390/uaccess: add "fallthrough" comments
This commit is contained in:
Linus Torvalds 2013-05-06 12:34:53 -07:00
commit 2bf1bef0d6
18 changed files with 415 additions and 269 deletions

View file

@ -345,7 +345,6 @@ struct memory_increment {
struct list_head list;
u16 rn;
int standby;
int usecount;
};
struct assign_storage_sccb {
@ -463,21 +462,10 @@ static int sclp_mem_change_state(unsigned long start, unsigned long size,
break;
if (start > istart + rzm - 1)
continue;
if (online) {
if (incr->usecount++)
continue;
/*
* Don't break the loop if one assign fails. Loop may
* be walked again on CANCEL and we can't save
* information if state changed before or not.
* So continue and increase usecount for all increments.
*/
if (online)
rc |= sclp_assign_storage(incr->rn);
} else {
if (--incr->usecount)
continue;
else
sclp_unassign_storage(incr->rn);
}
}
return rc ? -EIO : 0;
}
@ -561,8 +549,6 @@ static void __init sclp_add_standby_memory(void)
add_memory_merged(0);
}
#define MEM_SCT_SIZE (1UL << SECTION_SIZE_BITS)
static void __init insert_increment(u16 rn, int standby, int assigned)
{
struct memory_increment *incr, *new_incr;
@ -574,8 +560,6 @@ static void __init insert_increment(u16 rn, int standby, int assigned)
return;
new_incr->rn = rn;
new_incr->standby = standby;
if (!standby)
new_incr->usecount = rzm > MEM_SCT_SIZE ? rzm/MEM_SCT_SIZE : 1;
last_rn = 0;
prev = &sclp_mem_list;
list_for_each_entry(incr, &sclp_mem_list, list) {

View file

@ -426,7 +426,7 @@ static int zcore_memmap_open(struct inode *inode, struct file *filp)
GFP_KERNEL);
if (!chunk_array)
return -ENOMEM;
detect_memory_layout(chunk_array);
detect_memory_layout(chunk_array, 0);
buf = kzalloc(MEMORY_CHUNKS * CHUNK_INFO_SIZE, GFP_KERNEL);
if (!buf) {
kfree(chunk_array);
@ -557,7 +557,7 @@ static void __init set_lc_mask(struct save_area *map)
/*
* Initialize dump globals for a given architecture
*/
static int __init sys_info_init(enum arch_id arch)
static int __init sys_info_init(enum arch_id arch, unsigned long mem_end)
{
int rc;
@ -579,7 +579,7 @@ static int __init sys_info_init(enum arch_id arch)
rc = init_cpu_info(arch);
if (rc)
return rc;
sys_info.mem_size = real_memory_size;
sys_info.mem_size = mem_end;
return 0;
}
@ -601,7 +601,7 @@ static int __init check_sdias(void)
return 0;
}
static int __init get_mem_size(unsigned long *mem)
static int __init get_mem_info(unsigned long *mem, unsigned long *end)
{
int i;
struct mem_chunk *chunk_array;
@ -610,33 +610,31 @@ static int __init get_mem_size(unsigned long *mem)
GFP_KERNEL);
if (!chunk_array)
return -ENOMEM;
detect_memory_layout(chunk_array);
detect_memory_layout(chunk_array, 0);
for (i = 0; i < MEMORY_CHUNKS; i++) {
if (chunk_array[i].size == 0)
break;
*mem += chunk_array[i].size;
*end = max(*end, chunk_array[i].addr + chunk_array[i].size);
}
kfree(chunk_array);
return 0;
}
static int __init zcore_header_init(int arch, struct zcore_header *hdr)
static void __init zcore_header_init(int arch, struct zcore_header *hdr,
unsigned long mem_size)
{
int rc, i;
unsigned long memory = 0;
u32 prefix;
int i;
if (arch == ARCH_S390X)
hdr->arch_id = DUMP_ARCH_S390X;
else
hdr->arch_id = DUMP_ARCH_S390;
rc = get_mem_size(&memory);
if (rc)
return rc;
hdr->mem_size = memory;
hdr->rmem_size = memory;
hdr->mem_size = mem_size;
hdr->rmem_size = mem_size;
hdr->mem_end = sys_info.mem_size;
hdr->num_pages = memory / PAGE_SIZE;
hdr->num_pages = mem_size / PAGE_SIZE;
hdr->tod = get_tod_clock();
get_cpu_id(&hdr->cpu_id);
for (i = 0; zfcpdump_save_areas[i]; i++) {
@ -647,7 +645,6 @@ static int __init zcore_header_init(int arch, struct zcore_header *hdr)
hdr->lc_vec[hdr->cpu_cnt] = prefix;
hdr->cpu_cnt++;
}
return 0;
}
/*
@ -682,9 +679,11 @@ static int __init zcore_reipl_init(void)
static int __init zcore_init(void)
{
unsigned long mem_size, mem_end;
unsigned char arch;
int rc;
mem_size = mem_end = 0;
if (ipl_info.type != IPL_TYPE_FCP_DUMP)
return -ENODATA;
if (OLDMEM_BASE)
@ -727,13 +726,14 @@ static int __init zcore_init(void)
}
#endif /* CONFIG_64BIT */
rc = sys_info_init(arch);
rc = get_mem_info(&mem_size, &mem_end);
if (rc)
goto fail;
rc = zcore_header_init(arch, &zcore_header);
rc = sys_info_init(arch, mem_end);
if (rc)
goto fail;
zcore_header_init(arch, &zcore_header, mem_size);
rc = zcore_reipl_init();
if (rc)

View file

@ -1,7 +1,7 @@
/*
* S/390 common I/O routines -- blacklisting of specific devices
*
* Copyright IBM Corp. 1999, 2002
* Copyright IBM Corp. 1999, 2013
* Author(s): Ingo Adlung (adlung@de.ibm.com)
* Cornelia Huck (cornelia.huck@de.ibm.com)
* Arnd Bergmann (arndb@de.ibm.com)
@ -17,8 +17,9 @@
#include <linux/ctype.h>
#include <linux/device.h>
#include <asm/cio.h>
#include <asm/uaccess.h>
#include <asm/cio.h>
#include <asm/ipl.h>
#include "blacklist.h"
#include "cio.h"
@ -172,6 +173,29 @@ static int blacklist_parse_parameters(char *str, range_action action,
to_cssid = __MAX_CSSID;
to_ssid = __MAX_SSID;
to = __MAX_SUBCHANNEL;
} else if (strcmp(parm, "ipldev") == 0) {
if (ipl_info.type == IPL_TYPE_CCW) {
from_cssid = 0;
from_ssid = ipl_info.data.ccw.dev_id.ssid;
from = ipl_info.data.ccw.dev_id.devno;
} else if (ipl_info.type == IPL_TYPE_FCP ||
ipl_info.type == IPL_TYPE_FCP_DUMP) {
from_cssid = 0;
from_ssid = ipl_info.data.fcp.dev_id.ssid;
from = ipl_info.data.fcp.dev_id.devno;
} else {
continue;
}
to_cssid = from_cssid;
to_ssid = from_ssid;
to = from;
} else if (strcmp(parm, "condev") == 0) {
if (console_devno == -1)
continue;
from_cssid = to_cssid = 0;
from_ssid = to_ssid = 0;
from = to = console_devno;
} else {
rc = parse_busid(strsep(&parm, "-"), &from_cssid,
&from_ssid, &from, msgtrigger);

View file

@ -954,15 +954,11 @@ EXPORT_SYMBOL(ap_driver_unregister);
void ap_bus_force_rescan(void)
{
/* Delete the AP bus rescan timer. */
del_timer(&ap_config_timer);
/* processing a synchonuous bus rescan */
ap_scan_bus(NULL);
/* Setup the AP bus rescan timer again. */
ap_config_timer.expires = jiffies + ap_config_time * HZ;
add_timer(&ap_config_timer);
/* reconfigure the AP bus rescan timer. */
mod_timer(&ap_config_timer, jiffies + ap_config_time * HZ);
/* processing a asynchronous bus rescan */
queue_work(ap_work_queue, &ap_config_work);
flush_work(&ap_config_work);
}
EXPORT_SYMBOL(ap_bus_force_rescan);
@ -1305,8 +1301,9 @@ static void ap_scan_bus(struct work_struct *unused)
int rc, i;
ap_query_configuration();
if (ap_select_domain() != 0)
if (ap_select_domain() != 0) {
return;
}
for (i = 0; i < AP_DEVICES; i++) {
qid = AP_MKQID(i, ap_domain_index);
dev = bus_find_device(&ap_bus_type, NULL,