Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2429127rbb; Wed, 28 Feb 2024 01:11:25 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXXOJA7tSiqzfshy+flaICQkiyAX0eoXLkkCd4VH/Oh9TiAXurVSosnPRsJM7Akwm+dShygulIKef6Y+eDWJgbwxebKiS0fmN/cDb4RvQ== X-Google-Smtp-Source: AGHT+IGOh9Q0ETOdFBG12JKW8sdZ70iZOWgz/3miVOhkrhZ/jTmKCYT8ObVOkBK6TQk7uuDfBrrL X-Received: by 2002:a17:906:161b:b0:a40:bff7:6e73 with SMTP id m27-20020a170906161b00b00a40bff76e73mr7512492ejd.36.1709111485573; Wed, 28 Feb 2024 01:11:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709111485; cv=pass; d=google.com; s=arc-20160816; b=WKEBzAwmad44rH5X6dF9ni5r1rsIF7dSHpqvDYvYN2yJu2i7ZXNLesCHbFuSGiUH1D uiLgmI83Zu62Q+C40+2E/Or4pa+aUNPGc034VQxSzVExUfDgqKu0eSPxik2qb23NYHd2 UMn7BUqZyHCtyoppWsFb8pSN0UV4cTg1NfTt1PGl2BPY87TkBO3YaXfSIOWnkFvEZaty n+L0DuoWlgnsgQi6a+3hC+Hq++vA164i+57W/Pg2VPoJJqZ6EfIKz3t62je38Kdwxot0 ct7KbdnE+HSSFxjIdJ6+wImugX7Q+PEErjKIMJJQT4aw53zUOkt2zMIuqYpquOp9jcwj KVag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id; bh=6ZfBMx6u2INVAzEtCNKCNCan2Cu8bI6F2+o9gTfudec=; fh=MB7zA+SXXnunOAsXDSqHoPBLSDOtF5EciWcRQ2TM1os=; b=F9E3q1oFb2FDiMXoIConnMiAkGUkHSrky39cNSXynZ6ZH+zX2vgYjW+JfIy7DmVj6t +I4ZmrmD0/zEf98HywRBQ49CcfwbA066lneVbYsEju/o9o5MrlKXMmb4FOLra63F6H3D ls4BP5MZCm0TCfbLmByhcOJ+/Le1I1KjwzE2FgXiy5Sptz8f/fDfAV62S7jNEgY7otUO 1d9CPwHAHVPKCjLExJs+Lm7Qu1gt3F3CTkh7yDSraZORKnryy4J41O2bwIdUs/GSEwsb 7AE8tgbhTeFIQmwdnlUzAzFOsej3X+Whi90hTXjOcU9pWHvpZHysjMWCADyqAkG8kDkD JQRg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-84744-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84744-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id lu22-20020a170906fad600b00a3eaa9cefe2si1551773ejb.577.2024.02.28.01.11.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 01:11:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-84744-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-84744-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84744-linux.lists.archive=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 25B321F26208 for ; Wed, 28 Feb 2024 09:11:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CE3B32E64F; Wed, 28 Feb 2024 09:11:12 +0000 (UTC) Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com [209.85.218.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8EAF015C8; Wed, 28 Feb 2024 09:11:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709111472; cv=none; b=SOj6LCMeIBbSakUAAJyrXzMow2mkdkc07LKgd21YVUYLae75hg+lfLAm1WAkhc0UwOLuZZ87YA3SsgPQJbJLLZafRU6q0GBeVR3/arLTMgQbNn5s+KSyXV+oObWES5fujRWa1VJxD0Ssy9fJQekpXucPP9XxyMdAkzLgLk7a+LE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709111472; c=relaxed/simple; bh=EW0GWBsXyEcrLSZlvNMiWvx+c/9ZWO86Fuqwlv6uzHQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=sKOp88RlfjJ3RWIMI2YrpvdF+aZ92pBZAa+wicHGejIipSjLZQTPp9bvwEfcja/kKwVVBMf5JpSXDxbm+bEhTCwhP/tBngnQBJ3C1xd2RRa+KazgZLTbjtTE8dbK8wXm+0ygsgBK9DV3htPRNg7wTD3fSbvDPT05EPsQq9IAYM0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.218.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f53.google.com with SMTP id a640c23a62f3a-a43f922b2c5so50123366b.3; Wed, 28 Feb 2024 01:11:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709111468; x=1709716268; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6ZfBMx6u2INVAzEtCNKCNCan2Cu8bI6F2+o9gTfudec=; b=brMd4UOOUSfr6gaGhoqEymIxewTVSiWiKKo3eUi77g/EQA2XiDiQx3MIAWxsCiC7Z8 1JvdM/2P5ku1LXGlkAg+9n9+7Eo5Y14u92tTz4utacNAXkcsqtDbePTcid+/v1gAp6DJ pgckr6BU2Ua+PDhwEDjKzZeMgAEwYshHWbmOVhQs6ao/DxndZuerA1iZuVB8d6CmgVJY a6BR7j5YoPHhFD+QGYhVwsPptdFo7x8mTxrREx5KMlNT6UliKo9vBBSQAnSmYYui8TYN Uxobg81axPG6Iv+G6sSQa7Z/tMHkc5aICgDdSrjGdAN/50Nse5SY1aH+r4tiEJAFaJP+ UT2Q== X-Forwarded-Encrypted: i=1; AJvYcCV7haqkU0oECm7Y4VPQjv/OJ2tK3nGMUbozy87pS4Ifa/yCbiJ09fGO7vgykXEPqwZ8+LUSOM5IvkO4j2s0SGIJwli2P3sliA5Jers1RV+wIdiM8C2lTJmKpYb1YoSArWFxQRBh X-Gm-Message-State: AOJu0YzUtRkr3mfm4aXMVHjrYuIkj+v5d3TyWLBRfz3S6Dl/N06uXSkZ WHNoobvgVmc1r3BR2jas/sGIUbIgnQcjtb6FpgcDYymfu0oRVc2+ X-Received: by 2002:a17:906:3656:b0:a40:eba:4388 with SMTP id r22-20020a170906365600b00a400eba4388mr6939235ejb.49.1709111467797; Wed, 28 Feb 2024 01:11:07 -0800 (PST) Received: from ?IPV6:2a0b:e7c0:0:107::aaaa:59? ([2a0b:e7c0:0:107::aaaa:59]) by smtp.gmail.com with ESMTPSA id lf7-20020a170907174700b00a4316384159sm1615075ejc.224.2024.02.28.01.11.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 28 Feb 2024 01:11:07 -0800 (PST) Message-ID: <754c3acb-538d-45a1-84a1-0bebd02fd945@kernel.org> Date: Wed, 28 Feb 2024 10:11:05 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] mk68k: Fix broken THREAD_SIZE_ORDER Content-Language: en-US To: Dawei Li , geert@linux-m68k.org Cc: gerg@snapgear.com, linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org, set_pte_at@outlook.com, stable@vger.kernel.org References: <20240228085824.74639-1-dawei.li@shingroup.cn> From: Jiri Slaby Autocrypt: addr=jirislaby@kernel.org; keydata= xsFNBE6S54YBEACzzjLwDUbU5elY4GTg/NdotjA0jyyJtYI86wdKraekbNE0bC4zV+ryvH4j rrcDwGs6tFVrAHvdHeIdI07s1iIx5R/ndcHwt4fvI8CL5PzPmn5J+h0WERR5rFprRh6axhOk rSD5CwQl19fm4AJCS6A9GJtOoiLpWn2/IbogPc71jQVrupZYYx51rAaHZ0D2KYK/uhfc6neJ i0WqPlbtIlIrpvWxckucNu6ZwXjFY0f3qIRg3Vqh5QxPkojGsq9tXVFVLEkSVz6FoqCHrUTx wr+aw6qqQVgvT/McQtsI0S66uIkQjzPUrgAEtWUv76rM4ekqL9stHyvTGw0Fjsualwb0Gwdx ReTZzMgheAyoy/umIOKrSEpWouVoBt5FFSZUyjuDdlPPYyPav+hpI6ggmCTld3u2hyiHji2H cDpcLM2LMhlHBip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IIxXxt9FJaGc1Bgsi5K/+dyTKL wLMJgiBzbVx8G+fCJJ9YtlNOPWhbKPlrQ8+AY52Aagi9WNhe6XfJdh5g6ptiOILm330mkR4g W6nEgZVyIyTq3ekOuruftWL99qpP5zi+eNrMmLRQx9iecDNgFr342R9bTDlb1TLuRb+/tJ98 f/bIWIr0cqQmqQ33FgRhrG1+Xml6UXyJ2jExmlO8JljuOGeXYh6ZkIEyzqzffzBLXZCujlYQ DFXpyMNVJ2ZwPmX2mWEoYuaBU0JN7wM+/zWgOf2zRwhEuD3A2cO2PxoiIfyUEfB9SSmffaK/ S4xXoB6wvGENZ85Hg37C7WDNdaAt6Xh2uQIly5grkgvWppkNy4ZHxE+jeNsU7tg= In-Reply-To: <20240228085824.74639-1-dawei.li@shingroup.cn> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 28. 02. 24, 9:58, Dawei Li wrote: > Current THREAD_SIZE_ORDER implementation for m68k is incorrect, fix it > by ilog2(). This is not a good commit log. Incorrect in what way and why is the fixed version correct? And what is affected? Note you're referring to a change which was done 14 years ago. It definitely must not be that incorrect (for everybody). > 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__ > -- js suse labs