From patchwork Mon Jan 7 14:52:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Firoz Khan X-Patchwork-Id: 154887 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3565878ljp; Mon, 7 Jan 2019 06:53:42 -0800 (PST) X-Google-Smtp-Source: ALg8bN5ELxKYR2E70NxY5KDVjtDEGFiehwgsij0Jwmnmp9X1VKqZ/1okod81bc+4m5Wj6AYEip1w X-Received: by 2002:a17:902:7b91:: with SMTP id w17mr61661709pll.111.1546872822643; Mon, 07 Jan 2019 06:53:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546872822; cv=none; d=google.com; s=arc-20160816; b=R49kzvD++50VBUTDZMO12Wh4LBEXZIwWJNoooje33pgIHIfsm/7jey/Lj31W0kuJ2i XT1n6i6Wu3DbVW2ptJt6QIdj3bqE73fPkSW1HR+V42aPYK0ciOiaDD5VFq8LzphLiaxS Oc4aXNWFHy7VzVFcTPZAzKFnp1aKwtecH9CWoMANPYiHWXMZ2eHQ3psG8PGD86GrfIiJ pMXfekrmqxAU8h8tdISH3mp3gSWlxiatwGKtyT9WMlDqnvomDd9iY97c6pCM2ETd5mrI WY8ifbrp2dLHNK1by3rMAX2I7cyWDDaU/hNjoYxx/utZvrnQvmE1VZVE5kLKW97UbTQD qncQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=Qribx+gqAo/t4LskQU55eR6fPQXJgUz1Qy4Xg5x2OCo=; b=kMiIvllpUm46qYyx88q8NCHJUFJnAc+l9+0fjtxmKNhNdmVHRDKmfaDxNDT3GXPjR1 vxX0PA4ALG6LwXM4VO8v1Rj+mo6qR8ndeC4CVwQYYvrOzXAN5/VZyclpF+4NKLWD3cCl KTqqC91XQxwFbH8VC4W2Haz9Q9gd1myhFjVKUwSdox6rkLA9DuMVV/7NOQ5ktSzovQfJ TP/b2h2DqAK+jzOsJUhNYwiu+7kfGt4ILJHMfCoUjUhy5hR6Cyu5qkI/XVfcYcUuLVpv uIpn1XNS7gCGrFSpS1esmLi2dKXCJMXxFTeh8FmmfqgtHoVjLhiWLPDH96SDppzMlTdU 9c9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gT4vW4tQ; 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 d39si21724498pla.278.2019.01.07.06.53.42; Mon, 07 Jan 2019 06:53:42 -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=gT4vW4tQ; 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 S1729349AbfAGOxl (ORCPT + 31 others); Mon, 7 Jan 2019 09:53:41 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:44467 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728314AbfAGOxk (ORCPT ); Mon, 7 Jan 2019 09:53:40 -0500 Received: by mail-pl1-f193.google.com with SMTP id e11so246020plt.11 for ; Mon, 07 Jan 2019 06:53:40 -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:in-reply-to:references; bh=Qribx+gqAo/t4LskQU55eR6fPQXJgUz1Qy4Xg5x2OCo=; b=gT4vW4tQu9TNvj7pFGXrIWNRbZbY6iA7ypL9RYQ0jmwd+T7DP3diVC8S6lC6iIwRmO iDyPgS4X1CA7+vOS6t1GQz+P2zG2glast45xM+0vG3o8Rbx/3OzT0CoePpoNjPDS0oVq Pl2RqgEBCdjNXaRH8J0HMpOJkmYn5qz+HEANQ= 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:in-reply-to :references; bh=Qribx+gqAo/t4LskQU55eR6fPQXJgUz1Qy4Xg5x2OCo=; b=DVPmeHKmHKseiHezmIXAwDUavFErDCnPLWecax8wkenoF29BW7YEhJPk/x1sTOZ5Q4 L2iMrGzAjDbfsuqI4kaPguSzo2w3cUosfy7UaWv3rD+N6/7rZKxdKCRB2X5+E35kJ35c XS6GSnaivujg+puYlHExegujNIBLdFF/ANy5lEQhiCTnie9COhRQ+910Y2EzWq2d7DkM jBf5aPL7cpZuI3ZwpSJfKBAOigDjC2+gC3V+fE7TktdeQiMAfX6dMOh1rXuk42XnO9WF X4M+SWvK3MyZ/JaXSrbf7cF4UOUNPL+Jp0Rqam23TdqvtDmWNYJDPMHa+0EwB13mrhGF +wQg== X-Gm-Message-State: AJcUukcRB1Th4hoNbzBPcmgO7Ec9l2D9ZvT9bO7FRXZeYyxV5Reg09YA fpvHCxmxb3XBQ7uIiYbvDW2qUg== X-Received: by 2002:a17:902:9047:: with SMTP id w7mr62018164plz.270.1546872819948; Mon, 07 Jan 2019 06:53:39 -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 o84sm121145584pfi.172.2019.01.07.06.53.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 07 Jan 2019 06:53:39 -0800 (PST) From: Firoz Khan To: Mark Salter , Aurelien Jacquiot , Michal Simek , linux-c6x-dev@linux-c6x.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 3/3] c6x: generate uapi and kapi headers Date: Mon, 7 Jan 2019 20:22:46 +0530 Message-Id: <1546872766-3354-4-git-send-email-firoz.khan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1546872766-3354-1-git-send-email-firoz.khan@linaro.org> References: <1546872766-3354-1-git-send-email-firoz.khan@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Unified system call table generation script need to be invoked to generated the uapi and kapi headers. The Makefile changes present in this patch will invoke the scripts and generate uapi and kapi header files. The generated files - unistd_*.h and syscall_table_*.h files will be included by unistd.h and sys_c6x.c files by replacing asm-generic/unistd.h file. Signed-off-by: Firoz Khan --- arch/c6x/Makefile | 3 +++ arch/c6x/include/asm/Kbuild | 1 + arch/c6x/include/uapi/asm/Kbuild | 1 + arch/c6x/include/uapi/asm/unistd.h | 14 +++++++++----- arch/c6x/kernel/sys_c6x.c | 3 ++- 5 files changed, 16 insertions(+), 6 deletions(-) -- 1.9.1 diff --git a/arch/c6x/Makefile b/arch/c6x/Makefile index b7aa854..acc9c91 100644 --- a/arch/c6x/Makefile +++ b/arch/c6x/Makefile @@ -53,6 +53,9 @@ dtbImage.%: vmlinux archclean: $(Q)$(MAKE) $(clean)=$(boot) +archheaders: + $(Q)$(MAKE) $(build)=arch/c6x/kernel/syscalls all + define archhelp @echo ' vmlinux.bin - Binary kernel image (arch/$(ARCH)/boot/vmlinux.bin)' @echo ' dtbImage.
- ELF image with $(arch)/boot/dts/
.dts linked in' diff --git a/arch/c6x/include/asm/Kbuild b/arch/c6x/include/asm/Kbuild index 33a2c94..3d551e6 100644 --- a/arch/c6x/include/asm/Kbuild +++ b/arch/c6x/include/asm/Kbuild @@ -1,3 +1,4 @@ +generated-y += syscall_table.h generic-y += atomic.h generic-y += barrier.h generic-y += bugs.h diff --git a/arch/c6x/include/uapi/asm/Kbuild b/arch/c6x/include/uapi/asm/Kbuild index 6c6f630..28823e3 100644 --- a/arch/c6x/include/uapi/asm/Kbuild +++ b/arch/c6x/include/uapi/asm/Kbuild @@ -1,5 +1,6 @@ include include/uapi/asm-generic/Kbuild.asm +generated-y += unistd_32.h generic-y += kvm_para.h generic-y += shmparam.h generic-y += ucontext.h diff --git a/arch/c6x/include/uapi/asm/unistd.h b/arch/c6x/include/uapi/asm/unistd.h index 9e9ffe5..4633005 100644 --- a/arch/c6x/include/uapi/asm/unistd.h +++ b/arch/c6x/include/uapi/asm/unistd.h @@ -20,9 +20,13 @@ #define __ARCH_WANT_SYS_CLONE #define __ARCH_NOMMU -/* Use the standard ABI for syscalls. */ -#include +#include -/* C6X-specific syscalls. */ -#define __NR_cache_sync (__NR_arch_specific_syscall + 0) -__SYSCALL(__NR_cache_sync, sys_cache_sync) +#ifndef __SYSCALL +#define __SYSCALL(x, y) +#endif + +#if __BITS_PER_LONG == 32 +#define __NR_cache_sync __NR_arch_specific_syscall0 +#include +#endif diff --git a/arch/c6x/kernel/sys_c6x.c b/arch/c6x/kernel/sys_c6x.c index a742ae25..3e4b4e4 100644 --- a/arch/c6x/kernel/sys_c6x.c +++ b/arch/c6x/kernel/sys_c6x.c @@ -70,5 +70,6 @@ asmlinkage int sys_cache_sync(unsigned long s, unsigned long e) */ void *sys_call_table[__NR_syscalls] = { [0 ... __NR_syscalls-1] = sys_ni_syscall, -#include +#define sys_arch_specific_syscall0 sys_cache_sync +#include };