Message ID | 20231221154702.2267684-4-guoren@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-8705-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp501175dyi; Thu, 21 Dec 2023 07:50:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IGj4xv1jTYwYboIfbKsmIcEqiwXUWHNujeOemjVr33wD65gvYTPoTdzpuNrYTMmbODJjB/o X-Received: by 2002:a17:902:b412:b0:1d0:69dc:954e with SMTP id x18-20020a170902b41200b001d069dc954emr22579570plr.24.1703173831551; Thu, 21 Dec 2023 07:50:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703173831; cv=none; d=google.com; s=arc-20160816; b=QJddAzDi3Zb45ao0FjukTVA8oKBZivr45K0EIMWgLaqJxPwRfJKD3R54II64sEuh3P xfOEW8bmHZgb9Nm4nEJiK1/4o9ZzRFMJMN3yS66u8GmPiaBynW/buUT0uU8vNPVtI4cL IpLMR/3tp0pOn1dDF1ePXcjhOEXms2lWuuKpGmRWh0S015k8nUA5SgWfRWD9Nt60qwS5 4tGUzDDS6LH/TniF00B/H9y0kSkLm8WnK9HgJrAmqSmU+y82dqbuuN7x/q674znYM/BA ANtaBC31xaqMzXx+i7Lovh8cK6TnYowWDXdVIGD9tMwTZVW+rUZICGG3yzeGVXmKt54K ZgsQ== ARC-Message-Signature: i=1; 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=+mUF6QgbdC5WAZt0C5LM7EcWTcYs+SDBgkdJpnvjhHo=; fh=+2B64yVuborNRhR0hRJ4G06jDIODc2br0dk92JgFIMw=; b=jgzKzhELX1zCmktQ0eq2zcKg2OsEU7Qq3oHxoiaFBxTHuzZQE9ZUPJa6Nb8CzM/HOW LzuutKzzI+NqRcTpkzUQRatgU12dNgZBC/npN57oMY7VPpSC9rLczbK7KoNKKWad4q+N QPIDxfDbgUwHinUt96PUZVy+uRMy30m2+EZvvLdgaUr5STkE48toWUxzqx9VFcfqSzxJ OIz++s8NzS5jKPdASWpRukmG9wyi035KY6eJthp/bqbgprSFff/UAQoqA4JF0Mt+4r4S 4htulpZXdkb5yS0mvaf+EEyYOj1RmtMCVGZ4vxPZdfTXS0uKDPahW2MFT3cKK2W88qUa pg5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CgB0V+Jg; spf=pass (google.com: domain of linux-kernel+bounces-8705-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8705-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id e13-20020a170902d38d00b001cfb1e21bcdsi1655665pld.539.2023.12.21.07.50.31 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 07:50:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8705-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CgB0V+Jg; spf=pass (google.com: domain of linux-kernel+bounces-8705-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8705-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 4D210B24663 for <ouuuleilei@gmail.com>; Thu, 21 Dec 2023 15:48:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D5E4558231; Thu, 21 Dec 2023 15:47:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CgB0V+Jg" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 5343258215 for <linux-kernel@vger.kernel.org>; Thu, 21 Dec 2023 15:47:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 98E87C433C9; Thu, 21 Dec 2023 15:47:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703173641; bh=6UdCU34QB2Jmf2RjW8+f6vf0kvi9jkFwVt1GuOPbhWU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CgB0V+JgevKv68oSzprvvmES0zf5NYWiDKBW18gsxXShgft2Goop1S8a7mLFoT5l0 +rGKecm/9UuNuLwYdE7hr9fIyDiiecKjjmxLvtCUMUUZ6NT33DBHy3EuwYNty6beWu m54WfYoNUMG6eVMDoljKnDRfTixV1RYzkpy6afJ26+1JDdBk2BLAXU5lRJ4vQ+IEXr 1vEwskikoDkcJ/KJDvRNqPxmSQO1F0g/laB/c+eybU+7+Wjt7Iq0Pqm8zUxoly/WQF c0HI0oKrzX8K3Dzj8b/JUteTjfZwqBiqJXiIlLAXpJEatNQCozmCg9lNjo5H/zk85n bazdYY014sD7g== From: guoren@kernel.org To: linux-kernel@vger.kernel.org, paul.walmsley@sifive.com, palmer@dabbelt.com, alexghiti@rivosinc.com, charlie@rivosinc.com, xiao.w.wang@intel.com, guoren@kernel.org, david@redhat.com, panqinglin2020@iscas.ac.cn, rick.p.edgecombe@intel.com, willy@infradead.org, bjorn@rivosinc.com, conor.dooley@microchip.com, cleger@rivosinc.com, leobras@redhat.com Cc: linux-riscv@lists.infradead.org, Guo Ren <guoren@linux.alibaba.com> Subject: [PATCH V2 3/4] riscv: mm: Remove unused TASK_SIZE_MIN Date: Thu, 21 Dec 2023 10:47:00 -0500 Message-Id: <20231221154702.2267684-4-guoren@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231221154702.2267684-1-guoren@kernel.org> References: <20231221154702.2267684-1-guoren@kernel.org> 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-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785907203428321230 X-GMAIL-MSGID: 1785907203428321230 |
Series |
riscv: mm: Fixup & Optimize COMPAT code
|
|
Commit Message
Guo Ren
Dec. 21, 2023, 3:47 p.m. UTC
From: Guo Ren <guoren@linux.alibaba.com> Remove TASK_SIZE_MIN because it's not used anymore. Signed-off-by: Guo Ren <guoren@linux.alibaba.com> Signed-off-by: Guo Ren <guoren@kernel.org> --- arch/riscv/include/asm/pgtable.h | 2 -- 1 file changed, 2 deletions(-)
Comments
On Thu, Dec 21, 2023 at 10:47:00AM -0500, guoren@kernel.org wrote: > From: Guo Ren <guoren@linux.alibaba.com> > > Remove TASK_SIZE_MIN because it's not used anymore. > > Signed-off-by: Guo Ren <guoren@linux.alibaba.com> > Signed-off-by: Guo Ren <guoren@kernel.org> > --- > arch/riscv/include/asm/pgtable.h | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h > index 74ffb2178f54..e415582276ec 100644 > --- a/arch/riscv/include/asm/pgtable.h > +++ b/arch/riscv/include/asm/pgtable.h > @@ -878,7 +878,6 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte) > */ > #ifdef CONFIG_64BIT > #define TASK_SIZE_64 (PGDIR_SIZE * PTRS_PER_PGD / 2) > -#define TASK_SIZE_MIN (PGDIR_SIZE_L3 * PTRS_PER_PGD / 2) > > #ifdef CONFIG_COMPAT > #define TASK_SIZE_32 (_AC(0x80000000, UL)) > @@ -890,7 +889,6 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte) > > #else > #define TASK_SIZE FIXADDR_START > -#define TASK_SIZE_MIN TASK_SIZE > #endif > > #else /* CONFIG_MMU */ > -- > 2.40.1 > On torvalds/master: $git grep TASK_SIZE_MIN arch/loongarch/include/asm/processor.h:23:#define TASK_SIZE_MIN TASK_SIZE arch/loongarch/include/asm/processor.h:36:#define TASK_SIZE_MIN TASK_SIZE32 arch/riscv/include/asm/pgtable.h:881:#define TASK_SIZE_MIN (PGDIR_SIZE_L3 * PTRS_PER_PGD / 2) arch/riscv/include/asm/pgtable.h:893:#define TASK_SIZE_MIN TASK_SIZE I can only see definitions, without any usage, so agreed on removing them. FWIW: Reviewed-by: Leonardo Bras <leobras@redhat.com> I would also send a patch for loongarch, since they are in the same boat :) Thanks! Leo
On Fri, Dec 22, 2023 at 12:49 PM Leonardo Bras <leobras@redhat.com> wrote: > > On Thu, Dec 21, 2023 at 10:47:00AM -0500, guoren@kernel.org wrote: > > From: Guo Ren <guoren@linux.alibaba.com> > > > > Remove TASK_SIZE_MIN because it's not used anymore. > > > > Signed-off-by: Guo Ren <guoren@linux.alibaba.com> > > Signed-off-by: Guo Ren <guoren@kernel.org> > > --- > > arch/riscv/include/asm/pgtable.h | 2 -- > > 1 file changed, 2 deletions(-) > > > > diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h > > index 74ffb2178f54..e415582276ec 100644 > > --- a/arch/riscv/include/asm/pgtable.h > > +++ b/arch/riscv/include/asm/pgtable.h > > @@ -878,7 +878,6 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte) > > */ > > #ifdef CONFIG_64BIT > > #define TASK_SIZE_64 (PGDIR_SIZE * PTRS_PER_PGD / 2) > > -#define TASK_SIZE_MIN (PGDIR_SIZE_L3 * PTRS_PER_PGD / 2) > > > > #ifdef CONFIG_COMPAT > > #define TASK_SIZE_32 (_AC(0x80000000, UL)) > > @@ -890,7 +889,6 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte) > > > > #else > > #define TASK_SIZE FIXADDR_START > > -#define TASK_SIZE_MIN TASK_SIZE > > #endif > > > > #else /* CONFIG_MMU */ > > -- > > 2.40.1 > > > > On torvalds/master: > > $git grep TASK_SIZE_MIN > arch/loongarch/include/asm/processor.h:23:#define TASK_SIZE_MIN TASK_SIZE > arch/loongarch/include/asm/processor.h:36:#define TASK_SIZE_MIN TASK_SIZE32 > arch/riscv/include/asm/pgtable.h:881:#define TASK_SIZE_MIN (PGDIR_SIZE_L3 * PTRS_PER_PGD / 2) > arch/riscv/include/asm/pgtable.h:893:#define TASK_SIZE_MIN TASK_SIZE > > I can only see definitions, without any usage, so agreed on removing them. > > FWIW: > Reviewed-by: Leonardo Bras <leobras@redhat.com> Thx > > I would also send a patch for loongarch, since they are in the same boat :) Eh... I've sent one yesterday together. https://lore.kernel.org/loongarch/20231221054624.2208019-1-guoren@kernel.org/ > > Thanks! > Leo >
On Fri, Dec 22, 2023 at 03:16:45PM +0800, Guo Ren wrote: > On Fri, Dec 22, 2023 at 12:49 PM Leonardo Bras <leobras@redhat.com> wrote: > > > > On Thu, Dec 21, 2023 at 10:47:00AM -0500, guoren@kernel.org wrote: > > > From: Guo Ren <guoren@linux.alibaba.com> > > > > > > Remove TASK_SIZE_MIN because it's not used anymore. > > > > > > Signed-off-by: Guo Ren <guoren@linux.alibaba.com> > > > Signed-off-by: Guo Ren <guoren@kernel.org> > > > --- > > > arch/riscv/include/asm/pgtable.h | 2 -- > > > 1 file changed, 2 deletions(-) > > > > > > diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h > > > index 74ffb2178f54..e415582276ec 100644 > > > --- a/arch/riscv/include/asm/pgtable.h > > > +++ b/arch/riscv/include/asm/pgtable.h > > > @@ -878,7 +878,6 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte) > > > */ > > > #ifdef CONFIG_64BIT > > > #define TASK_SIZE_64 (PGDIR_SIZE * PTRS_PER_PGD / 2) > > > -#define TASK_SIZE_MIN (PGDIR_SIZE_L3 * PTRS_PER_PGD / 2) > > > > > > #ifdef CONFIG_COMPAT > > > #define TASK_SIZE_32 (_AC(0x80000000, UL)) > > > @@ -890,7 +889,6 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte) > > > > > > #else > > > #define TASK_SIZE FIXADDR_START > > > -#define TASK_SIZE_MIN TASK_SIZE > > > #endif > > > > > > #else /* CONFIG_MMU */ > > > -- > > > 2.40.1 > > > > > > > On torvalds/master: > > > > $git grep TASK_SIZE_MIN > > arch/loongarch/include/asm/processor.h:23:#define TASK_SIZE_MIN TASK_SIZE > > arch/loongarch/include/asm/processor.h:36:#define TASK_SIZE_MIN TASK_SIZE32 > > arch/riscv/include/asm/pgtable.h:881:#define TASK_SIZE_MIN (PGDIR_SIZE_L3 * PTRS_PER_PGD / 2) > > arch/riscv/include/asm/pgtable.h:893:#define TASK_SIZE_MIN TASK_SIZE > > > > I can only see definitions, without any usage, so agreed on removing them. > > > > FWIW: > > Reviewed-by: Leonardo Bras <leobras@redhat.com> > Thx > > > > > I would also send a patch for loongarch, since they are in the same boat :) > Eh... I've sent one yesterday together. > > https://lore.kernel.org/loongarch/20231221054624.2208019-1-guoren@kernel.org/ Awesome! :) > > > > > Thanks! > > Leo > > > > > -- > Best Regards > Guo Ren >
diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h index 74ffb2178f54..e415582276ec 100644 --- a/arch/riscv/include/asm/pgtable.h +++ b/arch/riscv/include/asm/pgtable.h @@ -878,7 +878,6 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte) */ #ifdef CONFIG_64BIT #define TASK_SIZE_64 (PGDIR_SIZE * PTRS_PER_PGD / 2) -#define TASK_SIZE_MIN (PGDIR_SIZE_L3 * PTRS_PER_PGD / 2) #ifdef CONFIG_COMPAT #define TASK_SIZE_32 (_AC(0x80000000, UL)) @@ -890,7 +889,6 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte) #else #define TASK_SIZE FIXADDR_START -#define TASK_SIZE_MIN TASK_SIZE #endif #else /* CONFIG_MMU */