Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6770631rwr; Tue, 9 May 2023 22:01:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7FTH3G6wz3Pg9aR642xQntvQS7w9Wu7KlR8YynRpnyuJhzh/97Uegk5nra0raBQTQ5lqbc X-Received: by 2002:a17:902:d491:b0:1ab:26a8:5401 with SMTP id c17-20020a170902d49100b001ab26a85401mr24195445plg.31.1683694902641; Tue, 09 May 2023 22:01:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683694902; cv=none; d=google.com; s=arc-20160816; b=NE/QkpOr8mydZdVmqPqaxw+JWAcQ+gsQ63L7SRzVXBFVhUTh3sEPQRsNTcTRyYdWlv MUGqcfrAaw07evC8IawiBzzjTsjKskKUJOQMT9NCvd/wtwNSiSLfqDi2Cllt9SZK+pwS V5+XzQr9saIwtQVsvuq7kcxBGcF6G7315DGrPzjG2HTyOjgAV++dWS7xlGKTCjH+LEU5 qTU/fHb3GOVdBLksAZTQgn2rdi5i3LFZ0FFWk37nkYXVwoB4iH6qRhWzMxY4yP524LQG kPMHvmCvQK6i4jT9LojHK6Ch8oz0sqFM/se1pQqxmtcwKSaMcOa+CFFRcftfG4pPOkaQ AFAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=8E7TU+EpCMsIU6CqnZRd0vWJGC9oqEXRuUswowSWl1o=; b=nBd9yQPKXn2EsFb23YdSALwXyIkYOJd/2sRAzjufHEwHK9Vtldn0XqAgJVxn7x7Ubn Ii9sZhT7UgQBjri4geDwCOSbyLaa+wQqv4FNtI4GKxY8WusDdqS7Yd7V2C9qqLBxeHQ5 SIkK684xLu0ARk+YPdUYZWBGizEC9lMzOy1HzidWSoJ0EnWCEc23FvSp5IUTBLFzVxb1 XqNz0hNow6XGG7GJoZOstoiZn5RDA4OxIvQ9wJA9DUr8H003UT8itlJIXeVyQH2jAWW/ H6gsV/KB80uFrU8FJPowSWV9L9w8Bcg6V1iyU4yKPQxzMq1V5swPYhF4PsouSFL80tFE ApEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=nx2nVYMV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i6-20020a170902c28600b001a6e719421asi2924925pld.366.2023.05.09.22.01.30; Tue, 09 May 2023 22:01:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=nx2nVYMV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235340AbjEJEyN (ORCPT + 99 others); Wed, 10 May 2023 00:54:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230215AbjEJEyH (ORCPT ); Wed, 10 May 2023 00:54:07 -0400 Received: from mail-yw1-x1133.google.com (mail-yw1-x1133.google.com [IPv6:2607:f8b0:4864:20::1133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D3BB1BD1 for ; Tue, 9 May 2023 21:54:05 -0700 (PDT) Received: by mail-yw1-x1133.google.com with SMTP id 00721157ae682-55a14807e4cso120989447b3.1 for ; Tue, 09 May 2023 21:54:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1683694444; x=1686286444; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=8E7TU+EpCMsIU6CqnZRd0vWJGC9oqEXRuUswowSWl1o=; b=nx2nVYMVrNHZwwSl8w3NSmhsRvWihgBOt84R2c16JqiYC4KBl38YHxIAdhEkbKIKU+ 3KinRet9UKewX1U+bJzN/HA2S7KOTkCF4X7wqaw/K7+S17drzHhQwyGVptzSW8CKp+rn 7n/QckVxFQIds+kKrngIuvcYjerJY8U+pP0nKt9JbKkli09JNKT1dmegLnEsv/7gGsJF Qp1n5E/tb+Ovu77mxoxN3oLzT8n8iySQ8FxtBPgBcz8wTrqYdAKrqvMBlZ96CIsNIEnp 6lPBYSKwbzZLj7KAL6W20hrNmnnmTZNvlsZaMnXbJsKFp6VCUGJP8Oy+j1QTC9dUJ6vO gsZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683694444; x=1686286444; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=8E7TU+EpCMsIU6CqnZRd0vWJGC9oqEXRuUswowSWl1o=; b=c6e9SaTPx6JxExVUPlh2n96WVZNLOm1PH8OS8cRLPjjneAOoi7LzzcxY5NzyMOBXYw DbBa2pJ9lLrKCodp9BgMZaS2ZpPRzT774qgJCqdq4602gQvsJjaNOeXgQmifUGgBw5F7 Eqn5jkP3pa+G95PRhAgtf56Qnx8O8IeelhiX/8N9Zgd0oBCu4E9nf2J1AQBa2v9MdcMM IOoN8MLUgmz8C8CM00tP5gMxYfCXNPqIt2ESWQM6BPMDOCThAjwfyLBuxd2AyMuG1OTj 1YmpdZfPjaQIM5vxatJNxAxXLODegIA8wgElMxoSf9pharku21SZ0zOQtkVQJz5kG2em K1LQ== X-Gm-Message-State: AC+VfDw5m8QcV/5Fn5aeYYrpqUURD4Orun/Tp6MqrfZyg2mhqaB97116 RbwbsdEOCN9+vC6BGfMvVfkdiA== X-Received: by 2002:a0d:d955:0:b0:55a:ad0a:766 with SMTP id b82-20020a0dd955000000b0055aad0a0766mr17847236ywe.10.1683694444181; Tue, 09 May 2023 21:54:04 -0700 (PDT) Received: from ripple.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id l4-20020a81d544000000b0055b46dac76esm3814196ywj.116.2023.05.09.21.54.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 May 2023 21:54:03 -0700 (PDT) Date: Tue, 9 May 2023 21:54:00 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@ripple.attlocal.net To: Andrew Morton cc: Mike Kravetz , Mike Rapoport , "Kirill A. Shutemov" , Matthew Wilcox , David Hildenbrand , Suren Baghdasaryan , Qi Zheng , Russell King , Catalin Marinas , Will Deacon , Geert Uytterhoeven , Greg Ungerer , Michal Simek , Thomas Bogendoerfer , Helge Deller , John David Anglin , "Aneesh Kumar K.V" , Michael Ellerman , Alexandre Ghiti , Palmer Dabbelt , Heiko Carstens , Christian Borntraeger , Claudio Imbrenda , John Paul Adrian Glaubitz , "David S. Miller" , Chris Zankel , Max Filippov , x86@kernel.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 09/23] parisc: unmap_uncached_pte() use pte_offset_kernel() In-Reply-To: <77a5d8c-406b-7068-4f17-23b7ac53bc83@google.com> Message-ID: <12c4693d-8bb3-2852-8cf5-9777b427d770@google.com> References: <77a5d8c-406b-7068-4f17-23b7ac53bc83@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org unmap_uncached_pte() is working from pgd_offset_k(vaddr), so it should use pte_offset_kernel() instead of pte_offset_map(), to avoid the question of whether a pte_unmap() will be needed to balance. Signed-off-by: Hugh Dickins --- arch/parisc/kernel/pci-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/parisc/kernel/pci-dma.c b/arch/parisc/kernel/pci-dma.c index ba87f791323b..52d5f8a5cdd2 100644 --- a/arch/parisc/kernel/pci-dma.c +++ b/arch/parisc/kernel/pci-dma.c @@ -164,7 +164,7 @@ static inline void unmap_uncached_pte(pmd_t * pmd, unsigned long vaddr, pmd_clear(pmd); return; } - pte = pte_offset_map(pmd, vaddr); + pte = pte_offset_kernel(pmd, vaddr); vaddr &= ~PMD_MASK; end = vaddr + size; if (end > PMD_SIZE) -- 2.35.3