All of lore.kernel.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/6] arm64: Port SWP/SWPB emulation support from arm
Date: Tue, 26 Aug 2014 15:26:58 +0200	[thread overview]
Message-ID: <5600657.GfhaIFRH9n@wuerfel> (raw)
In-Reply-To: <20140826122542.GL23445@arm.com>

On Tuesday 26 August 2014 13:25:43 Will Deacon wrote:
> On Tue, Aug 26, 2014 at 12:32:23PM +0100, Arnd Bergmann wrote:
> > On Tuesday 26 August 2014 11:28:49 Punit Agrawal wrote:
> > > 
> > > This patch ports the alternative solution to emulate the SWP and SWPB
> > > instructions using LDXR/STXR sequences from the arm port to
> > > arm64. Additionaly, the patch also proivdes support to log the
> > > emulation statistics via debugfs.
> > 
> > I'm not sure that putting this into debugfs is a good idea in this
> > case: while in general that is considered a good place for this
> > kind of debugging information, we already have a precedent on arm32
> > for using procfs, and I see no reason to introduce an incompatible
> > interface for arm64.
> > 
> > You also add an interface for disabling the feature at runtime,
> > which we don't have on arm32, but that interface is not available
> > if debugfs is disabled or not mounted. Maybe a sysctl would be
> > more appropriate? That one could also be shared with arm32.
> 
> One advantage of using debugfs is that it provides a place to keep
> controls/statistics for any emulations that we add in the future, as opposed
> to littering them around in /proc or (worse) having a mixture of the two.

Yes, I understood that. I just had another idea: would it make sense to
use a tracepoint rather than a simple counter? That way you can actually
see who is using those instructions with ftrace.

You still wouldn't get the files in the same place as the enable switch
though. The easiest way to implement that switch btw would be a
module_param: It can be passed on the command line (using
swp_emulate.enable=0) or at runtime by writing to
/sys/module/swp_emulate/parameters/enable.

If we do both, there is no longer a need to have any debugfs file logic,
which is also a plus.

	Arnd

  reply	other threads:[~2014-08-26 13:26 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-26 10:28 [PATCH 0/6] Legacy instruction emulation for arm64 Punit Agrawal
2014-08-26 10:28 ` [PATCH 1/6] arm: Fix in-correct barrier usage in SWP{B} emulation Punit Agrawal
2014-08-26 13:04   ` Will Deacon
2014-08-27 16:40   ` Catalin Marinas
2014-08-27 17:05     ` Punit Agrawal
2014-08-26 10:28 ` [PATCH 2/6] arm64: Create arch debugfs directory Punit Agrawal
2014-08-26 10:28 ` [PATCH 3/6] arm64: Add support for hooks to handle undefined instructions Punit Agrawal
2014-08-26 13:13   ` Will Deacon
2014-08-26 14:21     ` Ard Biesheuvel
2014-08-26 14:30       ` Will Deacon
2014-08-27 16:47         ` Catalin Marinas
2014-08-27 16:51           ` Will Deacon
2014-08-26 14:56     ` Punit Agrawal
2014-08-26 18:14       ` Will Deacon
2014-08-27 16:58       ` Catalin Marinas
2014-08-26 10:28 ` [PATCH 4/6] arm64: Add AArch32 instruction set condition code checks Punit Agrawal
2014-08-26 10:28 ` [PATCH 5/6] arm64: Port SWP/SWPB emulation support from arm Punit Agrawal
2014-08-26 11:32   ` Arnd Bergmann
2014-08-26 12:25     ` Will Deacon
2014-08-26 13:26       ` Arnd Bergmann [this message]
2014-08-26 13:56         ` Will Deacon
2014-08-27 17:35           ` Punit Agrawal
2014-08-27 18:30             ` Arnd Bergmann
2014-08-28 10:21               ` Punit Agrawal
2014-08-27 17:29   ` Catalin Marinas
2014-08-26 10:28 ` [PATCH 6/6] arm64: Emulate CP15 Barrier instructions Punit Agrawal
2014-08-26 13:16   ` Will Deacon
2014-08-27 17:40   ` Catalin Marinas
2014-08-28  9:34     ` Punit Agrawal
2014-08-28  9:42       ` Catalin Marinas

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=5600657.GfhaIFRH9n@wuerfel \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.