Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3751206imj; Tue, 12 Feb 2019 04:08:06 -0800 (PST) X-Google-Smtp-Source: AHgI3IbR6L5dr/h2FonQ2gjlwFx0SVNS/ONI3aAJp69KJQrxJcR19ntr9jW2/CdCtqHSUsbsGQ60 X-Received: by 2002:a62:2008:: with SMTP id g8mr3595823pfg.121.1549973286656; Tue, 12 Feb 2019 04:08:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549973286; cv=none; d=google.com; s=arc-20160816; b=K4SVBpPqUd6775vqXUcQDkQ8EzFnNHcMS0lcKJIDDvBLK2pc76GIc5Hno1T+wkyNZg 9KbmfjANh0uody0r0+N+ddONK5op01d625UjwNZN6QHN0Z7dmO9iknuhdu46sxVCVAhO uvD5CojUk5KH6eiZEXTVerPuGq39qFzaiIJujKp0eBHt5tU5wFgTIKIGIMT+846kV+ff OAI8ljFVCrhybg+6B5bS13u33yklysyxQ9woVSbWNvj2mCg0yx0U1KWOwcDpnVl5CWLf wq+pcrtHSSpfydqT8qEngTJ/5sSSQpdn82EnExIWtHgfYIRqPwyhH+geYSqI/9wTedz/ datg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=RoJVNr6SFjsGGC8VCl3ELFlKxAPaPD5tMqs6dtzYNa4=; b=Gw1dEQoxeYQbiFwwFnfs0pLqtiT4DRvzyPQowJz5cGjoS2Efghu33FfOEQVjr3iQwb VuYAH0aprMPwtpS8z3i4u4th0MjTm+M3rOjHoYSTZle7yBxgz10wxciSPo1Q0EAwhh3R 79L88IGKjLvqhbc4jhBAdnuy+tbamWz9OyxL5cEbwm9/uGMDPR7mp8qMhRot7v5ZOOOo 7tQW0s9M59VRxe5elco1pbGNvNwv2n2Ox5VFKimMQuQGrk2/Td3KCV3FsvOs7lIwRqEa HO06AMWyRzvZEPWYNQnK2Ufr/FehIQJPTk3rJ1qS3bdj9C42U/ecXUhR4750CiLtPSbG V3IA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g12si12730396plo.144.2019.02.12.04.07.51; Tue, 12 Feb 2019 04:08:06 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728968AbfBLL4M (ORCPT + 99 others); Tue, 12 Feb 2019 06:56:12 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:43129 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725916AbfBLL4L (ORCPT ); Tue, 12 Feb 2019 06:56:11 -0500 Received: from [5.158.153.52] (helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1gtWfQ-0001pO-85; Tue, 12 Feb 2019 12:56:00 +0100 Date: Tue, 12 Feb 2019 12:55:59 +0100 (CET) From: Thomas Gleixner To: "Li, Aubrey" 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 Subject: Re: [PATCH v9 2/3] x86,/proc/pid/status: Add AVX-512 usage elapsed time In-Reply-To: <7cf6f2bb-780d-5c0d-ac3f-e88ced3a0404@linux.intel.com> Message-ID: References: <20190211185931.4386-1-aubrey.li@intel.com> <20190211185931.4386-2-aubrey.li@intel.com> <7cf6f2bb-780d-5c0d-ac3f-e88ced3a0404@linux.intel.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-1191058316-1549972560=:3710" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1191058316-1549972560=:3710 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT 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 , 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 --8323329-1191058316-1549972560=:3710--