Changeset eb79d60 in mainline for kernel/arch/sparc64/include


Ignore:
Timestamp:
2009-11-29T18:17:43Z (16 years ago)
Author:
Pavel Rimsky <pavel@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ba50a34
Parents:
3f35634c
Message:

Merged the preemptible trap handler for userspace.

Location:
kernel/arch/sparc64/include
Files:
3 added
4 edited

Legend:

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

    r3f35634c reb79d60  
    6464#endif
    6565
    66 typedef struct {
    67         uint32_t mid;                   /**< Processor ID as read from
    68                                              UPA_CONFIG/FIREPLANE_CONFIG. */
    69         ver_reg_t ver;
    70         uint32_t clock_frequency;       /**< Processor frequency in Hz. */
    71         uint64_t next_tick_cmpr;        /**< Next clock interrupt should be
    72                                              generated when the TICK register
    73                                              matches this value. */
    74 } cpu_arch_t;
    7566
     67#if defined (SUN4U)
     68#include <arch/sun4u/cpu.h>
     69#elif defined (SUN4V)
     70#include <arch/sun4v/cpu.h>
     71#endif
    7672
    77 /**
    78  * Reads the module ID (agent ID/CPUID) of the current CPU.
    79  */
    80 static inline uint32_t read_mid(void)
    81 {
    82         uint64_t icbus_config = asi_u64_read(ASI_ICBUS_CONFIG, 0);
    83         icbus_config = icbus_config >> ICBUS_CONFIG_MID_SHIFT;
    84 #if defined (US)
    85         return icbus_config & 0x1f;
    86 #elif defined (US3)
    87         if (((ver_reg_t) ver_read()).impl == IMPL_ULTRASPARCIII_I)
    88                 return icbus_config & 0x1f;
    89         else
    90                 return icbus_config & 0x3ff;
    91 #endif
    92 }
    9373
    9474#endif 
  • kernel/arch/sparc64/include/sun4u/cpu.h

    r3f35634c reb79d60  
    3333 */
    3434
    35 #ifndef KERN_sparc64_CPU_H_
    36 #define KERN_sparc64_CPU_H_
     35#ifndef KERN_sparc64_sun4u_CPU_H_
     36#define KERN_sparc64_sun4u_CPU_H_
    3737
    3838#define MANUF_FUJITSU           0x04
  • kernel/arch/sparc64/include/sun4v/cpu.h

    r3f35634c reb79d60  
    4646struct cpu;
    4747
     48/*
    4849typedef struct {
    4950        uint64_t exec_unit_id;
     
    5455        SPINLOCK_DECLARE(proposed_nrdy_lock);
    5556} exec_unit_t;
     57*/
    5658
    57 // MH
    58 #if 0
    5959typedef struct cpu_arch {
    6060        uint64_t id;                    /**< virtual processor ID */
     
    6363                                             generated when the TICK register
    6464                                             matches this value. */
    65         exec_unit_t *exec_unit;         /**< Physical core. */
    66         unsigned long proposed_nrdy;    /**< Proposed No. of ready threads
    67                                              so that cores are equally balanced. */
     65        //exec_unit_t *exec_unit;               /**< Physical core. */
     66        //unsigned long proposed_nrdy;  /**< Proposed No. of ready threads
     67        //                                   so that cores are equally balanced. */
    6868} cpu_arch_t;
    69 #endif
    7069
    7170#endif 
  • kernel/arch/sparc64/include/trap/regwin.h

    r3f35634c reb79d60  
    131131
    132132/*
    133  * Macro used to spill userspace window to userspace window buffer.
    134  * It can be either triggered from preemptible_handler doing SAVE
    135  * at (TL=1) or from normal kernel code doing SAVE when OTHERWIN>0
    136  * at (TL=0).
    137  */
    138 .macro SPILL_TO_USPACE_WINDOW_BUFFER
    139         stx %l0, [%g7 + L0_OFFSET]     
    140         stx %l1, [%g7 + L1_OFFSET]
    141         stx %l2, [%g7 + L2_OFFSET]
    142         stx %l3, [%g7 + L3_OFFSET]
    143         stx %l4, [%g7 + L4_OFFSET]
    144         stx %l5, [%g7 + L5_OFFSET]
    145         stx %l6, [%g7 + L6_OFFSET]
    146         stx %l7, [%g7 + L7_OFFSET]
    147         stx %i0, [%g7 + I0_OFFSET]
    148         stx %i1, [%g7 + I1_OFFSET]
    149         stx %i2, [%g7 + I2_OFFSET]
    150         stx %i3, [%g7 + I3_OFFSET]
    151         stx %i4, [%g7 + I4_OFFSET]
    152         stx %i5, [%g7 + I5_OFFSET]
    153         stx %i6, [%g7 + I6_OFFSET]
    154         stx %i7, [%g7 + I7_OFFSET]
    155         add %g7, STACK_WINDOW_SAVE_AREA_SIZE, %g7
    156         saved
    157         retry
    158 .endm
    159 
    160 
    161 /*
    162133 * Macro used by the nucleus and the primary context 0 during normal fills.
    163134 */
     
    232203#endif /* __ASM__ */
    233204
     205#if defined (SUN4U)
     206#include <arch/trap/sun4u/regwin.h>
     207#elif defined (SUN4V)
     208#include <arch/trap/sun4v/regwin.h>
    234209#endif
    235210
     211#endif
     212
    236213/** @}
    237214 */
Note: See TracChangeset for help on using the changeset viewer.