[parisc-linux-cvs] linux-2.6 tausq

Joel Soete soete.joel at tiscali.be
Fri Jul 16 09:40:17 MDT 2004


 Randolph,
> 
> >
> > > 2.6.7-pa15
> > > - remove nosmp and maxcpus handling in arch/parisc/kernel/smp.c, it
> is
> > > handled by generic code
> > > - hook up processor_probe() to bring up slave cpus
> > > - don't assign irqs to CPUs that are not yet online
> > >
> > > On a a500, boots with either one cpu (one disabled in PDC), or with
> > > 2 CPUs enabled, and nosmp. However, with full smp enabled, the machine
> > > will HPMC when the 2nd CPU is brought online.
> >
> > Thanks to Grant for pointing out the problems with IRQs being
> > assigned to the wrong CPU :)
> >
> I just get cvs and choose n4000_defconfig to test your last pacth on the
> n4k but I failled with:
> hppa64-linux-gcc -Wp,-MD,arch/parisc/kernel/.processor.o.d -nostdinc -iwithprefix
> include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs
> -fno-strict-aliasing -fno-common -pipe -mno-space-regs -mfast-indirect-calls
> -mdisable-fpregs -ffunction-sections -march=2.0 -mschedule=8000 -O2 -fomit-frame-pointer
> -Wdeclaration-after-statement    -DKBUILD_BASENAME=processor -DKBUILD_MODNAME=processor
> -c -o arch/parisc/kernel/processor. arch/parisc/kernel/processor.c
> arch/parisc/kernel/processor.c: In function `processor_probe':
> arch/parisc/kernel/processor.c:197: invalid lvalue in assignment
> arch/parisc/kernel/processor.c:198: warning: implicit declaration of function
> `cpu_up'
> 
> certainly a missing header somewhere but I don't reach to find a fix :(

No sorry, I get a bit more analyse:

The code being (in processor.c):
        /*
         * Bring this CPU up now! (ignore bootstrap cpuid == 0)
         */
        if (cpuid) {
                cpu_set(cpuid, cpu_present_map);
                cpu_up(cpuid);
        }


in SMP it's preprocessed as:

# 196 "arch/parisc/kernel/processor.c"
        if (cpuid) {
                set_bit(cpuid, &(cpu_present_map));
                cpu_up(cpuid);
        }

thanks to:
asm-generic/cpumask_arith.h

#define cpu_set(cpu, map)               set_bit(cpu, &(map))


OTC in UP

it's:

# 196 "arch/parisc/kernel/processor.c"
        if (cpuid) {
                do { (void)(cpuid); (((void)(0), ({ cpumask_t __tmp__; (__tmp__)
= 1; __tmp__; }))) = 1UL; } while (0);
                cpu_up(cpuid);
        }

asm-generic/cpumask_up.h

#define cpus_coerce(map)        (map)

#define cpu_set(cpu, map)               do { (void)(cpu); cpus_coerce(map)
= 1UL; } while (0)

There I don't undrestand how 'cpus_coerce(map)' becomes { cpumask_t __tmp__;
(__tmp__) = 1; __tmp__; }?

hth,
    Joel


---------------------------------------------------------------------------
Tiscali ADSL LIGHT, 19,95 EUR/mois pendant 6 mois, c'est le moment de faire
le pas!
http://reg.tiscali.be/default.asp?lg=fr






More information about the parisc-linux-cvs mailing list