Changeset cc106e4 in mainline
- Timestamp:
- 2012-11-07T18:44:33Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fc89e32
- Parents:
- 2708f6a
- Location:
- kernel
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/Makefile.inc
r2708f6a rcc106e4 101 101 ARCH_SOURCES += \ 102 102 arch/$(KARCH)/src/smp/$(USARCH)/smp.c \ 103 arch/$(KARCH)/src/smp/$(USARCH)/smp_call.c \ 103 104 arch/$(KARCH)/src/smp/$(USARCH)/ipi.c 104 105 endif -
kernel/arch/sparc64/include/interrupt.h
r2708f6a rcc106e4 47 47 48 48 enum { 49 IPI_TLB_SHOOTDOWN = VECTOR_TLB_SHOOTDOWN_IPI 49 IPI_TLB_SHOOTDOWN = VECTOR_TLB_SHOOTDOWN_IPI, 50 IPI_SMP_CALL 50 51 }; 51 52 -
kernel/arch/sparc64/src/debug/stacktrace.c
r2708f6a rcc106e4 36 36 #include <syscall/copy.h> 37 37 #include <typedefs.h> 38 #include <proc/thread.h> 38 39 39 40 #include <arch.h> -
kernel/arch/sparc64/src/smp/sun4u/ipi.c
r2708f6a rcc106e4 34 34 35 35 #include <smp/ipi.h> 36 #include <arch/smp/sun4u/ipi.h> 36 37 #include <cpu.h> 37 38 #include <arch.h> … … 40 41 #include <config.h> 41 42 #include <mm/tlb.h> 43 #include <smp/smp_call.h> 42 44 #include <arch/interrupt.h> 43 45 #include <arch/trap/interrupt.h> … … 171 173 } 172 174 175 176 /* 177 * Deliver an IPI to the specified processors (except the current one). 178 * 179 * Interrupts must be disabled. 180 * 181 * @param cpu_id Destination cpu id (index into cpus array). Must not 182 * be the current cpu. 183 * @param ipi IPI number. 184 */ 185 void ipi_unicast_arch(unsigned int cpu_id, int ipi) 186 { 187 ASSERT(&cpus[cpu_id] != CPU); 188 189 if (ipi == IPI_SMP_CALL) { 190 cross_call(cpus[cpu_id].arch.mid, smp_call_ipi_recv); 191 } else { 192 panic("Unknown IPI (%d).\n", ipi); 193 return; 194 } 195 } 196 173 197 /** @} 174 198 */ -
kernel/generic/include/synch/condvar.h
r2708f6a rcc106e4 51 51 _condvar_wait_timeout((cv), (mtx), (usec), SYNCH_FLAGS_NONE) 52 52 53 #ifdef CONFIG_SMP 54 #define _condvar_wait_timeout_spinlock(cv, lock, usec, flags) \ 55 _condvar_wait_timeout_spinlock_impl((cv), (lock), (usec), (flags)) 56 #else 57 #define _condvar_wait_timeout_spinlock(cv, lock, usec, flags) \ 58 _condvar_wait_timeout_spinlock_impl((cv), NULL, (usec), (flags)) 59 #endif 60 53 61 extern void condvar_initialize(condvar_t *cv); 54 62 extern void condvar_signal(condvar_t *cv); … … 56 64 extern int _condvar_wait_timeout(condvar_t *cv, mutex_t *mtx, uint32_t usec, 57 65 int flags); 58 extern int _condvar_wait_timeout_spinlock (condvar_t *cv, spinlock_t *lock,66 extern int _condvar_wait_timeout_spinlock_impl(condvar_t *cv, spinlock_t *lock, 59 67 uint32_t usec, int flags); 60 68 extern int _condvar_wait_timeout_irq_spinlock(condvar_t *cv, -
kernel/generic/include/synch/spinlock.h
r2708f6a rcc106e4 45 45 #ifdef CONFIG_SMP 46 46 47 typedef struct {47 typedef struct spinlock { 48 48 atomic_t val; 49 49 … … 162 162 /* On UP systems, spinlocks are effectively left out. */ 163 163 164 /* Allow the use of spinlock_t as an incomplete type. */ 165 typedef struct spinlock spinlock_t; 166 164 167 #define SPINLOCK_DECLARE(name) 165 168 #define SPINLOCK_EXTERN(name) … … 176 179 177 180 #define spinlock_lock(lock) preemption_disable() 178 #define spinlock_trylock(lock) ( preemption_disable(), 1)181 #define spinlock_trylock(lock) ({ preemption_disable(); 1; }) 179 182 #define spinlock_unlock(lock) preemption_enable() 180 183 #define spinlock_locked(lock) 1 -
kernel/generic/src/smp/smp_call.c
r2708f6a rcc106e4 131 131 /* 132 132 * If a platform supports SMP it must implement arch_smp_call_ipi(). 133 * It should issue an IPI an cpu_id and invoke smp_call_ipi_recv()133 * It should issue an IPI on cpu_id and invoke smp_call_ipi_recv() 134 134 * on cpu_id in turn. 135 135 * -
kernel/generic/src/synch/condvar.c
r2708f6a rcc106e4 120 120 * @return See comment for waitq_sleep_timeout(). 121 121 */ 122 int _condvar_wait_timeout_spinlock (condvar_t *cv, spinlock_t *lock,122 int _condvar_wait_timeout_spinlock_impl(condvar_t *cv, spinlock_t *lock, 123 123 uint32_t usec, int flags) 124 124 { -
kernel/generic/src/synch/rcu.c
r2708f6a rcc106e4 861 861 862 862 /* Wait for the GP to complete. */ 863 int ret = _condvar_wait_timeout_spinlock(&rcu.gp_ended, 864 &rcu.gp_lock,SYNCH_NO_TIMEOUT, SYNCH_FLAGS_INTERRUPTIBLE);863 int ret = _condvar_wait_timeout_spinlock(&rcu.gp_ended, &rcu.gp_lock, 864 SYNCH_NO_TIMEOUT, SYNCH_FLAGS_INTERRUPTIBLE); 865 865 866 866 if (ret == ESYNCH_INTERRUPTED) {
Note:
See TracChangeset
for help on using the changeset viewer.