Thread (21 messages) flat view 21 messages, 5 authors, 2014-08-27
STALE4407d

Revision v1 of 6 in this series.

Revisions (6)
  1. v1 [diff vs current]
  2. v1 current
  3. v1 [diff vs current]
  4. v1 [diff vs current]
  5. v1 [diff vs current]
  6. v5 [diff vs current]

[PATCH 5/6] arm64: Port SWP/SWPB emulation support from arm

From: arnd@arndb.de (Arnd Bergmann)
Date: 2014-08-26 11:32:23

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.
+       swp_d = debugfs_create_dir("swp_emulation", arch_debugfs_dir);
+       if (!IS_ERR_OR_NULL(swp_d)) {
Never use IS_ERR_OR_NULL(). It's enough to check for !swp_d here,
since debugfs_create_dir returns NULL on error. You don't need to
check for debugfs being disabled here because you don't do anything
in the conditional code block if it is disabled. 

	Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help