[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130614131133.GA21005@linux-mips.org>
Date: Fri, 14 Jun 2013 15:11:33 +0200
From: Ralf Baechle <ralf@...ux-mips.org>
To: James Hogan <james.hogan@...tec.com>
Cc: linux-mips@...ux-mips.org, kvm@...r.kernel.org,
Sanjay Lal <sanjayl@...asys.com>, linux-kernel@...r.kernel.org,
David Daney <ddaney@...iumnetworks.com>
Subject: Re: [PATCH 01/31] MIPS: Move allocate_kscratch to cpu-probe.c and
make it public.
On Fri, Jun 14, 2013 at 01:41:18PM +0200, Ralf Baechle wrote:
> Date: Fri, 14 Jun 2013 13:41:18 +0200
> From: Ralf Baechle <ralf@...ux-mips.org>
> To: James Hogan <james.hogan@...tec.com>
> Cc: linux-mips@...ux-mips.org, kvm@...r.kernel.org, Sanjay Lal
> <sanjayl@...asys.com>, linux-kernel@...r.kernel.org, David Daney
> <ddaney@...iumnetworks.com>
> Subject: Re: [PATCH 01/31] MIPS: Move allocate_kscratch to cpu-probe.c and
> make it public.
> Content-Type: text/plain; charset=us-ascii
>
> On Fri, Jun 07, 2013 at 04:03:05PM -0700, David Daney wrote:
> > Date: Fri, 7 Jun 2013 16:03:05 -0700
> > From: David Daney <ddaney.cavm@...il.com>
> > To: linux-mips@...ux-mips.org, ralf@...ux-mips.org, kvm@...r.kernel.org,
> > Sanjay Lal <sanjayl@...asys.com>
> > Cc: linux-kernel@...r.kernel.org, David Daney <ddaney@...iumnetworks.com>
> > Subject: [PATCH 01/31] MIPS: Move allocate_kscratch to cpu-probe.c and make
> > it public.
> >
> > From: David Daney <ddaney@...iumnetworks.com>
>
> I'd just like to add a note about compatibility. Code optimized for
> LL/SC-less CPUs has made use of the fact that exception handlers will
> clobber k0/k1 to a non-zero value. On a MIPS II or better CPU a branch
> likely instruction could be used to atomically test k0/k1 and depending
> on the test, execute a store instruction like:
>
> .set noreorder
> beqzl $k0, ok
> sw $reg, offset($reg)
> /* if we get here, our SC emulation has failed */
> ok: ...
>
> In particular Sony had elected to do this for the R5900 (after I explained
> the concept to somebody and told it'd be a _bad_ idea for compatibility
> reasons). Bad ideas are infectious so I'm sure others have used it, too.
>
> I don't think this should stop your patch nor should we unless this turns
> out to be an actual problem add any kludges to support such cowboy style
> hacks. But I wanted to mention and document the issue; maybe this should
> be mentioned in the log message of the next version of this patch.
>
> Acked-by: Ralf Baechle <ralf@...ux-mips.org>
Bleh. I fatfingered mutt. This of course was the reply intended for
"[PATCH 02/31] MIPS: Save and restore K0/K1 when CONFIG_KVM_MIPSVZ".
As for 1/31:
Acked-by: Ralf Baechle <ralf@...ux-mips.org>
Ralf
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists