Changeset 7a0359b in mainline for kernel/arch/mips32/include/asm.h


Ignore:
Timestamp:
2010-07-02T15:42:19Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bbfdf62
Parents:
e3ee9b9
Message:

improve kernel function tracing

  • add support for more generic kernel sources
  • replace attribute((no_instrument_function)) with NO_TRACE macro (shorter and for future compatibility with different compilers)
  • to be on the safe side, do not instrument most of the inline and static functions (plus some specific non-static functions)

collateral code cleanup (no change in functionality)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/mips32/include/asm.h

    re3ee9b9 r7a0359b  
    3838#include <typedefs.h>
    3939#include <config.h>
     40#include <trace.h>
    4041
    41 static inline void cpu_sleep(void)
     42NO_TRACE static inline void cpu_sleep(void)
    4243{
    43         /* Most of the simulators do not support */
    44 /*      asm volatile ("wait"); */
     44        /*
     45         * Unfortunatelly most of the simulators do not support
     46         *
     47         * asm volatile (
     48         *     "wait"
     49         * );
     50         *
     51         */
    4552}
    4653
     
    5259 *
    5360 */
    54 static inline uintptr_t get_stack_base(void)
     61NO_TRACE static inline uintptr_t get_stack_base(void)
    5562{
    5663        uintptr_t base;
     
    6572}
    6673
    67 extern void cpu_halt(void) __attribute__((noreturn));
    68 extern void asm_delay_loop(uint32_t t);
    69 extern void userspace_asm(uintptr_t ustack, uintptr_t uspace_uarg,
    70     uintptr_t entry);
    71 
    72 extern ipl_t interrupts_disable(void);
    73 extern ipl_t interrupts_enable(void);
    74 extern void interrupts_restore(ipl_t ipl);
    75 extern ipl_t interrupts_read(void);
    76 extern bool interrupts_disabled(void);
    77 
    78 static inline void pio_write_8(ioport8_t *port, uint8_t v)
     74NO_TRACE static inline void pio_write_8(ioport8_t *port, uint8_t v)
    7975{
    8076        *port = v;
    8177}
    8278
    83 static inline void pio_write_16(ioport16_t *port, uint16_t v)
     79NO_TRACE static inline void pio_write_16(ioport16_t *port, uint16_t v)
    8480{
    8581        *port = v;
    8682}
    8783
    88 static inline void pio_write_32(ioport32_t *port, uint32_t v)
     84NO_TRACE static inline void pio_write_32(ioport32_t *port, uint32_t v)
    8985{
    9086        *port = v;
    9187}
    9288
    93 static inline uint8_t pio_read_8(ioport8_t *port)
     89NO_TRACE static inline uint8_t pio_read_8(ioport8_t *port)
    9490{
    9591        return *port;
    9692}
    9793
    98 static inline uint16_t pio_read_16(ioport16_t *port)
     94NO_TRACE static inline uint16_t pio_read_16(ioport16_t *port)
    9995{
    10096        return *port;
    10197}
    10298
    103 static inline uint32_t pio_read_32(ioport32_t *port)
     99NO_TRACE static inline uint32_t pio_read_32(ioport32_t *port)
    104100{
    105101        return *port;
    106102}
     103
     104extern void cpu_halt(void) __attribute__((noreturn));
     105extern void asm_delay_loop(uint32_t);
     106extern void userspace_asm(uintptr_t, uintptr_t, uintptr_t);
     107
     108extern ipl_t interrupts_disable(void);
     109extern ipl_t interrupts_enable(void);
     110extern void interrupts_restore(ipl_t);
     111extern ipl_t interrupts_read(void);
     112extern bool interrupts_disabled(void);
    107113
    108114#endif
Note: See TracChangeset for help on using the changeset viewer.