s390/ctlreg: rename ctl_reg.h to ctlreg.h
authorHeiko Carstens <hca@linux.ibm.com>
Mon, 11 Sep 2023 19:39:56 +0000 (21:39 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Tue, 19 Sep 2023 11:26:56 +0000 (13:26 +0200)
Rename ctl_reg.h to ctlreg.h so it matches not only ctlreg.c but also
other control register related function, union, and structure names,
which all come with a ctlreg prefix.

Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
18 files changed:
arch/s390/boot/vmem.c
arch/s390/include/asm/ctl_reg.h [deleted file]
arch/s390/include/asm/ctlreg.h [new file with mode: 0644]
arch/s390/include/asm/mmu_context.h
arch/s390/kernel/ctlreg.c
arch/s390/kernel/nmi.c
arch/s390/kernel/perf_pai_crypto.c
arch/s390/kernel/perf_pai_ext.c
arch/s390/kernel/smp.c
arch/s390/lib/uaccess.c
arch/s390/mm/init.c
arch/s390/mm/maccess.c
arch/s390/mm/vmem.c
drivers/s390/char/diag_ftp.c
drivers/s390/char/sclp_cmd.c
drivers/s390/char/sclp_early.c
drivers/s390/char/sclp_early_core.c
drivers/s390/cio/crw.c

index 36b90864d69f56bae027c2c6142cb8f1ad871e7d..9ac6d00537c1a297a018699c67b66b9682c9d28f 100644 (file)
@@ -2,10 +2,10 @@
 #include <linux/sched/task.h>
 #include <linux/pgtable.h>
 #include <linux/kasan.h>
-#include <asm/ctl_reg.h>
 #include <asm/pgalloc.h>
 #include <asm/facility.h>
 #include <asm/sections.h>
+#include <asm/ctlreg.h>
 #include <asm/physmem_info.h>
 #include <asm/maccess.h>
 #include <asm/abs_lowcore.h>
diff --git a/arch/s390/include/asm/ctl_reg.h b/arch/s390/include/asm/ctl_reg.h
deleted file mode 100644 (file)
index f5536fd..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * Copyright IBM Corp. 1999, 2009
- *
- * Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com>
- */
-
-#ifndef __ASM_CTL_REG_H
-#define __ASM_CTL_REG_H
-
-#include <linux/bits.h>
-
-#define CR0_CLOCK_COMPARATOR_SIGN      BIT(63 - 10)
-#define CR0_LOW_ADDRESS_PROTECTION     BIT(63 - 35)
-#define CR0_FETCH_PROTECTION_OVERRIDE  BIT(63 - 38)
-#define CR0_STORAGE_PROTECTION_OVERRIDE        BIT(63 - 39)
-#define CR0_EMERGENCY_SIGNAL_SUBMASK   BIT(63 - 49)
-#define CR0_EXTERNAL_CALL_SUBMASK      BIT(63 - 50)
-#define CR0_CLOCK_COMPARATOR_SUBMASK   BIT(63 - 52)
-#define CR0_CPU_TIMER_SUBMASK          BIT(63 - 53)
-#define CR0_SERVICE_SIGNAL_SUBMASK     BIT(63 - 54)
-#define CR0_UNUSED_56                  BIT(63 - 56)
-#define CR0_INTERRUPT_KEY_SUBMASK      BIT(63 - 57)
-#define CR0_MEASUREMENT_ALERT_SUBMASK  BIT(63 - 58)
-
-#define CR14_UNUSED_32                 BIT(63 - 32)
-#define CR14_UNUSED_33                 BIT(63 - 33)
-#define CR14_CHANNEL_REPORT_SUBMASK    BIT(63 - 35)
-#define CR14_RECOVERY_SUBMASK          BIT(63 - 36)
-#define CR14_DEGRADATION_SUBMASK       BIT(63 - 37)
-#define CR14_EXTERNAL_DAMAGE_SUBMASK   BIT(63 - 38)
-#define CR14_WARNING_SUBMASK           BIT(63 - 39)
-
-#ifndef __ASSEMBLY__
-
-#include <linux/bug.h>
-
-#define __ctl_load(array, low, high) do {                              \
-       typedef struct { char _[sizeof(array)]; } addrtype;             \
-                                                                       \
-       BUILD_BUG_ON(sizeof(addrtype) != (high - low + 1) * sizeof(long));\
-       asm volatile(                                                   \
-               "       lctlg   %1,%2,%0\n"                             \
-               :                                                       \
-               : "Q" (*(addrtype *)(&array)), "i" (low), "i" (high)    \
-               : "memory");                                            \
-} while (0)
-
-#define __ctl_store(array, low, high) do {                             \
-       typedef struct { char _[sizeof(array)]; } addrtype;             \
-                                                                       \
-       BUILD_BUG_ON(sizeof(addrtype) != (high - low + 1) * sizeof(long));\
-       asm volatile(                                                   \
-               "       stctg   %1,%2,%0\n"                             \
-               : "=Q" (*(addrtype *)(&array))                          \
-               : "i" (low), "i" (high));                               \
-} while (0)
-
-static __always_inline void __ctl_set_bit(unsigned int cr, unsigned int bit)
-{
-       unsigned long reg;
-
-       __ctl_store(reg, cr, cr);
-       reg |= 1UL << bit;
-       __ctl_load(reg, cr, cr);
-}
-
-static __always_inline void __ctl_clear_bit(unsigned int cr, unsigned int bit)
-{
-       unsigned long reg;
-
-       __ctl_store(reg, cr, cr);
-       reg &= ~(1UL << bit);
-       __ctl_load(reg, cr, cr);
-}
-
-void ctlreg_lock(void);
-void ctlreg_unlock(void);
-void ctl_set_clear_bit(int cr, int bit, bool set);
-
-static inline void ctl_set_bit(int cr, int bit)
-{
-       ctl_set_clear_bit(cr, bit, true);
-}
-
-static inline void ctl_clear_bit(int cr, int bit)
-{
-       ctl_set_clear_bit(cr, bit, false);
-}
-
-union ctlreg0 {
-       unsigned long val;
-       struct {
-               unsigned long      : 8;
-               unsigned long tcx  : 1; /* Transactional-Execution control */
-               unsigned long pifo : 1; /* Transactional-Execution Program-
-                                          Interruption-Filtering Override */
-               unsigned long      : 3;
-               unsigned long ccc  : 1; /* Cryptography counter control */
-               unsigned long pec  : 1; /* PAI extension control */
-               unsigned long      : 17;
-               unsigned long      : 3;
-               unsigned long lap  : 1; /* Low-address-protection control */
-               unsigned long      : 4;
-               unsigned long edat : 1; /* Enhanced-DAT-enablement control */
-               unsigned long      : 2;
-               unsigned long iep  : 1; /* Instruction-Execution-Protection */
-               unsigned long      : 1;
-               unsigned long afp  : 1; /* AFP-register control */
-               unsigned long vx   : 1; /* Vector enablement control */
-               unsigned long      : 7;
-               unsigned long sssm : 1; /* Service signal subclass mask */
-               unsigned long      : 9;
-       };
-};
-
-union ctlreg2 {
-       unsigned long val;
-       struct {
-               unsigned long       : 33;
-               unsigned long ducto : 25;
-               unsigned long       : 1;
-               unsigned long gse   : 1;
-               unsigned long       : 1;
-               unsigned long tds   : 1;
-               unsigned long tdc   : 2;
-       };
-};
-
-union ctlreg5 {
-       unsigned long val;
-       struct {
-               unsigned long       : 33;
-               unsigned long pasteo: 25;
-               unsigned long       : 6;
-       };
-};
-
-union ctlreg15 {
-       unsigned long val;
-       struct {
-               unsigned long lsea  : 61;
-               unsigned long       : 3;
-       };
-};
-
-#endif /* __ASSEMBLY__ */
-#endif /* __ASM_CTL_REG_H */
diff --git a/arch/s390/include/asm/ctlreg.h b/arch/s390/include/asm/ctlreg.h
new file mode 100644 (file)
index 0000000..25b955d
--- /dev/null
@@ -0,0 +1,148 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright IBM Corp. 1999, 2009
+ *
+ * Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com>
+ */
+
+#ifndef __ASM_S390_CTLREG_H
+#define __ASM_S390_CTLREG_H
+
+#include <linux/bits.h>
+
+#define CR0_CLOCK_COMPARATOR_SIGN      BIT(63 - 10)
+#define CR0_LOW_ADDRESS_PROTECTION     BIT(63 - 35)
+#define CR0_FETCH_PROTECTION_OVERRIDE  BIT(63 - 38)
+#define CR0_STORAGE_PROTECTION_OVERRIDE        BIT(63 - 39)
+#define CR0_EMERGENCY_SIGNAL_SUBMASK   BIT(63 - 49)
+#define CR0_EXTERNAL_CALL_SUBMASK      BIT(63 - 50)
+#define CR0_CLOCK_COMPARATOR_SUBMASK   BIT(63 - 52)
+#define CR0_CPU_TIMER_SUBMASK          BIT(63 - 53)
+#define CR0_SERVICE_SIGNAL_SUBMASK     BIT(63 - 54)
+#define CR0_UNUSED_56                  BIT(63 - 56)
+#define CR0_INTERRUPT_KEY_SUBMASK      BIT(63 - 57)
+#define CR0_MEASUREMENT_ALERT_SUBMASK  BIT(63 - 58)
+
+#define CR14_UNUSED_32                 BIT(63 - 32)
+#define CR14_UNUSED_33                 BIT(63 - 33)
+#define CR14_CHANNEL_REPORT_SUBMASK    BIT(63 - 35)
+#define CR14_RECOVERY_SUBMASK          BIT(63 - 36)
+#define CR14_DEGRADATION_SUBMASK       BIT(63 - 37)
+#define CR14_EXTERNAL_DAMAGE_SUBMASK   BIT(63 - 38)
+#define CR14_WARNING_SUBMASK           BIT(63 - 39)
+
+#ifndef __ASSEMBLY__
+
+#include <linux/bug.h>
+
+#define __ctl_load(array, low, high) do {                              \
+       typedef struct { char _[sizeof(array)]; } addrtype;             \
+                                                                       \
+       BUILD_BUG_ON(sizeof(addrtype) != (high - low + 1) * sizeof(long));\
+       asm volatile(                                                   \
+               "       lctlg   %1,%2,%0\n"                             \
+               :                                                       \
+               : "Q" (*(addrtype *)(&array)), "i" (low), "i" (high)    \
+               : "memory");                                            \
+} while (0)
+
+#define __ctl_store(array, low, high) do {                             \
+       typedef struct { char _[sizeof(array)]; } addrtype;             \
+                                                                       \
+       BUILD_BUG_ON(sizeof(addrtype) != (high - low + 1) * sizeof(long));\
+       asm volatile(                                                   \
+               "       stctg   %1,%2,%0\n"                             \
+               : "=Q" (*(addrtype *)(&array))                          \
+               : "i" (low), "i" (high));                               \
+} while (0)
+
+static __always_inline void __ctl_set_bit(unsigned int cr, unsigned int bit)
+{
+       unsigned long reg;
+
+       __ctl_store(reg, cr, cr);
+       reg |= 1UL << bit;
+       __ctl_load(reg, cr, cr);
+}
+
+static __always_inline void __ctl_clear_bit(unsigned int cr, unsigned int bit)
+{
+       unsigned long reg;
+
+       __ctl_store(reg, cr, cr);
+       reg &= ~(1UL << bit);
+       __ctl_load(reg, cr, cr);
+}
+
+void ctlreg_lock(void);
+void ctlreg_unlock(void);
+void ctl_set_clear_bit(int cr, int bit, bool set);
+
+static inline void ctl_set_bit(int cr, int bit)
+{
+       ctl_set_clear_bit(cr, bit, true);
+}
+
+static inline void ctl_clear_bit(int cr, int bit)
+{
+       ctl_set_clear_bit(cr, bit, false);
+}
+
+union ctlreg0 {
+       unsigned long val;
+       struct {
+               unsigned long      : 8;
+               unsigned long tcx  : 1; /* Transactional-Execution control */
+               unsigned long pifo : 1; /* Transactional-Execution Program-
+                                          Interruption-Filtering Override */
+               unsigned long      : 3;
+               unsigned long ccc  : 1; /* Cryptography counter control */
+               unsigned long pec  : 1; /* PAI extension control */
+               unsigned long      : 17;
+               unsigned long      : 3;
+               unsigned long lap  : 1; /* Low-address-protection control */
+               unsigned long      : 4;
+               unsigned long edat : 1; /* Enhanced-DAT-enablement control */
+               unsigned long      : 2;
+               unsigned long iep  : 1; /* Instruction-Execution-Protection */
+               unsigned long      : 1;
+               unsigned long afp  : 1; /* AFP-register control */
+               unsigned long vx   : 1; /* Vector enablement control */
+               unsigned long      : 7;
+               unsigned long sssm : 1; /* Service signal subclass mask */
+               unsigned long      : 9;
+       };
+};
+
+union ctlreg2 {
+       unsigned long val;
+       struct {
+               unsigned long       : 33;
+               unsigned long ducto : 25;
+               unsigned long       : 1;
+               unsigned long gse   : 1;
+               unsigned long       : 1;
+               unsigned long tds   : 1;
+               unsigned long tdc   : 2;
+       };
+};
+
+union ctlreg5 {
+       unsigned long val;
+       struct {
+               unsigned long       : 33;
+               unsigned long pasteo: 25;
+               unsigned long       : 6;
+       };
+};
+
+union ctlreg15 {
+       unsigned long val;
+       struct {
+               unsigned long lsea  : 61;
+               unsigned long       : 3;
+       };
+};
+
+#endif /* __ASSEMBLY__ */
+#endif /* __ASM_S390_CTLREG_H */
index 2a38af5a00c2df0baff5594a59635f7c86d01b0e..50f247eede603c01c2233d7c10c3fec780e44eec 100644 (file)
@@ -12,7 +12,7 @@
 #include <linux/uaccess.h>
 #include <linux/mm_types.h>
 #include <asm/tlbflush.h>
-#include <asm/ctl_reg.h>
+#include <asm/ctlreg.h>
 #include <asm-generic/mm_hooks.h>
 
 #define init_new_context init_new_context
index 176ada8b45c2380eb0c3d60cfa2651e77897729f..a01b901d4866372ae9d422c8632ad35c7000598b 100644 (file)
@@ -6,7 +6,7 @@
 #include <linux/spinlock.h>
 #include <linux/smp.h>
 #include <asm/abs_lowcore.h>
-#include <asm/ctl_reg.h>
+#include <asm/ctlreg.h>
 
 /*
  * ctl_lock guards access to global control register contents which
index 38ec0487521c42e8aed1895b3e9dc22d85fe6379..b813d9dfa53c9ef89e2cc579606349447b9e77fd 100644 (file)
 #include <linux/kvm_host.h>
 #include <linux/export.h>
 #include <asm/lowcore.h>
+#include <asm/ctlreg.h>
 #include <asm/smp.h>
 #include <asm/stp.h>
 #include <asm/cputime.h>
 #include <asm/nmi.h>
 #include <asm/crw.h>
 #include <asm/switch_to.h>
-#include <asm/ctl_reg.h>
 #include <asm/asm-offsets.h>
 #include <asm/pai.h>
 #include <asm/vx-insn.h>
index fe7d1774ded18439270efeb3eecd200cbcc8893c..6280a0e588c545b314353ca04897a3d6a0f15d56 100644 (file)
@@ -16,8 +16,7 @@
 #include <linux/export.h>
 #include <linux/io.h>
 #include <linux/perf_event.h>
-
-#include <asm/ctl_reg.h>
+#include <asm/ctlreg.h>
 #include <asm/pai.h>
 #include <asm/debug.h>
 
index c57c1a203256fba029be8e0a17344cbce5cc0957..b8877493dbb6ec0c833ad7b72edc43ede10973fe 100644 (file)
@@ -17,8 +17,7 @@
 #include <linux/export.h>
 #include <linux/io.h>
 #include <linux/perf_event.h>
-
-#include <asm/ctl_reg.h>
+#include <asm/ctlreg.h>
 #include <asm/pai.h>
 #include <asm/debug.h>
 
index d12dbba9d03c0540c7969fe38a288bee0eb79304..204c72428696387286e885184a0c418c2723fa9b 100644 (file)
@@ -37,7 +37,7 @@
 #include <linux/crash_dump.h>
 #include <linux/kprobes.h>
 #include <asm/asm-offsets.h>
-#include <asm/ctl_reg.h>
+#include <asm/ctlreg.h>
 #include <asm/pfault.h>
 #include <asm/diag.h>
 #include <asm/switch_to.h>
index 80b9c2d039f6266aababdce01f7ead5401e59a62..478ab4c7d197b061ea56fb39b676adef12bbe0cb 100644 (file)
@@ -12,7 +12,7 @@
 #include <linux/export.h>
 #include <linux/mm.h>
 #include <asm/asm-extable.h>
-#include <asm/ctl_reg.h>
+#include <asm/ctlreg.h>
 
 #ifdef CONFIG_DEBUG_ENTRY
 void debug_user_asce(int exit)
index 8b94d2212d33325c2c98ab73c483e33543b50fca..c6ab6f2707d7d41ef4d2dfde9c318f1b9c2bd6f8 100644 (file)
@@ -35,6 +35,7 @@
 #include <asm/processor.h>
 #include <linux/uaccess.h>
 #include <asm/pgalloc.h>
+#include <asm/ctlreg.h>
 #include <asm/kfence.h>
 #include <asm/ptdump.h>
 #include <asm/dma.h>
@@ -42,7 +43,6 @@
 #include <asm/tlb.h>
 #include <asm/tlbflush.h>
 #include <asm/sections.h>
-#include <asm/ctl_reg.h>
 #include <asm/sclp.h>
 #include <asm/set_memory.h>
 #include <asm/kasan.h>
index c805b3e2592bbea8178586a84008ab92c49e5d7b..632c3a55feedf140b80c47302dff2399bf310ec3 100644 (file)
 #include <linux/uio.h>
 #include <linux/io.h>
 #include <asm/asm-extable.h>
-#include <asm/ctl_reg.h>
 #include <asm/abs_lowcore.h>
 #include <asm/stacktrace.h>
 #include <asm/maccess.h>
+#include <asm/ctlreg.h>
 
 unsigned long __bootdata_preserved(__memcpy_real_area);
 pte_t *__bootdata_preserved(memcpy_real_ptep);
index 9d3f9fa6f4986c4e857f67a69b81d6220ec73037..91c1f42f6a76c1a6b8b99e7543e4856518eb99c1 100644 (file)
@@ -14,7 +14,7 @@
 #include <linux/sort.h>
 #include <asm/cacheflush.h>
 #include <asm/nospec-branch.h>
-#include <asm/ctl_reg.h>
+#include <asm/ctlreg.h>
 #include <asm/pgalloc.h>
 #include <asm/setup.h>
 #include <asm/tlbflush.h>
index 65c7f2d565d80631444c3a9cfd6cfd4441c5ed0e..9418a9270d03ab7ccf2cadf43f2b5fab1baa301a 100644 (file)
@@ -16,7 +16,7 @@
 #include <linux/wait.h>
 #include <linux/string.h>
 #include <asm/asm-extable.h>
-#include <asm/ctl_reg.h>
+#include <asm/ctlreg.h>
 #include <asm/diag.h>
 
 #include "hmcdrv_ftp.h"
index 8b4575a0db9fb77cff1e3f69f8ec58bf0ca19795..b73edf0cd72532954dc5a105b89562ed223c3687 100644 (file)
@@ -19,7 +19,7 @@
 #include <linux/mmzone.h>
 #include <linux/memory.h>
 #include <linux/module.h>
-#include <asm/ctl_reg.h>
+#include <asm/ctlreg.h>
 #include <asm/chpid.h>
 #include <asm/setup.h>
 #include <asm/page.h>
index fdc8668f3fba719995beff9a8fa9db7fa49a5645..60a247fdb2a7648ce8bcd04333464d028e7d4622 100644 (file)
@@ -10,7 +10,7 @@
 
 #include <linux/errno.h>
 #include <linux/memblock.h>
-#include <asm/ctl_reg.h>
+#include <asm/ctlreg.h>
 #include <asm/sclp.h>
 #include <asm/ipl.h>
 #include <asm/setup.h>
index a191d69573fbb4c6aaf9fb0153bf22d0eed99a4f..f7067a70c4613f4b92b6a9ce7fdbe9c14b058a94 100644 (file)
@@ -6,8 +6,8 @@
 
 #include <linux/kernel.h>
 #include <asm/processor.h>
-#include <asm/ctl_reg.h>
 #include <asm/lowcore.h>
+#include <asm/ctlreg.h>
 #include <asm/ebcdic.h>
 #include <asm/irq.h>
 #include <asm/sections.h>
index 7b02a6349c4d27907ea8cc0afde1d3d919bf67e5..58f22270d9c4dcec7f8d18c039c1149478065f2d 100644 (file)
@@ -12,8 +12,8 @@
 #include <linux/kthread.h>
 #include <linux/init.h>
 #include <linux/wait.h>
+#include <asm/ctlreg.h>
 #include <asm/crw.h>
-#include <asm/ctl_reg.h>
 #include "ioasm.h"
 
 static DEFINE_MUTEX(crw_handler_mutex);