public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Li, Aubrey" <aubrey.li@linux.intel.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Aubrey Li <aubrey.li@intel.com>,
	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
Subject: Re: [PATCH v9 2/3] x86,/proc/pid/status: Add AVX-512 usage elapsed time
Date: Tue, 12 Feb 2019 19:51:12 +0800	[thread overview]
Message-ID: <7cf6f2bb-780d-5c0d-ac3f-e88ced3a0404@linux.intel.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1902121215590.3710@nanos.tec.linutronix.de>

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 <asm/processor.h>, which is at the beginning of
array.c file, so it is available before the declaration.

Thanks,
-Aubrey

  reply	other threads:[~2019-02-12 11:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-11 18:59 [PATCH v9 1/3] /proc/pid/status: Add support for architecture specific output Aubrey Li
2019-02-11 18:59 ` [PATCH v9 2/3] x86,/proc/pid/status: Add AVX-512 usage elapsed time Aubrey Li
2019-02-12  8:22   ` Thomas Gleixner
2019-02-12  9:14     ` Li, Aubrey
2019-02-12  9:49       ` Li, Aubrey
2019-02-12 11:27         ` Thomas Gleixner
2019-02-12 11:52           ` Li, Aubrey
2019-02-12 11:19       ` Thomas Gleixner
2019-02-12 11:51         ` Li, Aubrey [this message]
2019-02-12 11:55           ` Thomas Gleixner
2019-02-12 12:02             ` Li, Aubrey
2019-02-11 18:59 ` [PATCH v9 3/3] Documentation/filesystems/proc.txt: add AVX512_elapsed_ms Aubrey Li
2019-02-12  8:05 ` [PATCH v9 1/3] /proc/pid/status: Add support for architecture specific output Thomas Gleixner
2019-02-12  8:15   ` Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7cf6f2bb-780d-5c0d-ac3f-e88ced3a0404@linux.intel.com \
    --to=aubrey.li@linux.intel.com \
    --cc=ak@linux.intel.com \
    --cc=arjan@linux.intel.com \
    --cc=aubrey.li@intel.com \
    --cc=dave.hansen@intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=tim.c.chen@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox