Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp952204ybz; Wed, 15 Apr 2020 23:18:03 -0700 (PDT) X-Google-Smtp-Source: APiQypI9cc9xJaAfF76RydhOtAEDWNbpTN+hm9dWgSw//8keW7MaJPvaj1BngWC0PThbFhGv54VC X-Received: by 2002:a50:af85:: with SMTP id h5mr28834708edd.300.1587017882841; Wed, 15 Apr 2020 23:18:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587017882; cv=none; d=google.com; s=arc-20160816; b=kqAdhARY3cJDhPIe9L1smMQozUSj94PtkFqWJH5d0b+QKUrZ4BMwwoM42hOGqSy8sO VPFpfaz375LQYTwFwRtjYICuGvAsPgZNB4c/2EH1eskA6xAkmU4cS5yFgUuDGUSgHXmT BLGK/5CcTo13yZkST9Y4k7X2zm++YYrTDiqUJKwfB2koODgIzgJuOCpUaPFxOwu0VOP0 9uw7Lx0dPPO68H7psf/nPLdxgEnCti97566metOBhgaAFzz4gXimWqbHSfpUcNdjeqwr k84BHMSZYSVz3FrUu3RA43fS3pe+kbwhtWsD1IOqwonKcujYKWG1N9pAgnEqDgC+QE+Y 967g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=ToPitnd5ve1QrZfN2B7wbZcp4z4+Jx5KGO2wREvlT9A=; b=mQ1F0RCmhfH2T7CAKtP6xVMCsUV8cDu594Vu5gVeSHVWl3DXSnoVG1z2b4MQNYPT1+ uwHZbEIp6boFD50Qg1wg0Qh0RA20XvrK2d0NpNHjoZXbpxBGDEi4Q5696ESrEPZ3yTh3 l0EIumWE9XxXs6uQMljEbLu6URwreiasR2SrAnFGvp/CoqSuvXo8PUm6K9/YVtZFTMGL tKvZV9StrVcqpujv5hvKJST/0aL3aDO1i3+xeDCt29XymzelkWFoQF3k3Cjsgvni8VU1 /uinyPChhVveQ62IjUWebYWHI+qN3l/cvDPkagBMDcLaZfrr0SvdfKsjxFV8fPRS1HPh N9Xg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g6si11256624edp.283.2020.04.15.23.17.38; Wed, 15 Apr 2020 23:18:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407554AbgDPGQg (ORCPT + 99 others); Thu, 16 Apr 2020 02:16:36 -0400 Received: from ZXSHCAS1.zhaoxin.com ([203.148.12.81]:34439 "EHLO ZXSHCAS1.zhaoxin.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2407264AbgDPGQ0 (ORCPT ); Thu, 16 Apr 2020 02:16:26 -0400 Received: from zxbjmbx2.zhaoxin.com (10.29.252.164) by ZXSHCAS1.zhaoxin.com (10.28.252.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1261.35; Thu, 16 Apr 2020 14:16:15 +0800 Received: from [10.28.64.103] (10.28.64.103) by zxbjmbx2.zhaoxin.com (10.29.252.164) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1261.35; Thu, 16 Apr 2020 14:16:13 +0800 Subject: Re: [PATCH] x86/perf: Add hardware performance events support for Zhaoxin CPU. To: Borislav Petkov CC: , , , , , , , , , , , , References: <1586747669-4827-1-git-send-email-CodyYao-oc@zhaoxin.com> <20200415093635.GD31016@zn.tnic> From: CodyYao-oc Message-ID: Date: Thu, 16 Apr 2020 14:16:32 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200415093635.GD31016@zn.tnic> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.28.64.103] X-ClientProxiedBy: ZXSHCAS1.zhaoxin.com (10.28.252.161) To zxbjmbx2.zhaoxin.com (10.29.252.164) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/4/15 下午5:36, Borislav Petkov wrote: > On Mon, Apr 13, 2020 at 11:14:29AM +0800, CodyYao-oc wrote: >> Zhaoxin CPU has provided facilities for monitoring performance >> via PMU(Performance Monitor Unit), but the functionality is unused so far. >> Therefore, add support for zhaoxin pmu to make performance related >> hardware events available. >> >> Signed-off-by: CodyYao-oc >> Reported-by: kbuild test robot > > What exactly did the 0day bot report? > > Put that in [] > > above the Reported-by line pls. > Dear Boris, It's a warning message about uninitialized variable, paste the log below, sorry for missing it. Furthermore, it will disappear on next version patch because of the code changes, anyway I'll paste it when resend next version patch. [All warnings (new ones prefixed by >>): >> arch/x86/events/zhaoxin/core.c:362:6: warning: variable 'is_zxc' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] if (boot_cpu_data.x86 == 0x06 && ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/x86/events/zhaoxin/core.c:369:6: note: uninitialized use occurs here if (is_zxc) ^~~~~~ arch/x86/events/zhaoxin/core.c:362:2: note: remove the 'if' if its condition is always true if (boot_cpu_data.x86 == 0x06 && ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> arch/x86/events/zhaoxin/core.c:362:6: warning: variable 'is_zxc' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized] if (boot_cpu_data.x86 == 0x06 && ^~~~~~~~~~~~~~~~~~~~~~~~~ arch/x86/events/zhaoxin/core.c:369:6: note: uninitialized use occurs here if (is_zxc) ^~~~~~ arch/x86/events/zhaoxin/core.c:362:6: note: remove the '&&' if its condition is always true if (boot_cpu_data.x86 == 0x06 && ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/x86/events/zhaoxin/core.c:352:13: note: initialize the variable 'is_zxc' to silence this warning bool is_zxc; ^ = 0 2 warnings generated.] Reported-by:kbuild test robot Thanks Cody