From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/6] ARMv7: Improved page table format with TRE and AFE
Date: Mon, 14 Dec 2009 16:11:40 +0000 [thread overview]
Message-ID: <20091214161139.GA16953@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1260805824.17159.101.camel@pc1117.cambridge.arm.com>
On Mon, Dec 14, 2009 at 03:50:24PM +0000, Catalin Marinas wrote:
> > - Kernel reads PTE and modifies it
>
> B3.3.5 in the ARM ARM describes the requirements for the Hardware
> management of the access flag:
>
> Any implementation of hardware management of the access flag
> must ensure that any software changes to the translation table
> are not lost. The architecture does not require software that
> performs translation table changes to use interlocked
> operations. The hardware management mechanisms for the access
> flag must prevent any loss of data written to translation table
> entries that might occur when, for example, a write by another
> processor occurs between the read and write phases of a
> translation table walk that updates the
> access flag.
>
> At the hardware level, it could be implemented similar to a LDREX/STREX
> block.
>
> > - Hardware accesses page
> > - TLB reads PTE, updates, and writes new back
> > - Kernel writes PTE back
>
> Addressed above. The hardware write should fail if there was an STR from
> the current or different CPU.
I don't think it is - the paragraph you quote talks about the following
situation:
- Hardware reads PTE
- Kernel writes PTE
- Hardware (tries to) write PTE
What it says is that the hardware write in this case must fail.
The case I was talking about is:
- Kernel reads PTE
- Hardware reads PTE
- Hardware writes PTE
- Kernel writes PTE
Since there is no STR between the hardware reading and writing the PTE,
the hardware can not know that its update has been lost.
Whether it matters or not is a different kettle of fish.
next prev parent reply other threads:[~2009-12-14 16:11 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-07 14:10 [PATCH 0/6] Bug-fixes and new features for 2.6.34-rc1 Catalin Marinas
2009-12-07 14:10 ` [PATCH 1/6] Global ASID allocation on SMP Catalin Marinas
2009-12-07 14:13 ` [PATCH 2/6] Broadcast the DMA cache operations on ARMv6 SMP hardware Catalin Marinas
2009-12-07 14:13 ` [PATCH 3/6] Fix a race in the vfp_notifier() function on SMP systems Catalin Marinas
2009-12-12 12:24 ` Russell King - ARM Linux
2009-12-12 13:57 ` Russell King - ARM Linux
2009-12-14 12:21 ` Catalin Marinas
2009-12-14 12:15 ` Catalin Marinas
2009-12-14 16:28 ` [PATCH 3/6] Fix a race in the vfp_notifier() function on SMPsystems Catalin Marinas
2009-12-07 14:13 ` [PATCH 4/6] ARMv7: Use lazy cache flushing if hardware broadcasts cache operations Catalin Marinas
2010-03-08 16:25 ` [PATCH 4/6] ARMv7: Use lazy cache flushing if hardware broadcastscache operations Catalin Marinas
2010-03-08 16:31 ` Russell King - ARM Linux
2010-03-08 16:38 ` [PATCH 4/6] ARMv7: Use lazy cache flushing if hardwarebroadcastscache operations Catalin Marinas
2009-12-07 14:14 ` [PATCH 5/6] ARMv7: Improved page table format with TRE and AFE Catalin Marinas
2009-12-12 11:28 ` Russell King - ARM Linux
2009-12-14 15:50 ` Catalin Marinas
2009-12-14 15:58 ` Catalin Marinas
2009-12-14 16:11 ` Russell King - ARM Linux [this message]
2009-12-14 16:16 ` Catalin Marinas
2009-12-07 14:16 ` [PATCH 6/6] Remove the domain switching on ARMv6k/v7 CPUs Catalin Marinas
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=20091214161139.GA16953@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--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).