Message ID | 20230815004813.555115-11-vgupta@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b82d:0:b0:3f2:4152:657d with SMTP id z13csp537180vqi; Thu, 17 Aug 2023 01:09:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGbYSQfPOU8SawCp7jHez+CnSAx+Z39FCUxk/RL6DbDIl5sMnTG6UCRSqsL2Cf0Zc6pLh6W X-Received: by 2002:a17:90b:3b49:b0:26b:4a9e:3c7e with SMTP id ot9-20020a17090b3b4900b0026b4a9e3c7emr3811670pjb.4.1692259759239; Thu, 17 Aug 2023 01:09:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692259759; cv=none; d=google.com; s=arc-20160816; b=PABE3IqUtuXHMbm+0Kk+0voNDqfIPRIApHjTJ6w4wCtD4Jgh4nivxS8Xa864h5/KVZ hbBLnwUjPlJDC9ICn0ditCO+57xgbXbjQL6YThnUtIFMnN4KOgsqSEz2wNzH3Vz0rMx5 l8uWCsiNG5Mo1v45s9M1xTLTwJQJjT3JSqAOpHko9X/FlrvCMuQI0Gd+TmSwKLvcCofY 0BamBDGljSo0psWeGqIDgmJSI2U5AKCS3w9KDszwziVmVf4nzT0r4wArGbizcTHbx32F KIJxoJfHsmFPxSAObAMi1qS8Rt45PEXVtSxEbts6ReluTFZ/aL+uoJmLOd3qj3fJF1CV /d4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ujOiclhME9Yo3gSB4LMVq+mbOs/pyrlOwOd9l3gf5a8=; fh=pU3/8cu9yvGtRhZz+04fy928CRCHy2kGYoR0fnliYkk=; b=hsh72IPWIKqQK8l6+Ps9m7iqqwtsiZkBw551LXqh731Ta3fIjIWhKchpdwcDDc2YU+ mVwU/L+eLTKrj5KvOS92HO3xC6YyQ4UfyATkvxqLrVquYbe06oMhm6VZZosCC5Iq6Qge d5j3UtY6ZOExwmTCVJUVh/1IKwnl4LuWfGeLygirgXc8FuGL0pIBeHqSx1rAWRLyTQR9 Q4cVO5xQgeWwsfp1zH7EA/dh8PbKV5WBBk5hNuRS3ICmF1Wx7V+jOI1DIUtoglX5IeaV TX81D52ngYb0LK56F5xaJmapo7UXWfaNufIO4/L3npRxwTI9vEMSjPwx1143L7xhoRBa Zr/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jIuvLqPb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gx5-20020a17090b124500b0026806ed3fd8si1079922pjb.71.2023.08.17.01.09.05; Thu, 17 Aug 2023 01:09:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jIuvLqPb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233775AbjHOAsj (ORCPT <rfc822;274620705z@gmail.com> + 99 others); Mon, 14 Aug 2023 20:48:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233530AbjHOAsX (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 14 Aug 2023 20:48:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F5B11723 for <linux-kernel@vger.kernel.org>; Mon, 14 Aug 2023 17:48:23 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A241F64BEE for <linux-kernel@vger.kernel.org>; Tue, 15 Aug 2023 00:48:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D212C433CC; Tue, 15 Aug 2023 00:48:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692060502; bh=yWcyUxif3dikEYknmSArzeGyfZedu8yajJX9cu4DT8o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jIuvLqPbU//pLE4JPxKRp9UCHkrq9i+/o1874YalJxOHW1DzCuOc5eTpgw+36PDDD 2aOy8LOzN/4I/Y66XzxsCN/UDZ1ZlY544oyu35GmmcdnL7yq0qCBggnlJcDCF580Rx b2xdpHvMrUc/wnQ1wJTJYlgeosSMYovaiGmHWOcPHkxLTCNCtCKV3v7sRF8bov3N6R 4KTt9Ifyn9CofxXD/PVV8Ebi4mYtym7AeLTudA5ZA+xApAxDL242HS3ZDBNETyHs/y qpHDFhaLXhhTveQNORVxZZ6zFk+UD+YbDI7/VrH5bxw/OVgzuk2z7VRZE21OhoWNSA vlDa9wN4DEArQ== From: Vineet Gupta <vgupta@kernel.org> To: linux-snps-arc@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Shahab Vahedi <Shahab.Vahedi@synopsys.com>, Alexey Brodkin <abrodkin@synopsys.com>, Vineet Gupta <vgupta@kernel.org> Subject: [PATCH 10/20] ARC: kernel stack: INIT_THREAD need not setup @init_stack in @ksp Date: Mon, 14 Aug 2023 17:48:03 -0700 Message-Id: <20230815004813.555115-11-vgupta@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230815004813.555115-1-vgupta@kernel.org> References: <20230815004813.555115-1-vgupta@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1774462969477843585 X-GMAIL-MSGID: 1774462969477843585 |
Series |
ARC updates
|
|
Commit Message
Vineet Gupta
Aug. 15, 2023, 12:48 a.m. UTC
There are 2 pointers to kernel mode stack of a task
- task_struct.stack: base address of stack page (max possible stack top)
- thread_info.ksp : runtime stack top in __switch_to
INIT_THREAD was setting up ksp to stack base which was not really needed
- it would get overwritten with dynamic value on first call to
__switch_to when init is switched out for the very first time.
- generic code already does
init_task.stack = init_stack
and ARC code uses that to retrieve task's stack base.
Signed-off-by: Vineet Gupta <vgupta@kernel.org>
---
arch/arc/include/asm/processor.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/arc/include/asm/processor.h b/arch/arc/include/asm/processor.h index fb844fce1ab6..82ddc929d6e7 100644 --- a/arch/arc/include/asm/processor.h +++ b/arch/arc/include/asm/processor.h @@ -33,9 +33,7 @@ struct thread_struct { #endif }; -#define INIT_THREAD { \ - .ksp = sizeof(init_stack) + (unsigned long) init_stack, \ -} +#define INIT_THREAD { } /* Forward declaration, a strange C thing */ struct task_struct;