From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mo6-p00-ob.smtp.rzone.de (mo6-p00-ob.smtp.rzone.de [IPv6:2a01:238:20a:202:5300::5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rCnP53gqGzDqCj for ; Mon, 23 May 2016 15:37:28 +1000 (AEST) Content-Type: multipart/alternative; boundary=Apple-Mail-2C897F81-C964-4F59-BCD7-1703DF9C0C0F From: Christian Zigotzky Mime-Version: 1.0 (1.0) Subject: PAGE_GUARDED Message-Id: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> Date: Mon, 23 May 2016 06:38:08 +0200 To: linuxppc-dev@lists.ozlabs.org Cc: darren@stevens-zone.net List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , --Apple-Mail-2C897F81-C964-4F59-BCD7-1703DF9C0C0F Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Hi All, You removed PAGE_GUARDED in the commit =20 https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=3D= c04a5880299eab3da8c10547db96ea9cdffd44a6 We use range.size, _PAGE_NO_CACHE|_PAGE_GUARDED); This doesn't work anymore. What can we use instead? Thanks in advance, Christian= --Apple-Mail-2C897F81-C964-4F59-BCD7-1703DF9C0C0F Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Hi All,

You removed PAGE_GUARDED in the commit  


We use
range.size, _PAGE_NO_CACHE|_PAGE_GUARDED);

This doesn't work anymore. What can we use instead?

Thanks in advance,

Christian
<= /html>= --Apple-Mail-2C897F81-C964-4F59-BCD7-1703DF9C0C0F-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rCrbp3LVmzDqD8 for ; Mon, 23 May 2016 18:01:54 +1000 (AEST) Message-ID: <1463990507.3078.16.camel@kernel.crashing.org> Subject: Re: PAGE_GUARDED From: Benjamin Herrenschmidt To: Christian Zigotzky , linuxppc-dev@lists.ozlabs.org Cc: darren@stevens-zone.net Date: Mon, 23 May 2016 18:01:47 +1000 In-Reply-To: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, 2016-05-23 at 06:38 +0200, Christian Zigotzky wrote: > Hi All, > > You removed PAGE_GUARDED in the commit   > > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commi > t/?id=c04a5880299eab3da8c10547db96ea9cdffd44a6 > > We use > > range.size, _PAGE_NO_CACHE|_PAGE_GUARDED); > > This doesn't work anymore. What can we use instead? You should just use pgprot_noncached() Cheers, Ben. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mo6-p00-ob.smtp.rzone.de (mo6-p00-ob.smtp.rzone.de [IPv6:2a01:238:20a:202:5300::3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rDXNt6TwQzDqF4 for ; Tue, 24 May 2016 20:54:54 +1000 (AEST) Subject: PAGE_GUARDED To: Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, darren@stevens-zone.net References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> From: Christian Zigotzky Message-ID: Date: Tue, 24 May 2016 12:48:48 +0200 MIME-Version: 1.0 In-Reply-To: <1463990507.3078.16.camel@kernel.crashing.org> Content-Type: text/plain; charset=utf-8; format=flowed List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Ben, Thanks for the hint. I'm sorry I don't know how pgprot_noncached() works. I tried: 1) range.size, pgprot_noncached() 2) range.size, pgprot_val(pgprot_noncached(__pgprot(0)))); 3) range.size, pgprot_val(pgprot_noncached_wc(__pgprot(0)))); Unfortunately without any success. I'd like to modify the following code for the ATi SB600 southbridge chipset: /* Workaround for lack of device tree */ if (primary) { __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, range.size, _PAGE_NO_CACHE|_PAGE_GUARDED); 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); } This workaround works with the kernel 4.6 final. After the commit powerpc-4.7-1, the computer doesn't boot anymore. Last message in the CFE firmware: Booting Linux via __start()... Cheers, Christian On 23 May 2016 at 10:01 AM, Benjamin Herrenschmidt wrote: > On Mon, 2016-05-23 at 06:38 +0200, Christian Zigotzky wrote: >> Hi All, >> >> You removed PAGE_GUARDED in the commit >> >> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commi >> t/?id=c04a5880299eab3da8c10547db96ea9cdffd44a6 >> >> We use >> >> range.size, _PAGE_NO_CACHE|_PAGE_GUARDED); >> >> This doesn't work anymore. What can we use instead? > You should just use pgprot_noncached() > > Cheers, > Ben. > > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rDXtd00YPzDqMb for ; Tue, 24 May 2016 21:17:12 +1000 (AEST) Message-ID: <1464088614.3078.79.camel@kernel.crashing.org> Subject: Re: PAGE_GUARDED From: Benjamin Herrenschmidt To: Christian Zigotzky , linuxppc-dev@lists.ozlabs.org, darren@stevens-zone.net Cc: "Aneesh Kumar K.V" , Michael Ellerman Date: Tue, 24 May 2016 21:16:54 +1000 In-Reply-To: References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tue, 2016-05-24 at 12:48 +0200, Christian Zigotzky wrote: > Ben, > > Thanks for the hint. I'm sorry I don't know how pgprot_noncached() > works. > > I tried: > > 1) range.size, pgprot_noncached() > > 2) range.size, pgprot_val(pgprot_noncached(__pgprot(0)))); Hrm... The above is what is used elsewhere, I'm not sure what's wrong. Aneesh, any idea ? Michael, does it work on our PA-Semi board ? (DO we have that southbridge on it ?) Actually, can you try pgprot_noncached(PAGE_KERNEL) ? If that works, then I wonder what that's going on in pci_64.c ... Cheers, Ben. > 3) range.size, pgprot_val(pgprot_noncached_wc(__pgprot(0)))); > > Unfortunately without any success. > > I'd like to modify the following code for the ATi SB600 southbridge > chipset: > > /* Workaround for lack of device tree */ >                         if (primary) { >                                 __ioremap_at(range.cpu_addr, (void  > *)ISA_IO_BASE, >                                 range.size, > _PAGE_NO_CACHE|_PAGE_GUARDED); >                                 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); >                      } > > This workaround works with the kernel 4.6 final. After the commit  > powerpc-4.7-1, the computer doesn't boot anymore. > > Last message in the CFE firmware: > > Booting Linux via __start()... > > Cheers, > > Christian > > > On 23 May 2016 at 10:01 AM, Benjamin Herrenschmidt wrote: > > > > On Mon, 2016-05-23 at 06:38 +0200, Christian Zigotzky wrote: > > > > > > Hi All, > > > > > > You removed PAGE_GUARDED in the commit > > > > > > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/c > > > ommi > > > t/?id=c04a5880299eab3da8c10547db96ea9cdffd44a6 > > > > > > We use > > > > > > range.size, _PAGE_NO_CACHE|_PAGE_GUARDED); > > > > > > This doesn't work anymore. What can we use instead? > > You should just use pgprot_noncached() > > > > Cheers, > > Ben. > > > > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mo6-p00-ob.smtp.rzone.de (mo6-p00-ob.smtp.rzone.de [IPv6:2a01:238:20a:202:5300::8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rDc8F5TpGzDqHh for ; Tue, 24 May 2016 23:44:12 +1000 (AEST) Subject: PAGE_GUARDED To: Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, darren@stevens-zone.net References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> Cc: "Aneesh Kumar K.V" , Michael Ellerman From: Christian Zigotzky Message-ID: <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> Date: Tue, 24 May 2016 15:37:58 +0200 MIME-Version: 1.0 In-Reply-To: <1464088614.3078.79.camel@kernel.crashing.org> Content-Type: text/plain; charset=utf-8; format=flowed List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Ben, I tried: /* Workaround for lack of device tree */ if (primary) { __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, range.size, pgprot_noncached(PAGE_KERNEL)); 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 I got some error messages: arch/powerpc/kernel/pci-common.c: In function ‘pci_process_bridge_OF_ranges’: arch/powerpc/kernel/pci-common.c:731:32: error: incompatible type for argument 4 of ‘__ioremap_at’ __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, ^ In file included from include/linux/io.h:25:0, from include/linux/pci.h:31, from arch/powerpc/kernel/pci-common.c:20: ./arch/powerpc/include/asm/io.h:746:23: note: expected ‘long unsigned int’ but argument is of type ‘pgprot_t’ extern void __iomem * __ioremap_at(phys_addr_t pa, void *ea, Cheers, Christian On 24 May 2016 at 1:16 PM, Benjamin Herrenschmidt wrote: > Actually, can you try pgprot_noncached(PAGE_KERNEL) ? If that works, > then I wonder what that's going on in pci_64.c ... > > Cheers, > Ben. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e23smtp06.au.ibm.com (e23smtp06.au.ibm.com [202.81.31.148]) (using TLSv1.2 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rDfgf0sgQzDqKM for ; Wed, 25 May 2016 01:38:06 +1000 (AEST) Received: from localhost by e23smtp06.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 25 May 2016 01:38:04 +1000 Received: from d23relay09.au.ibm.com (d23relay09.au.ibm.com [9.185.63.181]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id 8CAD82CE8054 for ; Wed, 25 May 2016 01:38:01 +1000 (EST) Received: from d23av06.au.ibm.com (d23av06.au.ibm.com [9.190.235.151]) by d23relay09.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u4OFbrJ85439964 for ; Wed, 25 May 2016 01:38:01 +1000 Received: from d23av06.au.ibm.com (localhost [127.0.0.1]) by d23av06.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u4OFbTat022695 for ; Wed, 25 May 2016 01:37:29 +1000 From: "Aneesh Kumar K.V" To: Christian Zigotzky , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, darren@stevens-zone.net Cc: Michael Ellerman Subject: Re: PAGE_GUARDED In-Reply-To: <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> Date: Tue, 24 May 2016 21:07:10 +0530 Message-ID: <87d1obqxg9.fsf@skywalker.in.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Christian Zigotzky writes: > Ben, > > I tried: > > /* Workaround for lack of device tree */ > if (primary) { > __ioremap_at(range.cpu_addr, (void=20 > *)ISA_IO_BASE, > range.size, pgprot_noncached(PAGE_KERNEL)= ); > hose->io_base_virt =3D (void *)_IO_BASE; > printk("Initialised io_base_virt 0x%lx _IO_BASE=20 > 0x%llx\n", (unsigned long)hose->io_base_virt, (unsigned long long)_IO_BAS= E); > } > > Unfortunately I got some error messages: > > arch/powerpc/kernel/pci-common.c: In function=20 > =E2=80=98pci_process_bridge_OF_ranges=E2=80=99: > arch/powerpc/kernel/pci-common.c:731:32: error: incompatible type for=20 > argument 4 of =E2=80=98__ioremap_at=E2=80=99 > __ioremap_at(range.cpu_addr, (void=20 > *)ISA_IO_BASE, > ^ > In file included from include/linux/io.h:25:0, > from include/linux/pci.h:31, > from arch/powerpc/kernel/pci-common.c:20: > ./arch/powerpc/include/asm/io.h:746:23: note: expected =E2=80=98long unsi= gned=20 > int=E2=80=99 but argument is of type =E2=80=98pgprot_t=E2=80=99 > extern void __iomem * __ioremap_at(phys_addr_t pa, void *ea, > 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 ) =3D=3D _PAGE_NON_IDEMPOTENT) rflags |=3D (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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mo6-p00-ob.smtp.rzone.de (mo6-p00-ob.smtp.rzone.de [IPv6:2a01:238:20a:202:5300::10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rF3VM5G3nzDqV3 for ; Wed, 25 May 2016 17:16:26 +1000 (AEST) Subject: PAGE_GUARDED To: "Aneesh Kumar K.V" , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, darren@stevens-zone.net References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> Cc: Michael Ellerman From: Christian Zigotzky Message-ID: Date: Wed, 25 May 2016 08:58:03 +0200 MIME-Version: 1.0 In-Reply-To: <87d1obqxg9.fsf@skywalker.in.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 > > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mo6-p00-ob.smtp.rzone.de (mo6-p00-ob.smtp.rzone.de [IPv6:2a01:238:20a:202:5300::5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rF9bC3x00zDqVp for ; Wed, 25 May 2016 21:51:02 +1000 (AEST) Subject: PAGE_GUARDED To: "Aneesh Kumar K.V" , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, darren@stevens-zone.net References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> Cc: Michael Ellerman From: Christian Zigotzky Message-ID: <79a087a4-24ed-3823-87f5-28df695d3d8a@xenosoft.de> Date: Wed, 25 May 2016 13:44:54 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Aneesh, I understand what you mean. I tried range.size, pgprot_val(pgprot_noncached(__pgprot(0)))); a few days ago. It compiled but the kernel doesn't boot. Cheers, Christian On 25 May 2016 at 08:58 AM, Christian Zigotzky wrote: > 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 >> >> > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mo6-p00-ob.smtp.rzone.de (mo6-p00-ob.smtp.rzone.de [IPv6:2a01:238:20a:202:5300::8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rMCDX5sLwzDq80 for ; Sat, 4 Jun 2016 17:25:48 +1000 (AEST) Subject: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE To: "Aneesh Kumar K.V" , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, darren@stevens-zone.net, Michael Ellerman , Julian Margetson , Adrian Cox References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> From: Christian Zigotzky Message-ID: <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> Date: Sat, 4 Jun 2016 09:19:36 +0200 MIME-Version: 1.0 In-Reply-To: <87d1obqxg9.fsf@skywalker.in.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi All, The commit powerpc-4.7-2 [2] was released yesterday. There is a conflict in my local kernel git directory if I use git pull because I have reverted the commit powerpc-4.7-1. [1] The commit powerpc-4.7-2 [2] needs the commit powerpc-4.7-1. [1] I created a new local kernel git directory for the RC2 with: git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux-git-without-powerpc-commits After that I reverted the two commits: powerpc-4.7-2 [2]: git revert 5306d766f15e72bc79c61d88f77e5a6b1fcc0e68 -m 1 powerpc-4.7-1 [1]: git revert c04a5880299eab3da8c10547db96ea9cdffd44a6 -m 1 Afterwards I successfully tested our latest Nemo patch 4.7-1 [3] with the following commands: cp -R linux-git-without-powerpc-commits linux-4.7 patch -p0 < nemo_4.7-1.patch I tried to solve the boot issue last week. I modified the code a lot and I replaced some files. Unfortunately without any success. The RC1 without the commit powerpc-4.7-1 [1] boots and works fantastic. I don't have any ideas anymore. Please help me to solve the boot problems. Thanks in advance, Christian [1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c04a5880299eab3da8c10547db96ea9cdffd44a6 [2] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=5306d766f15e72bc79c61d88f77e5a6b1fcc0e68 [3] http://www.xenosoft.de/nemo_4.7-1.patch On 28 May 2016 at 8:51 PM, Darren Stevens wrote: > Hello Adrian > > On 28/05/2016, Adrian Cox wrote: >>> From: Christian Zigotzky [mailto:chzigotzky@xenosoft.de] >>> Sent: 28 May 2016 07:06 >>> Adrian, what is the expected WIMG bit mapping for the Nemo board? >>> >> I'm not able to help much here, I'm afraid. I don't have a Nemo board at >> the moment, and it's been a few years. From memory all the peripherals >> required standard uncached and guarded mappings on Nemo. > Before everybody gets too involved, from what I've seen with my tests today > the kernel is crashing long before it gets to the pci-common code. > > I've attached 2 boot logs, one from a 4.4 kernel I've been working on, and > from a build of the latest git. > > You can see from this that the 4.7 kernel hangs right after the booting linux > via __start(), whereas in the 4.4 there's about 29 lines of output before it > gets to the Initialised io_base_virt printk in our patch. > > The last time we had a hang this early in the boot it turned out to be a > problem in head_64.S, I think there is something else wrong in the commit > Christian has identified > > I will see if this is something I can fix, but it may need better low level > knowledge of PPC hardware than I have. > > Regards > Darren On 28 May 2016 at 6:53 PM, Adrian Cox wrote: >> From: Christian Zigotzky [mailto:chzigotzky@xenosoft.de] >> Sent: 28 May 2016 07:06 >> Adrian, what is the expected WIMG bit mapping for the Nemo board? >> > I'm not able to help much here, I'm afraid. I don't have a Nemo board at the moment, and it's been a few years. From memory all the peripherals required standard uncached and guarded mappings on Nemo. > > The difficult bit that usually breaks on kernel upgrades is not the WIMG settings, but the PCI probing routine. The SB600 doesn't follow normal PCIe address decoding rules, as in its original use as an AMD south bridge it was designed to appear as if it were integrated into the north bridge. > > -- > Adrian > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mo6-p00-ob.smtp.rzone.de (mo6-p00-ob.smtp.rzone.de [IPv6:2a01:238:20a:202:5300::10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rMCZG0w8zzDq8G for ; Sat, 4 Jun 2016 17:41:09 +1000 (AEST) Subject: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE To: "Aneesh Kumar K.V" , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, darren@stevens-zone.net, Michael Ellerman , Julian Margetson , Adrian Cox References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> From: Christian Zigotzky Message-ID: <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> Date: Sat, 4 Jun 2016 09:40:54 +0200 MIME-Version: 1.0 In-Reply-To: <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> Content-Type: text/plain; charset=utf-8; format=flowed List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Aneesh, Could you please send me only your patch for the Power ISA 3.0 (Power9) Radix Tree MMU? You have done the most modifications for the kernel 4.7. If the kernel boots with your modifications then I have to look to the other few modifications. Thanks in advance, Christian On 04 June 2016 at 09:19 AM, Christian Zigotzky wrote: > Hi All, > > The commit powerpc-4.7-2 [2] was released yesterday. > > There is a conflict in my local kernel git directory if I use git pull > because I have reverted the commit powerpc-4.7-1. [1] > > The commit powerpc-4.7-2 [2] needs the commit powerpc-4.7-1. [1] > > I created a new local kernel git directory for the RC2 with: > > git clone > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > linux-git-without-powerpc-commits > > After that I reverted the two commits: > > powerpc-4.7-2 [2]: > > git revert 5306d766f15e72bc79c61d88f77e5a6b1fcc0e68 -m 1 > > powerpc-4.7-1 [1]: > > git revert c04a5880299eab3da8c10547db96ea9cdffd44a6 -m 1 > > Afterwards I successfully tested our latest Nemo patch 4.7-1 [3] with > the following commands: > > cp -R linux-git-without-powerpc-commits linux-4.7 > > patch -p0 < nemo_4.7-1.patch > > I tried to solve the boot issue last week. I modified the code a lot > and I replaced some files. Unfortunately without any success. The RC1 > without the commit powerpc-4.7-1 [1] boots and works fantastic. I > don't have any ideas anymore. Please help me to solve the boot problems. > > Thanks in advance, > > Christian > > [1] > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c04a5880299eab3da8c10547db96ea9cdffd44a6 > [2] > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=5306d766f15e72bc79c61d88f77e5a6b1fcc0e68 > [3] http://www.xenosoft.de/nemo_4.7-1.patch > > On 28 May 2016 at 8:51 PM, Darren Stevens wrote: >> Hello Adrian >> >> On 28/05/2016, Adrian Cox wrote: >>>> From: Christian Zigotzky [mailto:chzigotzky@xenosoft.de] >>>> Sent: 28 May 2016 07:06 >>>> Adrian, what is the expected WIMG bit mapping for the Nemo board? >>>> >>> I'm not able to help much here, I'm afraid. I don't have a Nemo >>> board at >>> the moment, and it's been a few years. From memory all the peripherals >>> required standard uncached and guarded mappings on Nemo. >> Before everybody gets too involved, from what I've seen with my tests >> today >> the kernel is crashing long before it gets to the pci-common code. >> >> I've attached 2 boot logs, one from a 4.4 kernel I've been working >> on, and >> from a build of the latest git. >> >> You can see from this that the 4.7 kernel hangs right after the >> booting linux >> via __start(), whereas in the 4.4 there's about 29 lines of output >> before it >> gets to the Initialised io_base_virt printk in our patch. >> >> The last time we had a hang this early in the boot it turned out to be a >> problem in head_64.S, I think there is something else wrong in the >> commit >> Christian has identified >> >> I will see if this is something I can fix, but it may need better low >> level >> knowledge of PPC hardware than I have. >> >> Regards >> Darren > > On 28 May 2016 at 6:53 PM, Adrian Cox wrote: >>> From: Christian Zigotzky [mailto:chzigotzky@xenosoft.de] >>> Sent: 28 May 2016 07:06 >>> Adrian, what is the expected WIMG bit mapping for the Nemo board? >>> >> I'm not able to help much here, I'm afraid. I don't have a Nemo board >> at the moment, and it's been a few years. From memory all the >> peripherals required standard uncached and guarded mappings on Nemo. >> >> The difficult bit that usually breaks on kernel upgrades is not the >> WIMG settings, but the PCI probing routine. The SB600 doesn't follow >> normal PCIe address decoding rules, as in its original use as an AMD >> south bridge it was designed to appear as if it were integrated into >> the north bridge. >> >> -- >> Adrian >> > > > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mo6-p00-ob.smtp.rzone.de (mo6-p00-ob.smtp.rzone.de [IPv6:2a01:238:20a:202:5300::8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rMJ9j4J41zDq80 for ; Sat, 4 Jun 2016 21:08:38 +1000 (AEST) Subject: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE To: "Aneesh Kumar K.V" , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, darren@stevens-zone.net, Michael Ellerman , Julian Margetson , Adrian Cox , "R.T.Dickinson" , "R.T.Dickinson" , Pat Wall , Pat Wall , "contact@a-eon.com" , Matthew Leaman , luigi burdo , Christian Zigotzky References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> From: Christian Zigotzky Message-ID: Date: Sat, 4 Jun 2016 13:08:22 +0200 MIME-Version: 1.0 In-Reply-To: <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> Content-Type: text/plain; charset=utf-8; format=flowed List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi All, I compiled the latest git version of kernel 4.7 with all PowerPC commits. Maybe the latest commit powerpc-4.7-2 solved the boot issues. Our latest Nemo patch 4.7-1 works without any problems with the latest git version. I got the following error message: arch/powerpc/kernel/pci-common.c: In function ‘pci_process_bridge_OF_ranges’: arch/powerpc/kernel/pci-common.c:732:59: error: ‘_PAGE_GUARDED’ undeclared (first use in this function) range.size, _PAGE_NO_CACHE|_PAGE_GUARDED); ^ arch/powerpc/kernel/pci-common.c:732:59: note: each undeclared identifier is reported only once for each function it appears in make[1]: *** [arch/powerpc/kernel/pci-common.o] Error 1 make: *** [arch/powerpc/kernel] Error 2 I replaced __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, range.size, _PAGE_NO_CACHE|_PAGE_GUARDED); with __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, range.size, pgprot_val(pgprot_noncached(__pgprot(0)))); After that it compiled. Unfortunately it doesn't boot. :-( Which files are responsible for the early boot phase in the commit powerpc-4.7-1? Perhaps the problem is there. Cheers, Christian On 04 June 2016 at 09:40 AM, Christian Zigotzky wrote: > Aneesh, > > Could you please send me only your patch for the Power ISA 3.0 > (Power9) Radix Tree MMU? You have done the most modifications for the > kernel 4.7. If the kernel boots with your modifications then I have to > look to the other few modifications. > > Thanks in advance, > > Christian > > On 04 June 2016 at 09:19 AM, Christian Zigotzky wrote: >> Hi All, >> >> The commit powerpc-4.7-2 [2] was released yesterday. >> >> There is a conflict in my local kernel git directory if I use git >> pull because I have reverted the commit powerpc-4.7-1. [1] >> >> The commit powerpc-4.7-2 [2] needs the commit powerpc-4.7-1. [1] >> >> I created a new local kernel git directory for the RC2 with: >> >> git clone >> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git >> linux-git-without-powerpc-commits >> >> After that I reverted the two commits: >> >> powerpc-4.7-2 [2]: >> >> git revert 5306d766f15e72bc79c61d88f77e5a6b1fcc0e68 -m 1 >> >> powerpc-4.7-1 [1]: >> >> git revert c04a5880299eab3da8c10547db96ea9cdffd44a6 -m 1 >> >> Afterwards I successfully tested our latest Nemo patch 4.7-1 [3] with >> the following commands: >> >> cp -R linux-git-without-powerpc-commits linux-4.7 >> >> patch -p0 < nemo_4.7-1.patch >> >> I tried to solve the boot issue last week. I modified the code a lot >> and I replaced some files. Unfortunately without any success. The RC1 >> without the commit powerpc-4.7-1 [1] boots and works fantastic. I >> don't have any ideas anymore. Please help me to solve the boot problems. >> >> Thanks in advance, >> >> Christian >> >> [1] >> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c04a5880299eab3da8c10547db96ea9cdffd44a6 >> [2] >> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=5306d766f15e72bc79c61d88f77e5a6b1fcc0e68 >> [3] http://www.xenosoft.de/nemo_4.7-1.patch >> >> On 28 May 2016 at 8:51 PM, Darren Stevens wrote: >>> Hello Adrian >>> >>> On 28/05/2016, Adrian Cox wrote: >>>>> From: Christian Zigotzky [mailto:chzigotzky@xenosoft.de] >>>>> Sent: 28 May 2016 07:06 >>>>> Adrian, what is the expected WIMG bit mapping for the Nemo board? >>>>> >>>> I'm not able to help much here, I'm afraid. I don't have a Nemo >>>> board at >>>> the moment, and it's been a few years. From memory all the peripherals >>>> required standard uncached and guarded mappings on Nemo. >>> Before everybody gets too involved, from what I've seen with my >>> tests today >>> the kernel is crashing long before it gets to the pci-common code. >>> >>> I've attached 2 boot logs, one from a 4.4 kernel I've been working >>> on, and >>> from a build of the latest git. >>> >>> You can see from this that the 4.7 kernel hangs right after the >>> booting linux >>> via __start(), whereas in the 4.4 there's about 29 lines of output >>> before it >>> gets to the Initialised io_base_virt printk in our patch. >>> >>> The last time we had a hang this early in the boot it turned out to >>> be a >>> problem in head_64.S, I think there is something else wrong in the >>> commit >>> Christian has identified >>> >>> I will see if this is something I can fix, but it may need better >>> low level >>> knowledge of PPC hardware than I have. >>> >>> Regards >>> Darren >> >> On 28 May 2016 at 6:53 PM, Adrian Cox wrote: >>>> From: Christian Zigotzky [mailto:chzigotzky@xenosoft.de] >>>> Sent: 28 May 2016 07:06 >>>> Adrian, what is the expected WIMG bit mapping for the Nemo board? >>>> >>> I'm not able to help much here, I'm afraid. I don't have a Nemo >>> board at the moment, and it's been a few years. From memory all the >>> peripherals required standard uncached and guarded mappings on Nemo. >>> >>> The difficult bit that usually breaks on kernel upgrades is not the >>> WIMG settings, but the PCI probing routine. The SB600 doesn't >>> follow normal PCIe address decoding rules, as in its original use as >>> an AMD south bridge it was designed to appear as if it were >>> integrated into the north bridge. >>> >>> -- >>> Adrian >>> >> >> >> > > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e37.co.us.ibm.com (e37.co.us.ibm.com [32.97.110.158]) (using TLSv1.2 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rMNwJ0GwkzDq80 for ; Sun, 5 Jun 2016 00:42:23 +1000 (AEST) Received: from localhost by e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sat, 4 Jun 2016 08:42:21 -0600 From: "Aneesh Kumar K.V" To: Christian Zigotzky , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, darren@stevens-zone.net, Michael Ellerman , Julian Margetson , Adrian Cox Subject: Re: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE In-Reply-To: <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> Date: Sat, 04 Jun 2016 20:12:15 +0530 Message-ID: <874m99uibc.fsf@skywalker.in.ibm.com> MIME-Version: 1.0 Content-Type: text/plain List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Christian Zigotzky writes: > Aneesh, > > Could you please send me only your patch for the Power ISA 3.0 (Power9) > Radix Tree MMU? You have done the most modifications for the kernel 4.7. > If the kernel boots with your modifications then I have to look to the > other few modifications. > > Thanks in advance, > Are you looking for changes too kernel that will add ISA 3.0 MMU model without making changes to other part of kernel ?. I don't think we ever had a kernel patch which did the ISA 3.0 work like that. In order to add the new ISA support we did have to make changes to other part of the kernel. To debug your boot issue, I still haven't understood why the suggested changes are not working. Because for a non cache guarded page the mapping didn't change at all. Hence I was asking for what the expected WIMG values are for your board. One other option is to bisect test the kernel and if you can isolate which patch is breaking the boot, we can possibly understand it better. ie, instead of reverting the entire merge, try a git bisect. -aneesh From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.150]) (using TLSv1.2 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rMP196dtXzDq80 for ; Sun, 5 Jun 2016 00:46:37 +1000 (AEST) Received: from localhost by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sat, 4 Jun 2016 08:46:35 -0600 From: "Aneesh Kumar K.V" To: Christian Zigotzky , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, darren@stevens-zone.net, Michael Ellerman , Julian Margetson , Adrian Cox , "R.T.Dickinson" , "R.T.Dickinson" , Pat Wall , Pat Wall , "contact@a-eon.com" , Matthew Leaman , luigi burdo , Christian Zigotzky Subject: Re: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE In-Reply-To: References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> Date: Sat, 04 Jun 2016 20:16:23 +0530 Message-ID: <871t4dui4g.fsf@skywalker.in.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Christian Zigotzky writes: > Hi All, > > I compiled the latest git version of kernel 4.7 with all PowerPC=20 > commits. Maybe the latest commit powerpc-4.7-2 solved the boot issues.=20 > Our latest Nemo patch 4.7-1 works without any problems with the latest=20 > git version. instead of using powerpc-4.7-2 can you use the upstream SHA1 commit id ?. I am not sure how to map 4.7-2 to a kernel version. > > I got the following error message: > > arch/powerpc/kernel/pci-common.c: In function=20 > =E2=80=98pci_process_bridge_OF_ranges=E2=80=99: > arch/powerpc/kernel/pci-common.c:732:59: error: =E2=80=98_PAGE_GUARDED=E2= =80=99=20 > undeclared (first use in this function) > range.size, _PAGE_NO_CACHE|_PAGE_GUARDED= ); > ^ > arch/powerpc/kernel/pci-common.c:732:59: note: each undeclared=20 > identifier is reported only once for each function it appears in > make[1]: *** [arch/powerpc/kernel/pci-common.o] Error 1 > make: *** [arch/powerpc/kernel] Error 2 Which kernel is that ? For upstream I have at that line 729 hose->pci_io_size =3D range.pci_addr + range.s= ize; 730 hose->io_base_phys =3D range.cpu_addr - range.= pci_addr; 731=20 732 /* Build resource */ 733 res =3D &hose->io_resource; 734 range.cpu_addr =3D range.pci_addr; 735 break; 736 case IORESOURCE_MEM: -aneesh From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mo6-p00-ob.smtp.rzone.de (mo6-p00-ob.smtp.rzone.de [IPv6:2a01:238:20a:202:5300::3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rMPbk6pH8zDq8B for ; Sun, 5 Jun 2016 01:13:06 +1000 (AEST) Subject: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE To: "Aneesh Kumar K.V" , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, darren@stevens-zone.net, Michael Ellerman , Julian Margetson , Adrian Cox References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> <874m99uibc.fsf@skywalker.in.ibm.com> From: Christian Zigotzky Message-ID: Date: Sat, 4 Jun 2016 17:07:02 +0200 MIME-Version: 1.0 In-Reply-To: <874m99uibc.fsf@skywalker.in.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Aneesh, Shall I bisect the kernel from the powerpc git? git clone https://kernel.googlesource.com/pub/scm/linux/kernel/git/powerpc/linux https://git.kernel.org/cgit/linux/kernel/git/powerpc/linux.git/log/ Shall I start with the following commit? https://git.kernel.org/cgit/linux/kernel/git/powerpc/linux.git/commit/?id=8ffb4103f5e28d7e7890ed4774d8e009f253f56e Thanks, Christian On 04 June 2016 at 4:42 PM, Aneesh Kumar K.V wrote: > > Are you looking for changes too kernel that will add ISA 3.0 MMU model > without making changes to other part of kernel ?. I don't think we ever > had a kernel patch which did the ISA 3.0 work like that. In order to add > the new ISA support we did have to make changes to other part of the > kernel. > > To debug your boot issue, I still haven't understood why the suggested > changes are not working. Because for a non cache guarded page the > mapping didn't change at all. Hence I was asking for what the expected > WIMG values are for your board. > > One other option is to bisect test the kernel and if you can isolate > which patch is breaking the boot, we can possibly understand it better. > ie, instead of reverting the entire merge, try a git bisect. > > -aneesh > > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mo6-p00-ob.smtp.rzone.de (mo6-p00-ob.smtp.rzone.de [IPv6:2a01:238:20a:202:5300::11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rMPct11q0zDqHF for ; Sun, 5 Jun 2016 01:14:05 +1000 (AEST) Subject: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE To: "Aneesh Kumar K.V" , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, darren@stevens-zone.net, Michael Ellerman , Julian Margetson , Adrian Cox References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> <871t4dui4g.fsf@skywalker.in.ibm.com> From: Christian Zigotzky Message-ID: <2bf8f412-2631-75b4-70a3-cb5ecee5cf48@xenosoft.de> Date: Sat, 4 Jun 2016 17:13:53 +0200 MIME-Version: 1.0 In-Reply-To: <871t4dui4g.fsf@skywalker.in.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Aneesh, It's from the Nemo patch. I patch the kernel 4.7 with our Nemo patch. [1] Cheers, Christian [1] http://www.xenosoft.de/nemo_4.7-1.patch On 04 June 2016 at 4:46 PM, Aneesh Kumar K.V wrote: > > Which kernel is that ? For upstream I have at that line > > 729 hose->pci_io_size = range.pci_addr + range.size; > 730 hose->io_base_phys = range.cpu_addr - range.pci_addr; > 731 > 732 /* Build resource */ > 733 res = &hose->io_resource; > 734 range.cpu_addr = range.pci_addr; > 735 break; > 736 case IORESOURCE_MEM: > > > -aneesh > > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mo6-p00-ob.smtp.rzone.de (mo6-p00-ob.smtp.rzone.de [IPv6:2a01:238:20a:202:5300::5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rMQ0w6GdczDq8G for ; Sun, 5 Jun 2016 01:31:28 +1000 (AEST) From: Christian Zigotzky Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE Message-Id: <2FB13B5B-42F0-4396-AD29-70924D2710CC@xenosoft.de> Date: Sat, 4 Jun 2016 17:25:07 +0200 References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> <871t4dui4g.fsf@skywalker.in.ibm.com> <2bf8f412-2631-75b4-70a3-cb5ecee5cf48@xenosoft.de> In-Reply-To: <2bf8f412-2631-75b4-70a3-cb5ecee5cf48@xenosoft.de> To: "Aneesh Kumar K.V" , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, darren@stevens-zone.net, Michael Ellerman , Julian Margetson , Adrian Cox , rtd@a-eon.com, rtd2@xtra.co.nz, pjwall@mac.com, pjwall@me.com, matthew@a-eon.biz, intermediadc@hotmail.com, contact@a-eon.com, info@xenosoft.de List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Which files are responsible for the early boot phase in the commit powerpc-4= .7-1? Perhaps the problem is there. - Christian Sent from my iPhone > On 04 Jun 2016, at 17:13, Christian Zigotzky wrot= e: >=20 > Aneesh, >=20 > It's from the Nemo patch. I patch the kernel 4.7 with our Nemo patch. [1] >=20 > Cheers, >=20 > Christian >=20 > [1] http://www.xenosoft.de/nemo_4.7-1.patch >=20 >> On 04 June 2016 at 4:46 PM, Aneesh Kumar K.V wrote: >>=20 >> Which kernel is that ? For upstream I have at that line >>=20 >> 729 hose->pci_io_size =3D range.pci_addr + range= .size; >> 730 hose->io_base_phys =3D range.cpu_addr - rang= e.pci_addr; >> 731 >> 732 /* Build resource */ >> 733 res =3D &hose->io_resource; >> 734 range.cpu_addr =3D range.pci_addr; >> 735 break; >> 736 case IORESOURCE_MEM: >>=20 >>=20 >> -aneesh >=20 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mo6-p00-ob.smtp.rzone.de (mo6-p00-ob.smtp.rzone.de [IPv6:2a01:238:20a:202:5300::8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rN2pM2ZFtzDq7v for ; Mon, 6 Jun 2016 02:09:28 +1000 (AEST) Subject: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE To: "Aneesh Kumar K.V" , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, darren@stevens-zone.net, Michael Ellerman , Julian Margetson , Adrian Cox , rtd@a-eon.com, rtd2@xtra.co.nz, pjwall@mac.com, pjwall@me.com, matthew@a-eon.biz, intermediadc@hotmail.com, contact@a-eon.com, info@xenosoft.de References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> <871t4dui4g.fsf@skywalker.in.ibm.com> <2bf8f412-2631-75b4-70a3-cb5ecee5cf48@xenosoft.de> <2FB13B5B-42F0-4396-AD29-70924D2710CC@xenosoft.de> From: Christian Zigotzky Message-ID: <053dd416-a9ab-5b06-5c3b-1acefb53fd3b@xenosoft.de> Date: Sun, 5 Jun 2016 18:09:05 +0200 MIME-Version: 1.0 In-Reply-To: <2FB13B5B-42F0-4396-AD29-70924D2710CC@xenosoft.de> Content-Type: text/plain; charset=windows-1252; format=flowed List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , All, I need an answer because I think Darren's guess is correct. It isn't a problem in the pci code. I replaced the file head_64.S that Darren mentioned with the one from the kernel 4.6 and it compiled but unfortunately it doesn't boot. We know "head_64.S" is one file for the early boot phase but I think there are some other files. I am not a fan of reverting the PowerPC commits but there are some other new things in the new kernel e.g. DRM 2.45.0 which are very interesting for the Nemo board. @Julian What about the issues with the Sam460ex? Have you solved the problem with the commit powerpc-4.7-1? Cheers, Christian On 04 June 2016 at 5:25 PM, Christian Zigotzky wrote: > Which files are responsible for the early boot phase in the commit powerpc-4.7-1? Perhaps the problem is there. > > - Christian > > Sent from my iPhone > On 28 May 2016 at 8:51 PM, Darren Stevens wrote: > Hello Adrian > > On 28/05/2016, Adrian Cox wrote: >>> From: Christian Zigotzky [mailto:chzigotzky@xenosoft.de] >>> Sent: 28 May 2016 07:06 >>> Adrian, what is the expected WIMG bit mapping for the Nemo board? >>> >> I'm not able to help much here, I'm afraid. I don't have a Nemo board at >> the moment, and it's been a few years. From memory all the peripherals >> required standard uncached and guarded mappings on Nemo. > Before everybody gets too involved, from what I've seen with my tests today > the kernel is crashing long before it gets to the pci-common code. > > I've attached 2 boot logs, one from a 4.4 kernel I've been working on, and > from a build of the latest git. > > You can see from this that the 4.7 kernel hangs right after the booting linux > via __start(), whereas in the 4.4 there's about 29 lines of output before it > gets to the Initialised io_base_virt printk in our patch. > > The last time we had a hang this early in the boot it turned out to be a > problem in head_64.S, I think there is something else wrong in the commit > Christian has identified > > I will see if this is something I can fix, but it may need better low level > knowledge of PPC hardware than I have. > > Regards > Darren From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rNGNw6zJ0zDqFF for ; Mon, 6 Jun 2016 10:51:44 +1000 (AEST) Message-ID: <1465174304.12265.0.camel@ellerman.id.au> Subject: Re: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE From: Michael Ellerman To: Christian Zigotzky , "Aneesh Kumar K.V" , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, darren@stevens-zone.net, Michael Ellerman , Julian Margetson , Adrian Cox Date: Mon, 06 Jun 2016 10:51:44 +1000 In-Reply-To: References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> <874m99uibc.fsf@skywalker.in.ibm.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Sat, 2016-06-04 at 17:07 +0200, Christian Zigotzky wrote: > Aneesh, > > Shall I bisect the kernel from the powerpc git? No just use linus' tree. > Shall I start with the following commit? > > https://git.kernel.org/cgit/linux/kernel/git/powerpc/linux.git/commit/?id=8ffb4103f5e28d7e7890ed4774d8e009f253f56e Yeah that would be a good one to start with. Then mark rc1 as bad and bisect should do the rest. cheers From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rNGSK0KDGzDqFF for ; Mon, 6 Jun 2016 10:54:41 +1000 (AEST) Message-ID: <1465174480.12265.2.camel@ellerman.id.au> Subject: Re: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE From: Michael Ellerman To: "Aneesh Kumar K.V" , Christian Zigotzky , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, darren@stevens-zone.net, Michael Ellerman , Julian Margetson , Adrian Cox , "R.T.Dickinson" , "R.T.Dickinson" , Pat Wall , Pat Wall , "contact@a-eon.com" , Matthew Leaman , luigi burdo , Christian Zigotzky Date: Mon, 06 Jun 2016 10:54:40 +1000 In-Reply-To: <871t4dui4g.fsf@skywalker.in.ibm.com> References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> <871t4dui4g.fsf@skywalker.in.ibm.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Sat, 2016-06-04 at 20:16 +0530, Aneesh Kumar K.V wrote: > Christian Zigotzky writes: > > > Hi All, > > > > I compiled the latest git version of kernel 4.7 with all PowerPC > > commits. Maybe the latest commit powerpc-4.7-2 solved the boot issues. > > Our latest Nemo patch 4.7-1 works without any problems with the latest > > git version. > > > instead of using powerpc-4.7-2 can you use the upstream SHA1 commit id > ?. I am not sure how to map 4.7-2 to a kernel version. That's my tag: https://git.kernel.org/cgit/linux/kernel/git/powerpc/linux.git/tag/?h=powerpc-4.7-2 > > I got the following error message: > > > > arch/powerpc/kernel/pci-common.c: In function > > ‘pci_process_bridge_OF_ranges’: > > arch/powerpc/kernel/pci-common.c:732:59: error: ‘_PAGE_GUARDED’ > > undeclared (first use in this function) > > range.size, _PAGE_NO_CACHE|_PAGE_GUARDED); > > ^ > > arch/powerpc/kernel/pci-common.c:732:59: note: each undeclared > > identifier is reported only once for each function it appears in > > make[1]: *** [arch/powerpc/kernel/pci-common.o] Error 1 > > make: *** [arch/powerpc/kernel] Error 2 > > Which kernel is that ? For upstream I have at that line > > 729 hose->pci_io_size = range.pci_addr + range.size; > 730 hose->io_base_phys = range.cpu_addr - range.pci_addr; > 731 > 732 /* Build resource */ > 733 res = &hose->io_resource; > 734 range.cpu_addr = range.pci_addr; > 735 break; > 736 case IORESOURCE_MEM: Christian is running an out-of-tree patch for the nemo board. He did post it to the list at some point. cheers From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ozlabs.org (ozlabs.org [103.22.144.67]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rNGX73XGMzDq5g for ; Mon, 6 Jun 2016 10:57:59 +1000 (AEST) Message-ID: <1465174679.12265.4.camel@ellerman.id.au> Subject: Re: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE From: Michael Ellerman To: Christian Zigotzky , "Aneesh Kumar K.V" , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, darren@stevens-zone.net, Michael Ellerman , Julian Margetson , Adrian Cox , rtd@a-eon.com, rtd2@xtra.co.nz, pjwall@mac.com, pjwall@me.com, matthew@a-eon.biz, intermediadc@hotmail.com, contact@a-eon.com, info@xenosoft.de Date: Mon, 06 Jun 2016 10:57:59 +1000 In-Reply-To: <053dd416-a9ab-5b06-5c3b-1acefb53fd3b@xenosoft.de> References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> <871t4dui4g.fsf@skywalker.in.ibm.com> <2bf8f412-2631-75b4-70a3-cb5ecee5cf48@xenosoft.de> <2FB13B5B-42F0-4396-AD29-70924D2710CC@xenosoft.de> <053dd416-a9ab-5b06-5c3b-1acefb53fd3b@xenosoft.de> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Sun, 2016-06-05 at 18:09 +0200, Christian Zigotzky wrote: > All, > > I need an answer because I think Darren's guess is correct. It isn't a > problem in the pci code. I replaced the file head_64.S that Darren > mentioned with the one from the kernel 4.6 and it compiled but > unfortunately it doesn't boot. We know "head_64.S" is one file for the > early boot phase but I think there are some other files. There's lots of files used in the early boot, you can't revert individual files and expect it to work. > On 28 May 2016 at 8:51 PM, Darren Stevens wrote: > > You can see from this that the 4.7 kernel hangs right after the booting linux > > via __start(), whereas in the 4.4 there's about 29 lines of output before it > > gets to the Initialised io_base_virt printk in our patch. If the last thing you see is "booting linux via __start()" that means the kernel crashed early, before it could detect and initialise the console. Do you have a serial or other console in that machine at a known location? If so you can hard-code the kernel to use that console, which means you can get messages earlier in boot. See udbg_early_init() for starters. cheers From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp618.redcondor.net (smtp618.redcondor.net [208.80.206.18]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rNH7K2zkVzDq60 for ; Mon, 6 Jun 2016 11:25:00 +1000 (AEST) Subject: Re: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE To: Michael Ellerman , Christian Zigotzky , "Aneesh Kumar K.V" , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, darren@stevens-zone.net, Michael Ellerman , Adrian Cox , rtd@a-eon.com, rtd2@xtra.co.nz, pjwall@mac.com, pjwall@me.com, matthew@a-eon.biz, intermediadc@hotmail.com, contact@a-eon.com, info@xenosoft.de References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> <871t4dui4g.fsf@skywalker.in.ibm.com> <2bf8f412-2631-75b4-70a3-cb5ecee5cf48@xenosoft.de> <2FB13B5B-42F0-4396-AD29-70924D2710CC@xenosoft.de> <053dd416-a9ab-5b06-5c3b-1acefb53fd3b@xenosoft.de> <1465174679.12265.4.camel@ellerman.id.au> From: Julian Margetson Message-ID: <5fb9d8e9-d456-0537-ef77-82658e4538cd@candw.ms> Date: Sun, 5 Jun 2016 21:23:49 -0400 MIME-Version: 1.0 In-Reply-To: <1465174679.12265.4.camel@ellerman.id.au> Content-Type: text/plain; charset=utf-8; format=flowed List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 6/5/2016 8:57 PM, Michael Ellerman wrote: > On Sun, 2016-06-05 at 18:09 +0200, Christian Zigotzky wrote: > >> All, >> >> I need an answer because I think Darren's guess is correct. It isn't a >> problem in the pci code. I replaced the file head_64.S that Darren >> mentioned with the one from the kernel 4.6 and it compiled but >> unfortunately it doesn't boot. We know "head_64.S" is one file for the >> early boot phase but I think there are some other files. > There's lots of files used in the early boot, you can't revert individual files > and expect it to work. > >> On 28 May 2016 at 8:51 PM, Darren Stevens wrote: >>> You can see from this that the 4.7 kernel hangs right after the booting linux >>> via __start(), whereas in the 4.4 there's about 29 lines of output before it >>> gets to the Initialised io_base_virt printk in our patch. > If the last thing you see is "booting linux via __start()" that means the kernel > crashed early, before it could detect and initialise the console. > > Do you have a serial or other console in that machine at a known location? If so > you can hard-code the kernel to use that console, which means you can get > messages earlier in boot. See udbg_early_init() for starters. > > cheers > > > > Julian Margetson writes: > >> Hi Christian, >> >> I am also having a problem with _PAGE_NO_CACHE on Sam460ex. >> >> Regards >> Julian >> >> drivers/gpu/drm/drm_vm.c: In function ‘drm_dma_prot’: >> drivers/gpu/drm/drm_vm.c:83:6: error: invalid operands to binary | >> (have ‘pgprot_t {aka struct }’ and ‘int’) >> tmp |= _PAGE_NO_CACHE; >> ^ >> scripts/Makefile.build:289: recipe for target >> 'drivers/gpu/drm/drm_vm.o' failed >> make[3]: *** [drivers/gpu/drm/drm_vm.o] Error 1 >> scripts/Makefile.build:440: recipe for target 'drivers/gpu/drm' failed >> make[2]: *** [drivers/gpu/drm] Error 2 >> scripts/Makefile.build:440: recipe for target 'drivers/gpu' failed >> make[1]: *** [drivers/gpu] Error 2 >> Makefile:985: recipe for target 'drivers' failed >> make: *** [drivers] Error 2 >> >> > That is because that usage is wrong based on type. _PAGE_NO_CACHE is not > of type pgprot_t. What you really need there is > > tmp = __pgprot(pgprot_val(tmp) | _PAGE_NO_CACHE); > > or a better option would be > > tmp = pgprot_noncached_wc(tmp); > > -aneesh > > @Julian > > What about the issues with the Sam460ex? Have you solved the problem > with the commit powerpc-4.7-1? > > Cheers, > > Christian > > On 04 June 2016 at 5:25 PM, Christian Zigotzky wrote: > tmp = pgprot_noncached_wc(tmp); compiles but I then run in to the following CC drivers/gpu/drm/drm_scatter.o drivers/gpu/drm/drm_scatter.c: In function ‘drm_vmalloc_dma’: drivers/gpu/drm/drm_scatter.c:44:49: error: invalid operands to binary | (have ‘pgprot_t {aka struct }’ and ‘int’) return __vmalloc(size, GFP_KERNEL, PAGE_KERNEL | _PAGE_NO_CACHE); ^ drivers/gpu/drm/drm_scatter.c:48:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ scripts/Makefile.build:289: recipe for target 'drivers/gpu/drm/drm_scatter.o' failed make[3]: *** [drivers/gpu/drm/drm_scatter.o] Error 1 scripts/Makefile.build:440: recipe for target 'drivers/gpu/drm' failed make[2]: *** [drivers/gpu/drm] Error 2 scripts/Makefile.build:440: recipe for target 'drivers/gpu' failed make[1]: *** [drivers/gpu] Error 2 Makefile:985: recipe for target 'drivers' failed make: *** [drivers] Error 2 Regards Julian From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rNHvp6VCgzDq9H for ; Mon, 6 Jun 2016 12:00:06 +1000 (AEST) Message-ID: <1465178406.12265.6.camel@ellerman.id.au> Subject: Re: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE From: Michael Ellerman To: Julian Margetson , Christian Zigotzky , "Aneesh Kumar K.V" , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, darren@stevens-zone.net, Michael Ellerman , Adrian Cox , rtd@a-eon.com, rtd2@xtra.co.nz, pjwall@mac.com, pjwall@me.com, matthew@a-eon.biz, intermediadc@hotmail.com, contact@a-eon.com, info@xenosoft.de Date: Mon, 06 Jun 2016 12:00:06 +1000 In-Reply-To: <5fb9d8e9-d456-0537-ef77-82658e4538cd@candw.ms> References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> <871t4dui4g.fsf@skywalker.in.ibm.com> <2bf8f412-2631-75b4-70a3-cb5ecee5cf48@xenosoft.de> <2FB13B5B-42F0-4396-AD29-70924D2710CC@xenosoft.de> <053dd416-a9ab-5b06-5c3b-1acefb53fd3b@xenosoft.de> <1465174679.12265.4.camel@ellerman.id.au> <5fb9d8e9-d456-0537-ef77-82658e4538cd@candw.ms> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Sun, 2016-06-05 at 21:23 -0400, Julian Margetson wrote: > > > > > > drivers/gpu/drm/drm_vm.c: In function ‘drm_dma_prot’: > > > drivers/gpu/drm/drm_vm.c:83:6: error: invalid operands to binary | > > > (have ‘pgprot_t {aka struct }’ and ‘int’) > > > tmp |= _PAGE_NO_CACHE; > > > ^ > > > > > That is because that usage is wrong based on type. _PAGE_NO_CACHE is not > > of type pgprot_t. What you really need there is > > > > tmp = __pgprot(pgprot_val(tmp) | _PAGE_NO_CACHE); > > > > or a better option would be > > > > tmp = pgprot_noncached_wc(tmp); > > > > -aneesh > > tmp = pgprot_noncached_wc(tmp); > > compiles but I then run in to the following > > CC drivers/gpu/drm/drm_scatter.o > drivers/gpu/drm/drm_scatter.c: In function ‘drm_vmalloc_dma’: > drivers/gpu/drm/drm_scatter.c:44:49: error: invalid operands to binary | > (have ‘pgprot_t {aka struct }’ and ‘int’) > return __vmalloc(size, GFP_KERNEL, PAGE_KERNEL | _PAGE_NO_CACHE); > ^ > drivers/gpu/drm/drm_scatter.c:48:1: warning: control reaches end of > non-void function [-Wreturn-type] > } > ^ Aneesh showed you how to fix that in his reply above. return __vmalloc(size, GFP_KERNEL, pgprot_noncached_wc(PAGE_KERNEL)); cheers From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mo6-p00-ob.smtp.rzone.de (mo6-p00-ob.smtp.rzone.de [IPv6:2a01:238:20a:202:5300::5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rNNX04dgrzDq64 for ; Mon, 6 Jun 2016 15:28:16 +1000 (AEST) Subject: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE To: Michael Ellerman , "Aneesh Kumar K.V" , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, darren@stevens-zone.net, Michael Ellerman , Julian Margetson , Adrian Cox References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> <874m99uibc.fsf@skywalker.in.ibm.com> <1465174304.12265.0.camel@ellerman.id.au> From: Christian Zigotzky Message-ID: Date: Mon, 6 Jun 2016 07:21:48 +0200 MIME-Version: 1.0 In-Reply-To: <1465174304.12265.0.camel@ellerman.id.au> Content-Type: text/plain; charset=utf-8; format=flowed List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Thanks. I'll try it. - Christian On 06 June 2016 at 02:51 AM, Michael Ellerman wrote: > On Sat, 2016-06-04 at 17:07 +0200, Christian Zigotzky wrote: > >> Aneesh, >> >> Shall I bisect the kernel from the powerpc git? > No just use linus' tree. > >> Shall I start with the following commit? >> >> https://git.kernel.org/cgit/linux/kernel/git/powerpc/linux.git/commit/?id=8ffb4103f5e28d7e7890ed4774d8e009f253f56e > Yeah that would be a good one to start with. > > Then mark rc1 as bad and bisect should do the rest. > > cheers > > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp687.redcondor.net (smtp687.redcondor.net [208.80.206.87]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rNTF75ZPlzDq7n for ; Mon, 6 Jun 2016 19:00:43 +1000 (AEST) Subject: Re: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE To: Michael Ellerman , Christian Zigotzky , "Aneesh Kumar K.V" , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, darren@stevens-zone.net, Michael Ellerman , Adrian Cox , rtd@a-eon.com, rtd2@xtra.co.nz, pjwall@mac.com, pjwall@me.com, matthew@a-eon.biz, intermediadc@hotmail.com, contact@a-eon.com, info@xenosoft.de References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> <871t4dui4g.fsf@skywalker.in.ibm.com> <2bf8f412-2631-75b4-70a3-cb5ecee5cf48@xenosoft.de> <2FB13B5B-42F0-4396-AD29-70924D2710CC@xenosoft.de> <053dd416-a9ab-5b06-5c3b-1acefb53fd3b@xenosoft.de> <1465174679.12265.4.camel@ellerman.id.au> <5fb9d8e9-d456-0537-ef77-82658e4538cd@candw.ms> <1465178406.12265.6.camel@ellerman.id.au> From: Julian Margetson Message-ID: <2ea9f99f-d54c-b32f-dac9-71c50cc4a684@candw.ms> Date: Mon, 6 Jun 2016 04:59:48 -0400 MIME-Version: 1.0 In-Reply-To: <1465178406.12265.6.camel@ellerman.id.au> Content-Type: text/plain; charset=utf-8; format=flowed List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 6/5/2016 10:00 PM, Michael Ellerman wrote: > On Sun, 2016-06-05 at 21:23 -0400, Julian Margetson wrote: >>>> drivers/gpu/drm/drm_vm.c: In function ‘drm_dma_prot’: >>>> drivers/gpu/drm/drm_vm.c:83:6: error: invalid operands to binary | >>>> (have ‘pgprot_t {aka struct }’ and ‘int’) >>>> tmp |= _PAGE_NO_CACHE; >>>> ^ >>>> >>> That is because that usage is wrong based on type. _PAGE_NO_CACHE is not >>> of type pgprot_t. What you really need there is >>> >>> tmp = __pgprot(pgprot_val(tmp) | _PAGE_NO_CACHE); >>> >>> or a better option would be >>> >>> tmp = pgprot_noncached_wc(tmp); >>> >>> -aneesh >> tmp = pgprot_noncached_wc(tmp); >> >> compiles but I then run in to the following >> >> CC drivers/gpu/drm/drm_scatter.o >> drivers/gpu/drm/drm_scatter.c: In function ‘drm_vmalloc_dma’: >> drivers/gpu/drm/drm_scatter.c:44:49: error: invalid operands to binary | >> (have ‘pgprot_t {aka struct }’ and ‘int’) >> return __vmalloc(size, GFP_KERNEL, PAGE_KERNEL | _PAGE_NO_CACHE); >> ^ >> drivers/gpu/drm/drm_scatter.c:48:1: warning: control reaches end of >> non-void function [-Wreturn-type] >> } >> ^ > Aneesh showed you how to fix that in his reply above. > > return __vmalloc(size, GFP_KERNEL, pgprot_noncached_wc(PAGE_KERNEL)); > > cheers > > > Thanks . With the two adjustment tmp = pgprot_noncached_wc(tmp); and return __vmalloc(size, GFP_KERNEL, pgprot_noncached_wc(PAGE_KERNEL)); The rc2 builds and boots on Sam460ex Regards Julian From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [81.169.146.161]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rPNLV5MdpzDqG1 for ; Wed, 8 Jun 2016 06:23:30 +1000 (AEST) Subject: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE To: Michael Ellerman , "Aneesh Kumar K.V" , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, darren@stevens-zone.net, Michael Ellerman , Julian Margetson , Adrian Cox , "R.T.Dickinson" , "R.T.Dickinson" , Pat Wall , Pat Wall , "contact@a-eon.com" , Matthew Leaman , luigi burdo References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> <874m99uibc.fsf@skywalker.in.ibm.com> <1465174304.12265.0.camel@ellerman.id.au> From: Christian Zigotzky Message-ID: <50194690-18ac-edfd-42cb-8f1cc96055c9@xenosoft.de> Date: Tue, 7 Jun 2016 22:17:08 +0200 MIME-Version: 1.0 In-Reply-To: <1465174304.12265.0.camel@ellerman.id.au> Content-Type: text/plain; charset=utf-8; format=flowed List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi Michael, On 06 June 2016 at 02:51 AM, Michael Ellerman wrote: > On Sat, 2016-06-04 at 17:07 +0200, Christian Zigotzky wrote: > >> Aneesh, >> >> Shall I bisect the kernel from the powerpc git? > No just use linus' tree. > >> Shall I start with the following commit? >> >> https://git.kernel.org/cgit/linux/kernel/git/powerpc/linux.git/commit/?id=8ffb4103f5e28d7e7890ed4774d8e009f253f56e > Yeah that would be a good one to start with. > > Then mark rc1 as bad and bisect should do the rest. > > cheers > > "range.size, pgprot_val(pgprot_noncached(__pgprot(0))));" isn't the problem. :-) It works. 764041e0f43cc7846f6d8eb246d65b53cc06c764 is the first bad commit commit 764041e0f43cc7846f6d8eb246d65b53cc06c764 Author: Aneesh Kumar K.V Date: Fri Apr 29 23:26:09 2016 +1000 powerpc/mm/radix: Add checks in slice code to catch radix usage Radix doesn't need slice support. Catch incorrect usage of slice code when radix is enabled. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Cheers, Christian Git Log: git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux-git git bisect start git bisect good 8ffb4103f5e28d7e7890ed4774d8e009f253f56e git bisect bad 1a695a905c18548062509178b98bc91e67510864 (Linux 4.7-rc1) Output: Bisecting: 6333 revisions left to test after this (roughly 13 steps) [4741526b83c5d3a3d661d1896f9e7414c5730bcb] mm, page_alloc: restore the original nodemask if the fast path allocation failed ---- git bisect good (Linux AmigaoneX1000 4.6.0_A-EON_AmigaONE_X1000_Nemo-05145-g4741526-dirty #1 SMP Mon Jun 6 14:35:01 CEST 2016 ppc64 GNU/Linux) Output: Bisecting: 3014 revisions left to test after this (roughly 12 steps) [2f37dd131c5d3a2eac21cd5baf80658b1b02a8ac] Merge tag 'staging-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging ---- I had to replace __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, range.size, _PAGE_NO_CACHE|_PAGE_GUARDED); with __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, range.size, pgprot_val(pgprot_noncached(__pgprot(0)))); in the file "pci-common.c". After that it compiled but it doesn't boot so "git bisect bad" Output: Bisecting: 1693 revisions left to test after this (roughly 11 steps) [54cf809b9512be95f53ed4a5e3b631d1ac42f0fa] locking,qspinlock: Fix spin_is_locked() and spin_unlock_wait() ---- I had to replace __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, range.size, _PAGE_NO_CACHE|_PAGE_GUARDED); with __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, range.size, pgprot_val(pgprot_noncached(__pgprot(0)))); in the file "pci-common.c". After that it compiled but it doesn't boot so "git bisect bad" Output: Bisecting: 721 revisions left to test after this (roughly 10 steps) [f4c80d5a16eb4b08a0d9ade154af1ebdc63f5752] Merge tag 'sound-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound ---- git bisect good (Linux AmigaoneX1000 4.6.0_A-EON_AmigaONE_X1000_Nemo-05931-gf4c80d5-dirty #1 SMP Mon Jun 6 19:13:42 CEST 2016 ppc64 GNU/Linux) Output: Bisecting: 324 revisions left to test after this (roughly 9 steps) [c04a5880299eab3da8c10547db96ea9cdffd44a6] Merge tag 'powerpc-4.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux ---- I had to replace __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, range.size, _PAGE_NO_CACHE|_PAGE_GUARDED); with __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, range.size, pgprot_val(pgprot_noncached(__pgprot(0)))); in the file "pci-common.c". After that it compiled but it doesn't boot so "git bisect bad" Output: Bisecting: 186 revisions left to test after this (roughly 8 steps) [e9ad9b9bd3a3b95c89a29b2a197476e662db4233] Merge tag 'docs-for-linus' of git://git.lwn.net/linux ---- git bisect good (Linux AmigaoneX1000 4.6.0_A-EON_AmigaONE_X1000_Nemo-06141-ge9ad9b9-dirty #1 SMP Tue Jun 7 08:32:33 CEST 2016 ppc64 GNU/Linux) Bisecting: 93 revisions left to test after this (roughly 7 steps) [0e5b5ba17ac33a05d9f4a48b5eb8b5e30f2274d7] cxl: Remove duplicate #defines ---- I had to replace __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, range.size, _PAGE_NO_CACHE|_PAGE_GUARDED); with __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, range.size, pgprot_val(pgprot_noncached(__pgprot(0)))); in the file "pci-common.c". After that it compiled but it doesn't boot so "git bisect bad" Output: Bisecting: 46 revisions left to test after this (roughly 6 steps) [764041e0f43cc7846f6d8eb246d65b53cc06c764] powerpc/mm/radix: Add checks in slice code to catch radix usage ---- It doesn't boot. Booting Linux via __start()... didn't appear in the CFE. git bisect bad Output: Bisecting: 22 revisions left to test after this (roughly 5 steps) [2e8735198af0392d9032a356ee6c82686afca779] powerpc/mm: Move common pte bits and accessors to book3s/64/pgtable.h ---- I had to replace __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, range.size, _PAGE_NO_CACHE|_PAGE_GUARDED); with __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, range.size, pgprot_val(pgprot_noncached(__pgprot(0)))); in the file "pci-common.c". After that it compiled and booted with "range.size, pgprot_val(pgprot_noncached(__pgprot(0))));". That means, "range.size, pgprot_val(pgprot_noncached(__pgprot(0))));" isn't the problem. :-) git bisect good (Linux AmigaoneX1000 4.6.0-rc3_A-EON_AmigaONE_X1000_Nemo-00067-g2e87351-dirty #1 SMP Tue Jun 7 15:29:19 CEST 2016 ppc64 GNU/Linux) Output: Bisecting: 11 revisions left to test after this (roughly 4 steps) [2bfd65e45e877fb5704730244da67c748d28a1b8] powerpc/mm/radix: Add radix callbacks for early init routines ---- I had to replace __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, range.size, _PAGE_NO_CACHE|_PAGE_GUARDED); with __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, range.size, pgprot_val(pgprot_noncached(__pgprot(0)))); in the file "pci-common.c". After that it compiled and it also booted with "range.size, pgprot_val(pgprot_noncached(__pgprot(0))));"! git bisect good (Linux AmigaoneX1000 4.6.0-rc3_A-EON_AmigaONE_X1000_Nemo-00078-g2bfd65e-dirty #1 SMP Tue Jun 7 16:50:47 CEST 2016 ppc64 GNU/Linux) Output: Bisecting: 5 revisions left to test after this (roughly 3 steps) [676012a66f651a98808459bc8ab75661828ed96f] powerpc/mm: Hash abstraction for tlbflush routines ---- I had to replace __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, range.size, _PAGE_NO_CACHE|_PAGE_GUARDED); with __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, range.size, pgprot_val(pgprot_noncached(__pgprot(0)))); in the file "pci-common.c". After that it compiled and it also booted with "range.size, pgprot_val(pgprot_noncached(__pgprot(0))));"! git bisect good (Linux AmigaoneX1000 4.6.0-rc3_A-EON_AmigaONE_X1000_Nemo-00084-g676012a-dirty #1 SMP Tue Jun 7 19:03:59 CEST 2016 ppc64 GNU/Linux) Output: Bisecting: 2 revisions left to test after this (roughly 2 steps) [a8ed87c92adf1fd45142323e04f15b522117d575] powerpc/mm/radix: Add MMU_FTR_RADIX ---- I had to replace __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, range.size, _PAGE_NO_CACHE|_PAGE_GUARDED); with __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, range.size, pgprot_val(pgprot_noncached(__pgprot(0)))); in the file "pci-common.c". After that it compiled and it also booted with "range.size, pgprot_val(pgprot_noncached(__pgprot(0))));"! git bisect good (Linux AmigaoneX1000 4.6.0-rc3_A-EON_AmigaONE_X1000_Nemo-00087-ga8ed87c-dirty #1 SMP Tue Jun 7 20:25:11 CEST 2016 ppc64 GNU/Linux) Output: Bisecting: 0 revisions left to test after this (roughly 1 step) [d8c476eeb697c9aac46b390e9cbd7af7032814f1] powerpc/mm/radix: Isolate hash table function from pseries guest code ---- I had to replace __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, range.size, _PAGE_NO_CACHE|_PAGE_GUARDED); with __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, range.size, pgprot_val(pgprot_noncached(__pgprot(0)))); in the file "pci-common.c". After that it compiled and it also booted with "range.size, pgprot_val(pgprot_noncached(__pgprot(0))));"! git bisect good (Linux AmigaoneX1000 4.6.0-rc3_A-EON_AmigaONE_X1000_Nemo-00089-gd8c476e-dirty #1 SMP Tue Jun 7 21:53:24 CEST 2016 ppc64 GNU/Linux) Output: 764041e0f43cc7846f6d8eb246d65b53cc06c764 is the first bad commit commit 764041e0f43cc7846f6d8eb246d65b53cc06c764 Author: Aneesh Kumar K.V Date: Fri Apr 29 23:26:09 2016 +1000 powerpc/mm/radix: Add checks in slice code to catch radix usage Radix doesn't need slice support. Catch incorrect usage of slice code when radix is enabled. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman :040000 040000 e66f81f989a42a4de238a49a2191f787ae65d4a2 6b7b4380d14db00d9aae28b5990e5dd8d6cf23a0 M arch From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [81.169.146.220]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rPQpl5CxYzDq5f for ; Wed, 8 Jun 2016 08:14:39 +1000 (AEST) Subject: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE To: Michael Ellerman , "Aneesh Kumar K.V" , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, darren@stevens-zone.net, Michael Ellerman , Julian Margetson , Adrian Cox , "R.T.Dickinson" , "R.T.Dickinson" , Pat Wall , Pat Wall , "contact@a-eon.com" , Matthew Leaman , luigi burdo , Christian Zigotzky References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> <874m99uibc.fsf@skywalker.in.ibm.com> <1465174304.12265.0.camel@ellerman.id.au> <50194690-18ac-edfd-42cb-8f1cc96055c9@xenosoft.de> From: Christian Zigotzky Message-ID: <2a3a9bf7-baa4-07a9-1da0-94b596b3a955@xenosoft.de> Date: Wed, 8 Jun 2016 00:14:10 +0200 MIME-Version: 1.0 In-Reply-To: <50194690-18ac-edfd-42cb-8f1cc96055c9@xenosoft.de> Content-Type: text/plain; charset=utf-8; format=flowed List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi All, I replaced the file "slice.c" with the old one from kernel 4.6. It compiled but unfortunately it doesn't boot. Cheers, Christian On 07 June 2016 at 10:17 PM, Christian Zigotzky wrote: > Hi Michael, > > On 06 June 2016 at 02:51 AM, Michael Ellerman wrote: >> On Sat, 2016-06-04 at 17:07 +0200, Christian Zigotzky wrote: >> >>> Aneesh, >>> >>> Shall I bisect the kernel from the powerpc git? >> No just use linus' tree. >> >>> Shall I start with the following commit? >>> >>> https://git.kernel.org/cgit/linux/kernel/git/powerpc/linux.git/commit/?id=8ffb4103f5e28d7e7890ed4774d8e009f253f56e >>> >> Yeah that would be a good one to start with. >> >> Then mark rc1 as bad and bisect should do the rest. >> >> cheers >> >> > "range.size, pgprot_val(pgprot_noncached(__pgprot(0))));" isn't the > problem. :-) It works. > > 764041e0f43cc7846f6d8eb246d65b53cc06c764 is the first bad commit > commit 764041e0f43cc7846f6d8eb246d65b53cc06c764 > Author: Aneesh Kumar K.V > Date: Fri Apr 29 23:26:09 2016 +1000 > > powerpc/mm/radix: Add checks in slice code to catch radix usage > > Radix doesn't need slice support. Catch incorrect usage of slice code > when radix is enabled. > > Signed-off-by: Aneesh Kumar K.V > Signed-off-by: Michael Ellerman > > Cheers, > > Christian > > > Git Log: > > git clone > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > linux-git > > git bisect start > > git bisect good 8ffb4103f5e28d7e7890ed4774d8e009f253f56e > > git bisect bad 1a695a905c18548062509178b98bc91e67510864 (Linux 4.7-rc1) > > Output: > > Bisecting: 6333 revisions left to test after this (roughly 13 steps) > [4741526b83c5d3a3d661d1896f9e7414c5730bcb] mm, page_alloc: restore the > original nodemask if the fast path allocation failed > > ---- > > git bisect good (Linux AmigaoneX1000 > 4.6.0_A-EON_AmigaONE_X1000_Nemo-05145-g4741526-dirty #1 SMP Mon Jun 6 > 14:35:01 CEST 2016 ppc64 GNU/Linux) > > Output: > > Bisecting: 3014 revisions left to test after this (roughly 12 steps) > [2f37dd131c5d3a2eac21cd5baf80658b1b02a8ac] Merge tag 'staging-4.7-rc1' > of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging > > ---- > > I had to replace > > __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, > range.size, _PAGE_NO_CACHE|_PAGE_GUARDED); > > with > > __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, > range.size, > pgprot_val(pgprot_noncached(__pgprot(0)))); > > > in the file "pci-common.c". After that it compiled but it doesn't boot > so "git bisect bad" > > Output: > > Bisecting: 1693 revisions left to test after this (roughly 11 steps) > [54cf809b9512be95f53ed4a5e3b631d1ac42f0fa] locking,qspinlock: Fix > spin_is_locked() and spin_unlock_wait() > > ---- > > I had to replace > > __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, > range.size, _PAGE_NO_CACHE|_PAGE_GUARDED); > > with > > __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, > range.size, > pgprot_val(pgprot_noncached(__pgprot(0)))); > > > in the file "pci-common.c". After that it compiled but it doesn't boot > so "git bisect bad" > > Output: > > Bisecting: 721 revisions left to test after this (roughly 10 steps) > [f4c80d5a16eb4b08a0d9ade154af1ebdc63f5752] Merge tag 'sound-4.7-rc1' > of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound > > ---- > > git bisect good (Linux AmigaoneX1000 > 4.6.0_A-EON_AmigaONE_X1000_Nemo-05931-gf4c80d5-dirty #1 SMP Mon Jun 6 > 19:13:42 CEST 2016 ppc64 GNU/Linux) > > Output: > > Bisecting: 324 revisions left to test after this (roughly 9 steps) > [c04a5880299eab3da8c10547db96ea9cdffd44a6] Merge tag 'powerpc-4.7-1' > of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux > > ---- > > I had to replace > > __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, > range.size, _PAGE_NO_CACHE|_PAGE_GUARDED); > > with > > __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, > range.size, > pgprot_val(pgprot_noncached(__pgprot(0)))); > > > in the file "pci-common.c". After that it compiled but it doesn't boot > so "git bisect bad" > > Output: > > Bisecting: 186 revisions left to test after this (roughly 8 steps) > [e9ad9b9bd3a3b95c89a29b2a197476e662db4233] Merge tag 'docs-for-linus' > of git://git.lwn.net/linux > > ---- > > git bisect good (Linux AmigaoneX1000 > 4.6.0_A-EON_AmigaONE_X1000_Nemo-06141-ge9ad9b9-dirty #1 SMP Tue Jun 7 > 08:32:33 CEST 2016 ppc64 GNU/Linux) > > Bisecting: 93 revisions left to test after this (roughly 7 steps) > [0e5b5ba17ac33a05d9f4a48b5eb8b5e30f2274d7] cxl: Remove duplicate #defines > > ---- > > I had to replace > > __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, > range.size, _PAGE_NO_CACHE|_PAGE_GUARDED); > > with > > __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, > range.size, > pgprot_val(pgprot_noncached(__pgprot(0)))); > > > in the file "pci-common.c". After that it compiled but it doesn't boot > so "git bisect bad" > > Output: > > Bisecting: 46 revisions left to test after this (roughly 6 steps) > [764041e0f43cc7846f6d8eb246d65b53cc06c764] powerpc/mm/radix: Add > checks in slice code to catch radix usage > > ---- > > It doesn't boot. Booting Linux via __start()... didn't appear in the CFE. > > git bisect bad > > Output: > > Bisecting: 22 revisions left to test after this (roughly 5 steps) > [2e8735198af0392d9032a356ee6c82686afca779] powerpc/mm: Move common pte > bits and accessors to book3s/64/pgtable.h > > ---- > > I had to replace > > __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, > range.size, _PAGE_NO_CACHE|_PAGE_GUARDED); > > with > > __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, > range.size, > pgprot_val(pgprot_noncached(__pgprot(0)))); > > > in the file "pci-common.c". After that it compiled and booted with > "range.size, pgprot_val(pgprot_noncached(__pgprot(0))));". That means, > "range.size, pgprot_val(pgprot_noncached(__pgprot(0))));" isn't the > problem. :-) > > git bisect good (Linux AmigaoneX1000 > 4.6.0-rc3_A-EON_AmigaONE_X1000_Nemo-00067-g2e87351-dirty #1 SMP Tue > Jun 7 15:29:19 CEST 2016 ppc64 GNU/Linux) > > Output: > > Bisecting: 11 revisions left to test after this (roughly 4 steps) > [2bfd65e45e877fb5704730244da67c748d28a1b8] powerpc/mm/radix: Add radix > callbacks for early init routines > > ---- > > I had to replace > > __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, > range.size, _PAGE_NO_CACHE|_PAGE_GUARDED); > > with > > __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, > range.size, > pgprot_val(pgprot_noncached(__pgprot(0)))); > > > in the file "pci-common.c". After that it compiled and it also booted > with "range.size, pgprot_val(pgprot_noncached(__pgprot(0))));"! > > git bisect good (Linux AmigaoneX1000 > 4.6.0-rc3_A-EON_AmigaONE_X1000_Nemo-00078-g2bfd65e-dirty #1 SMP Tue > Jun 7 16:50:47 CEST 2016 ppc64 GNU/Linux) > > Output: > > Bisecting: 5 revisions left to test after this (roughly 3 steps) > [676012a66f651a98808459bc8ab75661828ed96f] powerpc/mm: Hash > abstraction for tlbflush routines > > ---- > > I had to replace > > __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, > range.size, _PAGE_NO_CACHE|_PAGE_GUARDED); > > with > > __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, > range.size, > pgprot_val(pgprot_noncached(__pgprot(0)))); > > > in the file "pci-common.c". After that it compiled and it also booted > with "range.size, pgprot_val(pgprot_noncached(__pgprot(0))));"! > > git bisect good (Linux AmigaoneX1000 > 4.6.0-rc3_A-EON_AmigaONE_X1000_Nemo-00084-g676012a-dirty #1 SMP Tue > Jun 7 19:03:59 CEST 2016 ppc64 GNU/Linux) > > Output: > > Bisecting: 2 revisions left to test after this (roughly 2 steps) > [a8ed87c92adf1fd45142323e04f15b522117d575] powerpc/mm/radix: Add > MMU_FTR_RADIX > > ---- > > I had to replace > > __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, > range.size, _PAGE_NO_CACHE|_PAGE_GUARDED); > > with > > __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, > range.size, > pgprot_val(pgprot_noncached(__pgprot(0)))); > > > in the file "pci-common.c". After that it compiled and it also booted > with "range.size, pgprot_val(pgprot_noncached(__pgprot(0))));"! > > git bisect good (Linux AmigaoneX1000 > 4.6.0-rc3_A-EON_AmigaONE_X1000_Nemo-00087-ga8ed87c-dirty #1 SMP Tue > Jun 7 20:25:11 CEST 2016 ppc64 GNU/Linux) > > Output: > > Bisecting: 0 revisions left to test after this (roughly 1 step) > [d8c476eeb697c9aac46b390e9cbd7af7032814f1] powerpc/mm/radix: Isolate > hash table function from pseries guest code > > ---- > > I had to replace > > __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, > range.size, _PAGE_NO_CACHE|_PAGE_GUARDED); > > with > > __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, > range.size, > pgprot_val(pgprot_noncached(__pgprot(0)))); > > > in the file "pci-common.c". After that it compiled and it also booted > with "range.size, pgprot_val(pgprot_noncached(__pgprot(0))));"! > > git bisect good (Linux AmigaoneX1000 > 4.6.0-rc3_A-EON_AmigaONE_X1000_Nemo-00089-gd8c476e-dirty #1 SMP Tue > Jun 7 21:53:24 CEST 2016 ppc64 GNU/Linux) > > Output: > > 764041e0f43cc7846f6d8eb246d65b53cc06c764 is the first bad commit > commit 764041e0f43cc7846f6d8eb246d65b53cc06c764 > Author: Aneesh Kumar K.V > Date: Fri Apr 29 23:26:09 2016 +1000 > > powerpc/mm/radix: Add checks in slice code to catch radix usage > > Radix doesn't need slice support. Catch incorrect usage of slice code > when radix is enabled. > > Signed-off-by: Aneesh Kumar K.V > Signed-off-by: Michael Ellerman > > :040000 040000 e66f81f989a42a4de238a49a2191f787ae65d4a2 > 6b7b4380d14db00d9aae28b5990e5dd8d6cf23a0 M arch > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ozlabs.org (ozlabs.org [103.22.144.67]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rPWcW2r02zDq5f for ; Wed, 8 Jun 2016 11:51:07 +1000 (AEST) Message-ID: <1465350666.14294.0.camel@ellerman.id.au> Subject: Re: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE From: Michael Ellerman To: Christian Zigotzky , "Aneesh Kumar K.V" , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, darren@stevens-zone.net, Michael Ellerman , Julian Margetson , Adrian Cox , "R.T.Dickinson" , "R.T.Dickinson" , Pat Wall , Pat Wall , "contact@a-eon.com" , Matthew Leaman , luigi burdo , Christian Zigotzky Date: Wed, 08 Jun 2016 11:51:06 +1000 In-Reply-To: <2a3a9bf7-baa4-07a9-1da0-94b596b3a955@xenosoft.de> References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> <874m99uibc.fsf@skywalker.in.ibm.com> <1465174304.12265.0.camel@ellerman.id.au> <50194690-18ac-edfd-42cb-8f1cc96055c9@xenosoft.de> <2a3a9bf7-baa4-07a9-1da0-94b596b3a955@xenosoft.de> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Wed, 2016-06-08 at 00:14 +0200, Christian Zigotzky wrote: > Hi All, > > I replaced the file "slice.c" with the old one from kernel 4.6. It > compiled but unfortunately it doesn't boot. I would expect nothing else. You can't just replace whole files from different versions, the unit of work is a commit, not a file. cheers From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ozlabs.org (ozlabs.org [103.22.144.67]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rPXz33F6qzDq66 for ; Wed, 8 Jun 2016 12:52:15 +1000 (AEST) Message-ID: <1465354334.14294.4.camel@ellerman.id.au> Subject: Re: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE From: Michael Ellerman To: Christian Zigotzky , "Aneesh Kumar K.V" , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, darren@stevens-zone.net, Michael Ellerman , Julian Margetson , Adrian Cox , "R.T.Dickinson" , "R.T.Dickinson" , Pat Wall , Pat Wall , "contact@a-eon.com" , Matthew Leaman , luigi burdo Date: Wed, 08 Jun 2016 12:52:14 +1000 In-Reply-To: <50194690-18ac-edfd-42cb-8f1cc96055c9@xenosoft.de> References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> <874m99uibc.fsf@skywalker.in.ibm.com> <1465174304.12265.0.camel@ellerman.id.au> <50194690-18ac-edfd-42cb-8f1cc96055c9@xenosoft.de> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tue, 2016-06-07 at 22:17 +0200, Christian Zigotzky wrote: > > 764041e0f43cc7846f6d8eb246d65b53cc06c764 is the first bad commit > commit 764041e0f43cc7846f6d8eb246d65b53cc06c764 > Author: Aneesh Kumar K.V > Date: Fri Apr 29 23:26:09 2016 +1000 > > powerpc/mm/radix: Add checks in slice code to catch radix usage > > Radix doesn't need slice support. Catch incorrect usage of slice code > when radix is enabled. > > Signed-off-by: Aneesh Kumar K.V > Signed-off-by: Michael Ellerman > Hmm, I find that hard to believe. But maybe I'm missing something. Can you checkout Linus' master and then revert that commit? cheers From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rPmTc0XxWzDqYn for ; Wed, 8 Jun 2016 21:31:00 +1000 (AEST) Message-ID: <1465385458.13854.11.camel@ellerman.id.au> Subject: Re: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE From: Michael Ellerman To: Christian Zigotzky , "Aneesh Kumar K.V" , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, darren@stevens-zone.net, Michael Ellerman , Julian Margetson , Adrian Cox , "R.T.Dickinson" , "R.T.Dickinson" , Pat Wall , Pat Wall , "contact@a-eon.com" , Matthew Leaman , luigi burdo , Christian Zigotzky Date: Wed, 08 Jun 2016 21:30:58 +1000 In-Reply-To: <409c2f4c-52bf-8f46-8a29-c6f384c75946@xenosoft.de> References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> <874m99uibc.fsf@skywalker.in.ibm.com> <1465174304.12265.0.camel@ellerman.id.au> <50194690-18ac-edfd-42cb-8f1cc96055c9@xenosoft.de> <1465354334.14294.4.camel@ellerman.id.au> <409c2f4c-52bf-8f46-8a29-c6f384c75946@xenosoft.de> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Wed, 2016-06-08 at 12:58 +0200, Christian Zigotzky wrote: > On 08 June 2016 at 04:52 AM, Michael Ellerman wrote: > > On Tue, 2016-06-07 at 22:17 +0200, Christian Zigotzky wrote: > > > 764041e0f43cc7846f6d8eb246d65b53cc06c764 is the first bad commit > > > commit 764041e0f43cc7846f6d8eb246d65b53cc06c764 > > > Author: Aneesh Kumar K.V > > > Date: Fri Apr 29 23:26:09 2016 +1000 > > > > > > powerpc/mm/radix: Add checks in slice code to catch radix usage > > > > > > Radix doesn't need slice support. Catch incorrect usage of slice code > > > when radix is enabled. > > > > > > Signed-off-by: Aneesh Kumar K.V > > > Signed-off-by: Michael Ellerman > > > > > Hmm, I find that hard to believe. But maybe I'm missing something. > > > > Can you checkout Linus' master and then revert that commit? > > > $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux-git > $ git checkout > Your branch is up-to-date with 'origin/master'. > > $ git revert 764041e0f43cc7846f6d8eb246d65b53cc06c764 -m 1 > error: Mainline was specified but commit 764041e0f43cc7846f6d8eb246d65b53cc06c764 is not a merge. > fatal: revert failed > > How can I checkout Linus' master and then revert that commit? It's not a merge, so just plain git revert: $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux-git $ cd linux-git $ git revert 764041e0f43cc7846f6d8eb246d65b53cc06c764 [master 5dd9737a173e] Revert "powerpc/mm/radix: Add checks in slice code to catch radix usage" 1 file changed, 16 deletions(-) cheers From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [81.169.146.163]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rPlmd0DpSzDqgd for ; Wed, 8 Jun 2016 20:58:56 +1000 (AEST) From: Christian Zigotzky Subject: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE To: Michael Ellerman , "Aneesh Kumar K.V" , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, darren@stevens-zone.net, Michael Ellerman , Julian Margetson , Adrian Cox , "R.T.Dickinson" , "R.T.Dickinson" , Pat Wall , Pat Wall , "contact@a-eon.com" , Matthew Leaman , luigi burdo , Christian Zigotzky References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> <874m99uibc.fsf@skywalker.in.ibm.com> <1465174304.12265.0.camel@ellerman.id.au> <50194690-18ac-edfd-42cb-8f1cc96055c9@xenosoft.de> <1465354334.14294.4.camel@ellerman.id.au> Message-ID: <409c2f4c-52bf-8f46-8a29-c6f384c75946@xenosoft.de> Date: Wed, 8 Jun 2016 12:58:32 +0200 MIME-Version: 1.0 In-Reply-To: <1465354334.14294.4.camel@ellerman.id.au> Content-Type: multipart/alternative; boundary="------------43CE065B7D4AE9D6D1F30A8B" List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , This is a multi-part message in MIME format. --------------43CE065B7D4AE9D6D1F30A8B Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi Michael, On 08 June 2016 at 04:52 AM, Michael Ellerman wrote: > On Tue, 2016-06-07 at 22:17 +0200, Christian Zigotzky wrote: >> 764041e0f43cc7846f6d8eb246d65b53cc06c764 is the first bad commit >> commit 764041e0f43cc7846f6d8eb246d65b53cc06c764 >> Author: Aneesh Kumar K.V >> Date: Fri Apr 29 23:26:09 2016 +1000 >> >> powerpc/mm/radix: Add checks in slice code to catch radix usage >> >> Radix doesn't need slice support. Catch incorrect usage of slice code >> when radix is enabled. >> >> Signed-off-by: Aneesh Kumar K.V >> Signed-off-by: Michael Ellerman >> > Hmm, I find that hard to believe. But maybe I'm missing something. > > Can you checkout Linus' master and then revert that commit? > > cheers > > $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux-git $ git checkout Your branch is up-to-date with 'origin/master'. $ git revert 764041e0f43cc7846f6d8eb246d65b53cc06c764 -m 1 error: Mainline was specified but commit 764041e0f43cc7846f6d8eb246d65b53cc06c764 is not a merge. fatal: revert failed How can I checkout Linus' master and then revert that commit? Cheers, Christian --------------43CE065B7D4AE9D6D1F30A8B Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit
Hi Michael,

On 08 June 2016 at 04:52 AM, Michael Ellerman wrote:
On Tue, 2016-06-07 at 22:17 +0200, Christian Zigotzky wrote:
764041e0f43cc7846f6d8eb246d65b53cc06c764 is the first bad commit
commit 764041e0f43cc7846f6d8eb246d65b53cc06c764
Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Date:   Fri Apr 29 23:26:09 2016 +1000

     powerpc/mm/radix: Add checks in slice code to catch radix usage

     Radix doesn't need slice support. Catch incorrect usage of slice code
     when radix is enabled.

     Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
     Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

Hmm, I find that hard to believe. But maybe I'm missing something.

Can you checkout Linus' master and then revert that commit?

cheers


$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux-git

$ git checkout
Your branch is up-to-date with 'origin/master'.

$ git revert 764041e0f43cc7846f6d8eb246d65b53cc06c764 -m 1
error: Mainline was specified but commit 764041e0f43cc7846f6d8eb246d65b53cc06c764 is not a merge.
fatal: revert failed

How can I checkout Linus' master and then revert that commit?

Cheers,

Christian

--------------43CE065B7D4AE9D6D1F30A8B-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [81.169.146.163]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rPpFR10jMzDqXn for ; Wed, 8 Jun 2016 22:50:34 +1000 (AEST) Subject: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE To: Michael Ellerman , "Aneesh Kumar K.V" , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, darren@stevens-zone.net, Michael Ellerman , Julian Margetson , Adrian Cox , "R.T.Dickinson" , "R.T.Dickinson" , Pat Wall , Pat Wall , "contact@a-eon.com" , Matthew Leaman , luigi burdo , Christian Zigotzky References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> <874m99uibc.fsf@skywalker.in.ibm.com> <1465174304.12265.0.camel@ellerman.id.au> <50194690-18ac-edfd-42cb-8f1cc96055c9@xenosoft.de> <1465354334.14294.4.camel@ellerman.id.au> <409c2f4c-52bf-8f46-8a29-c6f384c75946@xenosoft.de> <1465385458.13854.11.camel@ellerman.id.au> From: Christian Zigotzky Message-ID: <01746caf-c878-7beb-6694-db5863709f40@xenosoft.de> Date: Wed, 8 Jun 2016 14:50:05 +0200 MIME-Version: 1.0 In-Reply-To: <1465385458.13854.11.camel@ellerman.id.au> Content-Type: text/plain; charset=utf-8; format=flowed List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi Michael, Thanks a lot for the hint. I compiled it without the commit below but unfortunately it doesn't boot. Cheers, Christian On 08 June 2016 at 1:30 PM, Michael Ellerman wrote: > > It's not a merge, so just plain git revert: > > $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux-git > $ cd linux-git > $ git revert 764041e0f43cc7846f6d8eb246d65b53cc06c764 > [master 5dd9737a173e] Revert "powerpc/mm/radix: Add checks in slice code to catch radix usage" > 1 file changed, 16 deletions(-) > > cheers > > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [81.169.146.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rPq0m5jHKzDq68 for ; Wed, 8 Jun 2016 23:24:40 +1000 (AEST) Subject: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE To: Darren Stevens , Michael Ellerman , "Aneesh Kumar K.V" , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, Michael Ellerman , Julian Margetson , Adrian Cox , "R.T.Dickinson" , "R.T.Dickinson" , Pat Wall , Pat Wall , "contact@a-eon.com" , Matthew Leaman , luigi burdo References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> <874m99uibc.fsf@skywalker.in.ibm.com> <1465174304.12265.0.camel@ellerman.id.au> <50194690-18ac-edfd-42cb-8f1cc96055c9@xenosoft.de> <484bd17c3f3.74dd55e@auth.smtp.1and1.co.uk> From: Christian Zigotzky Message-ID: Date: Wed, 8 Jun 2016 15:24:04 +0200 MIME-Version: 1.0 In-Reply-To: <484bd17c3f3.74dd55e@auth.smtp.1and1.co.uk> Content-Type: text/plain; charset=utf-8; format=flowed List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi Darren, Many thanks for your help. I started my bisect with the following commits: git bisect start git bisect good 8ffb4103f5e28d7e7890ed4774d8e009f253f56e git bisect bad 1a695a905c18548062509178b98bc91e67510864 (Linux 4.7-rc1) Did you start your bisect with the same bad and good commit? I will revert your bad commit and compile a new test kernel. Thanks, Christian On 08 June 2016 at 1:33 PM, Darren Stevens wrote: > Hello Christian > > That's not where I ended up with my bisect, this commit is about 10 before the > one I found to be bad, which is: > > commit d6a9996e84ac4beb7713e9485f4563e100a9b03e > Author: Aneesh Kumar K.V > Date: Fri Apr 29 23:26:21 2016 +1000 > > powerpc/mm: vmalloc abstraction in preparation for radix > > The vmalloc range differs between hash and radix config. Hence make > VMALLOC_START and related constants a variable which will be runtime > initialized depending on whether hash or radix mode is active. > > Signed-off-by: Aneesh Kumar K.V > [mpe: Fix missing init of ioremap_bot in pgtable_64.c for ppc64e] > Signed-off-by: Michael Ellerman > > Not sure how we are getting different results though. I have attached my > bisect log and the suspect commit, whcih is quite large. I'm not sure which > part of it is at fault. I have some jobs to do now, but hope to get tesing > this later today. > > Regards > Darren From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.73]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rPpBS3BLCzDqXn for ; Wed, 8 Jun 2016 22:48:00 +1000 (AEST) From: Darren Stevens To: Christian Zigotzky CC: Michael Ellerman , Aneesh Kumar K.V , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, Michael Ellerman , Julian Margetson , Adrian Cox , R.T.Dickinson , R.T.Dickinson , Pat Wall , Pat Wall , "contact@a-eon.com" , Matthew Leaman , luigi burdo Date: Wed, 08 Jun 2016 12:33:20 +0100 (BST) Message-ID: <484bd17c3f3.74dd55e@auth.smtp.1and1.co.uk> In-Reply-To: <50194690-18ac-edfd-42cb-8f1cc96055c9@xenosoft.de> References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> <874m99uibc.fsf@skywalker.in.ibm.com> <1465174304.12265.0.camel@ellerman.id.au> <50194690-18ac-edfd-42cb-8f1cc96055c9@xenosoft.de> Subject: Re: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE MIME-Version: 1.0 Content-type: multipart/mixed; boundary="--=_BOUNDARY.6c7b88401f2d2ffb.de" List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Warning: This is a message in MIME format. Your mail reader does not support MIME. Some parts of this message will be readable as plain text. To see the rest, you will need to upgrade your mail reader. Following are some URLs where you can find MIME-capable mail programs for common platforms: AmigaOS...........: http://yam.ch/ Unix/MacOS/Windows: http://www.mozilla.com/thunderbird/ General information about MIME can be found at: http://en.wikipedia.org/wiki/MIME ----=_BOUNDARY.6c7b88401f2d2ffb.de Content-Type: text/plain Hello Christian On 07/06/2016, Christian Zigotzky wrote: > "range.size, pgprot_val(pgprot_noncached(__pgprot(0))));" isn't the > problem. :-) It works. > > 764041e0f43cc7846f6d8eb246d65b53cc06c764 is the first bad commit > commit 764041e0f43cc7846f6d8eb246d65b53cc06c764 > Author: Aneesh Kumar K.V > Date: Fri Apr 29 23:26:09 2016 +1000 > > powerpc/mm/radix: Add checks in slice code to catch radix usage > > Radix doesn't need slice support. Catch incorrect usage of slice > code when radix is enabled. > > Signed-off-by: Aneesh Kumar K.V > Signed-off-by: Michael Ellerman > That's not where I ended up with my bisect, this commit is about 10 before the one I found to be bad, which is: commit d6a9996e84ac4beb7713e9485f4563e100a9b03e Author: Aneesh Kumar K.V Date: Fri Apr 29 23:26:21 2016 +1000 powerpc/mm: vmalloc abstraction in preparation for radix The vmalloc range differs between hash and radix config. Hence make VMALLOC_START and related constants a variable which will be runtime initialized depending on whether hash or radix mode is active. Signed-off-by: Aneesh Kumar K.V [mpe: Fix missing init of ioremap_bot in pgtable_64.c for ppc64e] Signed-off-by: Michael Ellerman Not sure how we are getting different results though. I have attached my bisect log and the suspect commit, whcih is quite large. I'm not sure which part of it is at fault. I have some jobs to do now, but hope to get tesing this later today. Regards Darren ----=_BOUNDARY.6c7b88401f2d2ffb.de Content-Type: text/plain; name="git.bisectlog.txt" Content-Disposition: attachment; filename="git.bisectlog.txt"; size=2744 git bisect start # bad: [ed2608faa0f701b1dbc65277a9e5c7ff7118bfd4] Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input git bisect bad ed2608faa0f701b1dbc65277a9e5c7ff7118bfd4 # good: [8ffb4103f5e28d7e7890ed4774d8e009f253f56e] IB/qib: Use cache inhibitted and guarded mapping on powerpc git bisect good 8ffb4103f5e28d7e7890ed4774d8e009f253f56e # good: [801faf0db8947e01877920e848a4d338dd7a99e7] mm/slab: lockless decision to grow cache git bisect good 801faf0db8947e01877920e848a4d338dd7a99e7 # bad: [2f37dd131c5d3a2eac21cd5baf80658b1b02a8ac] Merge tag 'staging-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging git bisect bad 2f37dd131c5d3a2eac21cd5baf80658b1b02a8ac # bad: [be1332c0994fbf016fa4ef0f0c4acda566fe6cb3] Merge tag 'gfs2-4.7.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 git bisect bad be1332c0994fbf016fa4ef0f0c4acda566fe6cb3 # good: [f4c80d5a16eb4b08a0d9ade154af1ebdc63f5752] Merge tag 'sound-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound git bisect good f4c80d5a16eb4b08a0d9ade154af1ebdc63f5752 # good: [a1c28b75a95808161cacbb3531c418abe248994e] Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm git bisect good a1c28b75a95808161cacbb3531c418abe248994e # bad: [6eb59af580dcffc6f6982ac8ef6d27a1a5f26b27] Merge tag 'mfd-for-linus-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd git bisect bad 6eb59af580dcffc6f6982ac8ef6d27a1a5f26b27 # bad: [4fad494321351f0ac412945c6a464109ad96734a] powerpc/powernv: Simplify pnv_eeh_reset() git bisect bad 4fad494321351f0ac412945c6a464109ad96734a # bad: [43a5c684270ee9b5b13c91ec048831dd5b7e0cdc] powerpc/mm/radix: Make sure swapper pgdir is properly aligned git bisect bad 43a5c684270ee9b5b13c91ec048831dd5b7e0cdc # good: [a9252aaefe7e72133e7a37e0eff4e950a4f33af1] powerpc/mm: Move hugetlb and THP related pmd accessors to pgtable.h git bisect good a9252aaefe7e72133e7a37e0eff4e950a4f33af1 # good: [177ba7c647f37bc3f31667192059ee794347d79d] powerpc/mm/radix: Limit paca allocation in radix git bisect good 177ba7c647f37bc3f31667192059ee794347d79d # good: [934828edfadc43be07e53429ce501741bedf4a5e] powerpc/mm: Make 4K and 64K use pte_t for pgtable_t git bisect good 934828edfadc43be07e53429ce501741bedf4a5e # bad: [a3dece6d69b0ad21b64104dff508c67a1a1f14dd] powerpc/radix: Update MMU cache git bisect bad a3dece6d69b0ad21b64104dff508c67a1a1f14dd # good: [4dfb88ca9b66690d21030ccacc1cca73db90655e] powerpc/mm: Update pte filter for radix git bisect good 4dfb88ca9b66690d21030ccacc1cca73db90655e # bad: [d6a9996e84ac4beb7713e9485f4563e100a9b03e] powerpc/mm: vmalloc abstraction in preparation for radix git bisect bad d6a9996e84ac4beb7713e9485f4563e100a9b03e ----=_BOUNDARY.6c7b88401f2d2ffb.de Content-Type: text/plain; name="HEAD.txt" Content-Disposition: attachment; filename="HEAD.txt"; size=10182 commit d6a9996e84ac4beb7713e9485f4563e100a9b03e Author: Aneesh Kumar K.V Date: Fri Apr 29 23:26:21 2016 +1000 powerpc/mm: vmalloc abstraction in preparation for radix The vmalloc range differs between hash and radix config. Hence make VMALLOC_START and related constants a variable which will be runtime initialized depending on whether hash or radix mode is active. Signed-off-by: Aneesh Kumar K.V [mpe: Fix missing init of ioremap_bot in pgtable_64.c for ppc64e] Signed-off-by: Michael Ellerman diff --git a/arch/powerpc/include/asm/book3s/64/hash.h b/arch/powerpc/include/asm/book3s/64/hash.h index cd3e915..f61cad3 100644 --- a/arch/powerpc/include/asm/book3s/64/hash.h +++ b/arch/powerpc/include/asm/book3s/64/hash.h @@ -45,17 +45,17 @@ /* * Define the address range of the kernel non-linear virtual area */ -#define KERN_VIRT_START ASM_CONST(0xD000000000000000) -#define KERN_VIRT_SIZE ASM_CONST(0x0000100000000000) +#define H_KERN_VIRT_START ASM_CONST(0xD000000000000000) +#define H_KERN_VIRT_SIZE ASM_CONST(0x0000100000000000) /* * The vmalloc space starts at the beginning of that region, and * occupies half of it on hash CPUs and a quarter of it on Book3E * (we keep a quarter for the virtual memmap) */ -#define VMALLOC_START KERN_VIRT_START -#define VMALLOC_SIZE (KERN_VIRT_SIZE >> 1) -#define VMALLOC_END (VMALLOC_START + VMALLOC_SIZE) +#define H_VMALLOC_START H_KERN_VIRT_START +#define H_VMALLOC_SIZE (H_KERN_VIRT_SIZE >> 1) +#define H_VMALLOC_END (H_VMALLOC_START + H_VMALLOC_SIZE) /* * Region IDs @@ -64,7 +64,7 @@ #define REGION_MASK (0xfUL << REGION_SHIFT) #define REGION_ID(ea) (((unsigned long)(ea)) >> REGION_SHIFT) -#define VMALLOC_REGION_ID (REGION_ID(VMALLOC_START)) +#define VMALLOC_REGION_ID (REGION_ID(H_VMALLOC_START)) #define KERNEL_REGION_ID (REGION_ID(PAGE_OFFSET)) #define VMEMMAP_REGION_ID (0xfUL) /* Server only */ #define USER_REGION_ID (0UL) @@ -73,7 +73,7 @@ * Defines the address of the vmemap area, in its own region on * hash table CPUs. */ -#define VMEMMAP_BASE (VMEMMAP_REGION_ID << REGION_SHIFT) +#define H_VMEMMAP_BASE (VMEMMAP_REGION_ID << REGION_SHIFT) #ifdef CONFIG_PPC_MM_SLICES #define HAVE_ARCH_UNMAPPED_AREA diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgtable.h index 32a9756..f5628f9 100644 --- a/arch/powerpc/include/asm/book3s/64/pgtable.h +++ b/arch/powerpc/include/asm/book3s/64/pgtable.h @@ -208,6 +208,18 @@ extern unsigned long __pgd_val_bits; #define PUD_MASKED_BITS 0xc0000000000000ffUL /* Bits to mask out from a PGD to get to the PUD page */ #define PGD_MASKED_BITS 0xc0000000000000ffUL + +extern unsigned long __vmalloc_start; +extern unsigned long __vmalloc_end; +#define VMALLOC_START __vmalloc_start +#define VMALLOC_END __vmalloc_end + +extern unsigned long __kernel_virt_start; +extern unsigned long __kernel_virt_size; +#define KERN_VIRT_START __kernel_virt_start +#define KERN_VIRT_SIZE __kernel_virt_size +extern struct page *vmemmap; +extern unsigned long ioremap_bot; #endif /* __ASSEMBLY__ */ #include @@ -220,7 +232,6 @@ extern unsigned long __pgd_val_bits; #endif #include - /* * The second half of the kernel virtual space is used for IO mappings, * it's itself carved into the PIO region (ISA and PHB IO space) and @@ -239,8 +250,6 @@ extern unsigned long __pgd_val_bits; #define IOREMAP_BASE (PHB_IO_END) #define IOREMAP_END (KERN_VIRT_START + KERN_VIRT_SIZE) -#define vmemmap ((struct page *)VMEMMAP_BASE) - /* Advertise special mapping type for AGP */ #define HAVE_PAGE_AGP diff --git a/arch/powerpc/include/asm/book3s/64/radix.h b/arch/powerpc/include/asm/book3s/64/radix.h index 63eb629..f470902 100644 --- a/arch/powerpc/include/asm/book3s/64/radix.h +++ b/arch/powerpc/include/asm/book3s/64/radix.h @@ -31,6 +31,74 @@ RADIX_PUD_INDEX_SIZE + RADIX_PGD_INDEX_SIZE + PAGE_SHIFT) #define RADIX_PGTABLE_RANGE (ASM_CONST(1) << RADIX_PGTABLE_EADDR_SIZE) +/* + * We support 52 bit address space, Use top bit for kernel + * virtual mapping. Also make sure kernel fit in the top + * quadrant. + * + * +------------------+ + * +------------------+ Kernel virtual map (0xc008000000000000) + * | | + * | | + * | | + * 0b11......+------------------+ Kernel linear map (0xc....) + * | | + * | 2 quadrant | + * | | + * 0b10......+------------------+ + * | | + * | 1 quadrant | + * | | + * 0b01......+------------------+ + * | | + * | 0 quadrant | + * | | + * 0b00......+------------------+ + * + * + * 3rd quadrant expanded: + * +------------------------------+ + * | | + * | | + * | | + * +------------------------------+ Kernel IO map end (0xc010000000000000) + * | | + * | | + * | 1/2 of virtual map | + * | | + * | | + * +------------------------------+ Kernel IO map start + * | | + * | 1/4 of virtual map | + * | | + * +------------------------------+ Kernel vmemap start + * | | + * | 1/4 of virtual map | + * | | + * +------------------------------+ Kernel virt start (0xc008000000000000) + * | | + * | | + * | | + * +------------------------------+ Kernel linear (0xc.....) + */ + +#define RADIX_KERN_VIRT_START ASM_CONST(0xc008000000000000) +#define RADIX_KERN_VIRT_SIZE ASM_CONST(0x0008000000000000) + +/* + * The vmalloc space starts at the beginning of that region, and + * occupies a quarter of it on radix config. + * (we keep a quarter for the virtual memmap) + */ +#define RADIX_VMALLOC_START RADIX_KERN_VIRT_START +#define RADIX_VMALLOC_SIZE (RADIX_KERN_VIRT_SIZE >> 2) +#define RADIX_VMALLOC_END (RADIX_VMALLOC_START + RADIX_VMALLOC_SIZE) +/* + * Defines the address of the vmemap area, in its own region on + * hash table CPUs. + */ +#define RADIX_VMEMMAP_BASE (RADIX_VMALLOC_END) + #ifndef __ASSEMBLY__ #define RADIX_PTE_TABLE_SIZE (sizeof(pte_t) << RADIX_PTE_INDEX_SIZE) #define RADIX_PMD_TABLE_SIZE (sizeof(pmd_t) << RADIX_PMD_INDEX_SIZE) diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index 41503d7..3759df5 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c @@ -38,7 +38,7 @@ * ISA drivers use hard coded offsets. If no ISA bus exists nothing * is mapped on the first 64K of IO space */ -unsigned long pci_io_base = ISA_IO_BASE; +unsigned long pci_io_base; EXPORT_SYMBOL(pci_io_base); static int __init pcibios_init(void) @@ -47,6 +47,7 @@ static int __init pcibios_init(void) printk(KERN_INFO "PCI: Probing PCI hardware\n"); + pci_io_base = ISA_IO_BASE; /* For now, override phys_mem_access_prot. If we need it,g * later, we may move that initialization to each ppc_md */ diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index 64165a7..68aee43 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c @@ -889,6 +889,14 @@ void __init hash__early_init_mmu(void) __pmd_val_bits = 0; __pud_val_bits = 0; __pgd_val_bits = 0; + + __kernel_virt_start = H_KERN_VIRT_START; + __kernel_virt_size = H_KERN_VIRT_SIZE; + __vmalloc_start = H_VMALLOC_START; + __vmalloc_end = H_VMALLOC_END; + vmemmap = (struct page *)H_VMEMMAP_BASE; + ioremap_bot = IOREMAP_BASE; + /* Initialize the MMU Hash table and create the linear mapping * of memory. Has to be done before SLB initialization as this is * currently where the page size encoding is obtained. diff --git a/arch/powerpc/mm/pgtable-radix.c b/arch/powerpc/mm/pgtable-radix.c index 6182b6c..13afacd 100644 --- a/arch/powerpc/mm/pgtable-radix.c +++ b/arch/powerpc/mm/pgtable-radix.c @@ -328,6 +328,13 @@ void __init radix__early_init_mmu(void) __pud_val_bits = RADIX_PUD_VAL_BITS; __pgd_val_bits = RADIX_PGD_VAL_BITS; + __kernel_virt_start = RADIX_KERN_VIRT_START; + __kernel_virt_size = RADIX_KERN_VIRT_SIZE; + __vmalloc_start = RADIX_VMALLOC_START; + __vmalloc_end = RADIX_VMALLOC_END; + vmemmap = (struct page *)RADIX_VMEMMAP_BASE; + ioremap_bot = IOREMAP_BASE; + radix_init_page_sizes(); if (!firmware_has_feature(FW_FEATURE_LPAR)) radix_init_partition_table(); diff --git a/arch/powerpc/mm/pgtable_64.c b/arch/powerpc/mm/pgtable_64.c index b8c75e6..216e2bd 100644 --- a/arch/powerpc/mm/pgtable_64.c +++ b/arch/powerpc/mm/pgtable_64.c @@ -97,9 +97,20 @@ unsigned long __pud_val_bits; EXPORT_SYMBOL(__pud_val_bits); unsigned long __pgd_val_bits; EXPORT_SYMBOL(__pgd_val_bits); - -#endif +unsigned long __kernel_virt_start; +EXPORT_SYMBOL(__kernel_virt_start); +unsigned long __kernel_virt_size; +EXPORT_SYMBOL(__kernel_virt_size); +unsigned long __vmalloc_start; +EXPORT_SYMBOL(__vmalloc_start); +unsigned long __vmalloc_end; +EXPORT_SYMBOL(__vmalloc_end); +struct page *vmemmap; +EXPORT_SYMBOL(vmemmap); +unsigned long ioremap_bot; +#else /* !CONFIG_PPC_BOOK3S_64 */ unsigned long ioremap_bot = IOREMAP_BASE; +#endif /** * __ioremap_at - Low level function to establish the page tables diff --git a/arch/powerpc/mm/slb_low.S b/arch/powerpc/mm/slb_low.S index 15b8f71..dfdb90c 100644 --- a/arch/powerpc/mm/slb_low.S +++ b/arch/powerpc/mm/slb_low.S @@ -91,7 +91,7 @@ slb_miss_kernel_load_vmemmap: * can be demoted from 64K -> 4K dynamically on some machines */ clrldi r11,r10,48 - cmpldi r11,(VMALLOC_SIZE >> 28) - 1 + cmpldi r11,(H_VMALLOC_SIZE >> 28) - 1 bgt 5f lhz r11,PACAVMALLOCSLLP(r13) b 6f ----=_BOUNDARY.6c7b88401f2d2ffb.de-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [81.169.146.217]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rPqbp6DT7zDqJ1 for ; Wed, 8 Jun 2016 23:51:34 +1000 (AEST) Subject: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE To: Darren Stevens , Michael Ellerman , "Aneesh Kumar K.V" , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, Michael Ellerman , Julian Margetson , Adrian Cox , "R.T.Dickinson" , "R.T.Dickinson" , Pat Wall , Pat Wall , "contact@a-eon.com" , Matthew Leaman , luigi burdo , Christian Zigotzky References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> <874m99uibc.fsf@skywalker.in.ibm.com> <1465174304.12265.0.camel@ellerman.id.au> <50194690-18ac-edfd-42cb-8f1cc96055c9@xenosoft.de> <484bd17c3f3.74dd55e@auth.smtp.1and1.co.uk> From: Christian Zigotzky Message-ID: <18d21f44-295c-d177-6283-7bebf49382dd@xenosoft.de> Date: Wed, 8 Jun 2016 15:51:00 +0200 MIME-Version: 1.0 In-Reply-To: <484bd17c3f3.74dd55e@auth.smtp.1and1.co.uk> Content-Type: text/plain; charset=utf-8; format=flowed List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi All, I tried to revert this commit but unfortunately I doesn't work: git revert d6a9996e84ac4beb7713e9485f4563e100a9b03e error: could not revert d6a9996... powerpc/mm: vmalloc abstraction in preparation for radix hint: after resolving the conflicts, mark the corrected paths hint: with 'git add ' or 'git rm ' hint: and commit the result with 'git commit' Any hints? Thanks, Christian On 08 June 2016 at 1:33 PM, Darren Stevens wrote: > Hello Christian > > That's not where I ended up with my bisect, this commit is about 10 before the > one I found to be bad, which is: > > commit d6a9996e84ac4beb7713e9485f4563e100a9b03e > Author: Aneesh Kumar K.V > Date: Fri Apr 29 23:26:21 2016 +1000 > > powerpc/mm: vmalloc abstraction in preparation for radix > > The vmalloc range differs between hash and radix config. Hence make > VMALLOC_START and related constants a variable which will be runtime > initialized depending on whether hash or radix mode is active. > > Signed-off-by: Aneesh Kumar K.V > [mpe: Fix missing init of ioremap_bot in pgtable_64.c for ppc64e] > Signed-off-by: Michael Ellerman > > Not sure how we are getting different results though. I have attached my > bisect log and the suspect commit, whcih is quite large. I'm not sure which > part of it is at fault. I have some jobs to do now, but hope to get tesing > this later today. > > Regards > Darren From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rPqcn3nblzDqn7 for ; Wed, 8 Jun 2016 23:52:25 +1000 (AEST) Message-ID: <1465393944.10567.6.camel@ellerman.id.au> Subject: Re: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE From: Michael Ellerman To: Darren Stevens , Christian Zigotzky Cc: "Aneesh Kumar K.V" , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, Michael Ellerman , Julian Margetson , Adrian Cox , "R.T.Dickinson" , "R.T.Dickinson" , Pat Wall , Pat Wall , "contact@a-eon.com" , Matthew Leaman , luigi burdo Date: Wed, 08 Jun 2016 23:52:24 +1000 In-Reply-To: <484bd17c3f3.74dd55e@auth.smtp.1and1.co.uk> References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> <874m99uibc.fsf@skywalker.in.ibm.com> <1465174304.12265.0.camel@ellerman.id.au> <50194690-18ac-edfd-42cb-8f1cc96055c9@xenosoft.de> <484bd17c3f3.74dd55e@auth.smtp.1and1.co.uk> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Wed, 2016-06-08 at 12:33 +0100, Darren Stevens wrote: > On 07/06/2016, Christian Zigotzky wrote: > > > > 764041e0f43cc7846f6d8eb246d65b53cc06c764 is the first bad commit > > commit 764041e0f43cc7846f6d8eb246d65b53cc06c764 > > Author: Aneesh Kumar K.V > > Date: Fri Apr 29 23:26:09 2016 +1000 > > > > powerpc/mm/radix: Add checks in slice code to catch radix usage > > > > That's not where I ended up with my bisect, this commit is about 10 before the > one I found to be bad, which is: > > commit d6a9996e84ac4beb7713e9485f4563e100a9b03e > Author: Aneesh Kumar K.V > Date: Fri Apr 29 23:26:21 2016 +1000 > > powerpc/mm: vmalloc abstraction in preparation for radix > > The vmalloc range differs between hash and radix config. Hence make > VMALLOC_START and related constants a variable which will be runtime > initialized depending on whether hash or radix mode is active. > > Signed-off-by: Aneesh Kumar K.V > [mpe: Fix missing init of ioremap_bot in pgtable_64.c for ppc64e] > Signed-off-by: Michael Ellerman > > Not sure how we are getting different results though. I have attached my > bisect log and the suspect commit, whcih is quite large. I'm not sure which > part of it is at fault. I have some jobs to do now, but hope to get tesing > this later today. That one is more likely to be the problem, though I don't see anything glaringly wrong with it. Does your patch use any of the constants that are changed in that file? They now aren't constants, they're initialised at boot, so if you use them too early you'll get junk. cheers From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e19.ny.us.ibm.com (e19.ny.us.ibm.com [129.33.205.209]) (using TLSv1.2 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rPsN843R3zDqn2 for ; Thu, 9 Jun 2016 01:11:36 +1000 (AEST) Received: from localhost by e19.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 8 Jun 2016 11:11:30 -0400 From: "Aneesh Kumar K.V" To: Darren Stevens , Christian Zigotzky Cc: Michael Ellerman , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, Michael Ellerman , Julian Margetson , Adrian Cox , "R.T.Dickinson" , "R.T.Dickinson" , Pat Wall , Pat Wall , "contact@a-eon.com" , Matthew Leaman , luigi burdo Subject: Re: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE In-Reply-To: <484bd17c3f3.74dd55e@auth.smtp.1and1.co.uk> References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> <874m99uibc.fsf@skywalker.in.ibm.com> <1465174304.12265.0.camel@ellerman.id.au> <50194690-18ac-edfd-42cb-8f1cc96055c9@xenosoft.de> <484bd17c3f3.74dd55e@auth.smtp.1and1.co.uk> Date: Wed, 08 Jun 2016 20:41:18 +0530 Message-ID: <87r3c71zs9.fsf@skywalker.in.ibm.com> MIME-Version: 1.0 Content-Type: text/plain List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Darren Stevens writes: > Hello Christian > That's not where I ended up with my bisect, this commit is about 10 before the > one I found to be bad, which is: > > commit d6a9996e84ac4beb7713e9485f4563e100a9b03e > Author: Aneesh Kumar K.V > Date: Fri Apr 29 23:26:21 2016 +1000 > > powerpc/mm: vmalloc abstraction in preparation for radix > > The vmalloc range differs between hash and radix config. Hence make > VMALLOC_START and related constants a variable which will be runtime > initialized depending on whether hash or radix mode is active. > > Signed-off-by: Aneesh Kumar K.V > [mpe: Fix missing init of ioremap_bot in pgtable_64.c for ppc64e] > Signed-off-by: Michael Ellerman > Can you check the value of ISA_IO_BASE where you are using it. If you are calling it early, you will find wrong value in that. With the latest kernel it is a variable and is initialized in hash__early_init_mmu(); -aneesh From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [81.169.146.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rPt9z6qWVzDq5c for ; Thu, 9 Jun 2016 01:47:51 +1000 (AEST) Subject: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE To: "Aneesh Kumar K.V" , Darren Stevens , Michael Ellerman , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, Michael Ellerman , Julian Margetson , Adrian Cox , "R.T.Dickinson" , "R.T.Dickinson" , Pat Wall , Pat Wall , "contact@a-eon.com" , Matthew Leaman , luigi burdo References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> <874m99uibc.fsf@skywalker.in.ibm.com> <1465174304.12265.0.camel@ellerman.id.au> <50194690-18ac-edfd-42cb-8f1cc96055c9@xenosoft.de> <484bd17c3f3.74dd55e@auth.smtp.1and1.co.uk> <87r3c71zs9.fsf@skywalker.in.ibm.com> From: Christian Zigotzky Message-ID: Date: Wed, 8 Jun 2016 17:47:23 +0200 MIME-Version: 1.0 In-Reply-To: <87r3c71zs9.fsf@skywalker.in.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi Aneesh, We use it only in the file "pci-common.c". Part of the Nemo patch with ISA_IO_BASE: diff -rupN linux-4.7/arch/powerpc/kernel/pci-common.c linux-4.7-nemo/arch/powerpc/kernel/pci-common.c --- linux-4.7/arch/powerpc/kernel/pci-common.c 2016-05-20 10:23:06.588299920 +0200 +++ linux-4.7-nemo/arch/powerpc/kernel/pci-common.c 2016-05-20 10:21:28.652296699 +0200 @@ -723,6 +723,19 @@ void pci_process_bridge_OF_ranges(struct isa_io_base = (unsigned long)hose->io_base_virt; #endif /* CONFIG_PPC32 */ + + +#ifdef CONFIG_PPC_PASEMI_SB600 + /* Workaround for lack of device tree. New for kernel 3.17: range.cpu_addr instead of cpu_addr and range.size instead of size Ch. Zigotzky */ + if (primary) { + __ioremap_at(range.cpu_addr, (void *)ISA_IO_BASE, + range.size, pgprot_val(pgprot_noncached(__pgprot(0)))); + hose->io_base_virt = (void *)_IO_BASE; + /* _IO_BASE needs unsigned long long for the kernel 3.17 Ch. Zigotzky */ + printk("Initialised io_base_virt 0x%lx _IO_BASE 0x%llx\n", (unsigned long)hose->io_base_virt, (unsigned long long)_IO_BASE); + } +#endif + Cheers, Christian On 08 June 2016 at 5:11 PM, Aneesh Kumar K.V wrote: > > Can you check the value of ISA_IO_BASE where you are > using it. If you are calling it early, you will find wrong value in > that. With the latest kernel it is a variable and is initialized in > hash__early_init_mmu(); > > -aneesh > > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mo6-p00-ob.smtp.rzone.de (mo6-p00-ob.smtp.rzone.de [IPv6:2a01:238:20a:202:5300::3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rQJqw5JXFzDqFm for ; Thu, 9 Jun 2016 18:48:44 +1000 (AEST) Subject: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE To: "Aneesh Kumar K.V" , Darren Stevens , Michael Ellerman , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, Michael Ellerman , Julian Margetson , Adrian Cox , "R.T.Dickinson" , "R.T.Dickinson" , Pat Wall , Pat Wall , "contact@a-eon.com" , Matthew Leaman , luigi burdo , Christian Zigotzky References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> <874m99uibc.fsf@skywalker.in.ibm.com> <1465174304.12265.0.camel@ellerman.id.au> <50194690-18ac-edfd-42cb-8f1cc96055c9@xenosoft.de> <484bd17c3f3.74dd55e@auth.smtp.1and1.co.uk> <87r3c71zs9.fsf@skywalker.in.ibm.com> From: Christian Zigotzky Message-ID: Date: Thu, 9 Jun 2016 10:48:15 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Shall I modify the workaround? Is the workaround for lack of the device tree the problem? FYI: The SB600 doesn't follow normal PCIe address decoding rules, as in its original use as an AMD south bridge it was designed to appear as if it were integrated into the north bridge. What shall I do? I don't know how long I can revert the PowerPC updates. - Christian On 08 June 2016 at 5:47 PM, Christian Zigotzky wrote: > Hi Aneesh, > > We use it only in the file "pci-common.c". > > Part of the Nemo patch with ISA_IO_BASE: > > diff -rupN linux-4.7/arch/powerpc/kernel/pci-common.c > linux-4.7-nemo/arch/powerpc/kernel/pci-common.c > --- linux-4.7/arch/powerpc/kernel/pci-common.c 2016-05-20 > 10:23:06.588299920 +0200 > +++ linux-4.7-nemo/arch/powerpc/kernel/pci-common.c 2016-05-20 > 10:21:28.652296699 +0200 > @@ -723,6 +723,19 @@ void pci_process_bridge_OF_ranges(struct > isa_io_base = > (unsigned long)hose->io_base_virt; > #endif /* CONFIG_PPC32 */ > + > + > +#ifdef CONFIG_PPC_PASEMI_SB600 > + /* Workaround for lack of device tree. New for > kernel 3.17: range.cpu_addr instead of cpu_addr and range.size instead > of size Ch. Zigotzky */ > + if (primary) { > + __ioremap_at(range.cpu_addr, (void > *)ISA_IO_BASE, > + range.size, > pgprot_val(pgprot_noncached(__pgprot(0)))); > + hose->io_base_virt = (void *)_IO_BASE; > + /* _IO_BASE needs unsigned long long for the kernel > 3.17 Ch. Zigotzky */ > + printk("Initialised io_base_virt 0x%lx > _IO_BASE 0x%llx\n", (unsigned long)hose->io_base_virt, (unsigned long > long)_IO_BASE); > + } > +#endif > + > > Cheers, > > Christian > > On 08 June 2016 at 5:11 PM, Aneesh Kumar K.V wrote: >> >> Can you check the value of ISA_IO_BASE where you are >> using it. If you are calling it early, you will find wrong value in >> that. With the latest kernel it is a variable and is initialized in >> hash__early_init_mmu(); >> >> -aneesh >> >> > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ozlabs.org (ozlabs.org [103.22.144.67]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rQN514Vf4zDq5c for ; Thu, 9 Jun 2016 21:15:17 +1000 (AEST) Message-ID: <1465470910.31662.10.camel@ellerman.id.au> Subject: Re: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE From: Michael Ellerman To: Christian Zigotzky , "Aneesh Kumar K.V" , Darren Stevens , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, Michael Ellerman , Julian Margetson , Adrian Cox , "R.T.Dickinson" , "R.T.Dickinson" , Pat Wall , Pat Wall , "contact@a-eon.com" , Matthew Leaman , luigi burdo , Christian Zigotzky Date: Thu, 09 Jun 2016 21:15:10 +1000 In-Reply-To: References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> <874m99uibc.fsf@skywalker.in.ibm.com> <1465174304.12265.0.camel@ellerman.id.au> <50194690-18ac-edfd-42cb-8f1cc96055c9@xenosoft.de> <484bd17c3f3.74dd55e@auth.smtp.1and1.co.uk> <87r3c71zs9.fsf@skywalker.in.ibm.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Thu, 2016-06-09 at 10:48 +0200, Christian Zigotzky wrote: > Shall I modify the workaround? Is the workaround for lack of the device > tree the problem? I don't think so. You could try this patch to try and isolate it: diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgtable.h index 88a5ecaa157b..ae2f2705e8a0 100644 --- a/arch/powerpc/include/asm/book3s/64/pgtable.h +++ b/arch/powerpc/include/asm/book3s/64/pgtable.h @@ -251,7 +251,7 @@ extern unsigned long ioremap_bot; * PHB_IO_BASE = ISA_IO_BASE + 64K to ISA_IO_BASE + 2G, PHB IO spaces * IOREMAP_BASE = ISA_IO_BASE + 2G to VMALLOC_START + PGTABLE_RANGE */ -#define KERN_IO_START (KERN_VIRT_START + (KERN_VIRT_SIZE >> 1)) +#define KERN_IO_START (H_KERN_VIRT_START + (H_KERN_VIRT_SIZE >> 1)) #define FULL_IO_SIZE 0x80000000ul #define ISA_IO_BASE (KERN_IO_START) #define ISA_IO_END (KERN_IO_START + 0x10000ul) cheers From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mo6-p00-ob.smtp.rzone.de (mo6-p00-ob.smtp.rzone.de [IPv6:2a01:238:20a:202:5300::3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rQQkK2qFjzDq68 for ; Thu, 9 Jun 2016 23:14:16 +1000 (AEST) Subject: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE To: Michael Ellerman , "Aneesh Kumar K.V" , Darren Stevens , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, Michael Ellerman , Julian Margetson , Adrian Cox , "R.T.Dickinson" , "R.T.Dickinson" , Pat Wall , Pat Wall , "contact@a-eon.com" , Matthew Leaman , luigi burdo , Christian Zigotzky References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> <874m99uibc.fsf@skywalker.in.ibm.com> <1465174304.12265.0.camel@ellerman.id.au> <50194690-18ac-edfd-42cb-8f1cc96055c9@xenosoft.de> <484bd17c3f3.74dd55e@auth.smtp.1and1.co.uk> <87r3c71zs9.fsf@skywalker.in.ibm.com> <1465470910.31662.10.camel@ellerman.id.au> From: Christian Zigotzky Message-ID: <40816527-1be8-329c-2be0-86c39062c2e9@xenosoft.de> Date: Thu, 9 Jun 2016 15:13:58 +0200 MIME-Version: 1.0 In-Reply-To: <1465470910.31662.10.camel@ellerman.id.au> Content-Type: text/plain; charset=utf-8; format=flowed List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Michael, Thank you for your patch. I was able to compile the kernel but unfortunately it doesn't boot. Do you have another hint or patch for me? Thanks in advance, Christian On 09 June 2016 at 1:15 PM, Michael Ellerman wrote: > On Thu, 2016-06-09 at 10:48 +0200, Christian Zigotzky wrote: > >> Shall I modify the workaround? Is the workaround for lack of the device >> tree the problem? > I don't think so. > > You could try this patch to try and isolate it: > > diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgtable.h > index 88a5ecaa157b..ae2f2705e8a0 100644 > --- a/arch/powerpc/include/asm/book3s/64/pgtable.h > +++ b/arch/powerpc/include/asm/book3s/64/pgtable.h > @@ -251,7 +251,7 @@ extern unsigned long ioremap_bot; > * PHB_IO_BASE = ISA_IO_BASE + 64K to ISA_IO_BASE + 2G, PHB IO spaces > * IOREMAP_BASE = ISA_IO_BASE + 2G to VMALLOC_START + PGTABLE_RANGE > */ > -#define KERN_IO_START (KERN_VIRT_START + (KERN_VIRT_SIZE >> 1)) > +#define KERN_IO_START (H_KERN_VIRT_START + (H_KERN_VIRT_SIZE >> 1)) > #define FULL_IO_SIZE 0x80000000ul > #define ISA_IO_BASE (KERN_IO_START) > #define ISA_IO_END (KERN_IO_START + 0x10000ul) > > > cheers > > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rSm1154HYzDqZV for ; Mon, 13 Jun 2016 18:20:05 +1000 (AEST) Message-ID: <1465805967.3022.14.camel@kernel.crashing.org> Subject: Re: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE From: Benjamin Herrenschmidt To: Christian Zigotzky , Michael Ellerman , "Aneesh Kumar K.V" , Darren Stevens , linuxppc-dev@lists.ozlabs.org, Michael Ellerman , Julian Margetson , Adrian Cox , "R.T.Dickinson" , "R.T.Dickinson" , Pat Wall , Pat Wall , "contact@a-eon.com" , Matthew Leaman , luigi burdo , Christian Zigotzky Date: Mon, 13 Jun 2016 18:19:27 +1000 In-Reply-To: <25BBCC66-53B2-4009-B2BA-CD1070EA71E9@xenosoft.de> References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> <874m99uibc.fsf@skywalker.in.ibm.com> <1465174304.12265.0.camel@ellerman.id.au> <50194690-18ac-edfd-42cb-8f1cc96055c9@xenosoft.de> <484bd17c3f3.74dd55e@auth.smtp.1and1.co.uk> <87r3c71zs9.fsf@skywalker.in.ibm.com> <1465470910.31662.10.camel@ellerman.id.au> <40816527-1be8-329c-2be0-86c39062c2e9@xenosoft.de> <25BBCC66-53B2-4009-B2BA-CD1070EA71E9@xenosoft.de> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, 2016-06-13 at 09:14 +0100, Christian Zigotzky wrote: > Can I disable the new PowerPC features with > > Radix MMU Support (PPC_RADIX_MMU) [Y/n/?] (NEW) -> n > > ????? > > I can't compile the RC3 without the PowerPC commits. Our kernel lost > the mainline kernel support. Revert of the three PowerPC commits > works but the kernel doesn't compile anymore. The right way to not have this problem anymore is to cleanup and submit your patches upstream so they don't break all the time :-) Cheers, Ben. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mo6-p00-ob.smtp.rzone.de (mo6-p00-ob.smtp.rzone.de [IPv6:2a01:238:20a:202:5300::3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rSlvn2l5ZzDqZV for ; Mon, 13 Jun 2016 18:15:33 +1000 (AEST) From: Christian Zigotzky Content-Type: multipart/alternative; boundary=Apple-Mail-D126BB2C-F286-4FA8-A423-D7EE8B53AAE9 Mime-Version: 1.0 (1.0) Subject: Re: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE Message-Id: <25BBCC66-53B2-4009-B2BA-CD1070EA71E9@xenosoft.de> Date: Mon, 13 Jun 2016 09:14:33 +0100 References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> <874m99uibc.fsf@skywalker.in.ibm.com> <1465174304.12265.0.camel@ellerman.id.au> <50194690-18ac-edfd-42cb-8f1cc96055c9@xenosoft.de> <484bd17c3f3.74dd55e@auth.smtp.1and1.co.uk> <87r3c71zs9.fsf@skywalker.in.ibm.com> <1465470910.31662.10.camel@ellerman.id.au> <40816527-1be8-329c-2be0-86c39062c2e9@xenosoft.de> In-Reply-To: <40816527-1be8-329c-2be0-86c39062c2e9@xenosoft.de> To: Michael Ellerman , "Aneesh Kumar K.V" , Darren Stevens , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, Michael Ellerman , Julian Margetson , Adrian Cox , "R.T.Dickinson" , "R.T.Dickinson" , Pat Wall , Pat Wall , "contact@a-eon.com" , Matthew Leaman , luigi burdo , Christian Zigotzky List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , --Apple-Mail-D126BB2C-F286-4FA8-A423-D7EE8B53AAE9 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Hi All, Can I disable the new PowerPC features with Radix MMU Support (PPC_RADIX_MMU) [Y/n/?] (NEW) -> n ????? I can't compile the RC3 without the PowerPC commits. Our kernel lost the mai= nline kernel support. Revert of the three PowerPC commits works but the kern= el doesn't compile anymore. Cheers, Christian Sent from my iPhone > On 09 Jun 2016, at 14:13, Christian Zigotzky wrot= e: >=20 > Michael, >=20 > Thank you for your patch. I was able to compile the kernel but unfortunate= ly it doesn't boot. >=20 > Do you have another hint or patch for me? >=20 > Thanks in advance, >=20 > Christian >=20 >> On 09 June 2016 at 1:15 PM, Michael Ellerman wrote: >>> On Thu, 2016-06-09 at 10:48 +0200, Christian Zigotzky wrote: >>>=20 >>> Shall I modify the workaround? Is the workaround for lack of the device >>> tree the problem? >> I don't think so. >>=20 >> You could try this patch to try and isolate it: >>=20 >> diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/= include/asm/book3s/64/pgtable.h >> index 88a5ecaa157b..ae2f2705e8a0 100644 >> --- a/arch/powerpc/include/asm/book3s/64/pgtable.h >> +++ b/arch/powerpc/include/asm/book3s/64/pgtable.h >> @@ -251,7 +251,7 @@ extern unsigned long ioremap_bot; >> * PHB_IO_BASE =3D ISA_IO_BASE + 64K to ISA_IO_BASE + 2G, PHB IO spaces= >> * IOREMAP_BASE =3D ISA_IO_BASE + 2G to VMALLOC_START + PGTABLE_RANGE >> */ >> -#define KERN_IO_START (KERN_VIRT_START + (KERN_VIRT_SIZE >> 1)) >> +#define KERN_IO_START (H_KERN_VIRT_START + (H_KERN_VIRT_SIZE >> 1)) >> #define FULL_IO_SIZE 0x80000000ul >> #define ISA_IO_BASE (KERN_IO_START) >> #define ISA_IO_END (KERN_IO_START + 0x10000ul) >>=20 >>=20 >> cheers >=20 --Apple-Mail-D126BB2C-F286-4FA8-A423-D7EE8B53AAE9 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Hi All,

Can I= disable the new PowerPC features with

Radix MMU Support (PPC_RADIX_MMU= ) [Y/n/?] (NEW) -> n

?????

I can't compile the RC3 without the Powe= rPC commits. Our kernel lost the mainline kernel support. Revert of the thre= e PowerPC commits works but the kernel doesn't compile anymore.
=

Cheers,

Sent from my iPhone

On 09 Jun 2016, at= 14:13, Christian Zigotzky <chz= igotzky@xenosoft.de> wrote:

Michael,

Thank you for your patch.= I was able to compile the kernel but unfortunately it doesn't boot.<= br>
Do you have another hint or patch for me?
Thanks in advance,

Christian

On 09 June 2016 at 1:15 PM, Mich= ael Ellerman wrote:
On Thu, 2016-0= 6-09 at 10:48 +0200, Christian Zigotzky wrote:

=
Shall I modify the workaround? Is the workar= ound for lack of the device
tree the problem?
I don't think so.

=
You could try this patch to try and isolate i= t:

diff --git a/arch/powerpc/include/asm/= book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgtable.h
index 88a5ecaa157b..ae2f2705e8= a0 100644
--- a/arch/= powerpc/include/asm/book3s/64/pgtable.h
+++ b/arch/powerpc/include/asm/book3s/64/pgtable.h=
@@ -251,7 +251,7 @@ extern u= nsigned long ioremap_bot;
<= span>   *  PHB_IO_BASE =3D ISA_IO_BASE + 64K to ISA_IO_BASE += 2G, PHB IO spaces
&= nbsp; * IOREMAP_BASE =3D ISA_IO_BASE + 2G to VMALLOC_START + PGTABLE_RA= NGE
  */
-#define KERN_IO_START=    (KERN_VIRT_START + (KERN_VIRT_SIZE >> 1))
+#define KERN_IO_START    = ;(H_KERN_VIRT_START + (H_KERN_VIRT_SIZE >> 1))
=
 #define FULL_IO_SIZE    0x8= 0000000ul
 #def= ine  ISA_IO_BASE    (KERN_IO_START)
 #define  ISA_IO_END    (= KERN_IO_START + 0x10000ul)
=

cheers



<= /html>= --Apple-Mail-D126BB2C-F286-4FA8-A423-D7EE8B53AAE9-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mo6-p00-ob.smtp.rzone.de (mo6-p00-ob.smtp.rzone.de [IPv6:2a01:238:20a:202:5300::11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rT1Cb6vCrzDqZx for ; Tue, 14 Jun 2016 04:15:07 +1000 (AEST) Subject: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE To: Benjamin Herrenschmidt , Michael Ellerman , "Aneesh Kumar K.V" , Darren Stevens , linuxppc-dev@lists.ozlabs.org, Michael Ellerman , Julian Margetson , Adrian Cox , "R.T.Dickinson" , "R.T.Dickinson" , Pat Wall , Pat Wall , "contact@a-eon.com" , Matthew Leaman , luigi burdo , Christian Zigotzky References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> <874m99uibc.fsf@skywalker.in.ibm.com> <1465174304.12265.0.camel@ellerman.id.au> <50194690-18ac-edfd-42cb-8f1cc96055c9@xenosoft.de> <484bd17c3f3.74dd55e@auth.smtp.1and1.co.uk> <87r3c71zs9.fsf@skywalker.in.ibm.com> <1465470910.31662.10.camel@ellerman.id.au> <40816527-1be8-329c-2be0-86c39062c2e9@xenosoft.de> <25BBCC66-53B2-4009-B2BA-CD1070EA71E9@xenosoft.de> <1465805967.3022.14.camel@kernel.crashing.org> From: Christian Zigotzky Message-ID: <575EF6BE.6020208@xenosoft.de> Date: Mon, 13 Jun 2016 20:09:02 +0200 MIME-Version: 1.0 In-Reply-To: <1465805967.3022.14.camel@kernel.crashing.org> Content-Type: text/plain; charset=utf-8 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi Ben, I could send you a patch but it doesn't work with the three PowerPC commits. I think we have to fix the boot issue at first. After that we can integrate the first patch for the Nemo board. Cheers, Christian On 13 June 2016 at 10:19 AM, Benjamin Herrenschmidt wrote: > > The right way to not have this problem anymore is to cleanup and > submit your patches upstream so they don't break all the time :-) > > Cheers, > Ben. > > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mo6-p04-ob.smtp.rzone.de (mo6-p04-ob.smtp.rzone.de [IPv6:2a01:238:20a:202:5304::3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rZYyb5KcgzDqRd for ; Thu, 23 Jun 2016 05:08:07 +1000 (AEST) Subject: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE To: Benjamin Herrenschmidt , Michael Ellerman , "Aneesh Kumar K.V" , Darren Stevens , linuxppc-dev@lists.ozlabs.org, Michael Ellerman , Julian Margetson , Adrian Cox , "R.T.Dickinson" , "R.T.Dickinson" , Pat Wall , Pat Wall , "contact@a-eon.com" , Matthew Leaman , luigi burdo , Christian Zigotzky References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> <874m99uibc.fsf@skywalker.in.ibm.com> <1465174304.12265.0.camel@ellerman.id.au> <50194690-18ac-edfd-42cb-8f1cc96055c9@xenosoft.de> <484bd17c3f3.74dd55e@auth.smtp.1and1.co.uk> <87r3c71zs9.fsf@skywalker.in.ibm.com> <1465470910.31662.10.camel@ellerman.id.au> <40816527-1be8-329c-2be0-86c39062c2e9@xenosoft.de> <25BBCC66-53B2-4009-B2BA-CD1070EA71E9@xenosoft.de> <1465805967.3022.14.camel@kernel.crashing.org> <575EF6BE.6020208@xenosoft.de> From: Christian Zigotzky Message-ID: <576AE1D7.7090301@xenosoft.de> Date: Wed, 22 Jun 2016 21:07:03 +0200 MIME-Version: 1.0 In-Reply-To: <575EF6BE.6020208@xenosoft.de> Content-Type: multipart/mixed; boundary="------------000807080801060705050502" List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , This is a multi-part message in MIME format. --------------000807080801060705050502 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Hi All, Please find attached Darren's patch. With this patch, the Nemo board boots. That means, the problematic source code is somewhere in this patch. Which file in this patch is responsible for starting the kernel? Thanks, Christian On 13 June 2016 at 8:09 PM, Christian Zigotzky wrote: > Hi Ben, > > I could send you a patch but it doesn't work with the three PowerPC > commits. I think we have to fix the boot issue at first. After that we > can integrate the first patch for the Nemo board. > > Cheers, > > Christian > > On 13 June 2016 at 10:19 AM, Benjamin Herrenschmidt wrote: >> The right way to not have this problem anymore is to cleanup and >> submit your patches upstream so they don't break all the time :-) >> >> Cheers, >> Ben. >> >> --------------000807080801060705050502 Content-Type: text/x-patch; name="nemo_4.7.0rc3.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="nemo_4.7.0rc3.patch" diff --git a/arch/powerpc/include/asm/book3s/64/hash.h b/arch/powerpc/include/asm/book3s/64/hash.h index f61cad3..cd3e915 100644 --- a/arch/powerpc/include/asm/book3s/64/hash.h +++ b/arch/powerpc/include/asm/book3s/64/hash.h @@ -45,17 +45,17 @@ /* * Define the address range of the kernel non-linear virtual area */ -#define H_KERN_VIRT_START ASM_CONST(0xD000000000000000) -#define H_KERN_VIRT_SIZE ASM_CONST(0x0000100000000000) +#define KERN_VIRT_START ASM_CONST(0xD000000000000000) +#define KERN_VIRT_SIZE ASM_CONST(0x0000100000000000) /* * The vmalloc space starts at the beginning of that region, and * occupies half of it on hash CPUs and a quarter of it on Book3E * (we keep a quarter for the virtual memmap) */ -#define H_VMALLOC_START H_KERN_VIRT_START -#define H_VMALLOC_SIZE (H_KERN_VIRT_SIZE >> 1) -#define H_VMALLOC_END (H_VMALLOC_START + H_VMALLOC_SIZE) +#define VMALLOC_START KERN_VIRT_START +#define VMALLOC_SIZE (KERN_VIRT_SIZE >> 1) +#define VMALLOC_END (VMALLOC_START + VMALLOC_SIZE) /* * Region IDs @@ -64,7 +64,7 @@ #define REGION_MASK (0xfUL << REGION_SHIFT) #define REGION_ID(ea) (((unsigned long)(ea)) >> REGION_SHIFT) -#define VMALLOC_REGION_ID (REGION_ID(H_VMALLOC_START)) +#define VMALLOC_REGION_ID (REGION_ID(VMALLOC_START)) #define KERNEL_REGION_ID (REGION_ID(PAGE_OFFSET)) #define VMEMMAP_REGION_ID (0xfUL) /* Server only */ #define USER_REGION_ID (0UL) @@ -73,7 +73,7 @@ * Defines the address of the vmemap area, in its own region on * hash table CPUs. */ -#define H_VMEMMAP_BASE (VMEMMAP_REGION_ID << REGION_SHIFT) +#define VMEMMAP_BASE (VMEMMAP_REGION_ID << REGION_SHIFT) #ifdef CONFIG_PPC_MM_SLICES #define HAVE_ARCH_UNMAPPED_AREA diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgtable.h index 88a5eca..bdfea62 100644 --- a/arch/powerpc/include/asm/book3s/64/pgtable.h +++ b/arch/powerpc/include/asm/book3s/64/pgtable.h @@ -218,18 +218,6 @@ extern unsigned long __pte_frag_size_shift; #define PUD_MASKED_BITS 0xc0000000000000ffUL /* Bits to mask out from a PGD to get to the PUD page */ #define PGD_MASKED_BITS 0xc0000000000000ffUL - -extern unsigned long __vmalloc_start; -extern unsigned long __vmalloc_end; -#define VMALLOC_START __vmalloc_start -#define VMALLOC_END __vmalloc_end - -extern unsigned long __kernel_virt_start; -extern unsigned long __kernel_virt_size; -#define KERN_VIRT_START __kernel_virt_start -#define KERN_VIRT_SIZE __kernel_virt_size -extern struct page *vmemmap; -extern unsigned long ioremap_bot; #endif /* __ASSEMBLY__ */ #include @@ -242,6 +230,7 @@ extern unsigned long ioremap_bot; #endif #include + /* * The second half of the kernel virtual space is used for IO mappings, * it's itself carved into the PIO region (ISA and PHB IO space) and @@ -260,6 +249,8 @@ extern unsigned long ioremap_bot; #define IOREMAP_BASE (PHB_IO_END) #define IOREMAP_END (KERN_VIRT_START + KERN_VIRT_SIZE) +#define vmmemap ((struct page *)VMEMMAP_BASE) + /* Advertise special mapping type for AGP */ #define HAVE_PAGE_AGP diff --git a/arch/powerpc/include/asm/book3s/64/radix.h b/arch/powerpc/include/asm/book3s/64/radix.h index 937d4e2..a8b24d6 100644 --- a/arch/powerpc/include/asm/book3s/64/radix.h +++ b/arch/powerpc/include/asm/book3s/64/radix.h @@ -31,74 +31,6 @@ RADIX_PUD_INDEX_SIZE + RADIX_PGD_INDEX_SIZE + PAGE_SHIFT) #define RADIX_PGTABLE_RANGE (ASM_CONST(1) << RADIX_PGTABLE_EADDR_SIZE) -/* - * We support 52 bit address space, Use top bit for kernel - * virtual mapping. Also make sure kernel fit in the top - * quadrant. - * - * +------------------+ - * +------------------+ Kernel virtual map (0xc008000000000000) - * | | - * | | - * | | - * 0b11......+------------------+ Kernel linear map (0xc....) - * | | - * | 2 quadrant | - * | | - * 0b10......+------------------+ - * | | - * | 1 quadrant | - * | | - * 0b01......+------------------+ - * | | - * | 0 quadrant | - * | | - * 0b00......+------------------+ - * - * - * 3rd quadrant expanded: - * +------------------------------+ - * | | - * | | - * | | - * +------------------------------+ Kernel IO map end (0xc010000000000000) - * | | - * | | - * | 1/2 of virtual map | - * | | - * | | - * +------------------------------+ Kernel IO map start - * | | - * | 1/4 of virtual map | - * | | - * +------------------------------+ Kernel vmemap start - * | | - * | 1/4 of virtual map | - * | | - * +------------------------------+ Kernel virt start (0xc008000000000000) - * | | - * | | - * | | - * +------------------------------+ Kernel linear (0xc.....) - */ - -#define RADIX_KERN_VIRT_START ASM_CONST(0xc008000000000000) -#define RADIX_KERN_VIRT_SIZE ASM_CONST(0x0008000000000000) - -/* - * The vmalloc space starts at the beginning of that region, and - * occupies a quarter of it on radix config. - * (we keep a quarter for the virtual memmap) - */ -#define RADIX_VMALLOC_START RADIX_KERN_VIRT_START -#define RADIX_VMALLOC_SIZE (RADIX_KERN_VIRT_SIZE >> 2) -#define RADIX_VMALLOC_END (RADIX_VMALLOC_START + RADIX_VMALLOC_SIZE) -/* - * Defines the address of the vmemap area, in its own region on - * hash table CPUs. - */ -#define RADIX_VMEMMAP_BASE (RADIX_VMALLOC_END) - #ifndef __ASSEMBLY__ #define RADIX_PTE_TABLE_SIZE (sizeof(pte_t) << RADIX_PTE_INDEX_SIZE) #define RADIX_PMD_TABLE_SIZE (sizeof(pmd_t) << RADIX_PMD_INDEX_SIZE) diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index 3759df5..41503d7 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c @@ -38,7 +38,7 @@ * ISA drivers use hard coded offsets. If no ISA bus exists nothing * is mapped on the first 64K of IO space */ -unsigned long pci_io_base; +unsigned long pci_io_base = ISA_IO_BASE; EXPORT_SYMBOL(pci_io_base); static int __init pcibios_init(void) @@ -47,7 +47,6 @@ static int __init pcibios_init(void) printk(KERN_INFO "PCI: Probing PCI hardware\n"); - pci_io_base = ISA_IO_BASE; /* For now, override phys_mem_access_prot. If we need it,g * later, we may move that initialization to each ppc_md */ diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index b2740c6..bfbb3c8 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c @@ -910,14 +910,6 @@ void __init hash__early_init_mmu(void) __pmd_val_bits = 0; __pud_val_bits = 0; __pgd_val_bits = 0; - - __kernel_virt_start = H_KERN_VIRT_START; - __kernel_virt_size = H_KERN_VIRT_SIZE; - __vmalloc_start = H_VMALLOC_START; - __vmalloc_end = H_VMALLOC_END; - vmemmap = (struct page *)H_VMEMMAP_BASE; - ioremap_bot = IOREMAP_BASE; - /* Initialize the MMU Hash table and create the linear mapping * of memory. Has to be done before SLB initialization as this is * currently where the page size encoding is obtained. diff --git a/arch/powerpc/mm/pgtable-radix.c b/arch/powerpc/mm/pgtable-radix.c index c939e6e..9c5de01f 100644 --- a/arch/powerpc/mm/pgtable-radix.c +++ b/arch/powerpc/mm/pgtable-radix.c @@ -325,12 +325,6 @@ void __init radix__early_init_mmu(void) __pud_val_bits = RADIX_PUD_VAL_BITS; __pgd_val_bits = RADIX_PGD_VAL_BITS; - __kernel_virt_start = RADIX_KERN_VIRT_START; - __kernel_virt_size = RADIX_KERN_VIRT_SIZE; - __vmalloc_start = RADIX_VMALLOC_START; - __vmalloc_end = RADIX_VMALLOC_END; - vmemmap = (struct page *)RADIX_VMEMMAP_BASE; - ioremap_bot = IOREMAP_BASE; /* * For now radix also use the same frag size */ diff --git a/arch/powerpc/mm/pgtable_64.c b/arch/powerpc/mm/pgtable_64.c index e009e06..1408776 100644 --- a/arch/powerpc/mm/pgtable_64.c +++ b/arch/powerpc/mm/pgtable_64.c @@ -94,24 +94,12 @@ unsigned long __pud_val_bits; EXPORT_SYMBOL(__pud_val_bits); unsigned long __pgd_val_bits; EXPORT_SYMBOL(__pgd_val_bits); -unsigned long __kernel_virt_start; -EXPORT_SYMBOL(__kernel_virt_start); -unsigned long __kernel_virt_size; -EXPORT_SYMBOL(__kernel_virt_size); -unsigned long __vmalloc_start; -EXPORT_SYMBOL(__vmalloc_start); -unsigned long __vmalloc_end; -EXPORT_SYMBOL(__vmalloc_end); -struct page *vmemmap; -EXPORT_SYMBOL(vmemmap); unsigned long __pte_frag_nr; EXPORT_SYMBOL(__pte_frag_nr); unsigned long __pte_frag_size_shift; EXPORT_SYMBOL(__pte_frag_size_shift); -unsigned long ioremap_bot; -#else /* !CONFIG_PPC_BOOK3S_64 */ +#endif /* !CONFIG_PPC_BOOK3S_64 */ unsigned long ioremap_bot = IOREMAP_BASE; -#endif /** * __ioremap_at - Low level function to establish the page tables diff --git a/arch/powerpc/mm/slb_low.S b/arch/powerpc/mm/slb_low.S index dfdb90c..15b8f71 100644 --- a/arch/powerpc/mm/slb_low.S +++ b/arch/powerpc/mm/slb_low.S @@ -91,7 +91,7 @@ slb_miss_kernel_load_vmemmap: * can be demoted from 64K -> 4K dynamically on some machines */ clrldi r11,r10,48 - cmpldi r11,(H_VMALLOC_SIZE >> 28) - 1 + cmpldi r11,(VMALLOC_SIZE >> 28) - 1 bgt 5f lhz r11,PACAVMALLOCSLLP(r13) b 6f --------------000807080801060705050502-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from COL004-OMC1S9.hotmail.com (col004-omc1s9.hotmail.com [65.55.34.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rZbBx6KWrzDqRd for ; Thu, 23 Jun 2016 06:03:53 +1000 (AEST) From: luigi burdo To: Christian Zigotzky , Benjamin Herrenschmidt , Michael Ellerman , "Aneesh Kumar K.V" , Darren Stevens , "linuxppc-dev@lists.ozlabs.org" , Michael Ellerman , Julian Margetson , Adrian Cox , R.T.Dickinson , R.T.Dickinson , Pat Wall , Pat Wall , "contact@a-eon.com" , Matthew Leaman , luigi burdo , Christian Zigotzky Subject: RE: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE Date: Wed, 22 Jun 2016 19:58:35 +0000 Message-ID: References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> <874m99uibc.fsf@skywalker.in.ibm.com> <1465174304.12265.0.camel@ellerman.id.au> <50194690-18ac-edfd-42cb-8f1cc96055c9@xenosoft.de> <484bd17c3f3.74dd55e@auth.smtp.1and1.co.uk> <87r3c71zs9.fsf@skywalker.in.ibm.com> <1465470910.31662.10.camel@ellerman.id.au> <40816527-1be8-329c-2be0-86c39062c2e9@xenosoft.de> <25BBCC66-53B2-4009-B2BA-CD1070EA71E9@xenosoft.de> <1465805967.3022.14.camel@kernel.crashing.org> <575EF6BE.6020208@xenosoft.de>,<576AE1D7.7090301@xenosoft.de> In-Reply-To: <576AE1D7.7090301@xenosoft.de> Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Christian, i think Darren patch override some memory region that on kernel.= org was different and this make the kernel patched run and work Luigi ________________________________________ Da: Christian Zigotzky [chzigotzky@xenosoft.de] Inviato: mercoled=EC 22 giugno 2016 21.07 A: Benjamin Herrenschmidt; Michael Ellerman; Aneesh Kumar K.V; Darren Steve= ns; linuxppc-dev@lists.ozlabs.org; Michael Ellerman; Julian Margetson; Adri= an Cox; R.T.Dickinson; R.T.Dickinson; Pat Wall; Pat Wall; contact@a-eon.com= ; Matthew Leaman; luigi burdo; Christian Zigotzky Oggetto: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE Hi All, Please find attached Darren's patch. With this patch, the Nemo board boots. That means, the problematic source code is somewhere in this patch. Which file in this patch is responsible for starting the kernel? Thanks, Christian On 13 June 2016 at 8:09 PM, Christian Zigotzky wrote: > Hi Ben, > > I could send you a patch but it doesn't work with the three PowerPC > commits. I think we have to fix the boot issue at first. After that we > can integrate the first patch for the Nemo board. > > Cheers, > > Christian > > On 13 June 2016 at 10:19 AM, Benjamin Herrenschmidt wrote: >> The right way to not have this problem anymore is to cleanup and >> submit your patches upstream so they don't break all the time :-) >> >> Cheers, >> Ben. >> >>