* [RFC] arm64: mm: use pgprot_device for device in phys_mem_access_prot
@ 2016-07-21 7:13 Jisheng Zhang
2016-07-21 16:03 ` Catalin Marinas
0 siblings, 1 reply; 3+ messages in thread
From: Jisheng Zhang @ 2016-07-21 7:13 UTC (permalink / raw)
To: linux-arm-kernel
Hi all,
Normally, in arm64, kernel driver maps register space as device nGnRE. But
if we access the register space via. /dev/mem, then the mapping is
device nGnRnE, is there a mismatch here?
the fix is s/pgprot_noncached/pgprot_device in phys_mem_access_prot().
>From armv8 ARM, this mismatch seems not the so called mismatched memory
attributes?
Thanks,
Jisheng
^ permalink raw reply [flat|nested] 3+ messages in thread
* [RFC] arm64: mm: use pgprot_device for device in phys_mem_access_prot
2016-07-21 7:13 [RFC] arm64: mm: use pgprot_device for device in phys_mem_access_prot Jisheng Zhang
@ 2016-07-21 16:03 ` Catalin Marinas
2016-07-22 6:58 ` Jisheng Zhang
0 siblings, 1 reply; 3+ messages in thread
From: Catalin Marinas @ 2016-07-21 16:03 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Jul 21, 2016 at 03:13:44PM +0800, Jisheng Zhang wrote:
> Normally, in arm64, kernel driver maps register space as device nGnRE. But
> if we access the register space via. /dev/mem, then the mapping is
> device nGnRnE, is there a mismatch here?
Possibly, but the behaviour is not undefined. The nGnRnE may lose the nE
behaviour (which is a hint anyway, it may not be honoured).
/dev/mem is a pretty bad idea in general.
--
Catalin
^ permalink raw reply [flat|nested] 3+ messages in thread
* [RFC] arm64: mm: use pgprot_device for device in phys_mem_access_prot
2016-07-21 16:03 ` Catalin Marinas
@ 2016-07-22 6:58 ` Jisheng Zhang
0 siblings, 0 replies; 3+ messages in thread
From: Jisheng Zhang @ 2016-07-22 6:58 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, 21 Jul 2016 17:03:00 +0100 Catalin Marinas wrote:
> On Thu, Jul 21, 2016 at 03:13:44PM +0800, Jisheng Zhang wrote:
> > Normally, in arm64, kernel driver maps register space as device nGnRE. But
> > if we access the register space via. /dev/mem, then the mapping is
> > device nGnRnE, is there a mismatch here?
>
> Possibly, but the behaviour is not undefined. The nGnRnE may lose the nE
> behaviour (which is a hint anyway, it may not be honoured).
Got it. Thanks for confirmation.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-07-22 6:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-21 7:13 [RFC] arm64: mm: use pgprot_device for device in phys_mem_access_prot Jisheng Zhang
2016-07-21 16:03 ` Catalin Marinas
2016-07-22 6:58 ` Jisheng Zhang
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).