Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: James Hogan <james.hogan@imgtec.com>
To: Markos Chandras <Markos.Chandras@imgtec.com>,
	<linux-mips@linux-mips.org>
Cc: <stable@vger.kernel.org>
Subject: Re: [PATCH 2/3] MIPS: HTW: Prevent accidental HTW start due to nested htw_{start,stop}
Date: Mon, 26 Jan 2015 12:03:50 +0000	[thread overview]
Message-ID: <54C62D26.80907@imgtec.com> (raw)
In-Reply-To: <54C62941.6060604@imgtec.com>

[-- Attachment #1: Type: text/plain, Size: 646 bytes --]

On 26/01/15 11:47, Markos Chandras wrote:
> On 01/26/2015 11:36 AM, James Hogan wrote:
> 
>>
>>> +		raw_current_cpu_data.htw_seq++;				\
>>
>> not "if (!raw_current_cpu_data.htw_seq++)) {"?
> Why?
> 
> on _stop() calls you just increment it. The _start() will do the right
> thing then.
> 
> I think what you suggest it to move the if() condition from the _start()
> to _stop().

I just mean you only need to disable htw the first time its called. I
guess the extra branch every time could be worse than the extra disable
and ehb when nesting does occur, so its probably premature optimisation.

Up to you.

Cheers
James


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: James Hogan <james.hogan@imgtec.com>
To: Markos Chandras <Markos.Chandras@imgtec.com>, linux-mips@linux-mips.org
Cc: stable@vger.kernel.org
Subject: Re: [PATCH 2/3] MIPS: HTW: Prevent accidental HTW start due to nested htw_{start,stop}
Date: Mon, 26 Jan 2015 12:03:50 +0000	[thread overview]
Message-ID: <54C62D26.80907@imgtec.com> (raw)
Message-ID: <20150126120350.ct0cd7GgD1QIW1ju86zQlg-uGW-KT3HZwuXByXZAq18@z> (raw)
In-Reply-To: <54C62941.6060604@imgtec.com>

[-- Attachment #1: Type: text/plain, Size: 646 bytes --]

On 26/01/15 11:47, Markos Chandras wrote:
> On 01/26/2015 11:36 AM, James Hogan wrote:
> 
>>
>>> +		raw_current_cpu_data.htw_seq++;				\
>>
>> not "if (!raw_current_cpu_data.htw_seq++)) {"?
> Why?
> 
> on _stop() calls you just increment it. The _start() will do the right
> thing then.
> 
> I think what you suggest it to move the if() condition from the _start()
> to _stop().

I just mean you only need to disable htw the first time its called. I
guess the extra branch every time could be worse than the extra disable
and ehb when nesting does occur, so its probably premature optimisation.

Up to you.

Cheers
James


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2015-01-26 12:04 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-26  9:40 [PATCH 0/3 3.19] HTW fixes Markos Chandras
2015-01-26  9:40 ` Markos Chandras
2015-01-26  9:40 ` [PATCH 1/3] MIPS: asm: pgtable: Add c0 hazards on HTW start/stop sequences Markos Chandras
2015-01-26  9:40   ` Markos Chandras
2015-01-26  9:40 ` [PATCH 2/3] MIPS: HTW: Prevent accidental HTW start due to nested htw_{start,stop} Markos Chandras
2015-01-26  9:40   ` Markos Chandras
2015-01-26 11:36   ` James Hogan
2015-01-26 11:36     ` James Hogan
2015-01-26 11:38     ` James Hogan
2015-01-26 11:38       ` James Hogan
2015-01-26 11:47     ` Markos Chandras
2015-01-26 11:47       ` Markos Chandras
2015-01-26 12:03       ` Markos Chandras
2015-01-26 12:03         ` Markos Chandras
2015-01-26 12:03       ` James Hogan [this message]
2015-01-26 12:03         ` James Hogan
2015-01-26 12:04         ` Markos Chandras
2015-01-26 12:04           ` Markos Chandras
2015-01-26 13:04   ` [PATCH v2 " Markos Chandras
2015-01-26 13:04     ` Markos Chandras
2015-01-26  9:40 ` [PATCH 3/3] MIPS: asm: pgtable: Prevent HTW race when updating PTEs Markos Chandras
2015-01-26  9:40   ` Markos Chandras

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=54C62D26.80907@imgtec.com \
    --to=james.hogan@imgtec.com \
    --cc=Markos.Chandras@imgtec.com \
    --cc=linux-mips@linux-mips.org \
    --cc=stable@vger.kernel.org \
    /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