Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1020420rdb; Tue, 19 Sep 2023 18:37:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFiT8YcrmtkAqr9D7fGNjDsBLGdyEI0F0QLNQpFEqmnONkOjy7QQF+VsYGK/8EwRgcoJFyj X-Received: by 2002:a05:6a00:2185:b0:68f:b5cb:ced0 with SMTP id h5-20020a056a00218500b0068fb5cbced0mr1356563pfi.34.1695173827857; Tue, 19 Sep 2023 18:37:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695173827; cv=none; d=google.com; s=arc-20160816; b=dMfNFavzcjIxQw2/v/MzK8iWpnJcQBEpvePiBV1o+s3vF/fbiw7GiqbUtgxdh6aohQ YS0FoICylhJ2AJASqXANNZzqCfiXlRmUs3ySqSn/JgwQyCcqJyglaN6Y0wqigK2lkhuk 3f+RuCZr0sBS/BHo8SjZi9abWjI4x7r4JVty6ZzLPYl5WcyU6eI8iig8RLr9KM+tb6EP W/IYoZtNm+aqm7qWcuyM0hGOnCbmJbqTun5RU6Fe7LcmgJkbobLR70UeADzBzedVea1a YAKajyKZWPlek9FyVs9D++Hek3ZUMrGKQnV0AljdofIZf0t4kMpjfoTMbXV7mbukEDzi /zlA== 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 :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=MutGXS2lR8yarbHa1YGtmYlz+j/yuZznM77JECiOUBM=; fh=S462Rb2AzdoRX8YVE6OQ6IJLye2S5N4BSo6nQMVb32E=; b=bduwRaXZg9Lc50CWBSsG/QO1Gh3ouBeVYa3azD9geWkaCylzXZtw9eF2tvVVXcgLYV I0AzIiid/1pZB4GIdE3s8sRq6d7KcusY6Kc9cvvrD9pnGYv1sMenplkRJX9DN8mjcQS/ aHfydN/xcYHczpenuKP+SFEPKVX9pGEUtWuDElBm5pIYrmVDUR99VLix/m62AGEC/4BW NWHOPfIjJMQ4ecmX8u9K47cLHxki2FtxM30bxTnc4uAoeBP3C6dYRrIuIMFz8G1qDO9N 2rV9IuZM4lKmEqTndGydrH/mfqK1DR+tSAGxE6hhN5eFAeula6RCcBzgjdrnPHPt7fmo vCng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id f21-20020a056a00229500b0068780155ddbsi10829796pfe.131.2023.09.19.18.37.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 18:37:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id DA1618373822; Tue, 19 Sep 2023 18:37:06 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229988AbjITBg4 (ORCPT + 99 others); Tue, 19 Sep 2023 21:36:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229521AbjITBgz (ORCPT ); Tue, 19 Sep 2023 21:36:55 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 903D0B3 for ; Tue, 19 Sep 2023 18:36:48 -0700 (PDT) Received: from canpemm500009.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Rr1Jr55smzVjdt; Wed, 20 Sep 2023 09:33:48 +0800 (CST) Received: from [10.67.121.177] (10.67.121.177) by canpemm500009.china.huawei.com (7.192.105.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Wed, 20 Sep 2023 09:36:45 +0800 Subject: Re: [PATCH] arch_topology: Support SMT control on arm64 To: kernel test robot , Yicong Yang , , , , CC: , , , , , , References: <20230919123319.23785-1-yangyicong@huawei.com> <202309200727.CtYl75aH-lkp@intel.com> From: Yicong Yang Message-ID: Date: Wed, 20 Sep 2023 09:36:45 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: <202309200727.CtYl75aH-lkp@intel.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.121.177] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To canpemm500009.china.huawei.com (7.192.105.203) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 19 Sep 2023 18:37:07 -0700 (PDT) On 2023/9/20 7:30, kernel test robot wrote: > Hi Yicong, > > kernel test robot noticed the following build errors: > > [auto build test ERROR on arm64/for-next/core] > [also build test ERROR on driver-core/driver-core-testing driver-core/driver-core-next driver-core/driver-core-linus linus/master v6.6-rc2 next-20230919] > [If your patch is applied to the wrong git tree, kindly drop us a note. > And when submitting patch, we suggest to use '--base' as documented in > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > url: https://github.com/intel-lab-lkp/linux/commits/Yicong-Yang/arch_topology-Support-SMT-control-on-arm64/20230919-223458 > base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core > patch link: https://lore.kernel.org/r/20230919123319.23785-1-yangyicong%40huawei.com > patch subject: [PATCH] arch_topology: Support SMT control on arm64 > config: arm64-allnoconfig (https://download.01.org/0day-ci/archive/20230920/202309200727.CtYl75aH-lkp@intel.com/config) > compiler: aarch64-linux-gcc (GCC) 13.2.0 > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230920/202309200727.CtYl75aH-lkp@intel.com/reproduce) > > If you fix the issue in a separate patch/commit (i.e. not just a new version of > the same patch/commit), kindly add following tags > | Reported-by: kernel test robot > | Closes: https://lore.kernel.org/oe-kbuild-all/202309200727.CtYl75aH-lkp@intel.com/ > > All errors (new ones prefixed by >>): > > kernel/cpu.c: In function 'cpuhp_get_primary_thread_mask': > kernel/cpu.c:660:16: error: 'cpu_primary_thread_mask' undeclared (first use in this function); did you mean 'cpuhp_get_primary_thread_mask'? > 660 | return cpu_primary_thread_mask; > | ^~~~~~~~~~~~~~~~~~~~~~~ > | cpuhp_get_primary_thread_mask cpu_primary_thread_mask is used for CONFIG_HOTPLUG_PARALLEL which is not enabled on arm64. Previous it has a dependency for CONFIG_HOTPLUG_SMT but is later decoupled by 7a4dcb4a5de1 ("cpu/hotplug: Remove dependancy against cpu_primary_thread_mask") which is merged after v6.6-rc1. Checked that arm64 branch doesn't contain this commit for now. The patch builds well after v6.6-rc1. > kernel/cpu.c:660:16: note: each undeclared identifier is reported only once for each function it appears in > kernel/cpu.c: In function 'cpuhp_smt_disable': >>> kernel/cpu.c:2629:23: error: implicit declaration of function 'cpu_down_maps_locked' [-Werror=implicit-function-declaration] > 2629 | ret = cpu_down_maps_locked(cpu, CPUHP_OFFLINE); > | ^~~~~~~~~~~~~~~~~~~~ > cc1: some warnings being treated as errors > > > vim +/cpu_down_maps_locked +2629 kernel/cpu.c > > dc8d37ed304eee Arnd Bergmann 2019-12-10 2620 > dc8d37ed304eee Arnd Bergmann 2019-12-10 2621 int cpuhp_smt_disable(enum cpuhp_smt_control ctrlval) > dc8d37ed304eee Arnd Bergmann 2019-12-10 2622 { > dc8d37ed304eee Arnd Bergmann 2019-12-10 2623 int cpu, ret = 0; > dc8d37ed304eee Arnd Bergmann 2019-12-10 2624 > dc8d37ed304eee Arnd Bergmann 2019-12-10 2625 cpu_maps_update_begin(); > dc8d37ed304eee Arnd Bergmann 2019-12-10 2626 for_each_online_cpu(cpu) { > dc8d37ed304eee Arnd Bergmann 2019-12-10 2627 if (topology_is_primary_thread(cpu)) > dc8d37ed304eee Arnd Bergmann 2019-12-10 2628 continue; > dc8d37ed304eee Arnd Bergmann 2019-12-10 @2629 ret = cpu_down_maps_locked(cpu, CPUHP_OFFLINE); > dc8d37ed304eee Arnd Bergmann 2019-12-10 2630 if (ret) > dc8d37ed304eee Arnd Bergmann 2019-12-10 2631 break; > dc8d37ed304eee Arnd Bergmann 2019-12-10 2632 /* > dc8d37ed304eee Arnd Bergmann 2019-12-10 2633 * As this needs to hold the cpu maps lock it's impossible > dc8d37ed304eee Arnd Bergmann 2019-12-10 2634 * to call device_offline() because that ends up calling > dc8d37ed304eee Arnd Bergmann 2019-12-10 2635 * cpu_down() which takes cpu maps lock. cpu maps lock > dc8d37ed304eee Arnd Bergmann 2019-12-10 2636 * needs to be held as this might race against in kernel > dc8d37ed304eee Arnd Bergmann 2019-12-10 2637 * abusers of the hotplug machinery (thermal management). > dc8d37ed304eee Arnd Bergmann 2019-12-10 2638 * > dc8d37ed304eee Arnd Bergmann 2019-12-10 2639 * So nothing would update device:offline state. That would > dc8d37ed304eee Arnd Bergmann 2019-12-10 2640 * leave the sysfs entry stale and prevent onlining after > dc8d37ed304eee Arnd Bergmann 2019-12-10 2641 * smt control has been changed to 'off' again. This is > dc8d37ed304eee Arnd Bergmann 2019-12-10 2642 * called under the sysfs hotplug lock, so it is properly > dc8d37ed304eee Arnd Bergmann 2019-12-10 2643 * serialized against the regular offline usage. > dc8d37ed304eee Arnd Bergmann 2019-12-10 2644 */ > dc8d37ed304eee Arnd Bergmann 2019-12-10 2645 cpuhp_offline_cpu_device(cpu); > dc8d37ed304eee Arnd Bergmann 2019-12-10 2646 } > dc8d37ed304eee Arnd Bergmann 2019-12-10 2647 if (!ret) > dc8d37ed304eee Arnd Bergmann 2019-12-10 2648 cpu_smt_control = ctrlval; > dc8d37ed304eee Arnd Bergmann 2019-12-10 2649 cpu_maps_update_done(); > dc8d37ed304eee Arnd Bergmann 2019-12-10 2650 return ret; > dc8d37ed304eee Arnd Bergmann 2019-12-10 2651 } > dc8d37ed304eee Arnd Bergmann 2019-12-10 2652 >