Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp9128459rwr; Thu, 11 May 2023 10:17:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Cnelqox/D9LE2dPu5iH/AjszG/SZKDsKcluh6h2t7NKOKJCea7UGlYTVDHTbfg0uRACPk X-Received: by 2002:a17:902:ecd0:b0:1ac:7ae7:3fe1 with SMTP id a16-20020a170902ecd000b001ac7ae73fe1mr18286511plh.20.1683825439265; Thu, 11 May 2023 10:17:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683825439; cv=none; d=google.com; s=arc-20160816; b=zcsz/d7+oJ+wvG51l8/ssmJrWk1xA790nNJiwWN/+sS5atPORn6cN0gK7bu9Bw23Rv THLrNJty2T+JioHQPeKSfpl0g4FP/K6xQ8bBDTEhQvSYsCSfMoSt+RkxrH69mgQH4spa Val7E005rhCDWAOmbC1cc+zmu1AmCZVuCawbNoYjo4sNBojIgXLiSosUlE+CEVdqQFRR J+dzy9TuB5csJW7/0ahxxLBSrcLKzHf8giU1NNj7AaC94VgcUtYEPoQBZJYwp3D5I0t1 DyvJFoJyK9HX2Hlhgn5xgy3fgpNfLqcQyID9TUV5NWW9j1oV269QmsW3Lu0+mkZUfm5U aAzw== 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=kiNPfQZ2SsTlTZ73Scqtrooa5dsdeP/h86336+fdM1I=; b=BC2IkOIHrfAJ/N8ItjuxpmZUCvfy2aKOaMwKnDqC39R7vYdpMpcOg6s7qL9mSPJQsZ OZ32uZ7+Onv3Xi29cm/UAF2bg97XCBpEZM46sQeIXiQ/aeoXOshogA7tLeiNeHKApw3o zad6itqgryfyPGCq7KfSYRolcyggkeUx/a01bxDCF0nRLY64wnAnxZzk7ozf9H/+X59l MmuxKmaF9UHLqEpJ7nFZTrWbBP0ucOkPYi8xjwNvGMmPAN3L0D0G1TsrFsX8pToEaOyc RS3pYql+gXed4FMhnc2wduOaE/UWq8dkmzaK9xRbwlk9vFOcsoiSPT2juYTYCgQwWNe+ O3gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=btXNXw42; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e2-20020a17090a630200b00250a4cb7537si8016008pjj.34.2023.05.11.10.17.07; Thu, 11 May 2023 10:17: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=@gmail.com header.s=20221208 header.b=btXNXw42; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238760AbjEKRBw (ORCPT + 99 others); Thu, 11 May 2023 13:01:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238752AbjEKRBu (ORCPT ); Thu, 11 May 2023 13:01:50 -0400 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46B54E57 for ; Thu, 11 May 2023 10:01:46 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1ab05018381so82307945ad.2 for ; Thu, 11 May 2023 10:01:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683824506; x=1686416506; 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=kiNPfQZ2SsTlTZ73Scqtrooa5dsdeP/h86336+fdM1I=; b=btXNXw42KXxaiNsJfsqp5Wn/dVNYLwALdAKbsBkh72TWh49seYq5HQC2VAXmesyVIq RQizzGe1z14+Elg2CtqSOHZSGJ2O/8ajGCUK/97zqwP8TWERhC7H5GtimBpTHCvrI1az NoiTUVsB6QX1uN/Y5a09s7En+QHiE3dROXxFmtZsa+sMrH5E8tPFrfdQCKGufOGpVy2e ZMxAyNOZs7D9JLraOVC9YAFr0/iGCM+ZTfBp/Lgb4GG7CfEhlCfwakIMYtTY0rfuCeAY gL6FUvDP5Uz8T8e0yWRXaNhO3w4RPcgUTiyuM21VVDATl5mP29FwEu7srA9YPtk1AknF G/IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683824506; x=1686416506; 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=kiNPfQZ2SsTlTZ73Scqtrooa5dsdeP/h86336+fdM1I=; b=h/NXHf+r7hUX1WA6GdZjnNtMoz9lVPBhSFLqa+Ku4920YrK5b3SG4Go3AwxsgNqYV6 nkBy8huTqP8CZTcG106Rtwnr3uxjXMNSJm/nuFIvgHDSj4O/5sSE0e959nhYhTmjZX6G ru9wvTz7p5aqQ+jW6ak30f5neEu0JFo0ifr1l/eWZUTJXT+pp2UkEq+0V2vRt/r4wA6G zOJAO7r7DDDtxiertrAfQYhGOtM1YvXAHUNLjDwcS5kysBMt0ZjydmBszKrKKOjYbxiR Rp36oToxptvSYTRDzN9rj78Fq7oYSsqrHVPyUKbpYd2kDKcbe90ZWvpyjuVYy9EwQKqS y1rg== X-Gm-Message-State: AC+VfDwWP3ZisBInKWbK1/ilh1bc+jkH1fF/AyjwnnhWSC5Ue8sW3TQV ctgypKzrAxgQiw4Ufa4rgo1K6CCR1kw= X-Received: by 2002:a17:902:f7d3:b0:1a6:dfb3:5f4b with SMTP id h19-20020a170902f7d300b001a6dfb35f4bmr20711948plw.55.1683824505778; Thu, 11 May 2023 10:01:45 -0700 (PDT) Received: from ubuntu777.domain.name (36-228-94-72.dynamic-ip.hinet.net. [36.228.94.72]) by smtp.gmail.com with ESMTPSA id r7-20020a170902be0700b001ab0083c6c9sm6156240pls.261.2023.05.11.10.01.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 May 2023 10:01:45 -0700 (PDT) From: Min-Hua Chen To: Vineet Gupta Cc: Min-Hua Chen , linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] ARC: fix incorrect THREAD_SHIFT definition Date: Fri, 12 May 2023 01:01:38 +0800 Message-Id: <20230511170139.343434-2-minhuadotchen@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230511170139.343434-1-minhuadotchen@gmail.com> References: <20230511170139.343434-1-minhuadotchen@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org Current definition of THREAD_SHIFT is (PAGE_SHIFT << THREAD_SIZE_ORDER) look incorrect. It should be (PAGE_SHIFT + THREAD_SIZE_ORDER) because the following equation should hold: Say PAGE_SHIFT == 13 (as the default value in ARC) THREAD_SIZE_ORDER == 1 (as CONFIG_16KSTACKS=y) THREAD_SIZE == (1 << THREAD_SHIFT) == (1 << (PAGE_SHIFT + THREAD_SIZE_ORDER)) == (1 << 14) == 16KB Signed-off-by: Min-Hua Chen --- arch/arc/include/asm/thread_info.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arc/include/asm/thread_info.h b/arch/arc/include/asm/thread_info.h index 6ba7fe417095..9f9dd021501c 100644 --- a/arch/arc/include/asm/thread_info.h +++ b/arch/arc/include/asm/thread_info.h @@ -22,7 +22,7 @@ #endif #define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER) -#define THREAD_SHIFT (PAGE_SHIFT << THREAD_SIZE_ORDER) +#define THREAD_SHIFT (PAGE_SHIFT + THREAD_SIZE_ORDER) #ifndef __ASSEMBLY__ -- 2.34.1