Linux-EDAC Archive on lore.kernel.org
 help / color / Atom feed
From: Aaro Koskinen <aaro.koskinen@nokia.com>
To: Thor Thayer <thor.thayer@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, linux-edac@vger.kernel.org
Subject: Re: [Bisected] altera_edac crash on a system without ECC
Date: Wed, 4 Dec 2019 15:25:31 +0200
Message-ID: <20191204132531.GA22600@ak-laptop.emea.nsn-net.net> (raw)
In-Reply-To: <3bbd2890-ffcc-39df-8ab6-ecf72d92a006@linux.intel.com>

Hi,

On Tue, Dec 03, 2019 at 05:09:48PM -0600, Thor Thayer wrote:
> On 11/29/19 10:57 AM, Aaro Koskinen wrote:
> >Hi,
> >
> >I tried booting v5.4 mainline kernel on a stratix10 board with ECC
> >disabled, and the altera-edac driver (with only SDRAM enabled) is
> >now crashing the system instead of failing the probe with "No ECC/ECC
> >disabled".
> >
> I apologize for the late reply. I was on vacation.
> 
> ECC disabled means the sof/jic that you're loading has ECC disabled,
> correct?

Yes.

> >This seems to have started with commit 08f08bfb7b4c ("EDAC, altera:
> >Merge Stratix10 into the Arria10 SDRAM probe routine"). With the change,
> >looks like sdram probe no longer uses SMC calls and instead accesses
> >the registers directly. The crash looks like this:
> 
> I haven't seen this. I'd expect both ECC enabled and disabled to fail with
> the dumps you have below since they'd both need to use the regmap functions.

With ECC enabled it doesn't fail, as the direct register access appears
to work then (I also checked by reading 0xf8011101 from userspace -
and it works without an abort).

> Yes, this does look like it is using the register accesses instead of the
> SMC call. Line 2206 sets the SMC call after determining from the if()
> statement if it is a Stratix10 or Arria10 and from below it seems to take
> the Arria10 path.

But that's setting the ecc_mgr_map. I think that altr_check_ecc_deps
and altr_sdram_probe use a different mapping. Before commit 08f08bfb7b4c
there was S10 specific altr_s10_sdram_probe() that took care of the SMC,
but I cannot see how the current code doing that unless I'm missing some
special magic.

> The altr_check_ecc_deps() call is checking whether ECC is enabled so the
> probe should fail.
> 
> I suspect the device tree. Can you verify the following node is in your
> device tree?
> 
> 	sdramedac {
> 		compatible = "altr,sdram-edac-s10";
> 		altr,sdr-syscon = <&sdr>;
> 		interrupts = <16 4>;
> 	};

Yes, I'm using the in-tree socfpga_stratix10.dtsi.

A.

  reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-29 16:57 Aaro Koskinen
2019-12-03 23:09 ` Thor Thayer
2019-12-04 13:25   ` Aaro Koskinen [this message]
2019-12-10 17:32     ` Thor Thayer

Reply instructions:

You may reply publically 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=20191204132531.GA22600@ak-laptop.emea.nsn-net.net \
    --to=aaro.koskinen@nokia.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thor.thayer@linux.intel.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

Linux-EDAC Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-edac/0 linux-edac/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-edac linux-edac/ https://lore.kernel.org/linux-edac \
		linux-edac@vger.kernel.org
	public-inbox-index linux-edac

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-edac


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git