From patchwork Tue Apr 1 03:58:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 335660 X-Patchwork-Delegate: benh@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id 8559A141497 for ; Tue, 1 Apr 2014 15:02:00 +1100 (EST) Received: from mail-pa0-x22d.google.com (mail-pa0-x22d.google.com [IPv6:2607:f8b0:400e:c03::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 6BD9F140166 for ; Tue, 1 Apr 2014 15:00:06 +1100 (EST) Received: by mail-pa0-f45.google.com with SMTP id kl14so9191750pab.18 for ; Mon, 31 Mar 2014 21:00:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jms.id.au; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ET5QYVBXaKFvrV4Y1OjH/lPL/wi7yTXJhXnQUCSTsa4=; b=WIj0uvf7FP7lF1Bq+Nc1f/fY4pZ9XtnjbEtfE6uBnbU/3Z76TX1hsAPx8SkF4JFWtu f9l5/aNuO1EKAEvig6jfBIxlOLMDpSyNt8Sseo7C32lOOUbsDz8oidLez/EXEFENK3ow hvoIVYrA3UXopBlEW+X/ZRxrdZc/GGlgK8mNs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ET5QYVBXaKFvrV4Y1OjH/lPL/wi7yTXJhXnQUCSTsa4=; b=fbV4q/QhjMMTzSLkIvw3qwg6t216k8/0zwtNsru9rocSsLntrrEXa8yJokWEA7pu7X x9wuJMBaCQfhl///TXXwYYqnZQe/zXwQhJYz+9Yvmvi5mqjsdQ+TRCYrwQWeGhbqjR8P 4/Ln7+3Gmfykct/KbyTenGveF84dbcoBZNzGAekKQpNBGidnsJgI+ZZAirWNJvd3h3Pq AiyLAZo3q1jlNA+9LOA93vIafD/G3O2JsxYIkTN3buZ3maDaQDIWPKxckLGhvHVc/WdM HEYdwfCXRGj5KMtIgAdsuUN7qW8o4nnTNo2pmLXSWjuaAzH4pfvabWWAlHtyZ+LAKwWP 0Jew== X-Gm-Message-State: ALoCoQlr8cbalKocxCuHgq8kubbZ9gxx8rElYzuUx7b8R3xGLvH1yEY1iqeUpf3dQ6DBS+eUWasM X-Received: by 10.68.99.194 with SMTP id es2mr28773989pbb.100.1396324803723; Mon, 31 Mar 2014 21:00:03 -0700 (PDT) Received: from icarus.au.ibm.com (115-166-25-162.ip.adam.com.au. [115.166.25.162]) by mx.google.com with ESMTPSA id ss2sm49364404pab.8.2014.03.31.20.59.59 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 31 Mar 2014 21:00:03 -0700 (PDT) From: Joel Stanley To: benh@kernel.crashing.org, paulus@samba.org, anton@samba.org, shangw@linux.vnet.ibm.com, hegdevasant@linux.vnet.ibm.com, michael@ellerman.id.au, mikey@neuling.org, stewart@linux.vnet.ibm.com Subject: [PATCH v2 2/2] powerpc/powernv: Add invalid OPAL call Date: Tue, 1 Apr 2014 14:28:20 +1030 Message-Id: <1396324700-22457-3-git-send-email-joel@jms.id.au> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1396324700-22457-1-git-send-email-joel@jms.id.au> References: <1396324700-22457-1-git-send-email-joel@jms.id.au> Cc: linuxppc-dev@lists.ozlabs.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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 --- arch/powerpc/include/asm/opal.h | 2 ++ arch/powerpc/platforms/powernv/opal-wrappers.S | 1 + arch/powerpc/platforms/powernv/opal.c | 3 +++ 3 files changed, 6 insertions(+) diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h index 693bdc4..6a2c485 100644 --- a/arch/powerpc/include/asm/opal.h +++ b/arch/powerpc/include/asm/opal.h @@ -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 @@ -878,6 +879,7 @@ int64_t opal_set_param(uint64_t token, uint32_t param_id, uint64_t buffer, size_t length); int64_t opal_sensor_read(uint32_t sensor_hndl, int token, uint32_t *sensor_data); +int64_t opal_invalid_call(void); /* Internal functions */ extern int early_init_dt_scan_opal(unsigned long node, const char *uname, int depth, void *data); diff --git a/arch/powerpc/platforms/powernv/opal-wrappers.S b/arch/powerpc/platforms/powernv/opal-wrappers.S index 75c89df..2d8adb3 100644 --- a/arch/powerpc/platforms/powernv/opal-wrappers.S +++ b/arch/powerpc/platforms/powernv/opal-wrappers.S @@ -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); diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c index e6f14d7..4b7aced 100644 --- a/arch/powerpc/platforms/powernv/opal.c +++ b/arch/powerpc/platforms/powernv/opal.c @@ -607,3 +607,6 @@ void opal_shutdown(void) mdelay(10); } } + +/* Export this so that test modules can use it */ +EXPORT_SYMBOL_GPL(opal_invalid_call);