From: David Daney <ddaney.cavm@gmail.com>
To: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Subject: Re: [PATCH] MIPS: asm: spinlock: Adjust arch_spin_lock back-off time
Date: Mon, 18 May 2015 13:51:46 -0700 [thread overview]
Message-ID: <555A50E2.2040802@gmail.com> (raw)
In-Reply-To: <1429523674-4335-1-git-send-email-markos.chandras@imgtec.com>
On 04/20/2015 02:54 AM, Markos Chandras wrote:
> Make it similar to the trylock and R10000_LLSC_WAR cases.
>
> Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
> ---
> I can't find a reference on why this was different compared to the other
> cases so I presume it was just an overlook in commit
> 2a31b03335e570dce5fdd082e0d71d48b2cb4290
I suspect you are correct. Although in practice, it doesn't matter.
We are doing a mask of the difference between the ticket and now serving
values. You would have to have more than 0x1fff (8191) CPUs in a system
to hit this limit.
That said, I think the patch is OK.
David Daney
> ---
> arch/mips/include/asm/spinlock.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/mips/include/asm/spinlock.h b/arch/mips/include/asm/spinlock.h
> index 1fca2e0793dc..cc771a21899d 100644
> --- a/arch/mips/include/asm/spinlock.h
> +++ b/arch/mips/include/asm/spinlock.h
> @@ -109,7 +109,7 @@ static inline void arch_spin_lock(arch_spinlock_t *lock)
> " subu %[ticket], %[my_ticket], %[ticket] \n"
> "2: \n"
> " .subsection 2 \n"
> - "4: andi %[ticket], %[ticket], 0x1fff \n"
> + "4: andi %[ticket], %[ticket], 0xffff \n"
> " sll %[ticket], 5 \n"
> " \n"
> "6: bnez %[ticket], 6b \n"
>
prev parent reply other threads:[~2015-05-18 20:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-20 9:54 [PATCH] MIPS: asm: spinlock: Adjust arch_spin_lock back-off time Markos Chandras
2015-04-20 9:54 ` Markos Chandras
2015-05-18 20:51 ` David Daney [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=555A50E2.2040802@gmail.com \
--to=ddaney.cavm@gmail.com \
--cc=linux-mips@linux-mips.org \
--cc=markos.chandras@imgtec.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox