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 X-Spam-Level: X-Spam-Status: No, score=-16.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8153C4338F for ; Tue, 27 Jul 2021 04:24:03 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id B350860BD3 for ; Tue, 27 Jul 2021 04:24:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B350860BD3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:CC:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=9fIT6Rv/Sz8Yxiu4WrL8S91SX7IGoPIWuCnwf4bPU7g=; b=e3w+kYWTpCxC6VhhI4njZ1/ym5 kaDg7CYiIJDWbpOA36xBOAfC+7zubVJ/sGyqcemMJ2vEZckMMtnPvXJT9A043JeVUKQpeQ2XUQ5Z2 ZmuDJcJo9T/tiv4rjYfxzCJ2QoIr3BudSFw9LU0gXoSvGbuQiOVPR+nb5rhH9JAnfbMtonI37nYWP 6ms8bIwgejZ0cgPEoi9iZd6vljUCbVvwQbMrsKoV6lgLVYCZ+BMw6ubwV/xO6EaPhmwiXXKgfRH7I w6RLx2q5TT1BwXz3Otkq1wx2twALquqDVkDKGTQ9licC0eNjAAYeGFhg+5IaNYY8NN+rpFFL5+U+S v2StUfJA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8EbO-00D940-St; Tue, 27 Jul 2021 04:21:59 +0000 Received: from szxga08-in.huawei.com ([45.249.212.255]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8EbL-00D93Q-8z for linux-arm-kernel@lists.infradead.org; Tue, 27 Jul 2021 04:21:57 +0000 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.56]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4GYk492wt2z1CPJS; Tue, 27 Jul 2021 12:15:53 +0800 (CST) Received: from dggpemm500002.china.huawei.com (7.185.36.229) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 27 Jul 2021 12:21:47 +0800 Received: from [10.174.178.247] (10.174.178.247) by dggpemm500002.china.huawei.com (7.185.36.229) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 27 Jul 2021 12:21:46 +0800 Subject: Re: [PATCH] ACPI: Add memory semantics to acpi_os_map_memory() To: Lorenzo Pieralisi , CC: Ard Biesheuvel , Will Deacon , "Sudeep Holla" , Catalin Marinas , "Rafael J. Wysocki" , , , Veronika kabatova , Robin Murphy References: <20210726100026.12538-1-lorenzo.pieralisi@arm.com> From: Hanjun Guo Message-ID: Date: Tue, 27 Jul 2021 12:21:46 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20210726100026.12538-1-lorenzo.pieralisi@arm.com> Content-Language: en-GB X-Originating-IP: [10.174.178.247] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemm500002.china.huawei.com (7.185.36.229) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210726_212155_549291_01C646FD X-CRM114-Status: GOOD ( 14.49 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2021/7/26 18:00, 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 > Signed-off-by: Lorenzo Pieralisi > Cc: Ard Biesheuvel > Cc: Will Deacon > Cc: Hanjun Guo > Cc: Sudeep Holla > Cc: Catalin Marinas > Cc: "Rafael J. Wysocki" > --- > arch/arm64/include/asm/acpi.h | 3 +++ > arch/arm64/kernel/acpi.c | 19 ++++++++++++++++--- > drivers/acpi/osl.c | 23 ++++++++++++++++------- > include/acpi/acpi_io.h | 8 ++++++++ Acked-by: Hanjun Guo I did the boot test on both x86 and ARM64 server machines, and no regressions, Tested-by: Hanjun Guo Thanks Hanjun _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel