From patchwork Thu Nov 1 13:56:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Firoz Khan X-Patchwork-Id: 149966 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp823458ljp; Thu, 1 Nov 2018 06:56:53 -0700 (PDT) X-Google-Smtp-Source: AJdET5dOk+w5/+594MphresaIWA4FTF+jbWxGvsEls4xYj1t+kzwthi8STo7zETqEA3e2vXgTUwz X-Received: by 2002:a62:3911:: with SMTP id g17-v6mr8211358pfa.170.1541080613208; Thu, 01 Nov 2018 06:56:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541080613; cv=none; d=google.com; s=arc-20160816; b=xvgcjXE7X09es2Bwj0mdfy7g3J8WHjnMzZlGukg0xgKgOErnoJQzPIQvld2Ji5uheu mGUGKDkyBZp4TXZLiQFsTfxaxanf5RnvYQz9KrLC50adpzYQQQwemoxJIYhkLqJV/u4z dUlZf/b/Hg2CQUNcokWhYmCKPeVK8+w++9l751GhYUIQBLm9thvDtOdMGOS/UUyV3f+6 6Q9sr1PRHFmYkYPmwzyuoWiUyPA03t8I8k7A0THe1ykYt3zE+Ggy1yjzcMlyqjS5HREN aEuTOkN9812pbo/0W0aU2mZdG4FDYtN4HVeBLI/rnmlC8TiUAqAKjMq1e2ArjM4Mv8am Xf9Q== 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=qj0H6KSKOBtfKDabJ0HskYVa1VvjJFP6J9GaMlrOBZ4=; b=DPeKI/3Mp6L4bKstEM1moIOrTMqVt1d1auUngCEhWgZ8RvsUXVuO0DwuiMlpdrN/8F Fj3iWsWvtUafyjUl2jHkGCg09cD0mYWo/7C3xPXJgTBsDu7CXRR2YJtRlA3ZN454XW8H dsD5U2Qy4Bfgfoy++Nj9s6S3rtfGdekggYZrqArxepE7xcGXCaDK8R1W0WeRh9nW9OLx wl38REQHq+lkPELj5a8xogDXV9L1jbW7p9L4ouiR0xkR9PcNXYJ9GmBvX5BqTee8uVkw 0o6y94C/TvjYrb9x2u3lx0Q8+caKgZjsjA29j9xv/lUdYIWV4kpZkETyb2Pnac8ihBCV N0og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Bg3hQDpA; 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 v2si20069716pgn.451.2018.11.01.06.56.52; Thu, 01 Nov 2018 06:56:53 -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=Bg3hQDpA; 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 S1728851AbeKAW7z (ORCPT + 32 others); Thu, 1 Nov 2018 18:59:55 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:44909 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728198AbeKAW7z (ORCPT ); Thu, 1 Nov 2018 18:59:55 -0400 Received: by mail-pf1-f195.google.com with SMTP id j13-v6so5879544pff.11 for ; Thu, 01 Nov 2018 06:56:50 -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=qj0H6KSKOBtfKDabJ0HskYVa1VvjJFP6J9GaMlrOBZ4=; b=Bg3hQDpAjwAKACpnuTe0mnU8qY5rd5YNP1Hd1kSbUYBexjYfepj+/HTllLctenVNj4 HDh0QN3j/g5a/s5qtmTxUdZbWJd21kCtjRazRZpRtnRWbPKsG/v92CY/Ak9ZqMyLpIAO XS5EMdpLwhAl+Dps5a4udmU/gB0QNsdBDHvEo= 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=qj0H6KSKOBtfKDabJ0HskYVa1VvjJFP6J9GaMlrOBZ4=; b=d61Zhwd5XSgqMW9aMVdoML7hY/eio96rtmHfOG0pDXZL9B970dBvV5h+TR4t7QpRV2 hOI09JHu7x9sUim9F0RnYJ24DYAKZWvWywV80I+Qa95GEl7osdT93CGERPoMpUBWpy6i 9CwKYUjJ0r4n5mkG7B7QGh8Ln6f/nzgWjrOgUhsrOJgNdM7K9iM2ZXZ2LOBZ5dwiwQjz Vr63OJar78yP0O30zpKWeLylWUBrlVPpoa0/m1MXqxJFwpk2uZbN5ZXnoLJmNf20kKYZ LaD7W9FAn7PZIfe0Aqar0TRSKnzyq3wn8uRgyG5aSv7queop5XRd5PeiLd31uscePd6L J2iA== X-Gm-Message-State: AGRZ1gKJpEpLpzH+53dzr0S202GyOVG9/SPuZc3hbZMJ60ZZeFi2rvxb NCncNhJK8xN6rrzkPssPgr3qsw== X-Received: by 2002:a63:6643:: with SMTP id a64-v6mr4498655pgc.15.1541080610216; Thu, 01 Nov 2018 06:56:50 -0700 (PDT) Received: from qualcomm-HP-ZBook-14-G2.domain.name ([106.51.104.211]) by smtp.gmail.com with ESMTPSA id m18-v6sm39076169pfk.149.2018.11.01.06.56.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 01 Nov 2018 06:56:49 -0700 (PDT) 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 v1 0/4] xtensa: system call table generation support Date: Thu, 1 Nov 2018 19:26:17 +0530 Message-Id: <1541080581-4072-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. Firoz Khan (4): xtensa: move SYS_XTENSA_* macros to non uapi header 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 | 20 + arch/xtensa/include/uapi/asm/Kbuild | 1 + arch/xtensa/include/uapi/asm/unistd.h | 798 +----------------------------- 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, 510 insertions(+), 798 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