Richard Henderson wrote:
> On Wed, Aug 04, 1999 at 08:04:23AM -0400, Peter Rival wrote:
<snip>
> > smp.c:48: section attribute not allowed for `bits'
>
> ... I didn't build an smp kernel. Doh! Yes, I use __cacheline_aligned
> on a structure element, which means the section attribute needs to
> come off the definition.
Okay...easy enough. Now the next fun part: (don't worry - it gets better
;)
make -C arch/alpha/kernel
make[1]: Entering directory `/usr/src/linux/arch/alpha/kernel'
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2
-fomit-frame-pointer -fno-strict-aliasing -D__SMP__ -pipe -mno-fp-regs
-ffixed-8 -c -o smp.o smp.c
smp.c: In function `flush_tlb_mm':
smp.c:874: structure has no member named `count'
smp.c: In function `flush_tlb_page':
smp.c:906: structure has no member named `count'
make[1]: *** [smp.o] Error 1
make[1]: Leaving directory `/usr/src/linux/arch/alpha/kernel'
make: *** [_dir_arch/alpha/kernel] Error 2
Which is caused by code such as this:
void
flush_tlb_mm(struct mm_struct *mm)
{
if (mm == current->mm) {
flush_tlb_current(mm);
if (atomic_read(&mm->mm_count) == 1)
return;
} else
flush_tlb_other(mm);
if (smp_call_function(ipi_flush_tlb_mm, mm, 1, 1)) {
printk(KERN_CRIT "flush_tlb_mm: timed out\n");
}
}
Looks like it hasn't been updated for the new struct mm_struct
implementation yet. I _think_ it's supposed to look something like this,
but I'm not sure:
void
flush_tlb_mm(struct mm_struct *mm)
{
if (mm == current->active_mm &&
atomic_read(&mm->mm_users) == 1 &&
(mm->cpu_vm_mask == (1UL << smp_processor_id())))
goto local_flush_tlb;
if (smp_call_function(ipi_flush_tlb_mm, mm, 1, 1)) {
printk(KERN_CRIT "flush_tlb_mm: timed out\n");
}
local_flush_tlb:
flush_tlb_other(mm);
}
(This was mostly stolen from the sparc64 version...I'm still digesting
Linus' message about how this new task schtuff works...I hate not being
able to work on Linux full time...*groan*)
I'd imagine the code is mostly the same type of transition for
flush_tlb_page, but I'm not positive.
- Pete
P.S. Should I mention that a mikasa (at least) wedges after the "freeing
initial memory" message under pre-4 plus this diff, or just keep that to
myself? ;)
--------------EA69057D972B879B96B47202
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
Richard Henderson wrote:
On Wed, Aug 04, 1999 at 08:04:23AM -0400, Peter Rival wrote:<snip>
> smp.c:48: section attribute not allowed for `bits'... I didn't build an smp kernel. Doh! Yes, I use __cacheline_aligned
on a structure element, which means the section attribute needs to
come off the definition.
Okay...easy enough. Now the next fun part: (don't worry
- it gets better ;)
make -C arch/alpha/kernel
make[1]: Entering directory `/usr/src/linux/arch/alpha/kernel'
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes
-O2 -fomit-frame-pointer -fno-strict-aliasing -D__SMP__ -pipe -mno-fp-regs
-ffixed-8 -c -o smp.o smp.c
smp.c: In function `flush_tlb_mm':
smp.c:874: structure has no member named `count'
smp.c: In function `flush_tlb_page':
smp.c:906: structure has no member named `count'
make[1]: *** [smp.o] Error 1
make[1]: Leaving directory `/usr/src/linux/arch/alpha/kernel'
make: *** [_dir_arch/alpha/kernel] Error 2
Which is caused by code such as this:
void
flush_tlb_mm(struct mm_struct *mm)
{
if (mm == current->mm)
{
flush_tlb_current(mm);
if (atomic_read(&mm->mm_count) == 1)
return;
} else
flush_tlb_other(mm);
if (smp_call_function(ipi_flush_tlb_mm,
mm, 1, 1)) {
printk(KERN_CRIT "flush_tlb_mm: timed out\n");
}
}
Looks like it hasn't been updated for the new struct mm_struct implementation yet. I _think_ it's supposed to look something like this, but I'm not sure:
void
flush_tlb_mm(struct mm_struct *mm)
{
if (mm == current->active_mm &&
atomic_read(&mm->mm_users)
== 1 &&
(mm->cpu_vm_mask ==
(1UL << smp_processor_id())))
goto local_flush_tlb;
if (smp_call_function(ipi_flush_tlb_mm, mm, 1,
1)) {
printk(KERN_CRIT "flush_tlb_mm: timed out\n");
}
local_flush_tlb:
flush_tlb_other(mm);
}
(This was mostly stolen from the sparc64 version...I'm still digesting Linus' message about how this new task schtuff works...I hate not being able to work on Linux full time...*groan*)
I'd imagine the code is mostly the same type of transition for flush_tlb_page, but I'm not positive.
- Pete
P.S. Should I mention that a mikasa (at least) wedges after the "freeing initial memory" message under pre-4 plus this diff, or just keep that to myself? ;) --------------EA69057D972B879B96B47202-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/