From: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
To: David Daney <ddaney.cavm@gmail.com>, <linux-mips@linux-mips.org>,
<ralf@linux-mips.org>
Subject: Re: [PATCH 0/2] Revert broken C0_Pagegrain[PG_IEC] support.
Date: Fri, 19 Dec 2014 16:49:28 -0800 [thread overview]
Message-ID: <5494C798.60706@imgtec.com> (raw)
In-Reply-To: <5494C639.8050808@imgtec.com>
On 12/19/2014 04:43 PM, Leonid Yegoshin wrote:
> On 12/19/2014 04:33 PM, David Daney wrote:
>> From: David Daney <david.daney@cavium.com>
>>
>> The two patches reverted here break eXecute-Inhibit (XI) memory
>> protection support. Before the patches we get SIGSEGV when attempting
>> to execute in non-executable memory, after the patches we loop forever
>> in handle_tlbl.
>>
>> It is probably possible to make C0_Pagegrain[PG_IEC] work, but I think
>> the most prudent thing is to revert these patches, and then only reapply
>> something that works after it has been well tested.
>>
>> David Daney (2):
>> Revert "MIPS: Use dedicated exception handler if CPU supports RI/XI
>> exceptions"
>> Revert "MIPS: kernel: cpu-probe: Detect unique RI/XI exceptions"
>>
>> arch/mips/include/asm/mipsregs.h | 1 -
>> arch/mips/kernel/cpu-probe.c | 9 ---------
>> arch/mips/kernel/traps.c | 7 -------
>> arch/mips/mm/tlbex.c | 4 ++--
>> 4 files changed, 2 insertions(+), 19 deletions(-)
>>
> Well, it may be have sense just to fix tlb_init() instead.
diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c
index aa6e4b3b2fe2..ed18efd9374b 100644
--- a/arch/mips/mm/tlb-r4k.c
+++ b/arch/mips/mm/tlb-r4k.c
@@ -602,7 +602,7 @@ void __cpuinit tlb_init(void)
#ifdef CONFIG_64BIT
pg |= PG_ELPA;
#endif
- write_c0_pagegrain(pg);
+ write_c0_pagegrain(pg | read_c0_pagegrain());
}
mtc0_tlbw_hazard();
WARNING: multiple messages have this Message-ID (diff)
From: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
To: David Daney <ddaney.cavm@gmail.com>,
linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: Re: [PATCH 0/2] Revert broken C0_Pagegrain[PG_IEC] support.
Date: Fri, 19 Dec 2014 16:49:28 -0800 [thread overview]
Message-ID: <5494C798.60706@imgtec.com> (raw)
Message-ID: <20141220004928.ZFzWCdGqmyd6z_To8tljNOQRQTaNDcMj8H6lbBpu190@z> (raw)
In-Reply-To: <5494C639.8050808@imgtec.com>
On 12/19/2014 04:43 PM, Leonid Yegoshin wrote:
> On 12/19/2014 04:33 PM, David Daney wrote:
>> From: David Daney <david.daney@cavium.com>
>>
>> The two patches reverted here break eXecute-Inhibit (XI) memory
>> protection support. Before the patches we get SIGSEGV when attempting
>> to execute in non-executable memory, after the patches we loop forever
>> in handle_tlbl.
>>
>> It is probably possible to make C0_Pagegrain[PG_IEC] work, but I think
>> the most prudent thing is to revert these patches, and then only reapply
>> something that works after it has been well tested.
>>
>> David Daney (2):
>> Revert "MIPS: Use dedicated exception handler if CPU supports RI/XI
>> exceptions"
>> Revert "MIPS: kernel: cpu-probe: Detect unique RI/XI exceptions"
>>
>> arch/mips/include/asm/mipsregs.h | 1 -
>> arch/mips/kernel/cpu-probe.c | 9 ---------
>> arch/mips/kernel/traps.c | 7 -------
>> arch/mips/mm/tlbex.c | 4 ++--
>> 4 files changed, 2 insertions(+), 19 deletions(-)
>>
> Well, it may be have sense just to fix tlb_init() instead.
diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c
index aa6e4b3b2fe2..ed18efd9374b 100644
--- a/arch/mips/mm/tlb-r4k.c
+++ b/arch/mips/mm/tlb-r4k.c
@@ -602,7 +602,7 @@ void __cpuinit tlb_init(void)
#ifdef CONFIG_64BIT
pg |= PG_ELPA;
#endif
- write_c0_pagegrain(pg);
+ write_c0_pagegrain(pg | read_c0_pagegrain());
}
mtc0_tlbw_hazard();
next prev parent reply other threads:[~2014-12-20 0:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-20 0:33 [PATCH 0/2] Revert broken C0_Pagegrain[PG_IEC] support David Daney
2014-12-20 0:33 ` [PATCH 1/2] Revert "MIPS: Use dedicated exception handler if CPU supports RI/XI exceptions" David Daney
2014-12-20 0:33 ` David Daney
2014-12-20 0:33 ` [PATCH 2/2] Revert "MIPS: kernel: cpu-probe: Detect unique " David Daney
2014-12-20 0:33 ` David Daney
2014-12-20 0:43 ` [PATCH 0/2] Revert broken C0_Pagegrain[PG_IEC] support Leonid Yegoshin
2014-12-20 0:43 ` Leonid Yegoshin
2014-12-20 0:49 ` Leonid Yegoshin [this message]
2014-12-20 0:49 ` Leonid Yegoshin
2014-12-20 0:52 ` Ralf Baechle
2014-12-20 1:10 ` David Daney
2014-12-20 1:19 ` Leonid Yegoshin
2014-12-20 1:19 ` Leonid Yegoshin
2014-12-20 0:55 ` David Daney
2014-12-20 0:55 ` David Daney
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=5494C798.60706@imgtec.com \
--to=leonid.yegoshin@imgtec.com \
--cc=ddaney.cavm@gmail.com \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox