From patchwork Thu Nov 1 13:48:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Firoz Khan X-Patchwork-Id: 149957 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp816282ljp; Thu, 1 Nov 2018 06:49:23 -0700 (PDT) X-Google-Smtp-Source: AJdET5ekPBBHpBBaIr5ii8aJUS7YlrJr1xavSz7RkZLFfrO06IzkGXFx8GKqVXRP9uFQ6tA4Ybqr X-Received: by 2002:a62:6d04:: with SMTP id i4-v6mr7708639pfc.131.1541080162964; Thu, 01 Nov 2018 06:49:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541080162; cv=none; d=google.com; s=arc-20160816; b=sTK7JomXYLVJwsewR0N+AU+nKagQM/kdR/MzdCkZW3Cg4463V4eDPggrcz+pyb5Csc wXYsdbWkXbnfHLmitBaIe1ez6aRi2Ru47uN4ggusHCEbIyuc3rNj2iU2Nybn2N0lf1Cy cYyU2xT/JGx0gfRvZRwFj8+XGCKp1o95q+W7z8my6+phEL8PjPekGxMpW5/hnubpBKGB vfdDdbcycZeMFqePo82ejQNPbIUmaxBMBQKUBiHBHoAMK4SthE9h+IeggzsMdqgGcOeW eIlnv+6ggncf0IHyW7E7SvQFA0Eogk9BBTN6at0BgH9sHgOPRRKmSX4MiGLGqs8TtkJ9 dQjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=0/DkeLc7nl3D46WQ/mIxq/tnicHL4jpoWGn/tbxZ0d0=; b=hvxxRg2o1a2EaZ0hLQITteofd0KxQy3BquqV/3BVUSxrotLyLYGA6m7/Ub3BslRg4A akK67cpd7WrYd317B055lBv8yqHeeKx0mvTYrO1bbrDZbZIYdWCslqRERzYxl64hfoQQ Rcz1V/mex2r4P8jclwxVms6VYXluYxpVAa8FwSS6IX+/Tj2r5SFrAsTqI5FF/3x+7Bg1 0BI/QOxeYGRl0vgCcP3BGCAJLWmf3dl/4M52ih9AaDDTn9j3ZBFEMtL8yu/ezfShbZwc /ayCfDgnoYq/c2CiWLELnWK0zjnK658E2kY3wjorS39PgBb8zSq+PkZkPLK4G5fVXdvD p9Qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Udk5S74J; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p4-v6si28834249plk.263.2018.11.01.06.49.22; Thu, 01 Nov 2018 06:49:22 -0700 (PDT) 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; dkim=pass header.i=@linaro.org header.s=google header.b=Udk5S74J; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728684AbeKAWwW (ORCPT + 32 others); Thu, 1 Nov 2018 18:52:22 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:38465 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728449AbeKAWwW (ORCPT ); Thu, 1 Nov 2018 18:52:22 -0400 Received: by mail-pg1-f194.google.com with SMTP id f8-v6so9066302pgq.5 for ; Thu, 01 Nov 2018 06:49:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=0/DkeLc7nl3D46WQ/mIxq/tnicHL4jpoWGn/tbxZ0d0=; b=Udk5S74J6wU22Aw6yHcj6/KL9/5K+b0/3NHPl5C+LeV8lnQ8atdyPrlurPwg7Adqhm uX+z045OdxSfluoho08iLPnWcBIuQ4hXYVUUQtcgnjs+3yyNRz0NqU8Sb1Cq67HJcZq3 P+TJD8XQtbtUYZeytNwOmT8hRq+Ni9m+xmyBo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=0/DkeLc7nl3D46WQ/mIxq/tnicHL4jpoWGn/tbxZ0d0=; b=COnkoDK26A/moHc9RW3MHivZ+Ed4VvcMxA3Plzi9WPhOkjHxqRIkC+67Ref9m9F0pe rP2hg33bM4HDBOR5u4f3JNdsdgOCAOtuIzSq8KvQL/Jqe1xcZ1P7rWnj5PLloPf0sY4d IMmq4oXJn/MAIxPGzV9phYfnnfXSuBzqC9RN5dLLY1+70DSw0dJTACpKcJpu59QdQ89/ ANZlFZkY5oRpJFvN3t21hmAyUDx83UEnGWTVyn/d56bCDD/s6eOmGsr4llwGPE3m2xGu xAMF2rI5PxgWs3YbV/UARicoIuGQdBSjdP35vSBwo0yzm30ErgeN/ePPWMJxoIbfBxpj OzJQ== X-Gm-Message-State: AGRZ1gJUIGiIqbH3VzUqkt6omniBspipDuzDuy7zCReyQQ7Z9tqV/nUz OanhPolcL0/Zi4Y4AVIISbLXrk0F+BE= X-Received: by 2002:aa7:80cd:: with SMTP id a13-v6mr7740302pfn.86.1541080158924; Thu, 01 Nov 2018 06:49:18 -0700 (PDT) Received: from qualcomm-HP-ZBook-14-G2.domain.name ([106.51.104.211]) by smtp.gmail.com with ESMTPSA id p11-v6sm16567307pfn.53.2018.11.01.06.49.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 01 Nov 2018 06:49:18 -0700 (PDT) From: Firoz Khan To: linux-sh@vger.kernel.org, Yoshinori Sato , Rich Felker , Greg Kroah-Hartman , Philippe Ombredanne , Thomas Gleixner , Kate Stewart Cc: y2038@lists.linaro.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, arnd@arndb.de, deepa.kernel@gmail.com, marcin.juszkiewicz@linaro.org, firoz.khan@linaro.org Subject: [PATCH v2 0/3] sh: system call table generation support Date: Thu, 1 Nov 2018 19:18:47 +0530 Message-Id: <1541080130-3678-1-git-send-email-firoz.khan@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The purpose of this patch series is, we can easily add/modify/delete system call table support by cha- nging entry in syscall.tbl file instead of manually changing many files. The other goal is to unify the system call table generation support implementation across all the architectures. The system call tables are in different format in all architecture. It will be difficult to manually add, modify or delete the system calls in the resp- ective files manually. To make it easy by keeping a script and which'll generate uapi header file and syscall table file. syscall.tbl contains the list of available system calls along with system call number and correspond- ing entry point. Add a new system call in this arch- itecture will be possible by adding new entry in the syscall.tbl file. Adding a new table entry consisting of: - System call number. - ABI. - System call name. - Entry point name. ARM, s390 and x86 architecuture does exist the sim- ilar support. I leverage their implementation to come up with a generic solution. I have done the same support for work for alpha, ia64, m68k, microblaze, mips, parisc, powerpc, sparc, and xtensa. Below mentioned git repository contains more details about the workflow. https://github.com/frzkhn/system_call_table_generator/ Finally, this is the ground work to solve the Y2038 issue. We need to add two dozen of system calls to solve Y2038 issue. So this patch series will help to add new system calls easily by adding new entry in the syscall.tbl. Changes since v1: - optimized/updated the syscall table generation scripts. - fixed all mixed indentation issues in syscall.tbl. - added "comments" in syscall.tbl. Firoz Khan (3): sh: add __NR_syscalls along with NR_syscalls sh: add system call table generation support sh: generate uapi header and syscall table header files arch/sh/Makefile | 3 + arch/sh/include/asm/Kbuild | 1 + arch/sh/include/asm/unistd.h | 2 + arch/sh/include/uapi/asm/Kbuild | 1 + arch/sh/include/uapi/asm/unistd_32.h | 4 +- arch/sh/include/uapi/asm/unistd_64.h | 4 +- arch/sh/kernel/syscalls/Makefile | 38 ++++ arch/sh/kernel/syscalls/syscall.tbl | 392 ++++++++++++++++++++++++++++++++++ arch/sh/kernel/syscalls/syscallhdr.sh | 36 ++++ arch/sh/kernel/syscalls/syscalltbl.sh | 32 +++ arch/sh/kernel/syscalls_32.S | 387 +-------------------------------- 11 files changed, 514 insertions(+), 386 deletions(-) create mode 100644 arch/sh/kernel/syscalls/Makefile create mode 100644 arch/sh/kernel/syscalls/syscall.tbl create mode 100644 arch/sh/kernel/syscalls/syscallhdr.sh create mode 100644 arch/sh/kernel/syscalls/syscalltbl.sh -- 1.9.1