linux-old/include/asm-x86_64/bugs.h
<<
>>
Prefs
   1/*
   2 *  include/asm-x86_64/bugs.h
   3 *
   4 *  Copyright (C) 1994  Linus Torvalds
   5 *  Copyright (C) 2000  SuSE
   6 *
   7 * This is included by init/main.c to check for architecture-dependent bugs.
   8 *
   9 * Needs:
  10 *      void check_bugs(void);
  11 */
  12
  13#include <linux/config.h>
  14#include <asm/processor.h>
  15#include <asm/i387.h>
  16#include <asm/msr.h>
  17#include <asm/pda.h>
  18
  19static inline void check_fpu(void)
  20{
  21        extern void __bad_fxsave_alignment(void);
  22        if (offsetof(struct task_struct, thread.i387.fxsave) & 15)
  23                __bad_fxsave_alignment();
  24
  25        /* This should not be here */   
  26        set_in_cr4(X86_CR4_OSFXSR);
  27        set_in_cr4(X86_CR4_OSXMMEXCPT);
  28}
  29
  30static void __init check_bugs(void)
  31{
  32        identify_cpu(&boot_cpu_data);
  33        check_fpu();
  34}
  35
lxr.linux.no kindly hosted by Redpill Linpro AS, provider of Linux consulting and operations services since 1995.