Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp965339iob; Fri, 13 May 2022 17:57:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjqqdWmE3gwIDkibB1Pm2hIMuzXF1+W7/3BkGgGq4sMVYSpb/vUfHuQT0SnK3iOWwtR6VP X-Received: by 2002:a5d:4747:0:b0:20a:c40b:1189 with SMTP id o7-20020a5d4747000000b0020ac40b1189mr5722543wrs.509.1652489869102; Fri, 13 May 2022 17:57:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652489869; cv=none; d=google.com; s=arc-20160816; b=CvztkbF8GO7RuSF59zv0r+AMcaWFWvOMQAgBq3S11m9r+wy50+LTMO4TxQwM7Khfaw Ic+is4maCgylOvHIc6b1CCT3EiO8r9X+Pn5OUEy9xzUhiNxkeialFOt+cQq4s1C/uSLD 4JZAWbS7Oh4oo3bkceS269K0HmGwyoAi/NMOa4hU5GUIuPe6e7GBN3NwZgNxIQ3+6Fes tRn1pi9e9kB57cL2WmegkiGjcg7ZgcOIa66+ppeuj50tv9DJTrfj3ecQzhLkptHObrIl rHZDUbvI5qWCEYiqnPskRn5S/kQmy41BCUaC2vWIDsCbtnyT6Xw3SZaVlIpfhm6fsiLd d7Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=5jcKtldk0WOKNaTgVC8yTdE9lAVcyBOlHloXurBqbWM=; b=M93uNFO2Tk1RcpUH0YIBCtT8LgoiqN2aNzJQ+WYzxM8Fu1VS7VDj/3eMtf+CP2az2U VbZdkvFYDFwGUgh77ExeC2ErDVJEBXCXXcRCSkjnSe0oxs6XRsHsgkSwiVJlEo1BA35H G/BLvfwlbtQgpmG2XAMyjIRYuH/QLe01Lh2jr+oGYbugrNxwrLhT0igQq1xVFHMpAyhc A4F6YsqyJv9Sr4epVyIuITHr863ngy/EPtizMnq3cJ6MUWUXs01Sm4aPdzzy3YvMsItn 4i1rwdibowtisYqSYoIoPXvkG7VY8hRW7ZOpN/yMcZlqRRyGpHFsHUkPlAuri0dwGff2 VJ9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="l/KS11Ax"; dkim=neutral (no key) header.i=@linutronix.de header.b=x5X6Awd6; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id m1-20020a5d64a1000000b0020ac34e80e6si4641667wrp.541.2022.05.13.17.57.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 17:57:49 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="l/KS11Ax"; dkim=neutral (no key) header.i=@linutronix.de header.b=x5X6Awd6; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 58A96357FAE; Fri, 13 May 2022 16:32:24 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351983AbiELJY6 (ORCPT + 99 others); Thu, 12 May 2022 05:24:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351966AbiELJYy (ORCPT ); Thu, 12 May 2022 05:24:54 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C61E227B52 for ; Thu, 12 May 2022 02:24:38 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1652347475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5jcKtldk0WOKNaTgVC8yTdE9lAVcyBOlHloXurBqbWM=; b=l/KS11AxDRJwet+ggUp0GCbuN+tUBNaNQbTd4glxlHoxdHMdLlA+CyqjkAMZgUpSJC3cOS 9KD0gl6V00xqIiuzhFGd/KO4ziyiDc/sFqLpepQuwX7pfqogBbBlA5NmQWBUrPWCbrHn0a k8w0MlC5XyPvWSg718Yt15XtCnOPNVnUYhHiwUCBaL5UafQWBn1IN5v+gr7hI3QOeBLzOZ DsqqLPX1G0un2f7N2B8D3ReiFWvBv8NnSJ4OhSz37LGR8iSnZ8JyXLs9L1ilQXbf2mdJLd gT99SQ01BGt1pDnlsPF4FavOjH7vplYHrDMtEG7HKpWe55T0NqJ5VjrnY93Kdw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1652347475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5jcKtldk0WOKNaTgVC8yTdE9lAVcyBOlHloXurBqbWM=; b=x5X6Awd6fY2gyIwuXJMyuzN0Jju7ct7vU2gD0TbrdlAn/YW/8KlHtMnVgTRVYkKTdyW0ki wOedVGw9iz/OFnAw== To: kernel test robot , Peter Zijlstra Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org, Andy Shevchenko , Hans de Goede , linux-kernel@vger.kernel.org, Tony Luck Subject: Re: [pdx86-platform-drivers-x86:review-hans 46/59] kernel/stop_machine.c:638:35: error: call to undeclared function 'cpu_smt_mask'; ISO C99 and later do not support implicit function declarations In-Reply-To: <202205120904.Gr9HEY5E-lkp@intel.com> References: <202205120904.Gr9HEY5E-lkp@intel.com> Date: Thu, 12 May 2022 11:24:35 +0200 Message-ID: <87zgjnw1bg.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 On Thu, May 12 2022 at 09:29, kernel test robot wrote: >>> kernel/stop_machine.c:638:35: error: call to undeclared function 'cpu_smt_mask'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] > const struct cpumask *smt_mask = cpu_smt_mask(cpu); This warning with W=1 is not the worst of the problems. The build will simply fail for CONFIG_SMP=y && CONFIG_SCHED_SMT=n because cpu_smt_mask() cannot be resolved. The other issue is CONFIG_SMP=n. This will fail to build the IFS driver because stop_core_cpuslocked() is not available for SMP=n. Something like the below should work as x86 selects SCHED_SMT when SMP=y. Thanks, tglx --- --- a/include/linux/stop_machine.h +++ b/include/linux/stop_machine.h @@ -156,6 +156,12 @@ static __always_inline int stop_machine_ } static __always_inline int +stop_core_cpuslocked(unsigned int cpu, cpu_stop_fn_t fn, void *data) +{ + return stop_machine_cpuslocked(fn, data, NULL); +} + +static __always_inline int stop_machine(cpu_stop_fn_t fn, void *data, const struct cpumask *cpus) { return stop_machine_cpuslocked(fn, data, cpus); --- a/kernel/stop_machine.c +++ b/kernel/stop_machine.c @@ -631,6 +631,7 @@ int stop_machine(cpu_stop_fn_t fn, void } EXPORT_SYMBOL_GPL(stop_machine); +#ifdef CONFIG_SCHED_SMT int stop_core_cpuslocked(unsigned int cpu, cpu_stop_fn_t fn, void *data) { const struct cpumask *smt_mask = cpu_smt_mask(cpu); @@ -649,6 +650,7 @@ int stop_core_cpuslocked(unsigned int cp return stop_cpus(smt_mask, multi_cpu_stop, &msdata); } EXPORT_SYMBOL_GPL(stop_core_cpuslocked); +#endif /** * stop_machine_from_inactive_cpu - stop_machine() from inactive CPU