Message ID | 12c4693d-8bb3-2852-8cf5-9777b427d770@google.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9BC40C77B7C for <linux-mm@archiver.kernel.org>; Wed, 10 May 2023 04:54:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 40BA36B0071; Wed, 10 May 2023 00:54:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3BC536B0072; Wed, 10 May 2023 00:54:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2ABE96B0074; Wed, 10 May 2023 00:54:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 1E2146B0071 for <linux-mm@kvack.org>; Wed, 10 May 2023 00:54:07 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id EED3D1602B4 for <linux-mm@kvack.org>; Wed, 10 May 2023 04:54:06 +0000 (UTC) X-FDA: 80773128492.14.3F56502 Received: from mail-yw1-f169.google.com (mail-yw1-f169.google.com [209.85.128.169]) by imf07.hostedemail.com (Postfix) with ESMTP id 2E82340003 for <linux-mm@kvack.org>; Wed, 10 May 2023 04:54:04 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=google.com header.s=20221208 header.b=nx2nVYMV; spf=pass (imf07.hostedemail.com: domain of hughd@google.com designates 209.85.128.169 as permitted sender) smtp.mailfrom=hughd@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1683694445; a=rsa-sha256; cv=none; b=3VKMCQB6DSC67kDOQTRj4Gbq/IQFFKudswHwte7yedoWFqyqhqDiYZuQ/kS9QAaUqQIsIw LK1zQziFEXj118MW1bA9KrRqQEMJnd2+9VN/5Bbzcen5sCwIAcD5QDH9xDwsuf3sLy3uIv OErLUfjPE5eW1LBzSVMj7VjsluAVoC8= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=google.com header.s=20221208 header.b=nx2nVYMV; spf=pass (imf07.hostedemail.com: domain of hughd@google.com designates 209.85.128.169 as permitted sender) smtp.mailfrom=hughd@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1683694445; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=8E7TU+EpCMsIU6CqnZRd0vWJGC9oqEXRuUswowSWl1o=; b=wTaZ4Z/zOsOfJMJmhlgiJic/GK3LBlsLKBZkWS9ON/3J9aHk9ZpSr8QyY3bafjJSIY3cMH 45rij9ErWM91XYSCUBqhZqYmgX7u8KWCGa91d0Guw3btEwf6PN6N8lFqcxnkSNnsvhqGZB /tyAS7mhdSiQXfPO94CQZABf6arKnUI= Received: by mail-yw1-f169.google.com with SMTP id 00721157ae682-55a20a56a01so120889007b3.3 for <linux-mm@kvack.org>; Tue, 09 May 2023 21:54:04 -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=JEVnD05XIJgqQ/j4hoy16LF1SUYGirNFesk5qTBUl8F6Yrgs5gG6A8GF0KKhgEF9/b zr0fwNTTA0FDvmbXlpiTFpbsn3Cjhcd3WQOXLMmckroCDPS3x+Q409cTuMjX+/8a7l+o H5wkutPclbSPuhbPk8E9IARK5gIszvr/oFIwR8/xKvfFhPZVR/BclrIPxAemj/+X86q7 g6FSeBu5Jn7e5bhPH1br+o3qlPIdBVivlSFqNo1AqgUqNeVLa4ezTcfzA6SdgUazPT0m MG3TTsFmx8CFrYilBm/16DFNLD5GL34uctad2o64iQi7R2QWGs2HC1/T8qnXuj788zV7 ot2w== X-Gm-Message-State: AC+VfDxwh5Fq/Ko6ELwhJAtSdH35Dq/A5GIP93WVQ0VmG5yhEpCT+gJj JiKgoztxonyJ7TicUlADUFzdAA== X-Google-Smtp-Source: ACHHUZ57Dsib2dNeEkcs0nwSe68HvlbijE2Qa11Gh7g4OTrdhlBqOZhC7lvqfUbJMl49On6qtViJzQ== 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 <hughd@google.com> X-X-Sender: hugh@ripple.attlocal.net To: Andrew Morton <akpm@linux-foundation.org> cc: Mike Kravetz <mike.kravetz@oracle.com>, Mike Rapoport <rppt@kernel.org>, "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>, Matthew Wilcox <willy@infradead.org>, David Hildenbrand <david@redhat.com>, Suren Baghdasaryan <surenb@google.com>, Qi Zheng <zhengqi.arch@bytedance.com>, Russell King <linux@armlinux.org.uk>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Geert Uytterhoeven <geert@linux-m68k.org>, Greg Ungerer <gerg@linux-m68k.org>, Michal Simek <monstr@monstr.eu>, Thomas Bogendoerfer <tsbogend@alpha.franken.de>, Helge Deller <deller@gmx.de>, John David Anglin <dave.anglin@bell.net>, "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>, Michael Ellerman <mpe@ellerman.id.au>, Alexandre Ghiti <alexghiti@rivosinc.com>, Palmer Dabbelt <palmer@dabbelt.com>, Heiko Carstens <hca@linux.ibm.com>, Christian Borntraeger <borntraeger@linux.ibm.com>, Claudio Imbrenda <imbrenda@linux.ibm.com>, John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>, "David S. Miller" <davem@davemloft.net>, Chris Zankel <chris@zankel.net>, Max Filippov <jcmvbkbc@gmail.com>, 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-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 2E82340003 X-Stat-Signature: umdafkwj7fhorsgtwkkiujdan5hazgpf X-HE-Tag: 1683694444-564551 X-HE-Meta: U2FsdGVkX1+EHoHVyeOCVSU95868PZ4nfKgaPSKwvnQV9JSJJMWOsQnrC3J4kmxgo5jLigu2VVvAeN5h3nK8gi+pydwHSYWKHmcySHacV7qdpAVfEC3k5Ox9/mUiFyjKxihaOc7TG0+5vycbO+nZmSZwyscdAVA/ZnTOlTRw53JaZNMe6gIYrvvzK4zqzar+CCQK+FLe6pvrYe7iJnsBYPieqj9xZHK/am7SbHE39sH5SpK51MUh56ZW2WLNkvcQsErIC3RwI1TrDjlUGet66lS2Rw33hgvrKa9fJCSpk1jlHBPJfzA/mXrlqxCT9r0GkCF7f2Buzsa2Zm4pyb1616yTlMZMt0je8v6lkihfQjUVKMVZQY3pxB0J/fU2cIqKoCaR0pSrUVWASYG6vH4VyWR1l/9pkCHT2uCj/iBapGM1my2H8k+GMke5zU52tYtSM8oFkH9Rd9mConBXMkr+VYhM4Bir/j0vTjZ12CMfBGTkvnGdYg+Vy6Ewar/gajXQnrLWcDkEsICawodK8UA/4bfwBPbzfOW4HKg2s9e4x3d3IAeBTjMJTjHQ/LAcuz4dnJAhlpMVbJkX82gYwpUYEqAZIb2iC8IPqve4jlznFqzfxfVtKVv7AIXJRNzjCh13+0zi17WV6f91hkHFgI7/KVdNXX7eDt4UoO3SB/4J0qDaq7uWn0virw98jeNCzmv9WglPE5Fe1rNo6+0LixK7cJ1UsK10q2mQLgZ1FwrHImzlicqjD1E2SBqlvZgXQRDybAqE+jyuvLXQw5vX1NLgKUwXpTwiaNB+TjIk+socbqnCshVT15SU+igSadRbXvttzTBdU2azSJclcoPYNgP/09OpezO7jNI6yfyou3c80iuicVacvnP1cBipcqsPXLHQ/qTp/rASfT2/RJDu0KcGxtIZoZfLnfaEyWdy9BkqcVQyazR1k5WlcFSsPru+EMeit/EdnPf1SRl31N0wZ80 A7VabRds KMpUCqf27OGt2sQzF/jIw2wv8SQBywT75dCl6iP+ZjYaOpyqwpnxf2debTdxl/aezlUp12cuqk4FlZhopO3D3IIvh/aLsCi060VsJjBfIq9QR8+Cs3ROMH4YpMIHr1NXE3Vt2A8oZkNBXzcI4uRnoGl38Kv+orOB9Hj1i3esLpdQAW3natqKXgtV8WoSl3m51ELZ/HEq1KbxdvoLN0sJrFgHpM9A4IhC4uqDo5xtSSnSQq9pRE+1uNkgPb4B0gQrCj4DpCTofG09QW0Eu3Y63DorhnOAHIYkWpOkGenZyNPKF2xo4oLr3Cs6fe5m65pwg/gqYBbvr86hAYZWZQjyVpXdYlrkaO1pZfzolKUz9bhCeYBhRN15nOho6yR3hK3caOhkcYImKu0VmsjUmIx5fm6B3ktM9D5Lj9f3qTeV/hgJo7KKmgpZb34fVMhyxsvOPpUXrvyepN13lKqY= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
arch: allow pte_offset_map[_lock]() to fail
|
expand
|
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)
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 <hughd@google.com> --- arch/parisc/kernel/pci-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)