All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Ghiti <alex@ghiti.fr>
To: Samuel Holland <samuel.holland@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	linux-riscv@lists.infradead.org
Cc: Mark Rutland <mark.rutland@arm.com>,
	David Laight <David.Laight@ACULAB.COM>,
	Arnd Bergmann <arnd@arndb.de>,
	Alexandre Ghiti <alexghiti@rivosinc.com>
Subject: Re: [PATCH v2 1/2] riscv: Remove PGDIR_SIZE_L3 and TASK_SIZE_MIN
Date: Thu, 4 Apr 2024 09:33:27 +0200	[thread overview]
Message-ID: <61d289cb-115d-4e94-bdc9-787738b2f42d@ghiti.fr> (raw)
In-Reply-To: <20240327143858.711792-2-samuel.holland@sifive.com>

Hi Samuel,

On 27/03/2024 15:38, Samuel Holland wrote:
> TASK_SIZE_MIN is unused since commit 085e2ff9aeb0 ("efi: libstub: Drop
> randomization of runtime memory map"). PGDIR_SIZE_L3 is only used in the
> definition of TASK_SIZE_MIN.
>
> Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
> ---
>
> Changes in v2:
>   - New patch for v2
>
>   arch/riscv/include/asm/pgtable-64.h | 2 --
>   arch/riscv/include/asm/pgtable.h    | 2 --
>   2 files changed, 4 deletions(-)
>
> diff --git a/arch/riscv/include/asm/pgtable-64.h b/arch/riscv/include/asm/pgtable-64.h
> index 221a5c1ee287..8c36a8818432 100644
> --- a/arch/riscv/include/asm/pgtable-64.h
> +++ b/arch/riscv/include/asm/pgtable-64.h
> @@ -16,8 +16,6 @@ extern bool pgtable_l5_enabled;
>   #define PGDIR_SHIFT_L3  30
>   #define PGDIR_SHIFT_L4  39
>   #define PGDIR_SHIFT_L5  48
> -#define PGDIR_SIZE_L3   (_AC(1, UL) << PGDIR_SHIFT_L3)
> -
>   #define PGDIR_SHIFT     (pgtable_l5_enabled ? PGDIR_SHIFT_L5 : \
>   		(pgtable_l4_enabled ? PGDIR_SHIFT_L4 : PGDIR_SHIFT_L3))
>   /* Size of region mapped by a page global directory */
> diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h
> index 97fcde30e247..f5cc8bcc7f8d 100644
> --- a/arch/riscv/include/asm/pgtable.h
> +++ b/arch/riscv/include/asm/pgtable.h
> @@ -870,7 +870,6 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte)
>    */
>   #ifdef CONFIG_64BIT
>   #define TASK_SIZE_64	(PGDIR_SIZE * PTRS_PER_PGD / 2)
> -#define TASK_SIZE_MIN	(PGDIR_SIZE_L3 * PTRS_PER_PGD / 2)
>   
>   #ifdef CONFIG_COMPAT
>   #define TASK_SIZE_32	(_AC(0x80000000, UL) - PAGE_SIZE)
> @@ -882,7 +881,6 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte)
>   
>   #else
>   #define TASK_SIZE	FIXADDR_START
> -#define TASK_SIZE_MIN	TASK_SIZE
>   #endif
>   
>   #else /* CONFIG_MMU */


I noticed loongarch still had this definition, but up to you to remove 
it too :)

Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>

Thanks,

Alex



_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  parent reply	other threads:[~2024-04-04  7:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-27 14:38 [PATCH v2 0/2] riscv: access_ok() optimization Samuel Holland
2024-03-27 14:38 ` [PATCH v2 1/2] riscv: Remove PGDIR_SIZE_L3 and TASK_SIZE_MIN Samuel Holland
2024-03-27 16:24   ` Arnd Bergmann
2024-04-04  7:33   ` Alexandre Ghiti [this message]
2024-03-27 14:38 ` [PATCH v2 2/2] riscv: Define TASK_SIZE_MAX for __access_ok() Samuel Holland
2024-03-27 16:24   ` Arnd Bergmann
2024-04-04  7:38   ` Alexandre Ghiti
2024-05-22 14:10 ` [PATCH v2 0/2] riscv: access_ok() optimization patchwork-bot+linux-riscv

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=61d289cb-115d-4e94-bdc9-787738b2f42d@ghiti.fr \
    --to=alex@ghiti.fr \
    --cc=David.Laight@ACULAB.COM \
    --cc=alexghiti@rivosinc.com \
    --cc=arnd@arndb.de \
    --cc=linux-riscv@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=palmer@dabbelt.com \
    --cc=samuel.holland@sifive.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.