From patchwork Thu Nov 29 08:43:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Firoz Khan X-Patchwork-Id: 152376 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp2115034ljp; Thu, 29 Nov 2018 00:44:16 -0800 (PST) X-Google-Smtp-Source: AFSGD/WQS9lIZvxbQjpXNFPy5klW/4Whp7y4Yey0mGSjVPIygyRaiqB8GLnztx5lAg+WRJPnIPJR X-Received: by 2002:a63:a35c:: with SMTP id v28mr471546pgn.205.1543481056732; Thu, 29 Nov 2018 00:44:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543481056; cv=none; d=google.com; s=arc-20160816; b=oKQYrkkdEdMZLb9fnmyVJmFJ8PZbe/hssaaeKQ8QLQAdeSzE4Y1dFlq+tmc10rucZy QJoxSlQ9zKX09LmP6Ar7nE+5B2I8xIF124DitZ4BqQWKw6bzewLcOjyrMoZ08Fs9pJ31 uLMy7hO8RzqdaxaVw61tF6uNwtX6UZIfjjJeWSxpGMl0tIB+CHUdxPjJ+FtnIBrZUg6C 3xLXwuYj8fZi7SrGpGzCVRnD3dpX5Xl33RryXVLQRxmQ/KXl1stoA1pJi7QEp9wIiAaa YQM81Q8XbdYxSsHegg/+4pNSJxbaqd4pgvsSYkvYWJKVLbAHyJRMSjxpjFCVuEsJ755J gRBA== 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=D6YuGSB6Fh2DrVbL5PpLfO9xayiHVR6qYfrJzW71lDI=; b=pwptzv6lZXeSwPFEPkzLfltfDKj88cNyJaXJJ50QWcnrOl6QUsvKFl6eUPuCjI51Zl pNqeGP2BVnC2mNkbeowjTEZZOYhldPn+RkufaTOtnLzGvgo75oTgfavfkmjf6S0ovpGM h8/TkcxiHaTY6GqE75I02HHKGbhXHaHk9riI7QTjgZ029mHyTMSxqx5MqSvKe5N1kFhc kMhxLgctfCoJVbzW2mwLM12Cx9xK5ABqNhFaOWnrxqM9afEp5gfNG7jioXd2p5Z7YzLn bUXkYTbKq7IvedzZ/xlYoBIo0UflawJUrkwyQp52DIPvNB7B0b7YyLKX5UiPE9c/AXnL aKrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=e2jOAxnX; 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 m1si1621108pfi.286.2018.11.29.00.44.16; Thu, 29 Nov 2018 00:44:16 -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=e2jOAxnX; 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 S1727293AbeK2Tsu (ORCPT + 32 others); Thu, 29 Nov 2018 14:48:50 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:39715 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726789AbeK2Tsu (ORCPT ); Thu, 29 Nov 2018 14:48:50 -0500 Received: by mail-pf1-f195.google.com with SMTP id c72so670957pfc.6 for ; Thu, 29 Nov 2018 00:44:13 -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=D6YuGSB6Fh2DrVbL5PpLfO9xayiHVR6qYfrJzW71lDI=; b=e2jOAxnXsqVwLTnZ6Y9AbfLTHNUz5iKONcBISTlyW70cCYZCOutlkQJKwEI/erONZw eTUqUEnYAyFjrNQWWPD06+YNDSpquA+qNnCVgvvRXZbEF8CAsy9I4yDvaVcqDiVASC4x XU1n7Gyw4WjaLQ15R9z+04WDDf9hamNFDX+Qw= 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=D6YuGSB6Fh2DrVbL5PpLfO9xayiHVR6qYfrJzW71lDI=; b=ogf940ZA7KdKQ/SLpm3LknweURLO3tX9hZDmFEpQ27LC+tkRXA0H/NaEzIqxoVj43s wU9cl2Hc8pTwrKCvEn1bmjVd6ipbcqvBYcbI0+WfQqYcyAYdauFOBGlqtrT78wwCH2Ot 9ZlHE7HsOiN5q1d4GEexv/XukHHKAws+tzIKnBxRsx/RP4AvdKVrlRZBLSEOirMuOQXk LE5S3rV3hw0bMVabITNThdSl0hb6wajF9nlxumZWC2v0K9mz0wx1PcpTWuG2MoCYaVS1 KaLAE72CcCS4elce42dfk066ofFJ8H9SVzAjJUzeg8CK7e3XODyF1n+zTAc+5oeLbAJ4 OTrQ== X-Gm-Message-State: AA+aEWZLOa+k4X4VNThAJ7lRCJRzsKAGhh1m4UhwLeIfGF9GvVAk15v9 cK8Nz/KmQ1xCe/idV9V27Sa3jQ== X-Received: by 2002:a62:4181:: with SMTP id g1mr543604pfd.45.1543481053199; Thu, 29 Nov 2018 00:44:13 -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 73-v6sm2322683pfl.142.2018.11.29.00.44.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 Nov 2018 00:44:12 -0800 (PST) From: Firoz Khan To: linux-mips@linux-mips.org, Ralf Baechle , Paul Burton , James Hogan , Greg Kroah-Hartman , Philippe Ombredanne , Thomas Gleixner , Kate Stewart Cc: y2038@lists.linaro.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, deepa.kernel@gmail.com, marcin.juszkiewicz@linaro.org, firoz.khan@linaro.org Subject: [PATCH v3 0/6] mips: system call table generation support Date: Thu, 29 Nov 2018 14:13:30 +0530 Message-Id: <1543481016-18500-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. - Compat entry name, if required. 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, parisc, powerpc, sh, 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 v2: - fixed __NR_syscalls assign issue. Changes since v1: - optimized/updated the syscall table generation scripts. - fixed all mixed indentation issues in syscall.tbl. - added "comments" in syscall_*.tbl. - changed from generic-y to generated-y in Kbuild. Firoz Khan (6): mips: add __NR_syscalls along with __NR_Linux_syscalls mips: remove unused macros mips: add +1 to __NR_syscalls in uapi header mips: remove syscall table entries mips: add system call table generation support mips: generate uapi header and system call table files arch/mips/Makefile | 3 + arch/mips/include/asm/Kbuild | 4 + arch/mips/include/asm/unistd.h | 8 - arch/mips/include/uapi/asm/Kbuild | 6 + arch/mips/include/uapi/asm/unistd.h | 1065 +---------------------------- arch/mips/kernel/Makefile | 2 +- arch/mips/kernel/ftrace.c | 8 +- arch/mips/kernel/scall32-o32.S | 391 +---------- arch/mips/kernel/scall64-64.S | 444 ------------ arch/mips/kernel/scall64-n32.S | 341 +-------- arch/mips/kernel/scall64-n64.S | 117 ++++ arch/mips/kernel/scall64-o32.S | 379 +--------- arch/mips/kernel/syscalls/Makefile | 96 +++ arch/mips/kernel/syscalls/syscall_n32.tbl | 343 ++++++++++ arch/mips/kernel/syscalls/syscall_n64.tbl | 339 +++++++++ arch/mips/kernel/syscalls/syscall_o32.tbl | 382 +++++++++++ arch/mips/kernel/syscalls/syscallhdr.sh | 36 + arch/mips/kernel/syscalls/syscallnr.sh | 30 + arch/mips/kernel/syscalls/syscalltbl.sh | 36 + 19 files changed, 1430 insertions(+), 2600 deletions(-) delete mode 100644 arch/mips/kernel/scall64-64.S create mode 100644 arch/mips/kernel/scall64-n64.S create mode 100644 arch/mips/kernel/syscalls/Makefile create mode 100644 arch/mips/kernel/syscalls/syscall_n32.tbl create mode 100644 arch/mips/kernel/syscalls/syscall_n64.tbl create mode 100644 arch/mips/kernel/syscalls/syscall_o32.tbl create mode 100644 arch/mips/kernel/syscalls/syscallhdr.sh create mode 100644 arch/mips/kernel/syscalls/syscallnr.sh create mode 100644 arch/mips/kernel/syscalls/syscalltbl.sh -- 1.9.1