Re: [PATCH 2/2] parisc: add support for TOC (transfer of control)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Helge Deller <deller@xxxxxx> writes:

> On 10/9/21 23:38, Sven Schnelle wrote:
>> +	load32	PA(toc_stack),sp
>> +	/*
>> +	 * deposit CPU number into stack address,
>> +	 * so every CPU will have its own stack.
>> +	 */
>> +	depw	%r4,18,2,%sp
>
> Shouldn't this be 5 instead of 2, otherwise it limits it to 4 CPUs,
> while we currently can have up to 32 (see arch/parisc/Kconfig).
> e.g.:	depw	%r4,18,5,%sp
>
>> +
>> ...
>> +SYM_DATA(toc_handler_size, .long . - toc_handler)
>> +SYM_DATA(toc_lock, .long 1)
>> +
>> +	__PAGE_ALIGNED_BSS
>> +	.align 16384*NR_CPUS
>
> ^ This align is too big, esp. since NR_CPUS can be 32.
> At minimum a stack needs to be 64-byte aligned.
> I think a simple .align 64 here, and changing the multiplication
> above with adding the offset is better.

The .align was a quick way to test the stack offset, but i agree that
doing a regular add is the better way. Also i missed to align toc_lock
at a 16 byte boundary.



[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux