From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4159FC4345F for ; Mon, 15 Apr 2024 19:40:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZywK0+79sGI7JDTz3GrMytSEgFXmODiqrJEeRfPscCc=; b=bTznlALMBFk6Vl DborxX8W/7RyLvhMa47Xz+cy3/pREhjZCYtwugQkP7SQhlIrMcrAx4+VpFHFR+UVoVJjADn475kL7 U2He9VAxHIxJEWKG3yS3swemRWsTabUvKYPe8FDIXzWGr8v2YhmMCztsp2oUekT8Au+RjumYbNkxv cGRO1ZUzrwmocEa11aaeL+BGiYAPenhG++Hdb12mqdzbgZyYtxbn+reA2NtN6jBmKMSNHTSL3Ud6G ZqfwEo5plBW0n7DjlEWBEyYQaeG43E2h8ZRf3tL1gDXioE1HApf+At84uiulAlp7jJqcPNXMnRaoe S59mUP8uzdcqRnkvQTIg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwSBt-00000009faT-0cRb; Mon, 15 Apr 2024 19:40:33 +0000 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwSBQ-00000009fDz-3j0g for linux-arm-kernel@lists.infradead.org; Mon, 15 Apr 2024 19:40:10 +0000 Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-518e2283bd3so2324099e87.1 for ; Mon, 15 Apr 2024 12:40:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713210001; x=1713814801; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=t7tsrnDTZbk4SPKL6+qy7+cpPN7/TAFHKqUJ8Ysh/C4=; b=Rqnd/eAZk0D6LmghwDAs7eWQljDSbr3cO+OGd6T3OYhL9rzkeNeYVNWwndc24evxGG TBjHzhoevI85YgRVI7JOP74Ockzp92XJrIxHxiCxtjeuKtE0gCKt75CLbqtEM48K+sGs ygtS1kYFX2L9VuMnjiNRY+cRbkjIUKTNHOmH8cJxhtPOgLzh5uKNTuKwuc3mW2nNeiF6 94z8KXZSGUaVnDOteapLLNvKBz5cEMqbLcqSJ3mSjyP0xyR1THSsBRPxOUvXi79p1j+y yTBIH+nNU0AVy+iSWrKRzWJdVV6GBF6QImE4I4oW0a5MqPgMvvlqOnQGH0X0sil3PHtz V3uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713210001; x=1713814801; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=t7tsrnDTZbk4SPKL6+qy7+cpPN7/TAFHKqUJ8Ysh/C4=; b=qHVk7VS6pnwXCuET+NuSLVnEhwxAjT650X6Zt3JuIzQ7z4i+JHJWO/bM/8mCYLJMAy ZIr+Kdn7XphOjSqa7gqNtb+oa/13MU5jWtaBjEjhDvGe/r73bECxQYOe24jKPha1D2LE RRd92cii/rvD4J+O1pei892yqQtsCCaRYY+Qg33F3FpgPCpTLlcR/VCiIuYNPnn3FRl2 YawL+AsfFIzpVvkACq5aB9oIAmneVez//ESrz6O/yi+Y4R7lEOF96dIzP5Wko3ytY+Fr NBU0vxiwOYjCVfsAXEU8wwjRCsEG01I0DY9WibcaKADc8CxG+qja6si0N1SktKrUd8ty qGAA== X-Forwarded-Encrypted: i=1; AJvYcCU/tnK78itGrO92juQEB+ki/nxkUDLYuNCAhBbOel+nZI2U1zqeAydUEYXHdhS/OKQQiigBxoZN6pXtgo5iS7/3ADKaEhDyR2HsqqjMEvSLqDM2S4o= X-Gm-Message-State: AOJu0YzU30qyfa0uy53FL8/ZCZS3ZWVQtcbB5NgqEoQL0/ohVPK4ratJ f7n2uXjMyC8oIg6ZQQA34buZxRQO2Ue0fTTAebP1JtoruD83lHv1NOslUNnxU2c= X-Google-Smtp-Source: AGHT+IEvWyaU3DDSHRGhHKAWLIUQW7NovoNH7LtXjxt2ZC08B71s/35oMI48FkGtZAuiQS+3TCw9ug== X-Received: by 2002:a05:6512:2247:b0:515:d176:dfd1 with SMTP id i7-20020a056512224700b00515d176dfd1mr10519441lfu.56.1713210001060; Mon, 15 Apr 2024 12:40:01 -0700 (PDT) Received: from [172.30.205.18] (UNUSED.212-182-62-129.lubman.net.pl. [212.182.62.129]) by smtp.gmail.com with ESMTPSA id v23-20020a05651203b700b00515bad4cd0asm1332203lfp.155.2024.04.15.12.39.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 15 Apr 2024 12:40:00 -0700 (PDT) Message-ID: <90b9da5e-8a2b-4a0d-bee8-bb21c74cb355@linaro.org> Date: Mon, 15 Apr 2024 21:39:56 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 3/4] firmware: psci: Read and use vendor reset types To: Elliot Berman , Bjorn Andersson , Sebastian Reichel , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul , Andy Yan , Lorenzo Pieralisi , Mark Rutland , Bartosz Golaszewski Cc: Satya Durga Srinivasu Prabhala , Melody Olvera , Shivendra Pratap , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Florian Fainelli , linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org References: <20240414-arm-psci-system_reset2-vendor-reboots-v2-0-da9a055a648f@quicinc.com> <20240414-arm-psci-system_reset2-vendor-reboots-v2-3-da9a055a648f@quicinc.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <20240414-arm-psci-system_reset2-vendor-reboots-v2-3-da9a055a648f@quicinc.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240415_124005_940897_330F3B25 X-CRM114-Status: GOOD ( 19.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 4/14/24 21:30, Elliot Berman wrote: > SoC vendors have different types of resets and are controlled through > various registers. For instance, Qualcomm chipsets can reboot to a > "download mode" that allows a RAM dump to be collected. Another example > is they also support writing a cookie that can be read by bootloader > during next boot. PSCI offers a mechanism, SYSTEM_RESET2, for these > vendor reset types to be implemented without requiring drivers for every > register/cookie. > > Add support in PSCI to statically map reboot mode commands from > userspace to a vendor reset and cookie value using the device tree. > > Reboot mode framework is close but doesn't quite fit with the > design and requirements for PSCI SYSTEM_RESET2. Some of these issues can > be solved but doesn't seem reasonable in sum: > 1. reboot mode registers against the reboot_notifier_list, which is too > early to call SYSTEM_RESET2. PSCI would need to remember the reset > type from the reboot-mode framework callback and use it > psci_sys_reset. > 2. reboot mode assumes only one cookie/parameter is described in the > device tree. SYSTEM_RESET2 uses 2: one for the type and one for > cookie. > 3. psci cpuidle driver already registers a driver against the > arm,psci-1.0 compatible. Refactoring would be needed to have both a > cpuidle and reboot-mode driver. > > Signed-off-by: Elliot Berman > --- [...] > +arch_initcall(psci_init_system_reset2_modes); Perhaps this could be called from \/ Konrad > + > int __init psci_dt_init(void) > { > struct device_node *np; > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel