linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Darren Stevens <darren@stevens-zone.net>, linuxppc-dev@lists.ozlabs.org
Cc: Pat Wall <pjwall@mac.com>,
	matthew@a-eon.com, aperez@alexperez.com,
	"R.T.Dickinson" <rtd2@xtra.co.nz>,
	Christian Zigotzky <chzigotzky@xenosoft.de>
Subject: Re: Proposed: Patch to fix boot on PA6T
Date: Tue, 28 Jun 2016 19:48:55 +0530	[thread overview]
Message-ID: <87vb0t4cs0.fsf@skywalker.in.ibm.com> (raw)
In-Reply-To: <4863e2f8235.599ebfcf@auth.smtp.1and1.co.uk>

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

  parent reply	other threads:[~2016-06-28 14:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2016-06-29 19:56   ` Darren Stevens

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vb0t4cs0.fsf@skywalker.in.ibm.com \
    --to=aneesh.kumar@linux.vnet.ibm.com \
    --cc=aperez@alexperez.com \
    --cc=chzigotzky@xenosoft.de \
    --cc=darren@stevens-zone.net \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=matthew@a-eon.com \
    --cc=pjwall@mac.com \
    --cc=rtd2@xtra.co.nz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).