From: Brian Gerst <bgerst@didntduck.org>
To: Frank Davis <fdavis@si.rr.com>
Cc: linux-kernel@vger.kernel.org, davej@suse.de, Martin.Bligh@us.ibm.com
Subject: [PATCH] Re: 2.5.8-dj1 : arch/i386/kernel/smpboot.c error
Date: Sun, 21 Apr 2002 09:37:15 -0400 [thread overview]
Message-ID: <3CC2C08B.4060608@didntduck.org> (raw)
In-Reply-To: <Pine.LNX.4.33.0204152216590.18109-100000@localhost.localdomain>
[-- Attachment #1: Type: text/plain, Size: 834 bytes --]
Frank Davis wrote:
> Hello all,
> While a 'make bzImage', I received the following compile error:
> Regards,
> Frank
>
> smpboot.c:1008: parse error before `0'
> smpboot.c: In function `smp_boot_cpus':
> smpboot.c:1023: invalid lvalue in assignment
> make[1]: *** [smpboot.o] Error 1
> make[1]: Leaving directory `/usr/src/linux/arch/i386/kernel'
> make: *** [_dir_arch/i386/kernel] Error 2
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
I reworked the patch to avoid the #define of xquad_portio. It is still
much more readable than the original code. Patch attached against
2.5.8-dj1.
--
Brian Gerst
[-- Attachment #2: io-4 --]
[-- Type: text/plain, Size: 3033 bytes --]
diff -urN linux-2.5.8-dj1/include/asm-i386/io.h linux/include/asm-i386/io.h
--- linux-2.5.8-dj1/include/asm-i386/io.h Sun Apr 21 09:14:24 2002
+++ linux/include/asm-i386/io.h Sun Apr 21 09:27:20 2002
@@ -331,16 +331,8 @@
#ifdef CONFIG_MULTIQUAD
extern void *xquad_portio; /* Where the IO area was mapped */
-#else
-#define xquad_portio (0)
-#endif
-
#define XQUAD_PORT_ADDR(port, quad) (xquad_portio + (XQUAD_PORTIO_QUAD*quad) + port)
-
#define __BUILDIO(bwl,bw,type) \
-static inline void out##bwl##_local(unsigned type value, int port) { \
- __asm__ __volatile__("out" #bwl " %" #bw "0, %w1" : : "a"(value), "Nd"(port)); \
-} \
static inline void out##bwl##_quad(unsigned type value, int port, int quad) { \
if (xquad_portio) \
write##bwl(value, XQUAD_PORT_ADDR(port, quad)); \
@@ -350,18 +342,6 @@
static inline void out##bwl(unsigned type value, int port) { \
out##bwl##_quad(value, port, 0); \
} \
-static inline void out##bwl##_p(unsigned type value, int port) { \
- out##bwl(value, port); \
- slow_down_io(); \
-} \
-static inline void outs##bwl(int port, const void *addr, unsigned long count) { \
- __asm__ __volatile__("rep; outs" #bwl : "+S"(addr), "+c"(count) : "d"(port)); \
-} \
-static inline unsigned type in##bwl##_local(int port) { \
- unsigned type value; \
- __asm__ __volatile__("in" #bwl " %w1, %" #bw "0" : "=a"(value) : "Nd"(port)); \
- return value; \
-} \
static inline unsigned type in##bwl##_quad(int port, int quad) { \
if (xquad_portio) \
return read##bwl(XQUAD_PORT_ADDR(port, quad)); \
@@ -370,18 +350,46 @@
} \
static inline unsigned type in##bwl(int port) { \
return in##bwl##_quad(port, 0); \
+}
+#else
+#define __BUILDIO(bwl,bw,type) \
+static inline void out##bwl(unsigned type value, int port) { \
+ out##bwl##_local(value, port); \
+} \
+static inline unsigned type in##bwl(int port) { \
+ return in##bwl##_local(port); \
+}
+#endif
+
+
+#define BUILDIO(bwl,bw,type) \
+static inline void out##bwl##_local(unsigned type value, int port) { \
+ __asm__ __volatile__("out" #bwl " %" #bw "0, %w1" : : "a"(value), "Nd"(port)); \
+} \
+static inline unsigned type in##bwl##_local(int port) { \
+ unsigned type value; \
+ __asm__ __volatile__("in" #bwl " %w1, %" #bw "0" : "=a"(value) : "Nd"(port)); \
+ return value; \
+} \
+__BUILDIO(bwl,bw,type) \
+static inline void out##bwl##_p(unsigned type value, int port) { \
+ out##bwl(value, port); \
+ slow_down_io(); \
} \
static inline unsigned type in##bwl##_p(int port) { \
unsigned type value = in##bwl(port); \
slow_down_io(); \
return value; \
} \
+static inline void outs##bwl(int port, const void *addr, unsigned long count) { \
+ __asm__ __volatile__("rep; outs" #bwl : "+S"(addr), "+c"(count) : "d"(port)); \
+} \
static inline void ins##bwl(int port, void *addr, unsigned long count) { \
__asm__ __volatile__("rep; ins" #bwl : "+D"(addr), "+c"(count) : "d"(port)); \
}
-__BUILDIO(b,b,char)
-__BUILDIO(w,w,short)
-__BUILDIO(l,,long)
+BUILDIO(b,b,char)
+BUILDIO(w,w,short)
+BUILDIO(l,,long)
#endif
prev parent reply other threads:[~2002-04-21 13:39 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-16 2:19 2.5.8-dj1 : arch/i386/kernel/smpboot.c error Frank Davis
2002-04-17 2:47 ` Adam Kropelin
2002-04-17 4:59 ` Martin J. Bligh
2002-04-17 12:30 ` Adam Kropelin
2002-04-17 12:40 ` Adam Kropelin
2002-04-17 15:28 ` Martin J. Bligh
2002-04-17 19:17 ` Adam Kropelin
2002-04-17 19:31 ` Rick Stevens
2002-04-17 20:53 ` Martin J. Bligh
2002-04-17 20:40 ` Adam Kropelin
2002-04-17 21:17 ` Rick Stevens
2002-04-17 21:49 ` Adam Kropelin
2002-04-17 22:06 ` J.A. Magallon
2002-04-18 0:34 ` Martin J. Bligh
2002-04-18 2:16 ` Stevie O
2002-04-17 20:49 ` Martin J. Bligh
2002-04-17 22:56 ` Stevie O
2002-04-18 0:29 ` Martin J. Bligh
2002-04-21 13:37 ` Brian Gerst [this message]
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=3CC2C08B.4060608@didntduck.org \
--to=bgerst@didntduck.org \
--cc=Martin.Bligh@us.ibm.com \
--cc=davej@suse.de \
--cc=fdavis@si.rr.com \
--cc=linux-kernel@vger.kernel.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