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

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>

authored by

David Hildenbrand and committed by
Martin Schwidefsky
78335a30 3a9f3fe6

+9 -11
+1
arch/s390/include/asm/sclp.h
··· 62 62 unsigned long long hamax; 63 63 unsigned int max_cpu; 64 64 unsigned long hsa_size; 65 + unsigned long long facilities; 65 66 }; 66 67 extern struct sclp_info sclp; 67 68
+1 -1
drivers/s390/char/sclp.c
··· 665 665 sclp_send_mask = scbuf->sclp_send_mask; 666 666 spin_unlock_irqrestore(&sclp_lock, flags); 667 667 if (scbuf->validity_sclp_active_facility_mask) 668 - sclp_facilities = scbuf->sclp_active_facility_mask; 668 + sclp.facilities = scbuf->sclp_active_facility_mask; 669 669 sclp_dispatch_state_change(); 670 670 } 671 671
+5 -7
drivers/s390/char/sclp.h
··· 100 100 sccb_mask_t sclp_send_mask; 101 101 } __attribute__((packed)); 102 102 103 - extern u64 sclp_facilities; 104 - 105 - #define SCLP_HAS_CHP_INFO (sclp_facilities & 0x8000000000000000ULL) 106 - #define SCLP_HAS_CHP_RECONFIG (sclp_facilities & 0x2000000000000000ULL) 107 - #define SCLP_HAS_CPU_INFO (sclp_facilities & 0x0800000000000000ULL) 108 - #define SCLP_HAS_CPU_RECONFIG (sclp_facilities & 0x0400000000000000ULL) 109 - #define SCLP_HAS_PCI_RECONFIG (sclp_facilities & 0x0000000040000000ULL) 103 + #define SCLP_HAS_CHP_INFO (sclp.facilities & 0x8000000000000000ULL) 104 + #define SCLP_HAS_CHP_RECONFIG (sclp.facilities & 0x2000000000000000ULL) 105 + #define SCLP_HAS_CPU_INFO (sclp.facilities & 0x0800000000000000ULL) 106 + #define SCLP_HAS_CPU_RECONFIG (sclp.facilities & 0x0400000000000000ULL) 107 + #define SCLP_HAS_PCI_RECONFIG (sclp.facilities & 0x0000000040000000ULL) 110 108 111 109 112 110 struct gds_subvector {
+1 -1
drivers/s390/char/sclp_cmd.c
··· 508 508 509 509 if (OLDMEM_BASE) /* No standby memory in kdump mode */ 510 510 return 0; 511 - if ((sclp_facilities & 0xe00000000000ULL) != 0xe00000000000ULL) 511 + if ((sclp.facilities & 0xe00000000000ULL) != 0xe00000000000ULL) 512 512 return 0; 513 513 rc = -ENOMEM; 514 514 sccb = (void *) __get_free_page(GFP_KERNEL | GFP_DMA);
+1 -2
drivers/s390/char/sclp_early.c
··· 52 52 53 53 struct sclp_info sclp; 54 54 EXPORT_SYMBOL(sclp); 55 - u64 sclp_facilities; 56 55 57 56 static int __init sclp_cmd_sync_early(sclp_cmdw_t cmd, void *sccb) 58 57 { ··· 104 105 if (sclp_read_info_early(sccb)) 105 106 return; 106 107 107 - sclp_facilities = sccb->facilities; 108 + sclp.facilities = sccb->facilities; 108 109 sclp.has_sprp = !!(sccb->fac84 & 0x02); 109 110 sclp.has_cpu_type = !!(sccb->fac84 & 0x01); 110 111 if (sccb->fac85 & 0x02)