Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp537893lqs; Thu, 13 Jun 2024 19:26:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUVZtQRfpR3zUvuE8qMEx3G8W5xc8pWue/+cPFeKB4gAt9ABEVlWf+I4hgGVRR4XHq+bYnXXrPM4TwMdx7zdI1MD1qGaGRRCX/O1x0J6Q== X-Google-Smtp-Source: AGHT+IG7Z0ywL9M0QYwztCo9UQs+75hydAJNa+gY4YW0Zn6AKRsPEIKq77HbgTDke5h4gpp9vNZI X-Received: by 2002:a05:6808:1a18:b0:3d2:21c8:e1d5 with SMTP id 5614622812f47-3d24e8fb77bmr1740338b6e.25.1718331973703; Thu, 13 Jun 2024 19:26:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718331973; cv=pass; d=google.com; s=arc-20160816; b=Z8wFhrRoOLLe8IULHzFgXluBJAtPvK/hnx7n77cz6q2i6fSAhd/PARqyIxhXeRRRHc hXY6GzVoHxacJK/ii0FxX8uznNcWLOXz9Few7Vw/2gSPetNAA4XLda+ndrwT330QP5DN nMi+yksaeph3B5ESmwO7S3BBT5Hy4QkJ3yZORzZSwJJicF2ITQhGQrGvAdnt6RRxjGcS Jry7ENEN7B0BBa5+hEf/cTiFgJZiFicwF4E3I/N+XwyBSpD/SCe9WTOo3og4xrY6+Ee0 tvb65IjYq8fUUc4vsTJovMSDTb94ObGlNMnFHYXZYsu8hew1HrftzrIC7TL7whCNCw9k ECyg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:subject:cc:to:from:date:references :in-reply-to:message-id:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:user-agent:feedback-id:dkim-signature :dkim-signature; bh=Pf7UPKwrd/kvnTcMtegUpf1NMAComiNd4Hhie73WEqY=; fh=0swHkhOwDNbk07VyxSGC4+0W6MjuZ8b7HPoFyb/S23k=; b=z/eosiXAEHw5dv6N4DxSNOXL6leL5a35Zh8013p4Ijd7vcPpQsDrpBlFQs/dVV899r cy2BANoLeav032yjMMgNRjtK0ZD4EBsup0yFAiRlNHXo5n42KET0q4F7fqaSWs59ODA/ DTkdV+3TebfdVok3OL3mIqf+6Es1eOGSOQPQYye06yxUpPHmNOX6oHuLBDKNMQINvp23 EiwriCfN7fSAgT3080LUclbevdX8pn8Hyde4Kr1laNWcXJi9Vbp+1GWeWGfGXd7K0bFH M6wHft/v/RRRTM7qdDmpXetA2YB6hXFV4TdUO7ewgBPi6sX+JfHktCOe6z1p3ltK1Vsn c6Rg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm2 header.b=V3NL6jSn; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=enY8kinJ; arc=pass (i=1 spf=pass spfdomain=flygoat.com dkim=pass dkdomain=flygoat.com dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=flygoat.com); spf=pass (google.com: domain of linux-kernel+bounces-214225-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214225-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-705ccbcf864si2467196b3a.397.2024.06.13.19.26.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 19:26:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-214225-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm2 header.b=V3NL6jSn; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=enY8kinJ; arc=pass (i=1 spf=pass spfdomain=flygoat.com dkim=pass dkdomain=flygoat.com dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=flygoat.com); spf=pass (google.com: domain of linux-kernel+bounces-214225-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214225-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id C8A30B22225 for ; Fri, 14 Jun 2024 02:25:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E25B5183082; Fri, 14 Jun 2024 02:25:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=flygoat.com header.i=@flygoat.com header.b="V3NL6jSn"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="enY8kinJ" Received: from fhigh5-smtp.messagingengine.com (fhigh5-smtp.messagingengine.com [103.168.172.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 848B31822EB; Fri, 14 Jun 2024 02:25:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.156 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718331919; cv=none; b=hW95EDXSStM/U95Fjc6/Do4iFGj+tXIROYXjWca08ouNG1MNfO+JSuK6+BOSBkGo1h2TZY6Lsd1kZvqpq2sA+QjhJI+UVZF+7Fhzv3xlGqI5THbkAuEu+KoSGIjMl9kkR2pShoiKTbA7K26m80VU5l9OGGcRDNTc4G+dn5qgXsk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718331919; c=relaxed/simple; bh=Pf7UPKwrd/kvnTcMtegUpf1NMAComiNd4Hhie73WEqY=; h=MIME-Version:Message-Id:In-Reply-To:References:Date:From:To:Cc: Subject:Content-Type; b=gSL0vMWXOiVXTjHU04bfHfqBFdI/+/xMitWUU00xBJZllUHWfMr4SmvJQTDSxlmMhOdHpRECGc5lKYOx1SjBTWtFXir9GNnhrb4wDO4ybHx2ywUv9JE+qLGiTnphwHa+tSJNYqVTM88CCoviB+A2ccEdm/EVWunmaV1ReVNpkk0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=flygoat.com; spf=pass smtp.mailfrom=flygoat.com; dkim=pass (2048-bit key) header.d=flygoat.com header.i=@flygoat.com header.b=V3NL6jSn; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=enY8kinJ; arc=none smtp.client-ip=103.168.172.156 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=flygoat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flygoat.com Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailfhigh.nyi.internal (Postfix) with ESMTP id B2DD51140220; Thu, 13 Jun 2024 22:25:17 -0400 (EDT) Received: from imap44 ([10.202.2.94]) by compute3.internal (MEProxy); Thu, 13 Jun 2024 22:25:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1718331917; x=1718418317; bh=Pf7UPKwrd/kvnTcMtegUpf1NMAComiNd4Hhie73WEqY=; b= V3NL6jSnjobA3yCXOVJZnVLoQdK1qnGFjHHxbzLRh1ZAdHmdBFJnam8iut9Ex1ho 0FzSu5z+3yYUTfh+3DoPextN442seJYLb/p2xfNVFiUs+1uW3jPz6Lg2KxSfoKPf s39W+PQd8n6bCWASoD4lCwoymB8mUzVD9amuD05rHyEhn1WHyZd0E9o0eEdqBGF0 s2laT+mwLwVTugWnUkEJ6zV8XfewI6gmAaKOGgDB1audkt50JKLdgE/w9qGAi8K/ uK6tsDQCLkbK5WZwILXFFkbsQ4KDS3TYlFcVOZOJH16vh2WZ+R8eHfnVo9XoIahU azgrPx64BNVXAdGOhcia0Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1718331917; x= 1718418317; bh=Pf7UPKwrd/kvnTcMtegUpf1NMAComiNd4Hhie73WEqY=; b=e nY8kinJY1C23yyY7LawTo4tLazXcHQQ4eK/Z38mJnR6DRO5MUnB1DXmPsQMw+9PR 4mLj7WW93zJw4n6nGc4vxOmcdPnHv3PG2oQrOLFzlMlfMFFv/MDGJMQcFasbpq+J ZVSGXA4Nxsz1zB71NWuiA0PUg4jOuJhp0sms2exHwn8VrVptgkHHTd/GsNvbYWkz gVbpvXkffXXJfxKGwd/PHnFNnICwQXl5zdn5t1x/0FJSxiQsD7dNxJ8c5w121BZo 1S9+e6SiEfg9L7qCBd7wPGjTKtVJErgmBLJtaLQv/rU/zTZYwo+KY3P5J3nkrFiz fWwHEBiYXSEUCEnmvaa8Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedukedgheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtgfesthhqredtreerjeenucfhrhhomhepfdfl ihgrgihunhcujggrnhhgfdcuoehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtoh hmqeenucggtffrrghtthgvrhhnpedufeegfeetudeghefftdehfefgveffleefgfehhfej ueegveethfduuddvieehgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhm X-ME-Proxy: Feedback-ID: ifd894703:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 383F436A0074; Thu, 13 Jun 2024 22:25:17 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-515-g87b2bad5a-fm-20240604.001-g87b2bad5 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: In-Reply-To: References: <20240613-loongarch64-sleep-v1-0-a245232af5e4@flygoat.com> <20240613-loongarch64-sleep-v1-2-a245232af5e4@flygoat.com> Date: Fri, 14 Jun 2024 03:24:47 +0100 From: "Jiaxun Yang" To: "Huacai Chen" , "Jianmin Lv" Cc: "Xuerui Wang" , loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, "stable@vger.kernel.org" Subject: Re: [PATCH 2/2] LoongArch: Fix ACPI standard register based S3 support Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable =E5=9C=A82024=E5=B9=B46=E6=9C=8814=E6=97=A5=E5=85=AD=E6=9C=88 =E4=B8=8A=E5= =8D=883:11=EF=BC=8CHuacai Chen=E5=86=99=E9=81=93=EF=BC=9A > Hi, Jiaxun, > > On Fri, Jun 14, 2024 at 12:41=E2=80=AFAM Jiaxun Yang wrote: >> >> Most LoongArch 64 machines are using custom "SADR" ACPI extension >> to perform ACPI S3 sleep. However the standard ACPI way to perform >> sleep is to write a value to ACPI PM1/SLEEP_CTL register, and this >> is never supported properly in kernel. > Maybe our hardware is insane so we need "SADR", if so, this patch may > break real hardware. What's your opinion, Jianmin? I understand why your hardware need SADR. Most systems DDR self-refresh mode needs to be setup by firmware. There is no chance that it may break real hardware. When firmware suppli= ed SADR it will always use SADR. The fallback only happens when _S3 method = exist but no SADR supplied, which won't happen on real hardware. For QEMU we don't have stub firmware but standard compliant SEEP_CTL is sufficient for entering sleep mode, thus we need this fallback path. Thanks > > Huacai > >> --=20 - Jiaxun