Changeset 36df4109 in mainline for kernel/arch/sparc32/src/sparc32.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/sparc32/src/sparc32.c

    r7f0580d r36df4109  
    3434
    3535#include <arch.h>
     36#include <arch/arch.h>
    3637#include <typedefs.h>
    3738#include <arch/interrupt.h>
     
    5455#include <str.h>
    5556
     57static void sparc32_post_mm_init(void);
     58static void sparc32_post_smp_init(void);
     59
     60arch_ops_t sparc32_ops = {
     61        .post_mm_init = sparc32_post_mm_init,
     62        .post_smp_init = sparc32_post_smp_init,
     63};
     64
     65arch_ops_t *arch_ops = &sparc32_ops;
     66
    5667char memcpy_from_uspace_failover_address;
    5768char memcpy_to_uspace_failover_address;
     
    5970static bootinfo_t machine_bootinfo;
    6071
    61 void arch_pre_main(void *unused, bootinfo_t *bootinfo)
     72void sparc32_pre_main(void *unused, bootinfo_t *bootinfo)
    6273{
    6374        init.cnt = min3(bootinfo->cnt, TASKMAP_MAX_RECORDS, CONFIG_INIT_TASKS);
     
    7485}
    7586
    76 void arch_pre_mm_init(void)
    77 {
    78 }
    79 
    80 extern void func1(void);
    81 
    82 void arch_post_mm_init(void)
     87void sparc32_post_mm_init(void)
    8388{
    8489        machine_init(&machine_bootinfo);
     
    95100}
    96101
    97 
    98 void arch_post_cpu_init(void)
    99 {
    100 }
    101 
    102 void arch_pre_smp_init(void)
    103 {
    104 }
    105 
    106 void arch_post_smp_init(void)
     102void sparc32_post_smp_init(void)
    107103{
    108104        machine_input_init();
Note: See TracChangeset for help on using the changeset viewer.