powerpc/powernv: Add invalid OPAL call
authorJoel Stanley <joel@jms.id.au>
Tue, 1 Apr 2014 03:58:20 +0000 (14:28 +1030)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 9 Apr 2014 02:53:23 +0000 (12:53 +1000)
This call will not be understood by OPAL, and cause it to add an error
to it's log. Among other things, this is useful for testing the
behaviour of the log as it fills up.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/opal.h
arch/powerpc/platforms/powernv/opal-wrappers.S
arch/powerpc/platforms/powernv/opal.c

index 05f9455615d641f0d6b7093cbd40cb5e0b504179..6bd3b183cd63230562ebd4f45c31b55ef7572041 100644 (file)
@@ -87,6 +87,7 @@ extern int opal_enter_rtas(struct rtas_args *args,
 #define OPAL_ASYNC_COMPLETION  -15
 
 /* API Tokens (in r0) */
+#define OPAL_INVALID_CALL                      -1
 #define OPAL_CONSOLE_WRITE                     1
 #define OPAL_CONSOLE_READ                      2
 #define OPAL_RTC_READ                          3
@@ -734,6 +735,7 @@ extern struct kobject *opal_kobj;
 extern struct device_node *opal_node;
 
 /* API functions */
+int64_t opal_invalid_call(void);
 int64_t opal_console_write(int64_t term_number, __be64 *length,
                           const uint8_t *buffer);
 int64_t opal_console_read(int64_t term_number, __be64 *length,
index bb90f9a4e0270be18a63a4126841fe81ff84cb12..f531ffe35b3e052e870c5359619165e7bb5f0421 100644 (file)
@@ -61,6 +61,7 @@ _STATIC(opal_return)
        mtcr    r4;
        rfid
 
+OPAL_CALL(opal_invalid_call,                   OPAL_INVALID_CALL);
 OPAL_CALL(opal_console_write,                  OPAL_CONSOLE_WRITE);
 OPAL_CALL(opal_console_read,                   OPAL_CONSOLE_READ);
 OPAL_CALL(opal_console_write_buffer_space,     OPAL_CONSOLE_WRITE_BUFFER_SPACE);
index 99e9c2887e21d4be2b1a90d41eaef583e51d5524..49d2f00019e5d8092f7f32e9b3c6dfc53cceeee6 100644 (file)
@@ -635,3 +635,6 @@ void opal_shutdown(void)
                        mdelay(10);
        }
 }
+
+/* Export this so that test modules can use it */
+EXPORT_SYMBOL_GPL(opal_invalid_call);