Changeset 7ce9284 in mainline for arch


Ignore:
Timestamp:
2005-08-30T17:41:19Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b45aa23
Parents:
10caad0
Message:

Dump implementation of THREAD, TASK and CPU.
Implement preemption-safe versions of THREAD, TASK and CPU using THE.
Get rid of CPU_ID_ARCH on all architectures.
Get rid of write_dr0() and read_dr0() on IA-32.
Get rid of cpu_private_data and cpu_private_data_t.

Location:
arch
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • arch/amd64/include/cpu.h

    r10caad0 r7ce9284  
    3636#include <arch/asm.h>
    3737
    38 #ifdef __SMP__
    39 #define CPU_ID_ARCH     (read_dr0())
    40 #else
    41 #define CPU_ID_ARCH     (0)
    42 #endif
    43 
    4438struct cpu_arch {
    4539        int vendor;
  • arch/ia32/include/asm.h

    r10caad0 r7ce9284  
    8484static inline __u32 read_cr3(void) { __u32 v; __asm__ volatile ("movl %%cr3,%0" : "=r" (v)); return v; }
    8585
    86 /** Write DR0
    87  *
    88  * Write value to DR0.
    89  *
    90  * @param v Value to be written.
    91  */
    92 static inline void write_dr0(__u32 v) { __asm__ volatile ("movl %0,%%dr0\n" : : "r" (v)); }
    93 
    94 /** Read DR0
    95  *
    96  * Return value in DR0
    97  *
    98  * @return Value read.
    99  */
    100 static inline __u32 read_dr0(void) { __u32 v; __asm__ volatile ("movl %%dr0,%0" : "=r" (v)); return v; }
    101 
    10286/** Set priority level low
    10387 *
  • arch/ia32/include/cpu.h

    r10caad0 r7ce9284  
    3434#include <arch/asm.h>
    3535
    36 #ifdef __SMP__
    37 #define CPU_ID_ARCH     (read_dr0())
    38 #else
    39 #define CPU_ID_ARCH     (0)
    40 #endif
    41 
    4236struct cpu_arch {
    4337        int vendor;
  • arch/ia32/src/ia32.c

    r10caad0 r7ce9284  
    5252        pm_init();
    5353
    54         write_dr0(config.cpu_active - 1);
    55 
    5654        if (config.cpu_active == 1) {
    5755                bios_init();
  • arch/ia64/include/cpu.h

    r10caad0 r7ce9284  
    3232#include <typedefs.h>
    3333
    34 #define CPU_ID_ARCH     0
    35 
    3634struct cpu_arch {
    3735};
  • arch/mips/include/cpu.h

    r10caad0 r7ce9284  
    3030#define __mips_CPU_H__
    3131
    32 #define CPU_ID_ARCH     0
    33 
    3432struct cpu_arch {
    3533        int imp_num;
  • arch/ppc/include/cpu.h

    r10caad0 r7ce9284  
    3232#include <typedefs.h>
    3333
    34 #define CPU_ID_ARCH     0
    35 
    3634struct cpu_arch {
    3735};
Note: See TracChangeset for help on using the changeset viewer.