From patchwork Wed Nov 14 10:03:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Firoz Khan X-Patchwork-Id: 151058 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp5488129ljp; Wed, 14 Nov 2018 02:03:51 -0800 (PST) X-Google-Smtp-Source: AJdET5exejj3/Sjabg2rgZ9G5jjnEHwg1QaT4idSOMp8D7nn2VogFNVaC5ebPjqTSx9qDlIHDcUf X-Received: by 2002:a17:902:2702:: with SMTP id c2-v6mr1259672plb.314.1542189831771; Wed, 14 Nov 2018 02:03:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542189831; cv=none; d=google.com; s=arc-20160816; b=NShdKD8W4Qk6omE+0s2GQmP3kqAqXrzvXrv8ONoQNbI4ogRPuweCAYWNCCdArHCyHF XfwQud5QPRSawloVmquTHlJZ/ebnsrLiVO4t+iI2kiJT3dmkYVEOPq435sFP9fuWuErb pqCZ4Uc27t0jdklQ+6d0P66BxrVj/GLcJp1UQJ0aqCk+THAjyaTzFf/yKhmpvuqppYdr /8lpkOrBFD1dtLFRVsAGw155zDSr/S2Y5KojgJilbbjCv865fqBLa1cUqy6/L9XE/q2+ /SrTiCsI8PNBrE6iNVMazC1L+ODHwLnrv3VWCQY/RgSfL3GoigCHdE0SAv8WntQVLSJQ w4sg== 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=6xSUduzYKVvcq6cKNxLgEZlOBjfKb9+Sl/B0AVBfewM=; b=lhRdrY0ngyZ8STjvv8/282Awuvm5E5pk0JWK7+ffwJstg5zDsWwJeo6uaSkcJ8ChxC PAPEt9ETLdBZUORaVQePxhvyTRzaqvZJP6aUMLbmeYDCFHGnQSdRut3QdqWmnOUCfB6z VMj0bju6fY4qx9jcAp2VN1uksXkLST3I3YselVxMiFMyHp0AbdgGz2npmp02QwqZrGOp xFYjmmcZynkR49A8XChQwqFvXZuibq5yzJubJgsrEO4qhoRi/j1BEC8m7cTymHC7Lfgo Mtzy+AB5MeVI0TDeMAGb54523RQ0jBKyozNa/i/MoJlbv4hzPBYOJEApAtxNABb24uva +ufA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kUZt+y2F; 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 b3-v6si26494511pfh.233.2018.11.14.02.03.49; Wed, 14 Nov 2018 02:03:51 -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=kUZt+y2F; 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 S1732302AbeKNUGV (ORCPT + 32 others); Wed, 14 Nov 2018 15:06:21 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:35916 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728061AbeKNUGU (ORCPT ); Wed, 14 Nov 2018 15:06:20 -0500 Received: by mail-pf1-f193.google.com with SMTP id b85so839031pfc.3 for ; Wed, 14 Nov 2018 02:03:46 -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=6xSUduzYKVvcq6cKNxLgEZlOBjfKb9+Sl/B0AVBfewM=; b=kUZt+y2F4HCJ1gdP5ksaWADRNQR3bwh5UXsvOksbzStyAnQxEtkYqcrZf/0ZQ7lAjk 0rRKG5HvZbqa3jUip5uZQKQZc+waBzUqUw4k+nv4s8FlJ3k+jpWHGT2bRbNTq4lzqMOo UrByBjnFBLWEKSiUhDPD1Dyi4SIZyN6uxQiB8= 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=6xSUduzYKVvcq6cKNxLgEZlOBjfKb9+Sl/B0AVBfewM=; b=YA7Wx49fyLMnKx52z8DdFUJkDvUY7W8ec9hfCq22LAYu4CBR0S5HU5DgpdVSFlXu7R D1Mce1mtxmWjf/NuIzpB9OGOPsHbrO/au3WmsCod0Q6z6t1Qeh9msYPvk6FzxRVhWC9/ jc8o7U3AZX83kTnOc/kAWRajoJpyMytI6BHgocln8IZ+j997fdXuEIJ7ClvUmvXFncfV fzYsA6FejNG/Enl9X3YExvjEuizKr/pZjH/6eC0oOsaKUxPyD/X3tg2nr/I8kZ57oxAH vG/V5oJRNsPvwHxmZTh0sraO2YwnCknZ3G9ZJ7qdcoQQxUgRXUXSbLLsVzJJoyeB1ZuJ isdg== X-Gm-Message-State: AGRZ1gJZ/9Cu4t49eo8YrDJM4Mi9QZF9gSpZCaWK/Nc23PwbAZwFzcYX E2A1k+s1v95Wrv0Vzg3aZdqZZg== X-Received: by 2002:a65:65c9:: with SMTP id y9mr1177088pgv.438.1542189826546; Wed, 14 Nov 2018 02:03:46 -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 g15sm21633873pfj.131.2018.11.14.02.03.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 14 Nov 2018 02:03:45 -0800 (PST) From: Firoz Khan To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Arnd Bergmann , Ram Pai , Geert Uytterhoeven , Breno Leitao , Boqun Feng , linuxppc-dev@lists.ozlabs.org, Thomas Gleixner , Greg Kroah-Hartman , Philippe Ombredanne , Kate Stewart Cc: y2038@lists.linaro.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, deepa.kernel@gmail.com, marcin.juszkiewicz@linaro.org, firoz.khan@linaro.org Subject: [PATCH v2 0/4] powerpc: system call table generation support Date: Wed, 14 Nov 2018 15:33:14 +0530 Message-Id: <1542189798-27713-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. - spu 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, mips, parisc, 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 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 (4): powerpc: add __NR_syscalls along with NR_syscalls powerpc: move macro definition from asm/systbl.h powerpc: add system call table generation support powerpc: generate uapi header and system call table files arch/powerpc/Makefile | 3 + arch/powerpc/include/asm/Kbuild | 4 + arch/powerpc/include/asm/systbl.h | 396 --------------------------- arch/powerpc/include/asm/unistd.h | 3 +- arch/powerpc/include/uapi/asm/Kbuild | 2 + arch/powerpc/include/uapi/asm/unistd.h | 389 +------------------------- arch/powerpc/kernel/Makefile | 10 - arch/powerpc/kernel/syscalls/Makefile | 61 +++++ arch/powerpc/kernel/syscalls/syscall.tbl | 408 ++++++++++++++++++++++++++++ arch/powerpc/kernel/syscalls/syscallhdr.sh | 36 +++ arch/powerpc/kernel/syscalls/syscalltbl.sh | 41 +++ arch/powerpc/kernel/systbl.S | 37 +-- arch/powerpc/kernel/systbl_chk.c | 60 ---- arch/powerpc/platforms/cell/spu_callbacks.c | 17 +- 14 files changed, 575 insertions(+), 892 deletions(-) delete mode 100644 arch/powerpc/include/asm/systbl.h create mode 100644 arch/powerpc/kernel/syscalls/Makefile create mode 100644 arch/powerpc/kernel/syscalls/syscall.tbl create mode 100644 arch/powerpc/kernel/syscalls/syscallhdr.sh create mode 100644 arch/powerpc/kernel/syscalls/syscalltbl.sh delete mode 100644 arch/powerpc/kernel/systbl_chk.c -- 1.9.1