From patchwork Thu Apr 28 22:21:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 8975801 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A04A89F1C1 for ; Thu, 28 Apr 2016 22:23:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B5B0F201C0 for ; Thu, 28 Apr 2016 22:23:39 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C77CE2015A for ; Thu, 28 Apr 2016 22:23:38 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1avuK8-0005Dh-TT; Thu, 28 Apr 2016 22:22:16 +0000 Received: from mail-bn1on0087.outbound.protection.outlook.com ([157.56.110.87] helo=na01-bn1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1avuK4-0005C3-Vp for linux-arm-kernel@lists.infradead.org; Thu, 28 Apr 2016 22:22:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-caviumnetworks-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=LK2u4lu7wfIlGzroBAulJwwjTxgHzHNggntHeSG/Ce8=; b=0TEMOZyKhgWIXgXcAH9K3LhQablR9V7H+34GiVtASj/CUVOuvw6fW7ZdvBhbRcm8aHLShlt9I69CJ7CAbjunOSj/+YUniQgoihnbkJhzxQBxc157ut+hCKVveJKmDvsVIr4OHFMGHDS1Q9zNz3uTsCbmHYgVxoJz5aG5WlM/A5s= Authentication-Results: arndb.de; dkim=none (message not signed) header.d=none;arndb.de; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost (95.143.213.121) by CY1PR07MB2229.namprd07.prod.outlook.com (10.164.112.143) with Microsoft SMTP Server (TLS) id 15.1.477.8; Thu, 28 Apr 2016 22:21:49 +0000 Date: Fri, 29 Apr 2016 01:21:37 +0300 From: Yury Norov To: Arnd Bergmann 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-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/hYbvT1VsUwIk7Qv9ERFaOCqxizsl1H6ty7FovVyxtjol+; 3:DA+6GHHtnNVfBaUpNlMobFBzGXCMIkw1Ob1Ys5MBGtcthUBiKy17Hu7b4wCBb9BHgEE8qnuKqW1Zz6LOkdVsdvimKvUrM+SDwSiqJChXv1JzugknZnCrjBkLm4yB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am-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?1nod8jXYeQ4Cv2mtIY40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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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160428_152213_352928_6F4C5137 X-CRM114-Status: GOOD ( 11.58 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, pinskia@gmail.com, Prasun.Kapoor@caviumnetworks.com, Catalin Marinas , joseph@codesourcery.com, linux-doc@vger.kernel.org, heiko.carstens@de.ibm.com, linux-kernel@vger.kernel.org, agraf@suse.de, klimov.linux@gmail.com, Andrew Pinski , broonie@kernel.org, bamvor.zhangjian@huawei.com, Andrew Pinski , schwab@suse.de, schwidefsky@de.ibm.com, Nathan_Lynch@mentor.com, linux-arm-kernel@lists.infradead.org, christoph.muellner@theobroma-systems.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.1 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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: #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 ^ 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