Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F154755515
D19726.id55498.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
D19726.id55498.diff
View Options
Index: sys/riscv/include/pcpu.h
===================================================================
--- sys/riscv/include/pcpu.h
+++ sys/riscv/include/pcpu.h
@@ -53,7 +53,6 @@
struct pcb;
struct pcpu;
-extern struct pcpu *pcpup;
static inline struct pcpu *
get_pcpu(void)
Index: sys/riscv/riscv/machdep.c
===================================================================
--- sys/riscv/riscv/machdep.c
+++ sys/riscv/riscv/machdep.c
@@ -120,8 +120,6 @@
extern int *end;
extern int *initstack_end;
-struct pcpu *pcpup;
-
uintptr_t mcall_trap(uintptr_t mcause, uintptr_t* regs);
uintptr_t
@@ -627,6 +625,7 @@
static void
init_proc0(vm_offset_t kstack)
{
+ struct pcpu *pcpup;
pcpup = &__pcpu[0];
@@ -798,6 +797,7 @@
initriscv(struct riscv_bootparams *rvbp)
{
struct mem_region mem_regions[FDT_MEM_REGIONS];
+ struct pcpu *pcpup;
vm_offset_t rstart, rend;
vm_offset_t s, e;
int mem_regions_sz;
@@ -806,6 +806,15 @@
caddr_t kmdp;
int i;
+ /* Set the pcpu data, this is needed by pmap_bootstrap */
+ pcpup = &__pcpu[0];
+ pcpu_init(pcpup, 0, sizeof(struct pcpu));
+
+ /* Set the pcpu pointer */
+ __asm __volatile("mv gp, %0" :: "r"(pcpup));
+
+ PCPU_SET(curthread, &thread0);
+
/* Set the module data location */
lastaddr = fake_preload_metadata(rvbp);
@@ -849,15 +858,6 @@
}
#endif
- /* Set the pcpu data, this is needed by pmap_bootstrap */
- pcpup = &__pcpu[0];
- pcpu_init(pcpup, 0, sizeof(struct pcpu));
-
- /* Set the pcpu pointer */
- __asm __volatile("mv gp, %0" :: "r"(pcpup));
-
- PCPU_SET(curthread, &thread0);
-
/* Do basic tuning, hz etc */
init_param1();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 30, 9:23 AM (10 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32487730
Default Alt Text
D19726.id55498.diff (1 KB)
Attached To
Mode
D19726: RISC-V: Initialize pcpu slightly earlier
Attached
Detach File
Event Timeline
Log In to Comment