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 DC943C433FE for ; Mon, 10 Oct 2022 04:35:56 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:Cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=2Laf43i0X5jK1ffY2YKpAo81oyzGLVfxAypm30l7/Lk=; b=PseUy43dYcLfzA brd2qatoVJMmMb9iQU6SDpMVq+GS0ZoU5MMD6Xafd+3mSW3ayZgbMhqpmjq0iumzequgPp3TXvkwP Wph/pbwGRc3QG0D8BLKcmQqIDy5kxUmDn/JmBfozcYw4HbC4IpfaCUHAh+bafkDdtIBBLJJ58o749 hnTmsWiJaYJc8TS0eOuijR4NY/eJb9pay9YhhqkE4gz1WnnG9qKIfBBScLq28kidhJVMGTQnO9n8x oRy9yXVPUCQ7vmLOg+5IoUay/ZruIX1MaAcc5SPWkflVwZ99Qcu18vg68QMEwLtd22FNkaZRjeLsE nXGLkra0eZWhZ8KlEb4w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ohkVB-00H0EA-Pl; Mon, 10 Oct 2022 04:34:53 +0000 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ohkV8-00H0Dq-Ml for linux-arm-kernel@lists.infradead.org; Mon, 10 Oct 2022 04:34:52 +0000 Received: by mail-pj1-x102d.google.com with SMTP id 70so8885720pjo.4 for ; Sun, 09 Oct 2022 21:34:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=WeEv0wivLRYQCUBdlfb17t8wiiEWcKs7wDPtk+muIMU=; b=VKqQPh2tZnr5Klb4fXNfD33+qDYdjOQErOWBRodbnoyp4o/WDVI1ERi7AwejAqlzEC E1Lwok11cwdnefQ+CecF+2y751gWZ+LE3M5ULoz2Bd5GJIduUZP9hocUV1C1bpcvHIVt rCqEMAfAdmrTDc8yDpLh83U90opwtw2RFzvOhKtZLxpXXA2QnXBSGhhZZStKwUxqq+6R MCKBLmV15fznPaW8FBYRqDk1t+/pNy+dkoW93CXIzQH0SQ/Te8UrlwmYRwIvbJkJUWEJ YtxoPa7M6cs5ZI/AK4GDM9C0MEh1EVvdRkVJq2i3tth5fA0fFbJDdD9Wt5mMizaka76M n7rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=WeEv0wivLRYQCUBdlfb17t8wiiEWcKs7wDPtk+muIMU=; b=cYJvdWp65aHuhAx2zJUYhWRFnrHOLgbkeaRGtJGRSUCDwXnhtC/bbgXawSljJWMa+Z YAblR1P8vH4rYrdS1juCYHvLqvQywIPPTLR0QfWb0idSb29Iw/laiId+HTHTJ4e5msnD rZFjVMV58uHc3CYqBnTgvpl3k8SNjpcNU8BS0Sm1KjTdw/5CUOHkPN3UYoJEIVQqoN4e K8kXeDyBQSX5jr4wOyVOh75yHthmLHukId+uaGDW0ZWFdZ7tq874+OBuGfVulsSE6ARc 1DwxaWMRDRWoYKd+v1KCC89xCvcGXswM1lhMFDlEeJhMn0ItmyA94UjxAsjBuaxyVCmA 8xhg== X-Gm-Message-State: ACrzQf10y1PO47/DysbZaHX1VJ62vzt207JHpStF0Ud4ircO/LtxOJdY AzI3YnolWJcnFfoU90hXMwyqC67GdrZZTw== X-Google-Smtp-Source: AMsMyM4I68Yd8d7oFPpdKndM1cwdaoPaTMZJSbE6A8v/9aQeKDE0pf+AQX6P3BSMMGVWBJDY8Umf2w== X-Received: by 2002:a17:902:d70e:b0:178:2d9d:ba7b with SMTP id w14-20020a170902d70e00b001782d9dba7bmr17584528ply.90.1665376488908; Sun, 09 Oct 2022 21:34:48 -0700 (PDT) Received: from min-iamroot ([210.91.70.133]) by smtp.gmail.com with ESMTPSA id m18-20020a170902db1200b0017b69f99321sm5475089plx.219.2022.10.09.21.34.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Oct 2022 21:34:48 -0700 (PDT) Date: Mon, 10 Oct 2022 13:34:45 +0900 From: Min Lee To: suzuki.poulose@arm.com Cc: catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org Subject: wfi and wfe redundancy Message-ID: <20221010043445.GA40921@min-iamroot> MIME-Version: 1.0 Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221009_213450_834131_8DF28D0F X-CRM114-Status: GOOD ( 10.69 ) 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Suzuki, I am writing to ask you whether the code you wrote is including redundancy or not. The commit is https://github.com/iamroot19/linux/commit/bb9052744f4b7ae11d0061ac9492dd2949981b49. wfi has been added in __no_granule_support function through your commit. Thus, there are wfe and also wfi. The function saves an error code into one of the memory spaces, then falls into an infinite loop. In the loop, wfe and wfi are used to save power. There is no possibility that generates an event on the sequence, so wfe is enough to keep the core asleep. I think that's why the previous code used only wfe. Interrupts can also wake up the core that is sleeping by wfe, but this is also not enough to explain why wfi is needed because only one, wfe or wfi, is needed for saving power. Would you please tell me why both wfe and wfi are needed? Best, Min _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel