[PATCH] bsp/aarch64: Fix array warning
From: Chris Johns Updates #4664 --- bsps/aarch64/include/bsp/start.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsps/aarch64/include/bsp/start.h b/bsps/aarch64/include/bsp/start.h index 586eec4f48..f0af5be841 100644 --- a/bsps/aarch64/include/bsp/start.h +++ b/bsps/aarch64/include/bsp/start.h @@ -172,7 +172,7 @@ AArch64_start_set_vector_base(void) /* * Do not use bsp_vector_table_begin == 0, since this will get optimized away. */ - if (bsp_vector_table_end != bsp_vector_table_size) { + if (_vector_table_end[0] != _vector_table_size[0]) { __asm__ volatile ( "msr VBAR_EL1, %[vtable]\n" : : [vtable] "r" (bsp_start_vector_table_begin) -- 2.24.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH 13/13] jffs2: Update baseline version to Linux v5.9
On 10/6/22 11:25 pm, Joel Sherrill wrote: > If I read the patch set correctly, there is a one line change to os-rtems.h > which looks fine and the rest is updating to the latest version. Yes it seems so. > If so, then push it. OK from me and thanks for picking up this task. I will take a look at the heap fragmentation under large block writes as a background task. I have opened https://devel.rtems.org/ticket/4664 to track this issue. Thanks Chris ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 8/8] sptests/spglobalcon01/init.cc: Change license to BSD-2
Updates #3053. --- testsuites/sptests/spglobalcon01/init.cc | 25 +--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/testsuites/sptests/spglobalcon01/init.cc b/testsuites/sptests/spglobalcon01/init.cc index 54f2774170..661b828ddc 100644 --- a/testsuites/sptests/spglobalcon01/init.cc +++ b/testsuites/sptests/spglobalcon01/init.cc @@ -1,9 +1,28 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + /* * Copyright (c) 2014 embedded brains GmbH. All rights reserved. * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H -- 2.24.4 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 7/8] samples/iostream/init.cc: Change license to BSD-2
Updates #3053. --- testsuites/samples/iostream/init.cc | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/testsuites/samples/iostream/init.cc b/testsuites/samples/iostream/init.cc index d80d4df9eb..22d973019b 100644 --- a/testsuites/samples/iostream/init.cc +++ b/testsuites/samples/iostream/init.cc @@ -1,3 +1,5 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + /* Init * * This routine is the initialization task for this test program. @@ -13,9 +15,26 @@ * COPYRIGHT (c) 1989-2008. * On-Line Applications Research Corporation (OAR). * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ #define CONFIGURE_INIT -- 2.24.4 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 5/8] mptests/*/*.doc: Change license to BSD-2
Updates #3053. --- testsuites/mptests/mp01/mp01-node1.doc | 25 ++--- testsuites/mptests/mp01/mp01-node2.doc | 25 ++--- testsuites/mptests/mp03/mp03-node1.doc | 25 ++--- testsuites/mptests/mp03/mp03-node2.doc | 25 ++--- testsuites/mptests/mp04/mp04-node1.doc | 25 ++--- testsuites/mptests/mp04/mp04-node2.doc | 25 ++--- testsuites/mptests/mp05/mp05-node1.doc | 25 ++--- testsuites/mptests/mp05/mp05-node2.doc | 25 ++--- testsuites/mptests/mp06/mp06-node1.doc | 25 ++--- testsuites/mptests/mp06/mp06-node2.doc | 25 ++--- testsuites/mptests/mp07/mp07-node1.doc | 25 ++--- testsuites/mptests/mp07/mp07-node2.doc | 25 ++--- testsuites/mptests/mp08/mp08-node1.doc | 25 ++--- testsuites/mptests/mp08/mp08-node2.doc | 25 ++--- testsuites/mptests/mp09/mp09-node1.doc | 25 ++--- testsuites/mptests/mp09/mp09-node2.doc | 25 ++--- testsuites/mptests/mp10/mp10-node1.doc | 25 ++--- testsuites/mptests/mp10/mp10-node2.doc | 25 ++--- testsuites/mptests/mp11/mp11-node1.doc | 25 ++--- testsuites/mptests/mp11/mp11-node2.doc | 25 ++--- testsuites/mptests/mp12/mp12-node1.doc | 25 ++--- testsuites/mptests/mp12/mp12-node2.doc | 25 ++--- testsuites/mptests/mp13/mp13-node1.doc | 25 ++--- testsuites/mptests/mp13/mp13-node2.doc | 25 ++--- testsuites/mptests/mp14/mp14-node1.doc | 25 ++--- testsuites/mptests/mp14/mp14-node2.doc | 25 ++--- 26 files changed, 572 insertions(+), 78 deletions(-) diff --git a/testsuites/mptests/mp01/mp01-node1.doc b/testsuites/mptests/mp01/mp01-node1.doc index dff9f2f8d2..db4be4808a 100644 --- a/testsuites/mptests/mp01/mp01-node1.doc +++ b/testsuites/mptests/mp01/mp01-node1.doc @@ -1,9 +1,28 @@ +# SPDX-License-Identifier: BSD-2-Clause + # COPYRIGHT (c) 1989-1999. # On-Line Applications Research Corporation (OAR). # -# The license and distribution terms for this file may be -# found in the file LICENSE in this distribution or at -# http://www.rtems.org/license/LICENSE. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +#notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +#notice, this list of conditions and the following disclaimer in the +#documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. # diff --git a/testsuites/mptests/mp01/mp01-node2.doc b/testsuites/mptests/mp01/mp01-node2.doc index 981286480f..f56c0e1f4e 100644 --- a/testsuites/mptests/mp01/mp01-node2.doc +++ b/testsuites/mptests/mp01/mp01-node2.doc @@ -1,9 +1,28 @@ +# SPDX-License-Identifier: BSD-2-Clause + # COPYRIGHT (c) 1989-1999. # On-Line Applications Research Corporation (OAR). # -# The license and distribution terms for this file may be -# found in the file LICENSE in this distribution or at -# http://www.rtems.org/license/LICENSE. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +#notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +#notice, this list of conditions and the following disclaimer in the +#documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
[PATCH 6/8] sptests/*/*.doc: Change license to BSD-2
Updates #3053. --- testsuites/sptests/spheapprot/spheapprot.doc | 23 +--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/testsuites/sptests/spheapprot/spheapprot.doc b/testsuites/sptests/spheapprot/spheapprot.doc index 9d01a7b005..0ac3545ece 100644 --- a/testsuites/sptests/spheapprot/spheapprot.doc +++ b/testsuites/sptests/spheapprot/spheapprot.doc @@ -2,9 +2,26 @@ # Copyright (c) 2010 embedded brains GmbH. All rights reserved. # -# The license and distribution terms for this file may be -# found in the file LICENSE in this distribution or at -# http://www.rtems.org/license/LICENSE. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +#notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +#notice, this list of conditions and the following disclaimer in the +#documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. This file describes the directives and concepts tested by this test set. -- 2.24.4 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 3/8] psxtmtests/*/*.doc: Change license to BSD-2
Updates #3053. --- .../psxtmbarrier01/psxtmbarrier01.doc | 25 --- .../psxtmbarrier02/psxtmbarrier02.doc | 25 --- .../psxtmbarrier03/psxtmbarrier03.doc | 25 --- .../psxtmbarrier04/psxtmbarrier04.doc | 25 --- .../psxtmclocknanosleep01.doc | 25 --- .../psxtmclocknanosleep02.doc | 25 --- .../psxtmclocknanosleep03.doc | 25 --- .../psxtmtests/psxtmcond02/psxtmcond02.doc| 25 --- .../psxtmtests/psxtmcond03/psxtmcond03.doc| 25 --- .../psxtmtests/psxtmcond04/psxtmcond04.doc| 25 --- .../psxtmtests/psxtmcond05/psxtmcond05.doc| 25 --- .../psxtmtests/psxtmcond06/psxtmcond06.doc| 25 --- .../psxtmtests/psxtmcond07/psxtmcond07.doc| 25 --- .../psxtmtests/psxtmcond08/psxtmcond08.doc| 25 --- .../psxtmtests/psxtmcond09/psxtmcond09.doc| 25 --- .../psxtmtests/psxtmkey01/psxtmkey01.doc | 25 --- .../psxtmtests/psxtmkey02/psxtmkey02.doc | 25 --- testsuites/psxtmtests/psxtmmq01/psxtmmq01.doc | 25 --- .../psxtmtests/psxtmmutex01/psxtmmutex01.doc | 25 --- .../psxtmtests/psxtmmutex02/psxtmmutex02.doc | 25 --- .../psxtmtests/psxtmmutex03/psxtmmutex03.doc | 25 --- .../psxtmtests/psxtmmutex04/psxtmmutex04.doc | 25 --- .../psxtmtests/psxtmmutex05/psxtmmutex05.doc | 25 --- .../psxtmtests/psxtmmutex06/psxtmmutex06.doc | 25 --- .../psxtmtests/psxtmmutex07/psxtmmutex07.doc | 25 --- .../psxtmnanosleep01/psxtmnanosleep01.doc | 25 --- .../psxtmnanosleep02/psxtmnanosleep02.doc | 25 --- .../psxtmrwlock01/psxtmrwlock01.doc | 25 --- .../psxtmrwlock02/psxtmrwlock02.doc | 25 --- .../psxtmrwlock03/psxtmrwlock03.doc | 25 --- .../psxtmrwlock04/psxtmrwlock04.doc | 25 --- .../psxtmrwlock05/psxtmrwlock05.doc | 25 --- .../psxtmrwlock06/psxtmrwlock06.doc | 25 --- .../psxtmrwlock07/psxtmrwlock07.doc | 25 --- .../psxtmtests/psxtmsem01/psxtmsem01.doc | 25 --- .../psxtmtests/psxtmsem02/psxtmsem02.doc | 25 --- .../psxtmtests/psxtmsem03/psxtmsem03.doc | 25 --- .../psxtmtests/psxtmsem04/psxtmsem04.doc | 25 --- .../psxtmtests/psxtmsem05/psxtmsem05.doc | 25 --- .../psxtmtests/psxtmsleep01/psxtmsleep01.doc | 25 --- .../psxtmtests/psxtmsleep02/psxtmsleep02.doc | 25 --- .../psxtmthread01/psxtmthread01.doc | 25 --- .../psxtmthread03/psxtmthread03.doc | 25 --- .../psxtmthread04/psxtmthread04.doc | 25 --- .../psxtmthread05/psxtmthread05.doc | 25 --- 45 files changed, 990 insertions(+), 135 deletions(-) diff --git a/testsuites/psxtmtests/psxtmbarrier01/psxtmbarrier01.doc b/testsuites/psxtmtests/psxtmbarrier01/psxtmbarrier01.doc index 74f74c67d5..9e9fba5e0d 100644 --- a/testsuites/psxtmtests/psxtmbarrier01/psxtmbarrier01.doc +++ b/testsuites/psxtmtests/psxtmbarrier01/psxtmbarrier01.doc @@ -1,9 +1,28 @@ +# SPDX-License-Identifier: BSD-2-Clause + # COPYRIGHT (c) 1989-2011. # On-Line Applications Research Corporation (OAR). # -# The license and distribution terms for this file may be -# found in the file LICENSE in this distribution or at -# http://www.rtems.org/license/LICENSE. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +#notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +#notice, this list of conditions and the following disclaimer in the +#documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
[PATCH 4/8] smptests/*/*.doc: Change license to BSD-2
Updates #3053. --- testsuites/smptests/smp01/smp01.doc | 25 --- testsuites/smptests/smp02/smp02.doc | 25 --- testsuites/smptests/smp03/smp03.doc | 25 --- testsuites/smptests/smp05/smp05.doc | 25 --- testsuites/smptests/smp07/smp07.doc | 25 --- testsuites/smptests/smp08/smp08.doc | 25 --- testsuites/smptests/smp09/smp09.doc | 25 --- .../smptests/smpaffinity01/smpaffinity01.doc | 25 --- .../smppsxaffinity01/smppsxaffinity01.doc | 25 --- .../smppsxaffinity02/smppsxaffinity02.doc | 25 --- 10 files changed, 220 insertions(+), 30 deletions(-) diff --git a/testsuites/smptests/smp01/smp01.doc b/testsuites/smptests/smp01/smp01.doc index e3bed542d7..4cfb25e2fa 100644 --- a/testsuites/smptests/smp01/smp01.doc +++ b/testsuites/smptests/smp01/smp01.doc @@ -1,9 +1,28 @@ +# SPDX-License-Identifier: BSD-2-Clause + # COPYRIGHT (c) 1989-2011. # On-Line Applications Research Corporation (OAR). # -# The license and distribution terms for this file may be -# found in the file LICENSE in this distribution or at -# http://www.rtems.org/license/LICENSE. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +#notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +#notice, this list of conditions and the following disclaimer in the +#documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. # This is a simple test that verifies that each of the smp diff --git a/testsuites/smptests/smp02/smp02.doc b/testsuites/smptests/smp02/smp02.doc index ba916d32dc..a197328dc2 100644 --- a/testsuites/smptests/smp02/smp02.doc +++ b/testsuites/smptests/smp02/smp02.doc @@ -1,9 +1,28 @@ +# SPDX-License-Identifier: BSD-2-Clause + # COPYRIGHT (c) 1989-2011. # On-Line Applications Research Corporation (OAR). # -# The license and distribution terms for this file may be -# found in the file LICENSE in this distribution or at -# http://www.rtems.org/license/LICENSE. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +#notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +#notice, this list of conditions and the following disclaimer in the +#documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. # This test creates tasks for each process (other than the one that Init is running on). Then drops into a loop waiting diff --git a/testsuites/smptests/smp03/smp03.doc b/testsuites/smptests/smp03/smp03.doc index b7c3bb2853..c032ca6c60 100644 --- a/testsuites/smptests/smp03/smp03.doc +++ b/testsuites/smptests/smp03/smp03.doc @@ -1,9 +1,28 @@ +# SPDX-License-Identifier: BSD-2-Clause + # COPYRIGHT (c) 1989-2011. # On-Line Applications Research Corporation (OAR). # -# The license and distribution
[PATCH 2/8] samples/*/*.doc: Change license to BSD-2
Updates #3053. --- testsuites/samples/base_mp/base_mp-node1.doc | 25 +--- testsuites/samples/base_mp/base_mp-node2.doc | 25 +--- testsuites/samples/base_sp/base_sp.doc | 25 +--- testsuites/samples/capture/capture.doc | 25 +--- testsuites/samples/fileio/fileio.doc | 25 +--- testsuites/samples/hello/hello.doc | 25 +--- testsuites/samples/iostream/iostream.doc | 25 +--- testsuites/samples/minimum/minimum.doc | 25 +--- testsuites/samples/nsecs/nsecs.doc | 25 +--- testsuites/samples/paranoia/paranoia.doc | 25 +--- testsuites/samples/ticker/ticker.doc | 25 +--- testsuites/samples/unlimited/unlimited.doc | 2 ++ 12 files changed, 244 insertions(+), 33 deletions(-) diff --git a/testsuites/samples/base_mp/base_mp-node1.doc b/testsuites/samples/base_mp/base_mp-node1.doc index 981286480f..f56c0e1f4e 100644 --- a/testsuites/samples/base_mp/base_mp-node1.doc +++ b/testsuites/samples/base_mp/base_mp-node1.doc @@ -1,9 +1,28 @@ +# SPDX-License-Identifier: BSD-2-Clause + # COPYRIGHT (c) 1989-1999. # On-Line Applications Research Corporation (OAR). # -# The license and distribution terms for this file may be -# found in the file LICENSE in this distribution or at -# http://www.rtems.org/license/LICENSE. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +#notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +#notice, this list of conditions and the following disclaimer in the +#documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. # diff --git a/testsuites/samples/base_mp/base_mp-node2.doc b/testsuites/samples/base_mp/base_mp-node2.doc index 981286480f..f56c0e1f4e 100644 --- a/testsuites/samples/base_mp/base_mp-node2.doc +++ b/testsuites/samples/base_mp/base_mp-node2.doc @@ -1,9 +1,28 @@ +# SPDX-License-Identifier: BSD-2-Clause + # COPYRIGHT (c) 1989-1999. # On-Line Applications Research Corporation (OAR). # -# The license and distribution terms for this file may be -# found in the file LICENSE in this distribution or at -# http://www.rtems.org/license/LICENSE. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +#notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +#notice, this list of conditions and the following disclaimer in the +#documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. # diff --git a/testsuites/samples/base_sp/base_sp.doc b/testsuites/samples/base_sp/base_sp.doc index 981286480f..f56c0e1f4e 100644 --- a/testsuites/samples/base_sp/base_sp.doc +++ b/testsuites/samples/base_sp/base_sp.doc @@ -1,9 +1,28 @@ +# SPDX-License-Identifier: BSD-2-Clause + # COPYRIGHT (c) 1989-1999. # On-Line Applications Research Corporation (OAR). #
[PATCH 1/8] smptests/*/*.py: Change license to BSD-2
Manually adjusted location of SPDX annotation so #! remains first line. Updates #3053. --- .../smptests/smplock01/smplock01fair.py | 25 --- .../smptests/smplock01/smplock01perf.py | 25 --- .../smptests/smpopenmp01/smpopenmp01.py | 25 --- .../sptimecounter02/sptimecounter02.py| 25 --- 4 files changed, 88 insertions(+), 12 deletions(-) diff --git a/testsuites/smptests/smplock01/smplock01fair.py b/testsuites/smptests/smplock01/smplock01fair.py index 378dfd8028..c5d99c6cbe 100755 --- a/testsuites/smptests/smplock01/smplock01fair.py +++ b/testsuites/smptests/smplock01/smplock01fair.py @@ -1,11 +1,30 @@ #!/usr/bin/env python +# SPDX-License-Identifier: BSD-2-Clause + # # Copyright (c) 2016 embedded brains GmbH. All rights reserved. # -# The license and distribution terms for this file may be -# found in the file LICENSE in this distribution or at -# http://www.rtems.org/license/LICENSE. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +#notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +#notice, this list of conditions and the following disclaimer in the +#documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. # import re diff --git a/testsuites/smptests/smplock01/smplock01perf.py b/testsuites/smptests/smplock01/smplock01perf.py index 43816814f8..c50ef7047f 100755 --- a/testsuites/smptests/smplock01/smplock01perf.py +++ b/testsuites/smptests/smplock01/smplock01perf.py @@ -1,11 +1,30 @@ #!/usr/bin/env python +# SPDX-License-Identifier: BSD-2-Clause + # # Copyright (c) 2016 embedded brains GmbH. All rights reserved. # -# The license and distribution terms for this file may be -# found in the file LICENSE in this distribution or at -# http://www.rtems.org/license/LICENSE. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +#notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +#notice, this list of conditions and the following disclaimer in the +#documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. # import re diff --git a/testsuites/smptests/smpopenmp01/smpopenmp01.py b/testsuites/smptests/smpopenmp01/smpopenmp01.py index 139aedd4af..7a9b39973a 100644 --- a/testsuites/smptests/smpopenmp01/smpopenmp01.py +++ b/testsuites/smptests/smpopenmp01/smpopenmp01.py @@ -1,11 +1,30 @@ #!/usr/bin/env python +# SPDX-License-Identifier: BSD-2-Clause + # # Copyright (c) 2017 embedded brains GmbH. All rights reserved. # -# The license and distribution terms for this file may be -# found in the file LICENSE in this distribution or at -# http://www.rtems.org/license/LICENSE. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +#
[PATCH 0/8] Relicense clean up sweep on testsuites
Hi I am making another pass on testsuites and (soon) cpukit to relicense the files which have only a single copyright statement and attribution to OAR, embedded brains, Chris Johns, or Gedare Bloom. The script doing this picks up some files missed by the previous passes Hopefully this is not controversial. --joel Joel Sherrill (8): smptests/*/*.py: Change license to BSD-2 samples/*/*.doc: Change license to BSD-2 psxtmtests/*/*.doc: Change license to BSD-2 smptests/*/*.doc: Change license to BSD-2 mptests/*/*.doc: Change license to BSD-2 sptests/*/*.doc: Change license to BSD-2 samples/iostream/init.cc: Change license to BSD-2 sptests/spglobalcon01/init.cc: Change license to BSD-2 testsuites/mptests/mp01/mp01-node1.doc| 25 --- testsuites/mptests/mp01/mp01-node2.doc| 25 --- testsuites/mptests/mp03/mp03-node1.doc| 25 --- testsuites/mptests/mp03/mp03-node2.doc| 25 --- testsuites/mptests/mp04/mp04-node1.doc| 25 --- testsuites/mptests/mp04/mp04-node2.doc| 25 --- testsuites/mptests/mp05/mp05-node1.doc| 25 --- testsuites/mptests/mp05/mp05-node2.doc| 25 --- testsuites/mptests/mp06/mp06-node1.doc| 25 --- testsuites/mptests/mp06/mp06-node2.doc| 25 --- testsuites/mptests/mp07/mp07-node1.doc| 25 --- testsuites/mptests/mp07/mp07-node2.doc| 25 --- testsuites/mptests/mp08/mp08-node1.doc| 25 --- testsuites/mptests/mp08/mp08-node2.doc| 25 --- testsuites/mptests/mp09/mp09-node1.doc| 25 --- testsuites/mptests/mp09/mp09-node2.doc| 25 --- testsuites/mptests/mp10/mp10-node1.doc| 25 --- testsuites/mptests/mp10/mp10-node2.doc| 25 --- testsuites/mptests/mp11/mp11-node1.doc| 25 --- testsuites/mptests/mp11/mp11-node2.doc| 25 --- testsuites/mptests/mp12/mp12-node1.doc| 25 --- testsuites/mptests/mp12/mp12-node2.doc| 25 --- testsuites/mptests/mp13/mp13-node1.doc| 25 --- testsuites/mptests/mp13/mp13-node2.doc| 25 --- testsuites/mptests/mp14/mp14-node1.doc| 25 --- testsuites/mptests/mp14/mp14-node2.doc| 25 --- .../psxtmbarrier01/psxtmbarrier01.doc | 25 --- .../psxtmbarrier02/psxtmbarrier02.doc | 25 --- .../psxtmbarrier03/psxtmbarrier03.doc | 25 --- .../psxtmbarrier04/psxtmbarrier04.doc | 25 --- .../psxtmclocknanosleep01.doc | 25 --- .../psxtmclocknanosleep02.doc | 25 --- .../psxtmclocknanosleep03.doc | 25 --- .../psxtmtests/psxtmcond02/psxtmcond02.doc| 25 --- .../psxtmtests/psxtmcond03/psxtmcond03.doc| 25 --- .../psxtmtests/psxtmcond04/psxtmcond04.doc| 25 --- .../psxtmtests/psxtmcond05/psxtmcond05.doc| 25 --- .../psxtmtests/psxtmcond06/psxtmcond06.doc| 25 --- .../psxtmtests/psxtmcond07/psxtmcond07.doc| 25 --- .../psxtmtests/psxtmcond08/psxtmcond08.doc| 25 --- .../psxtmtests/psxtmcond09/psxtmcond09.doc| 25 --- .../psxtmtests/psxtmkey01/psxtmkey01.doc | 25 --- .../psxtmtests/psxtmkey02/psxtmkey02.doc | 25 --- testsuites/psxtmtests/psxtmmq01/psxtmmq01.doc | 25 --- .../psxtmtests/psxtmmutex01/psxtmmutex01.doc | 25 --- .../psxtmtests/psxtmmutex02/psxtmmutex02.doc | 25 --- .../psxtmtests/psxtmmutex03/psxtmmutex03.doc | 25 --- .../psxtmtests/psxtmmutex04/psxtmmutex04.doc | 25 --- .../psxtmtests/psxtmmutex05/psxtmmutex05.doc | 25 --- .../psxtmtests/psxtmmutex06/psxtmmutex06.doc | 25 --- .../psxtmtests/psxtmmutex07/psxtmmutex07.doc | 25 --- .../psxtmnanosleep01/psxtmnanosleep01.doc | 25 --- .../psxtmnanosleep02/psxtmnanosleep02.doc | 25 --- .../psxtmrwlock01/psxtmrwlock01.doc | 25 --- .../psxtmrwlock02/psxtmrwlock02.doc | 25 --- .../psxtmrwlock03/psxtmrwlock03.doc | 25 --- .../psxtmrwlock04/psxtmrwlock04.doc | 25 --- .../psxtmrwlock05/psxtmrwlock05.doc | 25 --- .../psxtmrwlock06/psxtmrwlock06.doc | 25 --- .../psxtmrwlock07/psxtmrwlock07.doc
Should README's have license statement?
Hi I'm back to relicensing for a bit and noticed that it looks like none of the README's in testsuites have a license or copyright statement. Should they? I can do forensics on the copyright attribution. Should the README's be BSD-2, Creative Commons, or remain like they are with nothing? Thanks. --joel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH v2 6/6] testsuites/libtests/malloctest: fix warnings
From: Matt Joyce Edited tests to fix new gcc 12 warnings. Updates #4662 --- testsuites/libtests/malloctest/init.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/testsuites/libtests/malloctest/init.c b/testsuites/libtests/malloctest/init.c index 05d97a27d5..ee8bd8ca52 100644 --- a/testsuites/libtests/malloctest/init.c +++ b/testsuites/libtests/malloctest/init.c @@ -60,8 +60,7 @@ static void test_realloc(void) for (i=2 ; i<2048 ; i++) { p2 = realloc(p1, i); if (p2 != p1) - printf( "realloc - failed grow in place: " - "%p != realloc(%p,%zu)\n", p1, p2, i); + printf( "realloc - failed grow in place\n"); p1 = p2; } free(p1); @@ -71,8 +70,7 @@ static void test_realloc(void) for (i=2047 ; i>=1; i--) { p2 = realloc(p1, i); if (p2 != p1) - printf( "realloc - failed shrink in place: " - "%p != realloc(%p,%zu)\n", p1, p2, i); + printf( "realloc - failed shrink in place\n"); p1 = p2; } free(p1); @@ -85,7 +83,7 @@ static void test_realloc(void) p3 = realloc(p1, 64); if (p3 == p1 || p3 == NULL) printf( - "realloc - failed non-in place: realloc(%p,%d) = %p\n", p1, 64, p3); + "realloc - failed non-in place\n"); free(p3); free(p2); @@ -120,11 +118,17 @@ static void test_realloc(void) _Thread_Dispatch_enable( _Per_CPU_Get() ); /* - * Realloc with a bad pointer to force a point + * Realloc with a pointer that is not in the heap. + * The error should be detected and NULL should be returned. */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wfree-nonheap-object" p4 = realloc( test_realloc, 32 ); - + rtems_test_assert(p4 == NULL); +#pragma GCC diagnostic pop p4 = _realloc_r( NULL, NULL, 1 ); + rtems_test_assert(p4 != NULL); + free(p4); } #define TEST_HEAP_SIZE 2048 @@ -1528,8 +1532,8 @@ static void test_early_malloc( void ) free( q ); - r = realloc( q, 128 ); - rtems_test_assert( r == q ); + r = realloc( NULL, 128 ); + rtems_test_assert( r != NULL ); s = malloc( 1 ); rtems_test_assert( s != NULL ); -- 2.31.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH v2 5/6] testsuites/libtests/POSIX/free.c: fix warning
From: Matt Joyce This change fixes a new warning in gcc 12. Updates #4662 --- testsuites/libtests/POSIX/free.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuites/libtests/POSIX/free.c b/testsuites/libtests/POSIX/free.c index 8550eaa85c..6bc961b968 100644 --- a/testsuites/libtests/POSIX/free.c +++ b/testsuites/libtests/POSIX/free.c @@ -14,7 +14,7 @@ int main (void) { - free((void *) 42); + free(NULL); return 0; } -- 2.31.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH v2 3/6] cpukit/libcsupport/src/__gettod.c: avoid warning
From: Matt Joyce Define _LIBC to ensure access to the function prototype. The purpose is to avoid a new warning in gcc 12. Updates #4662. --- cpukit/libcsupport/src/__gettod.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cpukit/libcsupport/src/__gettod.c b/cpukit/libcsupport/src/__gettod.c index 610f2c4d4a..e2a7ba6e64 100644 --- a/cpukit/libcsupport/src/__gettod.c +++ b/cpukit/libcsupport/src/__gettod.c @@ -39,9 +39,11 @@ #if defined(RTEMS_NEWLIB) /* - * Needed to get the prototype for the newlib helper method + * Needed to get the prototype for the newlib helper method. Which define + * is required depends on the version of newlib. */ #define _COMPILING_NEWLIB +#define _LIBC #include #include -- 2.31.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH v2 4/6] cpukit/libmd/md5.c: fix warning
From: Matt Joyce Specify array size in parameter to match function prototype. This fixes a new warning in gcc 12. Updates #4662 --- cpukit/libmd/md5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpukit/libmd/md5.c b/cpukit/libmd/md5.c index 4c909f37a0..5e3a100c7b 100644 --- a/cpukit/libmd/md5.c +++ b/cpukit/libmd/md5.c @@ -165,7 +165,7 @@ void MD5Update ( ends with the desired message digest in mdContext->digest[0...15]. */ void MD5Final ( - unsigned char hash[], + unsigned char hash[16], MD5_CTX *mdContext ) { UINT4 in[16]; -- 2.31.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH v2 2/6] cpukit/posix/src/_execve.c: fix warning
From: Matt Joyce Define _LIBC to access prototype for _execve() function. This fixes a new warning in gcc 12. Updates #4662 --- cpukit/posix/src/_execve.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cpukit/posix/src/_execve.c b/cpukit/posix/src/_execve.c index 2858d13082..f1b9d9d3a1 100644 --- a/cpukit/posix/src/_execve.c +++ b/cpukit/posix/src/_execve.c @@ -43,9 +43,11 @@ #endif /* - * Needed to get the prototype for this newlib helper method + * Needed to get the prototype for this newlib helper method. Which define + * is required depends on the version of newlib. */ #define _COMPILING_NEWLIB +#define _LIBC #include #include -- 2.31.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH v2 1/6] libcsupport/src/__times.c: fix warning
From: Matt Joyce Define _LIBC to access prototype for _times() function. This fixes a new warning in gcc 12. Updates #4662. --- cpukit/libcsupport/src/__times.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cpukit/libcsupport/src/__times.c b/cpukit/libcsupport/src/__times.c index 629a7bc633..6fcf3f8501 100644 --- a/cpukit/libcsupport/src/__times.c +++ b/cpukit/libcsupport/src/__times.c @@ -38,9 +38,11 @@ #endif /* - * Needed to get the prototype for this newlib helper method + * Needed to get the prototype for this newlib helper method. Which define + * is required depends on the version of newlib. */ #define _COMPILING_NEWLIB +#define _LIBC #include -- 2.31.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH v2 0/6] gcc 12 warning fixes
From: Matt Joyce Hello, Please find v2 attached. Changes: 1) Added additional patch for __gettod.c 2) Edited comments / formatting 3) Edited tests in malloctest 4) References RTEMS ticket #4662 Thank you! Sincerely, Matt Matt Joyce (6): libcsupport/src/__times.c: fix warning cpukit/posix/src/_execve.c: fix warning cpukit/libcsupport/src/__gettod.c: avoid warning cpukit/libmd/md5.c: fix warning testsuites/libtests/POSIX/free.c: fix warning testsuites/libtests/malloctest: fix warnings cpukit/libcsupport/src/__gettod.c | 4 +++- cpukit/libcsupport/src/__times.c | 4 +++- cpukit/libmd/md5.c| 2 +- cpukit/posix/src/_execve.c| 4 +++- testsuites/libtests/POSIX/free.c | 2 +- testsuites/libtests/malloctest/init.c | 22 +- 6 files changed, 24 insertions(+), 14 deletions(-) -- 2.31.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH 13/13] jffs2: Update baseline version to Linux v5.9
If I read the patch set correctly, there is a one line change to os-rtems.h which looks fine and the rest is updating to the latest version. If so, then push it. --joel On Fri, Jun 10, 2022 at 3:21 AM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > --- > cpukit/libfs/src/jffs2/VERSION | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/cpukit/libfs/src/jffs2/VERSION > b/cpukit/libfs/src/jffs2/VERSION > index 7d9c9f41b2..b13bed5750 100644 > --- a/cpukit/libfs/src/jffs2/VERSION > +++ b/cpukit/libfs/src/jffs2/VERSION > @@ -1,9 +1,9 @@ > -This directory contains a port of the JFFS2 file system from Linux v4.17. > +This directory contains a port of the JFFS2 file system from Linux v5.9. > > To update to a newer Linux version use this command in a Git clone of > Linux to > generate the relevant patches: > > - git format-patch v4.17..v9.99 -- > + git format-patch v5.9..v9.99 -- > include/uapi/linux/jffs2.h \ > fs/jffs2/LICENCE \ > fs/jffs2/acl.h \ > -- > 2.35.3 > > ___ > devel mailing list > devel@rtems.org > http://lists.rtems.org/mailman/listinfo/devel > ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 5/5] bsps/stm32h7: allow config and usage of QSPI memory on stm32h747i-disco BSP
The QSPI memory is initialized and used only when the BSP configure file sets QSPI memory size to non-zero value. Currently QSPI is run in memory mapped mode which allows future RTEMS binary linkage and upload into QSPI memory. Sponsored-By: Precidata --- .../stm32h747i-disco/stm32h7-bspstarthooks.c| 17 + .../bsps/arm/stm32h7/bspstm32h747i-disco.yml| 5 - 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/bsps/arm/stm32h7/boards/stm/stm32h747i-disco/stm32h7-bspstarthooks.c b/bsps/arm/stm32h7/boards/stm/stm32h747i-disco/stm32h7-bspstarthooks.c index 8d34e357ee..e18bc3bca9 100644 --- a/bsps/arm/stm32h7/boards/stm/stm32h747i-disco/stm32h7-bspstarthooks.c +++ b/bsps/arm/stm32h7/boards/stm/stm32h747i-disco/stm32h7-bspstarthooks.c @@ -36,6 +36,22 @@ #include +#if defined(STM32H7_MEMORY_QUADSPI_SIZE) && STM32H7_MEMORY_QUADSPI_SIZE > 0 +#include +BSP_QSPI_Init_t QSPinit; +#endif + +void stm32h7_init_qspi(void) +{ +#if defined(STM32H7_MEMORY_QUADSPI_SIZE) && STM32H7_MEMORY_QUADSPI_SIZE > 0 +/* let's initialize Quad SPI memory here for memory mapped mode */ +memset((void*)&(QSPI_Ctx[0]), 0, sizeof(QSPI_Ctx[0])); +memset((void*), 0, sizeof(BSP_QSPI_Init_t)); +BSP_QSPI_Init(0, ); +BSP_QSPI_EnableMemoryMappedMode(0); +#endif +} + void bsp_start_hook_0(void) { if ((RCC->AHB3ENR & RCC_AHB3ENR_FMCEN) == 0) { @@ -52,6 +68,7 @@ void bsp_start_hook_0(void) HAL_RCC_MCOConfig(RCC_MCO1, RCC_MCO1SOURCE_HSI, RCC_MCODIV_1); HAL_Init(); SystemInit_ExtMemCtl(); +stm32h7_init_qspi(); } #if __CORTEX_M == 0x07U diff --git a/spec/build/bsps/arm/stm32h7/bspstm32h747i-disco.yml b/spec/build/bsps/arm/stm32h7/bspstm32h747i-disco.yml index 8b13d16844..9111bcf051 100644 --- a/spec/build/bsps/arm/stm32h7/bspstm32h747i-disco.yml +++ b/spec/build/bsps/arm/stm32h7/bspstm32h747i-disco.yml @@ -8,7 +8,8 @@ copyrights: cppflags: [] enabled-by: true family: stm32h7 -includes: [] +includes: +- bsps/arm/stm32h7/boards/stm/stm32h747i-disco install: [] links: - role: build-dependency @@ -16,6 +17,8 @@ links: - role: build-dependency uid: tststm32h757i-eval source: +- bsps/arm/stm32h7/boards/stm/Components/mt25tl01g/mt25tl01g.c +- bsps/arm/stm32h7/boards/stm/stm32h747i-disco/stm32h747i_discovery_qspi.c - bsps/arm/stm32h7/boards/stm/stm32h747i-disco/stm32h7-bspstarthooks.c - bsps/arm/stm32h7/boards/stm/stm32h747i-disco/stm32h7-config-clk.c - bsps/arm/stm32h7/boards/stm/stm32h747i-disco/stm32h7-config-osc.c -- 2.25.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 4/5] bsps/stm32h7: import stm32h747i-disco QSPI memory high-level driver
Sponsored-By: Precidata --- .../stm32h747i_discovery_conf.h | 119 ++ .../stm32h747i_discovery_errno.h | 106 ++ .../stm32h747i_discovery_qspi.c | 1100 + .../stm32h747i_discovery_qspi.h | 286 + 4 files changed, 1611 insertions(+) create mode 100644 bsps/arm/stm32h7/boards/stm/stm32h747i-disco/stm32h747i_discovery_conf.h create mode 100644 bsps/arm/stm32h7/boards/stm/stm32h747i-disco/stm32h747i_discovery_errno.h create mode 100644 bsps/arm/stm32h7/boards/stm/stm32h747i-disco/stm32h747i_discovery_qspi.c create mode 100644 bsps/arm/stm32h7/boards/stm/stm32h747i-disco/stm32h747i_discovery_qspi.h diff --git a/bsps/arm/stm32h7/boards/stm/stm32h747i-disco/stm32h747i_discovery_conf.h b/bsps/arm/stm32h7/boards/stm/stm32h747i-disco/stm32h747i_discovery_conf.h new file mode 100644 index 00..8cacaddb7e --- /dev/null +++ b/bsps/arm/stm32h7/boards/stm/stm32h747i-disco/stm32h747i_discovery_conf.h @@ -0,0 +1,119 @@ +/* SPDX-License-Identifier: BSD-3-Clause */ +/** + ** + * @filestm32h747i_discovery_conf_template.h + * @author MCD Application Team + * @brief STM32H747I_DISCO board configuration file. + ** + * @attention + * + * Copyright (c) 2018 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ** + */ +/* + * RTEMS committer clarification comment on license above: + * + * This file comes from STM32CubeH7 project and is located here: + * https://github.com/STMicroelectronics/STM32CubeH7/blob/master/Drivers/BSP/STM32H747I-DISCO/stm32h747i_discovery_conf_template.h + * + * The file root directory is: + * https://github.com/STMicroelectronics/STM32CubeH7/tree/master/Drivers/BSP/STM32H747I-DISCO + * + * This directory contains LICENSE.md file with a following license text: + * + * Copyright 2019 STMicroelectronics. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its contributors + * may be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* Define to prevent recursive inclusion -*/ +#ifndef STM32H747I_DISCO_CONF_H +#define STM32H747I_DISCO_CONF_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* Includes --*/ +#include "stm32h7xx_hal.h" + +/* COM define */ +#define USE_COM_LOG 0U +#define USE_BSP_COM_FEATURE 0U + +/* LCD controllers defines */ +#define USE_LCD_CTRL_OTM8009A 1U +#define USE_LCD_CTRL_ADV75331U + +#define LCD_LAYER_0_ADDRESS 0xC000U +#define LCD_LAYER_1_ADDRESS 0xC020U + +#define USE_DMA2D_TO_FILL_RGB_RECT 0U +/* Camera sensors defines */ +#define USE_CAMERA_SENSOR_OV56401U +#define USE_CAMERA_SENSOR_OV96551U + +/* SD interface defines */ +#define USE_SD_BUS_WIDE_4B 1U + +/* Audio codecs defines */ +#define USE_AUDIO_CODEC_WM8994 1U + +/* TS supported features defines */ +#define USE_TS_GESTURE 1U +#define USE_TS_MULTI_TOUCH 1U +
[PATCH 3/5] bsps/stm32h7: allow config and usage of QSPI memory on stm32h757i-eval BSP
The QSPI memory is initialized and used only when the BSP configure file sets QSPI memory size to non-zero value. Currently QSPI is run in memory mapped mode which allows future RTEMS binary linkage and upload into QSPI memory. Sponsored-By: Precidata --- .../stm/stm32h757i-eval/stm32h7-bspstarthooks.c | 17 + bsps/arm/stm32h7/include/bsp.h | 1 + .../bsps/arm/stm32h7/bspstm32h757i-eval.yml | 5 - spec/build/bsps/arm/stm32h7/optmemquadspisz.yml | 1 + 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/bsps/arm/stm32h7/boards/stm/stm32h757i-eval/stm32h7-bspstarthooks.c b/bsps/arm/stm32h7/boards/stm/stm32h757i-eval/stm32h7-bspstarthooks.c index 8d34e357ee..9916b740ce 100644 --- a/bsps/arm/stm32h7/boards/stm/stm32h757i-eval/stm32h7-bspstarthooks.c +++ b/bsps/arm/stm32h7/boards/stm/stm32h757i-eval/stm32h7-bspstarthooks.c @@ -36,6 +36,22 @@ #include +#if defined(STM32H7_MEMORY_QUADSPI_SIZE) && STM32H7_MEMORY_QUADSPI_SIZE > 0 +#include +BSP_QSPI_Init_t QSPinit; +#endif + +void stm32h7_init_qspi(void) +{ +#if defined(STM32H7_MEMORY_QUADSPI_SIZE) && STM32H7_MEMORY_QUADSPI_SIZE > 0 +/* let's initialize Quad SPI memory here for memory mapped mode */ +memset((void*)&(QSPI_Ctx[0]), 0, sizeof(QSPI_Ctx[0])); +memset((void*), 0, sizeof(BSP_QSPI_Init_t)); +BSP_QSPI_Init(0, ); +BSP_QSPI_EnableMemoryMappedMode(0); +#endif +} + void bsp_start_hook_0(void) { if ((RCC->AHB3ENR & RCC_AHB3ENR_FMCEN) == 0) { @@ -52,6 +68,7 @@ void bsp_start_hook_0(void) HAL_RCC_MCOConfig(RCC_MCO1, RCC_MCO1SOURCE_HSI, RCC_MCODIV_1); HAL_Init(); SystemInit_ExtMemCtl(); +stm32h7_init_qspi(); } #if __CORTEX_M == 0x07U diff --git a/bsps/arm/stm32h7/include/bsp.h b/bsps/arm/stm32h7/include/bsp.h index 08311bf51e..cd4d25c069 100644 --- a/bsps/arm/stm32h7/include/bsp.h +++ b/bsps/arm/stm32h7/include/bsp.h @@ -62,6 +62,7 @@ void stm32h7_init_power(void); void stm32h7_init_oscillator(void); void stm32h7_init_clocks(void); void stm32h7_init_peripheral_clocks(void); +void stm32h7_init_qspi(void); /** @} */ diff --git a/spec/build/bsps/arm/stm32h7/bspstm32h757i-eval.yml b/spec/build/bsps/arm/stm32h7/bspstm32h757i-eval.yml index 5d7ee1348d..7516e55a3f 100644 --- a/spec/build/bsps/arm/stm32h7/bspstm32h757i-eval.yml +++ b/spec/build/bsps/arm/stm32h7/bspstm32h757i-eval.yml @@ -8,7 +8,8 @@ copyrights: cppflags: [] enabled-by: true family: stm32h7 -includes: [] +includes: +- bsps/arm/stm32h7/boards/stm/stm32h757i-eval install: [] links: - role: build-dependency @@ -16,6 +17,8 @@ links: - role: build-dependency uid: tststm32h757i-eval source: +- bsps/arm/stm32h7/boards/stm/Components/mt25tl01g/mt25tl01g.c +- bsps/arm/stm32h7/boards/stm/stm32h757i-eval/stm32h747i_eval_qspi.c - bsps/arm/stm32h7/boards/stm/stm32h757i-eval/stm32h7-bspstarthooks.c - bsps/arm/stm32h7/boards/stm/stm32h757i-eval/stm32h7-config-clk.c - bsps/arm/stm32h7/boards/stm/stm32h757i-eval/stm32h7-config-osc.c diff --git a/spec/build/bsps/arm/stm32h7/optmemquadspisz.yml b/spec/build/bsps/arm/stm32h7/optmemquadspisz.yml index 11e5f943e0..9337610b45 100644 --- a/spec/build/bsps/arm/stm32h7/optmemquadspisz.yml +++ b/spec/build/bsps/arm/stm32h7/optmemquadspisz.yml @@ -1,6 +1,7 @@ actions: - get-integer: null - env-assign: null +- define-unquoted: null build-type: option default: 0 default-by-variant: [] -- 2.25.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 2/5] bsps/stm32h7: import stm32h757i-eval QSPI memory high-level driver
Sponsored-By: Precidata --- .../stm32h757i-eval/stm32h747i_eval_conf.h| 130 ++ .../stm32h757i-eval/stm32h747i_eval_errno.h | 105 ++ .../stm32h757i-eval/stm32h747i_eval_qspi.c| 1088 + .../stm32h757i-eval/stm32h747i_eval_qspi.h| 284 + 4 files changed, 1607 insertions(+) create mode 100644 bsps/arm/stm32h7/boards/stm/stm32h757i-eval/stm32h747i_eval_conf.h create mode 100644 bsps/arm/stm32h7/boards/stm/stm32h757i-eval/stm32h747i_eval_errno.h create mode 100644 bsps/arm/stm32h7/boards/stm/stm32h757i-eval/stm32h747i_eval_qspi.c create mode 100644 bsps/arm/stm32h7/boards/stm/stm32h757i-eval/stm32h747i_eval_qspi.h diff --git a/bsps/arm/stm32h7/boards/stm/stm32h757i-eval/stm32h747i_eval_conf.h b/bsps/arm/stm32h7/boards/stm/stm32h757i-eval/stm32h747i_eval_conf.h new file mode 100644 index 00..673125eec3 --- /dev/null +++ b/bsps/arm/stm32h7/boards/stm/stm32h757i-eval/stm32h747i_eval_conf.h @@ -0,0 +1,130 @@ +/* SPDX-License-Identifier: BSD-3-Clause */ +/** + ** + * @filestm32h747i_eval_config.h + * @author MCD Application Team + * @brief STM32H747I_EVAL board configuration file. + ** + * @attention + * + * Copyright (c) 2019 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ** + */ +/* + * RTEMS committer clarification comment on license above: + * + * This file comes from STM32CubeH7 project and is located here: + * https://github.com/STMicroelectronics/STM32CubeH7/blob/master/Drivers/BSP/STM32H747I-EVAL/stm32h747i_eval_conf_template.h + * + * The file root directory is: + * https://github.com/STMicroelectronics/STM32CubeH7/tree/master/Drivers/BSP/STM32H747I-EVAL + * + * This directory contains LICENSE.md file with a following license text: + * + * Copyright 2019 STMicroelectronics. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its contributors + * may be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* Define to prevent recursive inclusion -*/ +#ifndef STM32H747I_EVAL_CONFIG_H +#define STM32H747I_EVAL_CONFIG_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* Includes --*/ +#include "stm32h7xx_hal.h" + + /* COM define */ +#define USE_COM_LOG 0U + + /* IO class usage define */ +#define USE_BSP_IO_CLASS1U + + /* JOY usage define */ +#define USE_BSP_JOY_FEATURE 1U + + /* POT usage define */ +#define USE_BSP_POT_FEATURE 1U + + /* LCD controllers defines */ +#define USE_LCD_CTRL_OTM8009A 1U +#define USE_LCD_CTRL_ADV75331U +#define LCD_LAYER_0_ADDRESS 0xD000U +#define LCD_LAYER_1_ADDRESS 0xD020U + + /* SD high performance usage define */ +#define USE_SD_HIGH_PERFORMANCE 0U + + /*DMA2D to fill RGB rectangle usage define*/ +#define USE_DMA2D_TO_FILL_RGB_RECT 0U + + /* Audio codecs defines */ +#define USE_AUDIO_CODEC_WM8994 1U +#define USE_AUDIO_CODEC_ADV7533
[PATCH 1/5] bsps/stm32h7: import MT25TL01G QSPI memory low-level driver
Sponsored-By: Precidata --- .../stm/Components/mt25tl01g/mt25tl01g.c | 1046 + .../stm/Components/mt25tl01g/mt25tl01g.h | 362 ++ .../stm/Components/mt25tl01g/mt25tl01g_conf.h | 68 ++ 3 files changed, 1476 insertions(+) create mode 100644 bsps/arm/stm32h7/boards/stm/Components/mt25tl01g/mt25tl01g.c create mode 100644 bsps/arm/stm32h7/boards/stm/Components/mt25tl01g/mt25tl01g.h create mode 100644 bsps/arm/stm32h7/boards/stm/Components/mt25tl01g/mt25tl01g_conf.h diff --git a/bsps/arm/stm32h7/boards/stm/Components/mt25tl01g/mt25tl01g.c b/bsps/arm/stm32h7/boards/stm/Components/mt25tl01g/mt25tl01g.c new file mode 100644 index 00..740cdbbd27 --- /dev/null +++ b/bsps/arm/stm32h7/boards/stm/Components/mt25tl01g/mt25tl01g.c @@ -0,0 +1,1046 @@ +/* SPDX-License-Identifier: BSD-3-Clause */ +/** + ** + * @fileMT25TL01G.c + * @author MCD Application Team + * @brief This file provides the MT25TL01G QSPI driver. + ** + * @attention + * + * Copyright (c) 2016 STMicroelectronics. + * All rights reserved. + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + *opensource.org/licenses/BSD-3-Clause + * + ** + */ +/* Includes --*/ +#include "mt25tl01g.h" +/** @addtogroup BSP + * @{ + */ + +/** @addtogroup Components + * @{ + */ + +/** @addtogroup MT25TL01G + * @brief This file provides a set of functions needed to drive the + * MT25TL01G QSPI memory. + * @{ + */ +/** @defgroup MT25TL01G_Exported_Functions MT25TL01G Exported Functions + * @{ + */ + +/** + * @brief Return the configuration of the QSPI memory. + * @param pInfo pointer on the configuration structure + * @retval QSPI memory status + */ +int32_t MT25TL01G_GetFlashInfo(MT25TL01G_Info_t *pInfo) +{ + pInfo->FlashSize = MT25TL01G_FLASH_SIZE; + pInfo->EraseSectorSize= (2 * MT25TL01G_SUBSECTOR_SIZE); + pInfo->ProgPageSize = MT25TL01G_PAGE_SIZE; + pInfo->EraseSectorsNumber = (MT25TL01G_FLASH_SIZE/pInfo->EraseSectorSize); + pInfo->ProgPagesNumber= (MT25TL01G_FLASH_SIZE/pInfo->ProgPageSize); + return MT25TL01G_OK; +} + +/** + * @brief This function set the QSPI memory in 4-byte address mode + * SPI/QPI; 1-0-1/4-0-4 + * @param Ctx Component object pointer + * @param Mode Interface mode + * @retval QSPI memory status + */ +int32_t MT25TL01G_Enter4BytesAddressMode(QSPI_HandleTypeDef *Ctx, MT25TL01G_Interface_t Mode) +{ + QSPI_CommandTypeDef s_command; + + /* Initialize the command */ + s_command.InstructionMode = (Mode == MT25TL01G_QPI_MODE) ? QSPI_INSTRUCTION_4_LINES : QSPI_INSTRUCTION_1_LINE; + s_command.Instruction = MT25TL01G_ENTER_4_BYTE_ADDR_MODE_CMD; + s_command.AddressMode = QSPI_ADDRESS_NONE; + s_command.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE; + s_command.DataMode = QSPI_DATA_NONE; + s_command.DummyCycles = 0; + s_command.DdrMode = QSPI_DDR_MODE_DISABLE; + s_command.DdrHoldHalfCycle = QSPI_DDR_HHC_ANALOG_DELAY; + s_command.SIOOMode = QSPI_SIOO_INST_EVERY_CMD; + + /*write enable */ + if( MT25TL01G_WriteEnable(Ctx,Mode)!=MT25TL01G_OK) + { +return MT25TL01G_ERROR_COMMAND; + } + /* Send the command */ + if (HAL_QSPI_Command(Ctx, _command, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) + { +return MT25TL01G_ERROR_COMMAND; + } + + /* Configure automatic polling mode to wait the memory is ready */ + else if(MT25TL01G_AutoPollingMemReady(Ctx,Mode)!=MT25TL01G_OK) + { +return MT25TL01G_ERROR_COMMAND; + } + + return MT25TL01G_OK; +} + +/** + * @brief Flash exit 4 Byte address mode. Effect 3/4 address byte commands only. + * SPI/QPI; 1-0-0/4-0-0 + * @param Ctx Component object pointer + * @param Mode Interface mode + * @retval QSPI memory status + */ +int32_t MT25TL01G_Exit4BytesAddressMode(QSPI_HandleTypeDef *Ctx, MT25TL01G_Interface_t Mode) +{ + QSPI_CommandTypeDef s_command; + + /* Initialize the command */ + s_command.InstructionMode = (Mode == MT25TL01G_QPI_MODE) ? QSPI_INSTRUCTION_4_LINES : QSPI_INSTRUCTION_1_LINE; + s_command.Instruction = MT25TL01G_EXIT_4_BYTE_ADDR_MODE_CMD; + s_command.AddressMode = QSPI_ADDRESS_NONE; + s_command.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE; + s_command.DataMode = QSPI_DATA_NONE; + s_command.DummyCycles = 0; + s_command.DdrMode = QSPI_DDR_MODE_DISABLE; + s_command.DdrHoldHalfCycle = QSPI_DDR_HHC_ANALOG_DELAY; + s_command.SIOOMode =
Re: [PATCH v2] kern_tc.c: Update pps_event() for uniprocessor configurations
On 10.06.22 11:05, Gabriel Moyano wrote: Since pps->capgen equal to zero is not a special value in uniprocessor configurations, there is no need to check for this condition. Thanks, I checked it in. -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu...@embedded-brains.de phone: +49-89-18 94 741 - 16 fax: +49-89-18 94 741 - 08 Registergericht: Amtsgericht München Registernummer: HRB 157899 Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler Unsere Datenschutzerklärung finden Sie hier: https://embedded-brains.de/datenschutzerklaerung/ ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH v2] kern_tc.c: Update pps_event() for uniprocessor configurations
Since pps->capgen equal to zero is not a special value in uniprocessor configurations, there is no need to check for this condition. Update #2349 --- cpukit/score/src/kern_tc.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/cpukit/score/src/kern_tc.c b/cpukit/score/src/kern_tc.c index 92739d8edd..78d7fa1e3f 100644 --- a/cpukit/score/src/kern_tc.c +++ b/cpukit/score/src/kern_tc.c @@ -2138,9 +2138,11 @@ pps_capture(struct pps_state *pps) pps->capffth = fftimehands; #endif pps->capcount = th->th_counter->tc_get_timecount(th->th_counter); +#if defined(RTEMS_SMP) atomic_thread_fence_acq(); if (pps->capgen != th->th_generation) pps->capgen = 0; +#endif } void @@ -2165,7 +2167,11 @@ pps_event(struct pps_state *pps, int event) if ((event & pps->ppsparam.mode) == 0) return; /* If the timecounter was wound up underneath us, bail out. */ +#if defined(RTEMS_SMP) if (pps->capgen == 0 || pps->capgen != +#else + if (pps->capgen != +#endif atomic_load_acq_int(>capth->th_generation)) return; -- 2.25.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
AW: [PATCH] kern_tc.c: Update pps_event() for uniprocessor configurations
> On 10.06.22 09:20, Gabriel Moyano wrote: > > Since pps->capgen is not used in uniprocessor configurations, there is > > no need to verified if it is equal to zero > > The pps->capgen is used in uniprocessor configurations. The difference to the > SMP configuration is that zero is not a special value. > Thx, I'll improve this description in the next patch version ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH] kern_tc.c: Update pps_event() for uniprocessor configurations
On 10.06.22 09:20, Gabriel Moyano wrote: Since pps->capgen is not used in uniprocessor configurations, there is no need to verified if it is equal to zero The pps->capgen is used in uniprocessor configurations. The difference to the SMP configuration is that zero is not a special value. -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu...@embedded-brains.de phone: +49-89-18 94 741 - 16 fax: +49-89-18 94 741 - 08 Registergericht: Amtsgericht München Registernummer: HRB 157899 Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler Unsere Datenschutzerklärung finden Sie hier: https://embedded-brains.de/datenschutzerklaerung/ ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 13/13] jffs2: Update baseline version to Linux v5.9
--- cpukit/libfs/src/jffs2/VERSION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpukit/libfs/src/jffs2/VERSION b/cpukit/libfs/src/jffs2/VERSION index 7d9c9f41b2..b13bed5750 100644 --- a/cpukit/libfs/src/jffs2/VERSION +++ b/cpukit/libfs/src/jffs2/VERSION @@ -1,9 +1,9 @@ -This directory contains a port of the JFFS2 file system from Linux v4.17. +This directory contains a port of the JFFS2 file system from Linux v5.9. To update to a newer Linux version use this command in a Git clone of Linux to generate the relevant patches: - git format-patch v4.17..v9.99 -- + git format-patch v5.9..v9.99 -- include/uapi/linux/jffs2.h \ fs/jffs2/LICENCE \ fs/jffs2/acl.h \ -- 2.35.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 05/13] jffs2: Fix possible null-pointer dereferences in jffs2_add_frag_to_fragtree()
From: Jia-Ju Bai In jffs2_add_frag_to_fragtree(), there is an if statement on line 223 to check whether "this" is NULL: if (this) When "this" is NULL, it is used at several places, such as on line 249: if (this->node) and on line 260: if (newfrag->ofs > this->ofs) Thus possible null-pointer dereferences may occur. To fix these bugs, -EINVAL is returned when "this" is NULL. These bugs are found by a static analysis tool STCheck written by us. Signed-off-by: Jia-Ju Bai Signed-off-by: Richard Weinberger --- cpukit/libfs/src/jffs2/src/nodelist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpukit/libfs/src/jffs2/src/nodelist.c b/cpukit/libfs/src/jffs2/src/nodelist.c index ee44024c92..86dd8e60d1 100644 --- a/cpukit/libfs/src/jffs2/src/nodelist.c +++ b/cpukit/libfs/src/jffs2/src/nodelist.c @@ -228,7 +228,7 @@ static int jffs2_add_frag_to_fragtree(struct jffs2_sb_info *c, struct rb_root *r lastend = this->ofs + this->size; } else { dbg_fragtree2("lookup gave no frag\n"); - lastend = 0; + return -EINVAL; } /* See if we ran off the end of the fragtree */ -- 2.35.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 09/13] jffs2: Replace zero-length array with flexible-array
From: "Gustavo A. R. Silva" There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://github.com/KSPP/linux/issues/21 Signed-off-by: Gustavo A. R. Silva --- cpukit/libfs/src/jffs2/src/nodelist.h | 2 +- cpukit/libfs/src/jffs2/src/summary.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cpukit/libfs/src/jffs2/src/nodelist.h b/cpukit/libfs/src/jffs2/src/nodelist.h index 143f60dbcb..4eee0ac8ff 100644 --- a/cpukit/libfs/src/jffs2/src/nodelist.h +++ b/cpukit/libfs/src/jffs2/src/nodelist.h @@ -259,7 +259,7 @@ struct jffs2_full_dirent uint32_t ino; /* == zero for unlink */ unsigned int nhash; unsigned char type; - unsigned char name[0]; + unsigned char name[]; }; /* diff --git a/cpukit/libfs/src/jffs2/src/summary.h b/cpukit/libfs/src/jffs2/src/summary.h index 60207a2ae9..e4131cb1f1 100644 --- a/cpukit/libfs/src/jffs2/src/summary.h +++ b/cpukit/libfs/src/jffs2/src/summary.h @@ -61,7 +61,7 @@ struct jffs2_sum_dirent_flash jint32_t ino; /* == zero for unlink */ uint8_t nsize; /* dirent name size */ uint8_t type; /* dirent type */ - uint8_t name[0];/* dirent name */ + uint8_t name[]; /* dirent name */ } __attribute__((packed)); struct jffs2_sum_xattr_flash @@ -117,7 +117,7 @@ struct jffs2_sum_dirent_mem jint32_t ino; /* == zero for unlink */ uint8_t nsize; /* dirent name size */ uint8_t type; /* dirent type */ - uint8_t name[0];/* dirent name */ + uint8_t name[]; /* dirent name */ } __attribute__((packed)); struct jffs2_sum_xattr_mem -- 2.35.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 06/13] jffs2: Remove jffs2_gc_fetch_page and jffs2_gc_release_page
From: Christoph Hellwig Merge these two helpers into the only callers to get rid of some amazingly bad calling conventions. Suggested-by: Al Viro Signed-off-by: Christoph Hellwig Signed-off-by: Richard Weinberger --- cpukit/libfs/src/jffs2/src/fs-rtems.c | 24 -- cpukit/libfs/src/jffs2/src/gc.c | 35 +-- cpukit/libfs/src/jffs2/src/os-rtems.h | 3 --- 3 files changed, 27 insertions(+), 35 deletions(-) diff --git a/cpukit/libfs/src/jffs2/src/fs-rtems.c b/cpukit/libfs/src/jffs2/src/fs-rtems.c index 8bc3d85cc3..b863c74547 100644 --- a/cpukit/libfs/src/jffs2/src/fs-rtems.c +++ b/cpukit/libfs/src/jffs2/src/fs-rtems.c @@ -1316,30 +1316,6 @@ int rtems_jffs2_initialize( // //== -unsigned char *jffs2_gc_fetch_page(struct jffs2_sb_info *c, - struct jffs2_inode_info *f, - unsigned long offset, - unsigned long *priv) -{ - int ret; - struct super_block *sb = OFNI_BS_2SFFJ(c); - unsigned char *gc_buffer = >s_gc_buffer[0]; - - ret = jffs2_read_inode_range(c, f, gc_buffer, -offset & ~(PAGE_CACHE_SIZE-1), PAGE_CACHE_SIZE); - if (ret) - return ERR_PTR(ret); - - return gc_buffer; -} - -void jffs2_gc_release_page(struct jffs2_sb_info *c, - unsigned char *ptr, - unsigned long *priv) -{ - /* Do nothing */ -} - static struct _inode *new_inode(struct super_block *sb) { diff --git a/cpukit/libfs/src/jffs2/src/gc.c b/cpukit/libfs/src/jffs2/src/gc.c index f557075ab8..04ec073d2b 100644 --- a/cpukit/libfs/src/jffs2/src/gc.c +++ b/cpukit/libfs/src/jffs2/src/gc.c @@ -1173,12 +1173,17 @@ static int jffs2_garbage_collect_dnode(struct jffs2_sb_info *c, struct jffs2_era struct jffs2_inode_info *f, struct jffs2_full_dnode *fn, uint32_t start, uint32_t end) { +#ifndef __rtems__ + struct inode *inode = OFNI_EDONI_2SFFJ(f); +#endif /* __rtems__ */ struct jffs2_full_dnode *new_fn; struct jffs2_raw_inode ri; uint32_t alloclen, offset, orig_end, orig_start; int ret = 0; unsigned char *comprbuf = NULL, *writebuf; - unsigned long pg; +#ifndef __rtems__ + struct page *page; +#endif /* __rtems__ */ unsigned char *pg_ptr; memset(, 0, sizeof(ri)); @@ -1333,15 +1338,26 @@ static int jffs2_garbage_collect_dnode(struct jffs2_sb_info *c, struct jffs2_era * end up here trying to GC the *same* page that jffs2_write_begin() is * trying to write out, read_cache_page() will not deadlock. */ mutex_unlock(>sem); - pg_ptr = jffs2_gc_fetch_page(c, f, start, ); - mutex_lock(>sem); - - if (IS_ERR(pg_ptr)) { +#ifndef __rtems__ + page = read_cache_page(inode->i_mapping, start >> PAGE_SHIFT, + jffs2_do_readpage_unlock, inode); + if (IS_ERR(page)) { pr_warn("read_cache_page() returned error: %ld\n", - PTR_ERR(pg_ptr)); - return PTR_ERR(pg_ptr); + PTR_ERR(page)); + mutex_lock(>sem); + return PTR_ERR(page); } + pg_ptr = kmap(page); +#else /* __rtems__ */ + pg_ptr = _BS_2SFFJ(c)->s_gc_buffer[0]; + ret = jffs2_read_inode_range(c, f, pg_ptr, +start & ~(PAGE_CACHE_SIZE-1), PAGE_CACHE_SIZE); + if (ret) + return ret; +#endif /* __rtems__ */ + mutex_lock(>sem); + offset = start; while(offset < orig_end) { uint32_t datalen; @@ -1404,6 +1420,9 @@ static int jffs2_garbage_collect_dnode(struct jffs2_sb_info *c, struct jffs2_era } } - jffs2_gc_release_page(c, pg_ptr, ); +#ifndef __rtems__ + kunmap(page); + put_page(page); +#endif /* __rtems__ */ return ret; } diff --git a/cpukit/libfs/src/jffs2/src/os-rtems.h b/cpukit/libfs/src/jffs2/src/os-rtems.h index 0bec517691..d9e4330371 100644 --- a/cpukit/libfs/src/jffs2/src/os-rtems.h +++ b/cpukit/libfs/src/jffs2/src/os-rtems.h @@ -136,9 +136,6 @@ struct _inode *jffs2_iget(struct super_block *sb, cyg_uint32 ino); void jffs2_iput(struct _inode * i); void jffs2_gc_release_inode(struct jffs2_sb_info *c, struct jffs2_inode_info *f); struct jffs2_inode_info *jffs2_gc_fetch_inode(struct jffs2_sb_info *c, int inum, int nlink); -unsigned char *jffs2_gc_fetch_page(struct jffs2_sb_info *c, struct jffs2_inode_info *f, - unsigned long offset, unsigned long *priv); -void jffs2_gc_release_page(struct jffs2_sb_info *c, unsigned char *pg, unsigned long *priv); /* Avoid polluting RTEMS namespace with names not starting in jffs2_
[PATCH 07/13] jffs2: Fix memory leak in jffs2_scan_eraseblock() error path
From: Wenwen Wang In jffs2_scan_eraseblock(), 'sumptr' is allocated through kmalloc() if 'sumlen' is larger than 'buf_size'. However, it is not deallocated in the following execution if jffs2_fill_scan_buf() fails, leading to a memory leak bug. To fix this issue, free 'sumptr' before returning the error. Signed-off-by: Wenwen Wang Signed-off-by: Richard Weinberger --- cpukit/libfs/src/jffs2/src/scan.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cpukit/libfs/src/jffs2/src/scan.c b/cpukit/libfs/src/jffs2/src/scan.c index 177a0cdd3f..d5441448b0 100644 --- a/cpukit/libfs/src/jffs2/src/scan.c +++ b/cpukit/libfs/src/jffs2/src/scan.c @@ -530,8 +530,11 @@ static int jffs2_scan_eraseblock (struct jffs2_sb_info *c, struct jffs2_eraseblo err = jffs2_fill_scan_buf(c, sumptr, jeb->offset + c->sector_size - sumlen, sumlen - buf_len); - if (err) + if (err) { + if (sumlen > buf_size) + kfree(sumptr); return err; + } } } -- 2.35.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 08/13] Revert "jffs2: Fix possible null-pointer dereferences in jffs2_add_frag_to_fragtree()"
From: Joel Stanley This reverts commit f2538f999345405f7d2e1194c0c8efa4e11f7b3a. The patch stopped JFFS2 from being able to mount an existing filesystem with the following errors: jffs2: error: (77) jffs2_build_inode_fragtree: Add node to tree failed -22 jffs2: error: (77) jffs2_do_read_inode_internal: Failed to build final fragtree for inode #5377: error -22 Fixes: f2538f999345 ("jffs2: Fix possible null-pointer dereferences...") Cc: sta...@vger.kernel.org Suggested-by: Hou Tao Signed-off-by: Joel Stanley Signed-off-by: Richard Weinberger --- cpukit/libfs/src/jffs2/src/nodelist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpukit/libfs/src/jffs2/src/nodelist.c b/cpukit/libfs/src/jffs2/src/nodelist.c index 86dd8e60d1..ee44024c92 100644 --- a/cpukit/libfs/src/jffs2/src/nodelist.c +++ b/cpukit/libfs/src/jffs2/src/nodelist.c @@ -228,7 +228,7 @@ static int jffs2_add_frag_to_fragtree(struct jffs2_sb_info *c, struct rb_root *r lastend = this->ofs + this->size; } else { dbg_fragtree2("lookup gave no frag\n"); - return -EINVAL; + lastend = 0; } /* See if we ran off the end of the fragtree */ -- 2.35.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 12/13] treewide: Use fallthrough pseudo-keyword
From: "Gustavo A. R. Silva" Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva --- cpukit/libfs/src/jffs2/src/readinode.c | 2 +- cpukit/libfs/src/jffs2/src/rtems-jffs2-config.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cpukit/libfs/src/jffs2/src/readinode.c b/cpukit/libfs/src/jffs2/src/readinode.c index c4e32ead47..831fb8f3f9 100644 --- a/cpukit/libfs/src/jffs2/src/readinode.c +++ b/cpukit/libfs/src/jffs2/src/readinode.c @@ -1294,7 +1294,7 @@ static int jffs2_do_read_inode_internal(struct jffs2_sb_info *c, dbg_readinode("symlink's target '%s' cached\n", f->target); } - /* fall through... */ + fallthrough; case S_IFBLK: case S_IFCHR: diff --git a/cpukit/libfs/src/jffs2/src/rtems-jffs2-config.h b/cpukit/libfs/src/jffs2/src/rtems-jffs2-config.h index 1017a71c1f..56395e1528 100644 --- a/cpukit/libfs/src/jffs2/src/rtems-jffs2-config.h +++ b/cpukit/libfs/src/jffs2/src/rtems-jffs2-config.h @@ -33,3 +33,4 @@ #define __ECOS 1 #define KBUILD_MODNAME "JFFS2" +#define fallthrough __attribute__((__fallthrough__)) -- 2.35.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 10/13] treewide: Remove uninitialized_var() usage
From: Kees Cook Using uninitialized_var() is dangerous as it papers over real bugs[1] (or can in the future), and suppresses unrelated compiler warnings (e.g. "unused variable"). If the compiler thinks it is uninitialized, either simply initialize the variable or make compiler changes. In preparation for removing[2] the[3] macro[4], remove all remaining needless uses with the following script: git grep '\buninitialized_var\b' | cut -d: -f1 | sort -u | \ xargs perl -pi -e \ 's/\buninitialized_var\(([^\)]+)\)/\1/g; s:\s*/\* (GCC be quiet|to make compiler happy) \*/$::g;' drivers/video/fbdev/riva/riva_hw.c was manually tweaked to avoid pathological white-space. No outstanding warnings were found building allmodconfig with GCC 9.3.0 for x86_64, i386, arm64, arm, powerpc, powerpc64le, s390x, mips, sparc64, alpha, and m68k. [1] https://lore.kernel.org/lkml/20200603174714.192027-1-gli...@google.com/ [2] https://lore.kernel.org/lkml/CA+55aFw+Vbj0i=1tgqcr5vqkczwj0qxk6cernou6eedsuda...@mail.gmail.com/ [3] https://lore.kernel.org/lkml/ca+55afwgbgqhbp1fkxvrkepzyr5j8n1vkt1vzdz9knmpuxh...@mail.gmail.com/ [4] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yvju65tplgn_ybynv0ve...@mail.gmail.com/ Reviewed-by: Leon Romanovsky # drivers/infiniband and mlx4/mlx5 Acked-by: Jason Gunthorpe # IB Acked-by: Kalle Valo # wireless drivers Reviewed-by: Chao Yu # erofs Signed-off-by: Kees Cook --- cpukit/libfs/src/jffs2/src/erase.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpukit/libfs/src/jffs2/src/erase.c b/cpukit/libfs/src/jffs2/src/erase.c index 9afaea..e8ab569462 100644 --- a/cpukit/libfs/src/jffs2/src/erase.c +++ b/cpukit/libfs/src/jffs2/src/erase.c @@ -403,7 +403,7 @@ static void jffs2_mark_erased_block(struct jffs2_sb_info *c, struct jffs2_eraseb { size_t retlen; int ret; - uint32_t uninitialized_var(bad_offset); + uint32_t bad_offset; switch (jffs2_block_check_erase(c, jeb, _offset)) { case -EAGAIN: goto refile; -- 2.35.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 11/13] jffs2: fix jffs2 mounting failure
From: Zhe Li Thanks for the advice mentioned in the email. This is my v3 patch for this problem. Mounting jffs2 on nand flash will get message "failed: I/O error" with the steps listed below. 1.umount jffs2 2.erase nand flash 3.mount jffs2 on it (this mounting operation will be successful) 4.do chown or chmod to the mount point directory 5.umount jffs2 6.mount jffs2 on nand flash After step 6, we will get message "mount ... failed: I/O error". Typical image of this problem is like: Empty space found from 0x to 0x008a Inode node at xx, totlen 0x0044, #ino 1, version 1, isize 0... The reason for this mounting failure is that at the end of function jffs2_scan_medium(), jffs2 will check the used_size and some info of nr_blocks.If conditions are met, it will return -EIO. The detail is that, in the steps listed above, step 4 will write jffs2_raw_inode into flash without jffs2_raw_dirent, which will cause that there are some jffs2_raw_inode but no jffs2_raw_dirent on flash. This will meet the condition at the end of function jffs2_scan_medium() and return -EIO if we umount jffs2 and mount it again. We notice that jffs2 add the value of c->unchecked_size if we find an inode node while mounting. And jffs2 will never add the value of c->unchecked_size in other situations. So this patch add one more condition about c->unchecked_size of the judgement to fix this problem. Signed-off-by: Zhe Li Signed-off-by: Richard Weinberger --- cpukit/libfs/src/jffs2/src/scan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpukit/libfs/src/jffs2/src/scan.c b/cpukit/libfs/src/jffs2/src/scan.c index d5441448b0..765bf55478 100644 --- a/cpukit/libfs/src/jffs2/src/scan.c +++ b/cpukit/libfs/src/jffs2/src/scan.c @@ -264,7 +264,8 @@ int jffs2_scan_medium(struct jffs2_sb_info *c) } #endif if (c->nr_erasing_blocks) { - if ( !c->used_size && ((c->nr_free_blocks+empty_blocks+bad_blocks)!= c->nr_blocks || bad_blocks == c->nr_blocks) ) { + if (!c->used_size && !c->unchecked_size && + ((c->nr_free_blocks+empty_blocks+bad_blocks) != c->nr_blocks || bad_blocks == c->nr_blocks)) { pr_notice("Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes\n"); pr_notice("empty_blocks %d, bad_blocks %d, c->nr_blocks %d\n", empty_blocks, bad_blocks, c->nr_blocks); -- 2.35.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 02/13] Convert jffs2 acl to struct_size
From: Matthew Wilcox Need to tell the compiler that the acl entries follow the acl header. Signed-off-by: Matthew Wilcox Signed-off-by: Kees Cook --- cpukit/libfs/src/jffs2/src/acl.h | 1 + 1 file changed, 1 insertion(+) diff --git a/cpukit/libfs/src/jffs2/src/acl.h b/cpukit/libfs/src/jffs2/src/acl.h index 2e2b5745c3..12d0271bdd 100644 --- a/cpukit/libfs/src/jffs2/src/acl.h +++ b/cpukit/libfs/src/jffs2/src/acl.h @@ -22,6 +22,7 @@ struct jffs2_acl_entry_short { struct jffs2_acl_header { jint32_ta_version; + struct jffs2_acl_entry a_entries[]; }; #ifdef CONFIG_JFFS2_FS_POSIX_ACL -- 2.35.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 04/13] jffs2: Remove C++ style comments from uapi header
From: Masahiro Yamada Linux kernel tolerates C++ style comments these days. Actually, the SPDX License tags for .c files start with //. On the other hand, uapi headers are written in more strict C, where the C++ comment style is forbidden. I simply dropped these lines instead of fixing the comment style. This code has been always commented out since it was added around Linux 2.4.9 (i.e. commented out for more than 17 years). 'Maybe later...' will never happen. Signed-off-by: Masahiro Yamada Acked-by: Richard Weinberger Signed-off-by: Richard Weinberger --- cpukit/libfs/src/jffs2/include/linux/jffs2.h | 5 - 1 file changed, 5 deletions(-) diff --git a/cpukit/libfs/src/jffs2/include/linux/jffs2.h b/cpukit/libfs/src/jffs2/include/linux/jffs2.h index a18b719f49..784ba0b969 100644 --- a/cpukit/libfs/src/jffs2/include/linux/jffs2.h +++ b/cpukit/libfs/src/jffs2/include/linux/jffs2.h @@ -77,11 +77,6 @@ #define JFFS2_ACL_VERSION 0x0001 -// Maybe later... -//#define JFFS2_NODETYPE_CHECKPOINT (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 3) -//#define JFFS2_NODETYPE_OPTIONS (JFFS2_FEATURE_RWCOMPAT_COPY | JFFS2_NODE_ACCURATE | 4) - - #define JFFS2_INO_FLAG_PREREAD 1 /* Do read_inode() for this one at mount time, don't wait for it to happen later */ -- 2.35.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 01/13] jffs2: Use RTEMS_CONTAINER_OF
--- cpukit/libfs/src/jffs2/src/os-rtems.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpukit/libfs/src/jffs2/src/os-rtems.h b/cpukit/libfs/src/jffs2/src/os-rtems.h index db1be61e67..0bec517691 100644 --- a/cpukit/libfs/src/jffs2/src/os-rtems.h +++ b/cpukit/libfs/src/jffs2/src/os-rtems.h @@ -56,7 +56,7 @@ static inline unsigned int full_name_hash(const void *salt, const unsigned char #define jffs2_can_mark_obsolete(c) (1) #define JFFS2_INODE_INFO(i) (&(i)->jffs2_i) -#define OFNI_EDONI_2SFFJ(f) ((struct _inode *) ( ((char *)f) - ((char *)(&((struct _inode *)NULL)->jffs2_i)) ) ) +#define OFNI_EDONI_2SFFJ(f) RTEMS_CONTAINER_OF(f, struct _inode, jffs2_i) #define ITIME(sec) (sec) #define I_SEC(tv) (tv) -- 2.35.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 03/13] jffs2: fix use-after-free on symlink traversal
From: Al Viro free the symlink body after the same RCU delay we have for freeing the struct inode itself, so that traversal during RCU pathwalk wouldn't step into freed memory. Signed-off-by: Al Viro --- cpukit/libfs/src/jffs2/src/readinode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpukit/libfs/src/jffs2/src/readinode.c b/cpukit/libfs/src/jffs2/src/readinode.c index e6c9452c03..c4e32ead47 100644 --- a/cpukit/libfs/src/jffs2/src/readinode.c +++ b/cpukit/libfs/src/jffs2/src/readinode.c @@ -1434,11 +1434,12 @@ void jffs2_do_clear_inode(struct jffs2_sb_info *c, struct jffs2_inode_info *f) } jffs2_kill_fragtree(>fragtree, deleted?c:NULL); - +#ifdef __rtems__ if (f->target) { kfree(f->target); f->target = NULL; } +#endif /* __rtems__ */ fds = f->dents; while(fds) { -- 2.35.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 00/13] jffs2: Update baseline version to Linux v5.9
Al Viro (1): jffs2: fix use-after-free on symlink traversal Christoph Hellwig (1): jffs2: Remove jffs2_gc_fetch_page and jffs2_gc_release_page Gustavo A. R. Silva (2): jffs2: Replace zero-length array with flexible-array treewide: Use fallthrough pseudo-keyword Jia-Ju Bai (1): jffs2: Fix possible null-pointer dereferences in jffs2_add_frag_to_fragtree() Joel Stanley (1): Revert "jffs2: Fix possible null-pointer dereferences in jffs2_add_frag_to_fragtree()" Kees Cook (1): treewide: Remove uninitialized_var() usage Masahiro Yamada (1): jffs2: Remove C++ style comments from uapi header Matthew Wilcox (1): Convert jffs2 acl to struct_size Sebastian Huber (2): jffs2: Use RTEMS_CONTAINER_OF jffs2: Update baseline version to Linux v5.9 Wenwen Wang (1): jffs2: Fix memory leak in jffs2_scan_eraseblock() error path Zhe Li (1): jffs2: fix jffs2 mounting failure cpukit/libfs/src/jffs2/VERSION| 4 +-- cpukit/libfs/src/jffs2/include/linux/jffs2.h | 5 --- cpukit/libfs/src/jffs2/src/acl.h | 1 + cpukit/libfs/src/jffs2/src/erase.c| 2 +- cpukit/libfs/src/jffs2/src/fs-rtems.c | 24 - cpukit/libfs/src/jffs2/src/gc.c | 35 ++- cpukit/libfs/src/jffs2/src/nodelist.h | 2 +- cpukit/libfs/src/jffs2/src/os-rtems.h | 5 +-- cpukit/libfs/src/jffs2/src/readinode.c| 5 +-- .../libfs/src/jffs2/src/rtems-jffs2-config.h | 1 + cpukit/libfs/src/jffs2/src/scan.c | 8 +++-- cpukit/libfs/src/jffs2/src/summary.h | 4 +-- 12 files changed, 45 insertions(+), 51 deletions(-) -- 2.35.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH] kern_tc.c: Update pps_event() for uniprocessor configurations
Since pps->capgen is not used in uniprocessor configurations, there is no need to verified if it is equal to zero Update #2349 --- cpukit/score/src/kern_tc.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/cpukit/score/src/kern_tc.c b/cpukit/score/src/kern_tc.c index 92739d8edd..78d7fa1e3f 100644 --- a/cpukit/score/src/kern_tc.c +++ b/cpukit/score/src/kern_tc.c @@ -2138,9 +2138,11 @@ pps_capture(struct pps_state *pps) pps->capffth = fftimehands; #endif pps->capcount = th->th_counter->tc_get_timecount(th->th_counter); +#if defined(RTEMS_SMP) atomic_thread_fence_acq(); if (pps->capgen != th->th_generation) pps->capgen = 0; +#endif } void @@ -2165,7 +2167,11 @@ pps_event(struct pps_state *pps, int event) if ((event & pps->ppsparam.mode) == 0) return; /* If the timecounter was wound up underneath us, bail out. */ +#if defined(RTEMS_SMP) if (pps->capgen == 0 || pps->capgen != +#else + if (pps->capgen != +#endif atomic_load_acq_int(>capth->th_generation)) return; -- 2.25.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: AW: AW: AW: AW: [PATCH] kern_tc.c: Update pps_event() for uniprocessor configurations
On 10.06.22 09:09, gabriel.moy...@dlr.de wrote: On 08.06.22 09:54,gabriel.moy...@dlr.de wrote: I don't know why there is this "if" in the code. I will ask on a FreeBSD mailing list. I think it is for the case that th_generation has changed in between saving the th and th_counter. If this happens pps->capgen is set to 0 and later pps_event() returns earlier. Since for uniprocessor th_generation equal to 0 is not used, I guess we can removed this if for those configurations I asked on a FreeBSD mailing list: https://lists.freebsd.org/archives/freebsd-hackers/2022-June/001165 .h tml Thanks for asking. I'll prepare and send a new patch removing the "if" for uniprocessor configurations just in case. Please wait with a new patch for a response from FreeBSD. What is your suggestion here? Should we check the generation only once? Or should we leave the code as is and just remove the "if" in pps_capture() for uniprocessor configurations since th_generation equal to zero is not used? We should first leave the code as is. I don't know when I have time to send patches to FreeBSD. I would like it to be considered to remove the parts where th_generation is checked to be equal to zero just for uniprocessor configurations. The reason is that porting back these changes to RTEMS 5, the test sppps01 fails because th_generation starts with value zero. Not sure why in RTEMS 6 th_generation starts with one but since in uniprocessor configuration th_generation equal zero is not used, I think it makes sense to not consider that case. Yes, please fix this. What I meant is that we should not change the FreeBSD code in general. -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu...@embedded-brains.de phone: +49-89-18 94 741 - 16 fax: +49-89-18 94 741 - 08 Registergericht: Amtsgericht München Registernummer: HRB 157899 Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler Unsere Datenschutzerklärung finden Sie hier: https://embedded-brains.de/datenschutzerklaerung/ ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
AW: AW: AW: AW: [PATCH] kern_tc.c: Update pps_event() for uniprocessor configurations
> On 08.06.22 09:54, gabriel.moy...@dlr.de wrote: > >> I don't know why there is this "if" in the code. I will ask on a > >> FreeBSD mailing list. > >> > > I think it is for the case that th_generation has changed in > > between saving the th and th_counter. If this happens pps->capgen > > is set to > > 0 and later pps_event() returns earlier. Since for uniprocessor > > th_generation equal to 0 is not used, I guess we can removed this > > if for those configurations > I asked on a FreeBSD mailing list: > > https://lists.freebsd.org/archives/freebsd-hackers/2022-June/001165 > .h > tml > > >>> Thanks for asking. > >>> I'll prepare and send a new patch removing the "if" for uniprocessor > >>> configurations just in case. > >> Please wait with a new patch for a response from FreeBSD. > >> > > What is your suggestion here? Should we check the generation only once? Or > > should we leave the code as is and just remove the > "if" in pps_capture() for uniprocessor configurations since th_generation > equal to zero is not used? > > We should first leave the code as is. I don't know when I have time to send > patches to FreeBSD. > I would like it to be considered to remove the parts where th_generation is checked to be equal to zero just for uniprocessor configurations. The reason is that porting back these changes to RTEMS 5, the test sppps01 fails because th_generation starts with value zero. Not sure why in RTEMS 6 th_generation starts with one but since in uniprocessor configuration th_generation equal zero is not used, I think it makes sense to not consider that case. ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: AW: AW: AW: [PATCH] kern_tc.c: Update pps_event() for uniprocessor configurations
On 08.06.22 09:54, gabriel.moy...@dlr.de wrote: I don't know why there is this "if" in the code. I will ask on a FreeBSD mailing list. I think it is for the case that th_generation has changed in between saving the th and th_counter. If this happens pps->capgen is set to 0 and later pps_event() returns earlier. Since for uniprocessor th_generation equal to 0 is not used, I guess we can removed this if for those configurations I asked on a FreeBSD mailing list: https://lists.freebsd.org/archives/freebsd-hackers/2022-June/001165.h tml Thanks for asking. I'll prepare and send a new patch removing the "if" for uniprocessor configurations just in case. Please wait with a new patch for a response from FreeBSD. What is your suggestion here? Should we check the generation only once? Or should we leave the code as is and just remove the "if" in pps_capture() for uniprocessor configurations since th_generation equal to zero is not used? We should first leave the code as is. I don't know when I have time to send patches to FreeBSD. -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu...@embedded-brains.de phone: +49-89-18 94 741 - 16 fax: +49-89-18 94 741 - 08 Registergericht: Amtsgericht München Registernummer: HRB 157899 Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler Unsere Datenschutzerklärung finden Sie hier: https://embedded-brains.de/datenschutzerklaerung/ ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[libbsd 9/9] build: Do not require RTEMS_POSIX_API
--- wscript | 4 1 file changed, 4 deletions(-) diff --git a/wscript b/wscript index bfdcc91c..7b8f4d31 100644 --- a/wscript +++ b/wscript @@ -170,10 +170,6 @@ def options(opt): def bsp_configure(conf, arch_bsp): conf.check(header_name="dlfcn.h", features="c") conf.check(header_name="rtems/pci.h", features="c", mandatory=False) -if not rtems.check_posix(conf): -conf.fatal( -"RTEMS kernel POSIX support is disabled; configure RTEMS with --enable-posix" -) if rtems.check_networking(conf): conf.fatal( "RTEMS kernel contains the old network support;" \ -- 2.35.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[libbsd 4/9] openssl: Do not use signals
--- freebsd/crypto/openssl/apps/ocsp.c | 2 +- freebsd/crypto/openssl/apps/openssl.c | 2 ++ .../crypto/openssl/apps/rtems-bsd-openssl-ocsp-data.h | 2 -- freebsd/crypto/openssl/crypto/ui/ui_openssl.c | 10 ++ 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/freebsd/crypto/openssl/apps/ocsp.c b/freebsd/crypto/openssl/apps/ocsp.c index 7ff6a20c..dba8e6a9 100644 --- a/freebsd/crypto/openssl/apps/ocsp.c +++ b/freebsd/crypto/openssl/apps/ocsp.c @@ -58,7 +58,7 @@ NON_EMPTY_TRANSLATION_UNIT #endif # if !defined(NO_FORK) && !defined(OPENSSL_NO_SOCK) \ - && !defined(OPENSSL_NO_POSIX_IO) + && !defined(OPENSSL_NO_POSIX_IO) && !defined(__rtems__) # define OCSP_DAEMON # include # include diff --git a/freebsd/crypto/openssl/apps/openssl.c b/freebsd/crypto/openssl/apps/openssl.c index 31ec58d8..cdbb262b 100644 --- a/freebsd/crypto/openssl/apps/openssl.c +++ b/freebsd/crypto/openssl/apps/openssl.c @@ -89,9 +89,11 @@ static void calculate_columns(DISPLAY_COLUMNS *dc) static int apps_startup(void) { +#ifndef __rtems__ #ifdef SIGPIPE signal(SIGPIPE, SIG_IGN); #endif +#endif /* __rtems__ */ /* Set non-default library initialisation settings */ if (!OPENSSL_init_ssl(OPENSSL_INIT_ENGINE_ALL_BUILTIN diff --git a/freebsd/crypto/openssl/apps/rtems-bsd-openssl-ocsp-data.h b/freebsd/crypto/openssl/apps/rtems-bsd-openssl-ocsp-data.h index 2c2b926e..90043fb0 100644 --- a/freebsd/crypto/openssl/apps/rtems-bsd-openssl-ocsp-data.h +++ b/freebsd/crypto/openssl/apps/rtems-bsd-openssl-ocsp-data.h @@ -3,6 +3,4 @@ #include "rtems-bsd-openssl-data.h" /* ocsp.c */ RTEMS_LINKER_RWSET_CONTENT(bsd_prog_openssl, static char *prog); -RTEMS_LINKER_RWSET_CONTENT(bsd_prog_openssl, static int acfd); RTEMS_LINKER_RWSET_CONTENT(bsd_prog_openssl, static int multi); -RTEMS_LINKER_RWSET_CONTENT(bsd_prog_openssl, static int termsig); diff --git a/freebsd/crypto/openssl/crypto/ui/ui_openssl.c b/freebsd/crypto/openssl/crypto/ui/ui_openssl.c index 03596eee..6a040553 100644 --- a/freebsd/crypto/openssl/crypto/ui/ui_openssl.c +++ b/freebsd/crypto/openssl/crypto/ui/ui_openssl.c @@ -158,11 +158,13 @@ struct IOSB { # endif /* Define globals. They are protected by a lock */ +#ifndef __rtems__ # ifdef SIGACTION static struct sigaction savsig[NX509_SIG]; # else static void (*savsig[NX509_SIG]) (int); # endif +#endif /* __rtems__ */ # ifdef OPENSSL_SYS_VMS static struct IOSB iosb; @@ -185,7 +187,9 @@ static int is_a_tty; /* Declare static functions */ # if !defined(OPENSSL_SYS_WINCE) static int read_till_nl(FILE *); +#ifndef __rtems__ static void recsig(int); +#endif /* __rtems__ */ static void pushsig(void); static void popsig(void); # endif @@ -588,6 +592,7 @@ static int close_console(UI *ui) /* Internal functions to handle signals and act on them */ static void pushsig(void) { +#ifndef __rtems__ # ifndef OPENSSL_SYS_WIN32 int i; # endif @@ -630,10 +635,12 @@ static void pushsig(void) # ifdef SIGWINCH signal(SIGWINCH, SIG_DFL); # endif +#endif /* __rtems__ */ } static void popsig(void) { +#ifndef __rtems__ # ifdef OPENSSL_SYS_WIN32 signal(SIGABRT, savsig[SIGABRT]); signal(SIGFPE, savsig[SIGFPE]); @@ -659,12 +666,15 @@ static void popsig(void) # endif } # endif +#endif /* __rtems__ */ } +#ifndef __rtems__ static void recsig(int i) { intr_signal = i; } +#endif /* __rtems__ */ # endif /* Internal functions specific for Windows */ -- 2.35.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[libbsd 8/9] netstat: Do not use signals
--- freebsd/usr.bin/netstat/if.c | 19 --- .../netstat/rtems-bsd-netstat-if-data.h | 2 -- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/freebsd/usr.bin/netstat/if.c b/freebsd/usr.bin/netstat/if.c index c578629e..ffb639c6 100644 --- a/freebsd/usr.bin/netstat/if.c +++ b/freebsd/usr.bin/netstat/if.c @@ -512,6 +512,7 @@ intpr(void (*pfunc)(char *), int af) freeifmaddrs(ifmap); } +#ifndef __rtems__ struct iftot { u_long ift_ip; /* input packets */ u_long ift_ie; /* input errors */ @@ -575,6 +576,7 @@ catchalarm(int signo __unused) { signalled = true; } +#endif /* __rtems__ */ /* * Print a running summary of interface statistics. @@ -585,6 +587,7 @@ catchalarm(int signo __unused) static void sidewaysintpr(void) { +#ifndef __rtems__ struct iftot ift[2], *new, *old; struct itimerval interval_it; int oldmask, line; @@ -619,26 +622,11 @@ loop: xo_close_list("interface-statistics"); return; } -#ifdef __rtems__ - { - sigset_t oldmask, desired, empty; - - sigemptyset(); - sigemptyset(); - sigaddset(, SIGALRM); - sigprocmask(SIG_BLOCK, , ); - while (!signalled) - sigsuspend(); - signalled = false; - sigprocmask(SIG_SETMASK, , NULL); - } -#else /* __rtems__ */ oldmask = sigblock(sigmask(SIGALRM)); while (!signalled) sigpause(0); signalled = false; sigsetmask(oldmask); -#endif /* __rtems__ */ line++; fill_iftot(new); @@ -681,4 +669,5 @@ loop: goto loop; /* NOTREACHED */ +#endif /* __rtems__ */ } diff --git a/freebsd/usr.bin/netstat/rtems-bsd-netstat-if-data.h b/freebsd/usr.bin/netstat/rtems-bsd-netstat-if-data.h index 9e12b65e..9a685f33 100644 --- a/freebsd/usr.bin/netstat/rtems-bsd-netstat-if-data.h +++ b/freebsd/usr.bin/netstat/rtems-bsd-netstat-if-data.h @@ -1,5 +1,3 @@ /* generated by userspace-header-gen.py */ #include #include "rtems-bsd-netstat-data.h" -/* if.c */ -RTEMS_LINKER_RWSET_CONTENT(bsd_prog_netstat, static sig_atomic_t signalled); -- 2.35.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[libbsd 7/9] wlanstats: Do not use signals
--- freebsd/tools/tools/net80211/wlanstats/main.c | 22 +++ .../wlanstats/rtems-bsd-wlanstats-main-data.h | 2 -- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/freebsd/tools/tools/net80211/wlanstats/main.c b/freebsd/tools/tools/net80211/wlanstats/main.c index 3a6fd204..ef2caf56 100644 --- a/freebsd/tools/tools/net80211/wlanstats/main.c +++ b/freebsd/tools/tools/net80211/wlanstats/main.c @@ -43,6 +43,7 @@ #ifdef __rtems__ #define __need_getopt_newlib #include +#include #include #include #endif /* __rtems__ */ @@ -96,6 +97,7 @@ getfmt(const char *tag) return tag; } +#ifndef __rtems__ static int signalled; static void @@ -103,6 +105,7 @@ catchalarm(int signo __unused) { signalled = 1; } +#endif /* __rtems__ */ #if 0 static void @@ -262,6 +265,7 @@ main(int argc, char *argv[]) wf->setstamac(wf, mac); if (argc > 0) { +#ifndef __rtems__ u_long interval = strtoul(argv[0], NULL, 0); int line, omask; @@ -283,24 +287,10 @@ main(int argc, char *argv[]) wf->print_total(wf, stdout); } fflush(stdout); -#ifndef __rtems__ omask = sigblock(sigmask(SIGALRM)); if (!signalled) sigpause(0); sigsetmask(omask); -#else /* __rtems__ */ - { - sigset_t oldmask, desired, empty; - - sigemptyset(); - sigemptyset(); - sigaddset(, SIGALRM); - sigprocmask(SIG_BLOCK, , ); - while (!signalled) - sigsuspend(); - sigprocmask(SIG_SETMASK, , NULL); - } -#endif /* __rtems__ */ signalled = 0; alarm(interval); line++; @@ -346,6 +336,10 @@ main(int argc, char *argv[]) } while (len >= sizeof(struct ieee80211req_sta_info)); } #endif +#else /* __rtems__ */ + (void)mode; + printf("wlanstats: not implemented\n"); +#endif /* __rtems__ */ } else { wf->collect_tot(wf); wf->print_verbose(wf, stdout); diff --git a/freebsd/tools/tools/net80211/wlanstats/rtems-bsd-wlanstats-main-data.h b/freebsd/tools/tools/net80211/wlanstats/rtems-bsd-wlanstats-main-data.h index f88c5834..afb145be 100644 --- a/freebsd/tools/tools/net80211/wlanstats/rtems-bsd-wlanstats-main-data.h +++ b/freebsd/tools/tools/net80211/wlanstats/rtems-bsd-wlanstats-main-data.h @@ -1,5 +1,3 @@ /* generated by userspace-header-gen.py */ #include #include "rtems-bsd-wlanstats-data.h" -/* main.c */ -RTEMS_LINKER_RWSET_CONTENT(bsd_prog_wlanstats, static int signalled); -- 2.35.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[libbsd 6/9] ping6: Do not use signals
--- freebsd/sbin/ping6/ping6.c | 16 1 file changed, 16 insertions(+) diff --git a/freebsd/sbin/ping6/ping6.c b/freebsd/sbin/ping6/ping6.c index 96bd60e3..67ad46eb 100644 --- a/freebsd/sbin/ping6/ping6.c +++ b/freebsd/sbin/ping6/ping6.c @@ -287,7 +287,9 @@ static void fill(char *, char *); static int get_hoplim(struct msghdr *); static int get_pathmtu(struct msghdr *); static struct in6_pktinfo *get_rcvpktinfo(struct msghdr *); +#ifndef __rtems__ static void onsignal(int); +#endif /* __rtems__ */ static void onint(int); static size_t pingerlen(void); static int pinger(void); @@ -347,7 +349,9 @@ main(int argc, char *argv[]) struct timespec last, intvl; struct sockaddr_in6 from, *sin6; struct addrinfo hints, *res; +#ifndef __rtems__ struct sigaction si_sa; +#endif /* __rtems__ */ int cc, i; int almost_done, ch, hold, packlen, preload, optval, error; int nig_oldmcprefix = -1; @@ -374,7 +378,9 @@ main(int argc, char *argv[]) char *policy_out = NULL; #endif double t; +#ifndef __rtems__ u_long alarmtimeout; +#endif /* __rtems__ */ size_t rthlen; #ifdef IPV6_USE_MIN_MTU int mflag = 0; @@ -400,7 +406,9 @@ main(int argc, char *argv[]) intvl.tv_sec = interval / 1000; intvl.tv_nsec = interval % 1000 * 100; +#ifndef __rtems__ alarmtimeout = preload = 0; +#endif /* __rtems__ */ datap = [ICMP6ECHOLEN + ICMP6ECHOTMLEN]; capdns = capdns_setup(); #ifndef IPSEC @@ -628,6 +636,7 @@ main(int argc, char *argv[]) options |= F_WAITTIME; waittime = (int)t; break; +#ifndef __rtems__ case 'X': alarmtimeout = strtoul(optarg, , 0); if ((alarmtimeout < 1) || (alarmtimeout == ULONG_MAX)) @@ -638,6 +647,7 @@ main(int argc, char *argv[]) optarg, MAXALARM); alarm((int)alarmtimeout); break; +#endif /* __rtems__ */ #ifdef IPSEC #ifdef IPSEC_POLICY_IPSEC case 'P': @@ -1174,6 +1184,7 @@ main(int argc, char *argv[]) } clock_gettime(CLOCK_MONOTONIC, ); +#ifndef __rtems__ sigemptyset(_sa.sa_mask); si_sa.sa_flags = 0; si_sa.sa_handler = onsignal; @@ -1189,6 +1200,7 @@ main(int argc, char *argv[]) if (sigaction(SIGALRM, _sa, 0) == -1) err(EX_OSERR, "sigaction SIGALRM"); } +#endif /* __rtems__ */ if (options & F_FLOOD) { intvl.tv_sec = 0; intvl.tv_nsec = 1000; @@ -1310,11 +1322,13 @@ main(int argc, char *argv[]) } } } +#ifndef __rtems__ sigemptyset(_sa.sa_mask); si_sa.sa_flags = 0; si_sa.sa_handler = SIG_IGN; sigaction(SIGINT, _sa, 0); sigaction(SIGALRM, _sa, 0); +#endif /* __rtems__ */ summary(); if(packet != NULL) @@ -1323,6 +1337,7 @@ main(int argc, char *argv[]) exit(nreceived == 0 ? 2 : 0); } +#ifndef __rtems__ static void onsignal(int sig) { @@ -1339,6 +1354,7 @@ onsignal(int sig) #endif } } +#endif /* __rtems__ */ /* * pinger -- -- 2.35.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[libbsd 0/9] Remove dependency on RTEMS_POSIX_API
Sebastian Huber (9): ipsec-tools: Do not use signals wpa: Do not use signals wpa: Use CONFIG_ELOOP_KQUEUE openssl: Do not use signals ping: Do not use signals ping6: Do not use signals wlanstats: Do not use signals netstat: Do not use signals build: Do not require RTEMS_POSIX_API freebsd/contrib/wpa/src/utils/eloop.c | 19 +++ freebsd/crypto/openssl/apps/ocsp.c| 2 +- freebsd/crypto/openssl/apps/openssl.c | 2 ++ .../apps/rtems-bsd-openssl-ocsp-data.h| 2 -- freebsd/crypto/openssl/crypto/ui/ui_openssl.c | 10 freebsd/sbin/ping/ping.c | 8 +++ freebsd/sbin/ping6/ping6.c| 16 + freebsd/tools/tools/net80211/wlanstats/main.c | 22 +++--- .../wlanstats/rtems-bsd-wlanstats-main-data.h | 2 -- freebsd/usr.bin/netstat/if.c | 19 --- .../netstat/rtems-bsd-netstat-if-data.h | 2 -- ipsec-tools/src/racoon/privsep.c | 12 +- .../racoon/rtems-bsd-racoon-session-data.h| 3 --- ipsec-tools/src/racoon/session.c | 23 +++ wscript | 4 15 files changed, 92 insertions(+), 54 deletions(-) -- 2.35.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[libbsd 1/9] ipsec-tools: Do not use signals
--- ipsec-tools/src/racoon/privsep.c | 12 +- .../racoon/rtems-bsd-racoon-session-data.h| 3 --- ipsec-tools/src/racoon/session.c | 23 +++ 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/ipsec-tools/src/racoon/privsep.c b/ipsec-tools/src/racoon/privsep.c index 8efdae84..914d8a44 100644 --- a/ipsec-tools/src/racoon/privsep.c +++ b/ipsec-tools/src/racoon/privsep.c @@ -80,7 +80,9 @@ static int privsep_sock[2] = { -1, -1 }; static int privsep_recv(int, struct privsep_com_msg **, size_t *); static int privsep_send(int, struct privsep_com_msg *, size_t); static int safety_check(struct privsep_com_msg *, int i); +#ifndef __rtems__ static int port_check(int); +#endif /* __rtems__ */ static int unsafe_env(char *const *); static int unknown_name(int); static int unsafe_path(char *, int); @@ -321,7 +323,6 @@ privsep_init(void) #if defined(__NetBSD__) || defined(__FreeBSD__) setproctitle("[priv]"); #endif -#endif /* __rtems__ */ /* * Don't catch any signal @@ -334,13 +335,16 @@ privsep_init(void) signal(SIGUSR1, SIG_DFL); signal(SIGUSR2, SIG_DFL); signal(SIGCHLD, SIG_DFL); +#endif /* __rtems__ */ while (1) { size_t len; struct privsep_com_msg *combuf; struct privsep_com_msg *reply; char *data; +#ifndef __rtems__ size_t *buflen; +#endif /* __rtems__ */ size_t totallen; char *bufs[PRIVSEP_NBUF_MAX]; int i; @@ -1067,7 +1071,9 @@ privsep_getpsk(str, keylen) vchar_t *psk; struct privsep_com_msg *msg; size_t len; +#ifndef __rtems__ int *keylenp; +#endif /* __rtems__ */ char *data; if (geteuid() == 0) @@ -1129,7 +1135,11 @@ privsep_socket(domain, type, protocol) size_t len; char *data; struct socket_args socket_args; +#ifndef __rtems__ int s, saved_errno = 0; +#else /* __rtems__ */ + int s; +#endif /* __rtems__ */ if (geteuid() == 0) return socket(domain, type, protocol); diff --git a/ipsec-tools/src/racoon/rtems-bsd-racoon-session-data.h b/ipsec-tools/src/racoon/rtems-bsd-racoon-session-data.h index cdf8a74d..51b67d2e 100644 --- a/ipsec-tools/src/racoon/rtems-bsd-racoon-session-data.h +++ b/ipsec-tools/src/racoon/rtems-bsd-racoon-session-data.h @@ -5,8 +5,5 @@ RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static fd_set *allocated_active_mask); RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static fd_set *allocated_preset_mask); RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static int nfds); -RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static int signals[]); -RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static sig_atomic_t volatile volatile sigreq[]); RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct fd_monitor *allocated_fd_monitors); RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct fd_monitor_list fd_monitor_tree[]); -RTEMS_LINKER_RWSET_CONTENT(bsd_prog_racoon, static struct sched scflushsa); diff --git a/ipsec-tools/src/racoon/session.c b/ipsec-tools/src/racoon/session.c index 90120c76..7ea857ba 100644 --- a/ipsec-tools/src/racoon/session.c +++ b/ipsec-tools/src/racoon/session.c @@ -119,6 +119,7 @@ struct fd_monitor { #define NUM_PRIORITIES 2 +#ifndef __rtems__ static void close_session __P((void)); static void initfds __P((void)); static void init_signal __P((void)); @@ -126,6 +127,7 @@ static int set_signal __P((int sig, RETSIGTYPE (*func) __P((int; static void check_sigreq __P((void)); static void check_flushsa __P((void)); static int close_sockets __P((void)); +#endif /* __rtems__ */ #ifndef __rtems__ static fd_set preset_mask, active_mask; @@ -140,8 +142,10 @@ static struct fd_monitor *allocated_fd_monitors; static TAILQ_HEAD(fd_monitor_list, fd_monitor) fd_monitor_tree[NUM_PRIORITIES]; static int nfds = 0; +#ifndef __rtems__ static volatile sig_atomic_t sigreq[NSIG + 1]; static struct sched scflushsa = SCHED_INITIALIZER(); +#endif /* __rtems__ */ void monitor_fd(int fd, int (*callback)(void *, int), void *ctx, int priority) @@ -199,9 +203,11 @@ session(void) { struct timeval *timeout; int error; +#ifndef __rtems__ char pid_file[MAXPATHLEN]; FILE *fp; pid_t racoon_pid = 0; +#endif /* __rtems__ */ int i, count; struct fd_monitor *fdm; @@ -228,7 +234,9 @@ session(void) /* initialize schedular */ sched_init(); +#ifndef __rtems__ init_signal(); +#endif /* __rtems__ */ if (pfkey_init() < 0) errx(1, "failed to initialize pfkey socket"); @@ -325,17 +333,19 @@ session(void) racoon_pid = getpid(); fprintf(fp, "%ld\n", (long)racoon_pid); fclose(fp); -#endif /* __rtems__ */ for (i = 0; i <= NSIG; i++) sigreq[i] = 0; +#endif /*
[libbsd 5/9] ping: Do not use signals
--- freebsd/sbin/ping/ping.c | 8 1 file changed, 8 insertions(+) diff --git a/freebsd/sbin/ping/ping.c b/freebsd/sbin/ping/ping.c index 71976058..0daa5f45 100644 --- a/freebsd/sbin/ping/ping.c +++ b/freebsd/sbin/ping/ping.c @@ -306,7 +306,9 @@ main(int argc, char *const *argv) #endif struct sockaddr_in *to; double t; +#ifndef __rtems__ u_long alarmtimeout; +#endif /* __rtems__ */ long ltmp; int almost_done, ch, df, hold, i, icmp_len, mib[4], preload; int ssend_errno, srecv_errno, tos, ttl; @@ -370,7 +372,9 @@ main(int argc, char *const *argv) err(EX_OSERR, "srecv socket"); } +#ifndef __rtems__ alarmtimeout = df = preload = tos = 0; +#endif /* __rtems__ */ outpack = outpackhdr + sizeof(struct ip); while ((ch = getopt(argc, argv, @@ -569,6 +573,7 @@ main(int argc, char *const *argv) mttl = ltmp; options |= F_MTTL; break; +#ifndef __rtems__ case 't': alarmtimeout = strtoul(optarg, , 0); if ((alarmtimeout < 1) || (alarmtimeout == ULONG_MAX)) @@ -579,6 +584,7 @@ main(int argc, char *const *argv) optarg, MAXALARM); alarm((int)alarmtimeout); break; +#endif /* __rtems__ */ case 'v': options |= F_VERBOSE; break; @@ -1529,8 +1535,10 @@ static void finish(void) { +#ifndef __rtems__ (void)signal(SIGINT, SIG_IGN); (void)signal(SIGALRM, SIG_IGN); +#endif /* __rtems__ */ (void)putchar('\n'); (void)fflush(stdout); (void)printf("--- %s ping statistics ---\n", hostname); -- 2.35.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[libbsd 2/9] wpa: Do not use signals
--- freebsd/contrib/wpa/src/utils/eloop.c | 16 1 file changed, 16 insertions(+) diff --git a/freebsd/contrib/wpa/src/utils/eloop.c b/freebsd/contrib/wpa/src/utils/eloop.c index 41de0f79..b26de5a0 100644 --- a/freebsd/contrib/wpa/src/utils/eloop.c +++ b/freebsd/contrib/wpa/src/utils/eloop.c @@ -955,6 +955,7 @@ int eloop_replenish_timeout(unsigned int req_secs, unsigned int req_usecs, } +#ifndef __rtems__ #ifndef CONFIG_NATIVE_WINDOWS static void eloop_handle_alarm(int sig) { @@ -966,8 +967,10 @@ static void eloop_handle_alarm(int sig) exit(1); } #endif /* CONFIG_NATIVE_WINDOWS */ +#endif /* __rtems__ */ +#ifndef __rtems__ static void eloop_handle_signal(int sig) { int i; @@ -990,6 +993,7 @@ static void eloop_handle_signal(int sig) } } } +#endif /* __rtems__ */ static void eloop_process_pending_signals(void) @@ -1001,9 +1005,11 @@ static void eloop_process_pending_signals(void) eloop.signaled = 0; if (eloop.pending_terminate) { +#ifndef __rtems__ #ifndef CONFIG_NATIVE_WINDOWS alarm(0); #endif /* CONFIG_NATIVE_WINDOWS */ +#endif /* __rtems__ */ eloop.pending_terminate = 0; } @@ -1017,6 +1023,7 @@ static void eloop_process_pending_signals(void) } +#ifndef __rtems__ int eloop_register_signal(int sig, eloop_signal_handler handler, void *user_data) { @@ -1037,26 +1044,35 @@ int eloop_register_signal(int sig, eloop_signal_handler handler, return 0; } +#endif /* __rtems__ */ int eloop_register_signal_terminate(eloop_signal_handler handler, void *user_data) { +#ifndef __rtems__ int ret = eloop_register_signal(SIGINT, handler, user_data); if (ret == 0) ret = eloop_register_signal(SIGTERM, handler, user_data); return ret; +#else /* __rtems__ */ + return 0; +#endif /* __rtems__ */ } int eloop_register_signal_reconfig(eloop_signal_handler handler, void *user_data) { +#ifndef __rtems__ #ifdef CONFIG_NATIVE_WINDOWS return 0; #else /* CONFIG_NATIVE_WINDOWS */ return eloop_register_signal(SIGHUP, handler, user_data); #endif /* CONFIG_NATIVE_WINDOWS */ +#else /* __rtems__ */ + return 0; +#endif /* __rtems__ */ } -- 2.35.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[libbsd 3/9] wpa: Use CONFIG_ELOOP_KQUEUE
This avoids issues with the fd_set size. --- freebsd/contrib/wpa/src/utils/eloop.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/freebsd/contrib/wpa/src/utils/eloop.c b/freebsd/contrib/wpa/src/utils/eloop.c index b26de5a0..09493b89 100644 --- a/freebsd/contrib/wpa/src/utils/eloop.c +++ b/freebsd/contrib/wpa/src/utils/eloop.c @@ -16,6 +16,9 @@ #include "list.h" #include "eloop.h" +#ifdef __rtems__ +#define CONFIG_ELOOP_KQUEUE +#endif /* __rtems__ */ #if defined(CONFIG_ELOOP_POLL) && defined(CONFIG_ELOOP_EPOLL) #error Do not define both of poll and epoll #endif -- 2.35.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel