Changeset c1f289e in rtems


Ignore:
Timestamp:
Dec 14, 2007, 9:53:08 PM (13 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, 5, master
Children:
09038441
Parents:
0e263c91
Message:

2007-12-14 Joel Sherrill <joel.sherrill@…>

  • acinclude.m4, gen5200/irq/irq.c, gen5200/startup/bspclean.c: Add mvme3100.
Location:
c/src/lib/libbsp/powerpc
Files:
4 edited

Legend:

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

    r0e263c91 rc1f289e  
     12007-12-14      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * acinclude.m4, gen5200/irq/irq.c, gen5200/startup/bspclean.c: Add
     4        mvme3100.
     5
    162007-12-11      Joel Sherrill <joel.sherrill@OARcorp.com>
    27
  • c/src/lib/libbsp/powerpc/acinclude.m4

    r0e263c91 rc1f289e  
    1919  mpc8260ads )
    2020    AC_CONFIG_SUBDIRS([mpc8260ads]);;
     21  mvme3100 )
     22    AC_CONFIG_SUBDIRS([mvme3100]);;
    2123  mvme5500 )
    2224    AC_CONFIG_SUBDIRS([mvme5500]);;
  • c/src/lib/libbsp/powerpc/gen5200/irq/irq.c

    r0e263c91 rc1f289e  
    632632}
    633633
     634#include <stdio.h>
     635uint64_t BSP_Starting_TBR;
     636uint64_t BSP_Total_in_ISR;
     637uint32_t BSP_ISR_Count;
     638uint32_t BSP_Worst_ISR;
     639#define BSP_COUNTED_IRQ 16
     640uint32_t BSP_ISR_Count_Per[BSP_COUNTED_IRQ + 1];
     641
     642void BSP_initialize_IRQ_Timing(void)
     643{
     644  int i;
     645  BSP_Starting_TBR = PPC_Get_timebase_register();
     646  BSP_Total_in_ISR = 0;
     647  BSP_ISR_Count = 0;
     648  BSP_Worst_ISR = 0;
     649  for ( i=0 ; i<BSP_COUNTED_IRQ ; i++ )
     650    BSP_ISR_Count_Per[i] = 0;
     651}
     652
     653static const char * u64tostring(
     654  char *buffer,
     655  uint64_t v
     656)
     657{
     658  sprintf( buffer, "%lld %lld usecs", v, (v / 33) );
     659  return buffer;
     660}
     661void BSP_report_IRQ_Timing(void)
     662{
     663  uint64_t now;
     664  char buffer[96];
     665  int i;
     666
     667  now = PPC_Get_timebase_register();
     668  printk( "Started at: %s\n", u64tostring(buffer, BSP_Starting_TBR) );
     669  printk( "Current   : %s\n", u64tostring(buffer, now) );
     670  printk( "System up : %s\n", u64tostring(buffer, now - BSP_Starting_TBR) );
     671  printk( "ISRs      : %d\n", BSP_ISR_Count );
     672  printk( "ISRs ran  : %s\n", u64tostring(buffer, BSP_Total_in_ISR) );
     673  printk( "Worst ISR : %s\n", u64tostring(buffer, BSP_Worst_ISR) );
     674  for ( i=0 ; i<BSP_COUNTED_IRQ ; i++ )
     675    printk( "IRQ %d: %d\n", i, BSP_ISR_Count_Per[i] );
     676  printk( "Ticks     : %d\n",  Clock_driver_ticks );
     677}
    634678
    635679/*
     
    643687  register unsigned int pmce;
    644688  register unsigned int crit_pri_main_mask, per_mask;
     689  uint64_t start, stop, thisTime;
     690
     691  start = PPC_Get_timebase_register();
     692  BSP_ISR_Count++;
     693  if ( excNum < BSP_COUNTED_IRQ )
     694    BSP_ISR_Count_Per[excNum]++;
     695  else
     696    printk( "not counting %d\n", excNum);
    645697
    646698  switch (excNum) {
  • c/src/lib/libbsp/powerpc/gen5200/startup/bspclean.c

    r0e263c91 rc1f289e  
    2121void bsp_cleanup( void )
    2222{
     23 
     24  {
     25    extern void BSP_report_IRQ_Timing(void);
     26    BSP_report_IRQ_Timing();
     27  }
     28 
    2329  #if defined(BSP_PRESS_KEY_FOR_RESET)
    2430    printk( "\nEXECUTIVE SHUTDOWN! Any key to reboot..." );
Note: See TracChangeset for help on using the changeset viewer.