From patchwork Tue Nov 13 10:19:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Firoz Khan X-Patchwork-Id: 150958 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp4218414ljp; Tue, 13 Nov 2018 02:19:59 -0800 (PST) X-Google-Smtp-Source: AJdET5cBqYg6EkW9KdkhZNyw2tBF56zhITckESs9A5j5w0Ygf4YILALt5xaTLq2NTJmh/hTf4iGB X-Received: by 2002:a17:902:680f:: with SMTP id h15mr4427192plk.40.1542104399298; Tue, 13 Nov 2018 02:19:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542104399; cv=none; d=google.com; s=arc-20160816; b=xQc0rTHGAjZVS4XPpD89QpmVftwOTz04ZqdijnvskPYIafBkutl3x4shepOCZ3Fudr rPWswD9U1qXgkaHTusQXPNINbWp1APdTDX8eYBt1giCdwqFEl9sQRhBtHfPGigz8ZHMS tbgRB+k3FomAKSGXxCbquDD2ZZax/j0j8VPprzQIlX8QEhWaAjv7VAjZFdOWQU7nwehP A71UF8XlHoR2RkBb32jwfB/FNC0qr8ADPNQMM3QIJh8gdnyLL9tbHnUFGjAzu5hdjpqA 5HSnqBqH0uFMDqzyLsQAnp5Re/xqomeI5/USU9sxNdB301UH9rWnO2YPFVME7s7b89ou xGmw== 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=Kc95EnGn+cj3smKpIGHS2dmfSXbmuMZVNB7X3W2m89c=; b=e1C324ETy4aXUimkwuJpKUhgHsnUGwL1Z/AFiJTf1COsIU1lW2EMjKETHxGiQAjtsg dsfxGvqi8lxJOGJE/HH92BTLUFQ0tb+hliHa7Bh6F8v9poiuWYzTK3yJo0xyXh714z1H o2ml4QJ+BfnrpcgHOSasdk4pFZ3FfwPEtHJ9ZifrnkrionO8ZLmKJgMm3K0uMr/hzZzB CriXoJEOb3ZEvQLTyzJHucg5AlCL9MXHP76HHoQ0Eysits6LoGfg8rdwy38EqXwtAnpR WzNWW+kVzprFIVy5DDTU6IT6UEzAgDKSWPd1RWASEajbnBhhVgruHX7dbU/Afq+grqms wnQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aOUFgIiC; 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 59-v6si9909685plb.75.2018.11.13.02.19.58; Tue, 13 Nov 2018 02:19:59 -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; dkim=pass header.i=@linaro.org header.s=google header.b=aOUFgIiC; 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 S1732089AbeKMURW (ORCPT + 32 others); Tue, 13 Nov 2018 15:17:22 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:36750 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731910AbeKMURV (ORCPT ); Tue, 13 Nov 2018 15:17:21 -0500 Received: by mail-pl1-f195.google.com with SMTP id w24-v6so5792810plq.3 for ; Tue, 13 Nov 2018 02:19:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=Kc95EnGn+cj3smKpIGHS2dmfSXbmuMZVNB7X3W2m89c=; b=aOUFgIiCiyA4ojFKzIeq8IuxmVjbpZYJuNvoymgCG1WPzdGw51nBx6khB2Z3H3KE0n 6HvsI0p1LM1ki2GquUWZvaTPYZ622qF8O3vAGYkWTbxjZYul2Ef9aXOgdHO256b+iQ2W Le6G+KTue3NHGgaOMB0JsOzRmHhipzEP9Dixg= 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=Kc95EnGn+cj3smKpIGHS2dmfSXbmuMZVNB7X3W2m89c=; b=NdtVBj95fFrDcFtPPe2gI0ZcnXIOFx2ibm8C7v47s91xo7LbgZmTo1OjPABWDWsUhn Xa+dXLyluwqMPJa4b/Cu2tCbfCypF8j/BfKTpfXbUcPsZfpYoVsCXA6fGworh3QdN1CK os02axkodJus3vGSNLlh59Y6rDRbG3vTP/LINTgdxrEGKlY8MImzMHO0bPrk08bsfKvU wK23wXsx9q6a0BlmsynNgynsG/IPVF6ymKmuReMc6CQfIN/PkFLw3f+0qLnbcnndDSOi z+y1KJZjg18Br+GDcwD95gYdSesQrPfYxJis+AMeS9vRK66fO32zLXLyB0J6KIGJ2O7B PfEQ== X-Gm-Message-State: AGRZ1gLEF8iKNZHbjg0lAfanxA4KKZMBYrPfDgdgRpBqJ9lF+iPMc2GU u5fNkPIDVPwwEL2AXfkyhjIdNw== X-Received: by 2002:a17:902:8a8e:: with SMTP id p14-v6mr4430642plo.133.1542104396370; Tue, 13 Nov 2018 02:19:56 -0800 (PST) Received: from qualcomm-HP-ZBook-14-G2.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com. [103.229.18.19]) by smtp.gmail.com with ESMTPSA id f10-v6sm13363364pfa.188.2018.11.13.02.19.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 13 Nov 2018 02:19:55 -0800 (PST) From: Firoz Khan To: Chris Zankel , Max Filippov , linux-xtensa@linux-xtensa.org, 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] xtensa: system call table generation support Date: Tue, 13 Nov 2018 15:49:27 +0530 Message-Id: <1542104370-22831-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, sh and sparc. 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: - changed from generic-y to generated-y in Kbuild. - removed the patch "0001-xtensa-move-SYS_XTENSA_- macros-to-non-uapi-header.patch". Firoz Khan (3): xtensa: add __NR_syscalls along with __NR_syscall_count xtensa: add system call table generation support xtensa: generate uapi header and syscall table header files arch/xtensa/Makefile | 3 + arch/xtensa/include/asm/Kbuild | 1 + arch/xtensa/include/asm/unistd.h | 2 + arch/xtensa/include/uapi/asm/Kbuild | 1 + arch/xtensa/include/uapi/asm/unistd.h | 781 +----------------------------- arch/xtensa/kernel/syscall.c | 5 +- arch/xtensa/kernel/syscalls/Makefile | 38 ++ arch/xtensa/kernel/syscalls/syscall.tbl | 374 ++++++++++++++ arch/xtensa/kernel/syscalls/syscallhdr.sh | 36 ++ arch/xtensa/kernel/syscalls/syscalltbl.sh | 32 ++ 10 files changed, 492 insertions(+), 781 deletions(-) create mode 100644 arch/xtensa/kernel/syscalls/Makefile create mode 100644 arch/xtensa/kernel/syscalls/syscall.tbl create mode 100644 arch/xtensa/kernel/syscalls/syscallhdr.sh create mode 100644 arch/xtensa/kernel/syscalls/syscalltbl.sh -- 1.9.1