Message ID | 20240229084258.599774-5-peterx@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-86331-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2097:b0:108:e6aa:91d0 with SMTP id gs23csp256479dyb; Thu, 29 Feb 2024 00:45:03 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWCsnZR/B26WJ0HxWEpJZ7EGJd34IKLWVhKI2PUyDT75ud3MjwcOv2ldYLJLn2nagH84tqr7PwPNxifdlqdPKDDI5Cs8w== X-Google-Smtp-Source: AGHT+IHo/VeZBZmocmeGR12D/8at6uLcNe6HegEaE5U+Jwt0n75CRXA7SeuJ3rKzJw1ri9XhsC1G X-Received: by 2002:a17:906:241a:b0:a3d:e2e9:a7f7 with SMTP id z26-20020a170906241a00b00a3de2e9a7f7mr1037317eja.27.1709196303732; Thu, 29 Feb 2024 00:45:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709196303; cv=pass; d=google.com; s=arc-20160816; b=dlt9Vc/ylyU+3wDdidr69W1n2AUB7i701TXQvqENQ5yYcRav2TMYTiXdD7r2wlOfm6 7D/3BIjvqk3lR7hNSbhPEIKiy1T81Bpn38+ASHp388VXvWPc414NXqKCqJpAz4yEW95Z HIDLhOoJuLrdXUSon1LKv+S23tl4vDvnEE/HT70bzjbChRmx8UsukohSKxa8gvTDD9Kb vIX7cE3ABRmAaHF7P15D3kVkueqXMZ30tm9KcOagHsiRIXWbeb/RFYz3NFKjtm/bheDe bzPJbSX9zf2QNzEEwpQXsZ1eD4sScf+WFpWW8lSlRPUFFLtYnSt1a7U7HEkMhEGKURP6 h8xw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=vaO5rUUUwqL4Op281F/k7Urm37If4ycpPAb8kcf+Fps=; fh=El1CTPe6+vOT2yW37eQjyw83iSlqgqhE0Gpp/i8jhxo=; b=RQohUL9hI85rQMmU2JeC2F3CvfN4aTLM3GcWYayHmd4TUTuQSjhaqwZl/O39KXyOi3 xxP+BCZ2HnpEQgqq3C+7DxqBRf25wPVPF010lV4grmPziYl9JrBB1KShESWJmMKRXKwQ hBCtGbFYHNQvVdU4IJhypl22hDPIwR/Gk6PWcmIz0wlf5Nq0BLkg/rFfIN1N8gHtHmo2 4cXwLG7UjZmsSC1N8//7fcjCRxMoRUF/zg9dVkKsC0f42WunEDrGVfKy0sRBIf/P6Xxy UxvdifjIieB6bVJXXgOBfkAU0HnfVXP6N19COVGpjgbr1r7ouRldYyaeYYMc7ygxPHm4 94PQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=d0As4Sxm; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-86331-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86331-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id x24-20020a1709060a5800b00a3e45782780si379322ejf.740.2024.02.29.00.45.03 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 00:45:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-86331-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=d0As4Sxm; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-86331-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86331-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 5E3DB1F2427C for <ouuuleilei@gmail.com>; Thu, 29 Feb 2024 08:45:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1B5D655C04; Thu, 29 Feb 2024 08:43:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="d0As4Sxm" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D997054BEB for <linux-kernel@vger.kernel.org>; Thu, 29 Feb 2024 08:43:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709196225; cv=none; b=IVTBX0njz1s34wrG320Gm+pUMYIHL/Yh36nOc4pkF5PBRkNQG7ZaJNzDXd6m7c40w9joZJIHjAsdbgs90XvYgJeB3Kit5gCm0utqg0ryIcRJgiVHkfnYq9aJczCFb12ZBXqrIuTPVnDKhyWC1Ogli5mp3i4ins9qBjCPuF6pM1A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709196225; c=relaxed/simple; bh=njYfx4VOrh4eajU7r6f648jwhb+vCfyXtqOuH9tux5U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=E6jesGN9NhoUNSupXjyh6dA1r32ng2RsFUD1jF4cGE/tWInYl87QM4g9mHRnca9dIt9gHwYcKFYs/OHoFoZMozy0Q19CNfcLERHkClEDx4Bz5IWzOaAqo0g3leTMgnhTrGpCYvGH+moYfrBwJrphfu2XXlkm/mxSFvfwosTHGXc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=d0As4Sxm; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709196222; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vaO5rUUUwqL4Op281F/k7Urm37If4ycpPAb8kcf+Fps=; b=d0As4SxmGalLUkvl8Ku4sGbyQOpQt1j9fcZxEZ1svm4xTa2UWs2eWZ0SLeHOeNB/yXy677 PZwAIxH0nDIMNDJKd36xGlOcRVqyfbSrHRQce+4stlUEoa9VNbIYt9HFXpWbLtJTskXpzd m5+SiyPyp0ujPSr5xuACcTw1InaJu9Q= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-648-Kkkwr2teMLKh8mWF0KV25w-1; Thu, 29 Feb 2024 03:43:37 -0500 X-MC-Unique: Kkkwr2teMLKh8mWF0KV25w-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DBFF93C025B8; Thu, 29 Feb 2024 08:43:36 +0000 (UTC) Received: from x1n.redhat.com (unknown [10.72.116.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3759D28D; Thu, 29 Feb 2024 08:43:29 +0000 (UTC) From: peterx@redhat.com To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org, Yang Shi <shy828301@gmail.com>, "Kirill A . Shutemov" <kirill@shutemov.name>, Jason Gunthorpe <jgg@nvidia.com>, peterx@redhat.com, Muchun Song <muchun.song@linux.dev>, Andrew Morton <akpm@linux-foundation.org>, x86@kernel.org, Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>, Dave Hansen <dave.hansen@linux.intel.com> Subject: [PATCH v2 4/7] mm/x86: Drop two unnecessary pud_leaf() definitions Date: Thu, 29 Feb 2024 16:42:55 +0800 Message-ID: <20240229084258.599774-5-peterx@redhat.com> In-Reply-To: <20240229084258.599774-1-peterx@redhat.com> References: <20240229084258.599774-1-peterx@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792222223375512977 X-GMAIL-MSGID: 1792222223375512977 |
Series |
mm/treewide: Replace pXd_large() with pXd_leaf()
|
|
Commit Message
Peter Xu
Feb. 29, 2024, 8:42 a.m. UTC
From: Peter Xu <peterx@redhat.com> pud_leaf() has a fallback macro defined in include/linux/pgtable.h already. Drop the extra two for x86. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: x86@kernel.org Signed-off-by: Peter Xu <peterx@redhat.com> --- arch/x86/include/asm/pgtable.h | 1 - include/asm-generic/pgtable-nopmd.h | 1 - 2 files changed, 2 deletions(-)
Comments
On Thu, Feb 29, 2024 at 04:42:55PM +0800, peterx@redhat.com wrote: > From: Peter Xu <peterx@redhat.com> > > pud_leaf() has a fallback macro defined in include/linux/pgtable.h already. > Drop the extra two for x86. > > Cc: Thomas Gleixner <tglx@linutronix.de> > Cc: Ingo Molnar <mingo@redhat.com> > Cc: Borislav Petkov <bp@alien8.de> > Cc: Dave Hansen <dave.hansen@linux.intel.com> > Cc: x86@kernel.org > Signed-off-by: Peter Xu <peterx@redhat.com> > --- > arch/x86/include/asm/pgtable.h | 1 - > include/asm-generic/pgtable-nopmd.h | 1 - > 2 files changed, 2 deletions(-) Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> > @@ -31,7 +31,6 @@ static inline int pud_none(pud_t pud) { return 0; } > static inline int pud_bad(pud_t pud) { return 0; } > static inline int pud_present(pud_t pud) { return 1; } > static inline int pud_user(pud_t pud) { return 0; } > -static inline int pud_leaf(pud_t pud) { return 0; } It would be nice to have a final patch making the signatures consistent on all the arch inlines, it should return bool not int. Jason
On Thu, Feb 29 2024 at 16:42, peterx@redhat.com wrote: > From: Peter Xu <peterx@redhat.com> > > pud_leaf() has a fallback macro defined in include/linux/pgtable.h already. > Drop the extra two for x86. > > Cc: Thomas Gleixner <tglx@linutronix.de> > Cc: Ingo Molnar <mingo@redhat.com> > Cc: Borislav Petkov <bp@alien8.de> > Cc: Dave Hansen <dave.hansen@linux.intel.com> > Cc: x86@kernel.org > Signed-off-by: Peter Xu <peterx@redhat.com> Acked-by: Thomas Gleixner <tglx@linutronix.de>
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index 69ed0ea0641b..f884d5162507 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h @@ -1097,7 +1097,6 @@ static inline int pud_bad(pud_t pud) return (pud_flags(pud) & ~(_KERNPG_TABLE | _PAGE_USER)) != 0; } #else -#define pud_leaf pud_large static inline int pud_large(pud_t pud) { return 0; diff --git a/include/asm-generic/pgtable-nopmd.h b/include/asm-generic/pgtable-nopmd.h index 8ffd64e7a24c..fa27e16bbe1b 100644 --- a/include/asm-generic/pgtable-nopmd.h +++ b/include/asm-generic/pgtable-nopmd.h @@ -31,7 +31,6 @@ static inline int pud_none(pud_t pud) { return 0; } static inline int pud_bad(pud_t pud) { return 0; } static inline int pud_present(pud_t pud) { return 1; } static inline int pud_user(pud_t pud) { return 0; } -static inline int pud_leaf(pud_t pud) { return 0; } static inline void pud_clear(pud_t *pud) { } #define pmd_ERROR(pmd) (pud_ERROR((pmd).pud))