Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1485706pxk; Fri, 4 Sep 2020 10:28:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXF7zxHPWojOI8iwM03LLmMe24U5p5caW4iLekdaoo74lj3IVSLsJr4xaYa2pR6+HqX6u/ X-Received: by 2002:a05:6402:176e:: with SMTP id da14mr9927832edb.349.1599240496295; Fri, 04 Sep 2020 10:28:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599240496; cv=none; d=google.com; s=arc-20160816; b=HAiNx3F0hKwKxgcxcCIoYJ+PmFJldvstum9FbEGwno0MZ134eeRVX7KHhoIIQPfDOx XwrDm1X8RAafyigldk7CKJ964HphW8OYlQqc7o5mbgR+ROv+pFmXn1QZKz9QRmwWUutS MFifyyk5cm74aZk8mM9KqGpZsoo5nMrFe8kQ3J6ej1nA8fb1oCpunwIYgiKp/ADNbT/Q 0jEm0SZJ3B6kjwpjyUUOo6s+5tPhxbQpMDJ8zMj/+jm1QMxAdbK7rXzB7irKA5KARGB1 3a5d4+hQCAVI6JuyjC/3L1fAhngrlV8jY+JhlUcXDCSg+L0+yZnO1cYn757LumC/oW8p bFfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=T8CvO02jBkNp698y1zY2A5+AYTuEgtbiRlV1lNjPKiI=; b=pQTDVEKIh3DzKJlcSiwNUgI8Buh55Dd8T/EeaGcScOMxCruEyVJzF3COimrBtg/+6P +A8ujsKQiPFewWgPZn1GElAfretR7lShOZsUE3KYT2kvQINl2dEsLDZsHl+dsuIWNicl 4vVAf28isGl4uVVY2wu6gtY428CVIlLHWL8tCanJh+pNcc/GdwPL+ee7VewRCwbWhRAP k/8Buxo1Hlj57lfCDMdFx/7JTM5aLnUgyoqLrpiM+HIEwA8iR73CerY5zJPy0Z5+TEpQ EQT4yTLVerrtfeQkIg4Fqe3eInuq3PndHP/csF8a2tfx5E26OLuNqCDyDkTl9rrQyjFO iQnA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n4si4402159edo.589.2020.09.04.10.27.53; Fri, 04 Sep 2020 10:28:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727902AbgIDR0m (ORCPT + 99 others); Fri, 4 Sep 2020 13:26:42 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:53176 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727797AbgIDR0U (ORCPT ); Fri, 4 Sep 2020 13:26:20 -0400 Received: from 89-64-89-131.dynamic.chello.pl (89.64.89.131) (HELO kreacher.localnet) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.468) id fdcf7f96b97809a9; Fri, 4 Sep 2020 19:26:17 +0200 From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Erik Kaneda , Bob Moore Subject: [PATCH 0/6] ACPICA / ACPI: OSL: Rework GPE registers access code Date: Fri, 04 Sep 2020 19:19:26 +0200 Message-ID: <1748021.N9i9sLPJ40@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi All, The underlying issue here is that in Linux calling acpi_os_read_memory() or acpi_os_write_memory() from an interrupt handler is generally invalid, because these functions may attempt to map memory on the fly. It is only valid to call them from an interrupt handler if it is known that there is a memory mapping covering the physical address passed as the argument. However, in that case using acpi_os_read_memory() or acpi_os_write_memory() for accessing memory is inefficient, because they need to look up the mapping in question every time in a global list, and it would be much more straightforward to use the (known already) logical address of the target memory region. In ACPICA this problem affects GPE registers that are accessed with the help of acpi_hw_read() and acpi_hw_write() which is inefficient not just because they end up calling acpi_os_read_memory() or acpi_os_write_memory() if the GPE registers are located in system memory, but also because these functions check things that need not be checked for GPE registers in particular and they do that on every access. This series of patches reworks the GPE register accesses in ACPICA to be more efficient by omitting the unnecessary checks and making it possible to use logical addresses directly if these registers are located in system memory. The first four patches modify ACPICA and the last two add the requisite OS support to Linux on top of that. Please refer to the changelogs of the patches for details. Thanks, Rafael