Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8751457imu; Tue, 4 Dec 2018 13:35:40 -0800 (PST) X-Google-Smtp-Source: AFSGD/XvL61aelRKf7ioOfV539gZXRPgRfnaJqrC0/6ejQWAyhQB4lySMJ8dSiY2CjCKBRscJI+M X-Received: by 2002:a17:902:720c:: with SMTP id ba12mr21705361plb.79.1543959340405; Tue, 04 Dec 2018 13:35:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543959340; cv=none; d=google.com; s=arc-20160816; b=FZOoqpudV40h8gvld4sgB0CKnDw42Qh0jKUZ2I3oCw6ZD6l89mq6tln+iN3k2ZS1SG t0wjr8qYyVYLQlQOeZ0r6fPv1REHr76nsY92gJO8Ob6YbS0n/7Zu1p+3QFO3miNbwF2t ndK4cPAgqYV8WCpaBCk+TRAQrEct52L1BusPWj10gAmv2+WjyEeFExqRR31sppNDswQJ dKNyLPcEFrK087tPlcXcXOfEv7NEfT5abQGVOohUCrxiMKARshQdfXCtc9Bof41b+171 ZmFRE/nFhZGiiUBzFTRCzi5WrFAEcSdT6ylT3GLEsuuj0OoU6o+GEDd0PYDBqLI7gF31 mEzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=+W0EbAePeEpyft8AGAWdGBucIWf6cgDCPKGR33Rc8cM=; b=cJ9hEsPQNIb4L3zrcl7iHLaXgL8h7S6uXUoN1/rpQKQ9B/MBCm8KwNViWi+Bqb9HXz Ex8s6gFGb3nSPUyGEyg2i5JjzzwQZZXe2aPQiDTh1BFYOhgNO3yThSvDXVZ+M+VFWAsC ePccXkgZBA1OXzCfgVy4leopFyj8F4HYU+SEtTnsSUhPfEIuv9u6CM2CT5odxLn/yUWq AuOVTJBiIvBgJi5ZbSSjtiN6vstM7GM7EqkMQoUhNeBwEt4I10vPBrtgfzjMbfGq/hMn 03nlf2nXX0gFGoIL3qLUWI3cZsM5ugDWUmRW8/bjt3cZCt1JekBZRwTX/Wy7JAcssl1/ 5kpQ== 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 f16si17361261pgb.140.2018.12.04.13.35.25; Tue, 04 Dec 2018 13:35:40 -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 S1726311AbeLDVdd (ORCPT + 99 others); Tue, 4 Dec 2018 16:33:33 -0500 Received: from mail-qt1-f196.google.com ([209.85.160.196]:38554 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725875AbeLDVdc (ORCPT ); Tue, 4 Dec 2018 16:33:32 -0500 Received: by mail-qt1-f196.google.com with SMTP id p17so19918386qtl.5; Tue, 04 Dec 2018 13:33:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+W0EbAePeEpyft8AGAWdGBucIWf6cgDCPKGR33Rc8cM=; b=X3doC94HHPH3DUvET+75C515PPlOsISb60pbF9jecpc2wnsiGrDmKMLhSC4AhkrtAe Pw5uxfGxDyKSBxNGUT+cdQV1XYkCCiN1TVKcD1z9lSDBkcCW8gb8f0PVych2C74PTVGz JWkuFva/IOftXctCEcKq4Y5dd674esybyyG5VxBhQfrgufsTTjxdVbBN/Muioi2ld61R 1I4AexAcmTNn2su/RxIzZJISSEpHkDn/GVYHCAU4M05Ln0ov6l5dbImQ0HJKjXydyW46 f8qOlzfCK8HE4+Rw4/AlrsssZOIAUTpjDjdhQHHG5vNI1qaXqjC1CpVS0UxnjDL3Op5e mosg== X-Gm-Message-State: AA+aEWZ466RAoxIWX+8sncNGvX21rXX0np8gbsYv+RIj8Ra6vO5l//Mr C+LBWEoyxxW1TXEiLnFJoJreJ7baczYxeTFJ0Ug= X-Received: by 2002:aed:35c5:: with SMTP id d5mr20936968qte.212.1543959210210; Tue, 04 Dec 2018 13:33:30 -0800 (PST) MIME-Version: 1.0 References: <1543465611-17122-1-git-send-email-firoz.khan@linaro.org> <1543465611-17122-5-git-send-email-firoz.khan@linaro.org> In-Reply-To: From: Arnd Bergmann Date: Tue, 4 Dec 2018 22:33:13 +0100 Message-ID: Subject: Re: [PATCH v3 4/4] powerpc: generate uapi header and system call table files To: Firoz Khan Cc: linuxppc-dev , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Geert Uytterhoeven , linuxram@us.ibm.com, Mathieu Desnoyers , leitao@debian.org, Boqun Feng , gregkh , Philippe Ombredanne , Thomas Gleixner , Kate Stewart , y2038 Mailman List , Linux Kernel Mailing List , linux-arch , Deepa Dinamani , Marcin Juszkiewicz Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 4, 2018 at 10:17 PM Arnd Bergmann wrote: > > > diff --git a/arch/powerpc/kernel/systbl.S b/arch/powerpc/kernel/systbl.S > > index 9ff1913..d756348 100644 > > --- a/arch/powerpc/kernel/systbl.S > > +++ b/arch/powerpc/kernel/systbl.S > > > #ifdef CONFIG_PPC64 > > @@ -47,5 +25,17 @@ > > .globl sys_call_table > > sys_call_table: > > > > +#if defined CONFIG_PPC64 && defined(CONFIG_COMPAT) > > +#define __SYSCALL(nr, entry, nargs) .8byte entry > > #define compat_sys_sigsuspend sys_sigsuspend > > -#include > > +#include > > +#undef __SYSCALL > > +#elif defined CONFIG_PPC64 && !defined(CONFIG_COMPAT) > > +#define __SYSCALL(nr, entry, nargs) .8byte entry > > +#include > > +#undef __SYSCALL > > This part looks wrong: where the old sys_call_table contained > both the native and compat calls side by side, the new table > contains only the compat versions (note that CONFIG_COMPAT is > always set on PPC64). I think you copy-pasted this incorrectly from > one of the other architectures that uses a different layout for the > compat calls. > > The way I think this could work best is if you add a preparation > patch that splits out the 64-bit table into two separate ones > (and make sure that works). After that, you can add your > existing patch, rebased to use the two generated tables > instead of the old-style tables. I'll follow up with an untested > patch for illustration. One more thing I noticed while writing up that patch: you also need to use the DOTSYM() macro in __SYSCALL() to generate the correct symbol name for the old ELF ABI (when PPC64_ELF_ABI_v2 is not set). Arnd