[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231222074605.452452-1-leobras@redhat.com>
Date: Fri, 22 Dec 2023 04:46:00 -0300
From: Leonardo Bras <leobras@...hat.com>
To: Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>,
Eric Biederman <ebiederm@...ssion.com>,
Kees Cook <keescook@...omium.org>,
Oleg Nesterov <oleg@...hat.com>,
Leonardo Bras <leobras@...hat.com>,
Conor Dooley <conor.dooley@...rochip.com>,
Andy Chiu <andy.chiu@...ive.com>,
Greg Ungerer <gerg@...nel.org>,
Vincent Chen <vincent.chen@...ive.com>,
Xiao Wang <xiao.w.wang@...el.com>,
Charlie Jenkins <charlie@...osinc.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Alexandre Ghiti <alexghiti@...osinc.com>,
Kemeng Shi <shikemeng@...weicloud.com>,
David Hildenbrand <david@...hat.com>,
"Matthew Wilcox (Oracle)" <willy@...radead.org>,
Qinglin Pan <panqinglin2020@...as.ac.cn>,
Greentime Hu <greentime.hu@...ive.com>,
Björn Töpel <bjorn@...osinc.com>,
Clément Léger <cleger@...osinc.com>,
Guo Ren <guoren@...nel.org>
Cc: linux-riscv@...ts.infradead.org,
linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Subject: [RFC PATCH 0/4] Introduce & Optimize compat-mode helpers
I just saw the opportunity of optimizing the helper is_compat_task() by
introducing a compile-time test, and it made possible to remove some
#ifdef's without any loss of performance.
I also saw the possibility of removing the direct check of task flags from
general code, and concentrated it in asm/compat.h by creating a few more
helpers, which in the end helped optimize code.
Leonardo Bras (4):
riscv: Replace direct thread flag check with is_compat_task()
riscv: add compile-time test into is_compat_task()
riscv: Introduce is_compat_thread() into compat.h
riscv: Introduce set_compat_task() in asm/compat.h
arch/riscv/include/asm/compat.h | 19 +++++++++++++++++++
arch/riscv/include/asm/elf.h | 11 ++---------
arch/riscv/include/asm/pgtable.h | 8 +-------
arch/riscv/include/asm/processor.h | 4 ++--
arch/riscv/kernel/ptrace.c | 6 +++---
5 files changed, 27 insertions(+), 21 deletions(-)
base-commit: 24e0d2e527a39f64caeb2e6be39ad5396fb2da5e
--
2.43.0
Powered by blists - more mailing lists