Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2426919rbb; Wed, 28 Feb 2024 01:06:31 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUq8g9FZTDdAv/kKoVqVPO5Glf5Lr7RhcsLtz0vW1Y1ES1R/IUiP1NmftfC4FitKp133IpLpP8XYFxYr1dZq4XN/VtvRiar/I1f3b/Jhg== X-Google-Smtp-Source: AGHT+IF652AbAF1t155Gaxwie3IwETQNmUiTlqS3NO4KNEovGU0GwAfi1s1DsHRDzU6lU4ZkIMN9 X-Received: by 2002:a05:6830:1d0:b0:6e4:288e:4a8a with SMTP id r16-20020a05683001d000b006e4288e4a8amr12807382ota.37.1709111191532; Wed, 28 Feb 2024 01:06:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709111191; cv=pass; d=google.com; s=arc-20160816; b=iTCs32a/z1rJVBa4S8E0af4L6Y0Ve7LRY4p9DOEPy8IMrNk4DVSB9LFzX35ao4I5Ln L4t0Z2QoGr7s/bETbjfsVzGTd+7T0S0pnDD2BtwY42RtTtLO9xeyvcQ4/HpHivSvEFU1 fx/OqtKzWDmM4bfjF95uz+CchYDqsbJsuElCz+hkIhWrIKoS3N/Pcy8xFEGDpp9mW21K aKsCr+xhCpCsLdJy/qkY1gD65iRoez32g/s+YElqtsD3OcsRSGxOm1YSGIEwvsxT/d64 WcxJ2e+1SaA7st9ZD2q3/zDFoUV9m0BtEVD/WCv4KL1sdPifIS9zRu4zPd3zqo6hN5LJ 8RAQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=feedback-id:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=4BVGm6lc9Ts68lPXPioUCBGEuIvUiucJPRklARmb5Ss=; fh=NmHZ4Rea6QE97xBSdUJ/a1kvWYSDqLqzQisPSZ7Jawo=; b=O6uNohj4qF4FKuEOvyPLrtPGfQc+iWIgeT9dotF4DGpTO9/5QR9kzbxcPl1B4vHkwE umsX9foRPYa7Lmstcyr2IZADLwYGOXDssUN2Xsj+LNphtQ98FqOyycM8wPVflyB1yuaw M4f6sZYYxxlQR5vVoFLPKtMyifbeg7IBlWmcH5MSgqh6Uwo03dresMApEtpPIz0it2Wg K36cMITef99hcHnSkhxPTiPwWsOb36Ln5ck6rdxwO3DwqbHdHWddLouJgfUQirqQ1yok XmwiAjMYQRiVYaFpu4ZsLbDEi99CK5iTDDh5hI9cumnsFefkxI6QZdDoa7jgxMdd20dj P6qw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=shingroup.cn dmarc=pass fromdomain=shingroup.cn); spf=pass (google.com: domain of linux-kernel+bounces-84731-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84731-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=shingroup.cn Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id k5-20020a635605000000b005d7a78810acsi6908901pgb.278.2024.02.28.01.06.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 01:06:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-84731-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=shingroup.cn dmarc=pass fromdomain=shingroup.cn); spf=pass (google.com: domain of linux-kernel+bounces-84731-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84731-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=shingroup.cn 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 3C05D28264A for ; Wed, 28 Feb 2024 09:06:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DD3CD481C7; Wed, 28 Feb 2024 09:02:33 +0000 (UTC) Received: from bg1.exmail.qq.com (bg1.exmail.qq.com [114.132.62.65]) (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 C2DAE381C2; Wed, 28 Feb 2024 09:02:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=114.132.62.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709110953; cv=none; b=Zf3FCIxYEEefODx2o81slGf4bFVqSNlHY7ihqLNQ/oYHJRXwzR2rYKFCxhF/dTNWI6dSIdvgyTk2ig0OFxfBpkI66e3Hw1vnv3S44llCCDuNJp1B8KUtN/cOUJvZK1dJZDZxG46zY9W6Ei5vgWxN3GjLzHJ/O7LFdMZWo1ys9io= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709110953; c=relaxed/simple; bh=RDvcBlVuIemwLM4J03ulD1eFMdgG9/KmMg5CARU8pQI=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=fuMiVE9NmNtXgVT/hAbQJQWdbGcxds2oYoDbLsOdfuIA4RwdMAc6joT8ZOG1dNK4c9gXeYM5uJB965FSY9+vAqp4zGoGx2GPTt4q4PtnR/vC9u+xts3NZ6ZqBXWlgSqh5mJ5QtJmB1zmNesQQbiOOpqik7P0S1K0mL0byI15DbA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=shingroup.cn; spf=pass smtp.mailfrom=shingroup.cn; arc=none smtp.client-ip=114.132.62.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=shingroup.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=shingroup.cn X-QQ-mid: bizesmtp81t1709110713tb5brp7v X-QQ-Originating-IP: RMFuvulrkTTkIP3veOx5DZWOUzbPAQR7RNVNIZjsZAQ= Received: from localhost ( [112.22.30.30]) by bizesmtp.qq.com (ESMTP) with id ; Wed, 28 Feb 2024 16:58:32 +0800 (CST) X-QQ-SSF: 01400000000000505000000F0000000 X-QQ-FEAT: LE7C6P2vL8S2AsPvDMxMsvXF+uR7nFYwkxu3h1ZViKpA2gYns/FH84WdcCO1m A9y5Xklv7vi7WpLi05dx2fTfkPNHUtslCmUkh8VaAlXr/Mii1L24lZiIeEU9GgBwu6ELmCG Yp5eXgQrWF0h58L+WEaKuboRvZ+2LRlqIodEp8+BtmTqkafTgd/TXC3agtGlM2GfwTrERLM OoIyX6cYvGPkf4DuxsRzACF2+g97DyrnC61htmVfL15IU/w8GA4ePV9H1ypPGpUnAKbdP9h /Bx1Ls+WojIKWMFGG6YA+C38tNgymkK3XcUJ4pssb6XWERXJDQpD1ywHAjw15wnTcZoMrpk FRvfTz+5rwdZWgxsF95DFA4zg4XfU82GpMYXCgUVZGshWi8imujDYYXN0Jwn1dIXCKOlJDt X-QQ-GoodBg: 2 X-BIZMAIL-ID: 16178612125370400260 From: Dawei Li To: geert@linux-m68k.org Cc: gerg@snapgear.com, linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org, set_pte_at@outlook.com, Dawei Li , stable@vger.kernel.org Subject: [PATCH] mk68k: Fix broken THREAD_SIZE_ORDER Date: Wed, 28 Feb 2024 16:58:24 +0800 Message-Id: <20240228085824.74639-1-dawei.li@shingroup.cn> X-Mailer: git-send-email 2.27.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:shingroup.cn:qybglogicsvrgz:qybglogicsvrgz5a-1 Current THREAD_SIZE_ORDER implementation for m68k is incorrect, fix it by ilog2(). Fixes: cddafa3500fd ("m68k/m68knommu: merge MMU and non-MMU thread_info.h") Signed-off-by: Dawei Li Cc: stable@vger.kernel.org --- arch/m68k/include/asm/thread_info.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/m68k/include/asm/thread_info.h b/arch/m68k/include/asm/thread_info.h index 31be2ad999ca..50faecd6fc5f 100644 --- a/arch/m68k/include/asm/thread_info.h +++ b/arch/m68k/include/asm/thread_info.h @@ -19,7 +19,8 @@ #else #define THREAD_SIZE PAGE_SIZE #endif -#define THREAD_SIZE_ORDER ((THREAD_SIZE / PAGE_SIZE) - 1) + +#define THREAD_SIZE_ORDER ilog2(THREAD_SIZE / PAGE_SIZE) #ifndef __ASSEMBLY__ -- 2.27.0