diff -ruN linux-2.4.27-pre3/arch/i386/Makefile linux-2.4.27-pre3.gcc340-fixes/arch/i386/Makefile --- linux-2.4.27-pre3/arch/i386/Makefile 2003-06-14 13:30:19.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/arch/i386/Makefile 2004-05-19 22:27:05.000000000 +0200 @@ -94,6 +94,8 @@ CFLAGS += $(call check_gcc,-march=c3-2,-march=i686) endif +CFLAGS += $(call check_gcc,-fno-unit-at-a-time,) + HEAD := arch/i386/kernel/head.o arch/i386/kernel/init_task.o SUBDIRS += arch/i386/kernel arch/i386/mm arch/i386/lib diff -ruN linux-2.4.27-pre3/arch/i386/boot/compressed/misc.c linux-2.4.27-pre3.gcc340-fixes/arch/i386/boot/compressed/misc.c --- linux-2.4.27-pre3/arch/i386/boot/compressed/misc.c 2003-08-25 20:07:40.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/arch/i386/boot/compressed/misc.c 2004-05-19 22:27:05.000000000 +0200 @@ -104,7 +104,7 @@ static void *malloc(int size); static void free(void *where); -static void puts(const char *); +static void putstr(const char *); extern int end; static long free_mem_ptr = (long)&end; @@ -165,7 +165,7 @@ vidmem[i] = ' '; } -static void puts(const char *s) +static void putstr(const char *s) { int x,y,pos; char c; @@ -283,9 +283,9 @@ static void error(char *x) { - puts("\n\n"); - puts(x); - puts("\n\n -- System halted"); + putstr("\n\n"); + putstr(x); + putstr("\n\n -- System halted"); while(1); /* Halt */ } @@ -369,9 +369,9 @@ else setup_output_buffer_if_we_run_high(mv); makecrc(); - puts("Uncompressing Linux... "); + putstr("Uncompressing Linux... "); gunzip(); - puts("Ok, booting the kernel.\n"); + putstr("Ok, booting the kernel.\n"); if (high_loaded) close_output_buffer_if_we_run_high(mv); return high_loaded; } diff -ruN linux-2.4.27-pre3/arch/i386/kernel/io_apic.c linux-2.4.27-pre3.gcc340-fixes/arch/i386/kernel/io_apic.c --- linux-2.4.27-pre3/arch/i386/kernel/io_apic.c 2004-05-19 21:25:49.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/arch/i386/kernel/io_apic.c 2004-05-19 22:27:05.000000000 +0200 @@ -1349,7 +1349,7 @@ #ifndef CONFIG_SMP -void send_IPI_self(int vector) +void fastcall send_IPI_self(int vector) { unsigned int cfg; diff -ruN linux-2.4.27-pre3/arch/i386/kernel/pci-pc.c linux-2.4.27-pre3.gcc340-fixes/arch/i386/kernel/pci-pc.c --- linux-2.4.27-pre3/arch/i386/kernel/pci-pc.c 2004-05-19 21:25:49.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/arch/i386/kernel/pci-pc.c 2004-05-19 22:27:05.000000000 +0200 @@ -1017,11 +1017,13 @@ "1:" : "=a" (ret), "=b" (map), - "+m" (opt) + "=m" (opt) : "0" (PCIBIOS_GET_ROUTING_OPTIONS), "1" (0), "D" ((long) &opt), - "S" (&pci_indirect)); + "S" (&pci_indirect), + "m" (opt) + : "memory"); DBG("OK ret=%d, size=%d, map=%x\n", ret, opt.size, map); if (ret & 0xff00) printk(KERN_ERR "PCI: Error %02x when fetching IRQ routing table.\n", (ret >> 8) & 0xff); diff -ruN linux-2.4.27-pre3/arch/i386/kernel/process.c linux-2.4.27-pre3.gcc340-fixes/arch/i386/kernel/process.c --- linux-2.4.27-pre3/arch/i386/kernel/process.c 2004-02-18 15:16:21.000000000 +0100 +++ linux-2.4.27-pre3.gcc340-fixes/arch/i386/kernel/process.c 2004-05-19 22:27:05.000000000 +0200 @@ -644,7 +644,7 @@ * More important, however, is the fact that this allows us much * more flexibility. */ -void __switch_to(struct task_struct *prev_p, struct task_struct *next_p) +void fastcall __switch_to(struct task_struct *prev_p, struct task_struct *next_p) { struct thread_struct *prev = &prev_p->thread, *next = &next_p->thread; diff -ruN linux-2.4.27-pre3/arch/i386/kernel/signal.c linux-2.4.27-pre3.gcc340-fixes/arch/i386/kernel/signal.c --- linux-2.4.27-pre3/arch/i386/kernel/signal.c 2002-08-07 00:52:18.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/arch/i386/kernel/signal.c 2004-05-19 22:27:05.000000000 +0200 @@ -581,7 +581,7 @@ * want to handle. Thus you cannot kill init even with a SIGKILL even by * mistake. */ -int do_signal(struct pt_regs *regs, sigset_t *oldset) +int fastcall do_signal(struct pt_regs *regs, sigset_t *oldset) { siginfo_t info; struct k_sigaction *ka; diff -ruN linux-2.4.27-pre3/arch/i386/kernel/smp.c linux-2.4.27-pre3.gcc340-fixes/arch/i386/kernel/smp.c --- linux-2.4.27-pre3/arch/i386/kernel/smp.c 2003-06-14 13:30:19.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/arch/i386/kernel/smp.c 2004-05-19 22:27:05.000000000 +0200 @@ -150,7 +150,7 @@ apic_write_around(APIC_ICR, cfg); } -void send_IPI_self(int vector) +void fastcall send_IPI_self(int vector) { __send_IPI_shortcut(APIC_DEST_SELF, vector); } diff -ruN linux-2.4.27-pre3/arch/i386/kernel/vm86.c linux-2.4.27-pre3.gcc340-fixes/arch/i386/kernel/vm86.c --- linux-2.4.27-pre3/arch/i386/kernel/vm86.c 2003-08-25 20:07:40.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/arch/i386/kernel/vm86.c 2004-05-19 22:27:05.000000000 +0200 @@ -91,7 +91,7 @@ #define VM86_REGS_SIZE2 (sizeof(struct kernel_vm86_regs) - VM86_REGS_SIZE1) struct pt_regs * FASTCALL(save_v86_state(struct kernel_vm86_regs * regs)); -struct pt_regs * save_v86_state(struct kernel_vm86_regs * regs) +struct pt_regs * fastcall save_v86_state(struct kernel_vm86_regs * regs) { struct tss_struct *tss; struct pt_regs *ret; diff -ruN linux-2.4.27-pre3/arch/ppc/kernel/ppc_htab.c linux-2.4.27-pre3.gcc340-fixes/arch/ppc/kernel/ppc_htab.c --- linux-2.4.27-pre3/arch/ppc/kernel/ppc_htab.c 2004-02-18 15:16:22.000000000 +0100 +++ linux-2.4.27-pre3.gcc340-fixes/arch/ppc/kernel/ppc_htab.c 2004-05-19 22:27:05.000000000 +0200 @@ -488,7 +488,7 @@ if (!isspace(c)) break; left--; - ((char *) buffer)++; + buffer++; } if (!left) break; diff -ruN linux-2.4.27-pre3/arch/x86_64/boot/compressed/misc.c linux-2.4.27-pre3.gcc340-fixes/arch/x86_64/boot/compressed/misc.c --- linux-2.4.27-pre3/arch/x86_64/boot/compressed/misc.c 2003-06-14 13:30:20.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/arch/x86_64/boot/compressed/misc.c 2004-05-19 22:27:05.000000000 +0200 @@ -96,7 +96,7 @@ static void gzip_mark(void **); static void gzip_release(void **); -static void puts(const char *); +static void putstr(const char *); extern int end; static long free_mem_ptr = (long)&end; @@ -157,7 +157,7 @@ vidmem[i] = ' '; } -static void puts(const char *s) +static void putstr(const char *s) { int x,y,pos; char c; @@ -275,9 +275,9 @@ static void error(char *x) { - puts("\n\n"); - puts(x); - puts("\n\n -- System halted"); + putstr("\n\n"); + putstr(x); + putstr("\n\n -- System halted"); while(1); } @@ -351,9 +351,9 @@ else setup_output_buffer_if_we_run_high(mv); makecrc(); - puts(".\nDecompressing Linux..."); + putstr(".\nDecompressing Linux..."); gunzip(); - puts("done.\nBooting the kernel.\n"); + putstr("done.\nBooting the kernel.\n"); if (high_loaded) close_output_buffer_if_we_run_high(mv); return high_loaded; } diff -ruN linux-2.4.27-pre3/arch/x86_64/ia32/ia32_ioctl.c linux-2.4.27-pre3.gcc340-fixes/arch/x86_64/ia32/ia32_ioctl.c --- linux-2.4.27-pre3/arch/x86_64/ia32/ia32_ioctl.c 2004-04-14 20:22:20.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/arch/x86_64/ia32/ia32_ioctl.c 2004-05-19 22:27:05.000000000 +0200 @@ -1171,6 +1171,7 @@ case FDDEFPRM32: case FDGETPRM32: { + u32 name; struct floppy_struct *f; f = karg = kmalloc(sizeof(struct floppy_struct), GFP_KERNEL); @@ -1187,7 +1188,8 @@ err |= __get_user(f->rate, &((struct floppy_struct32 *)arg)->rate); err |= __get_user(f->spec1, &((struct floppy_struct32 *)arg)->spec1); err |= __get_user(f->fmt_gap, &((struct floppy_struct32 *)arg)->fmt_gap); - err |= __get_user((u64)f->name, &((struct floppy_struct32 *)arg)->name); + err |= __get_user(name, &((struct floppy_struct32 *)arg)->name); + f->name = (void*)(u64)name; if (err) { err = -EFAULT; goto out; @@ -2726,20 +2728,23 @@ { struct blkpg_ioctl_arg a; struct blkpg_partition p; + struct blkpg_partition *up32; + u32 udata; int err; mm_segment_t old_fs = get_fs(); err = get_user(a.op, &arg->op); err |= __get_user(a.flags, &arg->flags); err |= __get_user(a.datalen, &arg->datalen); - err |= __get_user((long)a.data, &arg->data); + err |= __get_user(udata, &arg->data); + up32 = (void*)(u64)udata; if (err) return err; switch (a.op) { case BLKPG_ADD_PARTITION: case BLKPG_DEL_PARTITION: if (a.datalen < sizeof(struct blkpg_partition)) return -EINVAL; - if (copy_from_user(&p, a.data, sizeof(struct blkpg_partition))) + if (copy_from_user(&p, up32, sizeof(struct blkpg_partition))) return -EFAULT; a.data = &p; set_fs (KERNEL_DS); diff -ruN linux-2.4.27-pre3/arch/x86_64/ia32/sys_ia32.c linux-2.4.27-pre3.gcc340-fixes/arch/x86_64/ia32/sys_ia32.c --- linux-2.4.27-pre3/arch/x86_64/ia32/sys_ia32.c 2004-04-14 20:22:20.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/arch/x86_64/ia32/sys_ia32.c 2004-05-19 22:27:05.000000000 +0200 @@ -384,12 +384,16 @@ return -EINVAL; if (act) { + u32 handler, restorer; + if (verify_area(VERIFY_READ, act, sizeof(*act)) || - __get_user((long)new_ka.sa.sa_handler, &act->sa_handler) || + __get_user(handler, &act->sa_handler) || __get_user(new_ka.sa.sa_flags, &act->sa_flags) || - __get_user((long)new_ka.sa.sa_restorer, &act->sa_restorer)|| + __get_user(restorer, &act->sa_restorer)|| __copy_from_user(&set32, &act->sa_mask, sizeof(sigset32_t))) return -EFAULT; + new_ka.sa.sa_handler = (void*)(u64)handler; + new_ka.sa.sa_restorer = (void*)(u64)restorer; /* FIXME: here we rely on _IA32_NSIG_WORS to be >= than _NSIG_WORDS << 1 */ switch (_NSIG_WORDS) { @@ -441,13 +445,16 @@ if (act) { old_sigset32_t mask; + u32 handler, restorer; if (verify_area(VERIFY_READ, act, sizeof(*act)) || - __get_user((long)new_ka.sa.sa_handler, &act->sa_handler) || + __get_user(handler, &act->sa_handler) || __get_user(new_ka.sa.sa_flags, &act->sa_flags) || - __get_user((long)new_ka.sa.sa_restorer, &act->sa_restorer) || + __get_user(restorer, &act->sa_restorer) || __get_user(mask, &act->sa_mask)) return -EFAULT; + new_ka.sa.sa_handler = (void*)(u64)handler; + new_ka.sa.sa_restorer = (void*)(u64)restorer; siginitset(&new_ka.sa.sa_mask, mask); } @@ -778,7 +785,7 @@ put_user(reclen, &dirent->d_reclen); copy_to_user(dirent->d_name, name, namlen); put_user(0, dirent->d_name + namlen); - ((char *) dirent) += reclen; + dirent = (void*)dirent + reclen; buf->current_dir = dirent; buf->count -= reclen; return 0; diff -ruN linux-2.4.27-pre3/arch/x86_64/kernel/x8664_ksyms.c linux-2.4.27-pre3.gcc340-fixes/arch/x86_64/kernel/x8664_ksyms.c --- linux-2.4.27-pre3/arch/x86_64/kernel/x8664_ksyms.c 2004-04-14 20:22:20.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/arch/x86_64/kernel/x8664_ksyms.c 2004-05-19 22:27:05.000000000 +0200 @@ -157,7 +157,7 @@ extern __kernel_size_t strlen(const char *); extern int strcmp(const char *,const char *); extern char * strcpy(char *,const char *); -extern char * bcopy(const char * src, char * dest, int count); +extern void bcopy(const void * src, void * dest, size_t count); EXPORT_SYMBOL_NOVERS(memcpy); EXPORT_SYMBOL_NOVERS(__memcpy); diff -ruN linux-2.4.27-pre3/arch/x86_64/lib/usercopy.c linux-2.4.27-pre3.gcc340-fixes/arch/x86_64/lib/usercopy.c --- linux-2.4.27-pre3/arch/x86_64/lib/usercopy.c 2004-04-14 20:22:20.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/arch/x86_64/lib/usercopy.c 2004-05-19 22:27:05.000000000 +0200 @@ -88,7 +88,7 @@ " .quad 1b,2b\n" ".previous" : [size8] "=c"(size), [dst] "=&D" (__d0) - : [size1] "r"(size & 7), "[size8]" (size / 8), "[dst] "(addr), + : [size1] "r"(size & 7), "[size8]" (size / 8), "[dst]"(addr), [zero] "r" (0UL), [eight] "r" (8UL)); return size; } diff -ruN linux-2.4.27-pre3/drivers/atm/eni.c linux-2.4.27-pre3.gcc340-fixes/drivers/atm/eni.c --- linux-2.4.27-pre3/drivers/atm/eni.c 2003-11-29 00:28:11.000000000 +0100 +++ linux-2.4.27-pre3.gcc340-fixes/drivers/atm/eni.c 2004-05-19 22:27:05.000000000 +0200 @@ -1879,7 +1879,7 @@ DPRINTK("eni_close: done waiting\n"); /* deallocate memory */ kfree(ENI_VCC(vcc)); - ENI_VCC(vcc) = NULL; + vcc->dev_data = NULL; clear_bit(ATM_VF_ADDR,&vcc->flags); /*foo();*/ } @@ -1951,7 +1951,7 @@ DPRINTK(">eni_open\n"); EVENT("eni_open\n",0,0); - if (!test_bit(ATM_VF_PARTIAL,&vcc->flags)) ENI_VCC(vcc) = NULL; + if (!test_bit(ATM_VF_PARTIAL,&vcc->flags)) vcc->dev_data = NULL; eni_dev = ENI_DEV(vcc->dev); error = get_ci(vcc,&vpi,&vci); if (error) return error; @@ -1966,7 +1966,7 @@ if (!test_bit(ATM_VF_PARTIAL,&vcc->flags)) { eni_vcc = kmalloc(sizeof(struct eni_vcc),GFP_KERNEL); if (!eni_vcc) return -ENOMEM; - ENI_VCC(vcc) = eni_vcc; + vcc->dev_data = eni_vcc; eni_vcc->tx = NULL; /* for eni_close after open_rx */ if ((error = open_rx_first(vcc))) { eni_close(vcc); @@ -2302,7 +2302,7 @@ if (!dev) goto out2; pci_set_drvdata(pci_dev, dev); eni_dev->pci_dev = pci_dev; - ENI_DEV(dev) = eni_dev; + dev->dev_data = eni_dev; eni_dev->asic = ent->driver_data; error = eni_do_init(dev); if (error) goto out3; diff -ruN linux-2.4.27-pre3/drivers/atm/suni.c linux-2.4.27-pre3.gcc340-fixes/drivers/atm/suni.c --- linux-2.4.27-pre3/drivers/atm/suni.c 2003-06-14 13:30:20.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/drivers/atm/suni.c 2004-05-19 22:27:05.000000000 +0200 @@ -230,7 +230,7 @@ unsigned long flags; int first; - if (!(PRIV(dev) = kmalloc(sizeof(struct suni_priv),GFP_KERNEL))) + if (!(dev->phy_data = kmalloc(sizeof(struct suni_priv),GFP_KERNEL))) return -ENOMEM; PRIV(dev)->dev = dev; diff -ruN linux-2.4.27-pre3/drivers/char/drm/drm_dma.h linux-2.4.27-pre3.gcc340-fixes/drivers/char/drm/drm_dma.h --- linux-2.4.27-pre3/drivers/char/drm/drm_dma.h 2003-11-29 00:28:11.000000000 +0100 +++ linux-2.4.27-pre3.gcc340-fixes/drivers/char/drm/drm_dma.h 2004-05-19 22:27:05.000000000 +0200 @@ -648,7 +648,7 @@ * for the same vblank sequence number; nothing to be done in * that case */ - list_for_each( ( (struct list_head *) vbl_sig ), &dev->vbl_sigs.head ) { + list_for_each_entry( vbl_sig, &dev->vbl_sigs.head, head ) { if (vbl_sig->sequence == vblwait.request.sequence && vbl_sig->info.si_signo == vblwait.request.signal && vbl_sig->task == current) @@ -699,19 +699,20 @@ void DRM(vbl_send_signals)( drm_device_t *dev ) { - struct list_head *tmp; + struct list_head *list, *tmp; drm_vbl_sig_t *vbl_sig; unsigned int vbl_seq = atomic_read( &dev->vbl_received ); unsigned long flags; spin_lock_irqsave( &dev->vbl_lock, flags ); - list_for_each_safe( ( (struct list_head *) vbl_sig ), tmp, &dev->vbl_sigs.head ) { + list_for_each_safe( list, tmp, &dev->vbl_sigs.head ) { + vbl_sig = list_entry( list, drm_vbl_sig_t, head ); if ( ( vbl_seq - vbl_sig->sequence ) <= (1<<23) ) { vbl_sig->info.si_code = vbl_seq; send_sig_info( vbl_sig->info.si_signo, &vbl_sig->info, vbl_sig->task ); - list_del( (struct list_head *) vbl_sig ); + list_del( list ); kfree( vbl_sig ); diff -ruN linux-2.4.27-pre3/drivers/char/drm/radeon_state.c linux-2.4.27-pre3.gcc340-fixes/drivers/char/drm/radeon_state.c --- linux-2.4.27-pre3/drivers/char/drm/radeon_state.c 2003-11-29 00:28:11.000000000 +0100 +++ linux-2.4.27-pre3.gcc340-fixes/drivers/char/drm/radeon_state.c 2004-05-19 22:27:05.000000000 +0200 @@ -1223,7 +1223,7 @@ /* Update the input parameters for next time */ image->y += height; image->height -= height; - (const u8 *)image->data += size; + image->data = (const u8 *)image->data + size; } while (image->height > 0); /* Flush the pixel cache after the blit completes. This ensures diff -ruN linux-2.4.27-pre3/drivers/char/ftape/lowlevel/ftape-bsm.c linux-2.4.27-pre3.gcc340-fixes/drivers/char/ftape/lowlevel/ftape-bsm.c --- linux-2.4.27-pre3/drivers/char/ftape/lowlevel/ftape-bsm.c 2000-10-31 23:34:16.000000000 +0100 +++ linux-2.4.27-pre3.gcc340-fixes/drivers/char/ftape/lowlevel/ftape-bsm.c 2004-05-19 22:27:05.000000000 +0200 @@ -203,6 +203,7 @@ ft_format_code == fmt_1100ft) { SectorCount *ptr = (SectorCount *)bad_sector_map; unsigned int sector; + __u16 *ptr16; while((sector = get_sector(ptr++)) != 0) { if ((ft_format_code == fmt_big || @@ -218,9 +219,10 @@ } /* Display old ftape's end-of-file marks */ - while ((sector = get_unaligned(((__u16*)ptr)++)) != 0) { + ptr16 = (__u16*)ptr; + while ((sector = get_unaligned(ptr16++)) != 0) { TRACE(ft_t_noise, "Old ftape eof mark: %4d/%2d", - sector, get_unaligned(((__u16*)ptr)++)); + sector, get_unaligned(ptr16++)); } } else { /* fixed size format */ for (i = ft_first_data_segment; diff -ruN linux-2.4.27-pre3/drivers/char/ftape/lowlevel/ftape-bsm.h linux-2.4.27-pre3.gcc340-fixes/drivers/char/ftape/lowlevel/ftape-bsm.h --- linux-2.4.27-pre3/drivers/char/ftape/lowlevel/ftape-bsm.h 1997-11-25 23:45:27.000000000 +0100 +++ linux-2.4.27-pre3.gcc340-fixes/drivers/char/ftape/lowlevel/ftape-bsm.h 2004-05-19 22:27:05.000000000 +0200 @@ -47,7 +47,7 @@ */ typedef struct NewSectorMap { __u8 bytes[3]; -} SectorCount __attribute__((packed)); +} SectorCount; /* diff -ruN linux-2.4.27-pre3/drivers/char/ftape/zftape/zftape-eof.c linux-2.4.27-pre3.gcc340-fixes/drivers/char/ftape/zftape/zftape-eof.c --- linux-2.4.27-pre3/drivers/char/ftape/zftape/zftape-eof.c 1999-11-24 18:54:20.000000000 +0100 +++ linux-2.4.27-pre3.gcc340-fixes/drivers/char/ftape/zftape/zftape-eof.c 2004-05-19 22:27:05.000000000 +0200 @@ -123,7 +123,7 @@ while (ptr + 3 < limit) { if (get_unaligned((__u32*)ptr)) { - ++(__u32*)ptr; + ptr += sizeof(__u32); } else { return ptr; } diff -ruN linux-2.4.27-pre3/drivers/isdn/divert/divert_procfs.c linux-2.4.27-pre3.gcc340-fixes/drivers/isdn/divert/divert_procfs.c --- linux-2.4.27-pre3/drivers/isdn/divert/divert_procfs.c 2001-12-21 23:19:55.000000000 +0100 +++ linux-2.4.27-pre3.gcc340-fixes/drivers/isdn/divert/divert_procfs.c 2004-05-19 22:27:05.000000000 +0200 @@ -91,7 +91,7 @@ return (0); inf->usage_cnt--; /* new usage count */ - (struct divert_info **) file->private_data = &inf->next; /* next structure */ + file->private_data = &inf->next; /* next structure */ if ((len = strlen(inf->info_start)) <= count) { if (copy_to_user(buf, inf->info_start, len)) return -EFAULT; @@ -140,9 +140,9 @@ cli(); if_used++; if (divert_info_head) - (struct divert_info **) filep->private_data = &(divert_info_tail->next); + filep->private_data = &(divert_info_tail->next); else - (struct divert_info **) filep->private_data = &divert_info_head; + filep->private_data = &divert_info_head; restore_flags(flags); /* start_divert(); */ unlock_kernel(); diff -ruN linux-2.4.27-pre3/drivers/isdn/hisax/callc.c linux-2.4.27-pre3.gcc340-fixes/drivers/isdn/hisax/callc.c --- linux-2.4.27-pre3/drivers/isdn/hisax/callc.c 2001-12-21 23:19:55.000000000 +0100 +++ linux-2.4.27-pre3.gcc340-fixes/drivers/isdn/hisax/callc.c 2004-05-19 22:27:05.000000000 +0200 @@ -925,7 +925,7 @@ ic.driver = cs->myid; ic.command = ISDN_STAT_REDIR; ic.arg = chan; - (ulong)(ic.parm.num[0]) = result; + ic.parm.num[0] = result; cs->iif.statcallb(&ic); } /* stat_redir_result */ diff -ruN linux-2.4.27-pre3/drivers/parport/parport_pc.c linux-2.4.27-pre3.gcc340-fixes/drivers/parport/parport_pc.c --- linux-2.4.27-pre3/drivers/parport/parport_pc.c 2003-06-14 13:30:24.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/drivers/parport/parport_pc.c 2004-05-19 22:27:05.000000000 +0200 @@ -414,7 +414,8 @@ left -= 16; } else { /* grab single byte from the warp fifo */ - *((char *)buf)++ = inb (EPPDATA (port)); + *((char *)buf) = inb (EPPDATA (port)); + buf++; got++; left--; } @@ -441,7 +442,8 @@ return length; } for (; got < length; got++) { - *((char*)buf)++ = inb (EPPDATA(port)); + *((char*)buf) = inb (EPPDATA(port)); + buf++; if (inb (STATUS (port)) & 0x01) { /* EPP timeout */ clear_epp_timeout (port); @@ -470,7 +472,8 @@ return length; } for (; written < length; written++) { - outb (*((char*)buf)++, EPPDATA(port)); + outb (*((char*)buf), EPPDATA(port)); + buf++; if (inb (STATUS(port)) & 0x01) { clear_epp_timeout (port); break; @@ -494,7 +497,8 @@ return length; } for (; got < length; got++) { - *((char*)buf)++ = inb (EPPADDR (port)); + *((char*)buf) = inb (EPPADDR (port)); + buf++; if (inb (STATUS (port)) & 0x01) { clear_epp_timeout (port); break; @@ -519,7 +523,8 @@ return length; } for (; written < length; written++) { - outb (*((char*)buf)++, EPPADDR (port)); + outb (*((char*)buf), EPPADDR (port)); + buf++; if (inb (STATUS (port)) & 0x01) { clear_epp_timeout (port); break; diff -ruN linux-2.4.27-pre3/drivers/pcmcia/bulkmem.c linux-2.4.27-pre3.gcc340-fixes/drivers/pcmcia/bulkmem.c --- linux-2.4.27-pre3/drivers/pcmcia/bulkmem.c 2002-11-30 17:12:26.000000000 +0100 +++ linux-2.4.27-pre3.gcc340-fixes/drivers/pcmcia/bulkmem.c 2004-05-19 22:27:05.000000000 +0200 @@ -301,7 +301,7 @@ { window_handle_t w; int ret = pcmcia_request_window(a1, a2, &w); - (window_handle_t *)a1 = w; + a1 = w; return ret; } break; diff -ruN linux-2.4.27-pre3/drivers/usb/hid-core.c linux-2.4.27-pre3.gcc340-fixes/drivers/usb/hid-core.c --- linux-2.4.27-pre3/drivers/usb/hid-core.c 2004-04-14 20:22:20.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/drivers/usb/hid-core.c 2004-05-19 22:27:05.000000000 +0200 @@ -620,14 +620,16 @@ case 2: if ((end - start) >= 2) { - item->data.u16 = le16_to_cpu( get_unaligned(((__u16*)start)++)); + item->data.u16 = le16_to_cpu(get_unaligned((__u16*)start)); + start = (__u8 *)((__u16 *)start + 1); return start; } case 3: item->size++; if ((end - start) >= 4) { - item->data.u32 = le32_to_cpu( get_unaligned(((__u32*)start)++)); + item->data.u32 = le32_to_cpu(get_unaligned((__u32*)start)); + start = (__u8 *)((__u32 *)start + 1); return start; } } diff -ruN linux-2.4.27-pre3/drivers/usb/storage/scsiglue.c linux-2.4.27-pre3.gcc340-fixes/drivers/usb/storage/scsiglue.c --- linux-2.4.27-pre3/drivers/usb/storage/scsiglue.c 2004-05-19 21:25:49.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/drivers/usb/storage/scsiglue.c 2004-05-19 22:27:09.000000000 +0200 @@ -127,7 +127,7 @@ wait_for_completion(&(us->notify)); /* remove the pointer to the data structure we were using */ - (struct us_data*)psh->hostdata[0] = NULL; + psh->hostdata[0] = (unsigned long)NULL; /* we always have a successful release */ return 0; diff -ruN linux-2.4.27-pre3/drivers/usb/storage/usb.c linux-2.4.27-pre3.gcc340-fixes/drivers/usb/storage/usb.c --- linux-2.4.27-pre3/drivers/usb/storage/usb.c 2004-05-19 21:25:49.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/drivers/usb/storage/usb.c 2004-05-19 22:27:05.000000000 +0200 @@ -994,7 +994,7 @@ * the host controller thread in us_detect. But how else are * we to do it? */ - (struct us_data *)ss->htmplt.proc_dir = ss; + ss->htmplt.proc_dir = (void *)ss; /* Just before we start our control thread, initialize * the device if it needs initialization */ diff -ruN linux-2.4.27-pre3/drivers/video/fbcon.c linux-2.4.27-pre3.gcc340-fixes/drivers/video/fbcon.c --- linux-2.4.27-pre3/drivers/video/fbcon.c 2003-08-25 20:07:46.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/drivers/video/fbcon.c 2004-05-19 22:27:05.000000000 +0200 @@ -1877,7 +1877,10 @@ font length must be multiple of 256, at least. And 256 is multiple of 4 */ k = 0; - while (p > new_data) k += *--(u32 *)p; + while (p > new_data) { + p = (u8 *)((u32 *)p - 1); + k += *(u32 *) p; + } FNTSUM(new_data) = k; /* Check if the same font is on some other console already */ for (i = 0; i < MAX_NR_CONSOLES; i++) { diff -ruN linux-2.4.27-pre3/fs/buffer.c linux-2.4.27-pre3.gcc340-fixes/fs/buffer.c --- linux-2.4.27-pre3/fs/buffer.c 2004-05-19 21:25:49.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/fs/buffer.c 2004-05-19 22:27:05.000000000 +0200 @@ -160,7 +160,7 @@ ll_rw_block(WRITE, 1, &bh); } -void unlock_buffer(struct buffer_head *bh) +void fastcall unlock_buffer(struct buffer_head *bh) { clear_bit(BH_Wait_IO, &bh->b_state); clear_bit(BH_Launder, &bh->b_state); @@ -649,7 +649,7 @@ return bh; } -void buffer_insert_list(struct buffer_head *bh, struct list_head *list) +void fastcall buffer_insert_list(struct buffer_head *bh, struct list_head *list) { spin_lock(&lru_list_lock); if (buffer_attached(bh)) @@ -1092,7 +1092,7 @@ } EXPORT_SYMBOL(balance_dirty); -inline void __mark_dirty(struct buffer_head *bh) +inline void fastcall __mark_dirty(struct buffer_head *bh) { bh->b_flushtime = jiffies + bdf_prm.b_un.age_buffer; refile_buffer(bh); @@ -1100,13 +1100,13 @@ /* atomic version, the user must call balance_dirty() by hand as soon as it become possible to block */ -void __mark_buffer_dirty(struct buffer_head *bh) +void fastcall __mark_buffer_dirty(struct buffer_head *bh) { if (!atomic_set_buffer_dirty(bh)) __mark_dirty(bh); } -void mark_buffer_dirty(struct buffer_head *bh) +void fastcall mark_buffer_dirty(struct buffer_head *bh) { if (!atomic_set_buffer_dirty(bh)) { if (block_dump) @@ -2730,7 +2730,7 @@ * obtain a reference to a buffer head within a page. So we must * lock out all of these paths to cleanly toss the page. */ -int try_to_free_buffers(struct page * page, unsigned int gfp_mask) +int fastcall try_to_free_buffers(struct page * page, unsigned int gfp_mask) { struct buffer_head * tmp, * bh = page->buffers; diff -ruN linux-2.4.27-pre3/fs/file_table.c linux-2.4.27-pre3.gcc340-fixes/fs/file_table.c --- linux-2.4.27-pre3/fs/file_table.c 2002-11-30 17:12:28.000000000 +0100 +++ linux-2.4.27-pre3.gcc340-fixes/fs/file_table.c 2004-05-19 22:27:05.000000000 +0200 @@ -97,7 +97,7 @@ return 0; } -void fput(struct file * file) +void fastcall fput(struct file * file) { struct dentry * dentry = file->f_dentry; struct vfsmount * mnt = file->f_vfsmnt; @@ -126,7 +126,7 @@ } } -struct file * fget(unsigned int fd) +struct file * fastcall fget(unsigned int fd) { struct file * file; struct files_struct *files = current->files; diff -ruN linux-2.4.27-pre3/fs/hfs/file_hdr.c linux-2.4.27-pre3.gcc340-fixes/fs/hfs/file_hdr.c --- linux-2.4.27-pre3/fs/hfs/file_hdr.c 2001-08-16 23:47:02.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/fs/hfs/file_hdr.c 2004-05-19 22:27:09.000000000 +0200 @@ -241,7 +241,9 @@ if (HFS_NEW(new)) { memcpy(new, old, sizeof(*new)); for (lcv = 0; lcv < new->entries; ++lcv) { - (char *)(new->order[lcv]) += (char *)new - (char *)old; + new->order[lcv] = (struct hfs_hdr_descr *) + ((char *)(new->order[lcv]) + + ((char *)new - (char *)old)); } } return new; diff -ruN linux-2.4.27-pre3/fs/namei.c linux-2.4.27-pre3.gcc340-fixes/fs/namei.c --- linux-2.4.27-pre3/fs/namei.c 2003-08-25 20:07:46.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/fs/namei.c 2004-05-19 22:27:05.000000000 +0200 @@ -447,7 +447,7 @@ * * We expect 'base' to be positive and a directory. */ -int link_path_walk(const char * name, struct nameidata *nd) +int fastcall link_path_walk(const char * name, struct nameidata *nd) { struct dentry *dentry; struct inode *inode; @@ -653,7 +653,7 @@ return err; } -int path_walk(const char * name, struct nameidata *nd) +int fastcall path_walk(const char * name, struct nameidata *nd) { current->total_link_count = 0; return link_path_walk(name, nd); @@ -741,7 +741,7 @@ } /* SMP-safe */ -int path_lookup(const char *path, unsigned flags, struct nameidata *nd) +int fastcall path_lookup(const char *path, unsigned flags, struct nameidata *nd) { int error = 0; if (path_init(path, flags, nd)) @@ -751,7 +751,7 @@ /* SMP-safe */ -int path_init(const char *name, unsigned int flags, struct nameidata *nd) +int fastcall path_init(const char *name, unsigned int flags, struct nameidata *nd) { nd->last_type = LAST_ROOT; /* if there are only slashes... */ nd->flags = flags; @@ -847,7 +847,7 @@ * that namei follows links, while lnamei does not. * SMP-safe */ -int __user_walk(const char *name, unsigned flags, struct nameidata *nd) +int fastcall __user_walk(const char *name, unsigned flags, struct nameidata *nd) { char *tmp; int err; diff -ruN linux-2.4.27-pre3/fs/ntfs/fs.c linux-2.4.27-pre3.gcc340-fixes/fs/ntfs/fs.c --- linux-2.4.27-pre3/fs/ntfs/fs.c 2004-02-18 15:16:24.000000000 +0100 +++ linux-2.4.27-pre3.gcc340-fixes/fs/ntfs/fs.c 2004-05-19 22:27:05.000000000 +0200 @@ -1045,7 +1045,7 @@ } ntfs_debug(DEBUG_OTHER, "$Mft at cluster 0x%lx\n", vol->mft_lcn); brelse(bh); - NTFS_SB(vol) = sb; + vol->sb = sb; if (vol->cluster_size > PAGE_SIZE) { ntfs_error("Partition cluster size is not supported yet (it " "is > max kernel blocksize).\n"); diff -ruN linux-2.4.27-pre3/fs/ntfs/util.c linux-2.4.27-pre3.gcc340-fixes/fs/ntfs/util.c --- linux-2.4.27-pre3/fs/ntfs/util.c 2001-08-16 23:47:02.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/fs/ntfs/util.c 2004-05-19 22:27:05.000000000 +0200 @@ -165,13 +165,13 @@ void ntfs_put(ntfs_io *dest, void *src, ntfs_size_t n) { ntfs_memcpy(dest->param, src, n); - ((char*)dest->param) += n; + dest->param = (char*)dest->param + n; } void ntfs_get(void* dest, ntfs_io *src, ntfs_size_t n) { ntfs_memcpy(dest, src->param, n); - ((char*)src->param) += n; + src->param = (char*)src->param + n; } void *ntfs_calloc(int size) diff -ruN linux-2.4.27-pre3/fs/readdir.c linux-2.4.27-pre3.gcc340-fixes/fs/readdir.c --- linux-2.4.27-pre3/fs/readdir.c 2004-02-18 15:16:24.000000000 +0100 +++ linux-2.4.27-pre3.gcc340-fixes/fs/readdir.c 2004-05-19 22:27:05.000000000 +0200 @@ -264,7 +264,7 @@ put_user(reclen, &dirent->d_reclen); copy_to_user(dirent->d_name, name, namlen); put_user(0, dirent->d_name + namlen); - ((char *) dirent) += reclen; + dirent = (void*)dirent + reclen; buf->current_dir = dirent; buf->count -= reclen; return 0; @@ -347,7 +347,7 @@ copy_to_user(dirent, &d, NAME_OFFSET(&d)); copy_to_user(dirent->d_name, name, namlen); put_user(0, dirent->d_name + namlen); - ((char *) dirent) += reclen; + dirent = (void*)dirent + reclen; buf->current_dir = dirent; buf->count -= reclen; return 0; diff -ruN linux-2.4.27-pre3/include/asm-i386/apic.h linux-2.4.27-pre3.gcc340-fixes/include/asm-i386/apic.h --- linux-2.4.27-pre3/include/asm-i386/apic.h 2002-08-07 00:52:24.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/include/asm-i386/apic.h 2004-05-19 22:27:05.000000000 +0200 @@ -77,7 +77,7 @@ extern void smp_local_timer_interrupt (struct pt_regs * regs); extern void setup_APIC_clocks (void); extern void setup_apic_nmi_watchdog (void); -extern inline void nmi_watchdog_tick (struct pt_regs * regs); +extern void nmi_watchdog_tick (struct pt_regs * regs); extern int APIC_init_uniprocessor (void); extern void disable_APIC_timer(void); extern void enable_APIC_timer(void); diff -ruN linux-2.4.27-pre3/include/asm-i386/rwsem.h linux-2.4.27-pre3.gcc340-fixes/include/asm-i386/rwsem.h --- linux-2.4.27-pre3/include/asm-i386/rwsem.h 2002-11-30 17:12:29.000000000 +0100 +++ linux-2.4.27-pre3.gcc340-fixes/include/asm-i386/rwsem.h 2004-05-19 22:27:05.000000000 +0200 @@ -113,8 +113,8 @@ " jmp 1b\n" LOCK_SECTION_END "# ending down_read\n\t" - : "+m"(sem->count) - : "a"(sem) + : "=m"(sem->count) + : "a"(sem), "m"(sem->count) : "memory", "cc"); } @@ -151,8 +151,8 @@ tmp = RWSEM_ACTIVE_WRITE_BIAS; __asm__ __volatile__( "# beginning down_write\n\t" -LOCK_PREFIX " xadd %0,(%%eax)\n\t" /* subtract 0x0000ffff, returns the old value */ - " testl %0,%0\n\t" /* was the count 0 before? */ +LOCK_PREFIX " xadd %%edx,(%%eax)\n\t" /* subtract 0x0000ffff, returns the old value */ + " testl %%edx,%%edx\n\t" /* was the count 0 before? */ " jnz 2f\n\t" /* jump if we weren't granted the lock */ "1:\n\t" LOCK_SECTION_START("") @@ -163,8 +163,8 @@ " jmp 1b\n" LOCK_SECTION_END "# ending down_write" - : "+d"(tmp), "+m"(sem->count) - : "a"(sem) + : "=m"(sem->count), "=d"(tmp) + : "a"(sem), "1"(tmp), "m"(sem->count) : "memory", "cc"); } @@ -202,8 +202,8 @@ " jmp 1b\n" LOCK_SECTION_END "# ending __up_read\n" - : "+m"(sem->count), "+d"(tmp) - : "a"(sem) + : "=m"(sem->count), "=d"(tmp) + : "a"(sem), "1"(tmp), "m"(sem->count) : "memory", "cc"); } @@ -228,8 +228,8 @@ " jmp 1b\n" LOCK_SECTION_END "# ending __up_write\n" - : "+m"(sem->count) - : "a"(sem), "i"(-RWSEM_ACTIVE_WRITE_BIAS) + : "=m"(sem->count) + : "a"(sem), "i"(-RWSEM_ACTIVE_WRITE_BIAS), "m"(sem->count) : "memory", "cc", "edx"); } diff -ruN linux-2.4.27-pre3/include/asm-i386/unistd.h linux-2.4.27-pre3.gcc340-fixes/include/asm-i386/unistd.h --- linux-2.4.27-pre3/include/asm-i386/unistd.h 2002-11-30 17:12:29.000000000 +0100 +++ linux-2.4.27-pre3.gcc340-fixes/include/asm-i386/unistd.h 2004-05-19 22:27:05.000000000 +0200 @@ -372,7 +372,7 @@ static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp) static inline _syscall3(int,open,const char *,file,int,flag,int,mode) static inline _syscall1(int,close,int,fd) -static inline _syscall1(int,_exit,int,exitcode) +static inline _syscall1(void,_exit,int,exitcode) static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) static inline _syscall1(int,delete_module,const char *,name) diff -ruN linux-2.4.27-pre3/include/asm-ppc/unistd.h linux-2.4.27-pre3.gcc340-fixes/include/asm-ppc/unistd.h --- linux-2.4.27-pre3/include/asm-ppc/unistd.h 2003-11-29 00:28:14.000000000 +0100 +++ linux-2.4.27-pre3.gcc340-fixes/include/asm-ppc/unistd.h 2004-05-19 22:27:05.000000000 +0200 @@ -382,7 +382,7 @@ static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp) static inline _syscall3(int,open,const char *,file,int,flag,int,mode) static inline _syscall1(int,close,int,fd) -static inline _syscall1(int,_exit,int,exitcode) +static inline _syscall1(void,_exit,int,exitcode) static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) static inline _syscall1(int,delete_module,const char *,name) diff -ruN linux-2.4.27-pre3/include/asm-x86_64/unistd.h linux-2.4.27-pre3.gcc340-fixes/include/asm-x86_64/unistd.h --- linux-2.4.27-pre3/include/asm-x86_64/unistd.h 2004-02-18 15:16:24.000000000 +0100 +++ linux-2.4.27-pre3.gcc340-fixes/include/asm-x86_64/unistd.h 2004-05-19 22:27:05.000000000 +0200 @@ -673,7 +673,7 @@ } extern long sys_exit(int) __attribute__((noreturn)); -extern inline long exit(int error_code) +static inline void exit(int error_code) { sys_exit(error_code); } diff -ruN linux-2.4.27-pre3/include/linux/blkdev.h linux-2.4.27-pre3.gcc340-fixes/include/linux/blkdev.h --- linux-2.4.27-pre3/include/linux/blkdev.h 2004-02-18 15:16:24.000000000 +0100 +++ linux-2.4.27-pre3.gcc340-fixes/include/linux/blkdev.h 2004-05-19 22:27:05.000000000 +0200 @@ -233,7 +233,7 @@ extern void grok_partitions(struct gendisk *dev, int drive, unsigned minors, long size); extern void register_disk(struct gendisk *dev, kdev_t first, unsigned minors, struct block_device_operations *ops, long size); extern void generic_make_request(int rw, struct buffer_head * bh); -extern inline request_queue_t *blk_get_queue(kdev_t dev); +extern request_queue_t *blk_get_queue(kdev_t dev); extern void blkdev_release_request(struct request *); /* diff -ruN linux-2.4.27-pre3/include/linux/compiler.h linux-2.4.27-pre3.gcc340-fixes/include/linux/compiler.h --- linux-2.4.27-pre3/include/linux/compiler.h 2004-05-19 21:25:49.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/include/linux/compiler.h 2004-05-19 22:27:05.000000000 +0200 @@ -28,7 +28,7 @@ #endif /* __GNUC__ */ #if __GNUC__ == 3 -#if __GNUC_MINOR__ >= 1 +#if __GNUC_MINOR__ >= 1 && __GNUC_MINOR__ < 4 # define inline __inline__ __attribute__((always_inline)) # define __inline__ __inline__ __attribute__((always_inline)) # define __inline __inline__ __attribute__((always_inline)) diff -ruN linux-2.4.27-pre3/include/linux/ide.h linux-2.4.27-pre3.gcc340-fixes/include/linux/ide.h --- linux-2.4.27-pre3/include/linux/ide.h 2004-04-14 20:22:21.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/include/linux/ide.h 2004-05-19 22:27:05.000000000 +0200 @@ -1445,10 +1445,10 @@ void *special; } pkt_task_t; -extern inline void SELECT_DRIVE(ide_drive_t *); -extern inline void SELECT_INTERRUPT(ide_drive_t *); -extern inline void SELECT_MASK(ide_drive_t *, int); -extern inline void QUIRK_LIST(ide_drive_t *); +extern void SELECT_DRIVE(ide_drive_t *); +extern void SELECT_INTERRUPT(ide_drive_t *); +extern void SELECT_MASK(ide_drive_t *, int); +extern void QUIRK_LIST(ide_drive_t *); extern void ata_input_data(ide_drive_t *, void *, u32); extern void ata_output_data(ide_drive_t *, void *, u32); diff -ruN linux-2.4.27-pre3/include/linux/irq_cpustat.h linux-2.4.27-pre3.gcc340-fixes/include/linux/irq_cpustat.h --- linux-2.4.27-pre3/include/linux/irq_cpustat.h 2001-07-21 11:47:33.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/include/linux/irq_cpustat.h 2004-05-19 22:27:05.000000000 +0200 @@ -22,7 +22,7 @@ #ifdef CONFIG_SMP #define __IRQ_STAT(cpu, member) (irq_stat[cpu].member) #else -#define __IRQ_STAT(cpu, member) ((void)(cpu), irq_stat[0].member) +#define __IRQ_STAT(cpu, member) (irq_stat[((void)(cpu), 0)].member) #endif /* arch independent irq_stat fields */ diff -ruN linux-2.4.27-pre3/include/linux/kernel.h linux-2.4.27-pre3.gcc340-fixes/include/linux/kernel.h --- linux-2.4.27-pre3/include/linux/kernel.h 2004-05-19 21:25:49.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/include/linux/kernel.h 2004-05-19 22:27:05.000000000 +0200 @@ -51,8 +51,10 @@ #ifdef __i386__ #define FASTCALL(x) x __attribute__((regparm(3))) +#define fastcall __attribute__((regparm(3))) #else #define FASTCALL(x) x +#define fastcall #endif struct completion; diff -ruN linux-2.4.27-pre3/include/linux/sched.h linux-2.4.27-pre3.gcc340-fixes/include/linux/sched.h --- linux-2.4.27-pre3/include/linux/sched.h 2004-05-19 21:25:49.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/include/linux/sched.h 2004-05-19 22:27:05.000000000 +0200 @@ -763,7 +763,7 @@ extern void end_lazy_tlb(struct mm_struct *mm); /* mmdrop drops the mm and the page tables */ -extern inline void FASTCALL(__mmdrop(struct mm_struct *)); +extern void FASTCALL(__mmdrop(struct mm_struct *)); static inline void mmdrop(struct mm_struct * mm) { if (atomic_dec_and_test(&mm->mm_count)) diff -ruN linux-2.4.27-pre3/include/linux/smp.h linux-2.4.27-pre3.gcc340-fixes/include/linux/smp.h --- linux-2.4.27-pre3/include/linux/smp.h 2000-09-09 12:49:41.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/include/linux/smp.h 2004-05-19 22:27:05.000000000 +0200 @@ -26,7 +26,7 @@ /* * sends a 'reschedule' event to another CPU: */ -extern void FASTCALL(smp_send_reschedule(int cpu)); +extern void smp_send_reschedule(int cpu); /* diff -ruN linux-2.4.27-pre3/include/net/ip.h linux-2.4.27-pre3.gcc340-fixes/include/net/ip.h --- linux-2.4.27-pre3/include/net/ip.h 2003-11-29 00:28:14.000000000 +0100 +++ linux-2.4.27-pre3.gcc340-fixes/include/net/ip.h 2004-05-19 22:27:05.000000000 +0200 @@ -137,7 +137,7 @@ void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *arg, unsigned int len); -extern __inline__ int ip_finish_output(struct sk_buff *skb); +extern int ip_finish_output(struct sk_buff *skb); struct ipv4_config { diff -ruN linux-2.4.27-pre3/kernel/fork.c linux-2.4.27-pre3.gcc340-fixes/kernel/fork.c --- linux-2.4.27-pre3/kernel/fork.c 2004-04-14 20:22:21.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/kernel/fork.c 2004-05-19 22:27:05.000000000 +0200 @@ -39,7 +39,7 @@ struct task_struct *pidhash[PIDHASH_SZ]; -void add_wait_queue(wait_queue_head_t *q, wait_queue_t * wait) +void fastcall add_wait_queue(wait_queue_head_t *q, wait_queue_t * wait) { unsigned long flags; @@ -49,7 +49,7 @@ wq_write_unlock_irqrestore(&q->lock, flags); } -void add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t * wait) +void fastcall add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t * wait) { unsigned long flags; @@ -59,7 +59,7 @@ wq_write_unlock_irqrestore(&q->lock, flags); } -void remove_wait_queue(wait_queue_head_t *q, wait_queue_t * wait) +void fastcall remove_wait_queue(wait_queue_head_t *q, wait_queue_t * wait) { unsigned long flags; @@ -264,7 +264,7 @@ * is dropped: either by a lazy thread or by * mmput. Free the page directory and the mm. */ -inline void __mmdrop(struct mm_struct *mm) +void fastcall __mmdrop(struct mm_struct *mm) { BUG_ON(mm == &init_mm); pgd_free(mm->pgd); diff -ruN linux-2.4.27-pre3/kernel/sched.c linux-2.4.27-pre3.gcc340-fixes/kernel/sched.c --- linux-2.4.27-pre3/kernel/sched.c 2003-11-29 00:28:15.000000000 +0100 +++ linux-2.4.27-pre3.gcc340-fixes/kernel/sched.c 2004-05-19 22:27:05.000000000 +0200 @@ -209,7 +209,7 @@ */ static FASTCALL(void reschedule_idle(struct task_struct * p)); -static void reschedule_idle(struct task_struct * p) +static void fastcall reschedule_idle(struct task_struct * p) { #ifdef CONFIG_SMP int this_cpu = smp_processor_id(); @@ -367,7 +367,7 @@ return success; } -inline int wake_up_process(struct task_struct * p) +inline int fastcall wake_up_process(struct task_struct * p) { return try_to_wake_up(p, 0); } @@ -405,7 +405,7 @@ * * In all cases the return value is guaranteed to be non-negative. */ -signed long schedule_timeout(signed long timeout) +signed long fastcall schedule_timeout(signed long timeout) { struct timer_list timer; unsigned long expire; @@ -735,7 +735,7 @@ } } -void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr) +void fastcall __wake_up(wait_queue_head_t *q, unsigned int mode, int nr) { if (q) { unsigned long flags; @@ -745,7 +745,7 @@ } } -void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr) +void fastcall __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr) { if (q) { unsigned long flags; @@ -755,7 +755,7 @@ } } -void complete(struct completion *x) +void fastcall complete(struct completion *x) { unsigned long flags; @@ -765,7 +765,7 @@ spin_unlock_irqrestore(&x->wait.lock, flags); } -void wait_for_completion(struct completion *x) +void fastcall wait_for_completion(struct completion *x) { spin_lock_irq(&x->wait.lock); if (!x->done) { @@ -800,7 +800,7 @@ __remove_wait_queue(q, &wait); \ wq_write_unlock_irqrestore(&q->lock,flags); -void interruptible_sleep_on(wait_queue_head_t *q) +void fastcall interruptible_sleep_on(wait_queue_head_t *q) { SLEEP_ON_VAR @@ -811,7 +811,7 @@ SLEEP_ON_TAIL } -long interruptible_sleep_on_timeout(wait_queue_head_t *q, long timeout) +long fastcall interruptible_sleep_on_timeout(wait_queue_head_t *q, long timeout) { SLEEP_ON_VAR @@ -824,7 +824,7 @@ return timeout; } -void sleep_on(wait_queue_head_t *q) +void fastcall sleep_on(wait_queue_head_t *q) { SLEEP_ON_VAR @@ -835,7 +835,7 @@ SLEEP_ON_TAIL } -long sleep_on_timeout(wait_queue_head_t *q, long timeout) +long fastcall sleep_on_timeout(wait_queue_head_t *q, long timeout) { SLEEP_ON_VAR diff -ruN linux-2.4.27-pre3/kernel/softirq.c linux-2.4.27-pre3.gcc340-fixes/kernel/softirq.c --- linux-2.4.27-pre3/kernel/softirq.c 2002-11-30 17:12:32.000000000 +0100 +++ linux-2.4.27-pre3.gcc340-fixes/kernel/softirq.c 2004-05-19 22:27:05.000000000 +0200 @@ -111,7 +111,7 @@ /* * This function must run with irq disabled! */ -inline void cpu_raise_softirq(unsigned int cpu, unsigned int nr) +inline void fastcall cpu_raise_softirq(unsigned int cpu, unsigned int nr) { __cpu_raise_softirq(cpu, nr); @@ -128,7 +128,7 @@ wakeup_softirqd(cpu); } -void raise_softirq(unsigned int nr) +void fastcall raise_softirq(unsigned int nr) { unsigned long flags; @@ -149,7 +149,7 @@ struct tasklet_head tasklet_vec[NR_CPUS] __cacheline_aligned; struct tasklet_head tasklet_hi_vec[NR_CPUS] __cacheline_aligned; -void __tasklet_schedule(struct tasklet_struct *t) +void fastcall __tasklet_schedule(struct tasklet_struct *t) { int cpu = smp_processor_id(); unsigned long flags; @@ -161,7 +161,7 @@ local_irq_restore(flags); } -void __tasklet_hi_schedule(struct tasklet_struct *t) +void fastcall __tasklet_hi_schedule(struct tasklet_struct *t) { int cpu = smp_processor_id(); unsigned long flags; diff -ruN linux-2.4.27-pre3/kernel/sysctl.c linux-2.4.27-pre3.gcc340-fixes/kernel/sysctl.c --- linux-2.4.27-pre3/kernel/sysctl.c 2004-05-19 21:25:49.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/kernel/sysctl.c 2004-05-19 22:27:05.000000000 +0200 @@ -879,7 +879,7 @@ if (!isspace(c)) break; left--; - ((char *) buffer)++; + buffer++; } if (!left) break; @@ -1032,7 +1032,7 @@ if (!isspace(c)) break; left--; - ((char *) buffer)++; + buffer++; } if (!left) break; @@ -1133,7 +1133,7 @@ if (!isspace(c)) break; left--; - ((char *) buffer)++; + buffer++; } if (!left) break; diff -ruN linux-2.4.27-pre3/lib/brlock.c linux-2.4.27-pre3.gcc340-fixes/lib/brlock.c --- linux-2.4.27-pre3/lib/brlock.c 2001-11-23 22:40:15.000000000 +0100 +++ linux-2.4.27-pre3.gcc340-fixes/lib/brlock.c 2004-05-19 22:27:05.000000000 +0200 @@ -20,7 +20,7 @@ brlock_read_lock_t __brlock_array[NR_CPUS][__BR_IDX_MAX] = { [0 ... NR_CPUS-1] = { [0 ... __BR_IDX_MAX-1] = RW_LOCK_UNLOCKED } }; -void __br_write_lock (enum brlock_indices idx) +void fastcall __br_write_lock (enum brlock_indices idx) { int i; @@ -28,7 +28,7 @@ write_lock(&__brlock_array[cpu_logical_map(i)][idx]); } -void __br_write_unlock (enum brlock_indices idx) +void fastcall __br_write_unlock (enum brlock_indices idx) { int i; @@ -44,7 +44,7 @@ struct br_wrlock __br_write_locks[__BR_IDX_MAX] = { [0 ... __BR_IDX_MAX-1] = { SPIN_LOCK_UNLOCKED } }; -void __br_write_lock (enum brlock_indices idx) +void fastcall __br_write_lock (enum brlock_indices idx) { int i; @@ -59,7 +59,7 @@ } } -void __br_write_unlock (enum brlock_indices idx) +void fastcall __br_write_unlock (enum brlock_indices idx) { spin_unlock(&__br_write_locks[idx].lock); } diff -ruN linux-2.4.27-pre3/lib/crc32.c linux-2.4.27-pre3.gcc340-fixes/lib/crc32.c --- linux-2.4.27-pre3/lib/crc32.c 2004-04-14 20:22:21.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/lib/crc32.c 2004-05-19 22:27:05.000000000 +0200 @@ -99,7 +99,9 @@ /* Align it */ if(unlikely(((long)b)&3 && len)){ do { - DO_CRC(*((u8 *)b)++); + u8 *p = (u8 *)b; + DO_CRC(*p++); + b = (void *)p; } while ((--len) && ((long)b)&3 ); } if(likely(len >= 4)){ @@ -120,7 +122,9 @@ /* And the last few bytes */ if(len){ do { - DO_CRC(*((u8 *)b)++); + u8 *p = (u8 *)b; + DO_CRC(*p++); + b = (void *)p; } while (--len); } @@ -200,7 +204,9 @@ /* Align it */ if(unlikely(((long)b)&3 && len)){ do { - DO_CRC(*((u8 *)b)++); + u8 *p = (u8 *)b; + DO_CRC(*p++); + b = (u32 *)p; } while ((--len) && ((long)b)&3 ); } if(likely(len >= 4)){ @@ -221,7 +227,9 @@ /* And the last few bytes */ if(len){ do { - DO_CRC(*((u8 *)b)++); + u8 *p = (u8 *)b; + DO_CRC(*p++); + b = (void *)p; } while (--len); } return __be32_to_cpu(crc); diff -ruN linux-2.4.27-pre3/lib/rwsem.c linux-2.4.27-pre3.gcc340-fixes/lib/rwsem.c --- linux-2.4.27-pre3/lib/rwsem.c 2001-07-21 11:47:34.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/lib/rwsem.c 2004-05-19 22:27:05.000000000 +0200 @@ -152,7 +152,7 @@ /* * wait for the read lock to be granted */ -struct rw_semaphore *rwsem_down_read_failed(struct rw_semaphore *sem) +struct rw_semaphore * fastcall rwsem_down_read_failed(struct rw_semaphore *sem) { struct rwsem_waiter waiter; @@ -168,7 +168,7 @@ /* * wait for the write lock to be granted */ -struct rw_semaphore *rwsem_down_write_failed(struct rw_semaphore *sem) +struct rw_semaphore * fastcall rwsem_down_write_failed(struct rw_semaphore *sem) { struct rwsem_waiter waiter; @@ -185,7 +185,7 @@ * handle waking up a waiter on the semaphore * - up_read has decremented the active part of the count if we come here */ -struct rw_semaphore *rwsem_wake(struct rw_semaphore *sem) +struct rw_semaphore * fastcall rwsem_wake(struct rw_semaphore *sem) { rwsemtrace(sem,"Entering rwsem_wake"); diff -ruN linux-2.4.27-pre3/lib/string.c linux-2.4.27-pre3.gcc340-fixes/lib/string.c --- linux-2.4.27-pre3/lib/string.c 2002-08-07 00:52:26.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/lib/string.c 2004-05-19 22:27:05.000000000 +0200 @@ -380,14 +380,13 @@ * You should not use this function to access IO space, use memcpy_toio() * or memcpy_fromio() instead. */ -char * bcopy(const char * src, char * dest, int count) +void bcopy(const void * srcp, void * destp, size_t count) { - char *tmp = dest; + const char *src = srcp; + char *dest = destp; while (count--) - *tmp++ = *src++; - - return dest; + *dest++ = *src++; } #endif diff -ruN linux-2.4.27-pre3/mm/filemap.c linux-2.4.27-pre3.gcc340-fixes/mm/filemap.c --- linux-2.4.27-pre3/mm/filemap.c 2004-04-14 20:22:21.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/mm/filemap.c 2004-05-19 22:27:05.000000000 +0200 @@ -68,7 +68,7 @@ #define CLUSTER_OFFSET(x) (((x) >> page_cluster) << page_cluster) static void FASTCALL(add_page_to_hash_queue(struct page * page, struct page **p)); -static void add_page_to_hash_queue(struct page * page, struct page **p) +static void fastcall add_page_to_hash_queue(struct page * page, struct page **p) { struct page *next = *p; @@ -151,7 +151,7 @@ /* * Add a page to the dirty page list. */ -void set_page_dirty(struct page *page) +void fastcall set_page_dirty(struct page *page) { if (!test_and_set_bit(PG_dirty, &page->flags)) { struct address_space *mapping = page->mapping; @@ -260,7 +260,7 @@ } static int FASTCALL(truncate_list_pages(struct list_head *, unsigned long, unsigned *)); -static int truncate_list_pages(struct list_head *head, unsigned long start, unsigned *partial) +static int fastcall truncate_list_pages(struct list_head *head, unsigned long start, unsigned *partial) { struct list_head *curr; struct page * page; @@ -382,7 +382,7 @@ } static int FASTCALL(invalidate_list_pages2(struct list_head *)); -static int invalidate_list_pages2(struct list_head *head) +static int fastcall invalidate_list_pages2(struct list_head *head) { struct list_head *curr; struct page * page; @@ -755,7 +755,7 @@ * and schedules an I/O to read in its contents from disk. */ static int FASTCALL(page_cache_read(struct file * file, unsigned long offset)); -static int page_cache_read(struct file * file, unsigned long offset) +static int fastcall page_cache_read(struct file * file, unsigned long offset) { struct address_space *mapping = file->f_dentry->d_inode->i_mapping; struct page **hash = page_hash(mapping, offset); @@ -790,7 +790,7 @@ */ static int FASTCALL(read_cluster_nonblocking(struct file * file, unsigned long offset, unsigned long filesize)); -static int read_cluster_nonblocking(struct file * file, unsigned long offset, +static int fastcall read_cluster_nonblocking(struct file * file, unsigned long offset, unsigned long filesize) { unsigned long pages = CLUSTER_PAGES; @@ -871,7 +871,7 @@ * callbacks that would result into the blkdev layer waking * up the page after a queue unplug. */ -void wakeup_page_waiters(struct page * page) +void fastcall wakeup_page_waiters(struct page * page) { wait_queue_head_t * head; @@ -927,7 +927,7 @@ * of the waiters for all of the pages in the appropriate * wait queue are woken. */ -void unlock_page(struct page *page) +void fastcall unlock_page(struct page *page) { wait_queue_head_t *waitqueue = page_waitqueue(page); ClearPageLaunder(page); @@ -974,7 +974,7 @@ * Get an exclusive lock on the page, optimistically * assuming it's not locked.. */ -void lock_page(struct page *page) +void fastcall lock_page(struct page *page) { if (TryLockPage(page)) __lock_page(page); @@ -1025,7 +1025,7 @@ * during blocking operations.. */ static struct page * FASTCALL(__find_lock_page_helper(struct address_space *, unsigned long, struct page *)); -static struct page * __find_lock_page_helper(struct address_space *mapping, +static struct page * fastcall __find_lock_page_helper(struct address_space *mapping, unsigned long offset, struct page *hash) { struct page *page; @@ -1388,7 +1388,7 @@ * If it was already so marked, move it to the active queue and drop * the referenced bit. Otherwise, just mark it for future action.. */ -void mark_page_accessed(struct page *page) +void fastcall mark_page_accessed(struct page *page) { if (!PageActive(page) && PageReferenced(page)) { activate_page(page); diff -ruN linux-2.4.27-pre3/mm/memory.c linux-2.4.27-pre3.gcc340-fixes/mm/memory.c --- linux-2.4.27-pre3/mm/memory.c 2003-11-29 00:28:15.000000000 +0100 +++ linux-2.4.27-pre3.gcc340-fixes/mm/memory.c 2004-05-19 22:27:05.000000000 +0200 @@ -1396,7 +1396,7 @@ * On a two-level page table, this ends up actually being entirely * optimized away. */ -pmd_t *__pmd_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address) +pmd_t fastcall *__pmd_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address) { pmd_t *new; @@ -1430,7 +1430,7 @@ * We've already handled the fast-path in-line, and we own the * page table lock. */ -pte_t *pte_alloc(struct mm_struct *mm, pmd_t *pmd, unsigned long address) +pte_t fastcall *pte_alloc(struct mm_struct *mm, pmd_t *pmd, unsigned long address) { if (pmd_none(*pmd)) { pte_t *new; diff -ruN linux-2.4.27-pre3/mm/page_alloc.c linux-2.4.27-pre3.gcc340-fixes/mm/page_alloc.c --- linux-2.4.27-pre3/mm/page_alloc.c 2004-05-19 21:25:49.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/mm/page_alloc.c 2004-05-19 22:27:05.000000000 +0200 @@ -111,7 +111,7 @@ * -- wli */ -static void __free_pages_ok (struct page *page, unsigned int order) +static void fastcall __free_pages_ok (struct page *page, unsigned int order) { unsigned long index, page_idx, mask, flags; free_area_t *area; @@ -241,7 +241,7 @@ } static FASTCALL(struct page * rmqueue(zone_t *zone, unsigned int order)); -static struct page * rmqueue(zone_t *zone, unsigned int order) +static struct page * fastcall rmqueue(zone_t *zone, unsigned int order) { free_area_t * area = zone->free_area + order; unsigned int curr_order = order; @@ -287,7 +287,7 @@ } #ifndef CONFIG_DISCONTIGMEM -struct page *_alloc_pages(unsigned int gfp_mask, unsigned int order) +struct page * fastcall _alloc_pages(unsigned int gfp_mask, unsigned int order) { return __alloc_pages(gfp_mask, order, contig_page_data.node_zonelists+(gfp_mask & GFP_ZONEMASK)); @@ -295,7 +295,7 @@ #endif static struct page * FASTCALL(balance_classzone(zone_t *, unsigned int, unsigned int, int *)); -static struct page * balance_classzone(zone_t * classzone, unsigned int gfp_mask, unsigned int order, int * freed) +static struct page * fastcall balance_classzone(zone_t * classzone, unsigned int gfp_mask, unsigned int order, int * freed) { struct page * page = NULL; int __freed; @@ -373,7 +373,7 @@ /* * This is the 'heart' of the zoned buddy allocator: */ -struct page * __alloc_pages(unsigned int gfp_mask, unsigned int order, zonelist_t *zonelist) +struct page * fastcall __alloc_pages(unsigned int gfp_mask, unsigned int order, zonelist_t *zonelist) { zone_t **zone, * classzone; struct page * page; @@ -486,7 +486,7 @@ /* * Common helper functions. */ -unsigned long __get_free_pages(unsigned int gfp_mask, unsigned int order) +unsigned long fastcall __get_free_pages(unsigned int gfp_mask, unsigned int order) { struct page * page; @@ -496,7 +496,7 @@ return (unsigned long) page_address(page); } -unsigned long get_zeroed_page(unsigned int gfp_mask) +unsigned long fastcall get_zeroed_page(unsigned int gfp_mask) { struct page * page; @@ -509,13 +509,13 @@ return 0; } -void __free_pages(struct page *page, unsigned int order) +void fastcall __free_pages(struct page *page, unsigned int order) { if (!PageReserved(page) && put_page_testzero(page)) __free_pages_ok(page, order); } -void free_pages(unsigned long addr, unsigned int order) +void fastcall free_pages(unsigned long addr, unsigned int order) { if (addr != 0) __free_pages(virt_to_page(addr), order); diff -ruN linux-2.4.27-pre3/mm/slab.c linux-2.4.27-pre3.gcc340-fixes/mm/slab.c --- linux-2.4.27-pre3/mm/slab.c 2003-11-29 00:28:15.000000000 +0100 +++ linux-2.4.27-pre3.gcc340-fixes/mm/slab.c 2004-05-19 22:27:05.000000000 +0200 @@ -1735,7 +1735,7 @@ * * Called from do_try_to_free_pages() and __alloc_pages() */ -int kmem_cache_reap (int gfp_mask) +int fastcall kmem_cache_reap (int gfp_mask) { slab_t *slabp; kmem_cache_t *searchp; diff -ruN linux-2.4.27-pre3/mm/swap.c linux-2.4.27-pre3.gcc340-fixes/mm/swap.c --- linux-2.4.27-pre3/mm/swap.c 2003-11-29 00:28:15.000000000 +0100 +++ linux-2.4.27-pre3.gcc340-fixes/mm/swap.c 2004-05-19 22:27:05.000000000 +0200 @@ -44,7 +44,7 @@ } } -void activate_page(struct page * page) +void fastcall activate_page(struct page * page) { spin_lock(&pagemap_lru_lock); activate_page_nolock(page); @@ -55,7 +55,7 @@ * lru_cache_add: add a page to the page lists * @page: the page to add */ -void lru_cache_add(struct page * page) +void fastcall lru_cache_add(struct page * page) { if (!PageLRU(page)) { spin_lock(&pagemap_lru_lock); @@ -72,7 +72,7 @@ * This function is for when the caller already holds * the pagemap_lru_lock. */ -void __lru_cache_del(struct page * page) +void fastcall __lru_cache_del(struct page * page) { if (TestClearPageLRU(page)) { if (PageActive(page)) { @@ -87,7 +87,7 @@ * lru_cache_del: remove a page from the page lists * @page: the page to remove */ -void lru_cache_del(struct page * page) +void fastcall lru_cache_del(struct page * page) { spin_lock(&pagemap_lru_lock); __lru_cache_del(page); diff -ruN linux-2.4.27-pre3/mm/swapfile.c linux-2.4.27-pre3.gcc340-fixes/mm/swapfile.c --- linux-2.4.27-pre3/mm/swapfile.c 2003-08-25 20:07:50.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/mm/swapfile.c 2004-05-19 22:27:05.000000000 +0200 @@ -256,7 +256,7 @@ * work, but we opportunistically check whether * we need to get all the locks first.. */ -int can_share_swap_page(struct page *page) +int fastcall can_share_swap_page(struct page *page) { int retval = 0; @@ -284,7 +284,7 @@ * Work out if there are any other processes sharing this * swap cache page. Free it if you can. Return success. */ -int remove_exclusive_swap_page(struct page *page) +int fastcall remove_exclusive_swap_page(struct page *page) { int retval; struct swap_info_struct * p; diff -ruN linux-2.4.27-pre3/mm/vmscan.c linux-2.4.27-pre3.gcc340-fixes/mm/vmscan.c --- linux-2.4.27-pre3/mm/vmscan.c 2004-02-18 15:16:24.000000000 +0100 +++ linux-2.4.27-pre3.gcc340-fixes/mm/vmscan.c 2004-05-19 22:27:05.000000000 +0200 @@ -323,7 +323,7 @@ } static int FASTCALL(swap_out(zone_t * classzone)); -static int swap_out(zone_t * classzone) +static int fastcall swap_out(zone_t * classzone) { int counter, nr_pages = SWAP_CLUSTER_MAX; struct mm_struct *mm; @@ -366,7 +366,7 @@ static void FASTCALL(refill_inactive(int nr_pages, zone_t * classzone)); static int FASTCALL(shrink_cache(int nr_pages, zone_t * classzone, unsigned int gfp_mask, int * failed_swapout)); -static int shrink_cache(int nr_pages, zone_t * classzone, unsigned int gfp_mask, int * failed_swapout) +static int fastcall shrink_cache(int nr_pages, zone_t * classzone, unsigned int gfp_mask, int * failed_swapout) { struct list_head * entry; int max_scan = (classzone->nr_inactive_pages + classzone->nr_active_pages) / vm_cache_scan_ratio; @@ -577,7 +577,7 @@ * We move them the other way when we see the * reference bit on the page. */ -static void refill_inactive(int nr_pages, zone_t * classzone) +static void fastcall refill_inactive(int nr_pages, zone_t * classzone) { struct list_head * entry; unsigned long ratio; @@ -610,7 +610,7 @@ } static int FASTCALL(shrink_caches(zone_t * classzone, unsigned int gfp_mask, int nr_pages, int * failed_swapout)); -static int shrink_caches(zone_t * classzone, unsigned int gfp_mask, int nr_pages, int * failed_swapout) +static int fastcall shrink_caches(zone_t * classzone, unsigned int gfp_mask, int nr_pages, int * failed_swapout) { nr_pages -= kmem_cache_reap(gfp_mask); if (nr_pages <= 0) @@ -627,7 +627,7 @@ static int check_classzone_need_balance(zone_t * classzone); -int try_to_free_pages_zone(zone_t *classzone, unsigned int gfp_mask) +int fastcall try_to_free_pages_zone(zone_t *classzone, unsigned int gfp_mask) { gfp_mask = pf_gfp_mask(gfp_mask); @@ -665,7 +665,7 @@ return 0; } -int try_to_free_pages(unsigned int gfp_mask) +int fastcall try_to_free_pages(unsigned int gfp_mask) { pg_data_t *pgdat; zonelist_t *zonelist; diff -ruN linux-2.4.27-pre3/net/ipv4/ip_output.c linux-2.4.27-pre3.gcc340-fixes/net/ipv4/ip_output.c --- linux-2.4.27-pre3/net/ipv4/ip_output.c 2003-11-29 00:28:15.000000000 +0100 +++ linux-2.4.27-pre3.gcc340-fixes/net/ipv4/ip_output.c 2004-05-19 22:27:05.000000000 +0200 @@ -184,7 +184,7 @@ return -EINVAL; } -__inline__ int ip_finish_output(struct sk_buff *skb) +int ip_finish_output(struct sk_buff *skb) { struct net_device *dev = skb->dst->dev; diff -ruN linux-2.4.27-pre3/net/ipx/af_ipx.c linux-2.4.27-pre3.gcc340-fixes/net/ipx/af_ipx.c --- linux-2.4.27-pre3/net/ipx/af_ipx.c 2001-10-11 13:34:46.000000000 +0200 +++ linux-2.4.27-pre3.gcc340-fixes/net/ipx/af_ipx.c 2004-05-19 22:27:05.000000000 +0200 @@ -1544,7 +1544,8 @@ ipx->ipx_pktsize = htons(len + sizeof(struct ipxhdr)); IPX_SKB_CB(skb)->ipx_tctrl = 0; ipx->ipx_type = usipx->sipx_type; - skb->h.raw = (void *)skb->nh.ipxh = ipx; + skb->nh.ipxh = ipx; + skb->h.raw = (void *)skb->nh.ipxh; IPX_SKB_CB(skb)->last_hop.index = -1; #ifdef CONFIG_IPX_INTERN