Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Nov 2018 22:15:25 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r340028 - head/sys/riscv/riscv
Message-ID:  <201811012215.wA1MFPtx033595@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Thu Nov  1 22:15:25 2018
New Revision: 340028
URL: https://svnweb.freebsd.org/changeset/base/340028

Log:
  SBI calls expect a pointer to a u_long rather than a pointer.
  
  This is just cosmetic.
  
  A weirder issue is that the SBI doc claims the hart mask pointer should
  be a physical address, not a virtual address.  However, the implementation
  in bbl seems to just dereference the address directly.
  
  Reviewed by:	markj
  Sponsored by:	DARPA
  Differential Revision:	https://reviews.freebsd.org/D17781

Modified:
  head/sys/riscv/riscv/intr_machdep.c
  head/sys/riscv/riscv/mp_machdep.c

Modified: head/sys/riscv/riscv/intr_machdep.c
==============================================================================
--- head/sys/riscv/riscv/intr_machdep.c	Thu Nov  1 22:13:22 2018	(r340027)
+++ head/sys/riscv/riscv/intr_machdep.c	Thu Nov  1 22:15:25 2018	(r340028)
@@ -202,7 +202,7 @@ riscv_unmask_ipi(void)
 static void
 ipi_send(struct pcpu *pc, int ipi)
 {
-	uintptr_t mask;
+	u_long mask;
 
 	CTR3(KTR_SMP, "%s: cpu=%d, ipi=%x", __func__, pc->pc_cpuid, ipi);
 
@@ -242,7 +242,7 @@ void
 ipi_selected(cpuset_t cpus, u_int ipi)
 {
 	struct pcpu *pc;
-	uintptr_t mask;
+	u_long mask;
 
 	CTR1(KTR_SMP, "ipi_selected: ipi: %x", ipi);
 

Modified: head/sys/riscv/riscv/mp_machdep.c
==============================================================================
--- head/sys/riscv/riscv/mp_machdep.c	Thu Nov  1 22:13:22 2018	(r340027)
+++ head/sys/riscv/riscv/mp_machdep.c	Thu Nov  1 22:15:25 2018	(r340028)
@@ -181,7 +181,7 @@ riscv64_cpu_attach(device_t dev)
 static void
 release_aps(void *dummy __unused)
 {
-	uintptr_t mask;
+	u_long mask;
 	int cpu, i;
 
 	if (mp_ncpus == 1)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811012215.wA1MFPtx033595>