Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp60653imw; Wed, 13 Jul 2022 19:10:21 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vCoADqHULonTZFTpO1xZsI0Tecmt5rJoLe4+iIf4WuSk80O76yO6rOKJvKYBSgGWDUkN/3 X-Received: by 2002:a65:4d45:0:b0:411:83dc:9625 with SMTP id j5-20020a654d45000000b0041183dc9625mr5422762pgt.359.1657764621580; Wed, 13 Jul 2022 19:10:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657764621; cv=none; d=google.com; s=arc-20160816; b=nlOTT+TtHkMeOnHeRPbCj6XAtTxw0jS/58pWdPYHIW8Vcylx2fJ9OhCXMH7DlbCemm n12h8p98Ary0NtYmc1yIpL3yPTjYVsWOsuRNTJPn22YDBj0+Zs8aEWHtUq3HhoTc6zR+ ydO0XAZ1WB5WR3bJEmfLvSfVKAM9XZFcm9FGlKEwJiOc0NLMNmdQACszo/9qmyDQLhS0 EodKIKDQ9xYkF1Jt+WG52Zm9vbwzQ8k2So0iNdIS19zKolkfhTI5cJaT4o9QZ0Fw+TMZ AzvCtTfWMsd6ynOGLkcbiruoAO1iz2DAvaqDyCDXhbU6BOo7T91tTzEpRmw+9YGz6DNy JSeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=NpLH38IQjk7redhO9PrQcXlLl1raddOqHif56KP33pc=; b=J5Xbg4QD2FYfGbcSqmdog0HUpGjyxekYqcWXhqgIDvEaLVqUPAp/tDlKjX4/1CBNdL /VDgk79yd1lyW1MAiwBPSpOdzh6hyA8Z9GPLhvf7kPzQ6dALLyBHpEas8Uh7l3jYkWz4 mhH1uBG37zA544j4pDgvoJHFt1oULGE8f81V8ah4KUrGqecdith+jpkleOZ5/+3CK51R wimAXfd75Fgb6/KLBvrVyx7RNmyjOLJcNrQ7QqUftf9JRQ5CDeh8xTH+GaWL1CoBqW5+ CcWbIz7Ye93cC8O6vIuZOZ9jMczP4nAiHCodg0/F7xFDpX95v+rL5rhGUd8MlOnt2OBb x0wQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="gJ/Poz6f"; 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 x202-20020a6331d3000000b0040db5dc1750si138391pgx.853.2022.07.13.19.10.07; Wed, 13 Jul 2022 19:10:21 -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=20210112 header.b="gJ/Poz6f"; 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 S232408AbiGNCH1 (ORCPT + 99 others); Wed, 13 Jul 2022 22:07:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230201AbiGNCHZ (ORCPT ); Wed, 13 Jul 2022 22:07:25 -0400 Received: from mail-ua1-x92b.google.com (mail-ua1-x92b.google.com [IPv6:2607:f8b0:4864:20::92b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5ACD12314C; Wed, 13 Jul 2022 19:07:24 -0700 (PDT) Received: by mail-ua1-x92b.google.com with SMTP id r25so152474uap.7; Wed, 13 Jul 2022 19:07:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NpLH38IQjk7redhO9PrQcXlLl1raddOqHif56KP33pc=; b=gJ/Poz6fnHmy6tw3/ekjOTdZC6WAanr/z9pOUQdssMiy7McyExvpdd2WUfWAj5C8de TncoEwlo8JJLiUN9u6ikmdNggPa0I8xHqcrzSFyA8+4axrtQt1keJ3CngNjRaLncRycp qQwcp767wZ15QiyGPZzbaIaVB7YDgBsPq6aKOkidU3/YYJI9s6YTbbDDpyvbGvociREx d54hnyqMsAqBySNzMiQPlt7aNjoilHYVamiweBh9OT8UgjMxk8qBjyBkfRVI/cBrDttl e0diMOgIGJYy6CfzH7aYgBRsDb70meGOSPVAWYLpYBJ5O+5isELaxkVSWBkr3TqqsNUZ J84g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NpLH38IQjk7redhO9PrQcXlLl1raddOqHif56KP33pc=; b=jCF6pb9FI9vjZJAtgwyzs5AOiQOz6a/I/wZWuv0AJKR3VsIYY0S+v3TCBwiZsTUSuv f1Fz3EhLzOVq/NpoylO/A2hSRIKfnzULMDgIR7bg46cRoVGQZuz2iZTT4Z0ai4h2mRJe OvUcW77drccSqX9FJGpl+JyqW7peFvzmv3VpZcI/gEwtphmxd5/Go9hSa5bJoEUuUieq gj+3uByVAisBkNTlP0b0O6nDwmSiancaLgkK+T+QjU4rhZLZ5xjNGupXc6D8PSdHgsga 9qpH/tsfluFOQv+/rUi5+/HNwYIzlmMs4RnOlpvyxw+k2JKOApQFopnU2L+zdaGmIpuL FwRQ== X-Gm-Message-State: AJIora9t/UrodRBa0g4JVBuNKvgw4xT5tW0ch4RoHgM0s6X6lKVQuf3V K1gHAG3YYhARqQ+X/arqzP1ILHIKjVVp5zCZCDiy77J1gzhANwDD X-Received: by 2002:ab0:6798:0:b0:382:d9f4:8d0 with SMTP id v24-20020ab06798000000b00382d9f408d0mr2611303uar.63.1657764443460; Wed, 13 Jul 2022 19:07:23 -0700 (PDT) MIME-Version: 1.0 References: <20220712075255.1345991-1-chenhuacai@loongson.cn> <20220712075255.1345991-3-chenhuacai@loongson.cn> In-Reply-To: From: Huacai Chen Date: Thu, 14 Jul 2022 10:07:10 +0800 Message-ID: Subject: Re: [PATCH 3/6] M68K: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK To: WANG Xuerui Cc: Geert Uytterhoeven , 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 , Jiaxun Yang , "open list:BROADCOM NVRAM DRIVER" , linux-m68k , Linux-sh list , linux-um , stable Content-Type: text/plain; charset="UTF-8" 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 Hi, all, On Tue, Jul 12, 2022 at 6:15 PM WANG Xuerui wrote: > > 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. It seems that the best solution is only fix architectures with SMP support and leave others (m68k, microblaze, um) as is. :) Huacai >