From: "Andrei A. Voropaev" <av@simcon-mt.com>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: cyclades.h in 2.6.9 use __iomem but don't include compiler.h
Date: Tue, 26 Oct 2004 08:32:33 +0200 [thread overview]
Message-ID: <20041026063233.GA7598@avorop.local> (raw)
In-Reply-To: <20041025195342.GC23133@logos.cnet>
On Mon, Oct 25, 2004 at 05:53:43PM -0200, Marcelo Tosatti wrote:
> On Mon, Oct 25, 2004 at 05:46:45PM +0200, Andrei A. Voropaev wrote:
> > Hi!
> >
> > I'm not sure if this is a bug or a feature. But in 2.6.9 cyclades.h have
> > different definition for struct cyclades_card. This definition uses
> > __iomem attribute which is defined in linux/compiler.h. This is not
> > included in cyclades.h, which leads to compilation problems for
> > util-linux package.
>
> Hi Andrei,
>
> cyclades.h should not do business with util-linux, only
> the driver itself (cyclades.c) and the userspace configuration
> utility (which now includes should linux/compiler.h accordingly
> to define __iomem to NULL).
Well. All I know is that util-linux has cytune utility that does not
compile with 2.6.9 kernel headers. But compiles with older ones.
>
> What is the complete error message, and why is util-linux
> including cyclades.h?
>
Here's the error message.
cc -O2 -fomit-frame-pointer -I../lib -Wall -Wstrict-prototypes -DNCH=1 -D_FILE_OFFSET_BITS=64 -DSBINDIR=\"/sbin\" -DUSRSBINDIR=\"/usr/sbin\" -DLOGDIR=\"/var/log\" -DVARPATH=\"/var\" -DLOCALEDIR=\"/usr/share/locale\" -O2 -c cytune.c -o cytune.o
cytune.c:58:86: linux/tqueue.h: No such file or directory
In file included from cytune.c:61:
/usr/include/linux/cyclades.h:514: error: variable or field `__iomem' declared void
/usr/include/linux/cyclades.h:514: error: parse error before '*' token
/usr/include/linux/cyclades.h:515: error: parse error before '*' token
/usr/include/linux/cyclades.h:528: error: parse error before '}' token
make[1]: *** [cytune.o] Error 1
make[1]: Leaving directory `/tools/src/util-linux-2.12b/sys-utils'
make: *** [all] Error 1
The first problem with linux/tqueue.h happens because during config it
tries to do it with only cyclades.h and fails on __iomem. So it decides
to include tqueue.h. Only to make things worse.
Here's the patch that I had to apply.
diff -ur util-linux-2.12b/configure util-linux-2.12b-adj/configure
--- util-linux-2.12b/configure 2004-08-25 02:32:19.000000000 +0200
+++ util-linux-2.12b-adj/configure 2004-10-25 19:43:29.259856848 +0200
@@ -367,6 +367,7 @@
#
echo "
#include <sys/types.h>
+#include <linux/compiler.h>
#include <linux/cyclades.h>
int main(){ exit(0); }
" > conftest.c
diff -ur util-linux-2.12b/sys-utils/cytune.c util-linux-2.12b-adj/sys-utils/cytune.c
--- util-linux-2.12b/sys-utils/cytune.c 2002-03-09 00:04:30.000000000 +0100
+++ util-linux-2.12b-adj/sys-utils/cytune.c 2004-10-25 19:44:27.892943264 +0200
@@ -58,6 +58,7 @@
#include <linux/tqueue.h> /* required for old kernels (for struct tq_struct) */
/* compilation errors on other kernels */
#endif
+#include <linux/compiler.h>
#include <linux/cyclades.h>
#if 0
next prev parent reply other threads:[~2004-10-26 6:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-25 15:46 cyclades.h in 2.6.9 use __iomem but don't include compiler.h Andrei A. Voropaev
[not found] ` <20041025195342.GC23133@logos.cnet>
2004-10-26 6:32 ` Andrei A. Voropaev [this message]
2004-10-26 8:32 ` Marcelo Tosatti
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=20041026063233.GA7598@avorop.local \
--to=av@simcon-mt.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.tosatti@cyclades.com \
/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