Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp743553pxb; Wed, 25 Aug 2021 14:03:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5VsLaIINvje29L3D9D1j3rW+EPJqkBIQ5Hj+/5mOdCeFaWlRPk++00oQKyW53kZTXp0vC X-Received: by 2002:a05:6e02:ee1:: with SMTP id j1mr199402ilk.61.1629925395817; Wed, 25 Aug 2021 14:03:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629925395; cv=none; d=google.com; s=arc-20160816; b=dtubbl9DR19pyq3yAuQBDvfPEgRDcA6o9Wblm0AtJY/QK/2VdOxKDZpSLyF0MC3zVu rPLAiEC5Rs0GWzJMWU9T8oJsdkehUnEliGo33BxhFSr3gvjDRJi71iC4X+TDZk8/4oRB z+4s8EatGJK33gYwtfVHHAan4pbrjDDtEtlIl2hMbe8URou3iURN3eCBWs41pFVLwKKS N6AD5+zyKb8ofIii6ZJS96e47UzpYhcbnKOgp9FELVFzykS+SR55a1ofv2FuVjD/XMyi PSYC5dJK5Eb2Ec3fYrqlTaFQf2jSHGunJZ5mrdsHw80ylO8uAp1hm578b5xXIZzFBvE9 K71w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=iCtlcERoYNnbif+Y8zhh0368pArdTRgkUQL9JCAr/bg=; b=nSntuBXOfnriuRv4C/r6pElY6gj5kSuWB1z2A/SW1PlUVAH9iwjIJB3axxl6D04UaI eyad3CnM6zFW93gvQihfish2wTSPeH/KI2/0v8Eox7op9HLBwO9k0hOVw71/a01rrpPQ gpyamynxlBSy9dtSLuJYhliaVosRBwyWu6vyiNsczYMUMikdQ97JbwSB7WCfIwTnnE8X YlP3yn5+ImnhIX3mFN7oEOEiWQDFpi7WAZ3as3qYsIdPSwyMNtiqRYqyzl6K76x7BnoB cNS3au8lPuTAZ6hMuqh9q+8JLaB8Rx7MGNVUW5jDtk0rT8dJaeNtdrnHQWAlbJMbp+K7 I77Q== 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k39si572821jav.114.2021.08.25.14.03.04; Wed, 25 Aug 2021 14:03:15 -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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233845AbhHYRrS (ORCPT + 99 others); Wed, 25 Aug 2021 13:47:18 -0400 Received: from mail-ot1-f44.google.com ([209.85.210.44]:34725 "EHLO mail-ot1-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231602AbhHYRrR (ORCPT ); Wed, 25 Aug 2021 13:47:17 -0400 Received: by mail-ot1-f44.google.com with SMTP id k12-20020a056830150c00b0051abe7f680bso46287otp.1; Wed, 25 Aug 2021 10:46:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=iCtlcERoYNnbif+Y8zhh0368pArdTRgkUQL9JCAr/bg=; b=aU3+zl9Ig2KOMEVT6lqGqif9khEA4zJjDPFqkDkV/bOKNPOPSjCGfedxHo7TrAlSEA /XXeJLOgSYjRgWcu7ukW152rmTwX1nJPjAW/eScUfoKocta0E0bfwDwKVYMVdcAHDqEN Bqh/p/JtcjV7a4hTHzjd3eZUrVlMQdp6O/sIMv3GVJaBYOW9mgGd8CpGBFwky9GCeWpz vWjxA9/dDW0lsOOx9c82ReuTA0eSrdRc2VwCHLKaUo3HLQStmCqWCfCZyzojie1yuMGF 3bNp9OPRztC5jpND0WWpahWJtSmZRbSJBdE9/3DNDwNF/iqwAUnMY1HXL4UWzna/gs+3 A8hA== X-Gm-Message-State: AOAM530lCMcyd7ry0zoUlUD5RnR/XbptUWTT2Da3V3rYrTazBDatiADI Cde/93OfWgocTmcsM5KNkZC7UTTdbGKTNRKXUuM= X-Received: by 2002:a9d:a57:: with SMTP id 81mr24620521otg.260.1629913590155; Wed, 25 Aug 2021 10:46:30 -0700 (PDT) MIME-Version: 1.0 References: <20210802152359.12623-1-lorenzo.pieralisi@arm.com> <20210823104618.14552-1-lorenzo.pieralisi@arm.com> <20210823123052.GC8603@arm.com> In-Reply-To: <20210823123052.GC8603@arm.com> From: "Rafael J. Wysocki" Date: Wed, 25 Aug 2021 19:46:19 +0200 Message-ID: Subject: Re: [PATCH RESEND v3] ACPI: Add memory semantics to acpi_os_map_memory() To: Catalin Marinas , Lorenzo Pieralisi Cc: Linux Kernel Mailing List , Hanjun Guo , Ard Biesheuvel , Will Deacon , Sudeep Holla , "Rafael J. Wysocki" , ACPI Devel Maling List , Linux ARM , Veronika kabatova , Robin Murphy Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 23, 2021 at 2:31 PM Catalin Marinas wrote: > > On Mon, Aug 23, 2021 at 11:46:18AM +0100, Lorenzo Pieralisi wrote: > > The memory attributes attached to memory regions depend on architecture > > specific mappings. > > > > For some memory regions, the attributes specified by firmware (eg > > uncached) are not sufficient to determine how a memory region should be > > mapped by an OS (for instance a region that is define as uncached in > > firmware can be mapped as Normal or Device memory on arm64) and > > therefore the OS must be given control on how to map the region to match > > the expected mapping behaviour (eg if a mapping is requested with memory > > semantics, it must allow unaligned accesses). > > > > Rework acpi_os_map_memory() and acpi_os_ioremap() back-end to split > > them into two separate code paths: > > > > acpi_os_memmap() -> memory semantics > > acpi_os_ioremap() -> MMIO semantics > > > > The split allows the architectural implementation back-ends to detect > > the default memory attributes required by the mapping in question > > (ie the mapping API defines the semantics memory vs MMIO) and map the > > memory accordingly. > > > > Link: https://lore.kernel.org/linux-arm-kernel/31ffe8fc-f5ee-2858-26c5-0fd8bdd68702@arm.com > > Tested-by: Hanjun Guo > > Signed-off-by: Lorenzo Pieralisi > > Acked-by: Ard Biesheuvel > > Cc: Ard Biesheuvel > > Cc: Will Deacon > > Cc: Hanjun Guo > > Cc: Sudeep Holla > > Cc: Catalin Marinas > > Cc: "Rafael J. Wysocki" > > --- > > Resending with all lists CC'ed. > > > > Patch series is a v3 of a previous version[2]: > > > > v2->v3: > > - Dropped first two-patches following LKML feedback[2] > > v1->v2 > > - Added patch 1 and 2 according to feedback received on[1] > > > > [1] https://lore.kernel.org/linux-acpi/20210726100026.12538-1-lorenzo.pieralisi@arm.com > > [2] https://lore.kernel.org/linux-acpi/20210802152359.12623-1-lorenzo.pieralisi@arm.com > > > > arch/arm64/include/asm/acpi.h | 3 +++ > > arch/arm64/kernel/acpi.c | 19 ++++++++++++++++--- > > drivers/acpi/osl.c | 23 ++++++++++++++++------- > > include/acpi/acpi_io.h | 8 ++++++++ > > 4 files changed, 43 insertions(+), 10 deletions(-) > > For arm64: > > Acked-by: Catalin Marinas > > I presume this patch would go in via the acpi tree. Applied as 5.15 material, thanks!