CVS commit: src/sys/rump/include/machine

2019-12-03 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Dec  4 03:04:52 UTC 2019

Modified Files:
src/sys/rump/include/machine: cpu.h

Log Message:
Fix rump definition of cpu_number().


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/rump/include/machine/cpu.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/include/machine/cpu.h
diff -u src/sys/rump/include/machine/cpu.h:1.23 src/sys/rump/include/machine/cpu.h:1.24
--- src/sys/rump/include/machine/cpu.h:1.23	Sun Dec  1 18:29:26 2019
+++ src/sys/rump/include/machine/cpu.h	Wed Dec  4 03:04:52 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.23 2019/12/01 18:29:26 ad Exp $	*/
+/*	$NetBSD: cpu.h,v 1.24 2019/12/04 03:04:52 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2008-2011 Antti Kantee.  All Rights Reserved.
@@ -79,7 +79,7 @@ void __syncicache(void *, size_t);
 #define curlwp rump_curlwp_fast()
 
 #define curcpu() (curlwp->l_cpu)
-#define cpu_number() (cpu_index(curcpu))
+#define cpu_number() (cpu_index(curcpu()))
 
 extern struct cpu_info *rumpcpu_info_list;
 #define CPU_INFO_ITERATOR		int __unused



CVS commit: src/sys/rump/include/machine

2019-12-01 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Dec  1 18:29:26 UTC 2019

Modified Files:
src/sys/rump/include/machine: cpu.h

Log Message:
Add ci_onproc.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/rump/include/machine/cpu.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/include/machine/cpu.h
diff -u src/sys/rump/include/machine/cpu.h:1.22 src/sys/rump/include/machine/cpu.h:1.23
--- src/sys/rump/include/machine/cpu.h:1.22	Wed Apr 22 17:38:33 2015
+++ src/sys/rump/include/machine/cpu.h	Sun Dec  1 18:29:26 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.22 2015/04/22 17:38:33 pooka Exp $	*/
+/*	$NetBSD: cpu.h,v 1.23 2019/12/01 18:29:26 ad Exp $	*/
 
 /*
  * Copyright (c) 2008-2011 Antti Kantee.  All Rights Reserved.
@@ -44,6 +44,7 @@ struct cpu_info {
 	struct cpu_data ci_data;
 	cpuid_t ci_cpuid;
 	struct lwp *ci_curlwp;
+	struct lwp *ci_onproc;
 
 	struct cpu_info *ci_next;
 



CVS commit: src/sys/rump/include/machine

2016-04-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Apr 11 10:53:06 UTC 2016

Modified Files:
src/sys/rump/include/machine: intr.h

Log Message:
Add a dummy splraiseipl()


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/rump/include/machine/intr.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/include/machine/intr.h
diff -u src/sys/rump/include/machine/intr.h:1.20 src/sys/rump/include/machine/intr.h:1.21
--- src/sys/rump/include/machine/intr.h:1.20	Sun Jan 19 07:01:55 2014
+++ src/sys/rump/include/machine/intr.h	Mon Apr 11 10:53:06 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.20 2014/01/19 07:01:55 martin Exp $	*/
+/*	$NetBSD: intr.h,v 1.21 2016/04/11 10:53:06 martin Exp $	*/
 
 /*
  * Copyright (c) 2009, 2010 Antti Kantee.  All Rights Reserved.
@@ -70,4 +70,6 @@ makeiplcookie(ipl_t ipl)
 #define IPL_SCHED 6
 #define IPL_HIGH 7
 
+#define	splraiseipl(COOKIE)	0
+
 #endif /* _SYS_RUMP_INTR_H_ */



CVS commit: src/sys/rump/include/machine

2015-04-22 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Apr 22 16:48:08 UTC 2015

Modified Files:
src/sys/rump/include/machine: cpu.h

Log Message:
emulgate clockframe


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/rump/include/machine/cpu.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/include/machine/cpu.h
diff -u src/sys/rump/include/machine/cpu.h:1.20 src/sys/rump/include/machine/cpu.h:1.21
--- src/sys/rump/include/machine/cpu.h:1.20	Sat Mar 15 15:15:26 2014
+++ src/sys/rump/include/machine/cpu.h	Wed Apr 22 16:48:08 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.20 2014/03/15 15:15:26 pooka Exp $	*/
+/*	$NetBSD: cpu.h,v 1.21 2015/04/22 16:48:08 pooka Exp $	*/
 
 /*
  * Copyright (c) 2008-2011 Antti Kantee.  All Rights Reserved.
@@ -87,6 +87,13 @@ extern struct cpu_info *rumpcpu_info_lis
 #define CPU_IS_PRIMARY(_ci_)		(_ci_->ci_index == 0)
 
 
+struct clockframe {
+	int who_framed_clock;
+};
+#define CLKF_USERMODE(framep)	0
+#define CLKF_PC(framep)		0
+#define CLKF_INTR(framep)	0
+
 #endif /* !_LOCORE */
 
 #endif /* _SYS_RUMP_CPU_H_ */



CVS commit: src/sys/rump/include/machine

2014-03-11 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Mar 11 20:25:05 UTC 2014

Added Files:
src/sys/rump/include/machine: cpu_counter.h

Log Message:
Reinstance cpu_counter.h so that we don't have to work around the
MD implications everywhere else.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.3 src/sys/rump/include/machine/cpu_counter.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/sys/rump/include/machine/cpu_counter.h
diff -u /dev/null src/sys/rump/include/machine/cpu_counter.h:1.3
--- /dev/null	Tue Mar 11 20:25:05 2014
+++ src/sys/rump/include/machine/cpu_counter.h	Tue Mar 11 20:25:05 2014
@@ -0,0 +1,43 @@
+/*	$NetBSD: cpu_counter.h,v 1.3 2014/03/11 20:25:05 pooka Exp $	*/
+
+/*-
+ * Copyright (c) 2014 Antti Kantee.  All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _SYS_RUMP_CPU_COUNTER_H_
+#define _SYS_RUMP_CPU_COUNTER_H_
+
+#include 
+
+#ifdef __HAVE_CPU_COUNTER
+/*
+ * A very simple MI cpu "counter".  Could start filling in MD ones ...
+ */
+#define cpu_hascounter() 0
+#define cpu_counter() 0
+#define cpu_counter32() 0
+#define cpu_frequency(a) 0
+#endif /* __HAVE_CPU_COUNTER */
+
+#endif /* _SYS_RUMP_CPU_COUNTER_H_ */



CVS commit: src/sys/rump/include/machine

2014-03-10 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Mar 10 23:02:07 UTC 2014

Modified Files:
src/sys/rump/include/machine: cpu.h

Log Message:
update comments


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/rump/include/machine/cpu.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/include/machine/cpu.h
diff -u src/sys/rump/include/machine/cpu.h:1.18 src/sys/rump/include/machine/cpu.h:1.19
--- src/sys/rump/include/machine/cpu.h:1.18	Wed Jan 22 23:38:21 2014
+++ src/sys/rump/include/machine/cpu.h	Mon Mar 10 23:02:07 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.18 2014/01/22 23:38:21 christos Exp $	*/
+/*	$NetBSD: cpu.h,v 1.19 2014/03/10 23:02:07 pooka Exp $	*/
 
 /*
  * Copyright (c) 2008-2011 Antti Kantee.  All Rights Reserved.
@@ -25,6 +25,11 @@
  * SUCH DAMAGE.
  */
 
+/*
+ * CPU defitions for a generic arch.  Unfortunately there are some
+ * MD #ifdefs here.  They are required because of MD inlines and macros.
+ */
+
 #ifndef _SYS_RUMP_CPU_H_
 #define _SYS_RUMP_CPU_H_
 
@@ -44,20 +49,12 @@ struct cpu_info {
 	uint64_t ci_pcc_freq;
 #endif
 
-/*
- * XXX: horrible workaround for vax lock.h.
- * I eventually want to nuke rump include/machine, so don't waste
- * energy fighting with this.
- */
 #ifdef __vax__
 	int ci_ipimsgs;
 #define IPI_SEND_CNCHAR 0
 #define IPI_DDB 0
 #endif /* __vax__ */
 
-/*
- * More stinky hacks, this time for powerpc.  Will go away eventually.
- */
 #ifdef __powerpc__
 	struct cache_info {
 		int dcache_size;
@@ -68,14 +65,13 @@ struct cpu_info {
 #endif /* __powerpc */
 };
 
-/* more dirty rotten vax kludges */
 #ifdef __vax__
 static __inline void cpu_handle_ipi(void) {}
 #endif /* __vax__ */
 
 #ifdef __powerpc__
 void __syncicache(void *, size_t);
-#endif
+#endif /* __powerpc__ */
 
 struct lwp *rumpuser_curlwp(void);
 #define curlwp rumpuser_curlwp()



CVS commit: src/sys/rump/include/machine

2014-01-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan 22 23:38:21 UTC 2014

Modified Files:
src/sys/rump/include/machine: cpu.h

Log Message:
Kludges like to procreate. Add alpha cpu_frequency() kludge.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/rump/include/machine/cpu.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/include/machine/cpu.h
diff -u src/sys/rump/include/machine/cpu.h:1.17 src/sys/rump/include/machine/cpu.h:1.18
--- src/sys/rump/include/machine/cpu.h:1.17	Wed Oct 30 04:42:45 2013
+++ src/sys/rump/include/machine/cpu.h	Wed Jan 22 18:38:21 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.17 2013/10/30 08:42:45 mrg Exp $	*/
+/*	$NetBSD: cpu.h,v 1.18 2014/01/22 23:38:21 christos Exp $	*/
 
 /*
  * Copyright (c) 2008-2011 Antti Kantee.  All Rights Reserved.
@@ -40,6 +40,10 @@ struct cpu_info {
 
 	struct cpu_info *ci_next;
 
+#ifdef __alpha__
+	uint64_t ci_pcc_freq;
+#endif
+
 /*
  * XXX: horrible workaround for vax lock.h.
  * I eventually want to nuke rump include/machine, so don't waste



CVS commit: src/sys/rump/include/machine

2014-01-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jan 19 07:01:55 UTC 2014

Modified Files:
src/sys/rump/include/machine: intr.h

Log Message:
Make IPL_ values different.
This makes ni real difference for rump, but avoods
KASSERTs in common code when we try to assert
"ipl not higher as...".
Suggested by riastradh, OK: pooka.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/rump/include/machine/intr.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/include/machine/intr.h
diff -u src/sys/rump/include/machine/intr.h:1.19 src/sys/rump/include/machine/intr.h:1.20
--- src/sys/rump/include/machine/intr.h:1.19	Tue Jan  8 08:55:28 2013
+++ src/sys/rump/include/machine/intr.h	Sun Jan 19 07:01:55 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.19 2013/01/08 08:55:28 skrll Exp $	*/
+/*	$NetBSD: intr.h,v 1.20 2014/01/19 07:01:55 martin Exp $	*/
 
 /*
  * Copyright (c) 2009, 2010 Antti Kantee.  All Rights Reserved.
@@ -56,13 +56,18 @@ makeiplcookie(ipl_t ipl)
 #define splx(x) ((void)x)
 #define spl0() ((void)0)
 
+/*
+ * IPL_* does not mean anything to a run-to-completition rump kernel,
+ * but we sometimes assert a "not higher than" condition, so we assign
+ * different values (following spl(9)).
+ */
 #define IPL_NONE 0
-#define	IPL_SOFTBIO 1
 #define	IPL_SOFTCLOCK 1
-#define IPL_SOFTSERIAL 1
-#define	IPL_SOFTNET 1
-#define IPL_SCHED 2
-#define IPL_VM 2
-#define IPL_HIGH 2
+#define	IPL_SOFTBIO 2
+#define	IPL_SOFTNET 3
+#define IPL_SOFTSERIAL 4
+#define IPL_VM 5
+#define IPL_SCHED 6
+#define IPL_HIGH 7
 
 #endif /* _SYS_RUMP_INTR_H_ */



CVS commit: src/sys/rump/include/machine

2013-10-30 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Oct 30 08:42:46 UTC 2013

Modified Files:
src/sys/rump/include/machine: cpu.h

Log Message:
mark rump's CPU_INFO_ITERATOR as being __unused.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/rump/include/machine/cpu.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/include/machine/cpu.h
diff -u src/sys/rump/include/machine/cpu.h:1.16 src/sys/rump/include/machine/cpu.h:1.17
--- src/sys/rump/include/machine/cpu.h:1.16	Thu May  2 19:15:00 2013
+++ src/sys/rump/include/machine/cpu.h	Wed Oct 30 08:42:45 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.16 2013/05/02 19:15:00 pooka Exp $	*/
+/*	$NetBSD: cpu.h,v 1.17 2013/10/30 08:42:45 mrg Exp $	*/
 
 /*
  * Copyright (c) 2008-2011 Antti Kantee.  All Rights Reserved.
@@ -80,7 +80,7 @@ struct lwp *rumpuser_curlwp(void);
 #define cpu_number() (cpu_index(curcpu))
 
 extern struct cpu_info *rumpcpu_info_list;
-#define CPU_INFO_ITERATOR		int
+#define CPU_INFO_ITERATOR		int __unused
 #define CPU_INFO_FOREACH(_cii_, _ci_)	_cii_ = 0, _ci_ = rumpcpu_info_list; \
 	_ci_ != NULL; _ci_ = _ci_->ci_next
 #define CPU_IS_PRIMARY(_ci_)		(_ci_->ci_index == 0)



CVS commit: src/sys/rump/include/machine

2013-01-08 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jan  8 08:55:29 UTC 2013

Modified Files:
src/sys/rump/include/machine: intr.h

Log Message:
Provide splsoftserial.

GRRR RUMP


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/rump/include/machine/intr.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/include/machine/intr.h
diff -u src/sys/rump/include/machine/intr.h:1.18 src/sys/rump/include/machine/intr.h:1.19
--- src/sys/rump/include/machine/intr.h:1.18	Mon Mar 21 16:41:08 2011
+++ src/sys/rump/include/machine/intr.h	Tue Jan  8 08:55:28 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.18 2011/03/21 16:41:08 pooka Exp $	*/
+/*	$NetBSD: intr.h,v 1.19 2013/01/08 08:55:28 skrll Exp $	*/
 
 /*
  * Copyright (c) 2009, 2010 Antti Kantee.  All Rights Reserved.
@@ -47,6 +47,7 @@ makeiplcookie(ipl_t ipl)
 
 #define spllower(x) ((void)x)
 #define splraise(x) 0
+#define splsoftserial() 0
 #define splsoftnet() 0
 #define splsoftclock() 0
 #define splhigh() 0



CVS commit: src/sys/rump/include/machine

2010-12-02 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Dec  2 21:20:40 UTC 2010

Modified Files:
src/sys/rump/include/machine: cpu.h

Log Message:
add ci_curlwp since we use it now


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/rump/include/machine/cpu.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/include/machine/cpu.h
diff -u src/sys/rump/include/machine/cpu.h:1.12 src/sys/rump/include/machine/cpu.h:1.13
--- src/sys/rump/include/machine/cpu.h:1.12	Thu Oct 15 16:46:37 2009
+++ src/sys/rump/include/machine/cpu.h	Thu Dec  2 21:20:39 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.12 2009/10/15 16:46:37 pooka Exp $	*/
+/*	$NetBSD: cpu.h,v 1.13 2010/12/02 21:20:39 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -38,6 +38,7 @@
 struct cpu_info {
 	struct cpu_data ci_data;
 	cpuid_t ci_cpuid;
+	struct lwp *ci_curlwp;
 
 /*
  * XXX: horrible workaround for vax lock.h.



CVS commit: src/sys/rump/include/machine

2010-08-30 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Aug 30 18:29:52 UTC 2010

Modified Files:
src/sys/rump/include/machine: intr.h

Log Message:
Make IPLs not equal IPL_NONE to avoid some KASSERTs.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/rump/include/machine/intr.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/include/machine/intr.h
diff -u src/sys/rump/include/machine/intr.h:1.16 src/sys/rump/include/machine/intr.h:1.17
--- src/sys/rump/include/machine/intr.h:1.16	Fri Feb  6 20:01:41 2009
+++ src/sys/rump/include/machine/intr.h	Mon Aug 30 18:29:52 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.16 2009/02/06 20:01:41 pooka Exp $	*/
+/*	$NetBSD: intr.h,v 1.17 2010/08/30 18:29:52 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -37,10 +37,8 @@
 ipl_t _ipl;
 } ipl_cookie_t;
 
-static inline ipl_cookie_t makeiplcookie(ipl_t);
-
-static inline
-ipl_cookie_t makeiplcookie(ipl_t ipl)
+static inline ipl_cookie_t
+makeiplcookie(ipl_t ipl)
 {
 	ipl_cookie_t c;
 	c._ipl = ipl;
@@ -60,12 +58,12 @@
 #define spl0() ((void)0)
 
 #define IPL_NONE 0
-#define	IPL_SOFTBIO 0
-#define	IPL_SOFTCLOCK 0
-#define IPL_SOFTSERIAL 0
-#define	IPL_SOFTNET 0
-#define IPL_SCHED 0
-#define IPL_VM 0
-#define IPL_HIGH 0
+#define	IPL_SOFTBIO 1
+#define	IPL_SOFTCLOCK 1
+#define IPL_SOFTSERIAL 1
+#define	IPL_SOFTNET 1
+#define IPL_SCHED 2
+#define IPL_VM 2
+#define IPL_HIGH 2
 
 #endif /* _SYS_RUMP_INTR_H_ */



CVS commit: src/sys/rump/include/machine

2010-06-17 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Jun 17 08:19:32 UTC 2010

Modified Files:
src/sys/rump/include/machine: pmap.h

Log Message:
Fix snafu in previous -- if your test it flawed, it doesn't matter
how many times you pass.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/rump/include/machine/pmap.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/include/machine/pmap.h
diff -u src/sys/rump/include/machine/pmap.h:1.5 src/sys/rump/include/machine/pmap.h:1.6
--- src/sys/rump/include/machine/pmap.h:1.5	Wed Jun 16 11:45:21 2010
+++ src/sys/rump/include/machine/pmap.h	Thu Jun 17 08:19:32 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.5 2010/06/16 11:45:21 pooka Exp $	*/
+/*	$NetBSD: pmap.h,v 1.6 2010/06/17 08:19:32 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -31,5 +31,6 @@
 #define pmap_update(v)
 #define pmap_is_modified(a) (true)
 #define pmap_is_referenced(a) (true)
+#define pmap_resident_count(a) (0)
 
 #endif /* _SYS_RUMP_PMAP_H_ */



CVS commit: src/sys/rump/include/machine

2010-02-12 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sat Feb 13 03:19:47 UTC 2010

Modified Files:
src/sys/rump/include/machine: bus.h

Log Message:
Add missing public members of bus_dmamap_t per interface specification
(nothing uses them here for now, so untested).


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/include/machine/bus.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/include/machine/bus.h
diff -u src/sys/rump/include/machine/bus.h:1.1 src/sys/rump/include/machine/bus.h:1.2
--- src/sys/rump/include/machine/bus.h:1.1	Tue Feb  9 17:33:31 2010
+++ src/sys/rump/include/machine/bus.h	Sat Feb 13 03:19:46 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus.h,v 1.1 2010/02/09 17:33:31 pooka Exp $	*/
+/*	$NetBSD: bus.h,v 1.2 2010/02/13 03:19:46 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -50,6 +50,9 @@
 } bus_dma_segment_t;
 
 typedef struct {
+	bus_size_t dm_maxsegsz;
+	bus_size_t dm_mapsize;
+	int dm_nsegs;
 	bus_dma_segment_t dm_segs[1];
 } *bus_dmamap_t;
 



CVS commit: src/sys/rump/include/machine

2010-02-09 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Feb  9 17:33:31 UTC 2010

Added Files:
src/sys/rump/include/machine: bus.h

Log Message:
Add a bus.h blanket header which forces definition of bus space /
bus dma interfaces as functions and therefore makes it possible to
use rump on archs which suffer from macro maladies, i.e. everything
except i386 and amd64.

(build-tested on sparc64 and vax, which are usually the two extremes
of weirdness in these cases)


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/rump/include/machine/bus.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/sys/rump/include/machine/bus.h
diff -u /dev/null src/sys/rump/include/machine/bus.h:1.1
--- /dev/null	Tue Feb  9 17:33:31 2010
+++ src/sys/rump/include/machine/bus.h	Tue Feb  9 17:33:31 2010
@@ -0,0 +1,58 @@
+/*	$NetBSD: bus.h,v 1.1 2010/02/09 17:33:31 pooka Exp $	*/
+
+/*
+ * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _SYS_RUMP_BUS_H_
+#define _SYS_RUMP_BUS_H_
+
+/*
+ * This is a blanket header for archs which are inline/macro-happy
+ * in their bus.h header.  Currently, this is anything but x86.
+ * After an arch is cured from inline scurvy, the native bus.h
+ * should be used.
+ */
+
+/* bus space defs */
+typedef int bus_addr_t;
+typedef int bus_size_t;
+typedef int bus_space_tag_t;
+typedef int bus_space_handle_t;
+
+/* bus dma defs */
+typedef int *bus_dma_tag_t;
+
+typedef struct {
+	bus_addr_t ds_addr;
+	bus_size_t ds_len;
+} bus_dma_segment_t;
+
+typedef struct {
+	bus_dma_segment_t dm_segs[1];
+} *bus_dmamap_t;
+
+#include 
+
+#endif /* _SYS_RUMP_BUS_H_ */



CVS commit: src/sys/rump/include/machine

2009-10-15 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Oct 15 16:46:37 UTC 2009

Modified Files:
src/sys/rump/include/machine: cpu.h

Log Message:
rump_get_curlwp() is dead


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/rump/include/machine/cpu.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/include/machine/cpu.h
diff -u src/sys/rump/include/machine/cpu.h:1.11 src/sys/rump/include/machine/cpu.h:1.12
--- src/sys/rump/include/machine/cpu.h:1.11	Thu Oct 15 01:50:08 2009
+++ src/sys/rump/include/machine/cpu.h	Thu Oct 15 16:46:37 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.11 2009/10/15 01:50:08 pooka Exp $	*/
+/*	$NetBSD: cpu.h,v 1.12 2009/10/15 16:46:37 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -72,8 +72,8 @@
 void __syncicache(void *, size_t);
 #endif
 
-struct lwp *rump_get_curlwp(void); /* XXX */
-#define curlwp rump_get_curlwp()
+struct lwp *rumpuser_get_curlwp(void);
+#define curlwp rumpuser_get_curlwp()
 
 #define curcpu() (curlwp->l_cpu)
 #define cpu_number() 0 /* XXX: not good enuf */



CVS commit: src/sys/rump/include/machine

2009-10-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Oct 15 01:50:08 UTC 2009

Modified Files:
src/sys/rump/include/machine: cpu.h

Log Message:
fix previous to make sense


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/rump/include/machine/cpu.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/include/machine/cpu.h
diff -u src/sys/rump/include/machine/cpu.h:1.10 src/sys/rump/include/machine/cpu.h:1.11
--- src/sys/rump/include/machine/cpu.h:1.10	Thu Oct 15 01:35:23 2009
+++ src/sys/rump/include/machine/cpu.h	Thu Oct 15 01:50:08 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.10 2009/10/15 01:35:23 pooka Exp $	*/
+/*	$NetBSD: cpu.h,v 1.11 2009/10/15 01:50:08 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -72,13 +72,12 @@
 void __syncicache(void *, size_t);
 #endif
 
-extern struct cpu_info *rump_cpu;
-#define curcpu() (rump_cpu)
-#define cpu_number() 0 /* XXX: good enuf? */
-
 struct lwp *rump_get_curlwp(void); /* XXX */
 #define curlwp rump_get_curlwp()
 
+#define curcpu() (curlwp->l_cpu)
+#define cpu_number() 0 /* XXX: not good enuf */
+
 #endif /* !_LOCORE */
 
 #endif /* _SYS_RUMP_CPU_H_ */



CVS commit: src/sys/rump/include/machine

2009-10-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Oct 15 01:35:23 UTC 2009

Modified Files:
src/sys/rump/include/machine: cpu.h

Log Message:
adjust for new rump_cpu


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/rump/include/machine/cpu.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/include/machine/cpu.h
diff -u src/sys/rump/include/machine/cpu.h:1.9 src/sys/rump/include/machine/cpu.h:1.10
--- src/sys/rump/include/machine/cpu.h:1.9	Tue Jan  6 13:20:34 2009
+++ src/sys/rump/include/machine/cpu.h	Thu Oct 15 01:35:23 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.9 2009/01/06 13:20:34 pooka Exp $	*/
+/*	$NetBSD: cpu.h,v 1.10 2009/10/15 01:35:23 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -72,8 +72,8 @@
 void __syncicache(void *, size_t);
 #endif
 
-extern struct cpu_info rump_cpu;
-#define curcpu() (&rump_cpu)
+extern struct cpu_info *rump_cpu;
+#define curcpu() (rump_cpu)
 #define cpu_number() 0 /* XXX: good enuf? */
 
 struct lwp *rump_get_curlwp(void); /* XXX */