Re: PCI HPMC on C240 with alternatives Patching

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Sven Schnelle <svens@xxxxxxxxxxxxxx>:
> 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




[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux