From: Steven Rostedt <rostedt@goodmis.org>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: lguest <lguest@ozlabs.org>,
lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
virtualization <virtualization@lists.linux-foundation.org>,
Glauber de Oliveira Costa <glommer@gmail.com>,
Jes Sorensen <jes@sgi.com>, Carsten Otte <cotte@de.ibm.com>,
Andi Kleen <ak@suse.de>
Subject: [PATCH 3/5 -v2] Remove __pa() use in hvc_lguest
Date: Thu, 09 Aug 2007 00:36:29 -0400 [thread overview]
Message-ID: <20070809044125.276249230@goodmis.org> (raw)
In-Reply-To: 20070809043626.830486783@goodmis.org
[-- Attachment #1: 0003-Remove-__pa-use-in-hvc_lguest.txt --]
[-- Type: text/plain, Size: 1131 bytes --]
The hvc_lguest uses __pa in the const initialization.
In some architectures, __pa() is not constant so this fails in compiles.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
drivers/char/hvc_lguest.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/drivers/char/hvc_lguest.c b/drivers/char/hvc_lguest.c
index feeccba..c7d7d4c 100644
--- a/drivers/char/hvc_lguest.c
+++ b/drivers/char/hvc_lguest.c
@@ -42,7 +42,6 @@
* use of physical address for the buffer itself. */
static char inbuf[256];
static struct lguest_dma cons_input = { .used_len = 0,
- .addr[0] = __pa(inbuf),
.len[0] = sizeof(inbuf),
.len[1] = 0 };
@@ -114,6 +113,13 @@ static struct hv_ops lguest_cons = {
* (0), and the struct hv_ops containing the put_chars() function. */
static int __init cons_init(void)
{
+ /*
+ * We can't initialize using __pa in const declarations,
+ * since __pa(inbuf) does not evaluate into a constant on
+ * all architectures (namely x86_64).
+ */
+ cons_input.addr[0] = __pa(inbuf);
+
if (strcmp(paravirt_ops.name, "lguest") != 0)
return 0;
--
1.4.4.4
--
next prev parent reply other threads:[~2007-08-09 4:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-09 4:36 [PATCH 0/5 -v2] Modify lguest32 to make room for lguest64 (version 2) Steven Rostedt
2007-08-09 4:36 ` [PATCH 1/5 -v2] move lg.h to include/asm-<arch> Steven Rostedt
2007-08-09 4:36 ` [PATCH 2/5 -v2] Change lguest launcher to use asm generic include Steven Rostedt
2007-08-09 4:36 ` Steven Rostedt [this message]
2007-08-09 4:36 ` [PATCH 4/5 -v2] Added generic lg.h in the include/linux directory Steven Rostedt
2007-08-09 5:31 ` Stephen Rothwell
2007-08-09 12:19 ` Steven Rostedt
2007-08-09 4:36 ` [PATCH 5/5 -v2] Move the lguest files that are i386 specific Steven Rostedt
2007-08-09 5:42 ` Stephen Rothwell
2007-08-09 12:21 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070809044125.276249230@goodmis.org \
--to=rostedt@goodmis.org \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=cotte@de.ibm.com \
--cc=glommer@gmail.com \
--cc=jes@sgi.com \
--cc=lguest@ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox