Changeset e4ddfa8 in mainline
- Timestamp:
- 2006-03-14T19:06:16Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1065603e
- Parents:
- edc89bd
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ppc32/include/atomic.h
redc89bd re4ddfa8 34 34 typedef struct { volatile __u32 count; } atomic_t; 35 35 36 /* 37 * TODO: these are just placeholders for real implementations of atomic_inc and atomic_dec. 38 * WARNING: the following functions cause the code to be preemption-unsafe !!! 39 */ 36 static inline void atomic_inc(atomic_t *val) { 37 __u32 tmp; 40 38 41 static inline void atomic_inc(atomic_t *val) { 42 val->count++; 39 asm __volatile__ ( 40 "1:\n" 41 "lwarx %0, 0, %2\n" 42 "addic %0, %0, 1\n" 43 "stwcx. %0, 0, %2\n" 44 "bne- 1b" 45 : "=&r" (tmp), "=m" (val->count) 46 : "r" (&val->count), "m" (val->count) 47 : "cc"); 43 48 } 44 49 45 50 static inline void atomic_dec(atomic_t *val) { 46 val->count--; 51 __u32 tmp; 52 53 asm __volatile__( 54 "1:\n" 55 "lwarx %0, 0, %2\n" 56 "addic %0, %0, -1\n" 57 "stwcx. %0, 0, %2\n" 58 "bne- 1b" 59 : "=&r" (tmp), "=m" (val->count) 60 : "r" (&val->count), "m" (val->count) 61 : "cc"); 47 62 } 48 63 -
arch/ppc32/include/barrier.h
redc89bd re4ddfa8 33 33 #define CS_LEAVE_BARRIER() __asm__ volatile ("" ::: "memory") 34 34 35 #define memory_barrier() 36 #define read_barrier() 37 #define write_barrier() 35 #define memory_barrier() __asm__ volatile ("sync" ::: "memory") 36 #define read_barrier() __asm__ volatile ("sync" ::: "memory") 37 #define write_barrier() __asm__ volatile ("eieio" ::: "memory") 38 38 39 39 #endif -
arch/ppc32/include/boot/boot.h
redc89bd re4ddfa8 32 32 #define BOOT_OFFSET 0x2000 33 33 34 /* Temporary stack size for boot process */ 35 #define TEMP_STACK_SIZE 0x100 36 34 37 #endif -
arch/ppc32/include/context.h
redc89bd re4ddfa8 34 34 #endif 35 35 36 #define SP_DELTA 436 #define SP_DELTA 8 37 37 38 38 struct context { -
arch/ppc32/include/drivers/cuda.h
redc89bd re4ddfa8 31 31 32 32 33 void cuda_init(void); 34 35 33 36 #endif -
arch/ppc32/src/boot/boot.S
redc89bd re4ddfa8 36 36 .global kernel_image_start 37 37 kernel_image_start: 38 39 # load temporary stack 40 41 lis sp, end_stack@ha 42 addi sp, sp, end_stack@l 38 43 39 44 # r10 contains physical address to memmap_t … … 70 75 71 76 b main_bsp 77 78 .section K_DATA_START, "aw", @progbits 79 80 .space TEMP_STACK_SIZE 81 end_stack: -
arch/ppc32/src/drivers/cuda.c
redc89bd re4ddfa8 49 49 50 50 51 void cuda_init(void) 52 { 53 } 54 55 51 56 static void cuda_packet(const __u8 data) 52 57 { -
arch/ppc32/src/exception.S
redc89bd re4ddfa8 85 85 .global exc_decrementer 86 86 exc_decrementer: 87 rfi 87 88 b exc_decrementer 88 89 -
arch/ppc32/src/ppc32.c
redc89bd re4ddfa8 29 29 #include <arch.h> 30 30 #include <arch/console.h> 31 31 #include <arch/drivers/cuda.h> 32 32 #include <arch/mm/memory_init.h> 33 33 … … 35 35 { 36 36 ppc32_console_init(); 37 cuda_init(); 37 38 } 38 39 -
generic/src/console/chardev.c
redc89bd re4ddfa8 56 56 void chardev_push_character(chardev_t *chardev, __u8 ch) 57 57 { 58 58 spinlock_lock(&chardev->lock); 59 59 chardev->counter++; 60 60 if (chardev->counter == CHARDEV_BUFLEN - 1) { … … 62 62 chardev->op->suspend(chardev); 63 63 } 64 65 66 67 68 64 65 chardev->buffer[chardev->index++] = ch; 66 chardev->index = chardev->index % CHARDEV_BUFLEN; /* index modulo size of buffer */ 67 waitq_wakeup(&chardev->wq, WAKEUP_FIRST); 68 spinlock_unlock(&chardev->lock); 69 69 }
Note:
See TracChangeset
for help on using the changeset viewer.