Thread (37 messages) flat view 37 messages, 6 authors, 2016-03-10

Re: [v6,12/20] cxl: Add guest-specific code

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2016-03-09 05:55:33
Subsystem: char and misc drivers, the rest · Maintainers: Arnd Bergmann, Greg Kroah-Hartman, Linus Torvalds

On Fri, 2016-04-03 at 11:26:36 UTC, Frederic Barrat wrote:
From: Christophe Lombard <redacted>

The new of.c file contains code to parse the device tree to find out
about cxl adapters and AFUs.

guest.c implements the guest-specific callbacks for the backend API.
...
quoted hunk ↗ jump to hunk
diff --git a/drivers/misc/cxl/guest.c b/drivers/misc/cxl/guest.c
new file mode 100644
index 0000000..03eb83d
--- /dev/null
+++ b/drivers/misc/cxl/guest.c
@@ -0,0 +1,950 @@
...
+static int attach_afu_directed(struct cxl_context *ctx, u64 wed, u64 amr)
+{
...
+	disable_afu_irqs(ctx);
+
+	rc = cxl_h_attach_process(ctx->afu->guest->handle, elem,
+				&ctx->process_token, &mmio_addr, &mmio_size);
+	if (rc == H_SUCCESS) {
This breaks the SMP=n build:

  drivers/misc/cxl/guest.c: In function 'attach_afu_directed':
  drivers/misc/cxl/guest.c:572:12: error: 'H_SUCCESS' undeclared (first use in this function)
  drivers/misc/cxl/guest.c:572:12: note: each undeclared identifier is reported only once for each function it appears in


I've fixed it up with:
diff --git a/drivers/misc/cxl/hcalls.c b/drivers/misc/cxl/hcalls.c
index f01d4c012620..d6d11f4056d7 100644
--- a/drivers/misc/cxl/hcalls.c
+++ b/drivers/misc/cxl/hcalls.c
@@ -11,7 +11,6 @@
 #include <linux/compiler.h>
 #include <linux/types.h>
 #include <linux/delay.h>
-#include <asm/hvcall.h>
 #include <asm/byteorder.h>
 #include "hcalls.h"
 #include "trace.h"
diff --git a/drivers/misc/cxl/hcalls.h b/drivers/misc/cxl/hcalls.h
index 6bfab323578d..3e25522a5df6 100644
--- a/drivers/misc/cxl/hcalls.h
+++ b/drivers/misc/cxl/hcalls.h
@@ -12,6 +12,7 @@

 #include <linux/types.h>
 #include <asm/byteorder.h>
+#include <asm/hvcall.h>
 #include "cxl.h"

 #define SG_BUFFER_SIZE 4096

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