<p>Nico Huber has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/26761">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">cpu/x86/mtrr.h: Clean up some guards<br><br>Move #includes to the top and remove unnecessary guards. Hopefully this<br>prevents future surprises.<br><br>Change-Id: Id4571c46a0c05a080b2b1cfec64b4eda07d793bb<br>Signed-off-by: Nico Huber <nico.h@gmx.de><br>---<br>M src/include/cpu/x86/mtrr.h<br>1 file changed, 9 insertions(+), 13 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/61/26761/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/include/cpu/x86/mtrr.h b/src/include/cpu/x86/mtrr.h</span><br><span>index dde9a28..789edc7 100644</span><br><span>--- a/src/include/cpu/x86/mtrr.h</span><br><span>+++ b/src/include/cpu/x86/mtrr.h</span><br><span>@@ -2,6 +2,8 @@</span><br><span> #define CPU_X86_MTRR_H</span><br><span> </span><br><span> #include <commonlib/helpers.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <cpu/x86/msr.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <arch/cpu.h></span><br><span> </span><br><span> /*  These are the region types  */</span><br><span> #define MTRR_TYPE_UNCACHEABLE               0</span><br><span>@@ -95,6 +97,13 @@</span><br><span>       unsigned int type);</span><br><span> int get_free_var_mtrr(void);</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * Set the MTRRs using the data on the stack from setup_stack_and_mtrrs.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Return a new top_of_stack value which removes the setup_stack_and_mtrrs data.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+asmlinkage void *soc_set_mtrrs(void *top_of_stack);</span><br><span style="color: hsl(120, 100%, 40%);">+asmlinkage void soc_enable_mtrrs(void);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> /* fms: find most significant bit set, stolen from Linux Kernel Source. */</span><br><span> static inline unsigned int fms(unsigned int x)</span><br><span> {</span><br><span>@@ -172,17 +181,4 @@</span><br><span> </span><br><span> #define CACHE_ROM_BASE _FROM_4G_TOP(CACHE_ROM_SIZE)</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#if (IS_ENABLED(CONFIG_SOC_SETS_MSRS) && !defined(__ASSEMBLER__) \</span><br><span style="color: hsl(0, 100%, 40%);">-       && !defined(__ROMCC__))</span><br><span style="color: hsl(0, 100%, 40%);">-#include <cpu/x86/msr.h></span><br><span style="color: hsl(0, 100%, 40%);">-#include <arch/cpu.h></span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-/*</span><br><span style="color: hsl(0, 100%, 40%);">- * Set the MTRRs using the data on the stack from setup_stack_and_mtrrs.</span><br><span style="color: hsl(0, 100%, 40%);">- * Return a new top_of_stack value which removes the setup_stack_and_mtrrs data.</span><br><span style="color: hsl(0, 100%, 40%);">- */</span><br><span style="color: hsl(0, 100%, 40%);">-asmlinkage void *soc_set_mtrrs(void *top_of_stack);</span><br><span style="color: hsl(0, 100%, 40%);">-asmlinkage void soc_enable_mtrrs(void);</span><br><span style="color: hsl(0, 100%, 40%);">-#endif /* CONFIG_SOC_SETS_MSRS ... */</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span> #endif /* CPU_X86_MTRR_H */</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/26761">change 26761</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/26761"/><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: Id4571c46a0c05a080b2b1cfec64b4eda07d793bb </div>
<div style="display:none"> Gerrit-Change-Number: 26761 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Nico Huber <nico.h@gmx.de> </div>