2016-04-18 09:39:08

by Paul Burton

[permalink] [raw]
Subject: [PATCH v2 13/13] MIPS: mm: Panic if an XPA kernel is run without RIXI

XPA kernels hardcode for the presence of RIXI - the PTE format & its
handling presume RI & XI bits. Make this dependence explicit by panicing
if we run on a system that violates it.

Signed-off-by: Paul Burton <[email protected]>

---

Changes in v2:
- New patch, in response to clarification on patch 5.

arch/mips/mm/tlbex.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index 3f1a8a2..9c39c66 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -2395,6 +2395,9 @@ void build_tlb_refill_handler(void)
*/
static int run_once = 0;

+ if (config_enabled(CONFIG_XPA) && !cpu_has_rixi)
+ panic("Kernels supporting XPA currently require CPUs with RIXI\n");
+
output_pgtable_bits_defines();
check_pabits();

--
2.8.0


2016-04-18 10:04:51

by James Hogan

[permalink] [raw]
Subject: Re: [PATCH v2 13/13] MIPS: mm: Panic if an XPA kernel is run without RIXI

On Mon, Apr 18, 2016 at 10:35:33AM +0100, Paul Burton wrote:
> XPA kernels hardcode for the presence of RIXI - the PTE format & its
> handling presume RI & XI bits. Make this dependence explicit by panicing
> if we run on a system that violates it.
>
> Signed-off-by: Paul Burton <[email protected]>
>
> ---
>
> Changes in v2:
> - New patch, in response to clarification on patch 5.
>
> arch/mips/mm/tlbex.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
> index 3f1a8a2..9c39c66 100644
> --- a/arch/mips/mm/tlbex.c
> +++ b/arch/mips/mm/tlbex.c
> @@ -2395,6 +2395,9 @@ void build_tlb_refill_handler(void)
> */
> static int run_once = 0;
>
> + if (config_enabled(CONFIG_XPA) && !cpu_has_rixi)
> + panic("Kernels supporting XPA currently require CPUs with RIXI\n");

Don't think you need the newline.

Otherwise
Reviewed-by: James Hogan <[email protected]>

In the future we can hopefully drop that requirement so that XPA kernels
can run on non-XPA, non-RIXI hardware.

Cheers
James

> +
> output_pgtable_bits_defines();
> check_pabits();
>
> --
> 2.8.0
>


Attachments:
(No filename) (1.12 kB)
signature.asc (819.00 B)
Digital signature
Download all attachments