Changeset 2e4ead3 in rtems


Ignore:
Timestamp:
Jun 4, 2012, 8:01:16 AM (8 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Children:
8a2ea93e
Parents:
6b24b88 (diff), b8ed6d80 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'upstream'

Files:
4 added
140 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/nds/libfat/source/disc_io/io_fcsr.c

    r6b24b88 r2e4ead3  
    122122        bool flagSramSector = false;
    123123        int readLength = numSectors * BYTES_PER_READ;
    124         u8* src;;
     124        u8* src;
    125125        u8* dst;
    126126
  • c/src/lib/libbsp/arm/nds/libnds/source/common/card.c

    r6b24b88 r2e4ead3  
    4545void cardPolledTransfer(uint32 flags, uint32 * destination, uint32 length, const uint8 * command) {
    4646//---------------------------------------------------------------------------------
    47         u32 data;;
     47        u32 data;
    4848        cardWriteCommand(command);
    4949        CARD_CR2 = flags;
     
    6969        DMA_SRC(channel) = (uint32)&CARD_DATA_RD;
    7070        DMA_DEST(channel) = (uint32)destination;
    71         DMA_CR(channel) = DMA_ENABLE | DMA_START_CARD | DMA_32_BIT | DMA_REPEAT | DMA_SRC_FIX | 0x0001;;
     71        DMA_CR(channel) = DMA_ENABLE | DMA_START_CARD | DMA_32_BIT | DMA_REPEAT | DMA_SRC_FIX | 0x0001;
    7272
    7373        CARD_CR2 = flags;
  • c/src/lib/libbsp/bfin/TLL6527M/startup/bspstart.c

    r6b24b88 r2e4ead3  
    141141
    142142  /* Configure PLL registers */
    143   *((uint16_t*)PLL_DIV) = ssel;;
     143  *((uint16_t*)PLL_DIV) = ssel;
    144144  msel = msel<<9;
    145145  *((uint16_t*)PLL_CTL) = msel;
  • c/src/lib/libbsp/m68k/av5282/network/network.c

    r6b24b88 r2e4ead3  
    443443             */
    444444            struct ether_header *eh;
    445             int len = rxBd->length - sizeof(uint32_t);;
     445            int len = rxBd->length - sizeof(uint32_t);
    446446
    447447            /*
  • c/src/lib/libbsp/m68k/mcf5235/network/network.c

    r6b24b88 r2e4ead3  
    424424             */
    425425            struct ether_header *eh;
    426             int len = rxBd->length - sizeof(uint32_t);;
     426            int len = rxBd->length - sizeof(uint32_t);
    427427
    428428            /*
  • c/src/lib/libbsp/m68k/mcf5329/network/network.c

    r6b24b88 r2e4ead3  
    416416       */
    417417      struct ether_header *eh;
    418       int len = rxBd->length - sizeof(uint32_t);;
     418      int len = rxBd->length - sizeof(uint32_t);
    419419
    420420      m = sc->rxMbuf[rxBdIndex];
  • c/src/lib/libbsp/m68k/uC5282/network/network.c

    r6b24b88 r2e4ead3  
    480480             */
    481481            struct ether_header *eh;
    482             int len = rxBd->length - sizeof(uint32_t);;
     482            int len = rxBd->length - sizeof(uint32_t);
    483483
    484484            m = sc->rxMbuf[rxBdIndex];
  • c/src/lib/libbsp/powerpc/beatnik/flash/flashcfg.c

    r6b24b88 r2e4ead3  
    144144                        *p |= swp;
    145145                } else {
    146                         *p &= ~swp;;
     146                        *p &= ~swp;
    147147                }
    148148        }
  • c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.gwlcfm

    r6b24b88 r2e4ead3  
    2323REGION_ALIAS ("REGION_STACK", RAM);
    2424REGION_ALIAS ("REGION_NOCACHE", NOCACHE);
     25REGION_ALIAS ("REGION_NOCACHE_LOAD", NOCACHE);
    2526
    2627INCLUDE linkcmds.mpc55xx
  • c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.mpc5566evb

    r6b24b88 r2e4ead3  
    2323REGION_ALIAS ("REGION_STACK", RAM);
    2424REGION_ALIAS ("REGION_NOCACHE", NOCACHE);
     25REGION_ALIAS ("REGION_NOCACHE_LOAD", NOCACHE);
    2526
    2627INCLUDE linkcmds.mpc55xx
  • c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.mpc5674fevb

    r6b24b88 r2e4ead3  
    2323REGION_ALIAS ("REGION_STACK", RAM);
    2424REGION_ALIAS ("REGION_NOCACHE", NOCACHE);
     25REGION_ALIAS ("REGION_NOCACHE_LOAD", ROM);
    2526
    2627INCLUDE linkcmds.mpc55xx
  • c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.phycore_mpc5554

    r6b24b88 r2e4ead3  
    3232REGION_ALIAS ("REGION_STACK", RAM);
    3333REGION_ALIAS ("REGION_NOCACHE", NOCACHE);
     34REGION_ALIAS ("REGION_NOCACHE_LOAD", NOCACHE);
    3435
    3536INCLUDE linkcmds.mpc55xx
  • c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.xkt564levb

    r6b24b88 r2e4ead3  
    2828REGION_ALIAS ("REGION_STACK", RAM_1);
    2929REGION_ALIAS ("REGION_NOCACHE", NOCACHE);
     30REGION_ALIAS ("REGION_NOCACHE_LOAD", NOCACHE);
    3031
    3132INCLUDE linkcmds.mpc55xx
  • c/src/lib/libbsp/powerpc/mpc55xxevb/startup/start-early.c

    r6b24b88 r2e4ead3  
    88
    99/*
    10  * Copyright (c) 2008-2011 embedded brains GmbH.  All rights reserved.
     10 * Copyright (c) 2008-2012 embedded brains GmbH.  All rights reserved.
    1111 *
    1212 *  embedded brains GmbH
     
    2424#include <bsp/start.h>
    2525#include <bsp/mpc55xx-config.h>
     26#include <bsp/linker-symbols.h>
     27
     28/* This function is defined in start.S */
     29BSP_START_TEXT_SECTION void mpc55xx_start_load_section(
     30  void *dst,
     31  const void *src,
     32  size_t n
     33);
    2634
    2735static BSP_START_TEXT_SECTION void mpc55xx_start_mmu(void)
     
    5260    bsp_start_zero(&bsp_ram_1_start [0], (size_t) bsp_ram_1_size);
    5361  #endif
     62}
     63
     64static BSP_START_TEXT_SECTION void mpc55xx_start_load_nocache_section(void)
     65{
     66  mpc55xx_start_load_section(
     67    bsp_section_nocache_begin,
     68    bsp_section_nocache_load_begin,
     69    (size_t) bsp_section_nocache_size
     70  );
     71  rtems_cache_flush_multiple_data_lines(
     72    bsp_section_nocache_begin,
     73    (size_t) bsp_section_nocache_size
     74  );
    5475}
    5576
     
    168189  #endif
    169190  mpc55xx_start_internal_ram();
     191  mpc55xx_start_load_nocache_section();
    170192  mpc55xx_start_mmu();
    171193  mpc55xx_start_mode_change();
  • c/src/lib/libbsp/powerpc/mpc55xxevb/startup/start.S

    r6b24b88 r2e4ead3  
    88
    99/*
    10  * Copyright (c) 2008-2011 embedded brains GmbH.  All rights reserved.
     10 * Copyright (c) 2008-2012 embedded brains GmbH.  All rights reserved.
    1111 *
    1212 *  embedded brains GmbH
     
    2222
    2323#include <bspopts.h>
    24 
     24#include <bsp/linker-symbols.h>
    2525#include <libcpu/powerpc-utility.h>
    2626
     
    4242        .extern boot_card
    4343        .extern bsp_ram_start
    44         .extern bsp_section_data_begin
    45         .extern bsp_section_data_load_begin
    46         .extern bsp_section_data_size
    47         .extern bsp_section_fast_data_begin
    48         .extern bsp_section_fast_data_load_begin
    49         .extern bsp_section_fast_data_size
    50         .extern bsp_section_fast_text_begin
    51         .extern bsp_section_fast_text_load_begin
    52         .extern bsp_section_fast_text_size
    5344        .extern mpc55xx_start_config_mmu_early
    5445        .extern mpc55xx_start_config_mmu_early_count
     
    5647
    5748        .globl  _start
     49        .globl  mpc55xx_start_load_section
    5850        .globl  mpc55xx_start_mmu_apply_config
    5951
     
    226218        LA      r4, bsp_section_fast_text_load_begin
    227219        LA      r5, bsp_section_fast_text_size
    228         bl      load_section
     220        bl      mpc55xx_start_load_section
    229221        LA      r3, bsp_section_fast_data_begin
    230222        LA      r4, bsp_section_fast_data_load_begin
    231223        LA      r5, bsp_section_fast_data_size
    232         bl      load_section
     224        bl      mpc55xx_start_load_section
    233225        LA      r3, bsp_section_data_begin
    234226        LA      r4, bsp_section_data_load_begin
    235227        LA      r5, bsp_section_data_size
    236         bl      load_section
     228        bl      mpc55xx_start_load_section
    237229
    238230        /* Set up EABI and SYSV environment */
     
    271263        blr
    272264
    273 load_section:
     265mpc55xx_start_load_section:
    274266        cmpw    cr7, r3, r4
    275267        beqlr   cr7
  • c/src/lib/libbsp/powerpc/qoriq/configure.ac

    r6b24b88 r2e4ead3  
    1717RTEMS_BSPOPTS_SET_INSTRUCTION_CACHE_ENABLED([*],[1])
    1818RTEMS_BSPOPTS_HELP_INSTRUCTION_CACHE_ENABLED
     19
     20RTEMS_BSPOPTS_SET([BSP_USE_DATA_CACHE_BLOCK_TOUCH],[*],[1])
     21RTEMS_BSPOPTS_HELP([BSP_USE_DATA_CACHE_BLOCK_TOUCH],[if defined use dcbt instruction])
    1922
    2023RTEMS_BSPOPTS_SET([BSP_CONSOLE_BAUD],[*],[115200])
  • c/src/lib/libbsp/powerpc/qoriq/include/bspopts.h.in

    r6b24b88 r2e4ead3  
    2727/* If defined, reset the board when the application exits. */
    2828#undef BSP_RESET_BOARD_AT_EXIT
     29
     30/* if defined use dcbt instruction */
     31#undef BSP_USE_DATA_CACHE_BLOCK_TOUCH
    2932
    3033/* enable usage of interrupts for the UART modules */
  • c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_core_0

    r6b24b88 r2e4ead3  
    2626REGION_ALIAS ("REGION_WORK", HIGH);
    2727REGION_ALIAS ("REGION_STACK", HIGH);
    28 REGION_ALIAS ("REGION_NOCACHE", HIGH);
     28REGION_ALIAS ("REGION_NOCACHE", NIRVANA);
     29REGION_ALIAS ("REGION_NOCACHE_LOAD", NIRVANA);
    2930
    3031bsp_section_robarrier_align = 0x1000000;
  • c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_core_1

    r6b24b88 r2e4ead3  
    2525REGION_ALIAS ("REGION_WORK", RAM);
    2626REGION_ALIAS ("REGION_STACK", RAM);
    27 REGION_ALIAS ("REGION_NOCACHE", RAM);
     27REGION_ALIAS ("REGION_NOCACHE", NIRVANA);
     28REGION_ALIAS ("REGION_NOCACHE_LOAD", NIRVANA);
    2829
    2930bsp_section_robarrier_align = 0x1000000;
  • c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_p1020rdb

    r6b24b88 r2e4ead3  
    2626REGION_ALIAS ("REGION_WORK", HIGH);
    2727REGION_ALIAS ("REGION_STACK", HIGH);
    28 REGION_ALIAS ("REGION_NOCACHE", HIGH);
     28REGION_ALIAS ("REGION_NOCACHE", NIRVANA);
     29REGION_ALIAS ("REGION_NOCACHE_LOAD", NIRVANA);
    2930
    3031bsp_section_robarrier_align = 0x1000000;
  • c/src/lib/libbsp/powerpc/shared/flash/spansionFlash.c

    r6b24b88 r2e4ead3  
    180180
    181181        if ( 1 == b->width )
    182                 off <<= 1;;
     182                off <<= 1;
    183183
    184184        a = ADDR32(b, a, off);
  • c/src/lib/libbsp/powerpc/shared/include/linker-symbols.h

    r6b24b88 r2e4ead3  
    9797LINKER_SYMBOL(bsp_section_nocache_end)
    9898LINKER_SYMBOL(bsp_section_nocache_size)
     99LINKER_SYMBOL(bsp_section_nocache_load_begin)
     100LINKER_SYMBOL(bsp_section_nocache_load_end)
    99101
    100102#define BSP_FAST_TEXT_SECTION __attribute__((section(".bsp_fast_text")))
  • c/src/lib/libbsp/powerpc/shared/irq/irq_init.c

    r6b24b88 r2e4ead3  
    234234    outb(tmp, ISA8259_S_ELCR);
    235235    tmp = ELCRM_INT5_LVL;
    236     outb(tmp, ISA8259_M_ELCR);;
     236    outb(tmp, ISA8259_M_ELCR);
    237237    /*
    238238     * Set the Interrupt inputs to non-inverting level interrupt
  • c/src/lib/libbsp/powerpc/shared/startup/linkcmds.base

    r6b24b88 r2e4ead3  
    329329                *(.bsp_nocache)
    330330                bsp_section_nocache_end = .;
    331         } > REGION_NOCACHE AT > REGION_NOCACHE
     331        } > REGION_NOCACHE AT > REGION_NOCACHE_LOAD
    332332        bsp_section_nocache_size = bsp_section_nocache_end - bsp_section_nocache_begin;
     333        bsp_section_nocache_load_begin = LOADADDR (.nocache);
     334        bsp_section_nocache_load_end = bsp_section_nocache_load_begin + bsp_section_nocache_size;
    333335
    334336        /* FIXME */
  • c/src/lib/libbsp/powerpc/t32mppc/startup/linkcmds.t32mppc

    r6b24b88 r2e4ead3  
    1919REGION_ALIAS ("REGION_WORK", RAM);
    2020REGION_ALIAS ("REGION_STACK", RAM);
    21 REGION_ALIAS ("REGION_NOCACHE", RAM);
     21REGION_ALIAS ("REGION_NOCACHE", NIRVANA);
     22REGION_ALIAS ("REGION_NOCACHE_LOAD", NIRVANA);
    2223
    2324INCLUDE linkcmds.base
  • c/src/lib/libbsp/shared/vmeUniverse/vmeUniverse.c

    r6b24b88 r2e4ead3  
    14591459        {
    14601460        /* help the compiler allocate registers */
    1461         register volatile LERegister *b=base;;
     1461        register volatile LERegister *b=base;
    14621462        register unsigned long dgcsoff=UNIV_REGOFF_DGCS,dgcs;
    14631463
  • c/src/lib/libcpu/bfin/serial/uart.c

    r6b24b88 r2e4ead3  
    532532rtems_device_driver bfin_uart_open(rtems_device_major_number major,
    533533    rtems_device_minor_number minor, void *arg) {
    534   rtems_status_code             sc    = RTEMS_NOT_DEFINED;;
     534  rtems_status_code             sc    = RTEMS_NOT_DEFINED;
    535535  rtems_libio_open_close_args_t *args = NULL;
    536536
  • c/src/lib/libcpu/powerpc/mpc6xx/altivec/vec_sup.c

    r6b24b88 r2e4ead3  
    234234         * Therefore, we compute it here and store it in memory...
    235235         */
    236         _CPU_altivec_ctxt_off  = (uint32_t) &((Context_Control*)0)->altivec;
     236        _CPU_altivec_ctxt_off  = offsetof(ppc_context, altivec);
    237237        /*
    238238         * Add space possibly needed for alignment
  • c/src/lib/libcpu/powerpc/mpc6xx/altivec/vec_sup_asm.S

    r6b24b88 r2e4ead3  
    624624        blr
    625625
    626         .global _CPU_Context_restore_altivec
    627 _CPU_Context_restore_altivec:
    628         /* Restore is like 'switch' but we don't have
    629          * to save an old context.
    630          * Move argument to second arg and load NULL pointer
    631          * to first one, then jump to 'switch' routine.
    632          */
    633         mr      r4, r3
    634         li  r3,  0
    635         b _CPU_Context_switch_altivec
    636 
    637626        .global _CPU_Context_switch_altivec
    638627_CPU_Context_switch_altivec:
  • c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_async_normal.S

    r6b24b88 r2e4ead3  
    7979
    8080        /* Load ISR nest level and thread dispatch disable level */
    81         PPC_EXC_GPR_STORE       ISR_NEST_HADDR_REGISTER, ISR_NEST_HADDR_OFFSET(r1)
     81        PPC_GPR_STORE   ISR_NEST_HADDR_REGISTER, ISR_NEST_HADDR_OFFSET(r1)
    8282        lis     ISR_NEST_HADDR_REGISTER, ISR_NEST_LEVEL@ha
    83         PPC_EXC_GPR_STORE       ISR_NEST_REGISTER, ISR_NEST_OFFSET(r1)
     83        PPC_GPR_STORE   ISR_NEST_REGISTER, ISR_NEST_OFFSET(r1)
    8484        lwz     ISR_NEST_REGISTER, ISR_NEST_LEVEL@l(ISR_NEST_HADDR_REGISTER)
    85         PPC_EXC_GPR_STORE       DISPATCH_LEVEL_REGISTER, DISPATCH_LEVEL_OFFSET(r1)
     85        PPC_GPR_STORE   DISPATCH_LEVEL_REGISTER, DISPATCH_LEVEL_OFFSET(r1)
    8686        lwz     DISPATCH_LEVEL_REGISTER, _Thread_Dispatch_disable_level@sdarel(r13)
    8787
    88         PPC_EXC_GPR_STORE       SCRATCH_0_REGISTER, SCRATCH_0_OFFSET(r1)
     88        PPC_GPR_STORE   SCRATCH_0_REGISTER, SCRATCH_0_OFFSET(r1)
    8989
    9090#ifdef __SPE__
     
    9797#endif
    9898
    99         PPC_EXC_GPR_STORE       HANDLER_REGISTER, HANDLER_OFFSET(r1)
     99        PPC_GPR_STORE   HANDLER_REGISTER, HANDLER_OFFSET(r1)
    100100
    101101        /*
     
    110110        lwzx    HANDLER_REGISTER, HANDLER_REGISTER, SCRATCH_0_REGISTER
    111111
    112         PPC_EXC_GPR_STORE       SCRATCH_1_REGISTER, SCRATCH_1_OFFSET(r1)
    113         PPC_EXC_GPR_STORE       SCRATCH_2_REGISTER, SCRATCH_2_OFFSET(r1)
    114         PPC_EXC_GPR_STORE       SCRATCH_3_REGISTER, SCRATCH_3_OFFSET(r1)
    115         PPC_EXC_GPR_STORE       SCRATCH_4_REGISTER, SCRATCH_4_OFFSET(r1)
    116         PPC_EXC_GPR_STORE       SCRATCH_5_REGISTER, SCRATCH_5_OFFSET(r1)
     112        PPC_GPR_STORE   SCRATCH_1_REGISTER, SCRATCH_1_OFFSET(r1)
     113        PPC_GPR_STORE   SCRATCH_2_REGISTER, SCRATCH_2_OFFSET(r1)
     114        PPC_GPR_STORE   SCRATCH_3_REGISTER, SCRATCH_3_OFFSET(r1)
     115        PPC_GPR_STORE   SCRATCH_4_REGISTER, SCRATCH_4_OFFSET(r1)
     116        PPC_GPR_STORE   SCRATCH_5_REGISTER, SCRATCH_5_OFFSET(r1)
    117117
    118118        /* Save SRR0, SRR1, CR, CTR, XER, and LR */
     
    198198        lwz     SCRATCH_5_REGISTER, EXC_LR_OFFSET(r1)
    199199
    200         PPC_EXC_GPR_LOAD        VECTOR_REGISTER, VECTOR_OFFSET(r1)
    201         PPC_EXC_GPR_LOAD        ISR_NEST_HADDR_REGISTER, ISR_NEST_HADDR_OFFSET(r1)
    202         PPC_EXC_GPR_LOAD        ISR_NEST_REGISTER, ISR_NEST_OFFSET(r1)
     200        PPC_GPR_LOAD    VECTOR_REGISTER, VECTOR_OFFSET(r1)
     201        PPC_GPR_LOAD    ISR_NEST_HADDR_REGISTER, ISR_NEST_HADDR_OFFSET(r1)
     202        PPC_GPR_LOAD    ISR_NEST_REGISTER, ISR_NEST_OFFSET(r1)
    203203
    204204#ifdef __SPE__
     
    206206        mtspr   FSL_EIS_SPEFSCR, DISPATCH_LEVEL_REGISTER
    207207#endif
    208         PPC_EXC_GPR_LOAD        DISPATCH_LEVEL_REGISTER, DISPATCH_LEVEL_OFFSET(r1)
     208        PPC_GPR_LOAD    DISPATCH_LEVEL_REGISTER, DISPATCH_LEVEL_OFFSET(r1)
    209209
    210210#ifdef __SPE__
     
    212212        evmra   HANDLER_REGISTER, HANDLER_REGISTER
    213213#endif
    214         PPC_EXC_GPR_LOAD        HANDLER_REGISTER, HANDLER_OFFSET(r1)
     214        PPC_GPR_LOAD    HANDLER_REGISTER, HANDLER_OFFSET(r1)
    215215
    216216        /* Restore SRR0, SRR1, CR, CTR, XER, and LR */
    217217        mtsrr0  SCRATCH_0_REGISTER
    218         PPC_EXC_GPR_LOAD        SCRATCH_0_REGISTER, SCRATCH_0_OFFSET(r1)
     218        PPC_GPR_LOAD    SCRATCH_0_REGISTER, SCRATCH_0_OFFSET(r1)
    219219        mtsrr1  SCRATCH_1_REGISTER
    220         PPC_EXC_GPR_LOAD        SCRATCH_1_REGISTER, SCRATCH_1_OFFSET(r1)
     220        PPC_GPR_LOAD    SCRATCH_1_REGISTER, SCRATCH_1_OFFSET(r1)
    221221        mtcr    SCRATCH_2_REGISTER
    222         PPC_EXC_GPR_LOAD        SCRATCH_2_REGISTER, SCRATCH_2_OFFSET(r1)
     222        PPC_GPR_LOAD    SCRATCH_2_REGISTER, SCRATCH_2_OFFSET(r1)
    223223        mtctr   SCRATCH_3_REGISTER
    224         PPC_EXC_GPR_LOAD        SCRATCH_3_REGISTER, SCRATCH_3_OFFSET(r1)
     224        PPC_GPR_LOAD    SCRATCH_3_REGISTER, SCRATCH_3_OFFSET(r1)
    225225        mtxer   SCRATCH_4_REGISTER
    226         PPC_EXC_GPR_LOAD        SCRATCH_4_REGISTER, SCRATCH_4_OFFSET(r1)
     226        PPC_GPR_LOAD    SCRATCH_4_REGISTER, SCRATCH_4_OFFSET(r1)
    227227        mtlr    SCRATCH_5_REGISTER
    228         PPC_EXC_GPR_LOAD        SCRATCH_5_REGISTER, SCRATCH_5_OFFSET(r1)
     228        PPC_GPR_LOAD    SCRATCH_5_REGISTER, SCRATCH_5_OFFSET(r1)
    229229
    230230        /* Pop stack */
  • c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/vectors.h

    r6b24b88 r2e4ead3  
    143143
    144144#ifndef __SPE__
    145   #define PPC_EXC_GPR_TYPE unsigned
    146   #define PPC_EXC_GPR_SIZE 4
    147   #define PPC_EXC_GPR_OFFSET(gpr) ((gpr) * PPC_EXC_GPR_SIZE + 36)
     145  #define PPC_EXC_GPR_OFFSET(gpr) ((gpr) * PPC_GPR_SIZE + 36)
    148146  #define PPC_EXC_VECTOR_PROLOGUE_OFFSET PPC_EXC_GPR_OFFSET(4)
    149   #define PPC_EXC_GPR_LOAD lwz
    150   #define PPC_EXC_GPR_STORE stw
    151147  #define PPC_EXC_MINIMAL_FRAME_SIZE 96
    152148  #define PPC_EXC_FRAME_SIZE 176
    153149#else
    154   #define PPC_EXC_GPR_TYPE uint64_t
    155   #define PPC_EXC_GPR_SIZE 8
    156150  #define PPC_EXC_SPEFSCR_OFFSET 36
    157151  #define PPC_EXC_ACC_OFFSET 40
    158   #define PPC_EXC_GPR_OFFSET(gpr) ((gpr) * PPC_EXC_GPR_SIZE + 48)
     152  #define PPC_EXC_GPR_OFFSET(gpr) ((gpr) * PPC_GPR_SIZE + 48)
    159153  #define PPC_EXC_VECTOR_PROLOGUE_OFFSET (PPC_EXC_GPR_OFFSET(4) + 4)
    160   #define PPC_EXC_GPR_LOAD evldd
    161   #define PPC_EXC_GPR_STORE evstdd
    162154  #define PPC_EXC_MINIMAL_FRAME_SIZE 160
    163155  #define PPC_EXC_FRAME_SIZE 320
     
    269261    uint64_t EXC_ACC;
    270262  #endif
    271   PPC_EXC_GPR_TYPE GPR0;
    272   PPC_EXC_GPR_TYPE GPR1;
    273   PPC_EXC_GPR_TYPE GPR2;
    274   PPC_EXC_GPR_TYPE GPR3;
    275   PPC_EXC_GPR_TYPE GPR4;
    276   PPC_EXC_GPR_TYPE GPR5;
    277   PPC_EXC_GPR_TYPE GPR6;
    278   PPC_EXC_GPR_TYPE GPR7;
    279   PPC_EXC_GPR_TYPE GPR8;
    280   PPC_EXC_GPR_TYPE GPR9;
    281   PPC_EXC_GPR_TYPE GPR10;
    282   PPC_EXC_GPR_TYPE GPR11;
    283   PPC_EXC_GPR_TYPE GPR12;
    284   PPC_EXC_GPR_TYPE GPR13;
    285   PPC_EXC_GPR_TYPE GPR14;
    286   PPC_EXC_GPR_TYPE GPR15;
    287   PPC_EXC_GPR_TYPE GPR16;
    288   PPC_EXC_GPR_TYPE GPR17;
    289   PPC_EXC_GPR_TYPE GPR18;
    290   PPC_EXC_GPR_TYPE GPR19;
    291   PPC_EXC_GPR_TYPE GPR20;
    292   PPC_EXC_GPR_TYPE GPR21;
    293   PPC_EXC_GPR_TYPE GPR22;
    294   PPC_EXC_GPR_TYPE GPR23;
    295   PPC_EXC_GPR_TYPE GPR24;
    296   PPC_EXC_GPR_TYPE GPR25;
    297   PPC_EXC_GPR_TYPE GPR26;
    298   PPC_EXC_GPR_TYPE GPR27;
    299   PPC_EXC_GPR_TYPE GPR28;
    300   PPC_EXC_GPR_TYPE GPR29;
    301   PPC_EXC_GPR_TYPE GPR30;
    302   PPC_EXC_GPR_TYPE GPR31;
     263  PPC_GPR_TYPE GPR0;
     264  PPC_GPR_TYPE GPR1;
     265  PPC_GPR_TYPE GPR2;
     266  PPC_GPR_TYPE GPR3;
     267  PPC_GPR_TYPE GPR4;
     268  PPC_GPR_TYPE GPR5;
     269  PPC_GPR_TYPE GPR6;
     270  PPC_GPR_TYPE GPR7;
     271  PPC_GPR_TYPE GPR8;
     272  PPC_GPR_TYPE GPR9;
     273  PPC_GPR_TYPE GPR10;
     274  PPC_GPR_TYPE GPR11;
     275  PPC_GPR_TYPE GPR12;
     276  PPC_GPR_TYPE GPR13;
     277  PPC_GPR_TYPE GPR14;
     278  PPC_GPR_TYPE GPR15;
     279  PPC_GPR_TYPE GPR16;
     280  PPC_GPR_TYPE GPR17;
     281  PPC_GPR_TYPE GPR18;
     282  PPC_GPR_TYPE GPR19;
     283  PPC_GPR_TYPE GPR20;
     284  PPC_GPR_TYPE GPR21;
     285  PPC_GPR_TYPE GPR22;
     286  PPC_GPR_TYPE GPR23;
     287  PPC_GPR_TYPE GPR24;
     288  PPC_GPR_TYPE GPR25;
     289  PPC_GPR_TYPE GPR26;
     290  PPC_GPR_TYPE GPR27;
     291  PPC_GPR_TYPE GPR28;
     292  PPC_GPR_TYPE GPR29;
     293  PPC_GPR_TYPE GPR30;
     294  PPC_GPR_TYPE GPR31;
    303295  unsigned EXC_MSR;
    304296  unsigned EXC_DAR;
  • c/src/lib/libcpu/powerpc/new-exceptions/cpu.c

    r6b24b88 r2e4ead3  
    6666)
    6767{
     68  ppc_context *the_ppc_context;
    6869  uint32_t   msr_value;
    6970  uint32_t   sp;
     
    123124  memset( the_context, 0, sizeof( *the_context ) );
    124125
    125   PPC_CONTEXT_SET_SP( the_context, sp );
    126   PPC_CONTEXT_SET_PC( the_context, (uint32_t) entry_point );
    127   PPC_CONTEXT_SET_MSR( the_context, msr_value );
    128 
    129 #ifndef __SPE__
    130 #if (PPC_ABI == PPC_ABI_SVR4)
    131   /*
    132    * SVR4 says R2 is for 'system-reserved' use; it cannot hurt to
    133    * propagate R2 to all task contexts.
    134    */
    135   { uint32_t    r2 = 0;
    136     unsigned    r13 = 0;
    137     __asm__ volatile ("mr %0,2; mr %1,13" : "=r" ((r2)), "=r" ((r13)));
    138 
    139     the_context->gpr2 = r2;
    140     the_context->gpr13 = r13;
    141   }
    142 #elif (PPC_ABI == PPC_ABI_EABI)
    143   { uint32_t    r2 = 0;
    144     unsigned    r13 = 0;
    145     __asm__ volatile ("mr %0,2; mr %1,13" : "=r" ((r2)), "=r" ((r13)));
    146 
    147     the_context->gpr2 = r2;
    148     the_context->gpr13 = r13;
    149   }
    150 #else
    151 #error unsupported PPC_ABI
    152 #endif
    153 #endif /* __SPE__ */
     126  the_ppc_context = ppc_get_context( the_context );
     127  the_ppc_context->gpr1 = sp;
     128  the_ppc_context->msr = msr_value;
     129  the_ppc_context->lr = (uint32_t) entry_point;
    154130
    155131#ifdef __ALTIVEC__
  • c/src/lib/libcpu/powerpc/new-exceptions/cpu_asm.S

    r6b24b88 r2e4ead3  
    2424 *  On-Line Applications Research Corporation (OAR).
    2525 *
    26  *  Copyright (c) 2011 embedded brains GmbH.
     26 *  Copyright (c) 2011-2012 embedded brains GmbH.
    2727 *
    2828 *  The license and distribution terms for this file may in
     
    3636#include <bspopts.h>
    3737
     38#if PPC_DEFAULT_CACHE_LINE_SIZE != 32
     39  #error "unexpected PPC_DEFAULT_CACHE_LINE_SIZE value"
     40#endif
     41
     42#ifdef BSP_USE_DATA_CACHE_BLOCK_TOUCH
     43  #define DATA_CACHE_TOUCH(rega, regb) \
     44        dcbt rega, regb
     45#else
     46  #define DATA_CACHE_TOUCH(rega, regb)
     47#endif
     48
    3849#if BSP_DATA_CACHE_ENABLED && PPC_CACHE_ALIGNMENT == 32
    39   #define DATA_CACHE_ALIGNMENT(reg) \
    40     li reg, PPC_CACHE_ALIGNMENT
    41   #define DATA_CACHE_ZERO(rega, regb) \
    42     dcbz rega, regb
    43   #define DATA_CACHE_TOUCH(rega, regb) \
    44     dcbt rega, regb
    4550  #define DATA_CACHE_ZERO_AND_TOUCH(reg, offset) \
    46     li reg, offset; dcbz reg, r3; dcbt reg, r4
     51        li reg, offset; dcbz reg, r3; DATA_CACHE_TOUCH(reg, r4)
    4752#else
    48   #define DATA_CACHE_ALIGNMENT(reg)
    49   #define DATA_CACHE_ZERO(rega, regb)
    50   #define DATA_CACHE_TOUCH(rega, regb)
    51   #define DATA_CACHE_ZERO_AND_TOUCH(reg, offset) \
    52     li reg, offset
    53 #endif
     53  #define DATA_CACHE_ZERO_AND_TOUCH(reg, offset)
     54#endif
     55
     56#define PPC_CONTEXT_CACHE_LINE_0 32
     57#define PPC_CONTEXT_CACHE_LINE_1 64
     58#define PPC_CONTEXT_CACHE_LINE_2 96
     59#define PPC_CONTEXT_CACHE_LINE_3 128
     60#define PPC_CONTEXT_CACHE_LINE_4 160
    5461
    5562/*
    5663 * Offsets for various Contexts
    5764 */
    58         .set    GP_1, 0
    59         .set    GP_2, (GP_1 + 4)
    60         .set    GP_13, (GP_2 + 4)
    61         .set    GP_14, (GP_13 + 4)
    62 
    63         .set    GP_15, (GP_14 + 4)
    64         .set    GP_16, (GP_15 + 4)
    65         .set    GP_17, (GP_16 + 4)
    66         .set    GP_18, (GP_17 + 4)
    67 
    68         .set    GP_19, (GP_18 + 4)
    69         .set    GP_20, (GP_19 + 4)
    70         .set    GP_21, (GP_20 + 4)
    71         .set    GP_22, (GP_21 + 4)
    72 
    73         .set    GP_23, (GP_22 + 4)
    74         .set    GP_24, (GP_23 + 4)
    75         .set    GP_25, (GP_24 + 4)
    76         .set    GP_26, (GP_25 + 4)
    77 
    78         .set    GP_27, (GP_26 + 4)
    79         .set    GP_28, (GP_27 + 4)
    80         .set    GP_29, (GP_28 + 4)
    81         .set    GP_30, (GP_29 + 4)
    82 
    83         .set    GP_31, (GP_30 + 4)
    84         .set    GP_CR, (GP_31 + 4)
    85         .set    GP_PC, (GP_CR + 4)
    86         .set    GP_MSR, (GP_PC + 4)
    8765
    8866#if (PPC_HAS_DOUBLE==1)
     
    129107        .set    FP_31, (FP_30 + FP_SIZE)
    130108        .set    FP_FPSCR, (FP_31 + FP_SIZE)
    131 
    132         .set    IP_LINK, 0
    133         .set    IP_0, (IP_LINK + 8)
    134         .set    IP_2, (IP_0 + 4)
    135 
    136         .set    IP_3, (IP_2 + 4)
    137         .set    IP_4, (IP_3 + 4)
    138         .set    IP_5, (IP_4 + 4)
    139         .set    IP_6, (IP_5 + 4)
    140 
    141         .set    IP_7, (IP_6 + 4)
    142         .set    IP_8, (IP_7 + 4)
    143         .set    IP_9, (IP_8 + 4)
    144         .set    IP_10, (IP_9 + 4)
    145 
    146         .set    IP_11, (IP_10 + 4)
    147         .set    IP_12, (IP_11 + 4)
    148         .set    IP_13, (IP_12 + 4)
    149         .set    IP_28, (IP_13 + 4)
    150 
    151         .set    IP_29, (IP_28 + 4)
    152         .set    IP_30, (IP_29 + 4)
    153         .set    IP_31, (IP_30 + 4)
    154         .set    IP_CR, (IP_31 + 4)
    155 
    156         .set    IP_CTR, (IP_CR + 4)
    157         .set    IP_XER, (IP_CTR + 4)
    158         .set    IP_LR, (IP_XER + 4)
    159         .set    IP_PC, (IP_LR + 4)
    160 
    161         .set    IP_MSR, (IP_PC + 4)
    162         .set    IP_END, (IP_MSR + 16)
    163109
    164110        BEGIN_CODE
     
    301247        blr
    302248
    303 /*  _CPU_Context_switch
    304  *
    305  *  This routine performs a normal non-FP context switch.
    306  */
    307249        ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
    308250        PUBLIC_PROC (_CPU_Context_switch)
    309251PROC (_CPU_Context_switch):
    310 #ifndef __SPE__
     252
     253#ifdef BSP_USE_SYNC_IN_CONTEXT_SWITCH
    311254        sync
    312255        isync
    313         /* This assumes that all the registers are in the given order */
    314         DATA_CACHE_ALIGNMENT(r5)
    315         addi    r9,r3,-4
    316         DATA_CACHE_ZERO(r5, r9)
    317 #ifdef RTEMS_MULTIPROCESSING
    318         /*
    319          * We have to clear the reservation of the executing thread.  See also
    320          * Book E section 6.1.6.2 "Atomic Update Primitives".
    321          */
    322         li      r10, GP_1 + 4
    323         stwcx.  r1, r9, r10
    324 #endif
    325         stw     r1, GP_1+4(r9)
    326         stw     r2, GP_2+4(r9)
    327 #if (PPC_USE_MULTIPLE == 1)
    328         addi    r9, r9, GP_18+4
    329         DATA_CACHE_ZERO(r5, r9)
    330         stmw    r13, GP_13-GP_18(r9)
    331 #else
    332         stw     r13, GP_13+4(r9)
    333         stw     r14, GP_14+4(r9)
    334         stw     r15, GP_15+4(r9)
    335         stw     r16, GP_16+4(r9)
    336         stw     r17, GP_17+4(r9)
    337         stwu    r18, GP_18+4(r9)
    338         DATA_CACHE_ZERO(r5, r9)
    339         stw     r19, GP_19-GP_18(r9)
    340         stw     r20, GP_20-GP_18(r9)
    341         stw     r21, GP_21-GP_18(r9)
    342         stw     r22, GP_22-GP_18(r9)
    343         stw     r23, GP_23-GP_18(r9)
    344         stw     r24, GP_24-GP_18(r9)
    345         stw     r25, GP_25-GP_18(r9)
    346         stw     r26, GP_26-GP_18(r9)
    347         stw     r27, GP_27-GP_18(r9)
    348         stw     r28, GP_28-GP_18(r9)
    349         stw     r29, GP_29-GP_18(r9)
    350         stw     r30, GP_30-GP_18(r9)
    351         stw     r31, GP_31-GP_18(r9)
    352 #endif
    353         DATA_CACHE_TOUCH(r0, r4)
    354         mfcr    r6
    355         stw     r6, GP_CR-GP_18(r9)
    356         mflr    r7
    357         stw     r7, GP_PC-GP_18(r9)
    358         mfmsr   r8
    359         stw     r8, GP_MSR-GP_18(r9)
    360 
    361 #ifdef __ALTIVEC__
    362         mr      r14, r4
    363         EXTERN_PROC(_CPU_Context_switch_altivec)
    364         bl              _CPU_Context_switch_altivec
    365         mr      r4, r14
    366         DATA_CACHE_ALIGNMENT(r5)
    367 #endif
    368 
    369         DATA_CACHE_TOUCH(r5, r4)
    370         lwz     r1, GP_1(r4)
    371         lwz     r2, GP_2(r4)
    372 #if (PPC_USE_MULTIPLE == 1)
    373         addi    r4, r4, GP_19
    374         DATA_CACHE_TOUCH(r5, r4)
    375         lmw     r13, GP_13-GP_19(r4)
    376 #else
    377         lwz     r13, GP_13(r4)
    378         lwz     r14, GP_14(r4)
    379         lwz     r15, GP_15(r4)
    380         lwz     r16, GP_16(r4)
    381         lwz     r17, GP_17(r4)
    382         lwz     r18, GP_18(r4)
    383         lwzu    r19, GP_19(r4)
    384         DATA_CACHE_TOUCH(r5, r4)
    385         lwz     r20, GP_20-GP_19(r4)
    386         lwz     r21, GP_21-GP_19(r4)
    387         lwz     r22, GP_22-GP_19(r4)
    388         lwz     r23, GP_23-GP_19(r4)
    389         lwz     r24, GP_24-GP_19(r4)
    390         lwz     r25, GP_25-GP_19(r4)
    391         lwz     r26, GP_26-GP_19(r4)
    392         lwz     r27, GP_27-GP_19(r4)
    393         lwz     r28, GP_28-GP_19(r4)
    394         lwz     r29, GP_29-GP_19(r4)
    395         lwz     r30, GP_30-GP_19(r4)
    396         lwz     r31, GP_31-GP_19(r4)
    397 #endif
    398         lwz     r6, GP_CR-GP_19(r4)
    399         lwz     r7, GP_PC-GP_19(r4)
    400         lwz     r8, GP_MSR-GP_19(r4)
    401         mtcrf   255, r6
    402         mtlr    r7
    403         mtmsr   r8
    404         isync
    405 
    406         blr
    407 #else /* __SPE__ */
     256#endif
     257
    408258        /* Align to a cache line */
    409259        clrrwi  r3, r3, 5
     
    422272         * We have to clear the reservation of the executing thread.  See also
    423273         * Book E section 6.1.6.2 "Atomic Update Primitives".
    424          *
    425          * Here we assume PPC_CONTEXT_OFFSET_SP == PPC_CONTEXT_CACHE_LINE_0.
    426274         */
     275  #if PPC_CONTEXT_OFFSET_GPR1 != PPC_CONTEXT_CACHE_LINE_0 \
     276    || !BSP_DATA_CACHE_ENABLED \
     277    || PPC_CACHE_ALIGNMENT != 32
     278        li      r10, PPC_CONTEXT_OFFSET_GPR1
     279  #endif
    427280        stwcx.  r1, r3, r10
    428281#endif
    429         stw     r1, PPC_CONTEXT_OFFSET_SP(r3)
     282        stw     r1, PPC_CONTEXT_OFFSET_GPR1(r3)
    430283        stw     r5, PPC_CONTEXT_OFFSET_MSR(r3)
    431284        stw     r6, PPC_CONTEXT_OFFSET_LR(r3)
    432285        stw     r7, PPC_CONTEXT_OFFSET_CR(r3)
    433         evstdd  r14, PPC_CONTEXT_OFFSET_GPR14(r3)
    434         evstdd  r15, PPC_CONTEXT_OFFSET_GPR15(r3)
    435 
     286        PPC_GPR_STORE   r14, PPC_CONTEXT_OFFSET_GPR14(r3)
     287        PPC_GPR_STORE   r15, PPC_CONTEXT_OFFSET_GPR15(r3)
     288
     289#if PPC_CONTEXT_OFFSET_GPR20 == PPC_CONTEXT_CACHE_LINE_2
    436290        DATA_CACHE_ZERO_AND_TOUCH(r10, PPC_CONTEXT_CACHE_LINE_2)
    437 
    438         evstdd  r16, PPC_CONTEXT_OFFSET_GPR16(r3)
    439         evstdd  r17, PPC_CONTEXT_OFFSET_GPR17(r3)
    440         evstdd  r18, PPC_CONTEXT_OFFSET_GPR18(r3)
    441         evstdd  r19, PPC_CONTEXT_OFFSET_GPR19(r3)
    442 
     291#endif
     292
     293        PPC_GPR_STORE   r16, PPC_CONTEXT_OFFSET_GPR16(r3)
     294        PPC_GPR_STORE   r17, PPC_CONTEXT_OFFSET_GPR17(r3)
     295
     296#if PPC_CONTEXT_OFFSET_GPR26 == PPC_CONTEXT_CACHE_LINE_2
     297        DATA_CACHE_ZERO_AND_TOUCH(r10, PPC_CONTEXT_CACHE_LINE_2)
     298#endif
     299
     300        PPC_GPR_STORE   r18, PPC_CONTEXT_OFFSET_GPR18(r3)
     301        PPC_GPR_STORE   r19, PPC_CONTEXT_OFFSET_GPR19(r3)
     302
     303#if PPC_CONTEXT_OFFSET_GPR24 == PPC_CONTEXT_CACHE_LINE_3
    443304        DATA_CACHE_ZERO_AND_TOUCH(r10, PPC_CONTEXT_CACHE_LINE_3)
    444 
    445         evstdd  r20, PPC_CONTEXT_OFFSET_GPR20(r3)
    446         evstdd  r21, PPC_CONTEXT_OFFSET_GPR21(r3)
    447         evstdd  r22, PPC_CONTEXT_OFFSET_GPR22(r3)
    448         evstdd  r23, PPC_CONTEXT_OFFSET_GPR23(r3)
    449 
     305#endif
     306
     307        PPC_GPR_STORE   r20, PPC_CONTEXT_OFFSET_GPR20(r3)
     308        PPC_GPR_STORE   r21, PPC_CONTEXT_OFFSET_GPR21(r3)
     309        PPC_GPR_STORE   r22, PPC_CONTEXT_OFFSET_GPR22(r3)
     310        PPC_GPR_STORE   r23, PPC_CONTEXT_OFFSET_GPR23(r3)
     311
     312#if PPC_CONTEXT_OFFSET_GPR28 == PPC_CONTEXT_CACHE_LINE_4
    450313        DATA_CACHE_ZERO_AND_TOUCH(r10, PPC_CONTEXT_CACHE_LINE_4)
    451 
    452         evstdd  r24, PPC_CONTEXT_OFFSET_GPR24(r3)
    453         evstdd  r25, PPC_CONTEXT_OFFSET_GPR25(r3)
    454         evstdd  r26, PPC_CONTEXT_OFFSET_GPR26(r3)
    455         evstdd  r27, PPC_CONTEXT_OFFSET_GPR27(r3)
    456 
    457         evstdd  r28, PPC_CONTEXT_OFFSET_GPR28(r3)
    458         evstdd  r29, PPC_CONTEXT_OFFSET_GPR29(r3)
    459         evstdd  r30, PPC_CONTEXT_OFFSET_GPR30(r3)
    460         evstdd  r31, PPC_CONTEXT_OFFSET_GPR31(r3)
     314#endif
     315
     316        PPC_GPR_STORE   r24, PPC_CONTEXT_OFFSET_GPR24(r3)
     317        PPC_GPR_STORE   r25, PPC_CONTEXT_OFFSET_GPR25(r3)
     318        PPC_GPR_STORE   r26, PPC_CONTEXT_OFFSET_GPR26(r3)
     319        PPC_GPR_STORE   r27, PPC_CONTEXT_OFFSET_GPR27(r3)
     320
     321        PPC_GPR_STORE   r28, PPC_CONTEXT_OFFSET_GPR28(r3)
     322        PPC_GPR_STORE   r29, PPC_CONTEXT_OFFSET_GPR29(r3)
     323        PPC_GPR_STORE   r30, PPC_CONTEXT_OFFSET_GPR30(r3)
     324        PPC_GPR_STORE   r31, PPC_CONTEXT_OFFSET_GPR31(r3)
    461325
    462326        /* Restore context from r4 */
    463327restore_context:
    464328
    465         lwz     r1, PPC_CONTEXT_OFFSET_SP(r4)
     329#ifdef __ALTIVEC__
     330        mr      r14, r4
     331        .extern _CPU_Context_switch_altivec
     332        bl      _CPU_Context_switch_altivec
     333        mr      r4, r14
     334#endif
     335
     336        lwz     r1, PPC_CONTEXT_OFFSET_GPR1(r4)
    466337        lwz     r5, PPC_CONTEXT_OFFSET_MSR(r4)
    467338        lwz     r6, PPC_CONTEXT_OFFSET_LR(r4)
    468339        lwz     r7, PPC_CONTEXT_OFFSET_CR(r4)
    469340
    470         evldd   r14, PPC_CONTEXT_OFFSET_GPR14(r4)
    471         evldd   r15, PPC_CONTEXT_OFFSET_GPR15(r4)
     341        PPC_GPR_LOAD    r14, PPC_CONTEXT_OFFSET_GPR14(r4)
     342        PPC_GPR_LOAD    r15, PPC_CONTEXT_OFFSET_GPR15(r4)
    472343
    473344        DATA_CACHE_TOUCH(r0, r1)
    474345
    475         evldd   r16, PPC_CONTEXT_OFFSET_GPR16(r4)
    476         evldd   r17, PPC_CONTEXT_OFFSET_GPR17(r4)
    477         evldd   r18, PPC_CONTEXT_OFFSET_GPR18(r4)
    478         evldd   r19, PPC_CONTEXT_OFFSET_GPR19(r4)
    479 
    480         evldd   r20, PPC_CONTEXT_OFFSET_GPR20(r4)
    481         evldd   r21, PPC_CONTEXT_OFFSET_GPR21(r4)
    482         evldd   r22, PPC_CONTEXT_OFFSET_GPR22(r4)
    483         evldd   r23, PPC_CONTEXT_OFFSET_GPR23(r4)
    484 
    485         evldd   r24, PPC_CONTEXT_OFFSET_GPR24(r4)
    486         evldd   r25, PPC_CONTEXT_OFFSET_GPR25(r4)
    487         evldd   r26, PPC_CONTEXT_OFFSET_GPR26(r4)
    488         evldd   r27, PPC_CONTEXT_OFFSET_GPR27(r4)
    489 
    490         evldd   r28, PPC_CONTEXT_OFFSET_GPR28(r4)
    491         evldd   r29, PPC_CONTEXT_OFFSET_GPR29(r4)
    492         evldd   r30, PPC_CONTEXT_OFFSET_GPR30(r4)
    493         evldd   r31, PPC_CONTEXT_OFFSET_GPR31(r4)
     346        PPC_GPR_LOAD    r16, PPC_CONTEXT_OFFSET_GPR16(r4)
     347        PPC_GPR_LOAD    r17, PPC_CONTEXT_OFFSET_GPR17(r4)
     348        PPC_GPR_LOAD    r18, PPC_CONTEXT_OFFSET_GPR18(r4)
     349        PPC_GPR_LOAD    r19, PPC_CONTEXT_OFFSET_GPR19(r4)
     350
     351        PPC_GPR_LOAD    r20, PPC_CONTEXT_OFFSET_GPR20(r4)
     352        PPC_GPR_LOAD    r21, PPC_CONTEXT_OFFSET_GPR21(r4)
     353        PPC_GPR_LOAD    r22, PPC_CONTEXT_OFFSET_GPR22(r4)
     354        PPC_GPR_LOAD    r23, PPC_CONTEXT_OFFSET_GPR23(r4)
     355
     356        PPC_GPR_LOAD    r24, PPC_CONTEXT_OFFSET_GPR24(r4)
     357        PPC_GPR_LOAD    r25, PPC_CONTEXT_OFFSET_GPR25(r4)
     358        PPC_GPR_LOAD    r26, PPC_CONTEXT_OFFSET_GPR26(r4)
     359        PPC_GPR_LOAD    r27, PPC_CONTEXT_OFFSET_GPR27(r4)
     360
     361        PPC_GPR_LOAD    r28, PPC_CONTEXT_OFFSET_GPR28(r4)
     362        PPC_GPR_LOAD    r29, PPC_CONTEXT_OFFSET_GPR29(r4)
     363        PPC_GPR_LOAD    r30, PPC_CONTEXT_OFFSET_GPR30(r4)
     364        PPC_GPR_LOAD    r31, PPC_CONTEXT_OFFSET_GPR31(r4)
    494365
    495366        mtcr    r7
     
    497368        mtmsr   r5
    498369
     370#ifdef BSP_USE_SYNC_IN_CONTEXT_SWITCH
     371        isync
     372#endif
     373
    499374        blr
    500 #endif /* __SPE__ */
    501 
    502 /*
    503  *  _CPU_Context_restore
    504  *
    505  *  This routine is generallu used only to restart self in an
    506  *  efficient manner.  It may simply be a label in _CPU_Context_switch.
    507  *
    508  *  NOTE: May be unnecessary to reload some registers.
    509  */
    510 /*
    511  * ACB: Don't worry about cache optimisation here - this is not THAT critical.
    512  */
    513         ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
     375
    514376        PUBLIC_PROC (_CPU_Context_restore)
    515377PROC (_CPU_Context_restore):
    516 #ifndef __SPE__
    517         lwz     r5, GP_CR(r3)
    518         lwz     r6, GP_PC(r3)
    519         lwz     r7, GP_MSR(r3)
    520         mtcrf   255, r5
    521         mtlr    r6
    522         mtmsr   r7
    523         isync
    524         lwz     r1, GP_1(r3)
    525         lwz     r2, GP_2(r3)
    526 #if (PPC_USE_MULTIPLE == 1)
    527         lmw     r13, GP_13(r3)
    528 #else
    529         lwz     r13, GP_13(r3)
    530         lwz     r14, GP_14(r3)
    531         lwz     r15, GP_15(r3)
    532         lwz     r16, GP_16(r3)
    533         lwz     r17, GP_17(r3)
    534         lwz     r18, GP_18(r3)
    535         lwz     r19, GP_19(r3)
    536         lwz     r20, GP_20(r3)
    537         lwz     r21, GP_21(r3)
    538         lwz     r22, GP_22(r3)
    539         lwz     r23, GP_23(r3)
    540         lwz     r24, GP_24(r3)
    541         lwz     r25, GP_25(r3)
    542         lwz     r26, GP_26(r3)
    543         lwz     r27, GP_27(r3)
    544         lwz     r28, GP_28(r3)
    545         lwz     r29, GP_29(r3)
    546         lwz     r30, GP_30(r3)
    547         lwz     r31, GP_31(r3)
    548 #endif
    549 #ifdef __ALTIVEC__
    550         EXTERN_PROC(_CPU_Context_restore_altivec)
    551         b _CPU_Context_restore_altivec
    552 #endif
    553         blr
    554 #else /* __SPE__ */
    555378        /* Align to a cache line */
    556379        clrrwi  r4, r3, 5
    557380
     381#ifdef __ALTIVEC__
     382        li      r3, 0
     383#endif
     384
    558385        b       restore_context
    559 #endif /* __SPE__ */
  • c/src/lib/libcpu/powerpc/ppc403/console/console405.c

    r6b24b88 r2e4ead3  
    249249
    250250  /* Wait for character */
    251   while ((port->LSR & LSR_RSR)==0);;
     251  while ((port->LSR & LSR_RSR)==0);
    252252
    253253  return port->RBR;
     
    260260
    261261  while (len-- > 0) {
    262     while (!(port->LSR & LSR_THE));;
     262    while (!(port->LSR & LSR_THE));
    263263    port->THR = *buf++;
    264264  }
  • c/src/lib/libcpu/powerpc/ppc403/tty_drv/tty_drv.c

    r6b24b88 r2e4ead3  
    213213
    214214  /* Wait for character */
    215   while ((tty0port->LSR & LSR_RSR)==0);;
     215  while ((tty0port->LSR & LSR_RSR)==0);
    216216
    217217  return tty0port->RBR;
     
    224224
    225225  while (len-- > 0) {
    226     while (!(tty0port->LSR & LSR_THE));;
     226    while (!(tty0port->LSR & LSR_THE));
    227227    tty0port->THR = *buf++;
    228228  }
  • cpukit/libblock/include/rtems/bdbuf.h

    r6b24b88 r2e4ead3  
    4747 *
    4848 * The Block Device Buffer Management implements a cache between the disk
    49  * devices and file systems.  The code provides read ahead and write queuing to
     49 * devices and file systems.  The code provides read-ahead and write queuing to
    5050 * the drivers and fast cache look-up using an AVL tree.
    5151 *
     
    153153 *
    154154 * The code performs multiple block reads and writes.  Multiple block reads or
    155  * read ahead increases performance with hardware that supports it.  It also
     155 * read-ahead increases performance with hardware that supports it.  It also
    156156 * helps with a large cache as the disk head movement is reduced.  It however
    157157 * is a speculative operation so excessive use can remove valuable and needed
    158  * blocks from the cache.
     158 * blocks from the cache.  The read-ahead is triggered after two misses of
     159 * ascending consecutive blocks or a read hit of a block read by the
     160 * most-resent read-ahead transfer.  The read-ahead works per disk, but all
     161 * transfers are issued by the read-ahead task.
    159162 *
    160163 * The cache has the following lists of buffers:
     
    380383                                                * supported. It is also the
    381384                                                * allocation size. */
     385  rtems_task_priority read_ahead_priority;     /**< Priority of the read-ahead
     386                                                * task. */
    382387} rtems_bdbuf_config;
    383388
     
    390395
    391396/**
    392  * The max_read_ahead_blocks value is altered if there are fewer buffers
    393  * than this defined max. This stops thrashing in the cache.
     397 * The default value for the maximum read-ahead blocks disables the read-ahead
     398 * feature.
    394399 */
    395400#define RTEMS_BDBUF_MAX_READ_AHEAD_BLOCKS_DEFAULT    0
     
    425430#define RTEMS_BDBUF_SWAPOUT_WORKER_TASK_PRIORITY_DEFAULT \
    426431                             RTEMS_BDBUF_SWAPOUT_TASK_PRIORITY_DEFAULT
     432
     433/**
     434 * Default read-ahead task priority.  The same as the swap-out task.
     435 */
     436#define RTEMS_BDBUF_READ_AHEAD_TASK_PRIORITY_DEFAULT \
     437  RTEMS_BDBUF_SWAPOUT_TASK_PRIORITY_DEFAULT
    427438
    428439/**
     
    622633 * @brief Purges all buffers corresponding to the disk device @a dd.
    623634 *
    624  * This may result in loss of data.
     635 * This may result in loss of data.  The read-ahead state of this device is reset.
    625636 *
    626637 * Before you can use this function, the rtems_bdbuf_init() routine must be
     
    636647 * @brief Sets the block size of a disk device.
    637648 *
    638  * This will set the block size derived fields of the disk device.
     649 * This will set the block size derived fields of the disk device.  The
     650 * read-ahead state of this device is reset.
    639651 *
    640652 * Before you can use this function, the rtems_bdbuf_init() routine must be
  • cpukit/libblock/include/rtems/diskdevs.h

    r6b24b88 r2e4ead3  
    1717#include <rtems.h>
    1818#include <rtems/libio.h>
     19#include <rtems/chain.h>
    1920#include <stdlib.h>
    2021
     
    5657
    5758/**
     59 * @brief Trigger value to disable further read-ahead requests.
     60 */
     61#define RTEMS_DISK_READ_AHEAD_NO_TRIGGER ((rtems_blkdev_bnum) -1)
     62
     63/**
     64 * @brief Read-ahead control.
     65 */
     66typedef struct {
     67  /**
     68   * @brief Chain node for the read-ahead request queue of the read-ahead task.
     69   */
     70  rtems_chain_node node;
     71
     72  /**
     73   * @brief Block value to trigger the read-ahead request.
     74   *
     75   * A value of @ref RTEMS_DISK_READ_AHEAD_NO_TRIGGER will disable further
     76   * read-ahead requests since no valid block can have this value.
     77   */
     78  rtems_blkdev_bnum trigger;
     79
     80  /**
     81   * @brief Start block for the next read-ahead request.
     82   *
     83   * In case the trigger value is out of range of valid blocks, this value my
     84   * be arbitrary.
     85   */
     86  rtems_blkdev_bnum next;
     87} rtems_disk_read_ahread;
     88
     89/**
    5890 * @brief Description of a disk device (logical and physical disks).
    5991 *
     
    169201   */
    170202  bool deleted;
     203
     204  /**
     205   * @brief Read-ahead control for this disk.
     206   */
     207  rtems_disk_read_ahread read_ahead;
    171208};
    172209
  • cpukit/libblock/src/bdbuf.c

    r6b24b88 r2e4ead3  
    135135  size_t              group_count;       /**< The number of groups. */
    136136  rtems_bdbuf_group*  groups;            /**< The groups. */
     137  rtems_id            read_ahead_task;   /**< Read-ahead task */
     138  rtems_chain_control read_ahead_chain;  /**< Read-ahead request chain */
     139  bool                read_ahead_enabled; /**< Read-ahead enabled */
    137140
    138141  bool                initialised;       /**< Initialised state. */
     
    181184#define RTEMS_BLKDEV_FATAL_BDBUF_STATE_1       RTEMS_BLKDEV_FATAL_ERROR(29)
    182185#define RTEMS_BLKDEV_FATAL_BDBUF_STATE_2       RTEMS_BLKDEV_FATAL_ERROR(30)
     186#define RTEMS_BLKDEV_FATAL_BDBUF_RA_WAKE_UP    RTEMS_BLKDEV_FATAL_ERROR(31)
    183187
    184188/**
     
    188192#define RTEMS_BDBUF_TRANSFER_SYNC  RTEMS_EVENT_1
    189193#define RTEMS_BDBUF_SWAPOUT_SYNC   RTEMS_EVENT_2
     194#define RTEMS_BDBUF_READ_AHEAD_WAKE_UP RTEMS_EVENT_1
    190195
    191196/**
     
    220225#endif
    221226
    222 /*
    223  * The swap out task.
    224  */
    225227static rtems_task rtems_bdbuf_swapout_task(rtems_task_argument arg);
     228
     229static rtems_task rtems_bdbuf_read_ahead_task(rtems_task_argument arg);
    226230
    227231/**
     
    13661370  rtems_chain_initialize_empty (&bdbuf_cache.modified);
    13671371  rtems_chain_initialize_empty (&bdbuf_cache.sync);
     1372  rtems_chain_initialize_empty (&bdbuf_cache.read_ahead_chain);
    13681373
    13691374  /*
     
    14871492    goto error;
    14881493
     1494  if (bdbuf_config.max_read_ahead_blocks > 0)
     1495  {
     1496    bdbuf_cache.read_ahead_enabled = true;
     1497    sc = rtems_bdbuf_create_task (rtems_build_name('B', 'R', 'D', 'A'),
     1498                                  bdbuf_config.read_ahead_priority,
     1499                                  RTEMS_BDBUF_READ_AHEAD_TASK_PRIORITY_DEFAULT,
     1500                                  rtems_bdbuf_read_ahead_task,
     1501                                  0,
     1502                                  &bdbuf_cache.read_ahead_task);
     1503    if (sc != RTEMS_SUCCESSFUL)
     1504      goto error;
     1505  }
     1506
    14891507  rtems_bdbuf_unlock_cache ();
    14901508
     
    14921510
    14931511error:
     1512
     1513  if (bdbuf_cache.read_ahead_task != 0)
     1514    rtems_task_delete (bdbuf_cache.read_ahead_task);
    14941515
    14951516  if (bdbuf_cache.swapout != 0)
     
    18531874}
    18541875
    1855 static void
    1856 rtems_bdbuf_create_read_request (const rtems_disk_device *dd,
    1857                                  rtems_blkdev_bnum        media_block,
    1858                                  rtems_blkdev_request    *req,
    1859                                  rtems_bdbuf_buffer     **bd_ptr)
    1860 {
    1861   rtems_bdbuf_buffer *bd = NULL;
    1862   rtems_blkdev_bnum   media_block_end = dd->start + dd->size;
    1863   rtems_blkdev_bnum   media_block_count = dd->block_to_media_block_shift >= 0 ?
    1864     1U << dd->block_to_media_block_shift
    1865       : dd->block_size / dd->media_block_size;
    1866   uint32_t            block_size = dd->block_size;
    1867   uint32_t            transfer_index = 1;
    1868   uint32_t            transfer_count = bdbuf_config.max_read_ahead_blocks + 1;
    1869 
    1870   if (media_block_end - media_block < transfer_count)
    1871     transfer_count = media_block_end - media_block;
     1876static rtems_status_code
     1877rtems_bdbuf_execute_transfer_request (const rtems_disk_device *dd,
     1878                                      rtems_blkdev_request    *req,
     1879                                      bool                     cache_locked)
     1880{
     1881  rtems_status_code sc = RTEMS_SUCCESSFUL;
     1882  int result = 0;
     1883  uint32_t transfer_index = 0;
     1884  bool wake_transfer_waiters = false;
     1885  bool wake_buffer_waiters = false;
     1886
     1887  if (cache_locked)
     1888    rtems_bdbuf_unlock_cache ();
     1889
     1890  result = dd->ioctl (dd->phys_dev, RTEMS_BLKIO_REQUEST, req);
     1891
     1892  if (result == 0)
     1893  {
     1894    rtems_bdbuf_wait_for_event (RTEMS_BDBUF_TRANSFER_SYNC);
     1895    sc = req->status;
     1896  }
     1897  else
     1898    sc = RTEMS_IO_ERROR;
     1899
     1900  rtems_bdbuf_lock_cache ();
     1901
     1902  for (transfer_index = 0; transfer_index < req->bufnum; ++transfer_index)
     1903  {
     1904    rtems_bdbuf_buffer *bd = req->bufs [transfer_index].user;
     1905    bool waiters = bd->waiters;
     1906
     1907    if (waiters)
     1908      wake_transfer_waiters = true;
     1909    else
     1910      wake_buffer_waiters = true;
     1911
     1912    rtems_bdbuf_group_release (bd);
     1913
     1914    if (sc == RTEMS_SUCCESSFUL && bd->state == RTEMS_BDBUF_STATE_TRANSFER)
     1915      rtems_bdbuf_make_cached_and_add_to_lru_list (bd);
     1916    else
     1917      rtems_bdbuf_discard_buffer (bd);
     1918
     1919    if (rtems_bdbuf_tracer)
     1920      rtems_bdbuf_show_users ("transfer", bd);
     1921  }
     1922
     1923  if (wake_transfer_waiters)
     1924    rtems_bdbuf_wake (&bdbuf_cache.transfer_waiters);
     1925
     1926  if (wake_buffer_waiters)
     1927    rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
     1928
     1929  if (!cache_locked)
     1930    rtems_bdbuf_unlock_cache ();
     1931
     1932  if (sc == RTEMS_SUCCESSFUL || sc == RTEMS_UNSATISFIED)
     1933    return sc;
     1934  else
     1935    return RTEMS_IO_ERROR;
     1936}
     1937
     1938static rtems_status_code
     1939rtems_bdbuf_execute_read_request (const rtems_disk_device *dd,
     1940                                  rtems_bdbuf_buffer      *bd,
     1941                                  uint32_t                 transfer_count)
     1942{
     1943  rtems_blkdev_request *req = NULL;
     1944  rtems_blkdev_bnum media_block = bd->block;
     1945  uint32_t media_blocks_per_block = dd->media_blocks_per_block;
     1946  uint32_t block_size = dd->block_size;
     1947  uint32_t transfer_index = 1;
     1948
     1949  /*
     1950   * TODO: This type of request structure is wrong and should be removed.
     1951   */
     1952#define bdbuf_alloc(size) __builtin_alloca (size)
     1953
     1954  req = bdbuf_alloc (sizeof (rtems_blkdev_request) +
     1955                     sizeof (rtems_blkdev_sg_buffer) * transfer_count);
    18721956
    18731957  req->req = RTEMS_BLKDEV_REQ_READ;
     
    18781962  req->bufnum = 0;
    18791963
    1880   bd = rtems_bdbuf_get_buffer_for_access (dd, media_block);
    1881 
    1882   *bd_ptr = bd;
     1964  rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
    18831965
    18841966  req->bufs [0].user   = bd;
     
    18901972    rtems_bdbuf_show_users ("read", bd);
    18911973
    1892   switch (bd->state)
    1893   {
    1894     case RTEMS_BDBUF_STATE_CACHED:
    1895     case RTEMS_BDBUF_STATE_MODIFIED:
    1896       return;
    1897     case RTEMS_BDBUF_STATE_EMPTY:
    1898       rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
    1899       break;
    1900     default:
    1901       rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_1);
    1902       break;
    1903   }
    1904 
    19051974  while (transfer_index < transfer_count)
    19061975  {
    1907     media_block += media_block_count;
     1976    media_block += media_blocks_per_block;
    19081977
    19091978    bd = rtems_bdbuf_get_buffer_for_read_ahead (dd, media_block);
     
    19201989
    19211990    if (rtems_bdbuf_tracer)
    1922       rtems_bdbuf_show_users ("read-ahead", bd);
     1991      rtems_bdbuf_show_users ("read", bd);
    19231992
    19241993    ++transfer_index;
     
    19261995
    19271996  req->bufnum = transfer_index;
    1928 }
    1929 
    1930 static rtems_status_code
    1931 rtems_bdbuf_execute_transfer_request (const rtems_disk_device *dd,
    1932                                       rtems_blkdev_request    *req,
    1933                                       bool                     cache_locked)
    1934 {
    1935   rtems_status_code sc = RTEMS_SUCCESSFUL;
    1936   int result = 0;
    1937   uint32_t transfer_index = 0;
    1938   bool wake_transfer_waiters = false;
    1939   bool wake_buffer_waiters = false;
    1940 
    1941   if (cache_locked)
    1942     rtems_bdbuf_unlock_cache ();
    1943 
    1944   result = dd->ioctl (dd->phys_dev, RTEMS_BLKIO_REQUEST, req);
    1945 
    1946   if (result == 0)
    1947   {
    1948     rtems_bdbuf_wait_for_event (RTEMS_BDBUF_TRANSFER_SYNC);
    1949     sc = req->status;
    1950   }
    1951   else
    1952     sc = RTEMS_IO_ERROR;
    1953 
    1954   rtems_bdbuf_lock_cache ();
    1955 
    1956   for (transfer_index = 0; transfer_index < req->bufnum; ++transfer_index)
    1957   {
    1958     rtems_bdbuf_buffer *bd = req->bufs [transfer_index].user;
    1959     bool waiters = bd->waiters;
    1960 
    1961     if (waiters)
    1962       wake_transfer_waiters = true;
    1963     else
    1964       wake_buffer_waiters = true;
    1965 
    1966     rtems_bdbuf_group_release (bd);
    1967 
    1968     if (sc == RTEMS_SUCCESSFUL && bd->state == RTEMS_BDBUF_STATE_TRANSFER)
    1969       rtems_bdbuf_make_cached_and_add_to_lru_list (bd);
    1970     else
    1971       rtems_bdbuf_discard_buffer (bd);
    1972 
    1973     if (rtems_bdbuf_tracer)
    1974       rtems_bdbuf_show_users ("transfer", bd);
    1975   }
    1976 
    1977   if (wake_transfer_waiters)
    1978     rtems_bdbuf_wake (&bdbuf_cache.transfer_waiters);
    1979 
    1980   if (wake_buffer_waiters)
    1981     rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
    1982 
    1983   if (!cache_locked)
    1984     rtems_bdbuf_unlock_cache ();
    1985 
    1986   if (sc == RTEMS_SUCCESSFUL || sc == RTEMS_UNSATISFIED)
    1987     return sc;
    1988   else
    1989     return RTEMS_IO_ERROR;
     1997
     1998  return rtems_bdbuf_execute_transfer_request (dd, req, true);
     1999}
     2000
     2001static bool
     2002rtems_bdbuf_is_read_ahead_active (const rtems_disk_device *dd)
     2003{
     2004  return !rtems_chain_is_node_off_chain (&dd->read_ahead.node);
     2005}
     2006
     2007static void
     2008rtems_bdbuf_read_ahead_cancel (rtems_disk_device *dd)
     2009{
     2010  if (rtems_bdbuf_is_read_ahead_active (dd))
     2011  {
     2012    rtems_chain_extract_unprotected (&dd->read_ahead.node);
     2013    rtems_chain_set_off_chain (&dd->read_ahead.node);
     2014  }
     2015}
     2016
     2017static void
     2018rtems_bdbuf_read_ahead_reset (rtems_disk_device *dd)
     2019{
     2020  rtems_bdbuf_read_ahead_cancel (dd);
     2021  dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
     2022}
     2023
     2024static void
     2025rtems_bdbuf_check_read_ahead_trigger (rtems_disk_device *dd,
     2026                                      rtems_blkdev_bnum  block)
     2027{
     2028  if (dd->read_ahead.trigger == block
     2029      && !rtems_bdbuf_is_read_ahead_active (dd))
     2030  {
     2031    rtems_status_code sc;
     2032    rtems_chain_control *chain = &bdbuf_cache.read_ahead_chain;
     2033
     2034    rtems_chain_append_unprotected (chain, &dd->read_ahead.node);
     2035    sc = rtems_event_send (bdbuf_cache.read_ahead_task,
     2036                           RTEMS_BDBUF_READ_AHEAD_WAKE_UP);
     2037    if (sc != RTEMS_SUCCESSFUL)
     2038      rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_RA_WAKE_UP);
     2039  }
     2040}
     2041
     2042static void
     2043rtems_bdbuf_set_read_ahead_trigger (rtems_disk_device *dd,
     2044                                    rtems_blkdev_bnum  block)
     2045{
     2046  if (dd->read_ahead.trigger != block)
     2047  {
     2048    rtems_bdbuf_read_ahead_cancel (dd);
     2049    dd->read_ahead.trigger = block + 1;
     2050    dd->read_ahead.next = block + 2;
     2051  }
    19902052}
    19912053
     
    19962058{
    19972059  rtems_status_code     sc = RTEMS_SUCCESSFUL;
    1998   rtems_blkdev_request *req = NULL;
    19992060  rtems_bdbuf_buffer   *bd = NULL;
    20002061  rtems_blkdev_bnum     media_block;
    2001 
    2002   /*
    2003    * TODO: This type of request structure is wrong and should be removed.
    2004    */
    2005 #define bdbuf_alloc(size) __builtin_alloca (size)
    2006 
    2007   req = bdbuf_alloc (sizeof (rtems_blkdev_request) +
    2008                      sizeof (rtems_blkdev_sg_buffer) *
    2009                       (bdbuf_config.max_read_ahead_blocks + 1));
    20102062
    20112063  rtems_bdbuf_lock_cache ();
     
    20182070              media_block + dd->start, block, (unsigned) dd->dev);
    20192071
    2020     rtems_bdbuf_create_read_request (dd, media_block, req, &bd);
    2021 
    2022     if (req->bufnum > 0)
    2023     {
    2024       sc = rtems_bdbuf_execute_transfer_request (dd, req, true);
    2025       if (sc == RTEMS_SUCCESSFUL)
    2026       {
    2027         rtems_chain_extract_unprotected (&bd->link);
    2028         rtems_bdbuf_group_obtain (bd);
    2029       }
    2030     }
    2031 
    2032     if (sc == RTEMS_SUCCESSFUL)
    2033     {
    2034       switch (bd->state)
    2035       {
    2036         case RTEMS_BDBUF_STATE_CACHED:
     2072    rtems_bdbuf_check_read_ahead_trigger (dd, block);
     2073    bd = rtems_bdbuf_get_buffer_for_access (dd, media_block);
     2074    switch (bd->state)
     2075    {
     2076      case RTEMS_BDBUF_STATE_CACHED:
     2077        rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_ACCESS_CACHED);
     2078        break;
     2079      case RTEMS_BDBUF_STATE_MODIFIED:
     2080        rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_ACCESS_MODIFIED);
     2081        break;
     2082      case RTEMS_BDBUF_STATE_EMPTY:
     2083        rtems_bdbuf_set_read_ahead_trigger (dd, block);
     2084        sc = rtems_bdbuf_execute_read_request (dd, bd, 1);
     2085        if (sc == RTEMS_SUCCESSFUL)
     2086        {
    20372087          rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_ACCESS_CACHED);
    2038           break;
    2039         case RTEMS_BDBUF_STATE_MODIFIED:
    2040           rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_ACCESS_MODIFIED);
    2041           break;
    2042         default:
    2043           rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_4);
    2044           break;
    2045       }
    2046 
    2047       if (rtems_bdbuf_tracer)
    2048       {
    2049         rtems_bdbuf_show_users ("read", bd);
    2050         rtems_bdbuf_show_usage ();
    2051       }
    2052     }
    2053     else
    2054     {
    2055       bd = NULL;
     2088          rtems_chain_extract_unprotected (&bd->link);
     2089          rtems_bdbuf_group_obtain (bd);
     2090        }
     2091        else
     2092        {
     2093          bd = NULL;
     2094        }
     2095        break;
     2096      default:
     2097        rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_4);
     2098        break;
    20562099    }
    20572100  }
     
    27022745  rtems_bdbuf_swapout_transfer transfer;
    27032746  uint32_t                     period_in_ticks;
    2704   const uint32_t               period_in_msecs = bdbuf_config.swapout_period;;
     2747  const uint32_t               period_in_msecs = bdbuf_config.swapout_period;
    27052748  uint32_t                     timer_delta;
    27062749
     
    28852928  rtems_chain_initialize_empty (&purge_list);
    28862929  rtems_bdbuf_lock_cache ();
     2930  rtems_bdbuf_read_ahead_reset (dd);
    28872931  rtems_bdbuf_gather_for_purge (&purge_list, dd);
    28882932  rtems_bdbuf_purge_list (&purge_list);
     
    29202964      dd->block_to_media_block_shift = block_to_media_block_shift;
    29212965      dd->bds_per_group = bds_per_group;
     2966
     2967      rtems_bdbuf_read_ahead_reset (dd);
    29222968    }
    29232969    else
     
    29352981  return sc;
    29362982}
     2983
     2984static rtems_task
     2985rtems_bdbuf_read_ahead_task (rtems_task_argument arg)
     2986{
     2987  rtems_chain_control *chain = &bdbuf_cache.read_ahead_chain;
     2988
     2989  while (bdbuf_cache.read_ahead_enabled)
     2990  {
     2991    rtems_chain_node *node;
     2992
     2993    rtems_bdbuf_wait_for_event (RTEMS_BDBUF_READ_AHEAD_WAKE_UP);
     2994    rtems_bdbuf_lock_cache ();
     2995
     2996    while ((node = rtems_chain_get_unprotected (chain)) != NULL)
     2997    {
     2998      rtems_disk_device *dd = (rtems_disk_device *)
     2999        ((char *) node - offsetof (rtems_disk_device, read_ahead.node));
     3000      rtems_blkdev_bnum block = dd->read_ahead.next;
     3001      rtems_blkdev_bnum media_block = 0;
     3002      rtems_status_code sc =
     3003        rtems_bdbuf_get_media_block (dd, block, &media_block);
     3004
     3005      rtems_chain_set_off_chain (&dd->read_ahead.node);
     3006
     3007      if (sc == RTEMS_SUCCESSFUL)
     3008      {
     3009        rtems_bdbuf_buffer *bd =
     3010          rtems_bdbuf_get_buffer_for_read_ahead (dd, media_block);
     3011
     3012        if (bd != NULL)
     3013        {
     3014          uint32_t transfer_count = dd->block_count - block;
     3015          uint32_t max_transfer_count = bdbuf_config.max_read_ahead_blocks;
     3016
     3017          if (transfer_count >= max_transfer_count)
     3018          {
     3019            transfer_count = max_transfer_count;
     3020            dd->read_ahead.trigger += max_transfer_count / 2 + 1;
     3021            dd->read_ahead.next += max_transfer_count;
     3022          }
     3023          else
     3024          {
     3025            dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
     3026          }
     3027
     3028          rtems_bdbuf_execute_read_request (dd, bd, transfer_count);
     3029        }
     3030      }
     3031      else
     3032      {
     3033        dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
     3034      }
     3035    }
     3036
     3037    rtems_bdbuf_unlock_cache ();
     3038  }
     3039
     3040  rtems_task_delete (RTEMS_SELF);
     3041}
  • cpukit/libblock/src/diskdevs-init.c

    r6b24b88 r2e4ead3  
    3737  dd->ioctl = handler;
    3838  dd->driver_data = driver_data;
     39  dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
    3940
    4041  if (block_count > 0) {
     
    6869  dd->ioctl = phys_dd->ioctl;
    6970  dd->driver_data = phys_dd->driver_data;
     71  dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
    7072
    7173  if (phys_dd->phys_dev == phys_dd) {
  • cpukit/libfs/src/dosfs/fat_file.c

    r6b24b88 r2e4ead3  
    553553    /*  check wether we satisfied request for 'cls2add' clusters */
    554554    if (cls2add != cls_added)
    555         *a_length = new_length -
    556                     ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) -
    557                     (bytes2add & (fs_info->vol.bpc - 1));
     555    {
     556        new_length -= bytes2add & (fs_info->vol.bpc - 1);
     557        new_length -= (cls2add - cls_added) << fs_info->vol.bpc_log2;
     558    }
    558559
    559560    /* add new chain to the end of existed */
     
    604605    }
    605606
     607    *a_length = new_length;
    606608    fat_fd->fat_file_size = new_length;
    607609
  • cpukit/libfs/src/dosfs/msdos_misc.c

    r6b24b88 r2e4ead3  
    801801      uint32_t sec = (fat_cluster_num_to_sector_num(mt_entry, start.cln) +
    802802                      (start.ofs >> fs_info->fat.vol.sec_log2));
    803       uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));;
     803      uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));
    804804
    805805      ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_NAME_OFFSET, 1,
  • cpukit/libi2c/libi2c.c

    r6b24b88 r2e4ead3  
    451451        i = -err;
    452452      } else {
    453         busses[i].name = nmcpy;;
     453        busses[i].name = nmcpy;
    454454        nmcpy = 0;
    455455      }
  • cpukit/libmisc/capture/capture.c

    r6b24b88 r2e4ead3  
    10481048  else
    10491049  {
    1050     capture_extension_index = rtems_object_id_get_index (capture_id);;
     1050    capture_extension_index = rtems_object_id_get_index (capture_id);
    10511051  }
    10521052
  • cpukit/sapi/include/confdefs.h

    r6b24b88 r2e4ead3  
    12421242                              RTEMS_BDBUF_BUFFER_MAX_SIZE_DEFAULT
    12431243  #endif
     1244  #ifndef CONFIGURE_BDBUF_READ_AHEAD_TASK_PRIORITY
     1245    #define CONFIGURE_BDBUF_READ_AHEAD_TASK_PRIORITY \
     1246                              RTEMS_BDBUF_READ_AHEAD_TASK_PRIORITY_DEFAULT
     1247  #endif
    12441248  #ifdef CONFIGURE_INIT
    12451249    const rtems_bdbuf_config rtems_bdbuf_configuration = {
     
    12541258      CONFIGURE_BDBUF_CACHE_MEMORY_SIZE,
    12551259      CONFIGURE_BDBUF_BUFFER_MIN_SIZE,
    1256       CONFIGURE_BDBUF_BUFFER_MAX_SIZE
     1260      CONFIGURE_BDBUF_BUFFER_MAX_SIZE,
     1261      CONFIGURE_BDBUF_READ_AHEAD_TASK_PRIORITY
    12571262    };
    12581263  #endif
    12591264
    1260   #define CONFIGURE_LIBBLOCK_TASKS (1 + CONFIGURE_SWAPOUT_WORKER_TASKS)
     1265  #define CONFIGURE_LIBBLOCK_TASKS \
     1266    (1 + CONFIGURE_SWAPOUT_WORKER_TASKS + \
     1267    (CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS != 0))
    12611268
    12621269  #define CONFIGURE_LIBBLOCK_TASK_EXTRA_STACKS \
  • cpukit/score/cpu/powerpc/cpu.c

    r6b24b88 r2e4ead3  
    1111
    1212#ifdef HAVE_CONFIG_H
    13 #include "config.h"
     13  #include "config.h"
    1414#endif
    1515
     16#include <rtems/system.h>
     17#include <rtems/score/cpu.h>
     18
     19#define PPC_ASSERT_OFFSET(field, off) \
     20  RTEMS_STATIC_ASSERT( \
     21    offsetof(ppc_context, field) + PPC_DEFAULT_CACHE_LINE_SIZE \
     22      == PPC_CONTEXT_OFFSET_ ## off, \
     23    ppc_context_offset_ ## field \
     24  )
     25
     26PPC_ASSERT_OFFSET(gpr1, GPR1);
     27PPC_ASSERT_OFFSET(msr, MSR);
     28PPC_ASSERT_OFFSET(lr, LR);
     29PPC_ASSERT_OFFSET(cr, CR);
     30PPC_ASSERT_OFFSET(gpr14, GPR14);
     31PPC_ASSERT_OFFSET(gpr15, GPR15);
     32PPC_ASSERT_OFFSET(gpr16, GPR16);
     33PPC_ASSERT_OFFSET(gpr17, GPR17);
     34PPC_ASSERT_OFFSET(gpr18, GPR18);
     35PPC_ASSERT_OFFSET(gpr19, GPR19);
     36PPC_ASSERT_OFFSET(gpr20, GPR20);
     37PPC_ASSERT_OFFSET(gpr21, GPR21);
     38PPC_ASSERT_OFFSET(gpr22, GPR22);
     39PPC_ASSERT_OFFSET(gpr23, GPR23);
     40PPC_ASSERT_OFFSET(gpr24, GPR24);
     41PPC_ASSERT_OFFSET(gpr25, GPR25);
     42PPC_ASSERT_OFFSET(gpr26, GPR26);
     43PPC_ASSERT_OFFSET(gpr27, GPR27);
     44PPC_ASSERT_OFFSET(gpr28, GPR28);
     45PPC_ASSERT_OFFSET(gpr29, GPR29);
     46PPC_ASSERT_OFFSET(gpr30, GPR30);
     47PPC_ASSERT_OFFSET(gpr31, GPR31);
     48
     49RTEMS_STATIC_ASSERT(
     50  sizeof(Context_Control) % PPC_DEFAULT_CACHE_LINE_SIZE == 0,
     51  ppc_context_size
     52);
  • cpukit/score/cpu/powerpc/rtems/score/cpu.h

    r6b24b88 r2e4ead3  
    2424 *  Copyright (c) 2001 Surrey Satellite Technology Limited (SSTL).
    2525 *
    26  *  Copyright (c) 2010-2011 embedded brains GmbH.
     26 *  Copyright (c) 2010-2012 embedded brains GmbH.
    2727 *
    2828 *  The license and distribution terms for this file may be
     
    250250 */
    251251
     252#ifndef __SPE__
     253  #define PPC_GPR_TYPE uint32_t
     254  #define PPC_GPR_SIZE 4
     255  #define PPC_GPR_LOAD lwz
     256  #define PPC_GPR_STORE stw
     257#else
     258  #define PPC_GPR_TYPE uint64_t
     259  #define PPC_GPR_SIZE 8
     260  #define PPC_GPR_LOAD evldd
     261  #define PPC_GPR_STORE evstdd
     262#endif
     263
     264#define PPC_DEFAULT_CACHE_LINE_SIZE 32
     265
    252266#ifndef ASM
    253267
     268/* Non-volatile context according to E500ABIUG and EABI */
    254269typedef struct {
    255   #ifndef __SPE__
    256     uint32_t   gpr1;    /* Stack pointer for all */
    257     uint32_t   gpr2;    /* Reserved SVR4, section ptr EABI + */
    258     uint32_t   gpr13;   /* Section ptr SVR4/EABI */
    259     uint32_t   gpr14;   /* Non volatile for all */
    260     uint32_t   gpr15;   /* Non volatile for all */
    261     uint32_t   gpr16;   /* Non volatile for all */
    262     uint32_t   gpr17;   /* Non volatile for all */
    263     uint32_t   gpr18;   /* Non volatile for all */
    264     uint32_t   gpr19;   /* Non volatile for all */
    265     uint32_t   gpr20;   /* Non volatile for all */
    266     uint32_t   gpr21;   /* Non volatile for all */
    267     uint32_t   gpr22;   /* Non volatile for all */
    268     uint32_t   gpr23;   /* Non volatile for all */
    269     uint32_t   gpr24;   /* Non volatile for all */
    270     uint32_t   gpr25;   /* Non volatile for all */
    271     uint32_t   gpr26;   /* Non volatile for all */
    272     uint32_t   gpr27;   /* Non volatile for all */
    273     uint32_t   gpr28;   /* Non volatile for all */
    274     uint32_t   gpr29;   /* Non volatile for all */
    275     uint32_t   gpr30;   /* Non volatile for all */
    276     uint32_t   gpr31;   /* Non volatile for all */
    277     uint32_t   cr;      /* PART of the CR is non volatile for all */
    278     uint32_t   pc;      /* Program counter/Link register */
    279     uint32_t   msr;     /* Initial interrupt level */
    280     #ifdef __ALTIVEC__
    281       /*
    282        * 12 non-volatile vector registers, cache-aligned area for vscr/vrsave
    283        * and padding to ensure cache-alignment.  Unfortunately, we can't verify
    284        * the cache line size here in the cpukit but altivec support code will
    285        * produce an error if this is ever different from 32 bytes.
    286        *
    287        * Note: it is the BSP/CPU-support's responsibility to save/restore
    288        *       volatile vregs across interrupts and exceptions.
    289        */
    290       uint8_t altivec[16*12 + 32 + 32];
    291     #endif
    292   #else
    293     /* Non-volatile context according to E500ABIUG and EABI */
    294     uint32_t context [
    295       8 /* Cache line padding */
    296       + 1 /* Stack pointer */
    297       + 1 /* MSR */
    298       + 1 /* LR */
    299       + 1 /* CR */
    300       + 18 * 2 /* GPR 14 to GPR 31 */
    301     ];
     270  uint32_t gpr1;
     271  uint32_t msr;
     272  uint32_t lr;
     273  uint32_t cr;
     274  PPC_GPR_TYPE gpr14;
     275  PPC_GPR_TYPE gpr15;
     276  PPC_GPR_TYPE gpr16;
     277  PPC_GPR_TYPE gpr17;
     278  PPC_GPR_TYPE gpr18;
     279  PPC_GPR_TYPE gpr19;
     280  PPC_GPR_TYPE gpr20;
     281  PPC_GPR_TYPE gpr21;
     282  PPC_GPR_TYPE gpr22;
     283  PPC_GPR_TYPE gpr23;
     284  PPC_GPR_TYPE gpr24;
     285  PPC_GPR_TYPE gpr25;
     286  PPC_GPR_TYPE gpr26;
     287  PPC_GPR_TYPE gpr27;
     288  PPC_GPR_TYPE gpr28;
     289  PPC_GPR_TYPE gpr29;
     290  PPC_GPR_TYPE gpr30;
     291  PPC_GPR_TYPE gpr31;
     292  #ifdef __ALTIVEC__
     293    /*
     294     * 12 non-volatile vector registers, cache-aligned area for vscr/vrsave
     295     * and padding to ensure cache-alignment.  Unfortunately, we can't verify
     296     * the cache line size here in the cpukit but altivec support code will
     297     * produce an error if this is ever different from 32 bytes.
     298     *
     299     * Note: it is the BSP/CPU-support's responsibility to save/restore
     300     *       volatile vregs across interrupts and exceptions.
     301     */
     302    uint8_t altivec[16*12 + 32 + PPC_DEFAULT_CACHE_LINE_SIZE];
    302303  #endif
     304} ppc_context;
     305
     306typedef struct {
     307  uint8_t context [
     308    PPC_DEFAULT_CACHE_LINE_SIZE
     309      + sizeof(ppc_context)
     310      + (sizeof(ppc_context) % PPC_DEFAULT_CACHE_LINE_SIZE == 0
     311        ? 0
     312          : PPC_DEFAULT_CACHE_LINE_SIZE
     313            - sizeof(ppc_context) % PPC_DEFAULT_CACHE_LINE_SIZE)
     314  ];
    303315} Context_Control;
     316
     317static inline ppc_context *ppc_get_context( Context_Control *context )
     318{
     319  uintptr_t clsz = PPC_DEFAULT_CACHE_LINE_SIZE;
     320  uintptr_t mask = clsz - 1;
     321  uintptr_t addr = (uintptr_t) context;
     322
     323  return (ppc_context *) ((addr & ~mask) + clsz);
     324}
     325
     326#define _CPU_Context_Get_SP( _context ) \
     327  ppc_get_context(_context)->gpr1
    304328#endif /* ASM */
    305329
    306 #ifndef __SPE__
    307   #define PPC_CONTEXT_SET_SP( _context, _sp ) \
    308     do { \
    309       (_context)->gpr1 = _sp; \
    310     } while (0)
    311 
    312   #define PPC_CONTEXT_GET_CR( _context ) \
    313     (_context)->cr
    314 
    315   #define PPC_CONTEXT_GET_MSR( _context ) \
    316     (_context)->msr
    317 
    318   #define PPC_CONTEXT_SET_MSR( _context, _msr ) \
    319     do { \
    320       (_context)->msr = _msr; \
    321     } while (0)
    322 
    323   #define PPC_CONTEXT_FIRST_SAVED_GPR 13
    324 
    325   #define PPC_CONTEXT_GET_FIRST_SAVED( _context ) \
    326     (_context)->gpr13
    327 
    328   #define PPC_CONTEXT_GET_PC( _context ) \
    329     (_context)->pc
    330 
    331   #define PPC_CONTEXT_SET_PC( _context, _pc ) \
    332     do { \
    333       (_context)->pc = _pc; \
    334     } while (0)
    335 
    336   #define _CPU_Context_Get_SP( _context ) \
    337     (_context)->gpr1
    338 #else
    339   #define PPC_CONTEXT_CACHE_LINE_0 32
    340   #define PPC_CONTEXT_OFFSET_SP 32
    341   #define PPC_CONTEXT_OFFSET_MSR 36
    342   #define PPC_CONTEXT_OFFSET_LR 40
    343   #define PPC_CONTEXT_OFFSET_CR 44
    344   #define PPC_CONTEXT_OFFSET_GPR14 48
    345   #define PPC_CONTEXT_OFFSET_GPR15 56
    346   #define PPC_CONTEXT_CACHE_LINE_1 64
    347   #define PPC_CONTEXT_OFFSET_GPR16 64
    348   #define PPC_CONTEXT_OFFSET_GPR17 72
    349   #define PPC_CONTEXT_OFFSET_GPR18 80
    350   #define PPC_CONTEXT_OFFSET_GPR19 88
    351   #define PPC_CONTEXT_CACHE_LINE_2 96
    352   #define PPC_CONTEXT_OFFSET_GPR20 96
    353   #define PPC_CONTEXT_OFFSET_GPR21 104
    354   #define PPC_CONTEXT_OFFSET_GPR22 112
    355   #define PPC_CONTEXT_OFFSET_GPR23 120
    356   #define PPC_CONTEXT_CACHE_LINE_3 128
    357   #define PPC_CONTEXT_OFFSET_GPR24 128
    358   #define PPC_CONTEXT_OFFSET_GPR25 136
    359   #define PPC_CONTEXT_OFFSET_GPR26 144
    360   #define PPC_CONTEXT_OFFSET_GPR27 152
    361   #define PPC_CONTEXT_CACHE_LINE_4 160
    362   #define PPC_CONTEXT_OFFSET_GPR28 160
    363   #define PPC_CONTEXT_OFFSET_GPR29 168
    364   #define PPC_CONTEXT_OFFSET_GPR30 176
    365   #define PPC_CONTEXT_OFFSET_GPR31 184
    366 
    367   #define PPC_CONTEXT_AREA( _context ) \
    368     ((uint32_t *) (((uintptr_t) (_context)) & ~0x1fU))
    369 
    370   #define PPC_CONTEXT_FIELD( _context, _offset ) \
    371     PPC_CONTEXT_AREA( _context ) [(_offset) / 4]
    372 
    373   #define PPC_CONTEXT_SET_SP( _context, _sp ) \
    374     do { \
    375       PPC_CONTEXT_FIELD( _context, PPC_CONTEXT_OFFSET_SP ) = _sp; \
    376     } while (0)
    377 
    378   #define PPC_CONTEXT_GET_CR( _context ) \
    379     PPC_CONTEXT_FIELD( _context, PPC_CONTEXT_OFFSET_CR )
    380 
    381   #define PPC_CONTEXT_GET_MSR( _context ) \
    382     PPC_CONTEXT_FIELD( _context, PPC_CONTEXT_OFFSET_MSR )
    383 
    384   #define PPC_CONTEXT_SET_MSR( _context, _msr ) \
    385     do { \
    386       PPC_CONTEXT_FIELD( _context, PPC_CONTEXT_OFFSET_MSR ) = _msr; \
    387     } while (0)
    388 
    389   #define PPC_CONTEXT_FIRST_SAVED_GPR 14
    390 
    391   #define PPC_CONTEXT_GET_FIRST_SAVED( _context ) \
    392     PPC_CONTEXT_FIELD( _context, PPC_CONTEXT_OFFSET_GPR14 )
    393 
    394   #define PPC_CONTEXT_GET_PC( _context ) \
    395     PPC_CONTEXT_FIELD( _context, PPC_CONTEXT_OFFSET_LR )
    396 
    397   #define PPC_CONTEXT_SET_PC( _context, _pc ) \
    398     do { \
    399       PPC_CONTEXT_FIELD( _context, PPC_CONTEXT_OFFSET_LR ) = _pc; \
    400     } while (0)
    401 
    402   #define _CPU_Context_Get_SP( _context ) \
    403     PPC_CONTEXT_FIELD( _context, PPC_CONTEXT_OFFSET_SP )
    404 #endif
     330#define PPC_CONTEXT_OFFSET_GPR1 32
     331#define PPC_CONTEXT_OFFSET_MSR 36
     332#define PPC_CONTEXT_OFFSET_LR 40
     333#define PPC_CONTEXT_OFFSET_CR 44
     334
     335#define PPC_CONTEXT_GPR_OFFSET( gpr ) \
     336  (((gpr) - 14) * PPC_GPR_SIZE + 48)
     337
     338#define PPC_CONTEXT_OFFSET_GPR14 PPC_CONTEXT_GPR_OFFSET( 14 )
     339#define PPC_CONTEXT_OFFSET_GPR15 PPC_CONTEXT_GPR_OFFSET( 15 )
     340#define PPC_CONTEXT_OFFSET_GPR16 PPC_CONTEXT_GPR_OFFSET( 16 )
     341#define PPC_CONTEXT_OFFSET_GPR17 PPC_CONTEXT_GPR_OFFSET( 17 )
     342#define PPC_CONTEXT_OFFSET_GPR18 PPC_CONTEXT_GPR_OFFSET( 18 )
     343#define PPC_CONTEXT_OFFSET_GPR19 PPC_CONTEXT_GPR_OFFSET( 19 )
     344#define PPC_CONTEXT_OFFSET_GPR20 PPC_CONTEXT_GPR_OFFSET( 20 )
     345#define PPC_CONTEXT_OFFSET_GPR21 PPC_CONTEXT_GPR_OFFSET( 21 )
     346#define PPC_CONTEXT_OFFSET_GPR22 PPC_CONTEXT_GPR_OFFSET( 22 )
     347#define PPC_CONTEXT_OFFSET_GPR23 PPC_CONTEXT_GPR_OFFSET( 23 )
     348#define PPC_CONTEXT_OFFSET_GPR24 PPC_CONTEXT_GPR_OFFSET( 24 )
     349#define PPC_CONTEXT_OFFSET_GPR25 PPC_CONTEXT_GPR_OFFSET( 25 )
     350#define PPC_CONTEXT_OFFSET_GPR26 PPC_CONTEXT_GPR_OFFSET( 26 )
     351#define PPC_CONTEXT_OFFSET_GPR27 PPC_CONTEXT_GPR_OFFSET( 27 )
     352#define PPC_CONTEXT_OFFSET_GPR28 PPC_CONTEXT_GPR_OFFSET( 28 )
     353#define PPC_CONTEXT_OFFSET_GPR29 PPC_CONTEXT_GPR_OFFSET( 29 )
     354#define PPC_CONTEXT_OFFSET_GPR30 PPC_CONTEXT_GPR_OFFSET( 30 )
     355#define PPC_CONTEXT_OFFSET_GPR31 PPC_CONTEXT_GPR_OFFSET( 31 )
    405356
    406357#ifndef ASM
  • cpukit/score/src/coremsgflushsupp.c

    r6b24b88 r2e4ead3  
    8686  _ISR_Disable( level );
    8787    inactive_head = _Chain_Head( &the_message_queue->Inactive_messages );
    88     inactive_first = inactive_head->next;;
     88    inactive_first = inactive_head->next;
    8989    message_queue_first = _Chain_First( &the_message_queue->Pending_messages );
    9090    message_queue_last = _Chain_Last( &the_message_queue->Pending_messages );
  • cpukit/score/src/heapresizeblock.c

    r6b24b88 r2e4ead3  
    4545  Heap_Block *next_block = _Heap_Block_at( block, block_size );
    4646  uintptr_t next_block_size = _Heap_Block_size( next_block );
    47   bool next_block_is_free = _Heap_Is_free( next_block );;
     47  bool next_block_is_free = _Heap_Is_free( next_block );
    4848
    4949  _HAssert( _Heap_Is_block_in_heap( heap, next_block ) );
  • testsuites/libtests/Makefile.am

    r6b24b88 r2e4ead3  
    22
    33SUBDIRS = POSIX
     4SUBDIRS += block13
    45SUBDIRS += rbheap01
    56SUBDIRS += flashdisk01
  • testsuites/libtests/block05/init.c

    r6b24b88 r2e4ead3  
    152152  rtems_blkdev_bnum blk_index = 0;
    153153  rtems_status_code (*get_bd)(
    154     const rtems_disk_device *,
     154    rtems_disk_device *,
    155155    rtems_blkdev_bnum,
    156156    rtems_bdbuf_buffer **
    157157  ) = NULL;
    158   const rtems_disk_device *dd = NULL;
     158  rtems_disk_device *dd = NULL;
    159159  size_t bds_per_group = 0;
    160160
  • testsuites/libtests/configure.ac

    r6b24b88 r2e4ead3  
    4242# Explicitly list all Makefiles here
    4343AC_CONFIG_FILES([Makefile
     44block13/Makefile
    4445rbheap01/Makefile
    4546syscall01/Makefile
  • testsuites/libtests/cpuuse/tswitch.c

    r6b24b88 r2e4ead3  
    3030struct taskSwitchLog taskSwitchLog[25];
    3131int taskSwitchLogIndex;
    32 volatile int testsFinished;;
     32volatile int testsFinished;
    3333
    3434void Task_switch(
  • testsuites/libtests/flashdisk01/init.c

    r6b24b88 r2e4ead3  
    228228  int eno = 0;
    229229  const uint8_t *current = get_data_pointer(sd, segment, offset);
    230   const uint8_t *end = current + size;;
     230  const uint8_t *end = current + size;
    231231
    232232  while (eno == 0 && current != end) {
  • testsuites/libtests/termios04/termios_testdriver_intr.c

    r6b24b88 r2e4ead3  
    190190  status = rtems_timer_create(rtems_build_name('T', 'M', 'R', 'X'), &Rx_Timer);
    191191  if ( status )
    192     rtems_fatal_error_occurred(1);;
     192    rtems_fatal_error_occurred(1);
    193193
    194194  status = rtems_timer_create(rtems_build_name('T', 'M', 'T', 'X'), &Tx_Timer);
    195195  if ( status )
    196     rtems_fatal_error_occurred(1);;
     196    rtems_fatal_error_occurred(1);
    197197
    198198  return RTEMS_SUCCESSFUL;
  • testsuites/psxtests/psxmsgq01/init.c

    r6b24b88 r2e4ead3  
    4949void verify_notify(void);
    5050void verify_with_threads(void);
    51 void verify_timedout_mq_timedreceive(
    52         char *task_name, int que, int is_blocking);;
     51void verify_timedout_mq_timedreceive(char *task_name, int que, int is_blocking);
    5352void verify_timedout_mq_timedsend(int que, int is_blocking);
    5453void verify_timed_receive(void);
  • testsuites/samples/base_mp/init.c

    r6b24b88 r2e4ead3  
    1 /*  Init
    2  *
    3  *  This routine is the initialization task for this test program.
    4  *  It is called from init_exec and has the responsibility for creating
    5  *  and starting the tasks that make up the test.  If the time of day
    6  *  clock is required for the application, the current time might be
    7  *  set by this task.
    8  *
    9  *  Input parameters:  NONE
    10  *
    11  *  Output parameters:  NONE
    12  *
    13  *  COPYRIGHT (c) 1989-1999.
     1/**
     2 *  COPYRIGHT (c) 1989-2012.
    143 *  On-Line Applications Research Corporation (OAR).
    154 *
     
    2615#include "system.h"
    2716#include <stdio.h>
     17
     18/* forward declarations to avoid warnings */
     19rtems_task Init(rtems_task_argument argument);
    2820
    2921rtems_task Init(
  • testsuites/samples/base_sp/init.c

    r6b24b88 r2e4ead3  
    1 /*  Init
    2  *
    3  *  This routine is the initialization task for this test program.
    4  *  It is called from init_exec and has the responsibility for creating
    5  *  and starting the tasks that make up the test.  If the time of day
    6  *  clock is required for the application, the current time might be
    7  *  set by this task.
    8  *
    9  *  Input parameters:  NONE
    10  *
    11  *  Output parameters:  NONE
    12  *
    13  *  COPYRIGHT (c) 1989-2011.
     1/*
     2 *  COPYRIGHT (c) 1989-2012.
    143 *  On-Line Applications Research Corporation (OAR).
    154 *
     
    2716#include "tmacros.h"
    2817#include <stdio.h>
     18
     19/* forward declarations to avoid warnings */
     20rtems_task Init(rtems_task_argument argument);
    2921
    3022#define ARGUMENT 0
  • testsuites/samples/capture/init.c

    r6b24b88 r2e4ead3  
    1 /*  Init
    2  *
    3  *  This routine is the initialization task for this test program.
    4  *  It is called from init_exec and has the responsibility for creating
    5  *  and starting the tasks that make up the test.  If the time of day
    6  *  clock is required for the test, it should also be set to a known
    7  *  value by this function.
    8  *
    9  *  Input parameters:  NONE
    10  *
    11  *  Output parameters:  NONE
    12  *
    13  *  COPYRIGHT (c) 1989-1997.
     1/*
     2 *  COPYRIGHT (c) 1989-2012.
    143 *  On-Line Applications Research Corporation (OAR).
    154 *
     
    3322#include <rtems/monitor.h>
    3423#include <rtems/shell.h>
     24
     25/* forward declarations to avoid warnings */
     26rtems_task Init(rtems_task_argument argument);
     27#if !BSP_SMALL_MEMORY
     28  static void notification(int fd, int seconds_remaining, void *arg);
     29#endif
    3530
    3631volatile int can_proceed = 1;
  • testsuites/samples/cdtest/init.c

    r6b24b88 r2e4ead3  
    1 /*  Init
    2  *
    3  *  This routine is the initialization task for this test program.
    4  *  It is called from init_exec and has the responsibility for creating
    5  *  and starting the tasks that make up the test.  If the time of day
    6  *  clock is required for the test, it should also be set to a known
    7  *  value by this function.
    8  *
    9  *  Input parameters:  NONE
    10  *
    11  *  Output parameters:  NONE
    12  *
    13  *  COPYRIGHT (c) 1989-1999.
     1/*
     2 *  COPYRIGHT (c) 1989-2012.
    143 *  On-Line Applications Research Corporation (OAR).
    154 *
  • testsuites/samples/fileio/init.c

    r6b24b88 r2e4ead3  
    1 /*  Init
    2  *
    3  *  This routine is the initialization task for this test program.
    4  *  It is called from init_exec and has the responsibility for creating
    5  *  and starting the tasks that make up the test.  If the time of day
    6  *  clock is required for the test, it should also be set to a known
    7  *  value by this function.
    8  *
    9  *  Input parameters:  NONE
    10  *
    11  *  Output parameters:  NONE
    12  *
    13  *  COPYRIGHT (c) 1989-2011.
     1/*
     2 *  COPYRIGHT (c) 1989-2012.
    143 *  On-Line Applications Research Corporation (OAR).
    154 *
  • testsuites/samples/hello/init.c

    r6b24b88 r2e4ead3  
    1 /*  Init
    2  *
    3  *  This routine is the initialization task for this test program.
    4  *  It is called from init_exec and has the responsibility for creating
    5  *  and starting the tasks that make up the test.  If the time of day
    6  *  clock is required for the test, it should also be set to a known
    7  *  value by this function.
    8  *
    9  *  Input parameters:  NONE
    10  *
    11  *  Output parameters:  NONE
    12  *
    13  *  COPYRIGHT (c) 1989-1999.
     1/*
     2 *  COPYRIGHT (c) 1989-2012.
    143 *  On-Line Applications Research Corporation (OAR).
    154 *
     
    2716#include <stdio.h>
    2817#include <stdlib.h>
     18
     19/* forward declarations to avoid warnings */
     20rtems_task Init(rtems_task_argument argument);
    2921
    3022rtems_task Init(
  • testsuites/samples/loopback/init.c

    r6b24b88 r2e4ead3  
     1/*
     2 *  The license and distribution terms for this file may be
     3 *  found in the file LICENSE in this distribution or at
     4 *  http://www.rtems.com/license/LICENSE.
     5 */
     6
    17#ifdef HAVE_CONFIG_H
    28#include "config.h"
  • testsuites/samples/minimum/init.c

    r6b24b88 r2e4ead3  
    1 /*  Minimum Size Application Initialization
     1/**
     2 *  @file
    23 *
    3  *  COPYRIGHT (c) 1989-2008.
     4 *  Minimum Size Application Initialization
     5 */
     6
     7/*
     8 *  COPYRIGHT (c) 1989-2012.
    49 *  On-Line Applications Research Corporation (OAR).
    510 *
     
    1722#include <bsp.h>
    1823#include <rtems/score/thread.h>
     24
     25/* forward declarations to avoid warnings */
     26rtems_task Init(rtems_task_argument argument);
    1927
    2028rtems_task Init(
  • testsuites/samples/nsecs/init.c

    r6b24b88 r2e4ead3  
    1 /*
     1/**
     2 *  @file
     3 *
    24 *  Nanoseconds accuracy timestamp test
    35 */
    46
    5 /*  COPYRIGHT (c) 1989-2011.
     7/*
     8 *  COPYRIGHT (c) 1989-2012.
    69 *  On-Line Applications Research Corporation (OAR).
    710 *
  • testsuites/samples/paranoia/init.c

    r6b24b88 r2e4ead3  
    1 /*  Init
    2  *
    3  *  This routine is the initialization task for this test program.
    4  *  It is called from init_exec and has the responsibility for creating
    5  *  and starting the tasks that make up the test.  If the time of day
    6  *  clock is required for the test, it should also be set to a known
    7  *  value by this function.
    8  *
    9  *  Input parameters:  NONE
    10  *
    11  *  Output parameters:  NONE
    12  *
    13  *  COPYRIGHT (c) 1989-1999.
     1/*
     2 *  COPYRIGHT (c) 1989-2012.
    143 *  On-Line Applications Research Corporation (OAR).
    154 *
  • testsuites/samples/paranoia/paranoia.c

    r6b24b88 r2e4ead3  
    14721472            UfThold = Y;
    14731473            BadCond (Failure, "Either accuracy deteriorates as numbers\n");
    1474             printf ("approach a threshold = %.17e\n", UfThold);;
     1474            printf ("approach a threshold = %.17e\n", UfThold);
    14751475            printf (" coming down from %.17e\n", C);
    14761476            printf (" or else multiplication gets too many last digits wrong.\n");
     
    15271527            printf ("    Should this NOT signal Underflow, ");
    15281528            printf ("this is a SERIOUS DEFECT\nthat causes ");
    1529             printf ("confusion when innocent statements like\n");;
     1529            printf ("confusion when innocent statements like\n");
    15301530            printf ("    if (X == Z)  ...  else");
    15311531            printf ("  ... (f(X) - f(Z)) / (X - Z) ...\n");
  • testsuites/samples/pppd/init.c

    r6b24b88 r2e4ead3  
     1/*
     2 *  COPYRIGHT (c) 1989-2012.
     3 *  On-Line Applications Research Corporation (OAR).
     4 *
     5 *  The license and distribution terms for this file may be
     6 *  found in the file LICENSE in this distribution or at
     7 *  http://www.rtems.com/license/LICENSE.
     8 */
     9
    110#ifdef HAVE_CONFIG_H
    211#include "config.h"
    312#endif
    4 
    513
    614#include <stdio.h>
  • testsuites/samples/ticker/init.c

    r6b24b88 r2e4ead3  
    1 /*  Init
    2  *
    3  *  This routine is the initialization task for this test program.
    4  *  It is called from init_exec and has the responsibility for creating
    5  *  and starting the tasks that make up the test.  If the time of day
    6  *  clock is required for the test, it should also be set to a known
    7  *  value by this function.
    8  *
    9  *  Input parameters:  NONE
    10  *
    11  *  Output parameters:  NONE
    12  *
    13  *  COPYRIGHT (c) 1989-2011.
     1/*
     2 *  COPYRIGHT (c) 1989-2012.
    143 *  On-Line Applications Research Corporation (OAR).
    154 *
  • testsuites/samples/unlimited/init.c

    r6b24b88 r2e4ead3  
    1 /*  Init
    2  *
    3  *  This routine is the initialization task for this test program.
    4  *  It is called from init_exec and has the responsibility for creating
    5  *  and starting the tasks that make up the test.  If the time of day
    6  *  clock is required for the test, it should also be set to a known
    7  *  value by this function.
    8  *
    9  *  Input parameters:  NONE
    10  *
    11  *  Output parameters:  NONE
    12  *
    13  *  COPYRIGHT (c) 1989-1997.
     1/*
     2 *  COPYRIGHT (c) 1989-2012.
    143 *  On-Line Applications Research Corporation (OAR).
    154 *
    16  *  The license and distribution terms for this file may in
    17  *  the file LICENSE in this distribution or at
     5 *  The license and distribution terms for this file may be
     6 *  found in the file LICENSE in this distribution or at
    187 *  http://www.rtems.com/license/LICENSE.
    198 */
  • testsuites/sptests/sp08/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2011.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1414#include <tmacros.h>
    1515
     16/* forward declarations to avoid warnings */
     17rtems_task Init(rtems_task_argument argument);
     18
    1619#define PRIxModes_Control       PRIx32
    1720#define PRIxrtems_mode          PRIxModes_Control
  • testsuites/sptests/sp10/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2009.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1313
    1414#include <tmacros.h>
     15
     16/* forward declarations to avoid warnings */
     17rtems_task Init(rtems_task_argument argument);
    1518
    1619rtems_task Init(
  • testsuites/sptests/sp18/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2009.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1313
    1414#include <tmacros.h>
     15
     16/* forward declarations to avoid warnings */
     17rtems_task Init(rtems_task_argument argument);
    1518
    1619rtems_task Init(
  • testsuites/sptests/sp2038/init.c

    r6b24b88 r2e4ead3  
    2323
    2424#include <rtems.h>
     25
     26/* forward declarations to avoid warnings */
     27rtems_task Init(rtems_task_argument argument);
    2528
    2629#define TEST_APPLICABLE \
  • testsuites/sptests/sp21/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2010.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1616#include <rtems/devzero.h>
    1717#include <rtems/libio.h>
     18
     19/* forward declarations to avoid warnings */
     20rtems_task Init(rtems_task_argument argument);
     21void do_test_io_manager(void);
     22void do_test_io_lookup_name(void);
     23void do_test_zero_driver(void);
    1824
    1925#define PRIurtems_device_major_number PRIu32
  • testsuites/sptests/sp27/init.c

    r6b24b88 r2e4ead3  
    22 *  Test for rtems_semaphore_flush
    33 *
    4  *  COPYRIGHT (c) 1989-2009.
     4 *  COPYRIGHT (c) 1989-2012.
    55 *  On-Line Applications Research Corporation (OAR).
    66 *
     
    1717#include <tmacros.h>
    1818
     19#include <stdio.h>
     20#include <stdlib.h>
     21
     22/* forward declarations to avoid warnings */
     23rtems_task Init(rtems_task_argument argument);
    1924void starttask(int arg);
    2025rtems_task subtask(rtems_task_argument arg);
    21 
    22 #include <stdio.h>
    23 #include <stdlib.h>
     26void doTest(void);
    2427
    2528#define NTASK 4
  • testsuites/sptests/sp28/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2011.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1818#include <stdio.h>
    1919
     20/* forward declarations to avoid warnings */
     21rtems_task Init(rtems_task_argument argument);
    2022rtems_task subtask(rtems_task_argument arg);
    2123rtems_task Task_variable_deleter(rtems_task_argument ignored);
  • testsuites/sptests/sp32/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2011.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1313
    1414#include <tmacros.h>  /* includes bsp.h, stdio, etc... */
     15
     16/* forward declarations to avoid warnings */
     17rtems_task Init(rtems_task_argument argument);
    1518
    1619rtems_task Init(
  • testsuites/sptests/sp40/init.c

    r6b24b88 r2e4ead3  
    22 *  IO Manager Dynamic Registration
    33 *
    4  *  COPYRIGHT (c) 1989-2007.
     4 *  COPYRIGHT (c) 1989-2012.
    55 *  On-Line Applications Research Corporation (OAR).
    66 *
     
    1919
    2020#include <tmacros.h>
     21
     22/* forward declarations to avoid warnings */
     23rtems_task Init(rtems_task_argument argument);
    2124
    2225static rtems_device_driver test_open(
  • testsuites/sptests/sp41/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2009.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1414#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
    1515#include <tmacros.h>
     16
     17/* forward declarations to avoid warnings */
     18rtems_task Init(rtems_task_argument argument);
     19void iterator(Thread_Control *thread);
    1620
    1721void iterator(
  • testsuites/sptests/sp49/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2009.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1313
    1414#include <tmacros.h>
     15
     16/* forward declarations to avoid warnings */
     17rtems_task Init(rtems_task_argument argument);
    1518
    1619rtems_task Init(rtems_task_argument ignored)
  • testsuites/sptests/sp50/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2011.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1515#include "pritime.h"
    1616
     17/* forward declarations to avoid warnings */
     18rtems_timer_service_routine Timer_Routine(rtems_id id, void *ignored);
     19rtems_task Init(rtems_task_argument argument);
     20
    1721volatile int   Fired;
    1822volatile bool  timerRan;
    1923
    20 rtems_timer_service_routine Timer_Routine( rtems_id id, void *ignored )
     24rtems_timer_service_routine Timer_Routine(rtems_id id, void *ignored)
    2125{
    2226  rtems_status_code status;
  • testsuites/sptests/sp51/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2009.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1313
    1414#include <tmacros.h>
     15
     16/* forward declarations to avoid warnings */
     17rtems_task Init(rtems_task_argument argument);
    1518
    1619rtems_task Init(
  • testsuites/sptests/sp52/init.c

    r6b24b88 r2e4ead3  
    2727
    2828#include <tmacros.h>
     29
     30/* forward declarations to avoid warnings */
     31rtems_task Init(rtems_task_argument argument);
     32rtems_timer_service_routine TIMER_service_routine(
     33  rtems_id  ignored_id,
     34  void     *user_data
     35);
    2936
    3037#define INITIAL_SECOND 10
  • testsuites/sptests/sp54/init.c

    r6b24b88 r2e4ead3  
    1 /*  Odd Id Cases where API configured but No Threads
     1/**
     2 *  @@file
     3 *
     4 *  Odd Id Cases where API configured but No Threads
    25 *    + Possibly Valid Id passed to directive
    3  *
    4  *  COPYRIGHT (c) 1989-2011.
     6 */
     7
     8/*
     9 *  COPYRIGHT (c) 1989-2012.
    510 *  On-Line Applications Research Corporation (OAR).
    611 *
     
    1520
    1621#include <tmacros.h>
     22
     23/* forward declarations to avoid warnings */
     24rtems_task Init(rtems_task_argument argument);
    1725
    1826rtems_task Init(
  • testsuites/sptests/sp55/init.c

    r6b24b88 r2e4ead3  
    1 /*  Broadcast to a message queue with pending messages
     1/**
     2 *  @file
    23 *
    3  *  COPYRIGHT (c) 1989-2009.
     4 *  Broadcast to a message queue with pending messages
     5 */
     6
     7/*
     8 *  COPYRIGHT (c) 1989-2012.
    49 *  On-Line Applications Research Corporation (OAR).
    510 *
     
    1419
    1520#include <tmacros.h>
     21
     22/* forward declarations to avoid warnings */
     23rtems_task Init(rtems_task_argument argument);
    1624
    1725rtems_task Init(
  • testsuites/sptests/sp56/init.c

    r6b24b88 r2e4ead3  
    1 /*  Extension create fails
     1/**
     2 *  @file
    23 *
    3  *  COPYRIGHT (c) 1989-2009.
     4 *  Extension create fails
     5 */
     6
     7/*
     8 *  COPYRIGHT (c) 1989-2012.
    49 *  On-Line Applications Research Corporation (OAR).
    510 *
     
    1419
    1520#include <tmacros.h>
     21
     22/* forward declarations to avoid warnings */
     23rtems_task Init(rtems_task_argument argument);
     24bool task_create(Thread_Control *executing, Thread_Control *created);
    1625
    1726bool task_create(
  • testsuites/sptests/sp57/init.c

    r6b24b88 r2e4ead3  
    1 /*  Restart a task which is delaying
     1/*
     2 *  @file
    23 *
    3  *  COPYRIGHT (c) 1989-2011.
     4 *  Restart a task which is delaying
     5 */
     6
     7/*
     8 *  COPYRIGHT (c) 1989-2012.
    49 *  On-Line Applications Research Corporation (OAR).
    510 *
     
    1419
    1520#include <tmacros.h>
     21
     22/* forward declarations to avoid warnings */
     23rtems_task Init(rtems_task_argument argument);
     24rtems_task Delay_task(rtems_task_argument ignored);
    1625
    1726rtems_task Delay_task(
  • testsuites/sptests/sp58/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2009.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1717#include <rtems/score/timespec.h>
    1818#include <rtems/score/threadq.h>
     19
     20/* forward declarations to avoid warnings */
     21rtems_task Init(rtems_task_argument argument);
     22void timespec_divide_by_zero(void);
     23void timespec_greater_than_lhs_sec_less(void);
    1924
    2025void timespec_divide_by_zero(void)
  • testsuites/sptests/sp59/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2011.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1313
    1414#include <tmacros.h>
     15
     16/* forward declarations to avoid warnings */
     17rtems_task Init(rtems_task_argument argument);
     18rtems_task Blocking_task(rtems_task_argument ignored);
    1519
    1620#define ALLOC_SIZE 400
  • testsuites/sptests/sp60/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2009.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1313
    1414#include <tmacros.h>
     15
     16/* forward declarations to avoid warnings */
     17rtems_task Init(rtems_task_argument argument);
    1518
    1619rtems_task Init(
  • testsuites/sptests/sp62/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2009.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1414#include <tmacros.h>
    1515#include <unistd.h>
     16
     17/* forward declarations to avoid warnings */
     18rtems_task Init(rtems_task_argument argument);
     19rtems_task Blocker(rtems_task_argument ignored);
    1620
    1721rtems_id      Region;
  • testsuites/sptests/sp63/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2009.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1313
    1414#include <tmacros.h>
     15
     16/* forward declarations to avoid warnings */
     17rtems_task Init(rtems_task_argument argument);
     18void test_case_one(void);
     19void test_case_two(void);
     20void test_case_three(void);
    1521
    1622#define MAX 256
  • testsuites/sptests/sp64/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2009.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1313
    1414#include "tmacros.h"
     15
     16/* forward declarations to avoid warnings */
     17rtems_task Init(rtems_task_argument argument);
    1518
    1619uint32_t Area1[50] CPU_STRUCTURE_ALIGNMENT;
  • testsuites/sptests/sp65/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2011.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1515#include <unistd.h>
    1616
     17/* forward declarations to avoid warnings */
     18rtems_task Init(rtems_task_argument argument);
     19rtems_task Task_1(rtems_task_argument arg);
     20
    1721#if defined(INHERIT_CEILING)
    1822  #define TEST_NAME                "66"
     
    2226  #define TASK_PRIORITY            1
    2327#endif
    24 
    25 rtems_task Task_1(
    26   rtems_task_argument arg
    27 );
    2828
    2929rtems_task Init(
  • testsuites/sptests/sp67/init.c

    r6b24b88 r2e4ead3  
    1616
    1717#include <tmacros.h>
     18
     19/* forward declarations to avoid warnings */
     20rtems_task Init(rtems_task_argument argument);
     21rtems_timer_service_routine TIMER_service_routine(
     22  rtems_id  ignored_id,
     23  void     *user_data
     24);
    1825
    1926/*
  • testsuites/sptests/sp68/init.c

    r6b24b88 r2e4ead3  
    2626#include <tmacros.h>
    2727
     28/* forward declarations to avoid warnings */
     29rtems_task Init(rtems_task_argument argument);
     30
    2831#define TIMER_COUNT 6
    2932
  • testsuites/sptests/sp69/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2009.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1515#include <tmacros.h>
    1616#include "test_support.h"
     17
     18/* forward declarations to avoid warnings */
     19rtems_task Init(rtems_task_argument argument);
    1720
    1821rtems_task Init(
  • testsuites/sptests/sp70/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2010.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1515#include "test_support.h"
    1616
     17/* forward declarations to avoid warnings */
     18rtems_task Init(rtems_task_argument argument);
     19void create_helper(int task);
     20void delete_helper(int task);
     21 
    1722rtems_id          TaskID[10];
    1823
     
    3338}
    3439
    35 void delete_helper( int task )
     40void delete_helper(int task)
    3641{
    3742  rtems_status_code status;
  • testsuites/sptests/sp71/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2010.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1616
    1717#define PER_ALLOCATION 8000
     18
     19/* forward declarations to avoid warnings */
     20rtems_task Init(rtems_task_argument argument);
    1821
    1922rtems_task Init(
  • testsuites/sptests/sp72/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2011.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1414#include <tmacros.h>
    1515#include "test_support.h"
     16
     17/* forward declarations to avoid warnings */
     18rtems_task Init(rtems_task_argument argument);
     19rtems_task Test_task(rtems_task_argument argument);
    1620
    1721rtems_id Semaphore_id;
  • testsuites/sptests/sp73/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 2011.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1515#include <inttypes.h>
    1616#include "tmacros.h"
     17
     18/* forward declarations to avoid warnings */
     19rtems_task Init(rtems_task_argument argument);
     20rtems_task Test_task(rtems_task_argument argument);
    1721
    1822rtems_id   Task_id[ 4 ];         /* array of task ids */
  • testsuites/sptests/sp74/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 2011.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1414#include <tmacros.h>
    1515
     16/* forward declarations to avoid warnings */
     17rtems_task Init(rtems_task_argument argument);
     18rtems_task Test_task(rtems_task_argument argument);
    1619
    1720rtems_task Test_task(
  • testsuites/sptests/sp75/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2011.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1515#include <tmacros.h>
    1616#include "test_support.h"
     17
     18/* forward declarations to avoid warnings */
     19rtems_task Init(rtems_task_argument argument);
    1720
    1821rtems_task Init(
  • testsuites/sptests/sp76/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 2011.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1313
    1414#include <tmacros.h>
     15
     16/* forward declarations to avoid warnings */
     17rtems_task Init(rtems_task_argument argument);
     18rtems_task Test_task(rtems_task_argument index);
    1519
    1620rtems_task Test_task(
  • testsuites/sptests/spassoc01/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2010.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1717#include <stdio.h>
    1818#include <rtems/assoc.h>
     19
     20/* forward declarations to avoid warnings */
     21rtems_task Init(rtems_task_argument argument);
    1922
    2023const rtems_assoc_t assoc_table_null[] =
  • testsuites/sptests/spcbssched03/tasks_periodic.c

    r6b24b88 r2e4ead3  
    2020#include "system.h"
    2121
    22 void overrun_handler_task_4 (
     22/* forward declarations to avoid warnings */
     23void overrun_handler_task_4(rtems_cbs_server_id server_id);
     24
     25void overrun_handler_task_4(
    2326  rtems_cbs_server_id server_id
    2427)
  • testsuites/sptests/spchain/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2011.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1414#include <tmacros.h>
    1515#include <rtems/chain.h>
     16
     17/* forward declarations to avoid warnings */
     18rtems_task Init(rtems_task_argument argument);
    1619
    1720#define EVENT RTEMS_EVENT_13
  • testsuites/sptests/spclockget/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2011.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1414#include <tmacros.h>
    1515#include "pritime.h"
     16
     17/* forward declarations to avoid warnings */
     18rtems_task Init(rtems_task_argument argument);
    1619
    1720rtems_task Init(
  • testsuites/sptests/spcoverage/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2009.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1313
    1414#include "tmacros.h"
     15
     16/* forward declarations to avoid warnings */
     17rtems_task Init(rtems_task_argument argument);
    1518
    1619rtems_task Init(
  • testsuites/sptests/sperror01/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2010.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1616#include "rtems/error.h"
    1717#include <errno.h>
     18
     19/* forward declarations to avoid warnings */
     20rtems_task Init(rtems_task_argument argument);
    1821
    1922rtems_task Init(
  • testsuites/sptests/sperror02/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2010.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1616#include <errno.h>
    1717#include <rtems/error.h>
     18
     19/* forward declarations to avoid warnings */
     20rtems_task Init(rtems_task_argument argument);
    1821
    1922rtems_task Init(
  • testsuites/sptests/sperror03/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2010.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1414#include <tmacros.h>
    1515#include "test_support.h"
     16
     17/* forward declarations to avoid warnings */
     18rtems_task Init(rtems_task_argument argument);
    1619
    1720rtems_task Init(
  • testsuites/sptests/spfatal21/testcase.h

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2010.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1616#include <rtems/libcsupport.h>
    1717#include <rtems/malloc.h>
     18#include <unistd.h>
    1819
    1920/* Safe information on real heap */
  • testsuites/sptests/spfatal_support/consume_sems.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2010.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1313
    1414#include <rtems.h>
     15
     16/* forward declarations to avoid warnings */
     17rtems_device_driver consume_semaphores_initialize(
     18  rtems_device_major_number major __attribute__((unused)),
     19  rtems_device_minor_number minor __attribute__((unused)),
     20  void *pargp __attribute__((unused))
     21);
    1522
    1623#define MAXIMUM 20
  • testsuites/sptests/spfifo01/init.c

    r6b24b88 r2e4ead3  
    1919
    2020#include "tmacros.h"
     21
     22/* forward declarations to avoid warnings */
     23rtems_task Init(rtems_task_argument argument);
    2124
    2225#define FIFO_PATH "/fifo01"
  • testsuites/sptests/spfifo02/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2010.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    2121#include <errno.h>
    2222#include <rtems/libcsupport.h>
     23
     24/* forward declarations to avoid warnings */
     25rtems_task Init(rtems_task_argument argument);
     26void create_all_barriers(void);
     27void create_all_semaphores(void);
     28void delete_barrier(void);
     29void delete_semaphore(void);
     30void create_fifo(void);
     31void open_fifo(int expected, int flags);
    2332
    2433#define MAXIMUM 10
  • testsuites/sptests/spfifo03/init.c

    r6b24b88 r2e4ead3  
    1 /*  Init
    2  *
    3  *  This routine is the initialization task for this test program.
    4  *  It is a user initialization task and has the responsibility
    5  *  of invoking the test routine
    6  *
    7  *  Input parameters:
    8  *    not_used
    9  *
    10  *  Output parameters:  NONE
    11  *
    12  *  COPYRIGHT (c) 1989-1999.
     1/*
     2 *  COPYRIGHT (c) 1989-2012.
    133 *  On-Line Applications Research Corporation (OAR).
    144 *
     
    3424#include <rtems/libio.h>
    3525
     26/* forward declarations to avoid warnings */
     27rtems_task Init(rtems_task_argument argument);
     28rtems_task read_task(rtems_task_argument not_used);
     29void test_main(void);
     30
    3631#define SEND_RCV_BUFSIZ 12
    3732rtems_id Barrier;
     
    9287}
    9388
    94 
    95 void test_main(void) //Also acts as the write task
     89void test_main(void) /* Also acts as the write task */
    9690{
    9791
  • testsuites/sptests/spfifo04/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2010.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    2323#include <rtems.h>
    2424#include <rtems/libio.h>
     25
     26/* forward declarations to avoid warnings */
     27rtems_task Init(rtems_task_argument argument);
    2528
    2629#define SEND_RCV_BUFSIZ 12
  • testsuites/sptests/spfifo05/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2010.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    2525#include <rtems/libio.h>
    2626
     27/* forward declarations to avoid warnings */
     28rtems_task Init(rtems_task_argument argument);
     29rtems_task read_task(rtems_task_argument not_used);
     30
    2731#define SEND_RCV_BUFSIZ       (PIPE_BUF+20)
    2832
     
    3337char sendBuf[SEND_RCV_BUFSIZ] = {0};
    3438
    35 rtems_task read_task( rtems_task_argument not_used )
     39rtems_task read_task(rtems_task_argument not_used)
    3640{
    3741  int fd = 0;
     
    117121  rtems_task_delete( RTEMS_SELF );
    118122}
    119 
    120 
    121123
    122124rtems_task Init(
  • testsuites/sptests/spintrcritical01/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2011.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1515#include <tmacros.h>
    1616#include <intrcritical.h>
     17
     18/* forward declarations to avoid warnings */
     19rtems_task Init(rtems_task_argument argument);
     20rtems_timer_service_routine test_release_from_isr(rtems_id  timer, void *arg);
     21Thread_blocking_operation_States getState(void);
    1722
    1823#if defined(FIFO_NO_TIMEOUT)
  • testsuites/sptests/spintrcritical06/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2009.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1515#include <tmacros.h>
    1616#include <intrcritical.h>
     17
     18/* forward declarations to avoid warnings */
     19rtems_task Init(rtems_task_argument argument);
     20rtems_timer_service_routine test_release_from_isr(rtems_id  timer, void *arg);
     21rtems_task Secondary_task(rtems_task_argument arg);
    1722
    1823/* common parameters */
  • testsuites/sptests/spintrcritical08/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2009.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1515#include <tmacros.h>
    1616#include <intrcritical.h>
     17
     18/* forward declarations to avoid warnings */
     19rtems_task Init(rtems_task_argument argument);
     20rtems_timer_service_routine test_release_from_isr(rtems_id  timer, void *arg);
     21rtems_rate_monotonic_period_states getState(void);
    1722
    1823rtems_id Main_task;
  • testsuites/sptests/spintrcritical09/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2009.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1515#include <tmacros.h>
    1616#include <intrcritical.h>
     17
     18/* forward declarations to avoid warnings */
     19rtems_task Init(rtems_task_argument argument);
     20rtems_timer_service_routine test_release_from_isr(rtems_id  timer, void *arg);
     21Thread_blocking_operation_States getState(void);
    1722
    1823rtems_id Main_task;
  • testsuites/sptests/spintrcritical10/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2009.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1515#include <tmacros.h>
    1616#include <intrcritical.h>
     17
     18/* forward declarations to avoid warnings */
     19rtems_task Init(rtems_task_argument argument);
    1720
    1821rtems_id Main_task;
  • testsuites/sptests/spintrcritical11/init.c

    r6b24b88 r2e4ead3  
    11/*
    2  *  COPYRIGHT (c) 1989-2009.
     2 *  COPYRIGHT (c) 1989-2012.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1414#include <tmacros.h>
    1515#include <intrcritical.h>
     16
     17/* forward declarations to avoid warnings */
     18rtems_task Init(rtems_task_argument argument);
     19rtems_timer_service_routine test_release_from_isr(rtems_id  timer, void *arg);
    1620
    1721rtems_id Main_task;
  • testsuites/sptests/spintrcritical13/init.c

    r6b24b88 r2e4ead3  
    2727#else
    2828  #error "Test Mode not defined"
     29#endif
    2930
    30 #endif
     31/* forward declarations to avoid warnings */
     32rtems_task Init(rtems_task_argument argument);
     33rtems_timer_service_routine test_release_from_isr(rtems_id  timer, void *arg);
     34rtems_timer_service_routine TimerMethod(rtems_id  timer, void *arg);
    3135
    3236rtems_id Main_task;
  • testsuites/sptests/spintrcritical15/init.c

    r6b24b88 r2e4ead3  
    1515#include <intrcritical.h>
    1616
     17/* forward declarations to avoid warnings */
     18rtems_task Init(rtems_task_argument argument);
     19rtems_task Secondary_task(rtems_task_argument ignored);
     20
    1721#define TEST_NAME          "15"
    1822#define INIT_PRIORITY      2
     
    3034
    3135  while (1) {
    32 
    3336    sc = rtems_semaphore_obtain( Semaphore, RTEMS_DEFAULT_OPTIONS, 1 );
    3437    fatal_directive_status( sc, RTEMS_TIMEOUT, "rtems_semaphore_obtain" );
  • testsuites/sptests/spintrcritical16/init.c

    r6b24b88 r2e4ead3  
    1515#include <tmacros.h>
    1616#include <intrcritical.h>
     17
     18/* forward declarations to avoid warnings */
     19rtems_task Init(rtems_task_argument argument);
     20rtems_timer_service_routine test_release_from_isr(rtems_id  timer, void *arg);
     21Thread_blocking_operation_States getState(void);
    1722
    1823#define TEST_NAME          "16"
  • testsuites/sptests/spintrcritical17/init.c

    r6b24b88 r2e4ead3  
    1818#include <tmacros.h>
    1919#include <intrcritical.h>
     20
     21/* forward declarations to avoid warnings */
     22rtems_task Init(rtems_task_argument argument);
    2023
    2124#define TIMER_COUNT 4
  • testsuites/sptests/spmountmgr01/init.c

    r6b24b88 r2e4ead3  
    1818#include <rtems/libcsupport.h>
    1919
    20 int fs_mount( rtems_filesystem_mount_table_entry_t *mt_entry,
    21               const void                           *data )
     20/* forward declarations to avoid warnings */
     21rtems_task Init(rtems_task_argument argument);
     22int fs_mount(
     23  rtems_filesystem_mount_table_entry_t *mt_entry,
     24  const void                           *data
     25);
     26
     27int fs_mount(
     28  rtems_filesystem_mount_table_entry_t *mt_entry,
     29  const void                           *data
     30)
    2231{
    2332  return 0;
     
    3039  int status = 0;
    3140  void *alloc_ptr = (void *)0;
    32  
     41
    3342  puts( "\n\n*** TEST MOUNT MANAGER ROUTINE - 01 ***" );
    3443
     
    5160  puts( "Init - attempt to make target(NULL) and mount - expect EINVAL" );
    5261  status = mount_and_make_target_path(
    53              NULL,
    54              NULL,
    55              "fs",
    56              0,
    57              NULL );
     62             NULL,
     63             NULL,
     64             "fs",
     65             0,
     66             NULL );
    5867  rtems_test_assert( status == -1 );
    5968  rtems_test_assert( errno == EINVAL );
     
    6170  puts( "Init - attempt to make target and mount - expect EINVAL" );
    6271  status = mount_and_make_target_path(
    63              NULL,
    64              "/tmp",
    65              "fs",
    66              2,
    67              NULL );
     72             NULL,
     73             "/tmp",
     74             "fs",
     75             2,
     76             NULL );
    6877  rtems_test_assert( status == -1 );
    6978  rtems_test_assert( errno == EINVAL );
    7079
    71              
    7280  puts( "Init - register filesystem fs - expect EINVAL" );
    7381  status = rtems_filesystem_register( "fs", fs_mount );
     
    8391  rtems_test_assert( status == -1 );
    8492  rtems_test_assert( errno == EINVAL );
    85  
     93
    8694  puts( "Init - attempt to unregister with bad args - expect EINVAL" );
    8795  status = rtems_filesystem_unregister( NULL );
     
    92100  status = rtems_filesystem_unregister( "fs" );
    93101  rtems_test_assert( status == 0 );
    94  
     102
    95103  puts( "Init - attempt to unregister fs again - expect ENOENT" );
    96104  status = rtems_filesystem_unregister( "fs" );
     
    101109  status = rtems_filesystem_unregister( "bfs" );
    102110  rtems_test_assert( status == 0 );
    103  
     111
    104112  puts( "Init - attempt to unregister bfs again - expect ENOENT" );
    105113  status = rtems_filesystem_unregister( "bfs" );
  • testsuites/sptests/spnotepad01/init.c

    r6b24b88 r2e4ead3  
    1313
    1414#include "tmacros.h"
     15
     16/* forward declarations to avoid warnings */
     17rtems_task Init(rtems_task_argument argument);
    1518
    1619rtems_task Init(
  • testsuites/sptests/spprintk/init.c

    r6b24b88 r2e4ead3  
    1616#include <tmacros.h>
    1717#include <rtems/bspIo.h>
     18
     19/* forward declarations to avoid warnings */
     20rtems_task Init(rtems_task_argument argument);
     21int test_getchar(void);
     22void do_getchark(void);
     23void do_putk(void);
     24void do_printk(void);
    1825
    1926int test_getchar(void)
  • testsuites/sptests/spprivenv01/init.c

    r6b24b88 r2e4ead3  
    1818#include <rtems/libcsupport.h>
    1919
    20 rtems_task task_routine( rtems_task_argument not_used )
     20/* forward declarations to avoid warnings */
     21rtems_task Init(rtems_task_argument argument);
     22rtems_task task_routine(rtems_task_argument not_used);
     23
     24rtems_task task_routine(rtems_task_argument not_used)
    2125{
    2226  rtems_status_code sc;
     
    4044  rtems_id                task_id;
    4145  rtems_name              another_task_name;
    42   Heap_Information_block  Info;
    43  
     46
    4447  puts( "\n\n*** TEST USER ENVIRONMENT ROUTINE - 01 ***" );
    4548
  • testsuites/sptests/sprbtree01/init.c

    r6b24b88 r2e4ead3  
    1313#include <tmacros.h>
    1414#include <rtems/rbtree.h>
     15
     16/* forward declarations to avoid warnings */
     17rtems_task Init(rtems_task_argument argument);
    1518
    1619int numbers[20] = {
  • testsuites/sptests/spsimplesched01/init.c

    r6b24b88 r2e4ead3  
    1313
    1414#include <tmacros.h>
     15
     16/* forward declarations to avoid warnings */
     17rtems_task Init(rtems_task_argument argument);
     18rtems_task Test_task(rtems_task_argument unused);
    1519
    1620/*
  • testsuites/sptests/spsimplesched02/init.c

    r6b24b88 r2e4ead3  
    1 /* 
     1/*
    22 *  COPYRIGHT (c) 2011.
    33 *  On-Line Applications Research Corporation (OAR).
     
    1313
    1414#include <tmacros.h>
     15
     16/* forward declarations to avoid warnings */
     17rtems_task Init(rtems_task_argument argument);
     18rtems_task Test_task(rtems_task_argument argument);
     19void ObtainRelease(bool suspendIdle);
    1520
    1621/*
     
    3843}
    3944
    40 void ObtainRelease( bool suspendIdle ) 
     45void ObtainRelease( bool suspendIdle )
    4146{
    4247  rtems_status_code   status;
     
    129134#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
    130135
    131 #define CONFIGURE_MAXIMUM_TASKS             3 
     136#define CONFIGURE_MAXIMUM_TASKS             3
    132137#define CONFIGURE_MAXIMUM_SEMAPHORES        2
    133138
  • testsuites/sptests/spsimplesched03/init.c

    r6b24b88 r2e4ead3  
    1313
    1414#include <tmacros.h>
     15
     16/* forward declarations to avoid warnings */
     17rtems_task Init(rtems_task_argument argument);
    1518
    1619rtems_task Init(
  • testsuites/sptests/spstkalloc/init.c

    r6b24b88 r2e4ead3  
    1313
    1414#include <tmacros.h>
     15
     16/* forward declarations to avoid warnings */
     17rtems_task Init(rtems_task_argument argument);
    1518
    1619#define MAXIMUM_STACKS 3
  • testsuites/sptests/spthreadq01/init.c

    r6b24b88 r2e4ead3  
    1616#include <sys/types.h>
    1717#include <rtems/score/threadq.h>
     18
     19/* forward declarations to avoid warnings */
     20rtems_task Init(rtems_task_argument argument);
     21void threadq_first_empty(
     22  const char               *discipline_string,
     23  Thread_queue_Disciplines  discipline
     24);
    1825
    1926void threadq_first_empty(
  • testsuites/sptests/spwkspace/init.c

    r6b24b88 r2e4ead3  
    1919
    2020#include <rtems/score/wkspace.h>
     21
     22/* forward declarations to avoid warnings */
     23rtems_task Init(rtems_task_argument argument);
    2124
    2225static void test_workspace_string_duplicate(void)
Note: See TracChangeset for help on using the changeset viewer.