cpu_intr_p() related question

Yann Sionneau <[email protected]> Sun, 01 Sep 2013 23:42:33 +0200
Newsgroups gmane.os.netbsd.devel.kernel,gmane.os.netbsd.ports,gmane.os.netbsd.devel.embedded,gmane.os.netbsd.devel.ports
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------010604080509000107020307
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hello NetBSD hackers,

I have read over there [0] that cpu_intr_p() should return true if 
curcpu() is currently "in the context of a hardware interrupt".

Does this mean that cpu_intr_p() should return true when CPU is in 
exception handler (tlb miss handler, tlb fault handler, division by zero 
etc) as well as in exception caused by an interruption? Or Should it 
only return true for true interruption like UART or timer interrupt and 
not for exception handlers not related to an interruption?

I also had a look at this thread [1] but it did not provide me with much 
information, except that I could just implement it as "return false;", 
is it still true?

Thanks :)

[0] -- http://www.netbsd.org/~ad/smp/vmlocking.txt
[1] -- 
https://groups.google.com/forum/#!topic/muc.lists.netbsd.current-users/AXJ65qh2Sdk

Best regards,

-- 
Yann Sionneau

--------------010604080509000107020307
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello NetBSD hackers, <br>
    <br>
    I have read over there [0] that
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-1">
    cpu_intr_p() should return true if curcpu() is currently "in the
    context of a hardware interrupt".<br>
    <br>
    Does this mean that cpu_intr_p() should return true when CPU is in
    exception handler (tlb miss handler, tlb fault handler, division by
    zero etc) as well as in exception caused by an interruption? Or
    Should it only return true for true interruption like UART or timer
    interrupt and not for exception handlers not related to an
    interruption?<br>
    <br>
    I also had a look at this thread [1] but it did not provide me with
    much information, except that I could just implement it as "return
    false;", is it still true?<br>
    <br>
    Thanks :)<br>
    <br>
    [0] -- <a class="moz-txt-link-freetext" href="http://www.netbsd.org/~ad/smp/vmlocking.txt">http://www.netbsd.org/~ad/smp/vmlocking.txt</a><br>
    [1] --
<a class="moz-txt-link-freetext" href="https://groups.google.com/forum/#!topic/muc.lists.netbsd.current-users/AXJ65qh2Sdk">https://groups.google.com/forum/#!topic/muc.lists.netbsd.current-users/AXJ65qh2Sdk</a><br>
    <br>
    Best regards, <br>
    <br>
    -- <br>
    Yann Sionneau<br>
  </body>
</html>

--------------010604080509000107020307--