diff options
Diffstat (limited to 'drivers/s390/char/sclp_cmd.c')
-rw-r--r-- | drivers/s390/char/sclp_cmd.c | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/drivers/s390/char/sclp_cmd.c b/drivers/s390/char/sclp_cmd.c index 7be782116dab..f74c040d5c10 100644 --- a/drivers/s390/char/sclp_cmd.c +++ b/drivers/s390/char/sclp_cmd.c @@ -101,7 +101,7 @@ static void sclp_fill_cpu_info(struct sclp_cpu_info *info, info->configured = sccb->nr_configured; info->standby = sccb->nr_standby; info->combined = sccb->nr_configured + sccb->nr_standby; - info->has_cpu_type = sclp_fac84 & 0x1; + info->has_cpu_type = sclp.has_cpu_type; memcpy(&info->cpu, page + sccb->offset_configured, info->combined * sizeof(struct sclp_cpu_entry)); } @@ -186,7 +186,7 @@ int sclp_cpu_deconfigure(u8 cpu) static DEFINE_MUTEX(sclp_mem_mutex); static LIST_HEAD(sclp_mem_list); static u8 sclp_max_storage_id; -static unsigned long sclp_storage_ids[256 / BITS_PER_LONG]; +static DECLARE_BITMAP(sclp_storage_ids, 256); static int sclp_mem_state_changed; struct memory_increment { @@ -202,14 +202,14 @@ struct assign_storage_sccb { int arch_get_memory_phys_device(unsigned long start_pfn) { - if (!sclp_rzm) + if (!sclp.rzm) return 0; - return PFN_PHYS(start_pfn) >> ilog2(sclp_rzm); + return PFN_PHYS(start_pfn) >> ilog2(sclp.rzm); } static unsigned long long rn2addr(u16 rn) { - return (unsigned long long) (rn - 1) * sclp_rzm; + return (unsigned long long) (rn - 1) * sclp.rzm; } static int do_assign_storage(sclp_cmdw_t cmd, u16 rn) @@ -250,7 +250,7 @@ static int sclp_assign_storage(u16 rn) if (rc) return rc; start = rn2addr(rn); - storage_key_init_range(start, start + sclp_rzm); + storage_key_init_range(start, start + sclp.rzm); return 0; } @@ -309,7 +309,7 @@ static int sclp_mem_change_state(unsigned long start, unsigned long size, istart = rn2addr(incr->rn); if (start + size - 1 < istart) break; - if (start > istart + sclp_rzm - 1) + if (start > istart + sclp.rzm - 1) continue; if (online) rc |= sclp_assign_storage(incr->rn); @@ -330,7 +330,7 @@ static bool contains_standby_increment(unsigned long start, unsigned long end) istart = rn2addr(incr->rn); if (end - 1 < istart) continue; - if (start > istart + sclp_rzm - 1) + if (start > istart + sclp.rzm - 1) continue; if (incr->standby) return true; @@ -415,7 +415,7 @@ static void __init add_memory_merged(u16 rn) if (!first_rn) goto skip_add; start = rn2addr(first_rn); - size = (unsigned long long) num * sclp_rzm; + size = (unsigned long long) num * sclp.rzm; if (start >= VMEM_MAX_PHYS) goto skip_add; if (start + size > VMEM_MAX_PHYS) @@ -465,7 +465,7 @@ static void __init insert_increment(u16 rn, int standby, int assigned) } if (!assigned) new_incr->rn = last_rn + 1; - if (new_incr->rn > sclp_rnmax) { + if (new_incr->rn > sclp.rnmax) { kfree(new_incr); return; } @@ -508,7 +508,7 @@ static int __init sclp_detect_standby_memory(void) if (OLDMEM_BASE) /* No standby memory in kdump mode */ return 0; - if ((sclp_facilities & 0xe00000000000ULL) != 0xe00000000000ULL) + if ((sclp.facilities & 0xe00000000000ULL) != 0xe00000000000ULL) return 0; rc = -ENOMEM; sccb = (void *) __get_free_page(GFP_KERNEL | GFP_DMA); @@ -550,7 +550,7 @@ static int __init sclp_detect_standby_memory(void) } if (rc || list_empty(&sclp_mem_list)) goto out; - for (i = 1; i <= sclp_rnmax - assigned; i++) + for (i = 1; i <= sclp.rnmax - assigned; i++) insert_increment(0, 1, 0); rc = register_memory_notifier(&sclp_mem_nb); if (rc) @@ -753,8 +753,3 @@ out: free_page((unsigned long) sccb); return rc; } - -bool sclp_has_sprp(void) -{ - return !!(sclp_fac84 & 0x2); -} |