aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Percival <cperciva@FreeBSD.org>2023-06-04 18:39:45 +0000
committerColin Percival <cperciva@FreeBSD.org>2023-06-04 18:39:45 +0000
commit59588a546f55523d6fd37ab42eb08b719311d7d6 (patch)
treef2895be39602cc0483cf20c2de4beee43a42c18e
parent45cc8519f5900574826dfd22c851b136023d044e (diff)
downloadsrc-59588a546f55523d6fd37ab42eb08b719311d7d6.tar.gz
src-59588a546f55523d6fd37ab42eb08b719311d7d6.zip
Revert "tslog: Annotate some early boot functions"
The change to subr_boot.c broke the libsa build because the TSLOG macros have their own definitions for the boot loader -- I didn't realize that the loader code used subr_boot.c. I'm currently testing a fix and I'll revert this revert once I'm satisfied that everything works, but I don't want to leave the tree broken for too long. This reverts commit 469cfa3c30ee7a5ddeb597d0a8c3e7cac909b27a.
-rw-r--r--sys/amd64/amd64/fpu.c3
-rw-r--r--sys/amd64/amd64/initcpu.c4
-rw-r--r--sys/amd64/amd64/machdep.c2
-rw-r--r--sys/amd64/amd64/pmap.c4
-rw-r--r--sys/kern/kern_cons.c3
-rw-r--r--sys/kern/link_elf.c7
-rw-r--r--sys/kern/subr_boot.c5
-rw-r--r--sys/kern/subr_kdb.c3
-rw-r--r--sys/kern/subr_param.c4
-rw-r--r--sys/kern/subr_pcpu.c2
-rw-r--r--sys/kern/subr_prf.c3
-rw-r--r--sys/x86/pci/pci_early_quirks.c3
-rw-r--r--sys/x86/x86/identcpu.c7
-rw-r--r--sys/x86/xen/pv.c3
14 files changed, 1 insertions, 52 deletions
diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c
index 1310a27911fe..a3421cf0d496 100644
--- a/sys/amd64/amd64/fpu.c
+++ b/sys/amd64/amd64/fpu.c
@@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$");
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <sys/sysent.h>
-#include <sys/tslog.h>
#include <machine/bus.h>
#include <sys/rman.h>
#include <sys/signalvar.h>
@@ -361,7 +360,6 @@ fpuinit(void)
u_int mxcsr;
u_short control;
- TSENTER();
if (IS_BSP())
fpuinit_bsp1();
@@ -403,7 +401,6 @@ fpuinit(void)
ldmxcsr(mxcsr);
start_emulating();
intr_restore(saveintr);
- TSEXIT();
}
/*
diff --git a/sys/amd64/amd64/initcpu.c b/sys/amd64/amd64/initcpu.c
index 0de4bc3e2d60..a17ef89ba9f8 100644
--- a/sys/amd64/amd64/initcpu.c
+++ b/sys/amd64/amd64/initcpu.c
@@ -276,7 +276,6 @@ initializecpu(void)
uint64_t msr;
uint32_t cr4;
- TSENTER();
cr4 = rcr4();
if ((cpu_feature & CPUID_XMM) && (cpu_feature & CPUID_FXSR)) {
cr4 |= CR4_FXSR | CR4_XMM;
@@ -312,9 +311,7 @@ initializecpu(void)
if (cpu_stdext_feature & CPUID_STDEXT_SMAP)
cr4 |= CR4_SMAP;
}
- TSENTER2("load_cr4");
load_cr4(cr4);
- TSEXIT2("load_cr4");
/* Reload cpu ext features to reflect cr4 changes */
if (IS_BSP() && cold)
identify_cpu_ext_features();
@@ -343,7 +340,6 @@ initializecpu(void)
if (!IS_BSP())
cpu_init_small_core();
- TSEXIT();
}
void
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index fa3ffe84bfe1..757606311123 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -874,7 +874,6 @@ getmemsize(caddr_t kmdp, u_int64_t first)
quad_t dcons_addr, dcons_size;
int page_counter;
- TSENTER();
/*
* Tell the physical memory allocator about pages used to store
* the kernel and preloaded data. See kmem_bootstrap_free().
@@ -1130,7 +1129,6 @@ do_next:
/* Map the message buffer. */
msgbufp = (struct msgbuf *)PHYS_TO_DMAP(phys_avail[pa_indx]);
- TSEXIT();
}
static caddr_t
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index 123811ed573f..b2abab429730 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -1668,7 +1668,6 @@ create_pagetables(vm_paddr_t *firstaddr)
#endif
int i, j, ndm1g, nkpdpe, nkdmpde;
- TSENTER();
/* Allocate page table pages for the direct map */
ndmpdp = howmany(ptoa(Maxmem), NBPDP);
if (ndmpdp < 4) /* Minimum 4GB of dirmap */
@@ -1885,7 +1884,6 @@ create_pagetables(vm_paddr_t *firstaddr)
}
kernel_pml4 = (pml4_entry_t *)PHYS_TO_DMAP(KPML4phys);
- TSEXIT();
}
/*
@@ -1908,7 +1906,6 @@ pmap_bootstrap(vm_paddr_t *firstaddr)
u_long res;
int i;
- TSENTER();
KERNend = *firstaddr;
res = atop(KERNend - (vm_paddr_t)kernphys);
@@ -2064,7 +2061,6 @@ pmap_bootstrap(vm_paddr_t *firstaddr)
*/
load_cr4(rcr4() | CR4_PCIDE);
}
- TSEXIT();
}
/*
diff --git a/sys/kern/kern_cons.c b/sys/kern/kern_cons.c
index ff57b2bdfd8a..7c63b8e4ed9c 100644
--- a/sys/kern/kern_cons.c
+++ b/sys/kern/kern_cons.c
@@ -64,7 +64,6 @@ __FBSDID("$FreeBSD$");
#include <sys/reboot.h>
#include <sys/sysctl.h>
#include <sys/sbuf.h>
-#include <sys/tslog.h>
#include <sys/tty.h>
#include <sys/uio.h>
#include <sys/vnode.h>
@@ -135,7 +134,6 @@ cninit(void)
{
struct consdev *best_cn, *cn, **list;
- TSENTER();
/*
* Check if we should mute the console (for security reasons perhaps)
* It can be changes dynamically using sysctl kern.consmute
@@ -197,7 +195,6 @@ cninit(void)
*/
early_putc = NULL;
#endif
- TSEXIT();
}
void
diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c
index bd8994ff0e4d..b410469b6270 100644
--- a/sys/kern/link_elf.c
+++ b/sys/kern/link_elf.c
@@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$");
#include <sys/vnode.h>
#include <sys/linker.h>
#include <sys/sysctl.h>
-#include <sys/tslog.h>
#include <machine/elf.h>
@@ -1432,7 +1431,6 @@ relocate_file1(elf_file_t ef, elf_lookup_fn lookup, elf_reloc_fn reloc,
const Elf_Rela *rela;
const char *symname;
- TSENTER();
#define APPLY_RELOCS(iter, tbl, tblsize, type) do { \
for ((iter) = (tbl); (iter) != NULL && \
(iter) < (tbl) + (tblsize) / sizeof(*(iter)); (iter)++) { \
@@ -1451,15 +1449,12 @@ relocate_file1(elf_file_t ef, elf_lookup_fn lookup, elf_reloc_fn reloc,
} while (0)
APPLY_RELOCS(rel, ef->rel, ef->relsize, ELF_RELOC_REL);
- TSENTER2("ef->rela");
APPLY_RELOCS(rela, ef->rela, ef->relasize, ELF_RELOC_RELA);
- TSEXIT2("ef->rela");
APPLY_RELOCS(rel, ef->pltrel, ef->pltrelsize, ELF_RELOC_REL);
APPLY_RELOCS(rela, ef->pltrela, ef->pltrelasize, ELF_RELOC_RELA);
#undef APPLY_RELOCS
- TSEXIT();
return (0);
}
@@ -1955,7 +1950,6 @@ link_elf_ireloc(caddr_t kmdp)
struct elf_file eff;
elf_file_t ef;
- TSENTER();
ef = &eff;
bzero_early(ef, sizeof(*ef));
@@ -1972,7 +1966,6 @@ link_elf_ireloc(caddr_t kmdp)
link_elf_preload_parse_symbols(ef);
relocate_file1(ef, elf_lookup_ifunc, elf_reloc, true);
- TSEXIT();
}
#if defined(__aarch64__) || defined(__amd64__)
diff --git a/sys/kern/subr_boot.c b/sys/kern/subr_boot.c
index 73e75ba11750..057ffb5b7e08 100644
--- a/sys/kern/subr_boot.c
+++ b/sys/kern/subr_boot.c
@@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$");
#endif
#include <sys/reboot.h>
#include <sys/boot.h>
-#include <sys/tslog.h>
#ifdef _KERNEL
#define SETENV(k, v) kern_setenv(k, v)
@@ -96,14 +95,12 @@ boot_env_to_howto(void)
int i, howto;
char *val;
- TSENTER();
for (howto = 0, i = 0; howto_names[i].ev != NULL; i++) {
val = GETENV(howto_names[i].ev);
if (val != NULL && strcasecmp(val, "no") != 0)
howto |= howto_names[i].mask;
FREE(val);
}
- TSEXIT();
return (howto);
}
@@ -196,14 +193,12 @@ boot_parse_cmdline_delim(char *cmdline, const char *delim)
char *v;
int howto;
- TSENTER();
howto = 0;
while ((v = strsep(&cmdline, delim)) != NULL) {
if (*v == '\0')
continue;
howto |= boot_parse_arg(v);
}
- TSEXIT();
return (howto);
}
diff --git a/sys/kern/subr_kdb.c b/sys/kern/subr_kdb.c
index 2f419b4d8ad5..f8b37c2319b0 100644
--- a/sys/kern/subr_kdb.c
+++ b/sys/kern/subr_kdb.c
@@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$");
#include <sys/smp.h>
#include <sys/stack.h>
#include <sys/sysctl.h>
-#include <sys/tslog.h>
#include <machine/kdb.h>
#include <machine/pcb.h>
@@ -560,7 +559,6 @@ kdb_init(void)
struct kdb_dbbe *be, **iter;
int cur_pri, pri;
- TSENTER();
kdb_active = 0;
kdb_dbbe = NULL;
cur_pri = -1;
@@ -584,7 +582,6 @@ kdb_init(void)
printf("KDB: current backend: %s\n",
kdb_dbbe->dbbe_name);
}
- TSEXIT();
}
/*
diff --git a/sys/kern/subr_param.c b/sys/kern/subr_param.c
index b988f28944cc..bb8cb5871af2 100644
--- a/sys/kern/subr_param.c
+++ b/sys/kern/subr_param.c
@@ -171,7 +171,6 @@ void
init_param1(void)
{
- TSENTER();
#if !defined(__arm64__)
TUNABLE_INT_FETCH("kern.kstack_pages", &kstack_pages);
#endif
@@ -246,7 +245,6 @@ init_param1(void)
pid_max = 300;
TUNABLE_INT_FETCH("vfs.unmapped_buf_allowed", &unmapped_buf_allowed);
- TSEXIT();
}
/*
@@ -256,7 +254,6 @@ void
init_param2(long physpages)
{
- TSENTER();
/* Base parameters */
maxusers = MAXUSERS;
TUNABLE_INT_FETCH("kern.maxusers", &maxusers);
@@ -338,7 +335,6 @@ init_param2(long physpages)
if (maxpipekva > (VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS) / 64)
maxpipekva = (VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS) /
64;
- TSEXIT();
}
/*
diff --git a/sys/kern/subr_pcpu.c b/sys/kern/subr_pcpu.c
index c13a52dffccd..c4c220d66c97 100644
--- a/sys/kern/subr_pcpu.c
+++ b/sys/kern/subr_pcpu.c
@@ -103,7 +103,6 @@ dpcpu_init(void *dpcpu, int cpuid)
{
struct pcpu *pcpu;
- TSENTER();
pcpu = pcpu_find(cpuid);
pcpu->pc_dynamic = (uintptr_t)dpcpu - DPCPU_START;
@@ -116,7 +115,6 @@ dpcpu_init(void *dpcpu, int cpuid)
* Place it in the global pcpu offset array.
*/
dpcpu_off[cpuid] = pcpu->pc_dynamic;
- TSEXIT();
}
static void
diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c
index db4ef168bc70..0506c21b5ad8 100644
--- a/sys/kern/subr_prf.c
+++ b/sys/kern/subr_prf.c
@@ -58,7 +58,6 @@ __FBSDID("$FreeBSD$");
#include <sys/proc.h>
#include <sys/stddef.h>
#include <sys/sysctl.h>
-#include <sys/tslog.h>
#include <sys/tty.h>
#include <sys/syslog.h>
#include <sys/cons.h>
@@ -1038,7 +1037,6 @@ msgbufinit(void *ptr, int size)
static struct msgbuf *oldp = NULL;
bool print_boot_tag;
- TSENTER();
size -= sizeof(*msgbufp);
cp = (char *)ptr;
print_boot_tag = !msgbufmapped;
@@ -1054,7 +1052,6 @@ msgbufinit(void *ptr, int size)
if (print_boot_tag && *current_boot_tag != '\0')
printf("%s\n", current_boot_tag);
oldp = msgbufp;
- TSEXIT();
}
/* Sysctls for accessing/clearing the msgbuf */
diff --git a/sys/x86/pci/pci_early_quirks.c b/sys/x86/pci/pci_early_quirks.c
index ab8072b38d14..97ba7e1a0631 100644
--- a/sys/x86/pci/pci_early_quirks.c
+++ b/sys/x86/pci/pci_early_quirks.c
@@ -33,7 +33,6 @@ __FBSDID("$FreeBSD$");
#include <sys/bus.h>
#include <sys/kernel.h>
#include <sys/sysctl.h>
-#include <sys/tslog.h>
#include <vm/vm.h>
/* XXX: enable this once the KPI is available */
@@ -318,7 +317,5 @@ void
pci_early_quirks(void)
{
- TSENTER();
intel_graphics_stolen();
- TSEXIT();
}
diff --git a/sys/x86/x86/identcpu.c b/sys/x86/x86/identcpu.c
index 3ff59344e17d..42cca3250481 100644
--- a/sys/x86/x86/identcpu.c
+++ b/sys/x86/x86/identcpu.c
@@ -1424,7 +1424,6 @@ identify_hypervisor(void)
u_int regs[4];
char *p;
- TSENTER();
/*
* If CPUID2_HV is set, we are running in a hypervisor environment.
*/
@@ -1433,10 +1432,8 @@ identify_hypervisor(void)
identify_hypervisor_cpuid_base();
/* If we have a definitive vendor, we can return now. */
- if (*hv_vendor != '\0') {
- TSEXIT();
+ if (*hv_vendor != '\0')
return;
- }
}
/*
@@ -1449,13 +1446,11 @@ identify_hypervisor(void)
if (regs[1] == VMW_HVMAGIC) {
vm_guest = VM_GUEST_VMWARE;
freeenv(p);
- TSEXIT();
return;
}
}
freeenv(p);
}
- TSEXIT();
}
bool
diff --git a/sys/x86/xen/pv.c b/sys/x86/xen/pv.c
index b3da26e9b78e..367214fe35be 100644
--- a/sys/x86/xen/pv.c
+++ b/sys/x86/xen/pv.c
@@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$");
#include <sys/mutex.h>
#include <sys/smp.h>
#include <sys/efi.h>
-#include <sys/tslog.h>
#include <vm/vm.h>
#include <vm/vm_extern.h>
@@ -418,7 +417,6 @@ xen_pvh_parse_preload_data(uint64_t modulep)
char *envp;
char acpi_rsdp[19];
- TSENTER();
if (start_info->modlist_paddr != 0) {
struct hvm_modlist_entry *mod;
const char *cmdline;
@@ -509,7 +507,6 @@ xen_pvh_parse_preload_data(uint64_t modulep)
#ifdef DDB
xen_pvh_parse_symtab();
#endif
- TSEXIT();
return (kmdp);
}