linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Firoz Khan <firoz.khan@linaro.org>
To: Mark Salter <msalter@redhat.com>,
	Aurelien Jacquiot <jacquiot.aurelien@gmail.com>,
	Michal Simek <michal.simek@xilinx.com>,
	linux-c6x-dev@linux-c6x.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Philippe Ombredanne <pombredanne@nexb.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Kate Stewart <kstewart@linuxfoundation.org>
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 1/3] c6x: add Makefile to invoke syscall table generation script
Date: Mon,  7 Jan 2019 20:22:44 +0530	[thread overview]
Message-ID: <1546872766-3354-2-git-send-email-firoz.khan@linaro.org> (raw)
In-Reply-To: <1546872766-3354-1-git-send-email-firoz.khan@linaro.org>

Add Makefile to invoke the system call table generation script
which is placed in scripts directory as a common location acc-
essible for all the architectures.

scripts/syscallhdr.sh will generate uapi header and scripts-
/syscalltbl.sh will generate kapi header respectively. There
is another scripts scripts/syscallnr.sh can generate total
number of syscall which doesn't invoke from this Makefile.

Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
---
 arch/c6x/kernel/syscalls/Makefile | 41 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 arch/c6x/kernel/syscalls/Makefile

diff --git a/arch/c6x/kernel/syscalls/Makefile b/arch/c6x/kernel/syscalls/Makefile
new file mode 100644
index 0000000..1865a80
--- /dev/null
+++ b/arch/c6x/kernel/syscalls/Makefile
@@ -0,0 +1,41 @@
+# SPDX-License-Identifier: GPL-2.0
+kapi := arch/$(SRCARCH)/include/generated/asm
+uapi := arch/$(SRCARCH)/include/generated/uapi/asm
+
+_dummy := $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)')	\
+	  $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)')
+
+syscall := $(srctree)/scripts/syscalls/syscall.tbl
+syshdr := $(srctree)/scripts/syscallhdr.sh
+systbl := $(srctree)/scripts/syscalltbl.sh
+
+quiet_cmd_syshdr = SYSHDR  $@
+      cmd_syshdr = $(CONFIG_SHELL) '$(syshdr)' '$<' '$@'	\
+		   '$(syshdr_abis_$(basetarget))'		\
+		   '$(syshdr_pfx_$(basetarget))'		\
+		   '$(syshdr_offset_$(basetarget))'
+
+quiet_cmd_systbl = SYSTBL  $@
+      cmd_systbl = $(CONFIG_SHELL) '$(systbl)' '$<' '$@'	\
+		   '$(systbl_abis_$(basetarget))'		\
+		   '$(systbl_abi_$(basetarget))'		\
+		   '$(systbl_offset_$(basetarget))'
+
+syshdr_abis_unistd_32 := common,32,rename,stat64,archs0
+$(uapi)/unistd_32.h: $(syscall) $(syshdr)
+	$(call if_changed,syshdr)
+
+systbl_abis_syscall_table := common,32,rename,stat64,archs0
+systbl_abi_syscall_table := 32
+$(kapi)/syscall_table.h: $(syscall) $(systbl)
+	$(call if_changed,systbl)
+
+uapisyshdr-y		+= unistd_32.h
+kapisyshdr-y		+= syscall_table.h
+
+targets	+= $(uapisyshdr-y) $(kapisyshdr-y)
+
+PHONY += all
+all: $(addprefix $(uapi)/,$(uapisyshdr-y))
+all: $(addprefix $(kapi)/,$(kapisyshdr-y))
+	@:
-- 
1.9.1


  reply	other threads:[~2019-01-07 14:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-07 14:52 [PATCH 0/3] c6x: system call table generation for asm-generic Firoz Khan
2019-01-07 14:52 ` Firoz Khan [this message]
2019-01-07 14:52 ` [PATCH 2/3] c6x: add __ARCH_NOMMU as a bugfix Firoz Khan
2019-01-07 14:52 ` [PATCH 3/3] c6x: generate uapi and kapi headers Firoz Khan
2019-01-08  4:15   ` kbuild test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1546872766-3354-2-git-send-email-firoz.khan@linaro.org \
    --to=firoz.khan@linaro.org \
    --cc=arnd@arndb.de \
    --cc=deepa.kernel@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jacquiot.aurelien@gmail.com \
    --cc=kstewart@linuxfoundation.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-c6x-dev@linux-c6x.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcin.juszkiewicz@linaro.org \
    --cc=michal.simek@xilinx.com \
    --cc=msalter@redhat.com \
    --cc=pombredanne@nexb.com \
    --cc=tglx@linutronix.de \
    --cc=y2038@lists.linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).