[PATCH 1/6] staging: vc04_services: Convert dsb() to dsb(sy)

Michael Zoran mzoran at crowfest.net
Wed Oct 19 01:34:20 PDT 2016


>From 52cd77f62e2aabfc70c37533556c95b9d009f1ae Mon Sep 17 00:00:00 2001
From: Michael Zoran <mzoran at crowfest.net>
Date: Sun, 16 Oct 2016 11:59:40 -0700
Subject: [PATCH 1/6] staging: vc04_services: Convert dsb() to dsb(sy)

The dsb() macro for 32 arm compiles to dsb(sy) in the binary file.
This macro is no longer supported on arm64, so instead use dsb(sy)
which is completely binary compatible.

Signed-off-by: Michael Zoran <mzoran at crowfest.net>
---
 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 2
+-
 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c     | 2
+-
 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h     | 6
+++---
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git
a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
index ca1fee3..32d12e6 100644
---
a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
+++
b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
@@ -210,7 +210,7 @@ remote_event_signal(REMOTE_EVENT_T *event)
 
 	event->fired = 1;
 
-	dsb();         /* data barrier operation */
+	dsb(sy);         /* data barrier operation */
 
 	if (event->armed)
 		writel(0, g_regs + BELL2); /* trigger vc interrupt */
diff --git
a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
index 1254975..05954f9 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
@@ -419,7 +419,7 @@ remote_event_wait(REMOTE_EVENT_T *event)
 {
 	if (!event->fired) {
 		event->armed = 1;
-		dsb();
+		dsb(sy);
 		if (!event->fired) {
 			if (down_interruptible(event->event) != 0) {
 				event->armed = 0;
diff --git
a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
index 9be484c..9013bdb 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
@@ -184,11 +184,11 @@ enum {
 
 #define DEBUG_INITIALISE(local) int *debug_ptr = (local)->debug;
 #define DEBUG_TRACE(d) \
-	do { debug_ptr[DEBUG_ ## d] = __LINE__; dsb(); } while (0)
+	do { debug_ptr[DEBUG_ ## d] = __LINE__; dsb(sy); } while (0)
 #define DEBUG_VALUE(d, v) \
-	do { debug_ptr[DEBUG_ ## d] = (v); dsb(); } while (0)
+	do { debug_ptr[DEBUG_ ## d] = (v); dsb(sy); } while (0)
 #define DEBUG_COUNT(d) \
-	do { debug_ptr[DEBUG_ ## d]++; dsb(); } while (0)
+	do { debug_ptr[DEBUG_ ## d]++; dsb(sy); } while (0)
 
 #else /* VCHIQ_ENABLE_DEBUG */
 
-- 
2.9.3



More information about the linux-rpi-kernel mailing list