wakeup call. smp patch previous to applying the hal/sparc patches

Konrad Eisele konrad@gaisler.com
Thu Aug 25 08:01:00 GMT 2005


It's a while ago that I posted the hal/sparc patches to be applied.
Andrew Lunn wrote that Nick has to aprove the kernel and i386 patches
before the sparc one can move in, so I compiled a little thinking guide
so that it gets clear that the patches, if applied, do not alter any
of the code. I hope that speeds it up.
-- Greetings Konrad

There are lines of three patches to the kernel:
  1.)
   original: HAL_SMP_CPU_TYPE cpu = (i + cpu_this) % cpu_count;
   patched : HAL_SMP_CPU_TYPE cpu = HAL_SMP_CPU_COUNT2IDX ( (i + 
HAL_SMP_CPU_IDX2COUNT( cpu_this ) ) % cpu_count );

   i386    : resolving macros:

             #define HAL_SMP_CPU_COUNT2IDX(n)  (n)
             #define HAL_SMP_CPU_IDX2COUNT(n)  (n)

             will resolve to:

             HAL_SMP_CPU_TYPE cpu = (i + cpu_this) % cpu_count;

             => same as before

  2.)
   original: for( cpu = 0; cpu < cpu_count; cpu++ )
   patched : int c; for( c = 0; c < cpu_count; c++ ) { \
                  cpu = HAL_SMP_CPU_COUNT2IDX(c);

   i386    : resolving macros:

             #define HAL_SMP_CPU_COUNT2IDX(n)  (n)

             will resolve to:

             int c; for( c = 0; c < cpu_count; c++ ) { \
                  cpu = c;

             => same semantic as before

  3.)
   original: for( cpu = 0; cpu < CYG_KERNEL_CPU_COUNT(); cpu++ )
   patched : for( cpu = 0; cpu < CYG_KERNEL_CPU_START_COUNT(); cpu++ )
   i386    : resolving macros:

             #define CYG_KERNEL_CPU_COUNT()    HAL_SMP_CPU_COUNT()
             #define HAL_SMP_CPU_START_COUNT() HAL_SMP_CPU_COUNT()

             original resolved to:

             for( cpu = 0; cpu < HAL_SMP_CPU_COUNT(); cpu++ )

             pathced resolves to:
             for( cpu = 0; cpu < HAL_SMP_CPU_COUNT(); cpu++ )

             => asme as before


-------------- next part --------------
A non-text attachment was scrubbed...
Name: package_hal_i386.txt.diff
Type: text/x-patch
Size: 708 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/ecos-patches/attachments/20050825/0e080834/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: package_kernel.txt.diff
Type: text/x-patch
Size: 2455 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/ecos-patches/attachments/20050825/0e080834/attachment-0001.bin>


More information about the Ecos-patches mailing list