All of lore.kernel.org
 help / color / mirror / Atom feed
* Proposed: Patch to fix boot on PA6T
@ 2016-06-26 17:42 Darren Stevens
  2016-06-26 20:08 ` Christian Zigotzky
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Darren Stevens @ 2016-06-26 17:42 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Christian Zigotzky, matthew, Pat Wall, R.T.Dickinson, aperez

[-- 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: 753 bytes --]

Hello All,

    commit d6a9996e84ac4beb7713e9485f4563e100a9b03e
    powerpc/mm: vmalloc abstraction in preparation for radix

    This commit introduced variables for some linux kernel addresses that had
before
    been constants, unfortunately this stopped PaSemi PA6T systems(*) from
booting as
    they call ioremap to map SoC registers before the mmu is initialised. The
attached
    patch adds a hard-coded init of pci_io_base to the pas_init_early()
function which
    which allows the kernel to boot normally.

    The value will be harmlessly set again once pci starts up.

    (*) At the moment this has only been tested on an AmigaOneX1000, but I
expect PaSemi
    reference systems to have been affected in the same way.

Kind regards
Darren

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

diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c
index d71b2c7..6b8d2ab 100644
--- a/arch/powerpc/platforms/pasemi/setup.c
+++ b/arch/powerpc/platforms/pasemi/setup.c
@@ -61,6 +61,7 @@ static struct mce_regs mce_regs[MAX_MCE_REGS];
 static int num_mce_regs;
 static int nmi_virq = NO_IRQ;
 
+extern unsigned long pci_io_base;
 
 static void pas_restart(char *cmd)
 {
@@ -341,6 +342,10 @@ out:
 
 static void __init pas_init_early(void)
 {
+	/* Initialise the IO pointer so we don't crash on boot */
+
+	pci_io_base = (H_KERN_VIRT_START + (H_KERN_VIRT_SIZE >> 1));
+
 	iommu_init_early_pasemi();
 }
 


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

* Re: Proposed: Patch to fix boot on PA6T
  2016-06-26 17:42 Proposed: Patch to fix boot on PA6T Darren Stevens
@ 2016-06-26 20:08 ` Christian Zigotzky
  2016-06-26 22:50 ` Benjamin Herrenschmidt
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Christian Zigotzky @ 2016-06-26 20:08 UTC (permalink / raw)
  To: Darren Stevens; +Cc: linuxppc-dev, matthew, Pat Wall, R.T.Dickinson, aperez

Hi Darren,

Fantastic news! I'll test your patch with the RC5 tomorrow. Excellent work! W=
ell done!

- Christian

Sent from my iPhone

> On 26 Jun 2016, at 18:42, Darren Stevens <darren@stevens-zone.net> wrote:
>=20
> Hello All,
>=20
>    commit d6a9996e84ac4beb7713e9485f4563e100a9b03e
>    powerpc/mm: vmalloc abstraction in preparation for radix
>=20
>    This commit introduced variables for some linux kernel addresses that h=
ad
> before
>    been constants, unfortunately this stopped PaSemi PA6T systems(*) from
> booting as
>    they call ioremap to map SoC registers before the mmu is initialised. T=
he
> attached
>    patch adds a hard-coded init of pci_io_base to the pas_init_early()
> function which
>    which allows the kernel to boot normally.
>=20
>    The value will be harmlessly set again once pci starts up.
>=20
>    (*) At the moment this has only been tested on an AmigaOneX1000, but I
> expect PaSemi
>    reference systems to have been affected in the same way.
>=20
> Kind regards
> Darren
> <pa6t-bootfix.patch>

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

* Re: Proposed: Patch to fix boot on PA6T
  2016-06-26 17:42 Proposed: Patch to fix boot on PA6T Darren Stevens
  2016-06-26 20:08 ` Christian Zigotzky
@ 2016-06-26 22:50 ` Benjamin Herrenschmidt
  2016-06-29 19:52   ` Darren Stevens
  2016-06-28 10:51 ` Michael Ellerman
  2016-06-28 14:18 ` Aneesh Kumar K.V
  3 siblings, 1 reply; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2016-06-26 22:50 UTC (permalink / raw)
  To: Darren Stevens, linuxppc-dev
  Cc: Pat Wall, matthew, aperez, R.T.Dickinson, Christian Zigotzky

On Sun, 2016-06-26 at 18:42 +0100, Darren Stevens wrote:
> 
>     commit d6a9996e84ac4beb7713e9485f4563e100a9b03e
>     powerpc/mm: vmalloc abstraction in preparation for radix
> 
>     This commit introduced variables for some linux kernel addresses that had
> before been constants, unfortunately this stopped PaSemi PA6T systems(*) from
> booting as they call ioremap to map SoC registers before the mmu is initialised. The
> attached patch adds a hard-coded init of pci_io_base to the pas_init_early()
> function which which allows the kernel to boot normally.

Tell me more, when is that mapping done ? I'm changing things so that
platform probe is called much later so that might have an impact.

What consumes pci_io_base before it's been initialized ?

>     The value will be harmlessly set again once pci starts up.
> 
>     (*) At the moment this has only been tested on an AmigaOneX1000, but I
> expect PaSemi
>     reference systems to have been affected in the same way.

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

* Re: Proposed: Patch to fix boot on PA6T
  2016-06-26 17:42 Proposed: Patch to fix boot on PA6T Darren Stevens
  2016-06-26 20:08 ` Christian Zigotzky
  2016-06-26 22:50 ` Benjamin Herrenschmidt
@ 2016-06-28 10:51 ` Michael Ellerman
  2016-06-29 19:54   ` Darren Stevens
  2016-06-28 14:18 ` Aneesh Kumar K.V
  3 siblings, 1 reply; 8+ messages in thread
From: Michael Ellerman @ 2016-06-28 10:51 UTC (permalink / raw)
  To: Darren Stevens, linuxppc-dev
  Cc: Pat Wall, matthew, aperez, R.T.Dickinson, Christian Zigotzky

Hi Darren,

On Sun, 2016-26-06 at 17:42:11 UTC, Darren Stevens wrote:
> Hello All,
> 
>     commit d6a9996e84ac4beb7713e9485f4563e100a9b03e
>     powerpc/mm: vmalloc abstraction in preparation for radix
> 
>     This commit introduced variables for some linux kernel addresses that had before
>     been constants, unfortunately this stopped PaSemi PA6T systems(*) from  booting as
>     they call ioremap to map SoC registers before the mmu is initialised. The attached
>     patch adds a hard-coded init of pci_io_base to the pas_init_early() function which
>     which allows the kernel to boot normally.
> 
>     The value will be harmlessly set again once pci starts up.
> 
>     (*) At the moment this has only been tested on an AmigaOneX1000, but I expect PaSemi
>     reference systems to have been affected in the same way.
> 
> Kind regards
> Darren

I can't merge this because you didn't sign it off.

See section 11 of:

  https://www.kernel.org/doc/Documentation/SubmittingPatches

cheers

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

* Re: Proposed: Patch to fix boot on PA6T
  2016-06-26 17:42 Proposed: Patch to fix boot on PA6T Darren Stevens
                   ` (2 preceding siblings ...)
  2016-06-28 10:51 ` Michael Ellerman
@ 2016-06-28 14:18 ` Aneesh Kumar K.V
  2016-06-29 19:56   ` Darren Stevens
  3 siblings, 1 reply; 8+ messages in thread
From: Aneesh Kumar K.V @ 2016-06-28 14:18 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:

> Hello All,
>
>     commit d6a9996e84ac4beb7713e9485f4563e100a9b03e
>     powerpc/mm: vmalloc abstraction in preparation for radix
>
>     This commit introduced variables for some linux kernel addresses that had
> before
>     been constants, unfortunately this stopped PaSemi PA6T systems(*) from
> booting as
>     they call ioremap to map SoC registers before the mmu is initialised. The
> attached
>     patch adds a hard-coded init of pci_io_base to the pas_init_early()
> function which
>     which allows the kernel to boot normally.
>
>     The value will be harmlessly set again once pci starts up.
>
>     (*) At the moment this has only been tested on an AmigaOneX1000, but I
> expect PaSemi
>     reference systems to have been affected in the same way.
>
> Kind regards
> Darren
> diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c
> index d71b2c7..6b8d2ab 100644
> --- a/arch/powerpc/platforms/pasemi/setup.c
> +++ b/arch/powerpc/platforms/pasemi/setup.c
> @@ -61,6 +61,7 @@ static struct mce_regs mce_regs[MAX_MCE_REGS];
>  static int num_mce_regs;
>  static int nmi_virq = NO_IRQ;
>  
> +extern unsigned long pci_io_base;
>  
>  static void pas_restart(char *cmd)
>  {
> @@ -341,6 +342,10 @@ out:
>  
>  static void __init pas_init_early(void)
>  {
> +	/* Initialise the IO pointer so we don't crash on boot */
> +
> +	pci_io_base = (H_KERN_VIRT_START + (H_KERN_VIRT_SIZE >> 1));
> +
>  	iommu_init_early_pasemi();
>  }
>  

Another option is to init it along with rest of the variables as done in
hash__early_init_mmu(void)/radix__early_init_mmu(void)


-aneesh

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

* Re: Proposed: Patch to fix boot on PA6T
  2016-06-26 22:50 ` Benjamin Herrenschmidt
@ 2016-06-29 19:52   ` Darren Stevens
  0 siblings, 0 replies; 8+ messages in thread
From: Darren Stevens @ 2016-06-29 19:52 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: linuxppc-dev, Pat Wall, matthew, aperez, R.T.Dickinson,
	Christian Zigotzky

Hello Benjamin

On 27/06/2016, Benjamin Herrenschmidt wrote:
> Tell me more, when is that mapping done ? I'm changing things so that
> platform probe is called much later so that might have an impact.
>
> What consumes pci_io_base before it's been initialized ?

pas_pci_init() is the culprit. Following on from Aneesh's suggestion an
improved patch will follow shoertly.

Regards
Darren

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

* Re: Proposed: Patch to fix boot on PA6T
  2016-06-28 10:51 ` Michael Ellerman
@ 2016-06-29 19:54   ` Darren Stevens
  0 siblings, 0 replies; 8+ messages in thread
From: Darren Stevens @ 2016-06-29 19:54 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: linuxppc-dev, Pat Wall, matthew, aperez, R.T.Dickinson,
	Christian Zigotzky

Hello Michael

> I can't merge this because you didn't sign it off.

TBH I wasn't really expecting you too.

> See section 11 of:
>
>   https://www.kernel.org/doc/Documentation/SubmittingPatches

Read and understood (I hope)..

Regards
Darren

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

* Re: Proposed: Patch to fix boot on PA6T
  2016-06-28 14:18 ` Aneesh Kumar K.V
@ 2016-06-29 19:56   ` Darren Stevens
  0 siblings, 0 replies; 8+ messages in thread
From: Darren Stevens @ 2016-06-29 19:56 UTC (permalink / raw)
  To: Aneesh Kumar K.V
  Cc: linuxppc-dev, Pat Wall, matthew, aperez, R.T.Dickinson,
	Christian Zigotzky

Hello Aneesh

On 28/06/2016, Aneesh Kumar K.V wrote:
> Another option is to init it along with rest of the variables as done in
> hash__early_init_mmu(void)/radix__early_init_mmu(void)

*FACEPALM* Why didn't I think of that! I've made this change and seems to work
- obviously I can't test on a Radix system though, as I don't have access to
one.

Patch comming shortly

Regards
Darren

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

end of thread, other threads:[~2016-06-29 21:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-26 17:42 Proposed: Patch to fix boot on PA6T Darren Stevens
2016-06-26 20:08 ` Christian Zigotzky
2016-06-26 22:50 ` Benjamin Herrenschmidt
2016-06-29 19:52   ` Darren Stevens
2016-06-28 10:51 ` Michael Ellerman
2016-06-29 19:54   ` Darren Stevens
2016-06-28 14:18 ` Aneesh Kumar K.V
2016-06-29 19:56   ` Darren Stevens

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.