Message ID | 20250127093530.19548-2-alexghiti@rivosinc.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 0D6DFC0218C for <linux-mm@archiver.kernel.org>; Mon, 27 Jan 2025 09:36:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8EDAE6B0117; Mon, 27 Jan 2025 04:36:44 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 89CD62800D1; Mon, 27 Jan 2025 04:36:44 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 73DF66B0119; Mon, 27 Jan 2025 04:36:44 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 548546B0117 for <linux-mm@kvack.org>; Mon, 27 Jan 2025 04:36:44 -0500 (EST) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id F2108C20C8 for <linux-mm@kvack.org>; Mon, 27 Jan 2025 09:36:43 +0000 (UTC) X-FDA: 83052727086.08.599DDF4 Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by imf26.hostedemail.com (Postfix) with ESMTP id 1AB9E14000B for <linux-mm@kvack.org>; Mon, 27 Jan 2025 09:36:41 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=GJt8qxwJ; dmarc=none; spf=pass (imf26.hostedemail.com: domain of alexghiti@rivosinc.com designates 209.85.221.41 as permitted sender) smtp.mailfrom=alexghiti@rivosinc.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1737970602; a=rsa-sha256; cv=none; b=RxWPpbj/8LaPXmbo0I6hNKPudc3FRzEm0lguBBGVJGRw+hYkXvYSiEpiyAeOWnysXDu6R4 dCGKiLYiWEXVvh0xuR0RzRH3TGo1v1oGfHECc/XIQniWL4ISgmUF9Va56xYBifw+Vf5ptx Meh1y3UCV12LqsQLKOsLaymoDph57QY= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=GJt8qxwJ; dmarc=none; spf=pass (imf26.hostedemail.com: domain of alexghiti@rivosinc.com designates 209.85.221.41 as permitted sender) smtp.mailfrom=alexghiti@rivosinc.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1737970602; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=YlgUGAmuTWGVKaOGr6DQU8bhY7gyR7CYcPHPJxmYPTE=; b=Uz8uHyKmZsDabWPtOUSaVCIGTxfQUMFurP9O78liAHqgCmoh0Nh2MR8QClq63XvLpdhDrp byWcVsnttBXC856YH76wDZKXXjtefZHNJ/VtAboCxWGw6jE1RDHTHn0Ynv+i5zMonRXQOB zwdGp22jizx0iei0ui900J8IPxdCYBE= Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-3863c36a731so3492546f8f.1 for <linux-mm@kvack.org>; Mon, 27 Jan 2025 01:36:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1737970601; x=1738575401; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YlgUGAmuTWGVKaOGr6DQU8bhY7gyR7CYcPHPJxmYPTE=; b=GJt8qxwJEivfkDPm3YEhl2yUoS4mZI3ixW7Y2n/PHg9nzhjUDwdSsw8TYNp2NEgFEd WoU7Y6J1i2hvcSNhV91mD0trmk01aLdv40N18ec1slPNQLPK/XwlidTJFOHL8jmWlgIM +R1OuD0Osplv2M3APzEupeSKnf9n4QXD5YVjsj06RySUy9MJYt/kDma2XsOYPW82je3N WCXUQD2oUEODVtd44PsvSkRhM16gnQuzD2wotUwxO0lBbJsKiGoRqQit7KNBH+4zxGXH gkAn26yWDglKM2aSbJvai5hsZjP7aECtSGhHMXiiK+OZWWBAffhkjdUX/lF3LYb8ayJd gtHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737970601; x=1738575401; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YlgUGAmuTWGVKaOGr6DQU8bhY7gyR7CYcPHPJxmYPTE=; b=P/vHa1Y0M/Yx93Mm+sNDnRM8BVUPhwPgT/aTa0/MH3MP5XBQubbh4OWefYCDRqeCy3 JCFcg1kN0f/5OUa9jhml1fwavDPtJYi21sU73vNgnWBabbnGw0pI9nljw9MayCNZBLa0 BMsLM5QxFv1VkJ9t2Os6ouKPV+1MoZwStoMW7g2YU3bh9SxWU1a1ivJGGAnfO7gKut97 8brq6TyPwsfV3KzR3g6nXXiprEHoJSd1A4hiTC84P+mtWrwAL0qP5PCrmp04S6XXAYkD 9vYKNSaKYC2Qf1XrEBv843ZhuBIL2xa7tRCFJkIqAoNQ80Xd8b4VS5LW4fi1eBvGKBE2 Bbkw== X-Forwarded-Encrypted: i=1; AJvYcCVFE0IAK6itz8qvI/qqn5l8yKJN5+cF4LnKVcVAI9NJMt+ze7Nczu5nU5Rixbf0u48Nc8Ul5yX91A==@kvack.org X-Gm-Message-State: AOJu0YwQsMuA8T+sBFNc85RNcWu5fkt/UwDy3pNcVP0JyrYPJwhRI/Ju 7rEOvYNR9+YNdzCyvI/caCdaW7lbdkNoO8d3h/7qjzrFkFNruSs6vilGf1OMvN0= X-Gm-Gg: ASbGnct+LWsx8fKzTXSNxcx1i06S3McjqhqQ6bP/aW9kLmO2uskCw9tDt+CMWPQ4RRr a8yf89d8rcFvOjWJ8uYfie7oFaZIowxPmo6agLETFgPlSVP6vxDgLhRUCT9msov4nPoxNCl4vQP P2I/TH8wK3aSBZ0RyBZwzThmGAjE8ZGRpqD77K2giVUDPz9Ophy9CMulQnd9aNuC41dovgirqGa GSmmvagFva5/NnEjdjgTtVi9rju+Vx4XNNlKUJWvxl+tHh+FbFpgbxd1qku0yt7qXW4SFARn0bD bDIQrqmOyI11ZZBvlWgz3PEqEKZQJu8= X-Google-Smtp-Source: AGHT+IHUUXHJ5coMzJl68ATLI/2WB7Q+b+nPXfERL8/PDwCduzlj4e0CTpfsp9bAQ08qd/jskgeAvg== X-Received: by 2002:a05:6000:1445:b0:386:37f5:99f6 with SMTP id ffacd0b85a97d-38bf59ed62fmr33321912f8f.53.1737970600263; Mon, 27 Jan 2025 01:36:40 -0800 (PST) Received: from alex-rivos.ba.rivosinc.com ([2001:861:3382:ef90:3e22:3e78:ce5a:32c3]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38c2a176490sm10314205f8f.1.2025.01.27.01.36.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jan 2025 01:36:39 -0800 (PST) From: Alexandre Ghiti <alexghiti@rivosinc.com> To: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Ryan Roberts <ryan.roberts@arm.com>, Mark Rutland <mark.rutland@arm.com>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, Andrew Morton <akpm@linux-foundation.org>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-mm@kvack.org Cc: Alexandre Ghiti <alexghiti@rivosinc.com> Subject: [PATCH v4 1/9] riscv: Safely remove huge_pte_offset() when manipulating NAPOT ptes Date: Mon, 27 Jan 2025 10:35:22 +0100 Message-Id: <20250127093530.19548-2-alexghiti@rivosinc.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20250127093530.19548-1-alexghiti@rivosinc.com> References: <20250127093530.19548-1-alexghiti@rivosinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Rspamd-Queue-Id: 1AB9E14000B X-Rspamd-Server: rspam10 X-Stat-Signature: ffbmdbbkwy99ypo37fkhw6a6buaqrqom X-HE-Tag: 1737970601-335683 X-HE-Meta: U2FsdGVkX1/aAzIoloEZdtqb+jxxSv1bTBmVoiFC2+zOsk2+V3UXvo9IFf75rboMmU8nW2XXNpZc1ZazPhdRWYMjvxYbYwuDdhoscq7m7WTyxjs1SwHE6VCHEHXkAm0aDTEvqIKkIKWvx1mIkAbdYmykbMZ5FACLvVNbDRiz7sLPMNhNVXSXoyDFgE0wVUS40NWFeIqERBN/y0vVqecw6iXjRnr2m7ao0S7l8fz3ucPUzhPRLSQ045del/RNIfhF5tcIvylLh559AOBZd1xP/RvUwmbbJm84jIOaWGS0kpv8eblcNz5NiKB6bgmWBMVQX1kR77jnE+u2j0MKMK2yUAMrrDRNKAXJYsYQ8mZYSh5KEVbt7Cio5+JIQaWD5D86eNiAZ2vw6EADtXhCOgBf9IcAmn62IxddR2u3/Uy7JbjxswVCnDU0hCM5J1NF7NoqvP3SKMCTLZtF0+8XuGsFWkoEGOHOOXjIY4VvIgCykxB41zbwnPT3W1DEY1II4pyLjPdzb8g+BYgp1KTfJBV/pC/E0SylyWXOaNzUnffg1biorp8zDvLSzFG2RLjwTE04dObe/O8QDJv8m4HqRsICyZk1pLy+AwcJGe4NsEmDG0Vbn7s8jd/Bd0imkEbI5PZ50JuAjZO4kdI+v39HqUNLJMWnm9x78lpWH7gF9F6ekFcSeZdFDOnWaXuZn/gpyWaSFYavNslj/tszMH5f0vbnGpgYuIYvGz1MvA1a8HCXwSEskfLc/IwCTpjFoFEl0g5nit2Amz1H4Dd00jqeW+0eLwhV10AY6QuG5/UxV8ltyScHcFvXdDOW10gJjAlY30eo36fWtVtmr8xlmlDfWwvMiUjUJd52okKmyJCNCbg43XSLQNz11z1EkMXkNVA04Vo1zr1JuOfiXRMACrxUfEztPWALYWENi7PWDjXNLackMspVQEt9f914PVkMhmHb6uVEHbBXJUNmj/bThd0vD5B 9yEzUdil AtpkvPFVgMyFIAxqrMOtJtEx44VCIz6C5rBfaPdkuuAWj7Y7MRe06Qf9O1/4Rn1FN8lLZNRU/EwW4Z8msF5HaG5FcBOWitAFNrbdzwzXmp+AYDatzOywLFnR6ieLRL9Wz+ngkxGoezak/ji2pn+U4Mm4RA2XHSnxJjXYOihqLOJ5xuqWj+ZsdJoWV9Ooi7Yxba2Rs7zbvaQ2X3GrawDZgPkdo2zPz5ZR7gRKnha5aincrD7fdfA2wNd8lsBJ68vfvo/oIFxJLovhagrYf9uraAC976L77P2c/f/x2TbJdUBHKiV8J12axKiD4VUq8pvZsTWGI/bK/Gkcl/0jjNx25DbD8GBbOkgzamWj9IlKrDWyjVDfNH03x8KI90nIyu63mBE9MFzxp9N5BIHLfRRTLjTY8BbvYGG9KJZBQUL7zmk2dC/v4f4gVh8IGelveEAfLOHGWA1DxFIz1yJbZwI/kRby9fw== 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> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
Merge arm64/riscv hugetlbfs contpte support
|
expand
|
diff --git a/arch/riscv/mm/hugetlbpage.c b/arch/riscv/mm/hugetlbpage.c index 42314f093922..6b09cd1ef41c 100644 --- a/arch/riscv/mm/hugetlbpage.c +++ b/arch/riscv/mm/hugetlbpage.c @@ -276,7 +276,6 @@ int huge_ptep_set_access_flags(struct vm_area_struct *vma, order = napot_cont_order(pte); pte_num = napot_pte_num(order); - ptep = huge_pte_offset(mm, addr, napot_cont_size(order)); orig_pte = get_clear_contig_flush(mm, addr, ptep, pte_num); if (pte_dirty(orig_pte)) @@ -322,7 +321,6 @@ void huge_ptep_set_wrprotect(struct mm_struct *mm, order = napot_cont_order(pte); pte_num = napot_pte_num(order); - ptep = huge_pte_offset(mm, addr, napot_cont_size(order)); orig_pte = get_clear_contig_flush(mm, addr, ptep, pte_num); orig_pte = pte_wrprotect(orig_pte);
The pte_t pointer is expected to point to the first entry of the NAPOT mapping so no need to use huge_pte_offset(), similarly to what is done in arm64. Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com> --- arch/riscv/mm/hugetlbpage.c | 2 -- 1 file changed, 2 deletions(-)