s390/sclp: move sclp_facilities into "struct sclp"
Let's also move the facilities into the sclp struct, so we can avoid another separate external variable. Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
parent
3a9f3fe69e
commit
78335a30e0
5 changed files with 9 additions and 11 deletions
|
@ -62,6 +62,7 @@ struct sclp_info {
|
||||||
unsigned long long hamax;
|
unsigned long long hamax;
|
||||||
unsigned int max_cpu;
|
unsigned int max_cpu;
|
||||||
unsigned long hsa_size;
|
unsigned long hsa_size;
|
||||||
|
unsigned long long facilities;
|
||||||
};
|
};
|
||||||
extern struct sclp_info sclp;
|
extern struct sclp_info sclp;
|
||||||
|
|
||||||
|
|
|
@ -665,7 +665,7 @@ sclp_state_change_cb(struct evbuf_header *evbuf)
|
||||||
sclp_send_mask = scbuf->sclp_send_mask;
|
sclp_send_mask = scbuf->sclp_send_mask;
|
||||||
spin_unlock_irqrestore(&sclp_lock, flags);
|
spin_unlock_irqrestore(&sclp_lock, flags);
|
||||||
if (scbuf->validity_sclp_active_facility_mask)
|
if (scbuf->validity_sclp_active_facility_mask)
|
||||||
sclp_facilities = scbuf->sclp_active_facility_mask;
|
sclp.facilities = scbuf->sclp_active_facility_mask;
|
||||||
sclp_dispatch_state_change();
|
sclp_dispatch_state_change();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -100,13 +100,11 @@ struct init_sccb {
|
||||||
sccb_mask_t sclp_send_mask;
|
sccb_mask_t sclp_send_mask;
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
extern u64 sclp_facilities;
|
#define SCLP_HAS_CHP_INFO (sclp.facilities & 0x8000000000000000ULL)
|
||||||
|
#define SCLP_HAS_CHP_RECONFIG (sclp.facilities & 0x2000000000000000ULL)
|
||||||
#define SCLP_HAS_CHP_INFO (sclp_facilities & 0x8000000000000000ULL)
|
#define SCLP_HAS_CPU_INFO (sclp.facilities & 0x0800000000000000ULL)
|
||||||
#define SCLP_HAS_CHP_RECONFIG (sclp_facilities & 0x2000000000000000ULL)
|
#define SCLP_HAS_CPU_RECONFIG (sclp.facilities & 0x0400000000000000ULL)
|
||||||
#define SCLP_HAS_CPU_INFO (sclp_facilities & 0x0800000000000000ULL)
|
#define SCLP_HAS_PCI_RECONFIG (sclp.facilities & 0x0000000040000000ULL)
|
||||||
#define SCLP_HAS_CPU_RECONFIG (sclp_facilities & 0x0400000000000000ULL)
|
|
||||||
#define SCLP_HAS_PCI_RECONFIG (sclp_facilities & 0x0000000040000000ULL)
|
|
||||||
|
|
||||||
|
|
||||||
struct gds_subvector {
|
struct gds_subvector {
|
||||||
|
|
|
@ -508,7 +508,7 @@ static int __init sclp_detect_standby_memory(void)
|
||||||
|
|
||||||
if (OLDMEM_BASE) /* No standby memory in kdump mode */
|
if (OLDMEM_BASE) /* No standby memory in kdump mode */
|
||||||
return 0;
|
return 0;
|
||||||
if ((sclp_facilities & 0xe00000000000ULL) != 0xe00000000000ULL)
|
if ((sclp.facilities & 0xe00000000000ULL) != 0xe00000000000ULL)
|
||||||
return 0;
|
return 0;
|
||||||
rc = -ENOMEM;
|
rc = -ENOMEM;
|
||||||
sccb = (void *) __get_free_page(GFP_KERNEL | GFP_DMA);
|
sccb = (void *) __get_free_page(GFP_KERNEL | GFP_DMA);
|
||||||
|
|
|
@ -52,7 +52,6 @@ static struct sclp_ipl_info sclp_ipl_info;
|
||||||
|
|
||||||
struct sclp_info sclp;
|
struct sclp_info sclp;
|
||||||
EXPORT_SYMBOL(sclp);
|
EXPORT_SYMBOL(sclp);
|
||||||
u64 sclp_facilities;
|
|
||||||
|
|
||||||
static int __init sclp_cmd_sync_early(sclp_cmdw_t cmd, void *sccb)
|
static int __init sclp_cmd_sync_early(sclp_cmdw_t cmd, void *sccb)
|
||||||
{
|
{
|
||||||
|
@ -105,7 +104,7 @@ static void __init sclp_facilities_detect(struct read_info_sccb *sccb)
|
||||||
if (sclp_read_info_early(sccb))
|
if (sclp_read_info_early(sccb))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
sclp_facilities = sccb->facilities;
|
sclp.facilities = sccb->facilities;
|
||||||
sclp.has_sprp = !!(sccb->fac84 & 0x02);
|
sclp.has_sprp = !!(sccb->fac84 & 0x02);
|
||||||
sclp.has_cpu_type = !!(sccb->fac84 & 0x01);
|
sclp.has_cpu_type = !!(sccb->fac84 & 0x01);
|
||||||
if (sccb->fac85 & 0x02)
|
if (sccb->fac85 & 0x02)
|
||||||
|
|
Loading…
Add table
Reference in a new issue