Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5702214ybi; Tue, 4 Jun 2019 10:41:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqwK0yYZsifDkxTlagL6IAIHH2mK09ZsJ4tdC9SkIM31iC4VhWHRMJJoAcCFU/VtI1XdoQbn X-Received: by 2002:a17:90a:a789:: with SMTP id f9mr37808500pjq.20.1559670096862; Tue, 04 Jun 2019 10:41:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559670096; cv=none; d=google.com; s=arc-20160816; b=fviU0gH9zhzxvhgwAYi6CEUXVsDw1c8BZnzPG/5PJovdMTHI/ewi0gMFyRrbRoHxQx tJRiYjoj/feEMji8KniLtQESj3Y/5GzKjx4hpPeO/yScvDXLQFhJPQd8E3z5X0+U7W4D kKweMQA7hXtp+oKcfzvHnRaLl3Qb1cFISB1xlxv4oXwt/jJFHZqeQnNZTppWfkiKCFHo gXvHQHw2qfVmO7xP8CgKrrzYEP/atOCaXNQsPkiaLgqLqABFJX4cFMJY7JUjmMuHxSRb zbdRwYi6CYBQ58/fhjzcoDVWKdvveDBgKmk6SKIKF9iznZM5JebMb3VxBncPcaOeoncg 7TdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=gxfNucCMb4Ei7x2UMMuNhNLx6ELQwcB+6J+M+HkCVOs=; b=KvYLd45fZWxdlhwecoFv8UbCFINqzpaVxKQ6CpN/J1cSWRdWBi9p6LYqUr7PI1lm04 Lg6/ksCLD3j476Q4pQFBPvshWEP5SDnPICRV+xc6mya+//dZ2nc+8ESCB4YvxzvcRZ7z hhvxG86WC0GSh7kvUyAqJVb6ycpSlOeMQuLu2eF8eE5X0juxlHLceg133BfaxUHo73Ji Th+PCIE0HFlAdn8da2EEd1FprRW8NJEtx3otOkeik+OeUnPhHuG5/NdvnahENXRaMUN2 /eB2ekQuTs2Gh2akgMYv0MWnwxuA4tXb8zb0X83H1iKerL7jVa05mnUeMvUb5BWfQ3pi cnBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ay3si22111145plb.298.2019.06.04.10.41.20; Tue, 04 Jun 2019 10:41:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726354AbfFDRi4 (ORCPT + 99 others); Tue, 4 Jun 2019 13:38:56 -0400 Received: from foss.arm.com ([217.140.101.70]:48806 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726092AbfFDRi4 (ORCPT ); Tue, 4 Jun 2019 13:38:56 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2E9BE80D; Tue, 4 Jun 2019 10:38:56 -0700 (PDT) Received: from e107155-lin (e107155-lin.cambridge.arm.com [10.1.196.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 84D033F5AF; Tue, 4 Jun 2019 10:38:54 -0700 (PDT) Date: Tue, 4 Jun 2019 18:38:48 +0100 From: Sudeep Holla To: James Morse Cc: thor.thayer@linux.intel.com, bp@alien8.de, mchehab@kernel.org, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, Lorenzo Pieralisi , Mark Rutland , Sudeep Holla Subject: Re: [PATCH] EDAC/altera: Warm Reset option for Stratix10 peripheral DBE Message-ID: <20190604173848.GA28613@e107155-lin> References: <1559594269-10077-1-git-send-email-thor.thayer@linux.intel.com> <9de1152b-25e0-3fb1-bf96-c8e45363942c@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9de1152b-25e0-3fb1-bf96-c8e45363942c@arm.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 04, 2019 at 06:23:15PM +0100, James Morse wrote: > Hi Thor, > > (CC: +Mark, Lorenzo and Sudeep for PSCI. > How should SYSTEM_RESET2 be used for a vendor-specific reset? > Initially it was indented to be used by passing command line argument "reboot=w" or "reboot=warm" as specified in kernel document[1] However it was enhanced and enabled specifically for panic by Commit b287a25a7148 ("panic/reboot: allow specifying reboot_mode for panic only") IIUC you can now pass "reboot=panic_warm" to just set reboot_mode to WARM when there's a panic. SYSTEM_RESET2 gets called whenever reboot_mode is set to WARM/SOFT > The original patch is: > lore.kernel.org/r/1559594269-10077-1-git-send-email-thor.thayer@linux.intel.com > ) > > On 03/06/2019 21:37, thor.thayer@linux.intel.com wrote: > > From: Thor Thayer > > > > The Stratix10 peripheral FIFO memories can recover from double > > bit errors with a warm reset instead of a cold reset. > > Add the option of a warm reset for peripheral (USB, Ethernet) > > memories. > > > > CPU memories such as SDRAM and OCRAM require a cold reset for > > DBEs. > > Filter on whether the error is a SDRAM/OCRAM or a peripheral > > FIFO memory to determine which reset to use when the warm > > reset option is configured. > > ... so you want to make different SMC calls on each CPU after panic()? > > > > diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c > > index 8816f74a22b4..179601f14b48 100644 > > --- a/drivers/edac/altera_edac.c > > +++ b/drivers/edac/altera_edac.c > > @@ -2036,6 +2036,19 @@ static const struct irq_domain_ops a10_eccmgr_ic_ops = { > > /* panic routine issues reboot on non-zero panic_timeout */ > > extern int panic_timeout; > > > > +#ifdef CONFIG_EDAC_ALTERA_ARM64_WARM_RESET > > +/* EL3 SMC call to setup CPUs for warm reset */ > > +void panic_smp_self_stop(void) > > +{ > > + struct arm_smccc_res result; > > + > > + __cpu_disable(); > > + cpu_relax(); > > + arm_smccc_smc(INTEL_SIP_SMC_ECC_DBE, S10_WARM_RESET_WFI_FLAG, > > + S10_WARM_RESET_WFI_FLAG, 0, 0, 0, 0, 0, &result); Please use SYSTEM_RESET2 or let us know why it can't be used to understand the requirement better. There are options to use vendor extentions with the SYSTEM_RESET2 PSCI command if you really have to. However the mainline supports only architectural warm reset. -- Regards, Sudeep [1] Documentation/admin-guide/kernel-parameters.txt