Changeset 5f85c91 in mainline for generic/src


Ignore:
Timestamp:
2005-11-08T12:22:35Z (20 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
36a140b
Parents:
389f41e
Message:

make configuration variables usage consistent

Location:
generic/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • generic/src/cpu/cpu.c

    r389f41e r5f85c91  
    5050        int i, j;
    5151       
    52         #ifdef __SMP__
     52        #ifdef CONFIG_SMP
    5353        if (config.cpu_active == 1) {
    54         #endif /* __SMP__ */
     54        #endif /* CONFIG_SMP */
    5555                cpus = (cpu_t *) malloc(sizeof(cpu_t) * config.cpu_count);
    5656                if (!cpus)
     
    6767                        cpus[i].id = i;
    6868                       
    69                         #ifdef __SMP__
     69                        #ifdef CONFIG_SMP
    7070                        waitq_initialize(&cpus[i].kcpulb_wq);
    7171                        #endif /* __SMP */
     
    7676                }
    7777               
    78         #ifdef __SMP__
     78        #ifdef CONFIG_SMP
    7979        }
    80         #endif /* __SMP__ */
     80        #endif /* CONFIG_SMP */
    8181
    8282        CPU = &cpus[config.cpu_active-1];
  • generic/src/main/kinit.c

    r389f41e r5f85c91  
    4444#include <memstr.h>
    4545
    46 #ifdef __SMP__
     46#ifdef CONFIG_SMP
    4747#include <arch/smp/mps.h>
    48 #endif /* __SMP__ */
     48#endif /* CONFIG_SMP */
    4949
    5050#include <synch/waitq.h>
     
    6767        interrupts_disable();
    6868
    69 #ifdef __SMP__                 
     69#ifdef CONFIG_SMP                       
    7070        if (config.cpu_count > 1) {
    7171                /*
     
    8585                else panic("thread_create/kmp");
    8686        }
    87 #endif /* __SMP__ */
     87#endif /* CONFIG_SMP */
    8888        /*
    8989         * Now that all CPUs are up, we can report what we've found.
     
    9696        }
    9797
    98 #ifdef __SMP__
     98#ifdef CONFIG_SMP
    9999        if (config.cpu_count > 1) {
    100100                /*
     
    114114                }
    115115        }
    116 #endif /* __SMP__ */
     116#endif /* CONFIG_SMP */
    117117
    118118        interrupts_enable();
  • generic/src/main/main.c

    r389f41e r5f85c91  
    4040#include <align.h>
    4141
    42 #ifdef __SMP__
     42#ifdef CONFIG_SMP
    4343#include <arch/smp/apic.h>
    4444#include <arch/smp/mps.h>
    45 #endif /* __SMP__ */
     45#endif /* CONFIG_SMP */
    4646
    4747#include <smp/smp.h>
     
    203203
    204204
    205 #ifdef __SMP__
     205#ifdef CONFIG_SMP
    206206/** Application CPUs main kernel routine
    207207 *
     
    269269        /* not reached */
    270270}
    271 #endif /* __SMP__*/
     271#endif /* CONFIG_SMP */
  • generic/src/mm/tlb.c

    r389f41e r5f85c91  
    3737#include <arch.h>
    3838
    39 #ifdef __SMP__
     39#ifdef CONFIG_SMP
    4040static spinlock_t tlblock;
    4141#endif
     
    4949}
    5050
    51 #ifdef __SMP__
     51#ifdef CONFIG_SMP
    5252/* must be called with interrupts disabled */
    5353void tlb_shootdown_start(void)
     
    8585        CPU->tlb_active = 1;
    8686}
    87 #endif /* __SMP__ */
     87#endif /* CONFIG_SMP */
  • generic/src/proc/scheduler.c

    r389f41e r5f85c91  
    6262{
    6363        before_thread_runs_arch();
    64 #ifdef FPU_LAZY
     64#ifdef CONFIG_FPU_LAZY
    6565        if(THREAD==CPU->fpu_owner)
    6666                fpu_enable();
     
    7878}
    7979
    80 #ifdef FPU_LAZY
     80#ifdef CONFIG_FPU_LAZY
    8181void scheduler_fpu_lazy_request(void)
    8282{
     
    135135       
    136136        if (n == 0) {
    137                 #ifdef __SMP__
     137                #ifdef CONFIG_SMP
    138138                /*
    139139                 * If the load balancing thread is not running, wake it up and
     
    144144                        goto loop;
    145145                }
    146                 #endif /* __SMP__ */
     146                #endif /* CONFIG_SMP */
    147147               
    148148                /*
     
    413413        if (THREAD) {
    414414                spinlock_lock(&THREAD->lock);
    415 #ifndef FPU_LAZY
     415#ifndef CONFIG_FPU_LAZY
    416416                fpu_context_save(&(THREAD->saved_fpu_context));
    417417#endif
     
    463463
    464464
    465 #ifdef __SMP__
     465#ifdef CONFIG_SMP
    466466/** Load balancing thread
    467467 *
     
    624624}
    625625
    626 #endif /* __SMP__ */
     626#endif /* CONFIG_SMP */
  • generic/src/smp/ipi.c

    r389f41e r5f85c91  
    2727 */
    2828
    29 #ifdef __SMP__
     29#ifdef CONFIG_SMP
    3030
    3131#include <smp/ipi.h>
     
    4545         * Provisions must be made to avoid sending IPI:
    4646         * - before all CPU's were configured to accept the IPI
    47          * - if there is only one CPU but the kernel was compiled with __SMP__
     47         * - if there is only one CPU but the kernel was compiled with CONFIG_SMP
    4848         */
    4949
     
    5252}
    5353
    54 #endif /* __SMP__ */
     54#endif /* CONFIG_SMP */
  • generic/src/synch/spinlock.c

    r389f41e r5f85c91  
    3535#include <debug.h>
    3636
    37 #ifdef __SMP__
     37#ifdef CONFIG_SMP
    3838
    3939/** Initialize spinlock
     
    4848}
    4949
    50 #ifdef DEBUG_SPINLOCK
     50#ifdef CONFIG_DEBUG_SPINLOCK
    5151/** Lock spinlock
    5252 *
Note: See TracChangeset for help on using the changeset viewer.