From: Christian Zigotzky <chzigotzky@xenosoft.de>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
linuxppc-dev@lists.ozlabs.org, darren@stevens-zone.net
Cc: Michael Ellerman <michaele@au1.ibm.com>
Subject: PAGE_GUARDED
Date: Wed, 25 May 2016 08:58:03 +0200 [thread overview]
Message-ID: <fa1a315f-6337-f88a-4be7-000f7d8495a8@xenosoft.de> (raw)
In-Reply-To: <87d1obqxg9.fsf@skywalker.in.ibm.com>
Aneesh,
Thank you for your help. I tried
/* Workaround for lack of device tree */
if (primary) {
__ioremap_at(range.cpu_addr, (void
*)ISA_IO_BASE,
range.size, HPTE_R_C | HPTE_R_M);
hose->io_base_virt = (void *)_IO_BASE;
printk("Initialised io_base_virt 0x%lx _IO_BASE
0x%llx\n", (unsigned long)hose->io_base_virt, (unsigned long long)_IO_BASE);
}
Unfortunately the kernel doesn't boot.
Cheers,
Christian
On 24 May 2016 at 5:37 PM, Aneesh Kumar K.V wrote:
> You can look at commit 72176dd0ad36c ("powerpc/mm: Use a helper for
> finding pte bits mapping I/O area") to find similar conversion we did.
>
> For ex:
> __ioremap_at(phb_io_base_phys, (void *)ISA_IO_BASE,
> size, _PAGE_NO_CACHE|_PAGE_GUARDED);
>
> gets replaced by
>
> __ioremap_at(phb_io_base_phys, (void *)ISA_IO_BASE,
> size, pgprot_val(pgprot_noncached(__pgprot(0))));
>
> Now that gets mapped to the below hpte bits
>
> pte bit -> _PAGE_NON_IDEMPOTENT
>
> Which get converted in htab_convert_pte_flags(unsigned long pteflags)
> to
>
> if ((pteflags & _PAGE_CACHE_CTL ) == _PAGE_NON_IDEMPOTENT)
> rflags |= (HPTE_R_I | HPTE_R_G);
>
> BTW we default add (HPTE_R_C | HPTE_R_M ).
>
> Hence the final pte WIMG bits will be MIG. I guess that is what you
> wanted ?
>
>
> If that doesn't work, can you point me the current code so that I can
> look at it and suggest correct alternative.
>
> -aneesh
>
>
next prev parent reply other threads:[~2016-05-25 7:16 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-23 4:38 PAGE_GUARDED Christian Zigotzky
2016-05-23 8:01 ` PAGE_GUARDED Benjamin Herrenschmidt
2016-05-24 10:48 ` PAGE_GUARDED Christian Zigotzky
2016-05-24 11:16 ` PAGE_GUARDED Benjamin Herrenschmidt
2016-05-24 13:37 ` PAGE_GUARDED Christian Zigotzky
2016-05-24 15:37 ` PAGE_GUARDED Aneesh Kumar K.V
2016-05-25 6:58 ` Christian Zigotzky [this message]
2016-05-25 11:44 ` PAGE_GUARDED Christian Zigotzky
2016-06-04 7:19 ` Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE Christian Zigotzky
2016-06-04 7:40 ` Christian Zigotzky
2016-06-04 11:08 ` Christian Zigotzky
2016-06-04 14:46 ` Aneesh Kumar K.V
2016-06-04 15:13 ` Christian Zigotzky
2016-06-04 15:25 ` Christian Zigotzky
2016-06-05 16:09 ` Christian Zigotzky
2016-06-06 0:57 ` Michael Ellerman
2016-06-06 1:23 ` Julian Margetson
2016-06-06 2:00 ` Michael Ellerman
2016-06-06 8:59 ` Julian Margetson
2016-06-06 0:54 ` Michael Ellerman
2016-06-04 14:42 ` Aneesh Kumar K.V
2016-06-04 15:07 ` Christian Zigotzky
2016-06-06 0:51 ` Michael Ellerman
2016-06-06 5:21 ` Christian Zigotzky
2016-06-07 20:17 ` Christian Zigotzky
2016-06-07 22:14 ` Christian Zigotzky
2016-06-08 1:51 ` Michael Ellerman
2016-06-08 2:52 ` Michael Ellerman
2016-06-08 10:58 ` Christian Zigotzky
2016-06-08 11:30 ` Michael Ellerman
2016-06-08 12:50 ` Christian Zigotzky
2016-06-08 11:33 ` Darren Stevens
2016-06-08 13:24 ` Christian Zigotzky
2016-06-08 13:51 ` Christian Zigotzky
2016-06-08 13:52 ` Michael Ellerman
2016-06-08 15:11 ` Aneesh Kumar K.V
2016-06-08 15:47 ` Christian Zigotzky
2016-06-09 8:48 ` Christian Zigotzky
2016-06-09 11:15 ` Michael Ellerman
2016-06-09 13:13 ` Christian Zigotzky
2016-06-13 8:14 ` Christian Zigotzky
2016-06-13 8:19 ` Benjamin Herrenschmidt
2016-06-13 18:09 ` Christian Zigotzky
2016-06-22 19:07 ` Christian Zigotzky
2016-06-22 19:58 ` luigi burdo
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=fa1a315f-6337-f88a-4be7-000f7d8495a8@xenosoft.de \
--to=chzigotzky@xenosoft.de \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=darren@stevens-zone.net \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=michaele@au1.ibm.com \
/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).