From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: mmu: set the contiguous for kernel mappings when appropriate
Date: Tue, 11 Oct 2016 08:48:28 +0100 [thread overview]
Message-ID: <20161011074827.GB20213@remoulade> (raw)
In-Reply-To: <20161011074419.GA20213@remoulade>
On Tue, Oct 11, 2016 at 08:44:19AM +0100, Mark Rutland wrote:
> > {
> > + pgprot_t prot_cont = __pgprot(pgprot_val(prot) | PTE_CONT);
> > + bool cont = false;
> > pte_t *pte;
> >
> > BUG_ON(pmd_sect(*pmd));
> > @@ -115,7 +118,20 @@ static void alloc_init_pte(pmd_t *pmd, unsigned long addr,
> >
> > pte = pte_set_fixmap_offset(pmd, addr);
> > do {
> > - set_pte(pte, pfn_pte(pfn, prot));
> > + /*
> > + * Set the contiguous bit for the subsequent group of PTEs if
> > + * its size and alignment are suitable.
> > + */
> > + if (((addr | PFN_PHYS(pfn)) & ~CONT_MASK) == 0)
> > + cont = allow_block_mappings && end - addr >= CONT_SIZE;
>
> Given we increment addr by PAGE_SIZE in the loop, isn't this only true for the
> first CONT_SIZE aligned entry, and not its (intended-to-be-contiguous)
> siblings?
Looking again, I'd mis-read the above; it will work as expected.
Sorry for the noise.
Thanks,
Mark.
next prev parent reply other threads:[~2016-10-11 7:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-10 18:12 [PATCH] arm64: mmu: set the contiguous for kernel mappings when appropriate Ard Biesheuvel
2016-10-11 7:44 ` Mark Rutland
2016-10-11 7:48 ` Mark Rutland [this message]
2016-10-11 8:21 ` Ard Biesheuvel
2016-10-11 15:10 ` Mark Rutland
[not found] ` <CAPvkgC1p5yZLtENYMi6zd5-pPDOYUtMw0Lxvb592u975gc+Zvg@mail.gmail.com>
2016-10-11 9:09 ` Ard Biesheuvel
2016-10-11 11:17 ` Ard Biesheuvel
2016-10-11 12:41 ` Will Deacon
2016-10-11 12:56 ` Ard Biesheuvel
2016-10-11 16:29 ` Will Deacon
2016-10-11 16:38 ` Ard Biesheuvel
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=20161011074827.GB20213@remoulade \
--to=mark.rutland@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.