[PATCH 6/14] ps3: smp interrupt fixes

Geoff Levand geoffrey.levand at am.sony.com
Fri Jan 26 13:47:33 EST 2007


Arnd Bergmann wrote:
> On Thursday 25 January 2007 03:40, Geoff Levand wrote:
>> --- ps3-linux-dev.orig/arch/powerpc/platforms/ps3/interrupt.c
>> +++ ps3-linux-dev/arch/powerpc/platforms/ps3/interrupt.c
>> @@ -317,22 +317,23 @@ struct ps3_bmp {
>> ����������������unsigned long unused_1[3];
>> ����������������unsigned long mask;
>> ����������������unsigned long unused_2[3];
>> -�������} __attribute__ ((packed));
>> +�������} __attribute__ ((aligned (64)));
> 
> Is that meant to be a 64 _byte_ alignment? By default, it is
> already aligned to 64 bit.
> If 64 byte is some magic requirement by the hypervisor, you
> might want to make that explicit by using a constant definition
> for it.


The status + mask (512 bits) can't cross a page boundary, as required
by the HV.  That is the intent of the aligned (64) attribute.

Sorry, I don't quite understand what you mean by 'using a constant definition
for it'.  Could you elaborate?

As you suggested I have already changed this to:

struct ps3_bmp {
	struct {
		u64 status;
		u64 unused_1[3];
		u64 mask;
		u64 unused_2[3];
	};
	u64 ipi_debug_brk_mask;
	spinlock_t lock;
};

struct ps3_private {
	struct ps3_bmp bmp __attribute__ ((aligned (64)));
	u64 node;
	unsigned int cpu;
};


>> +�������cur_cpu_spec->cpu_features |= CPU_FTR_SMT;
>> 
> CPU_FTRS_CELL already contains CPU_FTR_SMT, why do you need to enable
> it explicitly?


Yes, I questioned whether that was needed or not.  I'll remove it.

-Geoff




More information about the Linuxppc-dev mailing list