<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Plain Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.5pt;
font-family:Consolas;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
span.EmailStyle19
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle20
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle21
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle22
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.PlainTextChar
{mso-style-name:"Plain Text Char";
mso-style-priority:99;
mso-style-link:"Plain Text";
font-family:Consolas;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Fab writes: </span><span style="color:#1F497D">Is there similar logic for the release case?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Yes - </span><span style="color:#1F497D">Similar logic can be applied to the release side – MPI/DAPL/IPOIB testing all passed.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">--- C:/Users/scsmith/AppData/Local/Temp/cl_spinlock_osd.h-revBASE.svn000.tmp.h Wed May 16 14:38:16 2012<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">+++ C:/Users/scsmith/Documents/openIB-windows/ofw/gen1/branches/WOF3-2/inc/kernel/complib/cl_spinlock_osd.h Thu Apr 11 08:43:59 2013<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">@@ -91,15 +91,8 @@<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">cl_spinlock_acquire(
<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New""> IN cl_spinlock_t* const p_spinlock )<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">{<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">- KIRQL irql = KeGetCurrentIrql();<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New""> CL_ASSERT( p_spinlock );<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">-<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">- if (irql == DISPATCH_LEVEL) {<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">- KeAcquireSpinLockAtDpcLevel( &p_spinlock->lock );<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">- p_spinlock->irql = irql;<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">- }<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">- else<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">- KeAcquireSpinLock( &p_spinlock->lock, &p_spinlock->irql );<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">+ KeAcquireSpinLock( &p_spinlock->lock, &p_spinlock->irql );<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">}<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:5.25pt">CL_INLINE void cl_spinlock_release(<o:p></o:p></p>
<p class="MsoPlainText"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">#ifdef NTDDI_WIN8<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">@@ -114,10 +107,7 @@<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">{<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New""> CL_ASSERT( p_spinlock );<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">- if (p_spinlock->irql == DISPATCH_LEVEL)<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">- KeReleaseSpinLockFromDpcLevel( &p_spinlock->lock );<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">- else<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">- KeReleaseSpinLock( &p_spinlock->lock, p_spinlock->irql );<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">+ KeReleaseSpinLock( &p_spinlock->lock, p_spinlock->irql );<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">}<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New""> </span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p></o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Fab Tillier [<a href="mailto:ftillier@microsoft.com">mailto:ftillier@microsoft.com</a>]
<br>
<b>Sent:</b> Wednesday, April 10, 2013 10:29 AM<br>
<b>To:</b> Smith, Stan<br>
<b>Subject:</b> RE: cl_spinlock_osd.h<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Is there similar logic for the release case?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:5.25pt">CL_INLINE void cl_spinlock_release(<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:5.25pt"> IN cl_spinlock_t* const p_spinlock )<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:5.25pt">{<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:5.25pt"> CL_ASSERT( p_spinlock );<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:5.25pt"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:5.25pt"> if (p_spinlock->irql == DISPATCH_LEVEL)<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:5.25pt"> KeReleaseSpinLockFromDpcLevel( &p_spinlock->lock );<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:5.25pt"> else<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:5.25pt"> KeReleaseSpinLock( &p_spinlock->lock, p_spinlock->irql );<o:p></o:p></p>
<p class="MsoNormal">}<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">?<o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Anyway, this looks good to me. It would be great to move away from complib altogether (at least in the kernel drivers).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Cheers,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">-Fab<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"></a><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> <a href="mailto:ofw-bounces@lists.openfabrics.org">
ofw-bounces@lists.openfabrics.org</a> [<a href="mailto:ofw-bounces@lists.openfabrics.org">mailto:ofw-bounces@lists.openfabrics.org</a>]
<b>On Behalf Of </b>Smith, Stan<br>
<b>Sent:</b> Tuesday, April 9, 2013 4:25 PM<br>
<b>To:</b> <a href="mailto:ofw@lists.openfabrics.org">ofw@lists.openfabrics.org</a><br>
<b>Subject:</b> [ofw] cl_spinlock_osd.h<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Remove code which is duplicated in the implementation of MS code KeAcquireSpinLock(), as indicated by our Microsoft OFA members.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Signed-off-by: <a href="mailto:stan.smith@intel.com">stan.smith@intel.com</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">--- inc/kernel/complib/cl_spinlock_osd.h Wed Mar 06 10:12:19 2013<o:p></o:p></p>
<p class="MsoNormal">+++ inc/kernel/complib/cl_spinlock_osd.h Tue Feb 26 12:08:56 2013<o:p></o:p></p>
<p class="MsoNormal">@@ -91,15 +91,8 @@<o:p></o:p></p>
<p class="MsoNormal">cl_spinlock_acquire( <o:p></o:p></p>
<p class="MsoNormal"> IN cl_spinlock_t* const p_spinlock )<o:p></o:p></p>
<p class="MsoNormal">{<o:p></o:p></p>
<p class="MsoNormal">- KIRQL irql = KeGetCurrentIrql();<o:p></o:p></p>
<p class="MsoNormal"> CL_ASSERT( p_spinlock );<o:p></o:p></p>
<p class="MsoNormal">-<o:p></o:p></p>
<p class="MsoNormal">- if (irql == DISPATCH_LEVEL) {<o:p></o:p></p>
<p class="MsoNormal">- KeAcquireSpinLockAtDpcLevel( &p_spinlock->lock );<o:p></o:p></p>
<p class="MsoNormal">- p_spinlock->irql = irql;<o:p></o:p></p>
<p class="MsoNormal">- }<o:p></o:p></p>
<p class="MsoNormal">- else<o:p></o:p></p>
<p class="MsoNormal">- KeAcquireSpinLock( &p_spinlock->lock, &p_spinlock->irql );<o:p></o:p></p>
<p class="MsoNormal">+ KeAcquireSpinLock( &p_spinlock->lock, &p_spinlock->irql );<o:p></o:p></p>
<p class="MsoNormal">}<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Basically move from <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">CL_INLINE void<o:p></o:p></p>
<p class="MsoNormal">cl_spinlock_acquire( <o:p></o:p></p>
<p class="MsoNormal"> IN cl_spinlock_t* const p_spinlock )<o:p></o:p></p>
<p class="MsoNormal">{<o:p></o:p></p>
<p class="MsoNormal"> KIRQL irql = KeGetCurrentIrql();<o:p></o:p></p>
<p class="MsoNormal"> CL_ASSERT( p_spinlock );<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> if (irql == DISPATCH_LEVEL) {<o:p></o:p></p>
<p class="MsoNormal"> KeAcquireSpinLockAtDpcLevel( &p_spinlock->lock );<o:p></o:p></p>
<p class="MsoNormal"> p_spinlock->irql = irql;<o:p></o:p></p>
<p class="MsoNormal"> }<o:p></o:p></p>
<p class="MsoNormal"> else<o:p></o:p></p>
<p class="MsoNormal"> KeAcquireSpinLock( &p_spinlock->lock, &p_spinlock->irql );<o:p></o:p></p>
<p class="MsoNormal">}<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">To<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">CL_INLINE void<o:p></o:p></p>
<p class="MsoNormal">cl_spinlock_acquire( <o:p></o:p></p>
<p class="MsoNormal"> IN cl_spinlock_t* const p_spinlock )<o:p></o:p></p>
<p class="MsoNormal">{<o:p></o:p></p>
<p class="MsoNormal"> CL_ASSERT( p_spinlock );<o:p></o:p></p>
<p class="MsoNormal"> KeAcquireSpinLock( &p_spinlock->lock, &p_spinlock->irql );<o:p></o:p></p>
<p class="MsoNormal">}<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</body>
</html>