Skip to contentSkip to conversation

ia64: old_rr4 added under CONFIG_HUGETLB_PAGE

PATCH Applied Souptick Joarder 1 participant 2 messages Jun 26, 2022 – Jul 4, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ia64: old_rr4 added under CONFIG_HUGETLB_PAGE

From: "Souptick Joarder (HPE)" <[email protected]>

kernel test robot throws below warning ->

arch/ia64/include/asm/mmu_context.h: In function 'reload_context':
arch/ia64/include/asm/mmu_context.h:127:48: warning: variable
'old_rr4' set but not used [-Wunused-but-set-variable]

     127 |         unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;

Added it under CONFIG_HUGETLB_PAGE

---
 arch/ia64/include/asm/mmu_context.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
arch/ia64/include/asm/mmu_context.h +4 -1
index 87a0d5bc11ef..06257e355d00 100644
@@ -124,9 +124,12 @@ reload_context (nv_mm_context_t context)
 {
 	unsigned long rid;
 	unsigned long rid_incr = 0;
-	unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;
+	unsigned long rr0, rr1, rr2, rr3, rr4;
 
+#ifdef CONFIG_HUGETLB_PAGE
+	unsigned long old_rr4;
 	old_rr4 = ia64_get_rr(RGN_BASE(RGN_HPAGE));
+#endif
 	rid = context << 3;	/* make space for encoding the region number */
 	rid_incr = 1 << 8;
 
Signature · 1 line
2.25.1
#1 lore raw
Quoted 11 lines · Souptick Joarder

From: "Souptick Joarder (HPE)" <[email protected]>

kernel test robot throws below warning ->

arch/ia64/include/asm/mmu_context.h: In function 'reload_context':

   arch/ia64/include/asm/mmu_context.h:127:48: warning: variable
'old_rr4' set but not used [-Wunused-but-set-variable]
     127 |         unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;

Added it under CONFIG_HUGETLB_PAGE

Any comments on this patch ?

Quoted 28 lines
---
 arch/ia64/include/asm/mmu_context.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
arch/ia64/include/asm/mmu_context.h +4 -2
index 87a0d5bc11ef..06257e355d00 100644
@@ -124,9 +124,12 @@ reload_context (nv_mm_context_t context)
 {
        unsigned long rid;
        unsigned long rid_incr = 0;
-       unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;
+       unsigned long rr0, rr1, rr2, rr3, rr4;
 
+#ifdef CONFIG_HUGETLB_PAGE
+       unsigned long old_rr4;
        old_rr4 = ia64_get_rr(RGN_BASE(RGN_HPAGE));
+#endif
        rid = context << 3;     /* make space for encoding the region number */
        rid_incr = 1 << 8;
 
--

2.25.1