*** 1003.org/sys/makefile 2004-01-21 14:26:32.000000000 +0100 --- 1003/sys/makefile 2004-05-16 18:31:21.000000000 +0200 *************** *** 51,56 **** --- 51,57 ---- LINUX_SOURCE=/usr/src/linux-`uname -r` ; \ echo "LINUX_SRC=$$LINUX_SOURCE" >> ${MAKECFG} ; \ echo "#CC=kgcc" >> ${MAKECFG} ; \ + echo "CC=gcc32" >> ${MAKECFG} ; \ echo " location of linux source $$LINUX_SOURCE" ; \ fi ; @if [ ! -e ${MODULE}.conf ] ; then \ *** 1003.org/dd/btp_rdwr.c 2004-01-21 13:41:12.000000000 +0100 --- 1003/dd/btp_rdwr.c 2004-05-16 19:07:28.000000000 +0200 *************** *** 957,967 **** --- 957,971 ---- if (!pgd_none(*pgd_p)) { pmd_p = pmd_offset(pgd_p, addr); if (!pmd_none(*pmd_p)) { + /* #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,20) pte_p = pte_offset_kernel(pmd_p, addr); #else + */ pte_p = pte_offset(pmd_p, addr); + /* #endif + */ if (pte_present(*pte_p)) { *** 1003.org/dd/btp_mmap.c 2004-01-21 13:48:10.000000000 +0100 --- 1003/dd/btp_mmap.c 2004-05-16 19:12:57.000000000 +0200 *************** *** 234,246 **** we create a mapping between the physical pages and the virtual addresses of the application with remap_page_range. */ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,20) if (remap_page_range(vma_p, vma_p->vm_start, #else if (remap_page_range(vma_p->vm_start, #endif virt_to_phys((void*)((unsigned long)unit_p->bt_kmalloc_buf)), ! size, PAGE_SHARED)) { INFO_STR("mmap remap page range failed\n"); --- 234,250 ---- we create a mapping between the physical pages and the virtual addresses of the application with remap_page_range. */ + /* #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,20) if (remap_page_range(vma_p, vma_p->vm_start, #else + */ if (remap_page_range(vma_p->vm_start, + /* #endif + */ virt_to_phys((void*)((unsigned long)unit_p->bt_kmalloc_buf)), ! (unsigned long)size, PAGE_SHARED)) { INFO_STR("mmap remap page range failed\n"); *************** *** 339,349 **** --- 343,357 ---- /* ** Now manipulate the user VMA to point directly to our device */ + /* #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,20) if (remap_page_range(vma_p, vma_p->vm_start, #else + */ if (remap_page_range(vma_p->vm_start, + /* #endif + */ pci_addr, length, vma_p->vm_page_prot)) { TRC_STR(BT_TRC_INFO|BT_TRC_MMAP, "Call to remap_page_range() failed.\n"); if (need != 0) { *************** *** 653,663 **** --- 661,675 ---- pgd_p = pgd_offset(&init_mm, page); pmd_p = pmd_offset(pgd_p, page); + /* #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,20) pte_p = pte_offset_kernel(pmd_p, page); #else + */ pte_p = pte_offset(pmd_p, page); + /* #endif + */ page = (unsigned long)pte_page(*pte_p); #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) rg/dd/makefile 2004-01-28 20:22:48.000000000 +0100 --- 1003/dd/makefile 2004-05-16 18:38:52.000000000 +0200 *************** *** 50,64 **** # When defined, use kgcc (Red Hat specific) rather than gcc (cc) for kernel code. # CC = kgcc ! CC = gcc #include ../sys/config.make BTINCLUDE=../include # 2.4 flags ! #CPPFLAGS =-I$(BTINCLUDE) -I/lib/modules/`uname -r`/build/include -I/lib/modules/`uname -r`/build/include/asm/mach-default -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB $(EXTRA_DEFINE) # 2.5+ flags ! CPPFLAGS =-I$(BTINCLUDE) -I/lib/modules/`uname -r`/build/include -I/lib/modules/`uname -r`/build/include/asm/mach-default -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB $(EXTRA_DEFINE) -DKBUILD_MODNAME=btp -fno-common CFLAGS=$(CC_OPTIM) $(ADDED_CFLAGS) $(ARCH_FLAGS) $(SMP_FLAG) -Wall -Wstrict-prototypes --- 50,64 ---- # When defined, use kgcc (Red Hat specific) rather than gcc (cc) for kernel code. # CC = kgcc ! CC = gcc32 #include ../sys/config.make BTINCLUDE=../include # 2.4 flags ! CPPFLAGS =-I$(BTINCLUDE) -I/lib/modules/`uname -r`/build/include -I/lib/modules/`uname -r`/build/include/asm/mach-default -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB $(EXTRA_DEFINE) # 2.5+ flags ! #CPPFLAGS =-I$(BTINCLUDE) -I/lib/modules/`uname -r`/build/include -I/lib/modules/`uname -r`/build/include/asm/mach-default -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB $(EXTRA_DEFINE) -DKBUILD_MODNAME=btp -fno-common CFLAGS=$(CC_OPTIM) $(ADDED_CFLAGS) $(ARCH_FLAGS) $(SMP_FLAG) -Wall -Wstrict-prototypes