Changeset 45b4300 in mainline


Ignore:
Timestamp:
2013-05-30T22:00:56Z (11 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2b903ca
Parents:
95e370f8
Message:

cstyle

Location:
kernel/arch/ia32
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/include/arch/cpu.h

    r95e370f8 r45b4300  
    4141#define EFLAGS_RF       (1 << 16)
    4242
    43 #define CR4_OSFXSR_MASK (1<<9)
     43#define CR4_OSFXSR_MASK      (1 << 9)
     44#define CR4_OSXMMEXCPT_MASK  (1 << 10)
    4445
    4546/* Support for SYSENTER and SYSEXIT */
     
    5960        unsigned int model;
    6061        unsigned int stepping;
    61         cpuid_feature_info fi;
    62 
     62        cpuid_feature_info_t fi;
     63       
    6364        tss_t *tss;
    6465       
  • kernel/arch/ia32/include/arch/cpuid.h

    r95e370f8 r45b4300  
    5050        uint32_t cpuid_ecx;
    5151        uint32_t cpuid_edx;
    52 } __attribute__ ((packed)) cpu_info_t;
     52} __attribute__((packed)) cpu_info_t;
    5353
    54 struct __cpuid_extended_feature_info {
    55         unsigned sse3 : 1;
    56         unsigned     : 31;
    57 } __attribute__ ((packed));
     54struct cpuid_extended_feature_info {
     55        unsigned int sse3 : 1;
     56        unsigned int : 31;
     57} __attribute__((packed));
    5858
    59 typedef union cpuid_extended_feature_info {
    60         struct __cpuid_extended_feature_info bits;
     59typedef union {
     60        struct cpuid_extended_feature_info bits;
    6161        uint32_t word;
    62 } cpuid_extended_feature_info;
     62} cpuid_extended_feature_info_t;
    6363
    64 struct __cpuid_feature_info {
    65         unsigned     : 11;
    66         unsigned sep  : 1;
    67         unsigned     : 11;
    68         unsigned mmx  : 1;
    69         unsigned fxsr : 1;
    70         unsigned sse  : 1;
    71         unsigned sse2 : 1;
    72         unsigned      : 5;
    73 } __attribute__ ((packed));
     64struct cpuid_feature_info {
     65        unsigned int : 11;
     66        unsigned int sep  : 1;
     67        unsigned int : 11;
     68        unsigned int mmx  : 1;
     69        unsigned int fxsr : 1;
     70        unsigned int sse  : 1;
     71        unsigned int sse2 : 1;
     72        unsigned int : 5;
     73} __attribute__((packed));
    7474
    75 typedef union cpuid_feature_info {
    76         struct __cpuid_feature_info bits;
     75typedef union {
     76        struct cpuid_feature_info bits;
    7777        uint32_t word;
    78 } cpuid_feature_info;
    79 
     78} cpuid_feature_info_t;
    8079
    8180static inline uint32_t has_cpuid(void)
    8281{
    83         uint32_t val, ret;
     82        uint32_t val;
     83        uint32_t ret;
    8484       
    8585        asm volatile (
  • kernel/arch/ia32/src/cpu/cpu.c

    r95e370f8 r45b4300  
    115115                        "mov %[help], %%cr4\n"
    116116                        : [help] "+r" (help)
    117                         : [mask] "i" (CR4_OSFXSR_MASK | (1 << 10))
     117                        : [mask] "i" (CR4_OSFXSR_MASK | CR4_OSXMMEXCPT_MASK)
    118118                );
    119119        }
    120 
     120       
    121121#ifndef PROCESSOR_i486
    122122        if (CPU->arch.fi.bits.sep) {
  • kernel/arch/ia32/src/fpu_context.c

    r95e370f8 r45b4300  
    2727 */
    2828
    29 /** @addtogroup ia32   
     29/** @addtogroup ia32
    3030 * @{
    3131 */
     
    3737#include <arch.h>
    3838#include <cpu.h>
    39 
    4039
    4140/** x87 FPU scr values (P3+ MMX2) */
     
    6059        X87_DENORMAL_EXC_FLAG = (1 << 1),
    6160        X87_INVALID_OP_EXC_FLAG = (1 << 0),
    62 
     61       
    6362        X87_ALL_MASK = X87_PRECISION_MASK | X87_UNDERFLOW_MASK | X87_OVERFLOW_MASK | X87_ZERO_DIV_MASK | X87_DENORMAL_OP_MASK | X87_INVALID_OP_MASK,
    6463};
    6564
    66 
    6765typedef void (*fpu_context_function)(fpu_context_t *fctx);
    6866
    69 static fpu_context_function fpu_save, fpu_restore;
     67static fpu_context_function fpu_save;
     68static fpu_context_function fpu_restore;
    7069
    7170static void fpu_context_f_save(fpu_context_t *fctx)
     
    104103void fpu_fxsr(void)
    105104{
    106         fpu_save=fpu_context_fx_save;
    107         fpu_restore=fpu_context_fx_restore;
     105        fpu_save = fpu_context_fx_save;
     106        fpu_restore = fpu_context_fx_restore;
    108107}
    109108
Note: See TracChangeset for help on using the changeset viewer.