Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1772436pxy; Mon, 2 Aug 2021 09:49:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymPleulpjiaTCp9tr6q9xo0ypWzar3z/1nMXNmjgbAorBqHO8tJV0tCan6oWFI9GG/4jim X-Received: by 2002:a17:907:6289:: with SMTP id nd9mr16161671ejc.384.1627922959942; Mon, 02 Aug 2021 09:49:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627922959; cv=none; d=google.com; s=arc-20160816; b=TcQWmvjpFL81ceZAcjGH/mFOR3MAzmUd6j+NMNWE/dCt7Q1SIG3S/mLZgs1RM7DcMx ystgxOdO1rptuQtkGF7yjx/TsemgZlxJ8VKFWu3UEA3mXXUO3M46/yfi2ZVVbwJLTJ7T U6VlelKXkP7Ycgiq4a4fJ298nnaf1O4O3FNCrpPA6pIkq5pcJq2PciFi+V8BxWdjsKE4 X+B3hjNlvV3hBbceZ7hruYN/g6PIVAzBrKOnRwxDbsENOadmjZOgqbW0FHVA9ACXZULt DDgbS4eG4/WizwXm2lC+WctH9cjCAkKaFn0vUOdmoMPNoozNbAEEgJOrriAvMa1Hhm9Z i+aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=RGGUTIhcSBEHOuveAgppTebwKqndGSSzs35C3MjUQrM=; b=YpoUL8qJphjA59GJiBo0phGPn/PZ1v92gVtGjPpbgupkGO+Br104/0m2shFaY0kwqt OL/pZnoxcqL1q7iNvIkZ0+6VQHGPh2BN530WthF2+FTSA2esTL81C4WKcJ+qtUgsQcw/ a0ecqrLdsNns6qewCGrtZBy3HuD7r11bd+JH5eGdoeXIwVY6K7tTkyiAU1lKSpTuqgLR 0Y5Yicb2DbgChgbQwn3tKAU0RPbzO4n0o63WGcO8B1yuOof5/vKbNegnfSsS5XZOLZmt x5KOCvgcjoPd3Llp2V4tPmy8I0l9ONjTi7JMFjfxjd8ETzuuS8cluckYzJNrYWV5gPS6 hmmQ== 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g21si5038549edb.578.2021.08.02.09.48.56; Mon, 02 Aug 2021 09:49:19 -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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229945AbhHBQqh (ORCPT + 99 others); Mon, 2 Aug 2021 12:46:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:49652 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229640AbhHBQqg (ORCPT ); Mon, 2 Aug 2021 12:46:36 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 372C360F51; Mon, 2 Aug 2021 16:46:25 +0000 (UTC) Date: Mon, 2 Aug 2021 17:46:22 +0100 From: Catalin Marinas To: Lorenzo Pieralisi Cc: linux-kernel@vger.kernel.org, Hanjun Guo , Ard Biesheuvel , Will Deacon , Sudeep Holla , "Rafael J. Wysocki" , linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Veronika kabatova , Robin Murphy Subject: Re: [PATCH v2 3/3] ACPI: Add memory semantics to acpi_os_map_memory() Message-ID: <20210802164622.GJ18685@arm.com> References: <20210726100026.12538-1-lorenzo.pieralisi@arm.com> <20210802152359.12623-4-lorenzo.pieralisi@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210802152359.12623-4-lorenzo.pieralisi@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 02, 2021 at 04:23:59PM +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" For the arm64 bits: Acked-by: Catalin Marinas I presume this will get merged via the ACPI tree? -- Catalin