[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1902121254340.3710@nanos.tec.linutronix.de>
Date: Tue, 12 Feb 2019 12:55:59 +0100 (CET)
From: Thomas Gleixner <tglx@...utronix.de>
To: "Li, Aubrey" <aubrey.li@...ux.intel.com>
cc: Aubrey Li <aubrey.li@...el.com>, mingo@...hat.com,
peterz@...radead.org, hpa@...or.com, ak@...ux.intel.com,
tim.c.chen@...ux.intel.com, dave.hansen@...el.com,
arjan@...ux.intel.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v9 2/3] x86,/proc/pid/status: Add AVX-512 usage elapsed
time
On Tue, 12 Feb 2019, Li, Aubrey wrote:
> 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.
1) Each patch has to be correct stand alone
2) This file is compiled for every architecture the kernel supports and how
many of them are including arch/x86/include/asm/processor.h ?
There is a world outside x86 and it's rather large.
Thanks,
tglx
Powered by blists - more mailing lists