From patchwork Mon Jul 31 17:03:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vishal Moola X-Patchwork-Id: 13335128 Return-Path: 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 52235C001DC for ; Mon, 31 Jul 2023 17:04:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 93D37280079; Mon, 31 Jul 2023 13:04:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8ED236B0188; Mon, 31 Jul 2023 13:04:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 78C59280079; Mon, 31 Jul 2023 13:04:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 6593E6B0187 for ; Mon, 31 Jul 2023 13:04:36 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 2811CA01B6 for ; Mon, 31 Jul 2023 17:04:36 +0000 (UTC) X-FDA: 81072530952.10.1CD2D5D Received: from mail-oi1-f173.google.com (mail-oi1-f173.google.com [209.85.167.173]) by imf06.hostedemail.com (Postfix) with ESMTP id EADA8180013 for ; Mon, 31 Jul 2023 17:04:33 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=J5UHMtA0; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf06.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.167.173 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1690823074; 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=NG13BwzmmAIpXpcduEwvRHFbS3iQhU18W2JpKLteVDY=; b=zilN8IqKvxvNUGjeOobX1U5AjoZrbQvO5pomI5cdg16lTvRMCAa+8jupVdg7WEBQLQ5EFV sg6ODWsjndEUjC9KXOvyxhSISAGXqp4J6793YBvXPVuYQhLUPX3z6gsO8x/JXI9gmjRXvV V1PnAarq0BqKeh9KOp0nvnLoy2C8lb0= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=J5UHMtA0; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf06.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.167.173 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1690823074; a=rsa-sha256; cv=none; b=wuNPiyXzsKLIV4NUkNFsoVHLtZ40whoPzwoo7iA72RBOJioQKC5ktbRH5EclgRNd7fbZjz kR9Fan3R4NgGpIsBspC5WL+MmaYYbxY6XliqBPpnAIN3xcdVULA9QBYeg1psO930RdmI1f U+lzPl4zjvo6x9+Daq7uE9+idwHzKfQ= Received: by mail-oi1-f173.google.com with SMTP id 5614622812f47-3a426e70575so2742920b6e.0 for ; Mon, 31 Jul 2023 10:04:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690823073; x=1691427873; 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=NG13BwzmmAIpXpcduEwvRHFbS3iQhU18W2JpKLteVDY=; b=J5UHMtA0qoYiWw4Ld5R0BKI4Tc5AGDSmTkXJ2I6fYmBwlIVDq2NZ9TijiKx7n7oR9S O2+0XndgcZyKpOow8lUaucDbgGPax/K8O+lCXFcyUW1OtbVxoGLUMUxT+xXe1Nbotguq wXQV4F4SfOD9dJwiO/iz9SNiN+CqscWBWqXkI0FM0EZ9ZzfP3bhZCq1/PYVKZkiSL88/ WlbyA+YZDFKl4pgL1EI3/3iabhB8k7YUgWRxCXqfKPLtTRNQuaY8gnPQjbT+Yt9xzJqB tpRwv/UorbhC7cKUIm0hPbznR4XxDKlGiKxb+h0cWPY+2avNMZiADFAVxe8ptEu65tNh rVOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690823073; x=1691427873; 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=NG13BwzmmAIpXpcduEwvRHFbS3iQhU18W2JpKLteVDY=; b=j/8bk3VvPAqvmJXNu6Vbii66OEkdmqq9CFK0yvSGuqE1fvrSfKD7Yy9oR8a6GKJL2x saQV+3c8yS59172jXn0guoJDGO8Fh+yyz0N6wyZqhj8Phkd7ZD4/3ywNYEG8jiuJyiMP XrRv97WWXj5S76bVLS1UhIZfBvKv1n8wLr3NjPiQy+3AxFrgb2IeRiDo3az4Sm98943D 2G0JfHZ+w8cXFkbsmz5RuhIodXj7hl2mlYpNDBGxd9ns8LlU3yY8LtRCoKZLfIoR73og uUa4XTlNrwLu9V0p3cVvmza6ARDiGWUa2BSsGxMm6CU9xh3doXgqxrfI0qfFg1z0X6Ro XQJg== X-Gm-Message-State: ABy/qLYGOQaCcKtebZe9oULZy/F7TEnaSbm7I+JGzrsqQ32aihCFmenU Sut4N+nctHHO89vswcPHobo= X-Google-Smtp-Source: APBJJlFtSPsXmTmbaE2JVTTuMieuMfoOw8pkpK4ugTgdmGfxbA+pL1HJ6fgn2J808MNJLpsNTjXtIQ== X-Received: by 2002:a05:6808:655:b0:396:4bbc:9a36 with SMTP id z21-20020a056808065500b003964bbc9a36mr8685999oih.19.1690823072749; Mon, 31 Jul 2023 10:04:32 -0700 (PDT) Received: from unknowna0e70b2ca394.attlocal.net ([2600:1700:2f7d:1800::16]) by smtp.googlemail.com with ESMTPSA id x31-20020a25ac9f000000b00c832ad2e2eesm2511833ybi.60.2023.07.31.10.04.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jul 2023 10:04:32 -0700 (PDT) From: "Vishal Moola (Oracle)" To: Andrew Morton , Matthew Wilcox Cc: linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, loongarch@lists.linux.dev, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-openrisc@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-um@lists.infradead.org, xen-devel@lists.xenproject.org, kvm@vger.kernel.org, Hugh Dickins , "Vishal Moola (Oracle)" , Yoshinori Sato , Geert Uytterhoeven , John Paul Adrian Glaubitz , Mike Rapoport Subject: [PATCH mm-unstable v8 27/31] sh: Convert pte_free_tlb() to use ptdescs Date: Mon, 31 Jul 2023 10:03:28 -0700 Message-Id: <20230731170332.69404-28-vishal.moola@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230731170332.69404-1-vishal.moola@gmail.com> References: <20230731170332.69404-1-vishal.moola@gmail.com> MIME-Version: 1.0 X-Rspam-User: X-Stat-Signature: gfk81zbjub4cz47igz5hzqh17sr17bpx X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: EADA8180013 X-HE-Tag: 1690823073-484304 X-HE-Meta: U2FsdGVkX18LmiRY+fhdW+90t7eR0q2b4RAddjPR2JtH3PlFQoGUbFbCbu422LbpRl7oWB2SqZhbat++/ZAzrrXZgsvgqoBLe8TmagFGfO+cNPJpop0IMpO5MKEAUUES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7O5tDzQpDFmTsREFXr3qwbnx0bH5PCg46V4i05FPH6z6/wgBOAlB6kq9hHUChNnjEKo5NRGKVZGocJV1E/taQm+nD2KCXttvKQjwkUSyl5XhMO77/h6HAOtNJfuDDEYH1PyThNOVsZWXEvolFMA4erbCqXZ7EXIaHgNM6PEIY6NIp0fvXlkv14ooxDw2jHbqF67EbIhufvcgNeOwaZt3jWuKxRErI4LNqPWQ/dexkTeEGDWcZA2OVGAYXqLaz8NPsjtGQ0TWXnzwM/wvgfLl9CmApRxAq3EQoD1419WSntixdE/W3tE0I+gMh+IjsSM0+f3Sx5T6JhyzkHEB28bGj5N8r8uiiYe+aeLIIZLMy0Jk3xeNLHNqHZRpL8kBNexEKUNluvAbBFsigehUn5KC/CQli9tvLqti0GWhOK1j77AA= 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: Part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents. Also cleans up some spacing issues. Signed-off-by: Vishal Moola (Oracle) Reviewed-by: Geert Uytterhoeven Acked-by: John Paul Adrian Glaubitz Acked-by: Mike Rapoport (IBM) --- arch/sh/include/asm/pgalloc.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/sh/include/asm/pgalloc.h b/arch/sh/include/asm/pgalloc.h index a9e98233c4d4..5d8577ab1591 100644 --- a/arch/sh/include/asm/pgalloc.h +++ b/arch/sh/include/asm/pgalloc.h @@ -2,6 +2,7 @@ #ifndef __ASM_SH_PGALLOC_H #define __ASM_SH_PGALLOC_H +#include #include #define __HAVE_ARCH_PMD_ALLOC_ONE @@ -31,10 +32,10 @@ static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, set_pmd(pmd, __pmd((unsigned long)page_address(pte))); } -#define __pte_free_tlb(tlb,pte,addr) \ -do { \ - pgtable_pte_page_dtor(pte); \ - tlb_remove_page((tlb), (pte)); \ +#define __pte_free_tlb(tlb, pte, addr) \ +do { \ + pagetable_pte_dtor(page_ptdesc(pte)); \ + tlb_remove_page_ptdesc((tlb), (page_ptdesc(pte))); \ } while (0) #endif /* __ASM_SH_PGALLOC_H */