[linux-dvb] RE : Compile error, bug in compat.h with kernel ?

Thierry Lelegard thierry.lelegard at tv-numeric.com
Tue Dec 30 19:13:48 CET 2008

De : BOUWSMA Barry 

> On Tue, 30 Dec 2008, Thierry Lelegard wrote:
> > I have a compilation problem with the latest Linux DVB 
> repository (Dec 30 2008)
> > on kernel The source of the error seems to be an 
> incorrect test in
> > compat.h.
> > In <linux/pci.h>, the following has been added somewhere 
> between
> > and (the two latest kernels I have on my Fedora 10 box):
> > 
> > static inline void __iomem *pci_ioremap_bar(struct pci_dev 
> *pdev, int bar)
> > But the test < KERNEL_VERSION(2, 6, 28) is not really correct since
> > the definition of pci_ioremap_bar appeared in the kernel in 
> the middle of
> > 2.6.27.* (in .8 or .9).
> This seems to be more a result of the versioning which
> your distribution applies to the kernels, where certain
> features seem to have been cherry-picked from 2.6.28 and
> been added without bumping the version.
> The above code is not present in the git kernel repo as
> of the time 2.6.27 went out the door, but was added a
> day before the 2.6.28-rc1 tag was applied during the two
> week merge window of limbo-land (22.Oct), I think.

OK, looking into the source RPM for the latest Fedora 10 update
kernel (kernel-, it appears that
the definition of pci_ioremap_bar in pci.h was introduced by

I assume that this is a Fedora-specific patch (or more generally Red Hat),
back-porting 2.6.28 stuff.

Too bad...

> > I do not see an obvious and general solution to this.
> I wonder if you could modify compat.h to reverse the
> test in the diff --
> or if this is set/not-set elsewhere...  Well, it's an
> idea.

Well, looking into the vanilla 2.6.17 kernel (linux-2.6.27.tar.bz2),
it seems that CONFIG_HAS_IOMEM is defined by default almost everywhere.
So, it seems to be a bit dangerous to play with that.

Really a pain since Fedora is a quite successful distro. The next "yum update"
will be painful to most most DVB users with devices which need the latest
update from linuxtv.org. Hopefully, they read this mailing list...


More information about the linux-dvb mailing list