Changeset 5f85c91 in mainline


Ignore:
Timestamp:
2005-11-08T12:22:35Z (19 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

Files:
30 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r389f41e r5f85c91  
    6363endif
    6464ifeq ($(CONFIG_DEBUG_SPINLOCK),y)
    65         DEFS += -DDEBUG_SPINLOCK
     65        DEFS += -DCONFIG_DEBUG_SPINLOCK
    6666endif
    6767
  • arch/amd64/Makefile.inc

    r389f41e r5f85c91  
    6161
    6262ifeq ($(CONFIG_SMP),y)
    63         DEFS += -DSMP
     63        DEFS += -DCONFIG_SMP
    6464endif
    6565ifeq ($(CONFIG_HT),y)
    66         DEFS += -DHT
     66        DEFS += -DCONFIG_HT
    6767endif
    6868ifeq ($(CONFIG_FPU_LAZY),y)
    69         DEFS += -DFPU_LAZY
     69        DEFS += -DCONFIG_FPU_LAZY
    7070endif
    7171
  • arch/amd64/src/amd64.c

    r389f41e r5f85c91  
    7676                trap_register(VECTOR_SYSCALL, syscall);
    7777               
    78                 #ifdef __SMP__
     78                #ifdef CONFIG_SMP
    7979                trap_register(VECTOR_TLB_SHOOTDOWN_IPI, tlb_shootdown_ipi);
    8080                trap_register(VECTOR_WAKEUP_IPI, wakeup_ipi);
    81                 #endif /* __SMP__ */
     81                #endif /* CONFIG_SMP */
    8282        }
    8383}
     
    9595                memory_print_map();
    9696               
    97                 #ifdef __SMP__
     97                #ifdef CONFIG_SMP
    9898                acpi_init();
    99                 #endif /* __SMP__ */
     99                #endif /* CONFIG_SMP */
    100100        }
    101101}
  • arch/amd64/src/interrupt.c

    r389f41e r5f85c91  
    140140void nm_fault(__u8 n, __native stack[])
    141141{
    142 #ifdef FPU_LAZY     
     142#ifdef CONFIG_FPU_LAZY     
    143143        scheduler_fpu_lazy_request();
    144144#else
  • arch/amd64/src/smp/ap.S

    r389f41e r5f85c91  
    4040.section K_TEXT_START_2, "ax"
    4141
    42 #ifdef __SMP__
     42#ifdef CONFIG_SMP
    4343
    4444.global ap_boot
     
    101101       
    102102       
    103 #endif /* __SMP__ */
     103#endif /* CONFIG_SMP */
  • arch/ia32/Makefile.inc

    r389f41e r5f85c91  
    8080
    8181ifeq ($(CONFIG_SMP),y)
    82         DEFS += -DSMP
     82        DEFS += -DCONFIG_SMP
    8383endif
    8484ifeq ($(CONFIG_HT),y)
    85         DEFS += -DHT
     85        DEFS += -DCONFIG_HT
    8686endif
    8787ifeq ($(CONFIG_FPU_LAZY),y)
    88         DEFS += -DFPU_LAZY
     88        DEFS += -DCONFIG_FPU_LAZY
    8989endif
    9090
  • arch/ia32/include/atomic.h

    r389f41e r5f85c91  
    3333
    3434static inline void atomic_inc(volatile int *val) {
    35 #ifdef __SMP__
     35#ifdef CONFIG_SMP
    3636        __asm__ volatile ("lock incl %0\n" : "=m" (*val));
    3737#else
    3838        __asm__ volatile ("incl %0\n" : "=m" (*val));
    39 #endif /* __SMP__ */
     39#endif /* CONFIG_SMP */
    4040}
    4141
    4242static inline void atomic_dec(volatile int *val) {
    43 #ifdef __SMP__
     43#ifdef CONFIG_SMP
    4444        __asm__ volatile ("lock decl %0\n" : "=m" (*val));
    4545#else
    4646        __asm__ volatile ("decl %0\n" : "=m" (*val));
    47 #endif /* __SMP__ */
     47#endif /* CONFIG_SMP */
    4848}
    4949
  • arch/ia32/src/atomic.S

    r389f41e r5f85c91  
    2929.text
    3030
    31 #ifdef __SMP__
     31#ifdef CONFIG_SMP
    3232
    3333.global spinlock_arch
     
    4343
    44440:     
    45         #ifdef __HT__
     45        #ifdef CONFIG_HT
    4646        pause                   # Pentium 4's with HT love this instruction
    4747        #endif
  • arch/ia32/src/ia32.c

    r389f41e r5f85c91  
    6363                trap_register(VECTOR_SYSCALL, syscall);
    6464               
    65                 #ifdef __SMP__
     65                #ifdef CONFIG_SMP
    6666                trap_register(VECTOR_TLB_SHOOTDOWN_IPI, tlb_shootdown_ipi);
    6767                trap_register(VECTOR_WAKEUP_IPI, wakeup_ipi);
    68                 #endif /* __SMP__ */
     68                #endif /* CONFIG_SMP */
    6969        }
    7070}
     
    8282                memory_print_map();
    8383               
    84                 #ifdef __SMP__
     84                #ifdef CONFIG_SMP
    8585                acpi_init();
    86                 #endif /* __SMP__ */
     86                #endif /* CONFIG_SMP */
    8787        }
    8888}
  • arch/ia32/src/interrupt.c

    r389f41e r5f85c91  
    111111void nm_fault(__u8 n, __native stack[])
    112112{
    113 #ifdef FPU_LAZY     
     113#ifdef CONFIG_FPU_LAZY     
    114114        scheduler_fpu_lazy_request();
    115115#else
  • arch/ia32/src/smp/ap.S

    r389f41e r5f85c91  
    3333.section K_TEXT_START_2, "ax"
    3434
    35 #ifdef __SMP__
     35#ifdef CONFIG_SMP
    3636
    3737.global ap_boot
     
    7474        jmpl $KTEXT, $main_ap
    7575
    76 #endif /* __SMP__ */
     76#endif /* CONFIG_SMP */
  • arch/ia32/src/smp/apic.c

    r389f41e r5f85c91  
    3838#include <arch.h>
    3939
    40 #ifdef __SMP__
     40#ifdef CONFIG_SMP
    4141
    4242/*
     
    417417}
    418418
    419 #endif /* __SMP__ */
     419#endif /* CONFIG_SMP */
  • arch/ia32/src/smp/ipi.c

    r389f41e r5f85c91  
    2727 */
    2828
    29 #ifdef __SMP__
     29#ifdef CONFIG_SMP
    3030
    3131#include <smp/ipi.h>
     
    3737}
    3838
    39 #endif /* __SMP__ */
     39#endif /* CONFIG_SMP */
  • arch/ia32/src/smp/mps.c

    r389f41e r5f85c91  
    2727 */
    2828
    29 #ifdef __SMP__
     29#ifdef CONFIG_SMP
    3030
    3131#include <config.h>
     
    423423}
    424424
    425 #endif /* __SMP__ */
     425#endif /* CONFIG_SMP */
  • arch/ia32/src/smp/smp.c

    r389f41e r5f85c91  
    4848#include <arch/i8259.h>
    4949
    50 #ifdef __SMP__
     50#ifdef CONFIG_SMP
    5151
    5252static struct smp_config_operations *ops = NULL;
     
    166166}
    167167
    168 #endif /* __SMP__ */
     168#endif /* CONFIG_SMP */
  • arch/mips32/Makefile.inc

    r389f41e r5f85c91  
    103103
    104104ifeq ($(CONFIG_FPU_LAZY),y)
    105         DEFS += -DFPU_LAZY
     105        DEFS += -DCONFIG_FPU_LAZY
    106106endif
    107107
  • arch/mips32/src/exception.c

    r389f41e r5f85c91  
    7474                        break;
    7575                case EXC_CpU:
    76 #ifdef FPU_LAZY     
     76#ifdef CONFIG_FPU_LAZY     
    7777                        if (cp0_cause_coperr(cause) == fpu_cop_id)
    7878                                scheduler_fpu_lazy_request();
  • genarch/src/acpi/matd.c

    r389f41e r5f85c91  
    4343struct acpi_madt *acpi_madt = NULL;
    4444
    45 #ifdef __SMP__
     45#ifdef CONFIG_SMP
    4646
    4747static void madt_l_apic_entry(struct madt_l_apic *la, __u32 index);
     
    211211
    212212
    213 #endif /* __SMP__ */
     213#endif /* CONFIG_SMP */
  • generic/include/cpu.h

    r389f41e r5f85c91  
    5353        link_t timeout_active_head;
    5454
    55         #ifdef __SMP__
     55        #ifdef CONFIG_SMP
    5656        int kcpulbstarted;
    5757        waitq_t kcpulb_wq;
    58         #endif /* __SMP__ */
     58        #endif /* CONFIG_SMP */
    5959
    6060        int id;
  • generic/include/mm/tlb.h

    r389f41e r5f85c91  
    3434extern void tlb_init(void);
    3535
    36 #ifdef __SMP__
     36#ifdef CONFIG_SMP
    3737extern void tlb_shootdown_start(void);
    3838extern void tlb_shootdown_finalize(void);
     
    4242#  define tlb_shootdown_finalize()      ;
    4343#  define tlb_shootdown_ipi_recv() ;
    44 #endif /* __SMP__ */
     44#endif /* CONFIG_SMP */
    4545
    4646/* Export TLB interface that each architecture must implement. */
  • generic/include/smp/ipi.h

    r389f41e r5f85c91  
    3030#define __IPI_H__
    3131
    32 #ifdef __SMP__
     32#ifdef CONFIG_SMP
    3333extern void ipi_broadcast(int ipi);
    3434extern void ipi_broadcast_arch(int ipi);
    3535#else
    3636#define ipi_broadcast(x)        ;
    37 #endif /* __SMP__ */
     37#endif /* CONFIG_SMP */
    3838
    3939#endif
  • generic/include/smp/smp.h

    r389f41e r5f85c91  
    3030#define __SMP_H__
    3131
    32 #ifdef __SMP__
     32#ifdef CONFIG_SMP
    3333extern void smp_init(void);
    3434#else
    3535#define smp_init()      ;
    36 #endif /* __SMP__ */
     36#endif /* CONFIG_SMP */
    3737
    3838#endif /* __SMP_H__ */
  • generic/include/synch/spinlock.h

    r389f41e r5f85c91  
    3434#include <preemption.h>
    3535
    36 #ifdef __SMP__
     36#ifdef CONFIG_SMP
    3737struct spinlock {
    3838        int val;
  • 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.