On Sun, 5 Dec 1999, Richard Henderson wrote:
>You did this for the Contaq? This wasn't necessary. We do have code
>to properly init the bridge now -- that's what pcibios_assign_special does.
pcibios_assign_special _only_ deals with pci base address. Without the
quirk added in the pci_fixup_irq stuff all the irqs of the contaq gets set
to 0 here.
>> static struct {
>> - unsigned long bits __cacheline_aligned;
>> -} ipi_data[NR_CPUS];
>> + unsigned long bits ____cacheline_aligned;
>> +} ipi_data[NR_CPUS] __cacheline_aligned;
>
>One or the other is sufficient. No need to align both.
____cacheline_aligned make sure that the struct is large a multiple of
32bytes.
__cacheline_aligned make sure the struct will start in an aligned
boundary.
If you remove the first it make no sense to alloc the struct in an aligned
boundary and depending on the number of CPUs you may break the
.data.cacheline_aligned section. So if you use the second you must use
also the first.
If you remove the only the second the first cacheline could be not local
to the cpu.
>> diff -urN 2.3.30pre6/include/asm-alpha/hw_irq.h a/include/asm-alpha/hw_irq.h
>> --- 2.3.30pre6/include/asm-alpha/hw_irq.h Thu Jan 1 01:00:00 1970
>> +++ a/include/asm-alpha/hw_irq.h Sun Dec 5 15:38:27 1999
>> @@ -0,0 +1,91 @@
>> +#ifndef _ALPHA_HW_IRQ_H
>> +#define _ALPHA_HW_IRQ_H
>
>What was the point of moving this file from arch/alpha/kernel/irq_impl.h?
Because I am putting in sync the alpha port with the i386 port.
arch/i386/kernel/irq.c is almost the same of arch/alpha/kernel/irq.c in my
current devel tree. I am going to use the _plain_ (completly cut and
pasted) request_irq()/free_irq()/probe_irq*()/disable_irq*()/enable_irq()
of the i386 port. I am sharing the irq_desc_t data structure in
include/linux/irq.h.
>Yes, there is an include/asm-i386/hw_irq.h, but so what? This is not
>something that the rest of the kernel can even remotely use.
If you want to use include/linux/irq.h you should implement hw_irq.h and
so I did. I am only going in the i386 way (that puts the very arch stuff
in asm-i386 instead of arch/i386/kernel) that is the mainstream linux way
as far I can tell.
>> +#define __cacheline_aligned \
>> + __attribute__((__aligned__(SMP_CACHE_BYTES), \
>> + __section__(".data.cacheline_aligned")))
>
>You can't use this on Alpha without modifying the link script.
It's just modifyed as far I can tell:
andrea@alpha:~/kernel/2.3.30pre6-alpha > grep cacheline arch/alpha/vmlinux.lds
.data.cacheline_aligned : { *(.data.cacheline_aligned) }
andrea@alpha:~/kernel/2.3.30pre6-alpha > grep -C irq_desc System.map
fffffc000049c000 A __init_end
fffffc00004a0000 A _data
fffffc00004a0000 D irq_desc
fffffc00004a1000 d ipi_data
fffffc00004a1400 d aligned_data
andrea@alpha:~/kernel/2.3.30pre6-alpha > objdump -d -j
.data.cacheline_aligned vmlinux
vmlinux: file format elf64-alpha
Disassembly of section .data.cacheline_aligned:
fffffc00004a0000 <irq_desc>:
...
fffffc00004a1000 <ipi_data>:
...
fffffc00004a1400 <aligned_data>:
fffffc00004a1400: 00 c0 49 00 00 fc ff ff 00 00 00 00 00 00 00 00
..I.............
...
andrea@alpha:~/kernel/2.3.30pre6-alpha >
Andrea