Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F115777065
D48064.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D48064.diff
View Options
diff --git a/sys/mips/include/md_var.h b/sys/mips/include/md_var.h
--- a/sys/mips/include/md_var.h
+++ b/sys/mips/include/md_var.h
@@ -71,6 +71,7 @@
void mips_vector_init(void);
void mips_cpu_init(void);
+void mips_hwrena_init(void);
void mips_pcpu0_init(void);
void mips_proc0_init(void);
void mips_postboot_fixup(void);
diff --git a/sys/mips/mips/cpu.c b/sys/mips/mips/cpu.c
--- a/sys/mips/mips/cpu.c
+++ b/sys/mips/mips/cpu.c
@@ -141,10 +141,11 @@
/* Check to see if UserLocal register is implemented. */
if (cfg3 & MIPS_CONFIG3_ULR) {
- /* UserLocal register is implemented, enable it. */
+ /*
+ * UserLocal register is implemented, enable it later in
+ * mips_hwrena_init.
+ */
cpuinfo->userlocal_reg = true;
- tmp = mips_rd_hwrena();
- mips_wr_hwrena(tmp | MIPS_HWRENA_UL);
} else {
/*
* UserLocal register is not implemented. Patch
@@ -275,11 +276,25 @@
#endif
}
+void
+mips_hwrena_init(void)
+{
+ uint32_t reg;
+
+ reg = mips_rd_hwrena();
+
+ if (cpuinfo.userlocal_reg)
+ reg |= MIPS_HWRENA_UL;
+
+ mips_wr_hwrena(reg);
+}
+
void
mips_cpu_init(void)
{
platform_cpu_init();
mips_get_identity(&cpuinfo);
+ mips_hwrena_init();
num_tlbentries = cpuinfo.tlb_nentries;
mips_wr_wired(0);
tlb_invalidate_all();
diff --git a/sys/mips/mips/mp_machdep.c b/sys/mips/mips/mp_machdep.c
--- a/sys/mips/mips/mp_machdep.c
+++ b/sys/mips/mips/mp_machdep.c
@@ -52,6 +52,7 @@
#include <machine/intr_machdep.h>
#include <machine/cache.h>
#include <machine/tlb.h>
+#include <machine/md_var.h>
struct pcb stoppcbs[MAXCPU];
@@ -276,6 +277,8 @@
smp_init_secondary(u_int32_t cpuid)
{
+ mips_hwrena_init();
+
/* TLB */
mips_wr_wired(0);
tlb_invalidate_all();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 29, 12:27 PM (11 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17841111
Default Alt Text
D48064.diff (1 KB)
Attached To
Mode
D48064: mips: Extract HWREna configuration and call from APs
Attached
Detach File
Event Timeline
Log In to Comment