From: Michael Schmitz <schmitzmic@gmail.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: linux-mm@kvack.org, linux-m68k@lists.linux-m68k.org,
Geert Uytterhoeven <geert@linux-m68k.org>,
linux-arch@vger.kernel.org
Subject: Re: [PATCH 15/17] m68k: Implement the new page table range API
Date: Fri, 17 Feb 2023 11:03:16 +1300 [thread overview]
Message-ID: <a1783a1c-b599-0e44-e88c-181470c5675f@gmail.com> (raw)
In-Reply-To: <Y+2wdSxVgS6HmFRy@casper.infradead.org>
Hi Matthew,
On 16/02/23 17:26, Matthew Wilcox wrote:
> On Thu, Feb 16, 2023 at 01:59:44PM +1300, Michael Schmitz wrote:
>> Matthew,
>>
>> On 16/02/23 09:09, Matthew Wilcox (Oracle) wrote:
>>> Add set_ptes(), update_mmu_cache_range(), flush_icache_pages() and
>>> flush_dcache_folio(). I'm not entirely certain that the 040/060 case
>>> in __flush_pages_to_ram() is correct.
>> I'm pretty sure you need to iterate to hit each of the pages - the code as
>> is will only push cache entries for the first page.
>>
>> Quoting the 040 UM:
>>
>> "Both instructions [cinv, cpush] allow operation on a single cache line, all
>> cache lines in a specific page, or an entire cache, and can select one or
>> both caches for the operation. For line and page operations, a physical
>> address in an address register specifies the memory address."
> I actually found that! What I didn't find was how to tell if this
> cpush insn is the one which is operating on a single cache line,
> a single page, or the entire cache.
>
> So I should do a loop around this asm and call it once for each page
> we're flushing?
Yes, that's the idea. I'm uncertain whether contiguous virtual pages are
always guaranteed to have contiguous physical mappings, so no point in
trying to 'optimize' and shift the loop into inline assembly.
Cheers,
Michael
>
prev parent reply other threads:[~2023-02-16 22:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230215000446.1655635-1-willy@infradead.org>
[not found] ` <20230215200920.1849567-1-willy@infradead.org>
2023-02-15 20:09 ` [PATCH 15/17] m68k: Implement the new page table range API Matthew Wilcox (Oracle)
2023-02-16 0:59 ` Michael Schmitz
2023-02-16 4:26 ` Matthew Wilcox
2023-02-16 7:55 ` Geert Uytterhoeven
2023-02-16 22:03 ` Michael Schmitz [this message]
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=a1783a1c-b599-0e44-e88c-181470c5675f@gmail.com \
--to=schmitzmic@gmail.com \
--cc=geert@linux-m68k.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-mm@kvack.org \
--cc=willy@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