From patchwork Thu Sep 27 14:24:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Firoz Khan X-Patchwork-Id: 147718 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp2076833lji; Thu, 27 Sep 2018 07:25:07 -0700 (PDT) X-Google-Smtp-Source: ACcGV61Pb7kS7fe06VV2hqAfRNolPSTkGnq+rYIJ4TQ1e/f2eiZe/z/OTGO8+vePoTPhuOxvvY6O X-Received: by 2002:a62:c98e:: with SMTP id l14-v6mr11718345pfk.10.1538058307247; Thu, 27 Sep 2018 07:25:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538058307; cv=none; d=google.com; s=arc-20160816; b=HQjt5mqi+mYCWXFTqFmN0IAJrTj3zL0Eeg8NWByXN9NiMFwxRuJ1UkF7tTGM/zo43X jYUD/pztPRk2j6fY7iOMZTlCYQniosVpY9tKOwICLGPRVxCkni5tV7DqJbHpbpiIiQW3 NinGsS0D7rUiQ48Cs+QbsyF/Ts3ZCAg0RHdN2dMc1WbXxupS7COn2EDQ6upXIRrZq/Zb QuCR6W17VfO2pLkpF4eXkgiXdYzNLFgo4dpdSWrBGD4xQLe8OssTibvQ5p3IDady7ApN ofXE4oPblo5QSPSQXvlbATccGckk0DNp+BIsAPt2orQhvFc3St4D0dfojJRznkWHk7pd kpRw== 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=ni/eVDa2Hujp+DsYcqwh+SM8Be5zik7hZCcPMihIUEA=; b=JF5IlFDuohUmXlHwWa5JVBS/Lx+6kZMzuKWzdz20d/+/uvN9iFpdz+22Rhc9nY25Qe MbTQQWiSW6MNmP1/Fp03eGIP1pOLuEempzrZKmad+E7BAiG7md3s5N+QLRpmhm51+NOl daEbqQS9ANF5pMp8Ddv/V9n5IbOByvNnsnnKBJt+1eKkpXndofPrt7y5ErSIvcPk5QFb SQXZPN5Ud0enmM8zxEAQZC1SIB/Zbp3hG17eV+uKilfegnQEdyBnFqpnOjcr54HIsqin UzyJL/ih3zZCRW2FP8fbSuKESGAG0rQLhG3xI4FT14yO5uGikwYEP/AHF5mGIkVRDycr iOpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Jh7WAag+; 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 b124-v6si2102757pgc.45.2018.09.27.07.25.06; Thu, 27 Sep 2018 07:25:07 -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=Jh7WAag+; 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 S1727867AbeI0Une (ORCPT + 32 others); Thu, 27 Sep 2018 16:43:34 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:37646 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727472AbeI0Une (ORCPT ); Thu, 27 Sep 2018 16:43:34 -0400 Received: by mail-pg1-f194.google.com with SMTP id c10-v6so2097055pgq.4 for ; Thu, 27 Sep 2018 07:25:03 -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=ni/eVDa2Hujp+DsYcqwh+SM8Be5zik7hZCcPMihIUEA=; b=Jh7WAag+py26oqDj6xOuxjjGnozv3h/zkNrpCfO6khLoTQbXFJTKtS42ZtzcgxwjPm aJNpjX9466yjozwk17+IdMSpcXoTInyFhHZaTDGZfjGMzOKEt3lHMei/onc0ODjRKL3G iTxOO7LcBZM+L2mYI1/0AbdpZQmmOqu8p5TXk= 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=ni/eVDa2Hujp+DsYcqwh+SM8Be5zik7hZCcPMihIUEA=; b=ZfNMgRGT90fQYQgMqy9ju+BGbcPpdrRl3yMyHEryGX/mcGJ+/9tOAe8/AfOABX7ufw fpM7cI3rjpf3TwV2aRcxdFBLupsFS6KEIO43WOK6cUYBMYR7ST7WfxgEVx8ky79TQLH9 /UppIeIGOPAdBdT68jT2N3E7dzIcCv6bcGmTiEr4g8txWsA7v100iNntu9ytH0CJxth+ miU63RWEWU1YXnVYjyPGU31Q2oZRdQ85l1eH/kVHXP6Yv7Bc0iFTzhKNA3Qpl8E2uSHH +4+IiZkeb3qAHV/ezPH/4o5Epk8xYutYgtpbND43NVTAkQ1RRcupgpYhJCzorphH2suI clEg== X-Gm-Message-State: ABuFfoifn9XXldaKboyU6IvSyjbzeEsscVJNR00HcD34hBeTeKfYbx1P 2QcRpSD4yiKGxwEk5S5dYmvjYw== X-Received: by 2002:a17:902:9045:: with SMTP id w5-v6mr11603577plz.10.1538058303127; Thu, 27 Sep 2018 07:25:03 -0700 (PDT) Received: from qualcomm-HP-ZBook-14-G2.domain.name ([106.51.105.186]) by smtp.gmail.com with ESMTPSA id f81-v6sm9717421pfh.46.2018.09.27.07.24.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 27 Sep 2018 07:25:02 -0700 (PDT) From: Firoz Khan To: linux-parisc@vger.kernel.org, "James E . J . Bottomley" , Helge Deller , Thomas Gleixner , Greg Kroah-Hartman , Philippe Ombredanne , 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/5] System call table generation support Date: Thu, 27 Sep 2018 19:54:22 +0530 Message-Id: <1538058267-3765-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: 1. We can easily add/modify/delete system call by changing entry in syscall.tbl file. No need to manually edit many files. 2. It is easy to unify the system call implementation across all the architectures. The system call tables are in different format in all architecture and it will be difficult to manually add or modify the system calls in the respective files manually. To make it easy by keeping a script and which'll generate the header file and syscall table file so this change will unify them across all architectures. syscall.tbl contains the list of available system calls along with system call number and corresponding entry point. Add a new system call in this architecture 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 similar support. I leverage their implementation to come up with a generic solution. I have done the same support for work for alpha, microblaze, sparc, m68k, mips, powerpc, sh, sparc, and xtensa. But I started sending the patch for one architecuture for review. Below mentioned git repository contains more details. Git repo:- https://github.com/frzkhn/system_call_table_generator/ Added an extra patch to keep __IGNORE* entries in asm/unistd.h. Finally, this is the ground work for solving the Y2038 issue. We need to add/change two dozen of system calls to solve Y2038 issue. So this patch series will help to easily modify from existing system call to Y2038 compatible system calls. Firoz Khan (5): parisc: move __IGNORE* entries to non uapi header parisc: add __NR_Linux_syscalls macro with __NR_syscalls parisc: add system call table generation support parisc: uapi header and system call table file generation parisc: add __IGNORE* entries in asm/unistd.h arch/parisc/Makefile | 4 + arch/parisc/include/asm/Kbuild | 3 + arch/parisc/include/asm/unistd.h | 9 + arch/parisc/include/uapi/asm/Kbuild | 2 + arch/parisc/include/uapi/asm/unistd.h | 380 +----------------------- arch/parisc/kernel/syscall.S | 12 +- arch/parisc/kernel/syscall_table.S | 459 ----------------------------- arch/parisc/kernel/syscall_table_32.S | 13 + arch/parisc/kernel/syscall_table_64.S | 20 ++ arch/parisc/kernel/syscalls/Makefile | 55 ++++ arch/parisc/kernel/syscalls/syscall_32.tbl | 342 +++++++++++++++++++++ arch/parisc/kernel/syscalls/syscall_64.tbl | 342 +++++++++++++++++++++ arch/parisc/kernel/syscalls/syscallhdr.sh | 35 +++ arch/parisc/kernel/syscalls/syscalltbl.sh | 42 +++ 14 files changed, 877 insertions(+), 841 deletions(-) delete mode 100644 arch/parisc/kernel/syscall_table.S create mode 100644 arch/parisc/kernel/syscall_table_32.S create mode 100644 arch/parisc/kernel/syscall_table_64.S create mode 100644 arch/parisc/kernel/syscalls/Makefile create mode 100644 arch/parisc/kernel/syscalls/syscall_32.tbl create mode 100644 arch/parisc/kernel/syscalls/syscall_64.tbl create mode 100644 arch/parisc/kernel/syscalls/syscallhdr.sh create mode 100644 arch/parisc/kernel/syscalls/syscalltbl.sh -- 1.9.1