Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5995859yba; Thu, 11 Apr 2019 09:50:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqz6U86xj3Od5O5EpFz0L53ya5bthmocTPBSm+4Vv8AJTskO6x8sUjNyGnOf4MqizTyHEc2L X-Received: by 2002:a63:1749:: with SMTP id 9mr46417468pgx.94.1555001436749; Thu, 11 Apr 2019 09:50:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555001436; cv=none; d=google.com; s=arc-20160816; b=IQfbczDAos/bSUs+rnMdw9+p/Ebi/WCu3vBIfS6xRFZarbVzTJHJZVsobs1nQGKY6l tUlv+4Tq5qEuPpJkkF2pmatVj8Cd7qHiUQ64/TXuOVgnU5lqT7C3Vd15TDKALzUqj3Lz wO935GG3lkVnWgG81zBTbfnkE5fHK3PkT20t00ds55YUPXpgDESXaewypKGIxcsi16Z+ qptj74FNcdrGkk4fnYvbcM1GWLfePGa/lo99eCmZx08bZYicKoEPHBCU6haOo9aCI+ie mWfDey8rj/JbNS/+54vRhK2FlqfJhyLa7VyhraLAJeNk2zpvPK5Xu8Knca4U8FFwGDae NwMA== 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=y3X3QEZdJAE9EtxuVbJlEie8SelVHoF7yT+KlYrc5o0=; b=rJgGC1H1FRUxyZMJa34PQW5vFYN2KKjxotdqG03uIn/7S30L2n3H1WZ6EaEvm+q2Yr 2U6f86xfhxhUFuLno8FvM4ndQhkKMZKtkX6y8UlNncWaW1hfsM1/IEounpN0jcMl6/m7 TczJZI10rr4jd+CZTfopuN1sIR/5NWaRoQP0eG7igTK9ckZ2Qo2KGg1gMOmOBbnr1r+B ZSnW+cRI8dZ4aQqsTj4vYZjJLAZwC4Qk9/rSdTMnNdIXF5bwPdnmHV1vPsoQSyOf9xYg FS1P+tFLy+KVhQZmqB+ljBEo8iVMqEa63CAa6c1GbbRYVwzXtvTykHwtQgWgySK5ytoD szyQ== 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 m17si35343844pgi.514.2019.04.11.09.50.20; Thu, 11 Apr 2019 09:50: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 S1726830AbfDKQtl (ORCPT + 99 others); Thu, 11 Apr 2019 12:49:41 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:46220 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726676AbfDKQtk (ORCPT ); Thu, 11 Apr 2019 12:49:40 -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 50221374; Thu, 11 Apr 2019 09:49:40 -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 C74633F59C; Thu, 11 Apr 2019 09:49:38 -0700 (PDT) Date: Thu, 11 Apr 2019 17:49:36 +0100 From: Sudeep Holla To: "Koskinen, Aaro (Nokia - FI/Espoo)" Cc: "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Aaro Koskinen , Florian Fainelli , Michal Simek , Mark Rutland , Lorenzo Pieralisi Subject: Re: [RESEND][PATCH v2] firmware/psci: add support for SYSTEM_RESET2 Message-ID: <20190411164936.GB5327@e107155-lin> References: <20190411103346.22462-1-sudeep.holla@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Thu, Apr 11, 2019 at 11:42:28AM +0000, Koskinen, Aaro (Nokia - FI/Espoo) wrote: > Hi, > > From: Sudeep Holla [sudeep.holla@arm.com]: > > static void psci_sys_reset(enum reboot_mode reboot_mode, const char *cmd) > > { > > + if ((reboot_mode == REBOOT_WARM || reboot_mode == REBOOT_SOFT) && > > I would omit the REBOOT_SOFT here. > I included REBOOT_SOFT for 2 reasons: 1. drivers/firmware/efi/reboot.c - efi_reboot treats WARM and SOFT reboots same 2. If the vendors specific reboots are added and handled in EFI, I assume it will be categorised under REBOOT_SOFT. If that's wrong I can drop REBOOT_SOFT. > > + psci_system_reset2_supported) > > + /* > > + * reset_type[31] = 0 (architectural) > > + * reset_type[30:0] = 0 (SYSTEM_WARM_RESET) > > + * cookie = 0 (ignored by the implementation) > > + */ > > + invoke_psci_fn(PSCI_FN_NATIVE(1_1, SYSTEM_RESET2), 0, 0, 0); > > + > > invoke_psci_fn(PSCI_0_2_FN_SYSTEM_RESET, 0, 0, 0); > > Use else here, so that we fall back to system halt if SYSTEM_RESET2 fails. > Will that not change current behaviour ? IOW, is that expected behaviour ? I am not sure if halt can be prefer over cold reboot in absence of warm/soft reboot when the system is request to reboot. From PSCI perspective, since SYSTEM_RESET is mandatory I prefer that unless Linux has any restriction on this behaviour. -- Regards, Sudeep