diff -c -r a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S *** a/arch/i386/kernel/entry.S 2003-06-13 14:51:29.000000000 +0000 --- b/arch/i386/kernel/entry.S 2023-12-18 13:49:03.713842819 +0000 *************** *** 1,3 **** --- 1,4 ---- + #define __ASSEMBLY__ /* * linux/arch/i386/entry.S * *************** *** 664,669 **** --- 665,685 ---- .long SYMBOL_NAME(sys_ni_syscall) /* sys_remap_file_pages */ .long SYMBOL_NAME(sys_ni_syscall) /* sys_set_tid_address */ + #if 0 .rept NR_syscalls-(.-sys_call_table)/4 .long SYMBOL_NAME(sys_ni_syscall) .endr + #else + .long SYMBOL_NAME(sys_ni_syscall) + .long SYMBOL_NAME(sys_ni_syscall) + .long SYMBOL_NAME(sys_ni_syscall) + .long SYMBOL_NAME(sys_ni_syscall) + .long SYMBOL_NAME(sys_ni_syscall) + .long SYMBOL_NAME(sys_ni_syscall) + .long SYMBOL_NAME(sys_ni_syscall) + .long SYMBOL_NAME(sys_ni_syscall) + .long SYMBOL_NAME(sys_ni_syscall) + .long SYMBOL_NAME(sys_ni_syscall) + .long SYMBOL_NAME(sys_ni_syscall) + .long SYMBOL_NAME(sys_ni_syscall) + #endif diff -c -r a/arch/i386/kernel/head.S b/arch/i386/kernel/head.S *** a/arch/i386/kernel/head.S 2003-11-28 18:26:19.000000000 +0000 --- b/arch/i386/kernel/head.S 2023-12-18 13:49:03.717842819 +0000 *************** *** 1,3 **** --- 1,4 ---- + #define __ASSEMBLY__ /* * linux/arch/i386/kernel/head.S -- the 32-bit startup code. * *************** *** 41,46 **** --- 42,49 ---- * * On entry, %esi points to the real-mode code as a 32-bit pointer. */ + .globl _start + _start: startup_32: /* * Set segments to known values diff -c -r a/arch/i386/kernel/i387.c b/arch/i386/kernel/i387.c *** a/arch/i386/kernel/i387.c 2003-08-25 11:44:39.000000000 +0000 --- b/arch/i386/kernel/i387.c 2023-12-18 13:49:03.717842819 +0000 *************** *** 25,31 **** #define HAVE_HWFP 1 #endif ! static union i387_union empty_fpu_state; void __init boot_init_fpu(void) { --- 25,31 ---- #define HAVE_HWFP 1 #endif ! union i387_union empty_fpu_state; void __init boot_init_fpu(void) { diff -c -r a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c *** a/arch/i386/kernel/process.c 2004-02-18 13:36:30.000000000 +0000 --- b/arch/i386/kernel/process.c 2023-12-18 13:49:03.717842819 +0000 *************** *** 52,58 **** #include ! asmlinkage void ret_from_fork(void) __asm__("ret_from_fork"); int hlt_counter; --- 52,58 ---- #include ! asmlinkage void ret_from_fork(void) /* __asm__("ret_from_fork") */ ; int hlt_counter; *************** *** 217,223 **** 0x000092000100ffffULL /* 16-bit real-mode 64k data at 0x00000100 */ }; ! static struct { unsigned short size __attribute__ ((packed)); unsigned long long * base __attribute__ ((packed)); --- 217,223 ---- 0x000092000100ffffULL /* 16-bit real-mode 64k data at 0x00000100 */ }; ! struct { unsigned short size __attribute__ ((packed)); unsigned long long * base __attribute__ ((packed)); diff -c -r a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c *** a/arch/i386/kernel/setup.c 2004-04-14 13:05:25.000000000 +0000 --- b/arch/i386/kernel/setup.c 2023-12-18 13:49:03.717842819 +0000 *************** *** 1392,1398 **** */ extern void vide(void); ! __asm__(".align 4\nvide: ret"); static int __init init_amd(struct cpuinfo_x86 *c) { --- 1392,1398 ---- */ extern void vide(void); ! __asm__(".align 4\n.globl vide\nvide: ret"); static int __init init_amd(struct cpuinfo_x86 *c) { diff -c -r a/arch/i386/Makefile b/arch/i386/Makefile *** a/arch/i386/Makefile 2003-06-13 14:51:29.000000000 +0000 --- b/arch/i386/Makefile 2023-12-18 13:49:03.721842819 +0000 *************** *** 124,130 **** zImage: vmlinux @$(MAKEBOOT) zImage ! bzImage: vmlinux @$(MAKEBOOT) bzImage compressed: zImage --- 124,130 ---- zImage: vmlinux @$(MAKEBOOT) zImage ! bzImage: #vmlinux @$(MAKEBOOT) bzImage compressed: zImage diff -c -r a/arch/i386/mm/init.c b/arch/i386/mm/init.c *** a/arch/i386/mm/init.c 2004-04-14 13:05:25.000000000 +0000 --- b/arch/i386/mm/init.c 2023-12-18 13:49:03.721842819 +0000 *************** *** 36,41 **** --- 36,42 ---- #include #include #include + #include #include mmu_gather_t mmu_gathers[NR_CPUS]; diff -c -r a/arch/i386/mm/pageattr.c b/arch/i386/mm/pageattr.c *** a/arch/i386/mm/pageattr.c 2002-11-28 23:53:09.000000000 +0000 --- b/arch/i386/mm/pageattr.c 2023-12-18 13:49:03.721842819 +0000 *************** *** 44,51 **** addr = address & LARGE_PAGE_MASK; pbase = (pte_t *)page_address(base); for (i = 0; i < PTRS_PER_PTE; i++, addr += PAGE_SIZE) { ! pbase[i] = mk_pte_phys(addr, ! addr == address ? prot : PAGE_KERNEL); } return base; } --- 44,55 ---- addr = address & LARGE_PAGE_MASK; pbase = (pte_t *)page_address(base); for (i = 0; i < PTRS_PER_PTE; i++, addr += PAGE_SIZE) { ! pgprot_t prot1; ! if (addr == address) ! prot1 = prot; ! else ! prot1 = PAGE_KERNEL; ! pbase[i] = mk_pte_phys(addr, prot1); } return base; } diff -c -r a/fs/partitions/efi.h b/fs/partitions/efi.h *** a/fs/partitions/efi.h 2003-08-25 11:44:43.000000000 +0000 --- b/fs/partitions/efi.h 2023-12-18 13:49:03.721842819 +0000 *************** *** 85,93 **** --- 85,97 ---- } __attribute__ ((packed)) gpt_header; typedef struct _gpt_entry_attributes { + #if 0 u64 required_to_function:1; u64 reserved:47; u64 type_guid_specific:16; + #else + u64 required; + #endif } __attribute__ ((packed)) gpt_entry_attributes; typedef struct _gpt_entry { diff -c -r a/include/asm-i386/bugs.h b/include/asm-i386/bugs.h *** a/include/asm-i386/bugs.h 2002-08-03 00:39:45.000000000 +0000 --- b/include/asm-i386/bugs.h 2023-12-18 13:49:03.721842819 +0000 *************** *** 50,57 **** __setup("no387", no_387); ! static double __initdata x = 4195835.0; ! static double __initdata y = 3145727.0; /* * This used to check for exceptions.. --- 50,57 ---- __setup("no387", no_387); ! double __initdata x = 4195835.0; ! double __initdata y = 3145727.0; /* * This used to check for exceptions.. diff -c -r a/include/asm-i386/byteorder.h b/include/asm-i386/byteorder.h *** a/include/asm-i386/byteorder.h 2003-06-13 14:51:38.000000000 +0000 --- b/include/asm-i386/byteorder.h 2023-12-18 13:49:03.725842819 +0000 *************** *** 42,49 **** __u64 u; } v; v.u = val; ! #ifdef CONFIG_X86_BSWAP ! asm("bswapl %0 ; bswapl %1 ; xchgl %0,%1" : "=r" (v.s.a), "=r" (v.s.b) : "0" (v.s.a), "1" (v.s.b)); #else --- 42,51 ---- __u64 u; } v; v.u = val; ! #if defined(CONFIG_X86_BSWAP) && 0 ! /* XXX: constraint bug ! bswap %eax ; bswap (%ecx) ; xchgl %eax,(%ecx) */ ! asm("bswap %0 ; bswap %1 ; xchgl %0,%1" : "=r" (v.s.a), "=r" (v.s.b) : "0" (v.s.a), "1" (v.s.b)); #else diff -c -r a/include/asm-i386/hw_irq.h b/include/asm-i386/hw_irq.h *** a/include/asm-i386/hw_irq.h 2003-08-25 11:44:43.000000000 +0000 --- b/include/asm-i386/hw_irq.h 2023-12-18 13:49:03.725842819 +0000 *************** *** 156,161 **** --- 156,162 ---- asmlinkage void call_do_IRQ(void); \ __asm__( \ "\n" __ALIGN_STR"\n" \ + ".globl common_interrupt\n\t" \ "common_interrupt:\n\t" \ SAVE_ALL \ SYMBOL_NAME_STR(call_do_IRQ)":\n\t" \ *************** *** 176,183 **** asmlinkage void IRQ_NAME(nr); \ __asm__( \ "\n"__ALIGN_STR"\n" \ SYMBOL_NAME_STR(IRQ) #nr "_interrupt:\n\t" \ ! "pushl $"#nr"-256\n\t" \ "jmp common_interrupt"); extern unsigned long prof_cpu_mask; --- 177,185 ---- asmlinkage void IRQ_NAME(nr); \ __asm__( \ "\n"__ALIGN_STR"\n" \ + ".globl " SYMBOL_NAME_STR(IRQ) #nr "_interrupt\n\t"\ SYMBOL_NAME_STR(IRQ) #nr "_interrupt:\n\t" \ ! "pushl $"#nr" - 256\n\t" \ "jmp common_interrupt"); extern unsigned long prof_cpu_mask; diff -c -r a/include/asm-i386/page.h b/include/asm-i386/page.h *** a/include/asm-i386/page.h 2002-08-03 00:39:45.000000000 +0000 --- b/include/asm-i386/page.h 2023-12-18 13:49:03.725842819 +0000 *************** *** 95,101 **** * undefined" opcode for parsing in the trap handler. */ ! #if 1 /* Set to zero for a slightly smaller kernel */ #define BUG() \ __asm__ __volatile__( "ud2\n" \ "\t.word %c0\n" \ --- 95,101 ---- * undefined" opcode for parsing in the trap handler. */ ! #if 0 /* Set to zero for a slightly smaller kernel */ #define BUG() \ __asm__ __volatile__( "ud2\n" \ "\t.word %c0\n" \ diff -c -r a/include/asm-i386/processor.h b/include/asm-i386/processor.h *** a/include/asm-i386/processor.h 2004-02-18 13:36:32.000000000 +0000 --- b/include/asm-i386/processor.h 2023-12-18 13:49:03.725842819 +0000 *************** *** 300,305 **** --- 300,306 ---- long st_space[32]; /* 8*16 bytes for each FP-reg = 128 bytes */ long xmm_space[32]; /* 8*16 bytes for each XMM-reg = 128 bytes */ long padding[56]; + int dummy[0] __attribute__ ((aligned (16))); } __attribute__ ((aligned (16))); struct i387_soft_struct { diff -c -r a/include/asm-i386/semaphore.h b/include/asm-i386/semaphore.h *** a/include/asm-i386/semaphore.h 2002-11-28 23:53:15.000000000 +0000 --- b/include/asm-i386/semaphore.h 2023-12-18 13:49:03.725842819 +0000 *************** *** 207,213 **** "2:\tcall __up_wakeup\n\t" "jmp 1b\n" LOCK_SECTION_END ! ".subsection 0\n" :"=m" (sem->count) :"c" (sem) :"memory"); --- 207,213 ---- "2:\tcall __up_wakeup\n\t" "jmp 1b\n" LOCK_SECTION_END ! /* ".subsection 0\n" */ :"=m" (sem->count) :"c" (sem) :"memory"); diff -c -r a/include/asm-i386/string.h b/include/asm-i386/string.h *** a/include/asm-i386/string.h 2001-11-22 19:46:18.000000000 +0000 --- b/include/asm-i386/string.h 2023-12-18 13:49:03.725842819 +0000 *************** *** 178,184 **** "leal -1(%%esi),%0\n" "2:\ttestb %%al,%%al\n\t" "jne 1b" ! :"=g" (__res), "=&S" (d0), "=&a" (d1) :"0" (0),"1" (s),"2" (c)); return __res; } --- 178,184 ---- "leal -1(%%esi),%0\n" "2:\ttestb %%al,%%al\n\t" "jne 1b" ! :"=r" (__res), "=&S" (d0), "=&a" (d1) :"0" (0),"1" (s),"2" (c)); return __res; } diff -c -r a/include/asm-i386/system.h b/include/asm-i386/system.h *** a/include/asm-i386/system.h 2004-04-14 13:05:40.000000000 +0000 --- b/include/asm-i386/system.h 2023-12-18 13:49:03.729842819 +0000 *************** *** 28,34 **** "popl %%esi\n\t" \ :"=m" (prev->thread.esp),"=m" (prev->thread.eip), \ "=b" (last) \ ! :"m" (next->thread.esp),"m" (next->thread.eip), \ "a" (prev), "d" (next), \ "b" (prev)); \ } while (0) --- 28,34 ---- "popl %%esi\n\t" \ :"=m" (prev->thread.esp),"=m" (prev->thread.eip), \ "=b" (last) \ ! :"g" (next->thread.esp),"g" (next->thread.eip), \ "a" (prev), "d" (next), \ "b" (prev)); \ } while (0) *************** *** 313,319 **** #define set_wmb(var, value) do { var = value; wmb(); } while (0) /* interrupt control.. */ ! #define __save_flags(x) __asm__ __volatile__("pushfl ; popl %0":"=g" (x): /* no input */) #define __restore_flags(x) __asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory", "cc") #define __cli() __asm__ __volatile__("cli": : :"memory") #define __sti() __asm__ __volatile__("sti": : :"memory") --- 313,319 ---- #define set_wmb(var, value) do { var = value; wmb(); } while (0) /* interrupt control.. */ ! #define __save_flags(x) __asm__ __volatile__("pushfl ; popl %0" : "=g" (x) /* no input */) #define __restore_flags(x) __asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory", "cc") #define __cli() __asm__ __volatile__("cli": : :"memory") #define __sti() __asm__ __volatile__("sti": : :"memory") diff -c -r a/include/linux/byteorder/generic.h b/include/linux/byteorder/generic.h *** a/include/linux/byteorder/generic.h 2003-11-28 18:26:21.000000000 +0000 --- b/include/linux/byteorder/generic.h 2023-12-18 13:49:03.729842819 +0000 *************** *** 86,93 **** */ #define cpu_to_le64 __cpu_to_le64 #define le64_to_cpu __le64_to_cpu ! #define cpu_to_le32 __cpu_to_le32 ! #define le32_to_cpu __le32_to_cpu #define cpu_to_le16 __cpu_to_le16 #define le16_to_cpu __le16_to_cpu #define cpu_to_be64 __cpu_to_be64 --- 86,93 ---- */ #define cpu_to_le64 __cpu_to_le64 #define le64_to_cpu __le64_to_cpu ! #define cpu_to_le32(x) __cpu_to_le32(x) ! #define le32_to_cpu(x) __le32_to_cpu(x) #define cpu_to_le16 __cpu_to_le16 #define le16_to_cpu __le16_to_cpu #define cpu_to_be64 __cpu_to_be64 diff -c -r a/include/linux/linkage.h b/include/linux/linkage.h *** a/include/linux/linkage.h 2000-12-11 20:49:54.000000000 +0000 --- b/include/linux/linkage.h 2023-12-18 13:49:03.729842819 +0000 *************** *** 19,29 **** #define SYMBOL_NAME_STR(X) #X #define SYMBOL_NAME(X) X ! #ifdef __STDC__ ! #define SYMBOL_NAME_LABEL(X) X##: ! #else ! #define SYMBOL_NAME_LABEL(X) X/**/: ! #endif #ifdef __arm__ #define __ALIGN .align 0 --- 19,25 ---- #define SYMBOL_NAME_STR(X) #X #define SYMBOL_NAME(X) X ! #define SYMBOL_NAME_LABEL(X) X: #ifdef __arm__ #define __ALIGN .align 0 diff -c -r a/include/linux/spinlock.h b/include/linux/spinlock.h *** a/include/linux/spinlock.h 2004-02-18 13:36:32.000000000 +0000 --- b/include/linux/spinlock.h 2023-12-18 13:49:03.729842819 +0000 *************** *** 41,46 **** --- 41,47 ---- #include + #if 0 #define LOCK_SECTION_NAME \ ".text.lock." __stringify(KBUILD_BASENAME) *************** *** 51,56 **** --- 52,62 ---- LOCK_SECTION_NAME ":\n\t" \ ".endif\n\t" + #else + #define LOCK_SECTION_NAME ".text.lock" + #define LOCK_SECTION_START(extra) ".section " LOCK_SECTION_NAME "\n\t" + #endif + #define LOCK_SECTION_END \ ".previous\n\t" diff -c -r a/include/linux/wait.h b/include/linux/wait.h *** a/include/linux/wait.h 2003-08-25 11:44:44.000000000 +0000 --- b/include/linux/wait.h 2023-12-18 13:49:03.729842819 +0000 *************** *** 64,77 **** # define wq_lock_t spinlock_t # define WAITQUEUE_RW_LOCK_UNLOCKED SPIN_LOCK_UNLOCKED ! # define wq_read_lock spin_lock ! # define wq_read_lock_irqsave spin_lock_irqsave ! # define wq_read_unlock spin_unlock ! # define wq_read_unlock_irqrestore spin_unlock_irqrestore ! # define wq_write_lock_irq spin_lock_irq ! # define wq_write_lock_irqsave spin_lock_irqsave ! # define wq_write_unlock_irqrestore spin_unlock_irqrestore ! # define wq_write_unlock spin_unlock #endif struct __wait_queue_head { --- 64,77 ---- # define wq_lock_t spinlock_t # define WAITQUEUE_RW_LOCK_UNLOCKED SPIN_LOCK_UNLOCKED ! # define wq_read_lock(lock) spin_lock(lock) ! # define wq_read_lock_irqsave(lock, flags) spin_lock_irqsave(lock, flags) ! # define wq_read_unlock(lock) spin_unlock(lock) ! # define wq_read_unlock_irqrestore(lock, flags) spin_unlock_irqrestore(lock, flags) ! # define wq_write_lock_irq(lock) spin_lock_irq(lock) ! # define wq_write_lock_irqsave(lock, flags) spin_lock_irqsave(lock, flags) ! # define wq_write_unlock_irqrestore(lock, flags) spin_unlock_irqrestore(lock, flags) ! # define wq_write_unlock(lock) spin_unlock(lock) #endif struct __wait_queue_head { diff -c -r a/net/core/dev.c b/net/core/dev.c *** a/net/core/dev.c 2004-04-14 13:05:41.000000000 +0000 --- b/net/core/dev.c 2023-12-18 13:49:03.733842819 +0000 *************** *** 2013,2020 **** ret = 0; if ((old_flags^flags)&IFF_UP) /* Bit is different ? */ { ! ret = ((old_flags & IFF_UP) ? dev_close : dev_open)(dev); if (ret == 0) dev_mc_upload(dev); } --- 2013,2029 ---- ret = 0; if ((old_flags^flags)&IFF_UP) /* Bit is different ? */ { ! int (*dev_func)(struct net_device *); + #if 0 + ret = ((old_flags & IFF_UP) ? dev_close : dev_open)(dev); + #else + if (old_flags & IFF_UP) + dev_func = dev_close; + else + dev_func = dev_open; + ret = dev_func(dev); + #endif if (ret == 0) dev_mc_upload(dev); } diff -c -r a/net/ipv4/raw.c b/net/ipv4/raw.c *** a/net/ipv4/raw.c 2003-08-25 11:44:44.000000000 +0000 --- b/net/ipv4/raw.c 2023-12-18 13:49:03.733842819 +0000 *************** *** 311,316 **** --- 311,320 ---- u32 daddr; u8 tos; int err; + int (*getfrag)(const void *, + char *, + unsigned int, + unsigned int); /* This check is ONLY to check for arithmetic overflow on integer(!) len. Not more! Real check will be made *************** *** 426,433 **** rfh.dst = &rt->u.dst; if (!ipc.addr) ipc.addr = rt->rt_dst; ! err = ip_build_xmit(sk, sk->protinfo.af_inet.hdrincl ? raw_getrawfrag : ! raw_getfrag, &rfh, len, &ipc, rt, msg->msg_flags); done: if (free) --- 430,440 ---- rfh.dst = &rt->u.dst; if (!ipc.addr) ipc.addr = rt->rt_dst; ! if (sk->protinfo.af_inet.hdrincl) ! getfrag =raw_getrawfrag; ! else ! getfrag = raw_getfrag; ! err = ip_build_xmit(sk, getfrag, &rfh, len, &ipc, rt, msg->msg_flags); done: if (free) diff -c -r a/net/ipv4/udp.c b/net/ipv4/udp.c *** a/net/ipv4/udp.c 2004-04-14 13:05:41.000000000 +0000 --- b/net/ipv4/udp.c 2023-12-18 13:49:03.733842819 +0000 *************** *** 441,446 **** --- 441,450 ---- u32 daddr; u8 tos; int err; + int (*getfrag)(const void *, + char *, + unsigned int, + unsigned int); /* This check is ONLY to check for arithmetic overflow on integer(!) len. Not more! Real check will be made *************** *** 560,570 **** /* RFC1122: OK. Provides the checksumming facility (MUST) as per */ /* 4.1.3.4. It's configurable by the application via setsockopt() */ /* (MAY) and it defaults to on (MUST). */ ! err = ip_build_xmit(sk, ! (sk->no_check == UDP_CSUM_NOXMIT ? ! udp_getfrag_nosum : ! udp_getfrag), &ufh, ulen, &ipc, rt, msg->msg_flags); out: --- 564,575 ---- /* RFC1122: OK. Provides the checksumming facility (MUST) as per */ /* 4.1.3.4. It's configurable by the application via setsockopt() */ /* (MAY) and it defaults to on (MUST). */ ! if (sk->no_check == UDP_CSUM_NOXMIT) ! getfrag = udp_getfrag_nosum; ! else ! getfrag = udp_getfrag; err = ip_build_xmit(sk, ! getfrag, &ufh, ulen, &ipc, rt, msg->msg_flags); out: