linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Álvaro Fernández Rojas" <noltari@gmail.com>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: William Zhang <william.zhang@broadcom.com>,
	Jonas Gorski <jonas.gorski@gmail.com>,
	bcm-kernel-feedback-list@broadcom.com, tsbogend@alpha.franken.de,
	linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mips: bmips: BCM6358: disable arch_sync_dma_for_cpu_all()
Date: Mon, 13 Mar 2023 22:39:19 +0100	[thread overview]
Message-ID: <CAKR-sGcyMF26NGoeEApKuKDe6=14nCGKwRYx-o68LHAcmUNXhA@mail.gmail.com> (raw)
In-Reply-To: <e3cff853-8d5d-acdf-8e6a-3322c4de2023@gmail.com>

Hi Florian,

I did another test changing from TP1 to TP0 and this is the result:
[ 0.000000] Linux version 5.15.98 (noltari@atlantis)
(mips-openwrt-linux-musl-gcc (OpenWrt GCC 12.2.0 r22187+1-19817fa3f5)
12.2.0, GNU ld (GNU Binutils) 2.40.0) #0 SMP Sun Mar 12 18:23:28 2023
[ 0.000000] bmips_cpu_setup: read_c0_brcm_config_0() = 0xe30e1006
[ 0.000000] bmips_cpu_setup: BMIPS_RAC_CONFIG = 0x2a00015
[ 0.000000] CPU0 revision is: 0002a010 (Broadcom BMIPS4350)

And there were no exceptions with EHCI/OHCI as opposed to TP1.
So the issue is only happening when booting from TP1.
Maybe it's due to the fact that BCM6358 has a shared TLB?

Maybe the correct way of solving the issue would be by adding the
following code at bcm6358_quirks():
if (read_c0_brcm_cmt_local() & (1 << 31))
    bmips_dma_sync_disabled = 1;

BTW, if I understood it correctly, you want me to reverse the logic,
so bmips_dma_sync_disabled instead of bmips_dma_sync_enabled.
Is this correct?

Best regards,
Álvaro.


El lun, 13 mar 2023 a las 18:37, Florian Fainelli
(<f.fainelli@gmail.com>) escribió:
>
> On 3/12/23 11:50, Álvaro Fernández Rojas wrote:
> > Hi Florian,
> >
> > I tried what you suggested but it stil panics on EHCI:
> >
> > [    0.000000] Linux version 5.15.98 (noltari@atlantis)
> > (mips-openwrt-linux-musl-gcc (OpenWrt GCC 12.2.0 r22187+1-19817fa3f5)
> > 12.2.0, GNU ld (GNU Binutils) 2.40.0) #0 SMP Sun Mar 12 18:23:28 2023
> > [    0.000000] bmips_cpu_setup: read_c0_brcm_config_0() = 0xe30e1006
> > [    0.000000] bmips_cpu_setup: cbr + BMIPS_RAC_CONFIG = 0x3c1b8041
> > [    0.000000] CPU0 revision is: 0002a010 (Broadcom BMIPS4350)
> >
> > It looks like bit 29 is set so RAC should be present.
> > And RAC_I seems to be set, but not RAC_D...
> >
> > BTW, this is what I added to bmips_cpu_setup:
> >
> > case CPU_BMIPS4350:
> > cfg = read_c0_brcm_config_0();
> > pr_info("bmips_cpu_setup: read_c0_brcm_config_0() = 0x%x\n", cfg);
> >
> > cfg = __raw_readl(cbr + BMIPS_RAC_CONFIG);
> > pr_info("bmips_cpu_setup: cbr + BMIPS_RAC_CONFIG = 0x%x\n", cfg);
> > __raw_writel(cfg | BIT(0) | BIT(1), cbr + BMIPS_RAC_CONFIG);
> > __raw_readl(cbr + BMIPS_RAC_CONFIG);
> > break;
>
> Thanks for running those experiments, I cannot explain what you are
> seeing, so there must be some sort of erratum applicable to the
> BMIPS4380 revision used on the 6358 somehow...
>
> If you can make the suggested change to use negative logic in order to
> disable the RAC flushing, that would work for me, also maybe add a
> Fixes: tag so it gets backported to stable trees?
>
> Thanks!
> --
> Florian
>

  reply	other threads:[~2023-03-13 21:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-10 12:13 [PATCH] mips: bmips: BCM6358: disable arch_sync_dma_for_cpu_all() Álvaro Fernández Rojas
2023-03-11 17:32 ` Florian Fainelli
2023-03-11 19:44   ` Jonas Gorski
2023-03-12  7:31     ` William Zhang
2023-03-12 16:16       ` Florian Fainelli
2023-03-12 18:50         ` Álvaro Fernández Rojas
2023-03-13 17:37           ` Florian Fainelli
2023-03-13 21:39             ` Álvaro Fernández Rojas [this message]
2023-03-13 21:46               ` Florian Fainelli
2023-03-14 18:14                 ` Álvaro Fernández Rojas
2023-03-16 17:40                   ` Florian Fainelli
2023-03-16 18:03                     ` Álvaro Fernández Rojas
2023-03-16 18:05 ` [PATCH v2] mips: bmips: BCM6358: disable arch_sync_dma_for_cpu_all() for TP1 Álvaro Fernández Rojas
2023-03-17  0:00   ` Florian Fainelli
2023-03-17 10:20   ` [PATCH v3] mips: bmips: BCM6358: disable RAC flush " Álvaro Fernández Rojas
2023-03-17 16:44     ` Florian Fainelli
2023-03-18 13:38     ` Thomas Bogendoerfer

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='CAKR-sGcyMF26NGoeEApKuKDe6=14nCGKwRYx-o68LHAcmUNXhA@mail.gmail.com' \
    --to=noltari@gmail.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=f.fainelli@gmail.com \
    --cc=jonas.gorski@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=tsbogend@alpha.franken.de \
    --cc=william.zhang@broadcom.com \
    /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).