Skip to contentSkip to conversation

xen/arm: Remove unused helpers access_ok and array_access_ok

PATCH In review Julien Grall 2 participants 4 messages May 23, 2017 – Jun 6, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/arm: Remove unused helpers access_ok and array_access_ok

Both helpers access_ok and array_access_ok are not used on ARM. Remove them.

---
 xen/include/asm-arm/guest_access.h | 7 -------
 1 file changed, 7 deletions(-)
xen/include/asm-arm/guest_access.h +0 -7
index 421bca5f36..251e935597 100644
@@ -4,13 +4,6 @@
 #include <xen/guest_access.h>
 #include <xen/errno.h>
 
-/* Guests have their own comlete address space */
-#define access_ok(addr,size) (1)
-
-#define array_access_ok(addr,count,size) \
-    (likely((count) < (~0UL / (size))) && \
-     access_ok(addr, 0 + (count) * (size)))
-
 unsigned long raw_copy_to_guest(void *to, const void *from, unsigned len);
 unsigned long raw_copy_to_guest_flush_dcache(void *to, const void *from,
                                              unsigned len);
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Julien Grall

Both helpers access_ok and array_access_ok are not used on ARM. Remove them.

Quoted 25 lines
---
 xen/include/asm-arm/guest_access.h | 7 -------
 1 file changed, 7 deletions(-)
xen/include/asm-arm/guest_access.h +0 -7
index 421bca5f36..251e935597 100644
@@ -4,13 +4,6 @@
 #include <xen/guest_access.h>
 #include <xen/errno.h>
 
-/* Guests have their own comlete address space */
-#define access_ok(addr,size) (1)
-
-#define array_access_ok(addr,count,size) \
-    (likely((count) < (~0UL / (size))) && \
-     access_ok(addr, 0 + (count) * (size)))
-
 unsigned long raw_copy_to_guest(void *to, const void *from, unsigned len);
 unsigned long raw_copy_to_guest_flush_dcache(void *to, const void *from,
                                              unsigned len);
Signature · 1 line
2.11.0

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#2 lore raw

Hi Stefano,

Quoted 7 lines · Stefano Stabellini
Quoted 4 lines · Julien Grall

Both helpers access_ok and array_access_ok are not used on ARM. Remove them.

I don't see this patch in staging. Can you please apply it?

Cheers,

Quoted 26 lines
Quoted 26 lines
---
 xen/include/asm-arm/guest_access.h | 7 -------
 1 file changed, 7 deletions(-)
xen/include/asm-arm/guest_access.h +0 -8
index 421bca5f36..251e935597 100644
@@ -4,13 +4,6 @@
 #include <xen/guest_access.h>
 #include <xen/errno.h>
 
-/* Guests have their own comlete address space */
-#define access_ok(addr,size) (1)
-
-#define array_access_ok(addr,count,size) \
-    (likely((count) < (~0UL / (size))) && \
-     access_ok(addr, 0 + (count) * (size)))
-
 unsigned long raw_copy_to_guest(void *to, const void *from, unsigned len);
 unsigned long raw_copy_to_guest_flush_dcache(void *to, const void *from,
                                              unsigned len);
--

2.11.0

Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#3 lore raw
Quoted 4 lines · Julien Grall

Hi Stefano,

Quoted 1 line · Stefano Stabellini

On Tue, 23 May 2017, Julien Grall wrote:

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

Both helpers access_ok and array_access_ok are not used on ARM. Remove them.

I don't see this patch in staging. Can you please apply it?

Same here. It is committed now.

Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
---
 xen/include/asm-arm/guest_access.h | 7 -------
 1 file changed, 7 deletions(-)
xen/include/asm-arm/guest_access.h +0 -0
index 421bca5f36..251e935597 100644
@@ -4,13 +4,6 @@
 #include <xen/guest_access.h>
 #include <xen/errno.h>
 
Quoted 18 lines
Quoted 14 lines
Quoted 14 lines
xen/include/asm-arm/guest_access.h +0 -7
-/* Guests have their own comlete address space */
-#define access_ok(addr,size) (1)
-
-#define array_access_ok(addr,count,size) \
-    (likely((count) < (~0UL / (size))) && \
-     access_ok(addr, 0 + (count) * (size)))
-
 unsigned long raw_copy_to_guest(void *to, const void *from, unsigned
 len);
 unsigned long raw_copy_to_guest_flush_dcache(void *to, const void *from,
                                              unsigned len);

--
2.11.0

Signature · 1 line
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel