Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/alpha Add alpha_pal_wtint(), which invokes the WTIN...



details:   https://anonhg.NetBSD.org/src/rev/3b0e7772d4f2
branches:  trunk
changeset: 976655:3b0e7772d4f2
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Tue Sep 29 01:17:22 2020 +0000

description:
Add alpha_pal_wtint(), which invokes the WTINT PALcode call.

diffstat:

 sys/arch/alpha/alpha/pal.s         |  27 +++++++++++++++++++++++++--
 sys/arch/alpha/include/alpha_cpu.h |   3 ++-
 2 files changed, 27 insertions(+), 3 deletions(-)

diffs (62 lines):

diff -r 0ce6a42c54cf -r 3b0e7772d4f2 sys/arch/alpha/alpha/pal.s
--- a/sys/arch/alpha/alpha/pal.s        Tue Sep 29 00:13:12 2020 +0000
+++ b/sys/arch/alpha/alpha/pal.s        Tue Sep 29 01:17:22 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pal.s,v 1.15 2002/05/13 21:38:30 thorpej Exp $ */
+/* $NetBSD: pal.s,v 1.16 2020/09/29 01:17:22 thorpej Exp $ */
 
 /*
  * Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -39,7 +39,7 @@
  * and Richard T. Witek.
  */
 
-__KERNEL_RCSID(1, "$NetBSD: pal.s,v 1.15 2002/05/13 21:38:30 thorpej Exp $");
+__KERNEL_RCSID(1, "$NetBSD: pal.s,v 1.16 2020/09/29 01:17:22 thorpej Exp $");
 
 inc2:  .stabs  __FILE__,132,0,0,inc2; .loc     1 __LINE__
 /*
@@ -155,3 +155,26 @@
        call_pal PAL_OSF1_wrvptptr
        RET
        END(alpha_pal_wrvptptr)
+
+/*
+ * alpha_pal_wtint: Wait for interrupt. [PRIVILEGED]
+ *
+ * Arguments:
+ *     a0      maximum number of clock interrupts to skip
+ *
+ * Return value:
+ *     v0      actual number of clock interrupts skipped
+ *
+ * WTINT waits, in a low power mode, for either any device interrupt or
+ * for the next clock interrupt (a0 == 0) or up to the specified number
+ * of clock interrupts to pass.  Note that the PCC may slow or stop
+ * while waiting.
+ *
+ * Not all PALcode versions support WTINT.  If it is not supported,
+ * an OPDEC fault will occur.
+ */
+       .text
+LEAF_NOPROFILE(alpha_pal_wtint,1)
+       call_pal PAL_wtint
+       RET
+       END(alpha_pal_wtint)
diff -r 0ce6a42c54cf -r 3b0e7772d4f2 sys/arch/alpha/include/alpha_cpu.h
--- a/sys/arch/alpha/include/alpha_cpu.h        Tue Sep 29 00:13:12 2020 +0000
+++ b/sys/arch/alpha/include/alpha_cpu.h        Tue Sep 29 01:17:22 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: alpha_cpu.h,v 1.51 2020/09/05 16:29:08 thorpej Exp $ */
+/* $NetBSD: alpha_cpu.h,v 1.52 2020/09/29 01:17:22 thorpej Exp $ */
 
 /*
  * Copyright (c) 1996 Carnegie-Mellon University.
@@ -378,6 +378,7 @@
 unsigned long  _alpha_pal_swpipl(unsigned long);       /* for profiling */
 void           alpha_pal_wrent(void *, unsigned long);
 void           alpha_pal_wrvptptr(unsigned long);
+unsigned long  alpha_pal_wtint(unsigned long);
 
 #define        alpha_pal_draina() __asm volatile("call_pal %0 # PAL_draina"    \
                                : : "i" (PAL_draina) : "memory")



Home | Main Index | Thread Index | Old Index