Changeset 36df4109 in mainline for kernel/arch/mips32/src/mips32.c


Ignore:
Timestamp:
2016-06-06T16:29:56Z (9 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7510326
Parents:
7f0580d
Message:

Introduce architecure-specific operations

This replaces the arch_*_init() functions with an arch_ops_t structure
defined for each architecture. Undefined operations are treated as NOPs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/mips32/src/mips32.c

    r7f0580d r36df4109  
    3434
    3535#include <arch.h>
     36#include <arch/arch.h>
    3637#include <typedefs.h>
    3738#include <errno.h>
     
    5657#define CACHE_EXC  ((char *) 0x80000100)
    5758
     59static void mips32_pre_mm_init(void);
     60static void mips32_post_mm_init(void);
     61static void mips32_post_smp_init(void);
     62
     63arch_ops_t mips32_ops = {
     64        .pre_mm_init = mips32_pre_mm_init,
     65        .post_mm_init = mips32_post_mm_init,
     66        .post_smp_init = mips32_post_smp_init,
     67};
     68
     69arch_ops_t *arch_ops = &mips32_ops;
    5870
    5971/* Why the linker moves the variable 64K away in assembler
     
    7183
    7284/** Performs mips32-specific initialization before main_bsp() is called. */
    73 void arch_pre_main(void *entry __attribute__((unused)), bootinfo_t *bootinfo)
     85void mips32_pre_main(void *entry __attribute__((unused)), bootinfo_t *bootinfo)
    7486{
    7587        init.cnt = min3(bootinfo->cnt, TASKMAP_MAX_RECORDS, CONFIG_INIT_TASKS);
     
    96108}
    97109
    98 void arch_pre_mm_init(void)
     110void mips32_pre_mm_init(void)
    99111{
    100112        /* It is not assumed by default */
     
    127139}
    128140
    129 void arch_post_mm_init(void)
     141void mips32_post_mm_init(void)
    130142{
    131143        interrupt_init();
     
    135147}
    136148
    137 void arch_post_cpu_init(void)
    138 {
    139 }
    140 
    141 void arch_pre_smp_init(void)
    142 {
    143 }
    144 
    145 void arch_post_smp_init(void)
     149void mips32_post_smp_init(void)
    146150{
    147151        /* Set platform name. */
Note: See TracChangeset for help on using the changeset viewer.