Skip to content

Commit 8b39a2e

Browse files
committed
Revert "Debug: enable kernel boot up time measurement"
1 parent f8b40f6 commit 8b39a2e

File tree

4 files changed

+0
-37
lines changed

4 files changed

+0
-37
lines changed

arch/arm64/kernel/head.S

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@
8989
* x24 __primary_switch() .. relocate_kernel() current RELR displacement
9090
*/
9191
SYM_CODE_START(primary_entry)
92-
bl trap_to_vmm
9392
bl preserve_boot_args
9493
bl init_kernel_el // w0=cpu_boot_mode
9594
adrp x23, __PHYS_OFFSET
@@ -106,21 +105,6 @@ SYM_CODE_START(primary_entry)
106105
b __primary_switch
107106
SYM_CODE_END(primary_entry)
108107

109-
/*
110-
* By writing to mmio region, trap to vmm to print timestamp,
111-
* but corrupt x7 and x8.
112-
* 0x9000f00 is debug region of pl011
113-
* 0x40 is the code specified in cloud hypervisor indicating the first debug
114-
* point of kernel.
115-
*/
116-
SYM_CODE_START(trap_to_vmm)
117-
movz x7, 0x0900, lsl 16
118-
add x7, x7, 0xf00
119-
mov x8, 0x40
120-
str w8, [x7]
121-
ret
122-
SYM_CODE_END(trap_to_vmm)
123-
124108
/*
125109
* Preserve the arguments passed by the bootloader in x0 .. x3
126110
*/

drivers/tty/serial/amba-pl011.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@
4444

4545
#include "amba-pl011.h"
4646

47-
char __iomem *pl011_debug_addr;
48-
4947
#define UART_NR 14
5048

5149
#define SERIAL_AMBA_MAJOR 204
@@ -2754,9 +2752,6 @@ static int pl011_setup_port(struct device *dev, struct uart_amba_port *uap,
27542752
if (IS_ERR(base))
27552753
return PTR_ERR(base);
27562754

2757-
pl011_debug_addr = (char __iomem *)base;
2758-
pl011_debug_addr += UART011_IO_DEBUG;
2759-
27602755
index = pl011_probe_dt_alias(index, dev);
27612756

27622757
uap->old_cr = 0;

include/linux/amba/serial.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,6 @@
206206
#define UART01x_RSR_ANY (UART01x_RSR_OE|UART01x_RSR_BE|UART01x_RSR_PE|UART01x_RSR_FE)
207207
#define UART01x_FR_MODEM_ANY (UART01x_FR_DCD|UART01x_FR_DSR|UART01x_FR_CTS)
208208

209-
#define UART011_IO_DEBUG 0xf00 /* used for debug I/O port emulation in VM */
210-
211209
#ifndef __ASSEMBLY__
212210
struct amba_device; /* in uncompress this is included but amba/bus.h is not */
213211
struct amba_pl010_data {
@@ -227,13 +225,4 @@ struct amba_pl011_data {
227225
};
228226
#endif
229227

230-
extern char __iomem *pl011_debug_addr; /* save the pl011 debug mmio address, equal to base + UART011_IO_DEBUG */
231-
#define DEBUG_TRAP_VAL_END_BOOT 0x41 /* debug point at the end of kernel boot */
232-
233-
/* wrapper of tricking pl011 debug */
234-
static inline void pl011_debug_trap(char val)
235-
{
236-
writeb_relaxed(val, pl011_debug_addr);
237-
}
238-
239228
#endif

init/main.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@
100100
#include <linux/kcsan.h>
101101
#include <linux/init_syscalls.h>
102102
#include <linux/stackdepot.h>
103-
#include <linux/amba/serial.h>
104103

105104
#include <asm/io.h>
106105
#include <asm/bugs.h>
@@ -1537,10 +1536,6 @@ static int __ref kernel_init(void *unused)
15371536
outb(0x41, 0x80);
15381537
#endif
15391538

1540-
#ifdef CONFIG_ARM64
1541-
pl011_debug_trap(DEBUG_TRAP_VAL_END_BOOT);
1542-
#endif
1543-
15441539
if (ramdisk_execute_command) {
15451540
ret = run_init_process(ramdisk_execute_command);
15461541
if (!ret)

0 commit comments

Comments
 (0)