Changeset eabd9f0 in rtems


Ignore:
Timestamp:
Jan 11, 2008, 6:25:35 PM (12 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, master
Children:
be8ab6a
Parents:
49cf70f1
Message:

2008-01-11 Joel Sherrill <joel.sherrill@…>

  • configure.ac, irq/irq.c, startup/bspclean.c, startup/bspstart.c: Add ALLOW_IRQ_NESTING option. The MPC5200 has a settle time after acknowledging the IRQs and currently the BSP does not account for that. After acknowledging an interrupt, it currently gets a second spurious IRQ a significant percentage of the time. Rename to BENCHMARK_IRQ_PROCESSING and get it working again. Under one test load, not nesting interrupts resulted in a 50% reduction in the number of IRQs and an ~30% reduction in time spent in IRQs.
Location:
c/src/lib/libbsp/powerpc/gen5200
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/gen5200/ChangeLog

    r49cf70f1 reabd9f0  
     12008-01-11      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * configure.ac, irq/irq.c, startup/bspclean.c, startup/bspstart.c: Add
     4        ALLOW_IRQ_NESTING option. The MPC5200 has a settle time after
     5        acknowledging the IRQs and currently the BSP does not account for
     6        that. After acknowledging an interrupt, it currently gets a second
     7        spurious IRQ a significant percentage of the time. Rename to
     8        BENCHMARK_IRQ_PROCESSING and get it working again. Under one test
     9        load, not nesting interrupts resulted in a 50% reduction in the
     10        number of IRQs and an ~30% reduction in time spent in IRQs.
     11
    1122007-12-18      Joel Sherrill <joel.sherrill@OARcorp.com>
    213
  • c/src/lib/libbsp/powerpc/gen5200/configure.ac

    r49cf70f1 reabd9f0  
    2626 is turned on.])
    2727
     28RTEMS_BSPOPTS_SET([BENCHMARK_IRQ_PROCESSING],[*],[0])
     29RTEMS_BSPOPTS_HELP([BENCHMARK_IRQ_PROCESSING],
     30[If defined, enable code to benchmark IRQ processing.])
     31
     32RTEMS_BSPOPTS_SET([ALLOW_IRQ_NESTING],[*],[1])
     33RTEMS_BSPOPTS_HELP([ALLOW_IRQ_NESTING],
     34[If defined, allow nested IRQ processing.])
     35
    2836RTEMS_CHECK_NETWORKING
    2937AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes")
  • c/src/lib/libbsp/powerpc/gen5200/irq/irq.c

    r49cf70f1 reabd9f0  
    632632}
    633633
    634 #if defined(TIME_IRQs)
     634#if (BENCHMARK_IRQ_PROCESSING == 1)
    635635#include <stdio.h>
    636636uint64_t BSP_Starting_TBR;
     
    689689  register unsigned int pmce;
    690690  register unsigned int crit_pri_main_mask, per_mask;
    691 #if defined(TIME_IRQs)
     691#if (BENCHMARK_IRQ_PROCESSING == 1)
    692692  uint64_t start, stop, thisTime;
    693693
     
    760760              mpc5200.crit_pri_main_mask |= irqMaskTable[irq];
    761761
     762#if (ALLOW_IRQ_NESTING == 1)
    762763              /* enable interrupt nesting */
    763764              _CPU_MSR_GET(msr);
    764765              new_msr = msr | MSR_EE;
    765766              _CPU_MSR_SET(new_msr);
     767#endif
    766768
    767769              /* call the module specific handler and pass the
     
    770772              rtems_hdl_tbl[irq].hdl(0);
    771773
     774#if (ALLOW_IRQ_NESTING == 1)
    772775              /* disable interrupt nesting */
    773776              _CPU_MSR_SET(msr);
     777#endif
    774778
    775779              /* restore original interrupt mask */
     
    797801                mpc5200.per_mask |= irqMaskTable[irq];
    798802
     803#if (ALLOW_IRQ_NESTING == 1)
    799804                /* enable interrupt nesting */
    800805                _CPU_MSR_GET(msr);
    801806                new_msr = msr | MSR_EE;
    802807                _CPU_MSR_SET(new_msr);
     808#endif
    803809
    804810                /* call the module specific handler and pass
     
    807813                rtems_hdl_tbl[irq].hdl(0);
    808814
     815#if (ALLOW_IRQ_NESTING == 1)
    809816                /* disable interrupt nesting */
    810817                _CPU_MSR_SET(msr);
     818#endif
    811819
    812820                /* restore original interrupt mask */
     
    884892                mpc5200.per_mask |= irqMaskTable[irq];
    885893
     894#if (ALLOW_IRQ_NESTING == 1)
    886895                /* enable interrupt nesting */
    887896                _CPU_MSR_GET(msr);
    888897                new_msr = msr | MSR_EE;
    889898                _CPU_MSR_SET(new_msr);
     899#endif
    890900
    891901                /* call the module specific handler and pass the
     
    893903                rtems_hdl_tbl[irq].hdl(rtems_hdl_tbl[irq].handle);
    894904
     905#if (ALLOW_IRQ_NESTING == 1)
    895906                _CPU_MSR_SET(msr);
     907#endif
    896908
    897909                /* restore original interrupt mask */
     
    949961              mpc5200.crit_pri_main_mask |= irqMaskTable[irq];
    950962
     963#if (ALLOW_IRQ_NESTING == 1)
    951964              /* enable interrupt nesting */
    952965              _CPU_MSR_GET(msr);
    953966              new_msr = msr | MSR_EE;
    954967              _CPU_MSR_SET(new_msr);
     968#endif
    955969
    956970              /* call the module specific handler and pass the specific
     
    958972              rtems_hdl_tbl[irq].hdl(rtems_hdl_tbl[irq].handle);
    959973
     974#if (ALLOW_IRQ_NESTING == 1)
    960975              /* disable interrupt nesting */
    961976              _CPU_MSR_SET(msr);
     977#endif
    962978
    963979              /* restore original interrupt mask */
     
    981997                mpc5200.per_mask |= irqMaskTable[irq];
    982998
     999#if (ALLOW_IRQ_NESTING == 1)
    9831000                /* enable interrupt nesting */
    9841001                _CPU_MSR_GET(msr);
    9851002                new_msr = msr | MSR_EE;
    9861003                _CPU_MSR_SET(new_msr);
     1004#endif
    9871005
    9881006                /* call the module specific handler and pass the
     
    9901008                rtems_hdl_tbl[irq].hdl(rtems_hdl_tbl[irq].handle);
    9911009
     1010#if (ALLOW_IRQ_NESTING == 1)
    9921011                /* disable interrupt nesting */
    9931012                _CPU_MSR_SET(msr);
     1013#endif
    9941014
    9951015                /* restore original interrupt mask */
     
    10231043
    10241044  } /* end of switch(excNum) */
    1025 #if defined(TIME_IRQs)
     1045#if (BENCHMARK_IRQ_PROCESSING == 1)
    10261046  stop = PPC_Get_timebase_register();
    10271047  thisTime = stop - start;
    1028   if ( thisTime > BSP_Worst_ISR );
    1029     thisTime = BSP_Worst_ISR;
     1048  BSP_Total_in_ISR += thisTime;
     1049  if ( thisTime > BSP_Worst_ISR )
     1050    BSP_Worst_ISR = thisTime;
    10301051#endif
    10311052  return 0;
  • c/src/lib/libbsp/powerpc/gen5200/startup/bspclean.c

    r49cf70f1 reabd9f0  
    2222{
    2323 
    24  #if defined(TIME_IRQs)
     24  #if (BENCHMARK_IRQ_PROCESSING == 1)
    2525  {
    2626    extern void BSP_report_IRQ_Timing(void);
  • c/src/lib/libbsp/powerpc/gen5200/startup/bspstart.c

    r49cf70f1 reabd9f0  
    6666/*   The mmu is unused at this time.                                   */
    6767/*                                                                     */
    68 /*   COPYRIGHT (c) 1989-2007.
     68/*   COPYRIGHT (c) 1989-2007.                                          */
    6969/*   On-Line Applications Research Corporation (OAR).                  */
    7070/*                                                                     */
    7171/*   The license and distribution terms for this file may be           */
    7272/*   found in found in the file LICENSE in this distribution or at     */
    73 /*   http://www.rtems.com/license/LICENSE.                        */
     73/*   http://www.rtems.com/license/LICENSE.                             */
    7474/*                                                                     */
    7575/*---------------------------------------------------------------------*/
     
    302302   */
    303303  Configuration.work_space_start = (void *)&_WorkspaceBase;
     304#ifdef SHOW_MORE_INIT_SETTINGS
     305  printk( "workspace=%p\n", Configuration.work_space_start );
     306  printk( "workspace size=%d\n", Configuration.work_space_size );
     307#endif
    304308
    305309  /*
     
    308312  BSP_rtems_irq_mng_init(0);
    309313
    310 #if defined(TIME_IRQs)
     314#if (BENCHMARK_IRQ_PROCESSING == 1)
    311315  {
    312316    void BSP_initialize_IRQ_Timing(void);
Note: See TracChangeset for help on using the changeset viewer.