All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 RFC] pasemi: Fix boot failure on 4.7-rc1
@ 2016-06-29 20:06 Darren Stevens
  2016-06-30  1:37 ` Aneesh Kumar K.V
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Darren Stevens @ 2016-06-29 20:06 UTC (permalink / raw)
  To: linuxppc-dev
  Cc: Aneesh Kumar K.V, Pat Wall, matthew, aperez, R.T.Dickinson,
	Christian Zigotzky

[-- Attachment #1: Type: text/plain, Size: 178 bytes --]

  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

[-- Attachment #2: Type: text/plain, Size: 1049 bytes --]


    Commit:d6a9996e84ac4beb7713e9485f4563e100a9b03e (powerpc/mm:
    vmalloc abstraction in preparation for radix) turned kernel memory
    and IO addresses from #defined constants to variables initialised
    at runtime.
    
    On PA6T systems the setup_arch machine call initialises the onboard
    PCI-e root-ports, and uses pci_io_base to do this, which is now before
    its value has been set resulting in a panic right after 'booting 
    linux via __start()'

    Move the pci_io_base initialisation to the same place as vmalloc
    ranges are set (hash__early_init_mmu()/radix__early_init_mmu())
    
    Reported-by: Christian Zigotzky <chzigotzky@xenosoft.de>
    Signed-off-by: Darren Stevens <darren@stevens-zone.net>
    
---

Tested on my AmigaOneX1000, I don't have access to a refence board system,
and our developer with one is on honeymoon.

I am hoping to follow this patch with others to reduce the size of the nemo
patch we apply, eventually I'd like to see the patch gone, but that is a 
very big job.

Kind regards
Darren

[-- Attachment #3: pa6t-bootfix-v2.patch --]
[-- Type: text/plain, Size: 1932 bytes --]

diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgtable.h
index 88a5eca..ab84c89 100644
--- a/arch/powerpc/include/asm/book3s/64/pgtable.h
+++ b/arch/powerpc/include/asm/book3s/64/pgtable.h
@@ -230,6 +230,7 @@ extern unsigned long __kernel_virt_size;
 #define KERN_VIRT_SIZE  __kernel_virt_size
 extern struct page *vmemmap;
 extern unsigned long ioremap_bot;
+extern unsigned long pci_io_base;
 #endif /* __ASSEMBLY__ */
 
 #include <asm/book3s/64/hash.h>
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index 3759df5..a5ae49a 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -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 5b22ba0..b5b5fe6 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -922,6 +922,8 @@ void __init hash__early_init_mmu(void)
 	vmemmap = (struct page *)H_VMEMMAP_BASE;
 	ioremap_bot = IOREMAP_BASE;
 
+	pci_io_base = ISA_IO_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 e58707d..095fbfa 100644
--- a/arch/powerpc/mm/pgtable-radix.c
+++ b/arch/powerpc/mm/pgtable-radix.c
@@ -328,6 +328,9 @@ void __init radix__early_init_mmu(void)
 	__vmalloc_end = RADIX_VMALLOC_END;
 	vmemmap = (struct page *)RADIX_VMEMMAP_BASE;
 	ioremap_bot = IOREMAP_BASE;
+
+	pci_io_base = ISA_IO_BASE;
+
 	/*
 	 * For now radix also use the same frag size
 	 */

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 RFC] pasemi: Fix boot failure on 4.7-rc1
  2016-06-29 20:06 [PATCH v2 RFC] pasemi: Fix boot failure on 4.7-rc1 Darren Stevens
@ 2016-06-30  1:37 ` Aneesh Kumar K.V
  2016-06-30  6:59 ` Olof Johansson
  2016-07-04  5:51 ` [v2,RFC] " Michael Ellerman
  2 siblings, 0 replies; 7+ messages in thread
From: Aneesh Kumar K.V @ 2016-06-30  1:37 UTC (permalink / raw)
  To: Darren Stevens, linuxppc-dev
  Cc: Pat Wall, matthew, aperez, R.T.Dickinson, Christian Zigotzky

Darren Stevens <darren@stevens-zone.net> writes:

>     Commit:d6a9996e84ac4beb7713e9485f4563e100a9b03e (powerpc/mm:
>     vmalloc abstraction in preparation for radix) turned kernel memory
>     and IO addresses from #defined constants to variables initialised
>     at runtime.
>     
>     On PA6T systems the setup_arch machine call initialises the onboard
>     PCI-e root-ports, and uses pci_io_base to do this, which is now before
>     its value has been set resulting in a panic right after 'booting 
>     linux via __start()'
>
>     Move the pci_io_base initialisation to the same place as vmalloc
>     ranges are set (hash__early_init_mmu()/radix__early_init_mmu())
>     
>     Reported-by: Christian Zigotzky <chzigotzky@xenosoft.de>
>     Signed-off-by: Darren Stevens <darren@stevens-zone.net>


Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>

>     
> ---
>
> Tested on my AmigaOneX1000, I don't have access to a refence board system,
> and our developer with one is on honeymoon.
>
> I am hoping to follow this patch with others to reduce the size of the nemo
> patch we apply, eventually I'd like to see the patch gone, but that is a 
> very big job.
>
> Kind regards
> Darren
> diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgtable.h
> index 88a5eca..ab84c89 100644
> --- a/arch/powerpc/include/asm/book3s/64/pgtable.h
> +++ b/arch/powerpc/include/asm/book3s/64/pgtable.h
> @@ -230,6 +230,7 @@ extern unsigned long __kernel_virt_size;
>  #define KERN_VIRT_SIZE  __kernel_virt_size
>  extern struct page *vmemmap;
>  extern unsigned long ioremap_bot;
> +extern unsigned long pci_io_base;
>  #endif /* __ASSEMBLY__ */
>
>  #include <asm/book3s/64/hash.h>
> diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
> index 3759df5..a5ae49a 100644
> --- a/arch/powerpc/kernel/pci_64.c
> +++ b/arch/powerpc/kernel/pci_64.c
> @@ -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 5b22ba0..b5b5fe6 100644
> --- a/arch/powerpc/mm/hash_utils_64.c
> +++ b/arch/powerpc/mm/hash_utils_64.c
> @@ -922,6 +922,8 @@ void __init hash__early_init_mmu(void)
>  	vmemmap = (struct page *)H_VMEMMAP_BASE;
>  	ioremap_bot = IOREMAP_BASE;
>
> +	pci_io_base = ISA_IO_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 e58707d..095fbfa 100644
> --- a/arch/powerpc/mm/pgtable-radix.c
> +++ b/arch/powerpc/mm/pgtable-radix.c
> @@ -328,6 +328,9 @@ void __init radix__early_init_mmu(void)
>  	__vmalloc_end = RADIX_VMALLOC_END;
>  	vmemmap = (struct page *)RADIX_VMEMMAP_BASE;
>  	ioremap_bot = IOREMAP_BASE;
> +
> +	pci_io_base = ISA_IO_BASE;
> +
>  	/*
>  	 * For now radix also use the same frag size
>  	 */

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 RFC] pasemi: Fix boot failure on 4.7-rc1
  2016-06-29 20:06 [PATCH v2 RFC] pasemi: Fix boot failure on 4.7-rc1 Darren Stevens
  2016-06-30  1:37 ` Aneesh Kumar K.V
@ 2016-06-30  6:59 ` Olof Johansson
  2016-06-30  8:36   ` Aneesh Kumar K.V
  2016-07-01 15:29   ` Darren Stevens
  2016-07-04  5:51 ` [v2,RFC] " Michael Ellerman
  2 siblings, 2 replies; 7+ messages in thread
From: Olof Johansson @ 2016-06-30  6:59 UTC (permalink / raw)
  To: Darren Stevens
  Cc: linuxppc-dev, Pat Wall, Alex Perez, matthew, Aneesh Kumar K.V,
	R.T.Dickinson, Christian Zigotzky

Hi,

On Wed, Jun 29, 2016 at 1:06 PM, Darren Stevens <darren@stevens-zone.net> wrote:
>
>     Commit:d6a9996e84ac4beb7713e9485f4563e100a9b03e (powerpc/mm:
>     vmalloc abstraction in preparation for radix) turned kernel memory
>     and IO addresses from #defined constants to variables initialised
>     at runtime.
>
>     On PA6T systems the setup_arch machine call initialises the onboard
>     PCI-e root-ports, and uses pci_io_base to do this, which is now before
>     its value has been set resulting in a panic right after 'booting
>     linux via __start()'

I don't see the panic here on a Chitra, at least not on recent -next.

What config are you building with when you see this?

Please cc me on PA Semi related patches if you want my attention. I
still have hardware, in fact I boot every -next release on it through
automation.



-Olof

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 RFC] pasemi: Fix boot failure on 4.7-rc1
  2016-06-30  6:59 ` Olof Johansson
@ 2016-06-30  8:36   ` Aneesh Kumar K.V
  2016-07-01 15:29   ` Darren Stevens
  1 sibling, 0 replies; 7+ messages in thread
From: Aneesh Kumar K.V @ 2016-06-30  8:36 UTC (permalink / raw)
  To: Olof Johansson, Darren Stevens
  Cc: linuxppc-dev, Pat Wall, Alex Perez, matthew, R.T.Dickinson,
	Christian Zigotzky

Olof Johansson <olof@lixom.net> writes:

> Hi,
>
> On Wed, Jun 29, 2016 at 1:06 PM, Darren Stevens <darren@stevens-zone.net> wrote:
>>
>>     Commit:d6a9996e84ac4beb7713e9485f4563e100a9b03e (powerpc/mm:
>>     vmalloc abstraction in preparation for radix) turned kernel memory
>>     and IO addresses from #defined constants to variables initialised
>>     at runtime.
>>
>>     On PA6T systems the setup_arch machine call initialises the onboard
>>     PCI-e root-ports, and uses pci_io_base to do this, which is now before
>>     its value has been set resulting in a panic right after 'booting
>>     linux via __start()'
>
> I don't see the panic here on a Chitra, at least not on recent -next.
>
> What config are you building with when you see this?
>
> Please cc me on PA Semi related patches if you want my attention. I
> still have hardware, in fact I boot every -next release on it through
> automation.
>

You can find more details in the below thread.

https://lkml.kernel.org/r/8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de


-aneesh

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pasemi: Fix boot failure on 4.7-rc1
  2016-06-30  6:59 ` Olof Johansson
  2016-06-30  8:36   ` Aneesh Kumar K.V
@ 2016-07-01 15:29   ` Darren Stevens
  1 sibling, 0 replies; 7+ messages in thread
From: Darren Stevens @ 2016-07-01 15:29 UTC (permalink / raw)
  To: Olof Johansson
  Cc: linuxppc-dev, Pat Wall, Alex Perez, matthew, Aneesh Kumar K.V,
	R.T.Dickinson, Christian Zigotzky

Hello Olof

On 29/06/2016, Olof Johansson wrote:
> I don't see the panic here on a Chitra, at least not on recent -next.
>
> What config are you building with when you see this?

If you are not seeing this on the Chitra, it means that our Nemo patch
is causing the problem. I don't know where, as we haven't patched the
pas_pci_init function, or any function it directly calls,
although there are patches in pasemi/pci.c to enable support for the 
SB600.

The best solution would be for us to add the patch for setup.c I found to
our nemo patch.

Sorry for wasting everyones time.

> Please cc me on PA Semi related patches if you want my attention. I
> still have hardware, in fact I boot every -next release on it through
> automation.

Didn't know that, I will do so in future, just be aware that all of my
patches will be in relation to the X1000 as that is the only PA-Semi machine
I have here.

If you have the time, there is something you can check for us - we've had to
add 'PPC_PASEMI_IOMMU_DMA_FORCE' to our config since 4.4 to get the onboard
gig-e ethernet to work. We need PPC_PASEMI_IOMMU for the SB600, or we are
stuck with a kernel that will only work with 2GRam

Regards
Darren

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [v2,RFC] pasemi: Fix boot failure on 4.7-rc1
  2016-06-29 20:06 [PATCH v2 RFC] pasemi: Fix boot failure on 4.7-rc1 Darren Stevens
  2016-06-30  1:37 ` Aneesh Kumar K.V
  2016-06-30  6:59 ` Olof Johansson
@ 2016-07-04  5:51 ` Michael Ellerman
  2016-07-04  6:58   ` Christian Zigotzky
  2 siblings, 1 reply; 7+ messages in thread
From: Michael Ellerman @ 2016-07-04  5:51 UTC (permalink / raw)
  To: Darren Stevens, linuxppc-dev
  Cc: Pat Wall, aperez, matthew, Aneesh Kumar K.V, R.T.Dickinson,
	Christian Zigotzky

On Wed, 2016-29-06 at 20:06:28 UTC, Darren Stevens wrote:
> Commit:d6a9996e84ac4beb7713e9485f4563e100a9b03e (powerpc/mm:
>     vmalloc abstraction in preparation for radix) turned kernel memory
>     and IO addresses from #defined constants to variables initialised
>     at runtime.
>     
>     On PA6T systems the setup_arch machine call initialises the onboard
>     PCI-e root-ports, and uses pci_io_base to do this, which is now before
>     its value has been set resulting in a panic right after 'booting 
>     linux via __start()'
> 
>     Move the pci_io_base initialisation to the same place as vmalloc
>     ranges are set (hash__early_init_mmu()/radix__early_init_mmu())
>     
>     Reported-by: Christian Zigotzky <chzigotzky@xenosoft.de>
>     Signed-off-by: Darren Stevens <darren@stevens-zone.net>
> Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>

Applied to powerpc fixes, thanks.

https://git.kernel.org/powerpc/c/bfa37087aa04e45f56c41142df

cheers

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [v2,RFC] pasemi: Fix boot failure on 4.7-rc1
  2016-07-04  5:51 ` [v2,RFC] " Michael Ellerman
@ 2016-07-04  6:58   ` Christian Zigotzky
  0 siblings, 0 replies; 7+ messages in thread
From: Christian Zigotzky @ 2016-07-04  6:58 UTC (permalink / raw)
  To: Michael Ellerman, Darren Stevens, linuxppc-dev
  Cc: Pat Wall, aperez, matthew, Aneesh Kumar K.V, R.T.Dickinson

Many thanks!

- Christian

On 04 July 2016 at 07:51 AM, Michael Ellerman wrote:
> On Wed, 2016-29-06 at 20:06:28 UTC, Darren Stevens wrote:
>> Commit:d6a9996e84ac4beb7713e9485f4563e100a9b03e (powerpc/mm:
>>      vmalloc abstraction in preparation for radix) turned kernel memory
>>      and IO addresses from #defined constants to variables initialised
>>      at runtime.
>>      
>>      On PA6T systems the setup_arch machine call initialises the onboard
>>      PCI-e root-ports, and uses pci_io_base to do this, which is now before
>>      its value has been set resulting in a panic right after 'booting
>>      linux via __start()'
>>
>>      Move the pci_io_base initialisation to the same place as vmalloc
>>      ranges are set (hash__early_init_mmu()/radix__early_init_mmu())
>>      
>>      Reported-by: Christian Zigotzky <chzigotzky@xenosoft.de>
>>      Signed-off-by: Darren Stevens <darren@stevens-zone.net>
>> Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> Applied to powerpc fixes, thanks.
>
> https://git.kernel.org/powerpc/c/bfa37087aa04e45f56c41142df
>
> cheers
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-07-04  6:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-29 20:06 [PATCH v2 RFC] pasemi: Fix boot failure on 4.7-rc1 Darren Stevens
2016-06-30  1:37 ` Aneesh Kumar K.V
2016-06-30  6:59 ` Olof Johansson
2016-06-30  8:36   ` Aneesh Kumar K.V
2016-07-01 15:29   ` Darren Stevens
2016-07-04  5:51 ` [v2,RFC] " Michael Ellerman
2016-07-04  6:58   ` Christian Zigotzky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.