s390/bp: remove __bpon()
authorHeiko Carstens <hca@linux.ibm.com>
Tue, 28 Feb 2023 12:57:50 +0000 (13:57 +0100)
committerVasily Gorbik <gor@linux.ibm.com>
Mon, 13 Mar 2023 08:16:42 +0000 (09:16 +0100)
There is no point in changing branch prediction state of a cpu shortly
before it enters stop state. Therefore remove __bpon().

Acked-by: Alexander Gordeev <agordeev@linux.ibm.com>
Reviewed-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/include/asm/processor.h
arch/s390/kernel/entry.S
arch/s390/kernel/ipl.c
arch/s390/kernel/smp.c

index dd95fddd5ddaa7556fbb5e9e317bd70596bb689a..80ac0c1034dc81584bb734aa8d4665ab3784b42f 100644 (file)
@@ -99,7 +99,6 @@ void cpu_detect_mhz_feature(void);
 
 extern const struct seq_operations cpuinfo_op;
 extern void execve_tail(void);
-extern void __bpon(void);
 unsigned long vdso_size(void);
 
 /*
index d8890a6f5deed2b7d8fbc561ea25b201bd2043c7..58b85aedca22df589fcc639e4ce8b0de282d1f75 100644 (file)
@@ -159,21 +159,15 @@ _LPP_OFFSET       = __LC_LPP
        .section .kprobes.text, "ax"
 .Ldummy:
        /*
-        * This nop exists only in order to avoid that __bpon starts at
-        * the beginning of the kprobes text section. In that case we would
-        * have several symbols at the same address. E.g. objdump would take
-        * an arbitrary symbol name when disassembling this code.
-        * With the added nop in between the __bpon symbol is unique
-        * again.
+        * The following nop exists only in order to avoid that the next
+        * symbol starts at the beginning of the kprobes text section.
+        * In that case there would be several symbols at the same address.
+        * E.g. objdump would take an arbitrary symbol when disassembling
+        * the code.
+        * With the added nop in between this cannot happen.
         */
        nop     0
 
-ENTRY(__bpon)
-       .globl __bpon
-       BPON
-       BR_EX   %r14
-ENDPROC(__bpon)
-
 /*
  * Scheduler resume function, called by switch_to
  *  gpr2 = (task_struct *) prev
index 5f0f5c86963a97f53498c6e66810299067ed150f..0f91cd401eefb19bc542e2afee1ff57b477621b2 100644 (file)
@@ -649,7 +649,6 @@ static struct kset *ipl_kset;
 
 static void __ipl_run(void *unused)
 {
-       __bpon();
        diag308(DIAG308_LOAD_CLEAR, NULL);
 }
 
index d4888453bbf8b180714e24ad9c685f26db3f3636..0126c5f6b9040749b5e004fafd81879541ce5160 100644 (file)
@@ -348,7 +348,6 @@ static void pcpu_delegate(struct pcpu *pcpu,
                abs_lc->restart_source = source_cpu;
                put_abs_lowcore(abs_lc);
        }
-       __bpon();
        asm volatile(
                "0:     sigp    0,%0,%2 # sigp restart to target cpu\n"
                "       brc     2,0b    # busy, try again\n"
@@ -986,7 +985,6 @@ void __cpu_die(unsigned int cpu)
 void __noreturn cpu_die(void)
 {
        idle_task_exit();
-       __bpon();
        pcpu_sigp_retry(pcpu_devices + smp_processor_id(), SIGP_STOP, 0);
        for (;;) ;
 }