summaryrefslogtreecommitdiff
path: root/arch/sparc
diff options
context:
space:
mode:
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>2023-03-12 14:26:04 +0300
committerDave Hansen <dave.hansen@linux.intel.com>2023-03-16 13:08:40 -0700
commitf7d304343b9d2456ffba23b99d2345408251ea45 (patch)
treec7e5315aaeaac40909084a5784a0536c858091b6 /arch/sparc
parent2f8794bd087e7958c8d1f0a0538856ca03e0bf3c (diff)
mm: Expose untagging mask in /proc/$PID/status
Add a line in /proc/$PID/status to report untag_mask. It can be used to find out LAM status of the process from the outside. It is useful for debuggers. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by: Alexander Potapenko <glider@google.com> Link: https://lore.kernel.org/all/20230312112612.31869-10-kirill.shutemov%40linux.intel.com
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/include/asm/mmu_context_64.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/sparc/include/asm/mmu_context_64.h b/arch/sparc/include/asm/mmu_context_64.h
index 7a8380c63aab..799e797c5cdd 100644
--- a/arch/sparc/include/asm/mmu_context_64.h
+++ b/arch/sparc/include/asm/mmu_context_64.h
@@ -185,6 +185,12 @@ static inline void finish_arch_post_lock_switch(void)
}
}
+#define mm_untag_mask mm_untag_mask
+static inline unsigned long mm_untag_mask(struct mm_struct *mm)
+{
+ return -1UL >> adi_nbits();
+}
+
#include <asm-generic/mmu_context.h>
#endif /* !(__ASSEMBLY__) */