From patchwork Wed Nov 14 04:32:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Firoz Khan X-Patchwork-Id: 151018 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp5239586ljp; Tue, 13 Nov 2018 20:32:43 -0800 (PST) X-Google-Smtp-Source: AJdET5cL1/S4pFou9Sf6c7I3Iz//bbFaHHC/STPwrmK3nGaKwhA//w2FsplWdv+Qb4LZQmciBvMU X-Received: by 2002:a17:902:b401:: with SMTP id x1-v6mr375525plr.237.1542169963340; Tue, 13 Nov 2018 20:32:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542169963; cv=none; d=google.com; s=arc-20160816; b=d6TWcSqRWnC56utNxX60IRsfAjMS1fQYiBpbqWE9ze3SOQkzgYYkgutMeryttQZeXC 6DfFEboEOmg6G8+ghADXg7/3mQi2ZnBl98CfLE1lOXoBx2CUXGSjNHjiiOaixLDepw2H L9bKAXES33k915YCNZXVnJ4XJI5QWf8RHkvBW5nNHDCWfxNby2UlbzfIeiUytO9J0aO8 VTKCtmBkLR5s/LHVtSHt35bizJ/n9s6dBDx1NjGP4dV86pDGBl/f940kG+7aiMGRA/9/ I8Uo/rUDG3+atcXr41i2qUR7Xbx5VdHVJIqAZYxTky0r6ejdwKitYbPSunRyqYFjjll3 oV2w== 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=vdye+BuNHW8Eg+iXkudWiq6lS6xa8P7cm7FkstY9enU=; b=UYaLgiYO5Mz9x8UiK2VXKS8VQUTJqGS9TynElT9lraHHReJDyRMZ3G4u3WrCi0rW22 4Okit2MxTM3y8LbxY4mhLdJ5dK9rR0lEFAN9CpPEI4jOZAOXmAL0wsGpi9VWNJnBMDMg c+/981C/GyqtEAW13oWvh389JYqWK/ERdhc0sOEZHuPzpUkzrNPMRHo2uQItBdf3vRZv 6apb8Y/s+7O0yepJ/mPo6ecn6icWrtB229b5QU2xLyHDMhQtA2Bozy99u73b25En4Irf PM0h8KpRFprEM7MeNTe7d5kjAR/sIU4PRU9VUblnykvlZPtOsXdspiqXrEhqbRKHHuO2 zX2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Vh7nmonY; 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 z189-v6si24253108pfz.32.2018.11.13.20.32.42; Tue, 13 Nov 2018 20:32:43 -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=Vh7nmonY; 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 S1728129AbeKNOeJ (ORCPT + 32 others); Wed, 14 Nov 2018 09:34:09 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:36151 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726610AbeKNOeI (ORCPT ); Wed, 14 Nov 2018 09:34:08 -0500 Received: by mail-pl1-f195.google.com with SMTP id w24-v6so7149611plq.3 for ; Tue, 13 Nov 2018 20:32:39 -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=vdye+BuNHW8Eg+iXkudWiq6lS6xa8P7cm7FkstY9enU=; b=Vh7nmonYCRHQonc2SkIQwGTIEwQvP+l51cew7Rd4TmtHEl4EJkYaaV+oH+we8aH1ch 4jw/vsgjg1FouErwSBTtpY5qOoGS0EmhRDAf0e79nXyZZjN+nC1cG7T5Ickitv+eONbT p2t88YQGlKsz78BG2Edm2Bf1dmccvNI7v9CKk= 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=vdye+BuNHW8Eg+iXkudWiq6lS6xa8P7cm7FkstY9enU=; b=Y+lejV39G7sJrNb8m8+NzxL2P34F4K7pr3Q0EggjbLVMQ0xGS0qxQfkcUedwsLxsTD pU+l8rJONkGOgTV7JF7SWI/qplgTjuEBhEVLJdFXvJZoJiGQaEynak1wx9zF2a7Km7J+ 4PE/BxZ3y8hMs//6ScrDa1hnKTiVi0yeY42alapx5a7c0B/xJkZZb+lwR9azNG+Ih8tl U9zACHirpSie2l59GgR6YNVl05Ht0CVzOMkrue54L29SbCwBaj1mKcnRlbpwYKipiP2w S4RWi4CZL3C6VozMgY8DBZSuSZn7rkHMGWA1qUgT+nyERoUqkKUOeRDWbgWzU2tpfT21 Atmg== X-Gm-Message-State: AGRZ1gIbdAB1JvfQNOqkpkwFrFwcO8xe+JPYc+HIQH/J7WHhVlsmmKr1 7YbOZupX+AaxzkgQ8+QiRHfUpImHpK4= X-Received: by 2002:a17:902:5ac7:: with SMTP id g7mr405896plm.212.1542169958958; Tue, 13 Nov 2018 20:32:38 -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 a17sm26382842pgm.26.2018.11.13.20.32.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 13 Nov 2018 20:32:38 -0800 (PST) From: Firoz Khan To: linux-sh@vger.kernel.org, Yoshinori Sato , Rich Felker , 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 v3 0/3] sh: system call table generation support Date: Wed, 14 Nov 2018 10:02:07 +0530 Message-Id: <1542169930-24118-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. Please note, this support is only available for 32-bit kernel, not 64-bit kernel. As I came across the 64-bit kernel is not active for long time. 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, 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: - changed from generic-y to generated-y in Kbuild. Changes since v1: - optimized/updated the syscall table generation scripts. - fixed all mixed indentation issues in syscall.tbl. - added "comments" in syscall.tbl. Firoz Khan (3): sh: add __NR_syscalls along with NR_syscalls sh: add system call table generation support sh: generate uapi header and syscall table header files arch/sh/Makefile | 3 + arch/sh/include/asm/Kbuild | 1 + arch/sh/include/asm/unistd.h | 2 + arch/sh/include/uapi/asm/Kbuild | 1 + arch/sh/include/uapi/asm/unistd_32.h | 4 +- arch/sh/include/uapi/asm/unistd_64.h | 4 +- arch/sh/kernel/syscalls/Makefile | 38 ++++ arch/sh/kernel/syscalls/syscall.tbl | 392 ++++++++++++++++++++++++++++++++++ arch/sh/kernel/syscalls/syscallhdr.sh | 36 ++++ arch/sh/kernel/syscalls/syscalltbl.sh | 32 +++ arch/sh/kernel/syscalls_32.S | 387 +-------------------------------- 11 files changed, 514 insertions(+), 386 deletions(-) create mode 100644 arch/sh/kernel/syscalls/Makefile create mode 100644 arch/sh/kernel/syscalls/syscall.tbl create mode 100644 arch/sh/kernel/syscalls/syscallhdr.sh create mode 100644 arch/sh/kernel/syscalls/syscalltbl.sh -- 1.9.1 Acked-by: Rich Felker