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=-9.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 51282C04AB4 for ; Fri, 17 May 2019 16:48:40 +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 2275F216C4 for ; Fri, 17 May 2019 16:48:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="JZsUiM6F"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="ZhDwx/7u" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2275F216C4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qbkLBVEZCuSB7BcOV+WwiJb9IMOlV4QTbJ8+j5H1EFA=; b=JZsUiM6F9fSDUy htHvLmpUCbcbq1v1taTiwbMwLuUvAPiv57JOp3X+k1N3yU2CETdioteaReidjl5HEW917BTZC9YK/ yMQxHVnJ2MbvxG7lKkAdI2uM4XvtWOvIpk+gc9IOoaWPE9CY8TgOa43lgJGVZYFtlZNdhcAeGYsli Pl5Bi52y6icbHwEdgPcZL4ps6OrN247FhI/vM80n8ThwybiLRpEBY042DWIY1J0BKk6tUt0XB8vcp 9cFDYzCxLvPEa6AHzJLT3ZLbCXPgBhMa5wFuFbyCLEzln+KluegE7aTxx9ixoaPLaMzh0GzWtu/wj wFoMkvOpKuRxcwQZSjEQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hRg26-0008KL-RC; Fri, 17 May 2019 16:48:34 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hRg1S-0007TH-Vd for linux-arm-kernel@lists.infradead.org; Fri, 17 May 2019 16:47:58 +0000 Received: by mail-pf1-x444.google.com with SMTP id g3so3954382pfi.4 for ; Fri, 17 May 2019 09:47:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hE0fe9lMVv6/FQxLkF3fQ4UQY6bw1uWnd2q8EpUNjIc=; b=ZhDwx/7uQqUnTIHD1PA1Upu1Y8Z3YXS3B9HztVGpVhQ1tAXH449NhmdQCurju4ZJB9 vNhIXcRedwThXY2BekwHNiWsmcH7xI5RXQTxVxFuMqKhuiq90bGAcOc8hj9Vd5FEss09 u6kj7HIYJx12jSex16z82pa6RCUW1/cmEbwHk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hE0fe9lMVv6/FQxLkF3fQ4UQY6bw1uWnd2q8EpUNjIc=; b=J/Rs7RezeMueBXpddu6yhi+MnCPlw4xpagZfYJoAD17oX65JUl0fs22Tcb0wSp8U6I SlOvIGrsR37N0jZVXcFBgJ+9mfWiyNlnJ6JrXz9SID57Y0nlS9dyWtB+IYwduGGGGMyn RpZnsp2+9KgRqEJhVY0FwKkbH0uOJeq8ao5NwwqearuKtYCZIiJYiM7JZR9xq6EY7sML Cg5j8TUzXEGYRHqvadg+uQw92xzkjRIKK7tzCPw05r1o5y/zm9YPPFshiOaxb7kW4MNr DByj5wZLza2ciq6pLn1PPg3z4AZZYomeWxWmzuwtgyaaTyOr0sFL3L1pu4mmpEPHuTVt 3++w== X-Gm-Message-State: APjAAAWrZGrWeSvGTHC8U/6cIP8W6FASrthu/+Cl12cTVTwBFHPwENZz l058uCXyEs6waJb6utDw64s2uw== X-Google-Smtp-Source: APXvYqzuCXeovIOaR4RbpVXx1csND1I5sP1Zmc0ZU68p58V4I5232ilFAA9A/gPdohyIIkl9VXHhPQ== X-Received: by 2002:a63:785:: with SMTP id 127mr54984321pgh.230.1558111674612; Fri, 17 May 2019 09:47:54 -0700 (PDT) Received: from smtp.gmail.com ([2620:15c:202:1:fa53:7765:582b:82b9]) by smtp.gmail.com with ESMTPSA id l141sm12229810pfd.24.2019.05.17.09.47.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 May 2019 09:47:54 -0700 (PDT) From: Stephen Boyd To: linux-kernel@vger.kernel.org Subject: [RFC/PATCH 4/5] arm64: Add support for arch_memremap_ro() Date: Fri, 17 May 2019 09:47:45 -0700 Message-Id: <20190517164746.110786-5-swboyd@chromium.org> X-Mailer: git-send-email 2.21.0.1020.gf2820cf01a-goog In-Reply-To: <20190517164746.110786-1-swboyd@chromium.org> References: <20190517164746.110786-1-swboyd@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190517_094755_195541_8F2C4E1D X-CRM114-Status: GOOD ( 11.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, Will Deacon , Andy Gross , Evan Green , Bjorn Andersson , Rob Herring , Catalin Marinas , Dan Williams , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Pass in PAGE_KERNEL_RO to the underlying IO mapping mechanism to get a read-only mapping for the MEMREMAP_RO type of memory mappings that memremap() supports. Cc: Evan Green Cc: Rob Herring Cc: Bjorn Andersson Cc: Andy Gross Cc: Will Deacon Cc: Catalin Marinas Cc: Dan Williams Signed-off-by: Stephen Boyd --- arch/arm64/include/asm/io.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/include/asm/io.h b/arch/arm64/include/asm/io.h index 8bb7210ac286..245bd371e8dc 100644 --- a/arch/arm64/include/asm/io.h +++ b/arch/arm64/include/asm/io.h @@ -185,6 +185,7 @@ extern void __iomem *ioremap_cache(phys_addr_t phys_addr, size_t size); #define ioremap_nocache(addr, size) __ioremap((addr), (size), __pgprot(PROT_DEVICE_nGnRE)) #define ioremap_wc(addr, size) __ioremap((addr), (size), __pgprot(PROT_NORMAL_NC)) #define ioremap_wt(addr, size) __ioremap((addr), (size), __pgprot(PROT_DEVICE_nGnRE)) +#define arch_memremap_ro(addr, size) __ioremap((addr), (size), PAGE_KERNEL_RO) #define iounmap __iounmap /* -- Sent by a computer through tubes _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel