Bug 35576 - Ada HW Interrupt Task Enhancement
Summary: Ada HW Interrupt Task Enhancement
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: ada (show other bugs)
Version: 4.4.0
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-13 18:45 UTC by Joel Sherrill
Modified: 2008-09-11 20:08 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build: *-*-rtems* *-*-vxworks*
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Ada HW Interrupt Task Enhancement (18.23 KB, patch)
2008-03-13 18:47 UTC, Joel Sherrill
Details | Diff
Updated to 4.4.0 20080421 (experimental) [trunk revision 134514] (9.93 KB, patch)
2008-04-21 22:37 UTC, Joel Sherrill
Details | Diff
hwint patch for gcc 4.3 branch (19.65 KB, patch)
2008-05-07 18:08 UTC, Joel Sherrill
Details | Diff
Latest version (17.48 KB, patch)
2008-05-28 16:29 UTC, Joel Sherrill
Details | Diff
updated patch (76 bytes, patch)
2008-06-05 23:32 UTC, Joel Sherrill
Details | Diff
Actual patch against svn (this time) (9.88 KB, patch)
2008-06-06 13:12 UTC, Joel Sherrill
Details | Diff
Lastest version of patch (against rev 138553) (1.72 KB, patch)
2008-08-06 19:37 UTC, Joel Sherrill
Details | Diff
New file not in 20080806 diff. (8.10 KB, text/x-adasrc)
2008-08-06 19:40 UTC, Joel Sherrill
Details
Latest version against revision 138553 (1.97 KB, patch)
2008-08-06 19:47 UTC, Joel Sherrill
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joel Sherrill 2008-03-13 18:45:47 UTC
Currently VxWorks is the only target in gcc to support Ada interrupt tasks which are tied to hardware interrupt sources.  The code in gcc currently is VxWorks specific.  The patch attached generalizes this code by adding an adapter layer consisting of binary semaphores and interrupt management methods. These are generalized names for the routines currently used in the VxWorks code.  A diff of the existing s-interr-vxworks.adb and the new s-interr-hwint.adb will show the largely mechanical changes.  

Both VxWorks and RTEMS targets have been modified to use this code.  It has been tested on RTEMS.

The code was first posted to gcc-patches in December 2007 against the 4.2 branch and SVN trunk.  All comments were addressed and the code was reposted again in early March 2008 to gcc-patches.  It received only comments on mistakes in the comments which were inherited directly from the original VxWorks code.  I am filing this as a PR in the hopes that this will result in it finally getting merged.
Comment 1 Joel Sherrill 2008-03-13 18:47:34 UTC
Created attachment 15309 [details]
Ada HW Interrupt Task Enhancement
Comment 2 Joel Sherrill 2008-03-13 18:47:56 UTC
2007-12-06  Joel Sherrill <joel.sherrill@oarcorp.com>

        * Makefile.in: Switch RTEMS and VxWorks to s-interr-hwint.adb.
        * s-interr-hwint.adb: New file with portable implementation.
        * s-interr-vxworks.adb: Removed.
        * s-osinte-rtems.adb, s-osinte-rtems.ads, s-osinte-vxworks.adb,
        s-osinte-vxworks.ads: Add shared hardware interrupt adapter layer.

Comment 3 Joel Sherrill 2008-04-04 14:32:06 UTC
Patch is still valid against 3 April SVN trunk.  Confirmed on SPARC.

sparc-rtems4.9-gcc (GCC) 4.4.0 20080403 (experimental) [trunk revision 133868]
Comment 4 Joel Sherrill 2008-04-21 22:37:58 UTC
Created attachment 15505 [details]
Updated to 4.4.0 20080421 (experimental) [trunk revision 134514]

Requires patch in http://gcc.gnu.org/ml/gcc-patches/2008-04/msg01581.html to even compile Ada targeting RTEMS on the trunk.
Comment 5 Joel Sherrill 2008-04-21 22:39:22 UTC
Tested against this GCC using gcc-ada-hwint-20080421.diff and patch in 
http://gcc.gnu.org/ml/gcc-patches/2008-04/msg01581.html 

sparc-rtems4.9-gcc (GCC) 4.4.0 20080421 (experimental) [trunk revision 134514]

Comment 6 Joel Sherrill 2008-05-07 18:03:52 UTC
Tested against this GCC using gcc-ada-hwint-20080421.diff and patch in 
http://gcc.gnu.org/ml/gcc-patches/2008-04/msg01581.html 

sparc-rtems4.9-gcc (GCC) 4.4.0 20080502 (experimental) [trunk revision 134885]
Comment 7 Joel Sherrill 2008-05-07 18:08:44 UTC
Created attachment 15612 [details]
hwint patch for gcc 4.3 branch

This has been tested against sparc-rtems4.9 for interrupt functionality.  ACATS results reported for mips, i386, powerpc, and sparc.
Comment 8 Joel Sherrill 2008-05-20 16:59:23 UTC
Patch against SVN trunk still OK using

20080519 (experimental) [trunk revision 135528]
Comment 9 Joel Sherrill 2008-05-28 16:29:26 UTC
Created attachment 15692 [details]
Latest version

Previous patch did not include s-interr-hwint.adb.

There is no patch to s-osinte-rtems.adb since the .ads binds directly to
OS provided routines.
Comment 10 Joel Sherrill 2008-05-28 16:33:56 UTC
Updated changelog entry.  I missed adding the s-hwint-interr.adb file
when I replaced my svn tree a while back.  There are no modifications
to s-osinte-rtems.adb.  The .ads just binds to more routines provided
by RTEMS.

2008-05-28  Joel Sherrill <joel.sherrill@oarcorp.com>

        * Makefile.in: Switch RTEMS and VxWorks to s-interr-hwint.adb.
        * s-interr-hwint.adb: New file with portable implementation.
        * s-interr-vxworks.adb: Removed.
        * s-osinte-rtems.ads, s-osinte-vxworks.adb, s-osinte-vxworks.ads: Add
        shared hardware interrupt adapter layer. RTEMS binds to OS provided
        adapter routines so there are no modifications to s-osinte-rtems.adb.

Comment 11 Joel Sherrill 2008-06-05 23:32:39 UTC
Created attachment 15723 [details]
updated patch

Updated to account for changes to s-osinte-vxworks.adb while this PR has lingered in the queue.
Comment 12 Joel Sherrill 2008-06-05 23:34:08 UTC
s-osinte-vxworks.adb is not removed by the patch.  For review purposes, you
should diff s-osinte-vxworks.adb to s-osinte-hwint.adb to see what the changes
were.

2008-05-28  Joel Sherrill <joel.sherrill@oarcorp.com>

        * Makefile.in: Switch RTEMS and VxWorks to s-interr-hwint.adb.
        * s-interr-hwint.adb: New file with portable implementation.  This
        is a mechanical change of s-interr-vxworks.adb to use the new OS
        provided adapter.
        * s-interr-vxworks.adb: Removed.
        * s-osinte-rtems.ads, s-osinte-vxworks.adb, s-osinte-vxworks.ads: Add
        shared hardware interrupt adapter layer. RTEMS binds to OS provided
        adapter routines so there are no modifications to s-osinte-rtems.adb.
Comment 13 Joel Sherrill 2008-06-06 13:12:51 UTC
Created attachment 15724 [details]
Actual patch against svn (this time)
Comment 14 Joel Sherrill 2008-06-06 13:16:07 UTC
ChangeLog entry for gcc-svn-ada-hwint-20080606.diff.  Patch does not
remove s-interr-vxworks.adb.  As part of review please 
"diff -u s-interr-vxworks.adb s-interr-hwint.adb"  You should only
see changes to eliminate references to VxWorks specific packages and
to use the adapter routines instead of VxWorks specific ones.

2008-06-06  Joel Sherrill <joel.sherrill@oarcorp.com>

        * Makefile.in: Switch RTEMS and VxWorks to s-interr-hwint.adb.
        * s-interr-hwint.adb: New file with portable implementation.  This
        is a mechanical change of s-interr-vxworks.adb to use the new
        OS provided adapter.
        * s-interr-vxworks.adb: Removed.
        * s-osinte-rtems.ads, s-osinte-vxworks.adb, s-osinte-vxworks.ads: Add
        shared hardware interrupt adapter layer. RTEMS binds to OS provided
        adapter routines so there are no modifications to s-osinte-rtems.adb.

Comment 15 Joel Sherrill 2008-08-06 19:37:27 UTC
Created attachment 16032 [details]
Lastest version of patch (against rev 138553)

hwint tested on sparc. ACATS results posted for sparc, mips, i386, powerpc, and arm
Comment 16 Joel Sherrill 2008-08-06 19:38:00 UTC
Comment on attachment 15724 [details]
Actual patch against svn (this time)

Obsoleted by 20080806 patch
Comment 17 Joel Sherrill 2008-08-06 19:40:43 UTC
Created attachment 16033 [details]
New file not in 20080806 diff.

Must go with http://gcc.gnu.org/bugzilla/attachment.cgi?id=16032
Comment 18 Joel Sherrill 2008-08-06 19:47:00 UTC
Created attachment 16034 [details]
Latest version against revision 138553

Goes with http://gcc.gnu.org/bugzilla/attachment.cgi?id=16033

s-interr-hwint.adb can be diffed against s-interr-vxworks.adb to see what was
done to make it generic.
Comment 19 Joel Sherrill 2008-09-11 20:08:55 UTC
Now merged on SVN trunk.  Closing.  Thanks Arnaud.