From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932578AbcINKqp (ORCPT ); Wed, 14 Sep 2016 06:46:45 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:44032 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1760751AbcINKqn (ORCPT ); Wed, 14 Sep 2016 06:46:43 -0400 X-IBM-Helo: d28dlp03.in.ibm.com X-IBM-MailFrom: naveen.n.rao@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org Date: Wed, 14 Sep 2016 16:16:29 +0530 From: "Naveen N. Rao" To: "Wangnan (F)" Cc: Arnaldo Carvalho de Melo , linux-kernel@vger.kernel.org, lizefan@huawei.com, pi3orama@163.com Subject: Re: [PATCH 1/3] tools include: Add uapi mman.h for each architecture References: <1473684871-209320-1-git-send-email-wangnan0@huawei.com> <1473684871-209320-2-git-send-email-wangnan0@huawei.com> <20160912190742.GG4897@kernel.org> <20160912211520.GA10582@kernel.org> <20160914092810.GA21691@naverao1-tp.localdomain> <57D91A36.5060505@huawei.com> <20160914100018.GB21691@naverao1-tp.localdomain> <57D92524.6050704@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <57D92524.6050704@huawei.com> User-Agent: Mutt/1.6.2 (2016-07-01) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16091410-0016-0000-0000-00000326EBF5 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16091410-0017-0000-0000-0000264289D1 Message-Id: <20160914104629.GC21691@naverao1-tp.localdomain> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-09-14_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609020000 definitions=main-1609140147 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016/09/14 06:23PM, Wang Nan wrote: > > > On 2016/9/14 18:00, Naveen N. Rao wrote: > > On 2016/09/14 05:36PM, Wang Nan wrote: > > > > > > On 2016/9/14 17:28, Naveen N. Rao wrote: > > > > On 2016/09/12 06:15PM, Arnaldo Carvalho de Melo wrote: > > > > > Em Mon, Sep 12, 2016 at 04:07:42PM -0300, Arnaldo Carvalho de Melo escreveu: > > > > > > Em Mon, Sep 12, 2016 at 12:54:29PM +0000, Wang Nan escreveu: > > > > > > > Some mmap related macros have different values for different > > > > > > > architectures. This patch introduces uapi mman.h for each > > > > > > > architectures. > > > > > > > > > > > > > > Three headers are cloned from kernel include to tools/include: > > > > > > > > > > > > > > tools/include/uapi/asm-generic/mman-common.h > > > > > > > tools/include/uapi/asm-generic/mman.h > > > > > > > tools/include/uapi/linux/mman.h > > > > > > Cool, the above was done as copies, why not the rest? IIRC you mentioned > > > > > > some reasoning behind that decision, but we need it spelled out here. > > > > > > > > > > > > For instance, I went on and look at arch/xtensa/include/uapi/asm/mman.h, > > > > > > and couldn't find why we shouldn't copy it just like the three files > > > > > > above. > > > > > > > > > > > > I'm looking now at why the build breaks in so many systems, first hunch > > > > > > is that bits/ part (the ones without the failure details probably have > > > > > > the same errors), alpine uses musl libc, but some that broke are glibc > > > > > > based. > > > > > So, please take a look at my perf/core branch, I applied 1/3 and 3/3, > > > > > but took a different path for 2/3, now it builds for all systems I have > > > > > containers for: > > > > This still fails for me on ppc64. Perhaps we should guard > > > > P_MMAP_FLAG(32BIT) and potentially others with a #ifdef, which was > > > > earlier reverted by commit 256763b0 ("perf trace beauty mmap: Add more > > > > conditional defines")? > > > Perhaps we should set all non-exist flag to 0 in each uapi mman.h? > > Will that work for MADV_* since the macro there is for a case statement? > > Then fall back to include/uapi/asm-generic/mman-common.h. And I mman-common.h is already included on powerpc: # cat tools/arch/powerpc/include/uapi/asm/mman.h #ifndef TOOLS_ARCH_POWERPC_UAPI_ASM_MMAN_FIX_H #define TOOLS_ARCH_POWERPC_UAPI_ASM_MMAN_FIX_H #define MAP_DENYWRITE 0x0800 #define MAP_EXECUTABLE 0x1000 #define MAP_GROWSDOWN 0x0100 #define MAP_HUGETLB 0x40000 #define MAP_LOCKED 0x80 #define MAP_NONBLOCK 0x10000 #define MAP_NORESERVE 0x40 #define MAP_POPULATE 0x8000 #define MAP_STACK 0x20000 #include #endif > realized the missing of MADV_FEEE in tools/perf/trace/beauty/mmap.c. > Is that intentionally? Not sure, Arnaldo should know. Thanks, Naveen