From: vladimir.murzin@arm.com (Vladimir Murzin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] ARM: domain: move {set, get}_domain under config guard
Date: Wed, 27 Apr 2016 13:16:29 +0100 [thread overview]
Message-ID: <5720AD9D.7020909@arm.com> (raw)
In-Reply-To: <20160427104918.GQ19428@n2100.arm.linux.org.uk>
On 27/04/16 11:49, Russell King - ARM Linux wrote:
> On Fri, Apr 22, 2016 at 12:43:36PM +0100, Vladimir Murzin wrote:
>> Domains is not available on !MMU cores, like R/M class. However,
>> currently guarding manages M-class only, for the R-class, in case
>> of fault we get in recursive "undefined instruction" faulting because
>> __show_regs() tries to get domain information.
>>
>> Fix it by extending CONFIG_CPU_USE_DOMAINS on {set,get}_domain
>> functions and providing stubs for the case where Domains is not
>> supported.
>
> Huge big bloody NAK.
>
> I think it would be useful if you read the history of the file,
> particularly looking at commit a5e090acbf545c0a3b04080f8a488b17ec41fe02.
>
> It really amazes me how people propose patches which undo bits of
> previous patches without making comments about it.
>
> No way is this patch going in, which has the effect of completely
> disabling SW PAN, sorry.
>
Thanks, Russell!
I've confused myself that support for CPU_SW_DOMAIN_PAN implies
CONFIG_CPU_USE_DOMAINS, but now I see they are in fact different
features/users of those accessors.
So something like below should be sufficient to fix my case, right?
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index 4adfb46..d10c385 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -108,7 +108,7 @@ void __show_regs(struct pt_regs *regs)
else
domain = *(unsigned int *)(regs + 1);
#else
- domain = get_domain();
+ domain = IS_ENABLED(CONFIG_CPU_USE_DOMAINS)? get_domain() : 0;
#endif
#endif
Cheers
Vladimir
next prev parent reply other threads:[~2016-04-27 12:16 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-22 11:43 [PATCH 0/3] ARM: nommu: R-class fixes Vladimir Murzin
2016-04-22 11:43 ` [PATCH 1/3] ARM: nommu: fix PMSAv7 setup Vladimir Murzin
2016-04-22 11:43 ` [PATCH 2/3] ARM: nommu: change memory reserve for the vectors Vladimir Murzin
2016-04-22 11:43 ` [PATCH 3/3] ARM: domain: move {set,get}_domain under config guard Vladimir Murzin
2016-04-27 10:49 ` [PATCH 3/3] ARM: domain: move {set, get}_domain " Russell King - ARM Linux
2016-04-27 12:16 ` Vladimir Murzin [this message]
2016-04-28 13:50 ` Russell King - ARM Linux
2016-04-28 14:44 ` Vladimir Murzin
2016-04-28 14:59 ` Russell King - ARM Linux
2016-04-28 15:06 ` Vladimir Murzin
2016-04-23 6:54 ` [PATCH 0/3] ARM: nommu: R-class fixes Afzal Mohammed
2016-04-25 7:55 ` Vladimir Murzin
2016-04-25 12:59 ` Arnd Bergmann
2016-04-25 13:30 ` Afzal Mohammed
2016-04-26 8:17 ` Vladimir Murzin
2016-04-26 8:17 ` Vladimir Murzin
2016-04-26 9:10 ` Arnd Bergmann
2016-04-26 10:57 ` Vladimir Murzin
2016-04-26 11:59 ` Arnd Bergmann
2016-04-26 12:24 ` Vladimir Murzin
2016-04-26 18:12 ` Arnd Bergmann
2016-04-27 9:10 ` Vladimir Murzin
2016-04-27 9:50 ` Arnd Bergmann
2016-04-27 10:55 ` Vladimir Murzin
2016-04-27 11:18 ` Arnd Bergmann
2016-04-26 15:23 ` Afzal Mohammed
2016-04-28 9:41 ` Maxime Coquelin
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=5720AD9D.7020909@arm.com \
--to=vladimir.murzin@arm.com \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).