Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp53245pxt; Thu, 5 Aug 2021 17:43:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLcl9q03gx5IkpTt0VlR4p1SJfrL5IUF/o8tTi0/0r73zeYysZflWNi5IMsPTpM1LwTSAw X-Received: by 2002:a17:906:4d12:: with SMTP id r18mr7215805eju.537.1628210615797; Thu, 05 Aug 2021 17:43:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628210615; cv=none; d=google.com; s=arc-20160816; b=b5KbG7fvfFnkB51DAZ/sCUw+ghSSMHD1z4FjMW5eaZSTpP0iUVT6OJlpSV64ePu7OC NayzzabS2ssROHoH1Qs43nks0ZveKKobXNcwgq3ezP+dIEDYsc188DVbnToLSON7FqfT pL/7XiUr/6q5ud3NV66TTbFXx/CrG1gSYUCJOWKq+1n0IWiONz0xwfkiSR8h1fZTVIXF yZFl/gAvSoiPzNHTfB/yy2MfguWkqjl0ZdLnk6gMh+MAyxkmdm+EyLrodrTp5Mzy94HZ hJQ40W2zTsFHThOUvZMV+N+TQGRDxHsYEdu9jSYxeJkcxtzWtHZlyRsY+ym6prkCv9er QhwA== 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=MhAdb2Kihhg6rVG3uFDeKcl+JBG5IM2thW4aNaeXliY=; b=h8WwRJxV1lSXLlY2LzSXf2traVgenUTqukYKB2CQ1VtyZtkRs8B2Ui7lju0OJd936Z CUqTj3jzXhH5sJWdzknbMoq0EOe2VH2emWVDRlNXmVJ0Ta3keqvd74lJ/1vwpipfHw9B /El/221PwHUzaEdHFMwLXLwZLDy0ydniab71/ZxbNqaW2U8y8Lf2lR01mVj3jzPRQQZA uY1n/opQnj9nfZr2GktZTTJTvM1rCW5NEZg2cys3UqcBbuHa/HamTFzGLk2UhePvTHGL /0FEL4Bs4EQkD2G6uxtlOrQK9U/zQY03vtTQmfxw4pS6aIQiktKculeV0R/yi+4c/2Am ED9w== 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 bv8si7882196ejb.87.2021.08.05.17.43.12; Thu, 05 Aug 2021 17:43:35 -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 S241847AbhHETCq (ORCPT + 99 others); Thu, 5 Aug 2021 15:02:46 -0400 Received: from mail-oi1-f170.google.com ([209.85.167.170]:44021 "EHLO mail-oi1-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241819AbhHETCp (ORCPT ); Thu, 5 Aug 2021 15:02:45 -0400 Received: by mail-oi1-f170.google.com with SMTP id bh26so7155396oib.10; Thu, 05 Aug 2021 12:02:30 -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=MhAdb2Kihhg6rVG3uFDeKcl+JBG5IM2thW4aNaeXliY=; b=USHj5Jr1fJsBigcQGjfVD5kM6WsmDrVp6btFJWP+K2mT0ki6rycHU/IIhkjTNBtoog WqrQReFN5Vk1yrOiRXoX75SkbuggqvwAxSgNQty2JSr2JLsMbPdr6lB5BWBOEWRpcaRW IheHT95Tm3vbqEuBhsQZv78c0spv9I7ZTb1rrZ0zzGoBDWRUyQLKQcnshYBQRsOfnVbl AqHUQlSuvQnwtjIMWOuRQq53Dx8wIBx7EwqhRgnHTiv5Yo+SllSDGJOZUQACeMIPWpwZ MOz9U31qiJJa2u4Q1CipOUIQxsveUEa/ocfd+fr2Mv46dkukE33IwqYCZFhxPP0wFIKz TUJg== X-Gm-Message-State: AOAM533YAzaaVQte17tW/yo/ybSpyWlqipwPYiCOOtNRYwPGdIEoOqXo UFsNwXrXXXjxlxPV+aj6aZ46QAAjXzdjPdLVqiA= X-Received: by 2002:a05:6808:198c:: with SMTP id bj12mr4752045oib.71.1628190150002; Thu, 05 Aug 2021 12:02:30 -0700 (PDT) MIME-Version: 1.0 References: <20210726100026.12538-1-lorenzo.pieralisi@arm.com> <20210802152359.12623-4-lorenzo.pieralisi@arm.com> <20210802164622.GJ18685@arm.com> <20210803091605.GA9637@lpieralisi> In-Reply-To: <20210803091605.GA9637@lpieralisi> From: "Rafael J. Wysocki" Date: Thu, 5 Aug 2021 21:02:19 +0200 Message-ID: Subject: Re: [PATCH v2 3/3] ACPI: Add memory semantics to acpi_os_map_memory() To: Lorenzo Pieralisi Cc: Catalin Marinas , "Rafael J. Wysocki" , Linux Kernel Mailing List , Hanjun Guo , Ard Biesheuvel , Will Deacon , Sudeep Holla , 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 Tue, Aug 3, 2021 at 11:16 AM Lorenzo Pieralisi wrote: > > On Mon, Aug 02, 2021 at 05:46:22PM +0100, Catalin Marinas wrote: > > 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? > > Thank you, I don't know what's the best option in Rafael's opinion > (of course if he is OK with the patches which are mostly touching > ACPI code). Well, I can apply them. I'll queue them up tomorrow, but next week I'm on vacation, so they will show up in linux-next after -rc6. Hopefully, that's not too late.