Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1220863rwd; Thu, 25 May 2023 09:30:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4MtK0mpaS1IeqoiZU8WP+njrphEtEbfdQe5MB4Hgh6SB7nG/SeA6fw9/sfipCiQ1lqJrFn X-Received: by 2002:a17:90b:fd2:b0:255:afdd:2e7 with SMTP id gd18-20020a17090b0fd200b00255afdd02e7mr2566709pjb.7.1685032220516; Thu, 25 May 2023 09:30:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685032220; cv=none; d=google.com; s=arc-20160816; b=dIHtMuFIe1kXVlWyRfHTT8/NQDII2S03yk8R4nFjcNal4wHL0DRoB08Mbm7TWFd4zR hJfVc67RsNGMAdE5OpL+K6+oOYF9SmN4CLB3vJZ/Ikco7Ky4TNg7Inpykb6zfQ3Pm5VC sKPP6zA3qf7NRKjuUfYnbgjTKIIckfkKBfwxeZrYE2WQG6+ljPC6WqcAHcFJmYPN84oq duxxJigyPOZTmoME/VuJfzB/qhm4BHMP1eHgkWkfcboebP/8cgxVhe8RHISKWkpvfLyO w9hR3EHPLtMwfa5T+6LxAGRTbXFDKrH4vbC52TUVbAri9qAV0uDDxXHmE3FRtbSJFNVS nDnA== 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=USQa14bxm9/gfk0iTFn1mMIzz0dadrwCcKOKR8DDgzQ=; b=JsYOj3bVLxpHdPYmrRPMFvN/cphWwhGdKgJtW8VdPQVmWo1/Ji9HZJ3OPAbQ1wtkaJ dHKGJB1l+BSdPpVE1AUnWdo9LMwxzdA/SWSMIHptR3k0xq0Uo48QUcEb93e5Iq0at2qv MToWlv03Wdx/V4cHAIB95miK4As4KwOWPKGgNAKUhG96xyNOeNgbAvRxTs0Q1Ucle8JR 45/xc8c+CIy/HtcFnkps9klQzW4enPKWyMQZzSwTmJODcFFUub5HWQfiisGwP1gdU3gu uCCF0gKUV3Wjk4lHqIgIth5+uenKbtNqe4wW4PK35VJi0gsBG9dEBUPSASbiRAGhocev kcQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=nwOl8DG2; 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 v14-20020a17090a6b0e00b002469c3f344asi1916792pjj.93.2023.05.25.09.30.07; Thu, 25 May 2023 09:30:20 -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=nwOl8DG2; 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 S232016AbjEYQJF (ORCPT + 99 others); Thu, 25 May 2023 12:09:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231451AbjEYQJD (ORCPT ); Thu, 25 May 2023 12:09:03 -0400 Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30441E59 for ; Thu, 25 May 2023 09:08:33 -0700 (PDT) Received: by mail-pg1-x534.google.com with SMTP id 41be03b00d2f7-5144a9c11c7so1569631a12.2 for ; Thu, 25 May 2023 09:08:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685030901; x=1687622901; 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=USQa14bxm9/gfk0iTFn1mMIzz0dadrwCcKOKR8DDgzQ=; b=nwOl8DG2BBTjeCysT0zw1xSgZWdheR/RWsAuvcg1DdEjdV7B2fYOPNPm8x0tlNmE/j hnfZGo7TBiqISYdVhCnYremv5C6rfiQdCVrkrWDJ2SCv4k8p4lZf6cDSNxRpC/0e6ydM oJFPM1oZ1Oz6UN5lERgMzfDltBLvgFnDYXyHDHepKLi5qCbSQGiWYcWvVapAbkVDVZM7 kkKMbwzQ+y9m3LXYiu/H5cTpU7Vt+mJm5uk1ow6Rb6h889EPpJZq8nRl+c0T4ejNoyt0 VBprecfmG7TsMhgxy8WhSbUVjg2yQx2bkgVgOv0BPZ8Bb8CMQraD72x7kL5+9TFscMhg 15Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685030901; x=1687622901; 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=USQa14bxm9/gfk0iTFn1mMIzz0dadrwCcKOKR8DDgzQ=; b=BhGHuJefVLJboJ8rgmRG68LRFy/R5nk4pCDUAOWAzIL89bGtV+gUlAwKWuCJCS+nK9 QQPP857QJBUYrM/ZU8xQ0oQCdw+a4CMZtVOdr7Bi7lgmRJmsSiL2TQ1iSUIpoRcLeHU/ elZgQu/2o1KgWYg0udLdGJJn4eZA5sV6MSvOXXWSwUpzy1vIiLbBoxEYm4p8ZS0wNU+g bw0AeEIA4+OVaix2cO+/feEAUqS+EgIOUfjcr6qRNv8Vn/6JQYFOqkZWMQwK84umdGWx rG3uTzh7fJLX11+0OHwxO0TIMgMf1DYaGDdr4iUuruqF79uO7xOz04wKQ9MEOjUu8aUn Bevw== X-Gm-Message-State: AC+VfDy4iIYvCkEY34F0XIVFuS0Z8v5n4FqSxvsmAyjKAa/eMBfwDgOb kiwHpbp4+jRVP0R0eOQyNSE= X-Received: by 2002:a17:902:e5c3:b0:1a6:8ed5:428a with SMTP id u3-20020a170902e5c300b001a68ed5428amr2528473plf.22.1685030900944; Thu, 25 May 2023 09:08:20 -0700 (PDT) Received: from ubuntu777.domain.name (36-228-81-153.dynamic-ip.hinet.net. [36.228.81.153]) by smtp.gmail.com with ESMTPSA id s3-20020a170902a50300b001ab12ccc2a7sm1611450plq.98.2023.05.25.09.08.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 May 2023 09:08:20 -0700 (PDT) From: Min-Hua Chen To: Vineet Gupta Cc: linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org, Min-Hua Chen Subject: [RESEND PATCH 1/2] ARC: fix incorrect THREAD_SHIFT definition Date: Fri, 26 May 2023 00:08:11 +0800 Message-Id: <20230525160813.39408-2-minhuadotchen@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230525160813.39408-1-minhuadotchen@gmail.com> References: <20230525160813.39408-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) 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