root/include/asm-alpha/processor.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


DEFINITIONS

This source file includes following definitions.
  1. start_bh_atomic
  2. end_bh_atomic

   1 /*
   2  * include/asm-alpha/processor.h
   3  *
   4  * Copyright (C) 1994 Linus Torvalds
   5  */
   6 
   7 #ifndef __ASM_ALPHA_PROCESSOR_H
   8 #define __ASM_ALPHA_PROCESSOR_H
   9 
  10 /*
  11  * We have a 8GB user address space to start with: 33 bits of vm
  12  * can be handled with just 2 page table levels.
  13  *
  14  * Eventually, this should be bumped to 40 bits or so..
  15  */
  16 #define TASK_SIZE (0x200000000UL)
  17 
  18 /*
  19  * Bus types
  20  */
  21 extern int EISA_bus;
  22 #define MCA_bus 0
  23 
  24 struct thread_struct {
  25         unsigned long ksp;
  26         unsigned long usp;
  27         unsigned long ptbr;
  28         unsigned int pcc;
  29         unsigned int asn;
  30         unsigned long unique;
  31         unsigned long flags;
  32         unsigned long res1, res2;
  33 };
  34 
  35 #define INIT_TSS  { \
  36         0, 0, 0, \
  37         0, 0, 0, \
  38         0, 0, 0, \
  39 }
  40 
  41 /*
  42  * These are the "cli()" and "sti()" for software interrupts
  43  * They work by increasing/decreasing the "intr_count" value, 
  44  * and as such can be nested arbitrarily.
  45  */
  46 extern inline void start_bh_atomic(void)
     /* [previous][next][first][last][top][bottom][index][help] */
  47 {
  48         unsigned long dummy;
  49         __asm__ __volatile__(
  50                 "\n1:\t"
  51                 "ldq_l %0,%1\n\t"
  52                 "addq %0,1,%0\n\t"
  53                 "stq_c %0,%1\n\t"
  54                 "beq %0,1b\n"
  55                 : "=r" (dummy), "=m" (intr_count)
  56                 : "0" (0));
  57 }
  58 
  59 extern inline void end_bh_atomic(void)
     /* [previous][next][first][last][top][bottom][index][help] */
  60 {
  61         unsigned long dummy;
  62         __asm__ __volatile__(
  63                 "\n1:\t"
  64                 "ldq_l %0,%1\n\t"
  65                 "subq %0,1,%0\n\t"
  66                 "stq_c %0,%1\n\t"
  67                 "beq %0,1b\n"
  68                 : "=r" (dummy), "=m" (intr_count)
  69                 : "0" (0));
  70 }
  71 
  72 #endif /* __ASM_ALPHA_PROCESSOR_H */

/* [previous][next][first][last][top][bottom][index][help] */