Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752586AbcD1WV5 (ORCPT ); Thu, 28 Apr 2016 18:21:57 -0400 Received: from mail-bn1on0071.outbound.protection.outlook.com ([157.56.110.71]:42960 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752321AbcD1WVy (ORCPT ); Thu, 28 Apr 2016 18:21:54 -0400 Authentication-Results: arndb.de; dkim=none (message not signed) header.d=none;arndb.de; dmarc=none action=none header.from=caviumnetworks.com; Date: Fri, 29 Apr 2016 01:21:37 +0300 From: Yury Norov To: Arnd Bergmann CC: Catalin Marinas , , , , , , , , , , , , , Andrew Pinski , , Andrew Pinski , , , , Subject: Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it Message-ID: <20160428222137.GB18227@yury-N73SV> References: <1459894127-17698-1-git-send-email-ynorov@caviumnetworks.com> <20160426165701.GE8525@e104818-lin.cambridge.arm.com> <20160428191914.GA28527@yury-N73SV> <2760348.qmm1L3yQch@wuerfel> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <2760348.qmm1L3yQch@wuerfel> User-Agent: Mutt/1.5.23 (2014-03-12) X-Originating-IP: [95.143.213.121] X-ClientProxiedBy: HE1PR06CA0064.eurprd06.prod.outlook.com (10.164.28.160) To CY1PR07MB2229.namprd07.prod.outlook.com (10.164.112.143) X-MS-Office365-Filtering-Correlation-Id: 0807caef-bd2a-4157-7796-08d36fb37e8e X-Microsoft-Exchange-Diagnostics: 1;CY1PR07MB2229;2:CM9VYGY6Up+Fdqcu9nT5pJl89AQ3nWPmLkuG480iQBK4o692rP76JnUeI851sjhv3Pa83Q3KSBFFvUJG6QpeZjQplmqqH4WOKVZKzMaD0ExjIPQpVnaSHM8bOwKOqSstB4kKblXrYs3MIqo5YR/hYbvT1VsUwIk7Qv9ERFaOCqxizsl1H6ty7FovVyxtj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TtHOVneE8fGrjjrMipKmQ5ifsMDTpZt4j00msIVidagyquxBXuMCnmxayMIKr0wuCD9C2WpGMd3K6CzRw50GsTbd5WhoBZHFv/y1mRFTHHrTNcQEqtOnoDH0= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(9101521072)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001);SRVR:CY1PR07MB2229;BCL:0;PCL:0;RULEID:;SRVR:CY1PR07MB2229; X-Microsoft-Exchange-Diagnostics: 1;CY1PR07MB2229;4:8iu0IL1VFHNjUyyPxIzOuJxu2n3hyIfQKSCSfHKK1h8WlU/jrKZ8TS1xqiGxAYcVAlgciADg0h821ejYW6h2u6lH/QQKsTyBp75VjtTCF9gs/cvjegGXtbLNatSWunVore9jIPauxwHAeTygt20WLHdZ3Z6K3BGCkmfzdo3YrHrrOk2w+5xEtDP/6zWgCBhCPaNOAMEEMdjs5UY9nC0wIc5vzXzlivEFIX/RNdPfYvBYRSnUlqmpmQ1yF+IB8P1dhaTGaVBE63jqFCLqWZp8INjUgEmTrFgcLv/XX/LQMfUSYUS65h0EMqNbEBWP5VOPxwMwav+dyDcQagTR5zPHRvqdUjnWWSfyD2rsKFtRHE9i9UXr1aMoxogIhMN4UDLohMj84wCjKN4eHV4sDgC4Tg== X-Forefront-PRVS: 0926B0E013 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(6069001)(24454002)(76506005)(9686002)(5004730100002)(93886004)(42186005)(92566002)(50466002)(110136002)(81166005)(1096002)(46406003)(189998001)(4326007)(1076002)(15975445007)(2906002)(50986999)(33716001)(76176999)(77096005)(3846002)(23726003)(6116002)(66066001)(586003)(83506001)(4001350100001)(54356999)(97756001)(2950100001)(19580395003)(5008740100001)(33656002)(47776003);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR07MB2229;H:localhost;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR07MB2229;23:YCLH67nJ8n3gmekb7+M8I9BYeKUjJ844b3xZ/A6lK?= =?us-ascii?Q?1nod8jXYeQ4Cv2mtIY40kzFqCmF/OYgljgzk8OuLbRT8oGaTJJu466HAXrFw?= =?us-ascii?Q?HuhdunEXbU6dtfSRV/5YfXGSLbWL6Mz37J15MyNKvtxN6uX95i6bVfGRZe16?= =?us-ascii?Q?gIbnOWoRHVQs0M9vYzQjpm96XgyWO5pADoYKETTLWZVbb1f4oHMeUNTPaapx?= =?us-ascii?Q?t04vkqTbqCAwqbpEKlAskJmBcqHAnIoT1rpzsNhoY+IoGJxHhVlzX/XK/c7f?= =?us-ascii?Q?0dMYfBPoVHcg49aVMPv42KIXxzPkpOm70g4Lka98G42QCElO0T7AFZ6iroIO?= =?us-ascii?Q?o8xgaAK8Ku9/3OzOS3A1F1z+jCQZEmOs7Lxt9hvA4CNB5HT2b02nl25mkXkM?= =?us-ascii?Q?+F9RXqUOAayfE9J/Yht2Jd97I4/fjc8XLi4EALtU3FINE2zHfC/J1yrb1SUn?= =?us-ascii?Q?DwxCtLsN1JLFuRAoAbrF0nAgXICkjO55zpbWkrKU5claznCoEmwDiJwG9sLK?= =?us-ascii?Q?vbie3N87Vhg1WG7I9g3zC1DO+a5htBT9HwuD3nwTw8E+G5cIHKlbwW+c71FQ?= =?us-ascii?Q?mljDRrXsUKNpl/v4abseLMX0jJCexxNNspOx8RhfUhrOUB2vdXGB8S3/IHmG?= =?us-ascii?Q?jwNN/FWiRynIaVgg8UCNj2vDibGtwGOFMC5qVJMEDw49kbb0QFVFteScS2VG?= =?us-ascii?Q?zC23YZ7bvPwMpklVVEKbtBhCSu2Ak9NKZhmP3OJQ/lhS1J8LafyrAeMco9/D?= =?us-ascii?Q?iFUMqjEle3mfbZTE6dNMbBdSfRAW6c7HTs3aOKK6FECIDtg2h7Vix9gjDj2k?= =?us-ascii?Q?jt3IvsYU2PAK5S6EKlXvJqbNOm7P4yah6vOPEE69hEvBHxJwsHWIDos4s4/R?= =?us-ascii?Q?55rF/nZ+K449AKDfuG6zT0lVkTsx4vRVMthtgOGgvdHphA4kWWmLNjWUe+yK?= =?us-ascii?Q?/UIjFEv92auED9TXbseYRztjxTQnPjTMetvbQdW155Ru+zLCcuNursvPNyp7?= =?us-ascii?Q?tQkpc0aAe5HS9Zbw/yjtKFD?= X-Microsoft-Exchange-Diagnostics: 1;CY1PR07MB2229;5:uQwE76O+gpg+GDD+Fhm/ddlpWbkRTtXYRqkvOfyG9q6JoDEMOMAFHuhWFN4Y9vs8A+UwCOIhNuzrHmXZLi9DtX6pB3PC82sm/A/gaCPW6MaJa/wzScASfrOx4yvOgcQkGa/pwXDZT3FdsTxxKCODeg==;24:OfLgXVcIbHNBL04/9MUXBIuQRaA1zSyIc5lQ4v19AlFzCUQTMja6BcxTL9ARWG8n7yGgorM6z7eSfW7V/giq6D61UiuHjqPHUO7PCa0R+sI=;7:Uf+iIXyq5IBJILBB7JNhwhxX1bmRNrMUA5Y5OTmt5qn00Dm2CGKS5ROJvYQanAiiA9wH03j/YHUpWUkr+WhbBq2ocRUvDJaZHvHuqoyYK5GDZoEs4gpeAs3kdXk7u9WI0aiJ9GQ5zoNkgQbb8e3AnSonWxJ7HHDGVGp0197aaQ8k3vBLgsEk4PKvdptC0fPo SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Apr 2016 22:21:49.7935 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2229 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3033 Lines: 81 On Thu, Apr 28, 2016 at 10:43:59PM +0200, Arnd Bergmann wrote: > On Thursday 28 April 2016 22:19:14 Yury Norov wrote: > > > > Yes, we need. Otherwise we have circular dependency like this: > > arch/arm64/kernel/sys_ilp32.c:60:0: warning: "__SC_WRAP" redefined > > #define __SC_WRAP(nr, sym) [nr] = compat_##sym, > > ^ > > In file included from include/asm-generic/unistd.h:1:0, > > from ./arch/arm64/include/uapi/asm/unistd.h:16, > > from ./arch/arm64/include/asm/unistd.h:62, > > from ./include/uapi/linux/unistd.h:7, > > from include/linux/syscalls.h:23, > > from arch/arm64/kernel/sys_ilp32.c:30: > > include/uapi/asm-generic/unistd.h:33:0: note: this is the location of the previous definition > > #define __SC_WRAP __SYSCALL > > > > Defining __SYSCALL_COMPAT at the top of the file does not help much. > > Hmm, this sounds like something that we should fix in the asm-generic/unistd.h > file. Is it just for __SC_WRAP, or also the other macros? > > Arnd For __SYSCALL and __SC_WRAP: diff --git a/arch/arm64/kernel/sys_ilp32.c b/arch/arm64/kernel/sys_ilp32.c index 1458ad7..410d817 100644 --- a/arch/arm64/kernel/sys_ilp32.c +++ b/arch/arm64/kernel/sys_ilp32.c @@ -17,6 +17,8 @@ * along with this program. If not, see * . */ +#define __SYSCALL_COMPAT + #include #include #include @@ -48,13 +50,12 @@ asmlinkage long ilp32_sys_rt_sigreturn_wrapper(void); #include -#undef __SYSCALL -#undef __SC_COMP -#undef __SC_WRAP -#undef __SC_3264 -#undef __SC_COMP_3264 -#define __SYSCALL_COMPAT #define __SYSCALL(nr, sym) [nr] = sym, #define __SC_WRAP(nr, sym) [nr] = compat_##sym, This patch makes gcc warn about redefinition. arch/arm64/kernel/sys_ilp32.c:59:0: warning: "__SYSCALL" redefined #define __SYSCALL(nr, sym) [nr] = sym, ^ In file included from include/asm-generic/unistd.h:1:0, from ./arch/arm64/include/uapi/asm/unistd.h:16, from ./arch/arm64/include/asm/unistd.h:62, from ./include/uapi/linux/unistd.h:7, from include/linux/syscalls.h:23, from arch/arm64/kernel/sys_ilp32.c:30: include/uapi/asm-generic/unistd.h:15:0: note: this is the location of the previous definition #define __SYSCALL(x, y) ^ arch/arm64/kernel/sys_ilp32.c:60:0: warning: "__SC_WRAP" redefined #define __SC_WRAP(nr, sym) [nr] = compat_##sym, ^ In file included from include/asm-generic/unistd.h:1:0, from ./arch/arm64/include/uapi/asm/unistd.h:16, from ./arch/arm64/include/asm/unistd.h:62, from ./include/uapi/linux/unistd.h:7, from include/linux/syscalls.h:23, from arch/arm64/kernel/sys_ilp32.c:30: include/uapi/asm-generic/unistd.h:33:0: note: this is the location of the previous definition #define __SC_WRAP __SYSCALL ^