1. 06 Dec, 2018 1 commit
  2. 19 Nov, 2018 5 commits
    • David S. Miller's avatar
      Merge branch 'sparc-syscall-gen' · 726799a4
      David S. Miller authored
      Firoz Khan says:
      
      ====================
      sparc: system call table generation support
      
      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, 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, powerpc, sh
      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.
       - added io_pgetevents entry in the syscall.tbl.
       - updated the compat system call table.
      
      Changes since v1:
       - optimized/updated the syscall table generation
         scripts.
       - fixed all mixed indentation issues in syscall.tbl.
       - added "comments" in syscall.tbl.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      726799a4
    • Firoz Khan's avatar
      sparc: generate uapi header and system call table files · 36800330
      Firoz Khan authored
      System call table generation script must be run to gener-
      ate unistd_32/64.h and syscall_table_32/64/c32.h files.
      This patch will have changes which will invokes the script.
      
      This patch will generate unistd_32/64.h and syscall_table-
      _32/64/c32.h files by the syscall table generation script
      invoked by parisc/Makefile and the generated files against
      the removed files must be identical.
      
      The generated uapi header file will be included in uapi/-
      asm/unistd.h and generated system call table header file
      will be included by kernel/systbls_32/64.S file.
      Signed-off-by: default avatarFiroz Khan <firoz.khan@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      36800330
    • Firoz Khan's avatar
      sparc: add system call table generation support · 6ff645dd
      Firoz Khan authored
      The system call tables are in different format in all
      architecture and it will be difficult to manually add,
      modify or delete the syscall table entries in the res-
      pective files. To make it easy by keeping a script and
      which will generate the uapi header and syscall table
      file. This change will also help to unify the implemen-
      tation across all architectures.
      
      The system call table generation script is added in
      kernel/syscalls directory which contain the scripts to
      generate both uapi header file and system call table
      files. The syscall.tbl will be input for the scripts.
      
      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.
      
      syscallhdr.sh and syscalltbl.sh will generate uapi header
      unistd_32/64.h and syscall_table_32/64/c32.h files respect-
      ively. Both .sh files will parse the content syscall.tbl
      to generate the header and table files. unistd_32/64.h will
      be included by uapi/asm/unistd.h and syscall_table_32/64/-
      c32.h is included by kernel/syscall.S - the real system
      call table.
      
      ARM, s390 and x86 architecuture does have similar support.
      I leverage their implementation to come up with a generic
      solution.
      Signed-off-by: default avatarFiroz Khan <firoz.khan@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6ff645dd
    • Firoz Khan's avatar
      sparc: add __NR_syscalls along with NR_syscalls · 61257f56
      Firoz Khan authored
      NR_syscalls macro holds the number of system call exist
      in sparc architecture. We have to change the value of NR-
      _syscalls, if we add or delete a system call.
      
      One of the patch in this patch series has a script which
      will generate a uapi header based on syscall.tbl file.
      The syscall.tbl file contains the total number of system
      calls information. So we have two option to update NR_sy-
      scalls value.
      
      1. Update NR_syscalls in asm/unistd.h manually by count-
         ing the no.of system calls. No need to update NR_sys-
         calls until we either add a new system call or delete
         existing system call.
      
      2. We can keep this feature it above mentioned script,
         that will count the number of syscalls and keep it in
         a generated file. In this case we don't need to expli-
         citly update NR_syscalls in asm/unistd.h file.
      
      The 2nd option will be the recommended one. For that, I
      added the __NR_syscalls macro in uapi/asm/unistd.h along
      with NR_syscalls asm/unistd.h. The macro __NR_syscalls
      also added for making the name convention same across all
      architecture. While __NR_syscalls isn't strictly part of
      the uapi, having it as part of the generated header to
      simplifies the implementation. We also need to enclose
      this macro with #ifdef __KERNEL__ to avoid side effects.
      Signed-off-by: default avatarFiroz Khan <firoz.khan@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      61257f56
    • Firoz Khan's avatar
      sparc: move __IGNORE* entries to non uapi header · d441f93d
      Firoz Khan authored
      All the __IGNORE* entries are resides in the uapi header
      file move to non uapi header asm/unistd.h as it is not
      used by any user space applications.
      
      It is correct to keep __IGNORE* entry in non uapi header
      asm/unistd.h while uapi/asm/unistd.h must hold information
      only useful for user space applications.
      
      One of the patch in this patch series will generate uapi
      header file. The information which directly used by the
      user space application must be present in uapi file.
      Signed-off-by: default avatarFiroz Khan <firoz.khan@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d441f93d
  3. 18 Nov, 2018 33 commits
  4. 16 Nov, 2018 1 commit