Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4192862imw; Tue, 12 Jul 2022 03:45:49 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vlJo7YEjOVKp2LJP10Lok1quoEqIyfKoZpDtnAhxaJjHEOJGq3FbvimJqYhpoF1QVIb5HW X-Received: by 2002:a17:902:7e85:b0:16c:593:d91a with SMTP id z5-20020a1709027e8500b0016c0593d91amr22876027pla.155.1657622749309; Tue, 12 Jul 2022 03:45:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657622749; cv=none; d=google.com; s=arc-20160816; b=q6qp+flqky8ThOE7LPNc6oVlMbgjRfLy/GbqraPSNbcR1jpZIVx9yDL3p/Oz9qfJzQ xfDtwpy1bNYkfns0T/qK2xsOSCyZPtQXk4R8H1Il+AT2+gxUmzpBcQp3OH+Ga6gRLIyd E1Qx+oqH0F4TWSOzDuWTSuKbsaXktel8hKQfL0qeRJhtSswRReFFb4ToB/uH7DUOfc5r +ENzBEvJiMw3T2/abZSKU4qzsBJUZxK+tP0KGm8T/v9PxHz9vUXtgTGqs38t3XDw8tmW k/xvxwphhk/b69tCMSr5IhJ/abfH4HUKfDcYWMIhOCHnoMDx1PLagM76j/KIQtvzQ9zZ c1vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=F39v81IArdWgY3m+a88EIQdDMyX/BCApDtA2NcJleeA=; b=Zwgc5lzgGM0oMwVXxi3o0Q/sqdiMOR8qtYrR9de+973ttnNbR29LZxKnn3KR8eNZ8P 5u/3LLEEcEOkKyH7syRHB+jRG8qS37oYQETQNJ93vvsf/OPRVtZmXAh5zIvMi0p7De4M g7KUrqDnfB/cHvtInCa020JcNeXa7d0g3nMhyFpfn+Wh2B7pDTmnurj2ILY5C1SQ8ZcV 6RNIGU6cK+X0sxrb4BMczF0EsEF1IDpasOHVt0DV7hINQU9a2WVnd9kimMztiyhH5M21 Tysre7rjIuOUjO478P6BjzTkvtwyR7zcVu4In9fQmBkHCnBHDwVlx/aJ5NhZjY4lEIVT wZXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xen0n.name header.s=mail header.b=RRtr77MU; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h19-20020a63df53000000b00415c8a536c0si12957267pgj.252.2022.07.12.03.45.30; Tue, 12 Jul 2022 03:45:49 -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=@xen0n.name header.s=mail header.b=RRtr77MU; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230135AbiGLKPv (ORCPT + 99 others); Tue, 12 Jul 2022 06:15:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230316AbiGLKPu (ORCPT ); Tue, 12 Jul 2022 06:15:50 -0400 Received: from mailbox.box.xen0n.name (mail.xen0n.name [115.28.160.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48CB8AB7F2; Tue, 12 Jul 2022 03:15:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xen0n.name; s=mail; t=1657620946; bh=Qy2aD4jae7WRAGs22QTr9i9ghQ5lCrNooZtoNWm8ScQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=RRtr77MUySNcX97jwUMcUn+6qBESgQgGDvXyiPq9xzL21rjz6fFV4uiAczcvP2r+M tOp9Fdl1WwRfL/6Ot/Yq/DSEzMxi0yWymcwedsaYrD80zX6hknS1JceruJ+Ms3p1M+ gQMt0vUkYqd4dM1/vKkbWytp2ocxqylhnyzbR0PM= Received: from [100.100.57.190] (unknown [220.248.53.61]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailbox.box.xen0n.name (Postfix) with ESMTPSA id 763A1607C5; Tue, 12 Jul 2022 18:15:45 +0800 (CST) Message-ID: Date: Tue, 12 Jul 2022 18:15:44 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:104.0) Gecko/20100101 Thunderbird/104.0a1 Subject: Re: [PATCH 3/6] M68K: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK Content-Language: en-US To: Geert Uytterhoeven , Huacai Chen Cc: Huacai Chen , Arnd Bergmann , Thomas Bogendoerfer , Michal Simek , Yoshinori Sato , Rich Felker , Jeff Dike , Richard Weinberger , Anton Ivanov , loongarch@lists.linux.dev, Linux-Arch , Linux Kernel Mailing List , Guo Ren , Xuerui Wang , Jiaxun Yang , "open list:BROADCOM NVRAM DRIVER" , linux-m68k , Linux-sh list , linux-um , stable References: <20220712075255.1345991-1-chenhuacai@loongson.cn> <20220712075255.1345991-3-chenhuacai@loongson.cn> From: WANG Xuerui In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed 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,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Hi Geert and Huacai, On 2022/7/12 17:13, Geert Uytterhoeven wrote: > Hi Huacai, > > On Tue, Jul 12, 2022 at 11:08 AM Huacai Chen wrote: >> On Tue, Jul 12, 2022 at 5:01 PM Geert Uytterhoeven wrote: >>> On Tue, Jul 12, 2022 at 10:53 AM Huacai Chen wrote: >>>> On Tue, Jul 12, 2022 at 4:33 PM Geert Uytterhoeven wrote: >>>>> On Tue, Jul 12, 2022 at 9:53 AM Huacai Chen wrote: >>>>>> When CONFIG_CPUMASK_OFFSTACK and CONFIG_DEBUG_PER_CPU_MAPS is selected, >>>>> DEBUG_PER_CPU_MAPS depends on SMP, which is not supported on m68k, >>>>> and thus cannot be enabled. >>>> This patch is derived from MIPS and LoongArch, I search all >>>> architectures and change those that look the same as MIPS and >>>> LoongArch. >>>> And the warning message below is also a copy-paste from LoongArch, sorry. >>>> >>>> Since M68K doesn't support SMP, then this patch seems to make no >>>> difference, but does it make sense to keep consistency across all >>>> architectures? >>> Yes, having consistency is good. But that should be mentioned in the >>> patch description, instead of a scary warning CCed to stable ;-) >>> >>> BTW, you probably want to update the other copy of c_start() in >>> arch/m68k/kernel/setup_mm.c, too. >> For no-SMP architectures, it seems c_start() in >> arch/m68k/kernel/setup_mm.c is more reasonable (just use 1, neither >> NR_CPUS, nor nr_cpu_ids)? > The advantage of using nr_cpu_ids() is that this is one place less > to update when adding SMP support later... Hmm, so I've been watching m68k development lately (although not as closely as I'd like to, due to lack of vintage hardware at hand), given the current amazingĀ  momentum all the hobbyists/developers have been contributing to, SMP is well within reach... But judging from the intent of this patch series (fixing WARNs on certain configs), and that the triggering condition is currently impossible on m68k (and other non-SMP) platforms, I think cleanups for such arches could come as a separate patch series later. I think the m68k refactoring is reasonable after all, due to my observation above, but for the other non-SMP arches we may want to wait for the respective maintainers' opinions.