Fix linux compilation on x86-64
PATCH 1/1 Fix linux compilation on x86-64
This patch fixes Linux 2.6.18 compilation on x86-64 and also works on i386.
xen-unstable.hg/linux-2.6-xen-sparse/arch/i386/kernel/swiotlb.c +1 -1
@@ -47,7 +47,7 @@ EXPORT_SYMBOL(swiotlb);*/ #define IO_TLB_SHIFT 11 -static int swiotlb_force; +int swiotlb_force;static char *iotlb_virt_start;static unsigned long iotlb_nslabs;
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 4 lines · Stefan Berger
This patch fixes Linux 2.6.18 compilation on x86-64 and also works on i386.
Signed-off-by Stefan Berger <[email protected]>
Cheers,
Muli
I don't see swiotlb_force used outside of swiotlb.c. How is the build broken (it works for me)?
-- Keir
Quoted 10 lines · Stefan Berger
This patch fixes Linux 2.6.18 compilation on x86-64 and also works on i386.
Signed-off-by Stefan Berger <[email protected]>_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
This is what I get:
INSTALL sound/usb/usx2y/snd-usb-usx2y.ko
if [ -r System.map -a -x /sbin/depmod ]; then /sbin/depmod -ae -F System.map -b / -r 2.6.18-xen; fi
WARNING: //lib/modules/2.6.18-xen/kernel/drivers/char/drm/drm.ko needs unknown symbol init_level4_pgt
make[3]: Leaving directory `/root/xen-unstable.hg/build-linux-2.6.18-xen_x86_64'
make -C build-linux-2.6.18-xen_x86_64 ARCH=x86_64 INSTALL_PATH=/ vmlinuz make[3]: Entering directory `/root/xen-unstable.hg/build-linux-2.6.18-xen_x86_64'
make -C /root/xen-unstable.hg/linux-2.6.18-xen O=/root/xen-unstable.hg/build-linux-2.6.18-xen_x86_64 vmlinuz
Using /root/xen-unstable.hg/linux-2.6.18-xen as source for kernel
GEN /root/xen-unstable.hg/build-linux-2.6.18-xen_x86_64/Makefile CHK include/linux/version.h CHK include/linux/utsrelease.h CHK include/linux/compile.h CC lib/../arch/i386/kernel/swiotlb.o
/root/xen-unstable.hg/linux-2.6.18-xen/lib/../arch/i386/kernel/swiotlb.c:50:
error: static declaration of â??swiotlb_forceâ?? follows non-static declarationinclude2/asm/swiotlb.h:45: error: previous declaration of â??swiotlb_forceâ?? was here
make[6]: *** [lib/../arch/i386/kernel/swiotlb.o] Error 1 make[5]: *** [lib] Error 2
make[4]: *** [vmlinuz] Error 2
make[3]: *** [vmlinuz] Error 2
make[3]: Leaving directory `/root/xen-unstable.hg/build-linux-2.6.18-xen_x86_64'
make[2]: *** [build] Error 2
make[2]: Leaving directory `/root/xen-unstable.hg'
make[1]: *** [linux-2.6-xen-install] Error 2
make[1]: Leaving directory `/root/xen-unstable.hg'
make: *** [install-kernels] Error 1
Stefan
Keir Fraser <[email protected]> wrote on 01/21/2007 10:30:33 AM:
Quoted 1 line
I don't see
swiotlb_forceused outside ofswiotlb.c. How is the build
broken
Quoted 18 lines
(it works for me)?
-- Keir
Quoted 10 lines · Stefan Berger
This patch fixes Linux 2.6.18 compilation on x86-64 and also works on i386.
Signed-off-by Stefan Berger <[email protected]>_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 2 lines · Keir Fraser
I don't see
swiotlb_forceused outside ofswiotlb.c. How is the build broken (it works for me)?
On recent changesets i also changed swiotlb_force from static int to int to compile on x86_64. (Left a bad smell, since I assume the definition in swiotlb.h is correct, but i didn't checked really into the concerned code)
Quoted 22 lines
-- Keir
Quoted 10 lines · Stefan Berger
This patch fixes Linux 2.6.18 compilation on x86-64 and also works on i386.
Signed-off-by Stefan Berger <[email protected]>_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Signature · 12 lines
Stephan Seitz Senior System Administrator *netz-haut* - multimediale kommunikation zweierweg 22 97074 würzburg fon: +49 931 2876247 fax: +49 931 2876248 web: www.netz-haut.de <http://www.netz-haut.de/>
begin:vcard
fn:Stephan Seitz
n:Seitz;Stephan
org:netz-haut e.K.
adr:;;Zweierweg 22;Wuerzburg;Bayern;97074;Deutschland email;internet:[email protected] title:Senior System Administrator tel;work:+49-931-287-6247 tel;fax:+49-931-287-6248
x-mozilla-html:FALSE url:http://www.schwarz-mode.de/files/ version:2.1
end:vcard
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
It's pretty clearly broken. On an FC6-based development system, I see the swiotlb_force problem, but I haven't had the time to chase down a fix. My first, no-time-involved guess would be the static int and extern int combination, which is pretty much what the error message indicates. But, as I've noted, composing this email is the most time that I've spent on this.
-b
CC lib/percpu_counter.o
CC lib/../arch/i386/kernel/swiotlb.o/home/ben/src/xen-unstable.hg/linux-2.6.18-xen/lib/../arch/i386/kernel/swiotlb.c:50:
error: static declaration of 'swiotlb_force' follows non-static declaration include2/asm/swiotlb.h:45: error: previous declaration of 'swiotlb_force' was here
make[6]: *** [lib/../arch/i386/kernel/swiotlb.o] Error 1
make[5]: *** [lib] Error 2
make[4]: *** [vmlinuz] Error 2
make[3]: *** [vmlinuz] Error 2
make[3]: Leaving directory `/home/ben/src/xen-unstable.hg/build- linux-2.6.18-xen_x86_64'
make[2]: *** [build] Error 2
make[2]: Leaving directory `/home/ben/src/xen-unstable.hg'
make[1]: *** [linux-2.6-xen-install] Error 2
make[1]: Leaving directory `/home/ben/src/xen-unstable.hg'
make: *** [install-kernels] Error 1
[ben@bthomas2 xen-unstable.hg]$ grep -rI swiotlb_force * build-linux-2.6.18-xen_x86_64/include2/asm/swiotlb.h:extern int swiotlb_force;
linux-2.6.18-xen/arch/i386/kernel/swiotlb.c:static int swiotlb_force;linux-2.6.18-xen/arch/i386/kernel/swiotlb.c: swiotlb_force = 1;linux-2.6.18-xen/arch/i386/kernel/swiotlb.c: swiotlb_force = -1;linux-2.6.18-xen/arch/i386/kernel/swiotlb.c: if (swiotlb_force == 1) {linux-2.6.18-xen/arch/i386/kernel/swiotlb.c: } else if ((swiotlb_force !=
-1) &&linux-2.6.18-xen/arch/x86_64/kernel/pci-swiotlb-xen.c: if (swiotlb_force)linux-2.6.18-xen/arch/x86_64/kernel/pci-swiotlb.c: if (swiotlb_force)
linux-2.6.18-xen/include/asm-x86_64/swiotlb.h:extern int swiotlb_force; linux-2.6.18-xen/lib/swiotlb.c:int swiotlb_force;linux-2.6.18-xen/lib/swiotlb.c: swiotlb_force = 1;linux-2.6.18-xen/lib/swiotlb.c: if (!address_needs_mapping(hwdev, dev_addr) && !swiotlb_force)linux-2.6.18-xen/lib/swiotlb.c: if (swiotlb_force ||address_needs_mapping(hwdev, dev_addr)) { linux-2.6-xen-sparse/arch/i386/kernel/swiotlb.c:static int swiotlb_force; linux-2.6-xen-sparse/arch/i386/kernel/swiotlb.c:swiotlb_force = 1;linux-2.6-xen-sparse/arch/i386/kernel/swiotlb.c:swiotlb_force = -1;linux-2.6-xen-sparse/arch/i386/kernel/swiotlb.c: if (swiotlb_force ==
1) {linux-2.6-xen-sparse/arch/i386/kernel/swiotlb.c: } else if
((swiotlb_force != -1) &&linux-2.6-xen-sparse/arch/x86_64/kernel/pci-swiotlb-xen.c: if
(swiotlb_force) pristine-linux-2.6.18/arch/x86_64/kernel/pci-swiotlb.c: if (swiotlb_force) pristine-linux-2.6.18/include/asm-x86_64/swiotlb.h:extern int swiotlb_force; pristine-linux-2.6.18/lib/swiotlb.c:int swiotlb_force;pristine-linux-2.6.18/lib/swiotlb.c: swiotlb_force = 1;pristine-linux-2.6.18/lib/swiotlb.c: if (!address_needs_mapping(hwdev,dev_addr) && !swiotlb_force)pristine-linux-2.6.18/lib/swiotlb.c: if (swiotlb_force ||address_needs_mapping(hwdev, dev_addr)) {ref-linux-2.6.18/arch/x86_64/kernel/pci-swiotlb.c: if (swiotlb_force)
ref-linux-2.6.18/include/asm-x86_64/swiotlb.h:extern int swiotlb_force; ref-linux-2.6.18/lib/swiotlb.c:int swiotlb_force;ref-linux-2.6.18/lib/swiotlb.c: swiotlb_force = 1;ref-linux-2.6.18/lib/swiotlb.c: if (!address_needs_mapping(hwdev, dev_addr) && !swiotlb_force)ref-linux-2.6.18/lib/swiotlb.c: if (swiotlb_force ||address_needs_mapping(hwdev, dev_addr)) {
[ben@bthomas2 xen-unstable.hg]$
Quoted 22 lines · Keir Fraser
I don't see
swiotlb_forceused outside ofswiotlb.c. How is the build broken
(it works for me)?-- Keir
Quoted 10 lines · Stefan Berger
This patch fixes Linux 2.6.18 compilation on x86-64 and also works on i386.
Signed-off-by Stefan Berger <[email protected]>_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 5 lines
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel