All of lore.kernel.org
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: Sven Schnelle <svens@stackframe.org>
Cc: linux-parisc <linux-parisc@vger.kernel.org>
Subject: Re: PCI HPMC on C240 with alternatives Patching
Date: Fri, 24 May 2019 21:58:30 +0200	[thread overview]
Message-ID: <20190524195830.GA18978@ls3530.dellerweb.de> (raw)
In-Reply-To: <20190524153819.GA778@t470p.stackframe.org>

* Sven Schnelle <svens@stackframe.org>:
> On Fri, May 24, 2019 at 01:32:41PM +0200, Sven Schnelle wrote:
> > > Did a quick test, removing ALT_COND_N_IOC_FDC from asm_io_fdc() seems to fix this
> > > issue. Haven't looked in more detail into this though.
> >
> > Added some debugging:
> > [   25.405365] boot_cpu_data.pdc_capabilities: 2

In case it would have booted, one could see that via:
# grep capabilities /proc/cpuinfo
capabilities    : os64 iopdir_fdc needs_equivalent_aliasing (0x35)

> > So PDC says IO-PDIR fetches are not performed coherently, *BUT*:
> >
> > When this bit is clear, flushes and syncs are not required. This
> > bit is only applicable to SBAs, and does not apply to Legacy IOAs.
> >
> > With my limited understand i would think that C240 has a 'Legacy IOA' while
> > C3xxx has SBA? So i think we would need to add some check whether we have
> > an IOA or SBA in the alternatives code?
>
> I did the patch below to check for legacy IO Adapters. Is HW_BCPORT the right
> type? On my C240 both GSC Adapters are HW_BCPORT.

I'm not sure.
Seems to be dependend on the CPU.
See comment in drivers/parisc/ccio-dma.c, line 607ff:

        /* FIXME: PCX_W platforms don't need FDC/SYNC. (eg C360)
        **        PCX-U/U+ do. (eg C200/C240)
        **        PCX-T'? Don't know. (eg C110 or similar K-class)
        **
        ** See PDC_MODEL/option 0/SW_CAP word for "Non-coherent IO-PDIR bit".
        **
        ** "Since PCX-U employs an offset hash that is incompatible with
        ** the real mode coherence index generation of U2, the PDIR entry
        ** must be flushed to memory to retain coherence."


Can you try this patch instead?


diff --git a/arch/parisc/kernel/alternative.c b/arch/parisc/kernel/alternative.c
index bf2274e01a96..7c574b21f834 100644
--- a/arch/parisc/kernel/alternative.c
+++ b/arch/parisc/kernel/alternative.c
@@ -56,7 +56,8 @@ void __init_or_module apply_alternatives(struct alt_instr *start,
 		 * time IO-PDIR is changed in Ike/Astro.
 		 */
 		if ((cond & ALT_COND_NO_IOC_FDC) &&
-			(boot_cpu_data.pdc.capabilities & PDC_MODEL_IOPDIR_FDC))
+			((boot_cpu_data.cpu_type < pcxw) ||
+			 (boot_cpu_data.pdc.capabilities & PDC_MODEL_IOPDIR_FDC)))
 			continue;

 		/* Want to replace pdtlb by a pdtlb,l instruction? */


Helge

  parent reply	other threads:[~2019-05-24 19:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-24  6:58 PCI HPMC on C240 with alternatives Patching Sven Schnelle
2019-05-24 10:50 ` Sven Schnelle
2019-05-24 11:32   ` Sven Schnelle
2019-05-24 15:38     ` Sven Schnelle
2019-05-24 17:59       ` Rolf Eike Beer
2019-05-24 19:58       ` Helge Deller [this message]
2019-05-24 21:11         ` Sven Schnelle

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=20190524195830.GA18978@ls3530.dellerweb.de \
    --to=deller@gmx.de \
    --cc=linux-parisc@vger.kernel.org \
    --cc=svens@stackframe.org \
    /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 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.