[PATCH] cpukit/aarch64: Remove _CPU_ISR_install_vector

Joel Sherrill joel at rtems.org
Tue Jul 5 19:37:39 UTC 2022


OK.

On Tue, Jul 5, 2022 at 2:36 PM Kinsey Moore <kinsey.moore at oarcorp.com>
wrote:

> This function was never actually used and is dead code.
> ---
>  cpukit/score/cpu/aarch64/cpu.c                | 25 -------------------
>  .../cpu/aarch64/include/rtems/score/cpu.h     |  6 -----
>  2 files changed, 31 deletions(-)
>
> diff --git a/cpukit/score/cpu/aarch64/cpu.c
> b/cpukit/score/cpu/aarch64/cpu.c
> index f0062adf30..923f53da08 100644
> --- a/cpukit/score/cpu/aarch64/cpu.c
> +++ b/cpukit/score/cpu/aarch64/cpu.c
> @@ -174,31 +174,6 @@ uint32_t _CPU_ISR_Get_level( void )
>    return ( level & AARCH64_PSTATE_I ) != 0;
>  }
>
> -void _CPU_ISR_install_vector(
> -  uint32_t         vector,
> -  CPU_ISR_handler  new_handler,
> -  CPU_ISR_handler *old_handler
> -)
> -{
> -#pragma GCC diagnostic push
> -#pragma GCC diagnostic ignored "-Warray-bounds"
> -  /* Redirection table starts at the end of the vector table */
> -  CPU_ISR_handler *table = (CPU_ISR_handler *) (MAX_EXCEPTIONS * 4);
> -
> -  CPU_ISR_handler current_handler = table [vector];
> -
> -  /* The current handler is now the old one */
> -  if (old_handler != NULL) {
> -    *old_handler = current_handler;
> -  }
> -
> -  /* Write only if necessary to avoid writes to a maybe read-only memory
> */
> -  if (current_handler != new_handler) {
> -    table [vector] = new_handler;
> -  }
> -#pragma GCC diagnostic pop
> -}
> -
>  void _CPU_Initialize( void )
>  {
>    /* Do nothing */
> diff --git a/cpukit/score/cpu/aarch64/include/rtems/score/cpu.h
> b/cpukit/score/cpu/aarch64/include/rtems/score/cpu.h
> index fdc0e3d929..47a8e97985 100644
> --- a/cpukit/score/cpu/aarch64/include/rtems/score/cpu.h
> +++ b/cpukit/score/cpu/aarch64/include/rtems/score/cpu.h
> @@ -306,12 +306,6 @@ void _CPU_Initialize( void );
>
>  typedef void ( *CPU_ISR_handler )( void );
>
> -void _CPU_ISR_install_vector(
> -  uint32_t         vector,
> -  CPU_ISR_handler  new_handler,
> -  CPU_ISR_handler *old_handler
> -);
> -
>  /**
>   * @brief CPU switch context.
>   */
> --
> 2.30.2
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20220705/e16224f0/attachment-0001.htm>


More information about the devel mailing list