Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3746993imj; Tue, 12 Feb 2019 04:04:19 -0800 (PST) X-Google-Smtp-Source: AHgI3IZZ7WAOUNcR30w+q3PCZF7NCyRuXtms3f2a/vESK4n7skr5Q0iYzkdyPu2f6e/63NivtF3H X-Received: by 2002:a62:2f06:: with SMTP id v6mr3708348pfv.216.1549973059017; Tue, 12 Feb 2019 04:04:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549973059; cv=none; d=google.com; s=arc-20160816; b=VqwbYfgD8Be+rvhy+G//Irc5SK9gtuK9pDIPrZcdaIr5+6xgnobcNlgorpKzJWToWa gNn6VT8DP8FVh8Cre2tzDJ2WjLBZcDlE1fnhzDNRHXh72X5HWhouzHVq5ymQI8ftKZE9 KsWtLjOUfdmDcYPkrv4bZ/tLH9FfB6FHs2Ghl7GbEu1MqykT2CUFjyw2eCF+l7N2KMzv SQPLlEbREhVSRi+DBwDMx6ocXY5MSczJq71dpr+OAKZ1cSxysbmPFzCEIOW7RdHokdKI QFk8fi2nflj1bkW5r6Zr/tHTQ74M4JT1mspQMytjDAITUMIGmrns8ou5MHDiLQF9z/gV 6OJA== 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=/d5ZDnJFmgFmKzDutsi/t6CRY2uDwHUkEOvyOCgRvEk=; b=s/uX91LZ5A+iPdvAebkyjxSTNf4vFHcdSTZ75dsGRvMkEILr9eSNVtKiageyH/MZR3 YL57umvHIJFxWXC743ZwIYHEfDW7i6bQkAWSAkmqdnNjTIItFTybpWAR2iyhSdLLNdMn OYPh7oTVBfJ7SIGSmvH88mLt9ZSALEXCMOjvL1jswR1pVeXio/J3FRqz1gJTlRGu1UUk r7roGXdNO14L7Inc4aIXbFbzg2rfm59xdWiGBVNMepAb6yhW2mXr0d9SHCEeTw3Bol3t PTelN48njIymthuX6ELNZ4nugLySR1tC4FarM6E4Nnak0CDmfo+EECGDiWw5LL69NYW8 TV2g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n1si544148pgh.172.2019.02.12.04.04.00; Tue, 12 Feb 2019 04:04:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728642AbfBLLvS (ORCPT + 99 others); Tue, 12 Feb 2019 06:51:18 -0500 Received: from mga18.intel.com ([134.134.136.126]:57834 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725916AbfBLLvQ (ORCPT ); Tue, 12 Feb 2019 06:51:16 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Feb 2019 03:51:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,361,1544515200"; d="scan'208";a="125825831" Received: from cli6-desk1.ccr.corp.intel.com (HELO [10.239.161.118]) ([10.239.161.118]) by orsmga003.jf.intel.com with ESMTP; 12 Feb 2019 03:51:12 -0800 Subject: Re: [PATCH v9 2/3] x86,/proc/pid/status: Add AVX-512 usage elapsed time To: Thomas Gleixner Cc: Aubrey Li , mingo@redhat.com, peterz@infradead.org, hpa@zytor.com, ak@linux.intel.com, tim.c.chen@linux.intel.com, dave.hansen@intel.com, arjan@linux.intel.com, linux-kernel@vger.kernel.org References: <20190211185931.4386-1-aubrey.li@intel.com> <20190211185931.4386-2-aubrey.li@intel.com> From: "Li, Aubrey" Message-ID: <7cf6f2bb-780d-5c0d-ac3f-e88ced3a0404@linux.intel.com> Date: Tue, 12 Feb 2019 19:51:12 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/2/12 19:19, Thomas Gleixner wrote: > On Tue, 12 Feb 2019, Li, Aubrey wrote: >> On 2019/2/12 16:22, Thomas Gleixner wrote: >>> On Tue, 12 Feb 2019, Aubrey Li wrote: >>>> diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h >>>> index d53c54b842da..60ee932070fe 100644 >>>> --- a/arch/x86/include/asm/processor.h >>>> +++ b/arch/x86/include/asm/processor.h >>>> @@ -996,5 +996,7 @@ enum l1tf_mitigations { >>>> }; >>>> >>>> extern enum l1tf_mitigations l1tf_mitigation; >>>> +/* Add support for architecture specific output in /proc/pid/status */ >>>> +extern void arch_proc_pid_status(struct seq_file *m, struct task_struct *task); >>> >>> Sigh. This is absolutely the wrong place. The weak function is declared and >>> used in fs/proc/... So the prototype wants to be in a header which is >>> included from there independent of x86... >> >> Can the prototype be in the architecture header if they want to call the >> function? > > Basic C programming course: > > The prototype must be available before the declaration of the global > function. > > fs/proc/array.c:404:13: warning: no previous prototype for ‘arch_proc_pid_status’ [-Wmissing-prototypes] > void __weak arch_proc_pid_status(struct seq_file *m, struct task_struct *task) > > Oh well.... Is this because patch 1/3 applied alone? If the whole patch set are applied, the prototype is included in , which is at the beginning of array.c file, so it is available before the declaration. Thanks, -Aubrey