mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeremy Linton <Jeremy.Linton@arm.com>
To: Steve Capper <steve.capper@linaro.org>
Cc: "linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	Steve Capper <Steve.Capper@arm.com>,
	Catalin Marinas <Catalin.Marinas@arm.com>,
	"dwoods@ezchip.com" <dwoods@ezchip.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Will Deacon <Will.Deacon@arm.com>,
	Shijie Huang <Shijie.Huang@arm.com>
Subject: RE: [PATCH 7/7] arm64: Mark kernel page ranges contiguous
Date: Thu, 17 Sep 2015 10:33:39 -0700	[thread overview]
Message-ID: <F58048940DF89C44BFA5A966565B5D23EBA34EE592@SPOCK.usa.Arm.com> (raw)
In-Reply-To: <CAPvkgC3QOvHdQRuvAmdRDnbfQCMOBX2aPcoLER7grc5yZ-MF4A@mail.gmail.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 2432 bytes --]

|Hi Jeremy,
|One quick comment for now below.
|I ran into a problem testing this on my Seattle board, and needed the fix
|below.
<snip>
|> -       } while (pte++, addr += PAGE_SIZE, addr != end);
|> +               next = min(end, (addr + CONT_SIZE) & CONT_MASK);
|> +               if (((addr | next | phys) & CONT_RANGE_MASK) == 0) {
|> +                       /* a block of CONT_RANGE_SIZE PTEs */
|> +                       __populate_init_pte(pte, addr, next, phys,
|> +                                           prot | __pgprot(PTE_CONT));
|> +                       pte += CONT_RANGE;
|> +               } else {
|> +                       /*
|> +                        * If the range being split is already inside of a
|> +                        * contiguous range but this PTE isn't going to be
|> +                        * contiguous, then we want to unmark the adjacent
|> +                        * ranges, then update the portion of the range we
|> +                        * are interrested in.
|> +                        */
|> +                        clear_cont_pte_range(pte, addr);
|> +                        __populate_init_pte(pte, addr, next, phys, prot);
|> +                        pte += CONT_RANGE_OFFSET(next - addr);
|
|I think this should instead be:
|pte += (next - addr) >> PAGE_SHIFT;
|
|Without the above change, I get panics on boot with my Seattle board when
|efi_rtc is initialised.
|(I think the EFI runtime stuff exacerbates the non-contiguous code path
|hence I notice it on my system).

I think that implies you have linear mappings >= 2M that aren’t aligned. Ok, but that almost sounds like something we want to complain about if we detect it.






-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium.  Thank you.

ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No:  2557590
ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No:  2548782
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

      reply	other threads:[~2015-09-17 17:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-16 19:02 [PATCH 0/7] arm64: Use contigous PTE bit for the kernel linear mapping Jeremy Linton
2015-09-16 19:03 ` [PATCH 1/7] arm64: Add contiguous page flag shifts and constants Jeremy Linton
2015-09-16 19:03 ` [PATCH 2/7] arm64: Shorten lines which exceed 80 characters Jeremy Linton
2015-09-17  9:45   ` Catalin Marinas
2015-09-16 19:03 ` [PATCH 3/7] arm64: PTE/PMD contiguous bit definition Jeremy Linton
2015-09-16 19:03 ` [PATCH 4/7] arm64: Macros to check/set/unset the contiguous bit Jeremy Linton
2015-09-16 19:03 ` [PATCH 5/7] arm64: Default kernel pages should be contiguous Jeremy Linton
2015-09-16 19:03 ` [PATCH 6/7] arm64: Make the kernel page dump utility aware of the CONT bit Jeremy Linton
2015-09-18  7:02   ` Huang Shijie
2015-09-18  8:35   ` Huang Shijie
2015-09-16 19:03 ` [PATCH 7/7] arm64: Mark kernel page ranges contiguous Jeremy Linton
2015-09-17 17:23   ` Steve Capper
2015-09-17 17:33     ` Jeremy Linton [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=F58048940DF89C44BFA5A966565B5D23EBA34EE592@SPOCK.usa.Arm.com \
    --to=jeremy.linton@arm.com \
    --cc=Catalin.Marinas@arm.com \
    --cc=Shijie.Huang@arm.com \
    --cc=Steve.Capper@arm.com \
    --cc=Will.Deacon@arm.com \
    --cc=dwoods@ezchip.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=steve.capper@linaro.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

all inboxes | Powered by JetHome®