Skip to content

Commit

Permalink
Make hw_cpu_hatch() more similar on loongson and octeon.
Browse files Browse the repository at this point in the history
  • Loading branch information
vhankala committed Jul 12, 2021
1 parent f12770d commit f472827
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
8 changes: 4 additions & 4 deletions sys/arch/loongson/loongson/machdep.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: machdep.c,v 1.96 2021/05/16 15:10:19 deraadt Exp $ */
/* $OpenBSD: machdep.c,v 1.97 2021/07/12 09:29:18 visa Exp $ */

/*
* Copyright (c) 2009, 2010, 2014 Miodrag Vallat.
Expand Down Expand Up @@ -1271,14 +1271,14 @@ hw_cpu_hatch(struct cpu_info *ci)
*/
setcurcpu(ci);

tlb_init(ci->ci_hw.tlbsize);
tlb_set_pid(0);

/*
* Make sure we can access the extended address space.
*/
setsr(getsr() | SR_KX | SR_UX);

tlb_init(ci->ci_hw.tlbsize);
tlb_set_pid(0);

/*
* Turn off bootstrap exception vectors.
*/
Expand Down
11 changes: 6 additions & 5 deletions sys/arch/octeon/octeon/machdep.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: machdep.c,v 1.131 2021/05/16 15:12:38 deraadt Exp $ */
/* $OpenBSD: machdep.c,v 1.132 2021/07/12 09:29:18 visa Exp $ */

/*
* Copyright (c) 2009, 2010 Miodrag Vallat.
Expand Down Expand Up @@ -1312,8 +1312,6 @@ hw_cpu_hatch(struct cpu_info *ci)

/*
* Make sure we can access the extended address space.
* Note that r10k and later do not allow XUSEG accesses
* from kernel mode unless SR_UX is set.
*/
setsr(getsr() | SR_KX | SR_UX);

Expand All @@ -1332,10 +1330,13 @@ hw_cpu_hatch(struct cpu_info *ci)
Mips_SyncCache(ci);

(*md_startclock)(ci);
ncpus++;
cpuset_add(&cpus_running, ci);

octeon_intr_init();
mips64_ipi_init();

ncpus++;
cpuset_add(&cpus_running, ci);

spl0();
(void)updateimask(0);

Expand Down

0 comments on commit f472827

Please sign in to comment.