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/sparc64/src/sun4u/sparc64.c

    r7f0580d r36df4109  
    3434
    3535#include <arch.h>
     36#include <arch/arch.h>
    3637#include <debug.h>
    3738#include <config.h>
     
    5253#include <sysinfo/sysinfo.h>
    5354
     55static void sparc64_pre_mm_init(void);
     56static void sparc64_post_mm_init(void);
     57static void sparc64_post_smp_init(void);
     58
     59arch_ops_t sparc64_ops = {
     60        .pre_mm_init = sparc64_pre_mm_init,
     61        .post_mm_init = sparc64_post_mm_init,
     62        .post_smp_init = sparc64_post_smp_init,
     63};
     64
     65arch_ops_t *arch_ops = &sparc64_ops;
     66
    5467memmap_t memmap;
    5568
    5669/** Perform sparc64-specific initialization before main_bsp() is called. */
    57 void arch_pre_main(bootinfo_t *bootinfo)
     70void sparc64_pre_main(bootinfo_t *bootinfo)
    5871{
    5972        /* Copy init task info. */
     
    8497
    8598/** Perform sparc64 specific initialization before mm is initialized. */
    86 void arch_pre_mm_init(void)
     99void sparc64_pre_mm_init(void)
    87100{
    88101        if (config.cpu_active == 1) {
     
    93106
    94107/** Perform sparc64 specific initialization afterr mm is initialized. */
    95 void arch_post_mm_init(void)
     108void sparc64_post_mm_init(void)
    96109{
    97110        if (config.cpu_active == 1) {
     
    107120}
    108121
    109 void arch_post_cpu_init(void)
    110 {
    111 }
    112 
    113 void arch_pre_smp_init(void)
    114 {
    115 }
    116 
    117 void arch_post_smp_init(void)
     122void sparc64_post_smp_init(void)
    118123{
    119124        /* Currently the only supported platform for sparc64/sun4u is 'sun4u'. */
Note: See TracChangeset for help on using the changeset viewer.