Re: [PATCH v2 1/2] Add support for a mmap file handler. Add support for MAP_ANON in mmap().

2017-05-21 Thread Gedare Bloom
On Sat, May 20, 2017 at 9:39 AM, Kevin Kirspel  wrote:
> ---
>  cpukit/dev/i2c/i2c-bus.c|   1 +
>  cpukit/dev/i2c/i2c-dev.c|   1 +
>  cpukit/dev/spi/spi-bus.c|   1 +
>  cpukit/libblock/src/blkdev-imfs.c   |   1 +
>  cpukit/libcsupport/include/rtems/libio.h|  38 
>  cpukit/libcsupport/include/rtems/termiostypes.h |  13 ++
>  cpukit/libcsupport/src/__usrenv.c   |   1 +
>  cpukit/libcsupport/src/termios.c|   1 +
>  cpukit/libfs/Makefile.am|   1 +
>  cpukit/libfs/src/defaults/default_handlers.c|   1 +
>  cpukit/libfs/src/defaults/default_mmap.c|  40 
>  cpukit/libfs/src/devfs/devfs_init.c |   1 +
>  cpukit/libfs/src/dosfs/msdos_handlers_dir.c |   1 +
>  cpukit/libfs/src/dosfs/msdos_handlers_file.c|   1 +
>  cpukit/libfs/src/imfs/imfs_dir_default.c|   1 +
>  cpukit/libfs/src/imfs/imfs_dir_minimal.c|   1 +
>  cpukit/libfs/src/imfs/imfs_fifo.c   |   1 +
>  cpukit/libfs/src/imfs/imfs_handlers_device.c|   1 +
>  cpukit/libfs/src/imfs/imfs_linfile.c|   1 +
>  cpukit/libfs/src/imfs/imfs_link.c   |   1 +
>  cpukit/libfs/src/imfs/imfs_memfile.c|   1 +
>  cpukit/libfs/src/imfs/imfs_symlink.c|   1 +
>  cpukit/libfs/src/jffs2/src/fs-rtems.c   |   3 +
>  cpukit/libfs/src/nfsclient/src/nfs.c|   3 +
>  cpukit/libfs/src/rfs/rtems-rfs-rtems-dev.c  |   1 +
>  cpukit/libfs/src/rfs/rtems-rfs-rtems-dir.c  |   1 +
>  cpukit/libfs/src/rfs/rtems-rfs-rtems-file.c |   1 +
>  cpukit/libfs/src/rfs/rtems-rfs-rtems.c  |   1 +
>  cpukit/libnetworking/lib/ftpfs.c|   2 +
>  cpukit/libnetworking/lib/tftpDriver.c   |   1 +
>  cpukit/libnetworking/rtems/rtems_syscall.c  |   1 +
>  cpukit/posix/src/mmap.c | 255 
> ++--
>  cpukit/posix/src/munmap.c   |  14 +-
>  cpukit/posix/src/shmopen.c  |  30 +++
>  34 files changed, 311 insertions(+), 112 deletions(-)
>  create mode 100644 cpukit/libfs/src/defaults/default_mmap.c
>
> diff --git a/cpukit/dev/i2c/i2c-bus.c b/cpukit/dev/i2c/i2c-bus.c
> index 0f27d06..1297b1e 100644
> --- a/cpukit/dev/i2c/i2c-bus.c
> +++ b/cpukit/dev/i2c/i2c-bus.c
> @@ -218,6 +218,7 @@ static const rtems_filesystem_file_handlers_r 
> i2c_bus_handler = {
>.fdatasync_h = rtems_filesystem_default_fsync_or_fdatasync,
>.fcntl_h = rtems_filesystem_default_fcntl,
>.kqfilter_h = rtems_filesystem_default_kqfilter,
> +  .mmap_h = rtems_filesystem_default_mmap,
>.poll_h = rtems_filesystem_default_poll,
>.readv_h = rtems_filesystem_default_readv,
>.writev_h = rtems_filesystem_default_writev
> diff --git a/cpukit/dev/i2c/i2c-dev.c b/cpukit/dev/i2c/i2c-dev.c
> index b00a9bd..680732f 100644
> --- a/cpukit/dev/i2c/i2c-dev.c
> +++ b/cpukit/dev/i2c/i2c-dev.c
> @@ -115,6 +115,7 @@ static const rtems_filesystem_file_handlers_r 
> i2c_dev_handler = {
>.fdatasync_h = rtems_filesystem_default_fsync_or_fdatasync,
>.fcntl_h = rtems_filesystem_default_fcntl,
>.kqfilter_h = rtems_filesystem_default_kqfilter,
> +  .mmap_h = rtems_filesystem_default_mmap,
>.poll_h = rtems_filesystem_default_poll,
>.readv_h = rtems_filesystem_default_readv,
>.writev_h = rtems_filesystem_default_writev
> diff --git a/cpukit/dev/spi/spi-bus.c b/cpukit/dev/spi/spi-bus.c
> index dd84b02..343e203 100644
> --- a/cpukit/dev/spi/spi-bus.c
> +++ b/cpukit/dev/spi/spi-bus.c
> @@ -235,6 +235,7 @@ static const rtems_filesystem_file_handlers_r 
> spi_bus_handler = {
>.fdatasync_h = rtems_filesystem_default_fsync_or_fdatasync,
>.fcntl_h = rtems_filesystem_default_fcntl,
>.kqfilter_h = rtems_filesystem_default_kqfilter,
> +  .mmap_h = rtems_filesystem_default_mmap,
>.poll_h = rtems_filesystem_default_poll,
>.readv_h = rtems_filesystem_default_readv,
>.writev_h = rtems_filesystem_default_writev
> diff --git a/cpukit/libblock/src/blkdev-imfs.c 
> b/cpukit/libblock/src/blkdev-imfs.c
> index 7a2d00b..f2008aa 100644
> --- a/cpukit/libblock/src/blkdev-imfs.c
> +++ b/cpukit/libblock/src/blkdev-imfs.c
> @@ -222,6 +222,7 @@ static const rtems_filesystem_file_handlers_r 
> rtems_blkdev_imfs_node = {
>.fdatasync_h = rtems_blkdev_imfs_fsync_or_fdatasync,
>.fcntl_h = rtems_filesystem_default_fcntl,
>.kqfilter_h = rtems_filesystem_default_kqfilter,
> +  .mmap_h = rtems_filesystem_default_mmap,
>.poll_h = rtems_filesystem_default_poll,
>.readv_h = rtems_filesystem_default_readv,
>.writev_h = rtems_filesystem_default_writev
> diff --git a/cpukit/libcsupport/include/rtems/libio.h 
> b/cpukit/libcsupport/include/rtems/libio.h
> index d0824b4..91733e4 100644
> --- a/cpukit/libcsupport/include/rtems/libio.h
> +++ b/cpukit/libcsupport/include/rtems/libio.h
> @@ -977,6 +977,28 @@ typedef int (*rtems_filesystem_k

Re: [PATCH 1/2] Add support for a mmap file handler

2017-05-21 Thread Sebastian Huber

On 20/05/17 14:47, Kevin Kirspel wrote:

+/**
   * @brief File system node operations table.
   */
  struct _rtems_filesystem_file_handlers_r {
@@ -993,6 +1015,7 @@ struct _rtems_filesystem_file_handlers_r {
rtems_filesystem_fcntl_t fcntl_h;
rtems_filesystem_poll_t poll_h;
rtems_filesystem_kqfilter_t kqfilter_h;
+  rtems_filesystem_mmap_t mmap_h;
rtems_filesystem_readv_t readv_h;
rtems_filesystem_writev_t writev_h;
  };
@@ -1216,6 +1239,21 @@ int rtems_filesystem_default_kqfilter(
struct knote *kn
  );


Please make this new member the last one, so that out of tree file 
systems continue to work without mmap() support.


--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [rtems commit] arm: Optimize context switch

2017-05-21 Thread Sebastian Huber

Which tests fail?

On 19/05/17 20:52, Gedare Bloom wrote:

This commit causes an error when running realview_pbx_a9_qemu in the
gem5 simulator. I have only been able to identify that this is the
problematic commit. I have not been able to debug further.

On Tue, Mar 28, 2017 at 4:34 AM, Sebastian Huber  wrote:

>Module:rtems
>Branch:master
>Commit:cd3d74793a4e2ec93cefdddb855d4536d44c7e64
>Changeset:http://git.rtems.org/rtems/commit/?id=cd3d74793a4e2ec93cefdddb855d4536d44c7e64
>
>Author:Sebastian Huber
>Date:  Mon Mar 27 08:01:38 2017 +0200
>
>arm: Optimize context switch
>
>Set CPU_ENABLE_ROBUST_THREAD_DISPATCH to TRUE.  In this case the
>interrupts are always enabled during a context switch even after
>interrupt processing (see #2751).  Remove the CPSR from the context
>control since it contains only volatile bits.
>
>Close #2954.


--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel