<p>Jonathan Neuschäfer has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/25625">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">arch/riscv: Store mprv bit in size_t<br><br>CSRs are XLEN bits wide (i.e. the same width as general purpose<br>registers), so size_t seems a little more correct than int.<br><br>This change doesn't affect functionality because MSTATUS_MPRV already<br>fits in 31 bits.<br><br>Change-Id: I003c1b88b4493681dc9b6178ac785be330203ef5<br>Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net><br>---<br>M src/arch/riscv/include/vm.h<br>1 file changed, 2 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/25/25625/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/arch/riscv/include/vm.h b/src/arch/riscv/include/vm.h</span><br><span>index fd0a2c9..a30d6bb 100644</span><br><span>--- a/src/arch/riscv/include/vm.h</span><br><span>+++ b/src/arch/riscv/include/vm.h</span><br><span>@@ -42,7 +42,7 @@</span><br><span> static inline type name(type *p); \</span><br><span> static inline type name(type *p) \</span><br><span> { \</span><br><span style="color: hsl(0, 100%, 40%);">- int mprv = MSTATUS_MPRV; \</span><br><span style="color: hsl(120, 100%, 40%);">+ size_t mprv = MSTATUS_MPRV; \</span><br><span> type value; \</span><br><span> asm ( \</span><br><span> "csrs mstatus, %1\n" \</span><br><span>@@ -57,7 +57,7 @@</span><br><span> static inline void name(type *p, type value); \</span><br><span> static inline void name(type *p, type value) \</span><br><span> { \</span><br><span style="color: hsl(0, 100%, 40%);">- int mprv = MSTATUS_MPRV; \</span><br><span style="color: hsl(120, 100%, 40%);">+ size_t mprv = MSTATUS_MPRV; \</span><br><span> asm ( \</span><br><span> "csrs mstatus, %0\n" \</span><br><span> STRINGIFY(insn) " %1, 0(%2)\n" \</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/25625">change 25625</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/25625"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I003c1b88b4493681dc9b6178ac785be330203ef5 </div>
<div style="display:none"> Gerrit-Change-Number: 25625 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Jonathan Neuschäfer <j.neuschaefer@gmx.net> </div>