diff options
Diffstat (limited to 'arch/sparc64/kernel')
-rw-r--r-- | arch/sparc64/kernel/Makefile | 45 | ||||
-rw-r--r-- | arch/sparc64/kernel/pci.c | 114 | ||||
-rw-r--r-- | arch/sparc64/kernel/sys_sparc32.c | 14 |
3 files changed, 21 insertions, 152 deletions
diff --git a/arch/sparc64/kernel/Makefile b/arch/sparc64/kernel/Makefile index 9bbc2e193..8648bb190 100644 --- a/arch/sparc64/kernel/Makefile +++ b/arch/sparc64/kernel/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.62 2000/08/12 08:35:53 ecd Exp $ +# $Id: Makefile,v 1.63 2000/12/14 22:57:25 davem Exp $ # Makefile for the linux kernel. # # Note! Dependencies are done automagically by 'make dep', which also @@ -18,42 +18,29 @@ SH = $(CONFIG_SHELL) all: kernel.o head.o init_task.o O_TARGET := kernel.o -O_OBJS := process.o setup.o cpu.o idprom.o \ - traps.o devices.o auxio.o \ - irq.o ptrace.o time.o sys_sparc.o signal.o \ - unaligned.o central.o pci.o starfire.o semaphore.o \ - power.o sbus.o iommu_common.o -OX_OBJS := sparc64_ksyms.o -ifdef CONFIG_PCI - O_OBJS += ebus.o pci_common.o pci_iommu.o \ - pci_psycho.o pci_sabre.o -endif +export-objs := sparc64_ksyms.o +obj-y := process.o setup.o cpu.o idprom.o \ + traps.o devices.o auxio.o \ + irq.o ptrace.o time.o sys_sparc.o signal.o \ + unaligned.o central.o pci.o starfire.o semaphore.o \ + power.o sbus.o iommu_common.o sparc64_ksyms.o + +obj-$(CONFIG_PCI) += ebus.o pci_common.o pci_iommu.o \ + pci_psycho.o pci_sabre.o +obj-$(CONFIG_SMP) += smp.o trampoline.o +obj-$(CONFIG_SPARC32_COMPAT) += sys32.o sys_sparc32.o signal32.o ioctl32.o +obj-$(CONFIG_BINFMT_ELF32) += binfmt_elf32.o +obj-$(CONFIG_BINFMT_AOUT32) += binfmt_aout32.o ifdef CONFIG_SUNOS_EMUL - O_OBJS += sys_sunos32.o sunos_ioctl32.o + obj-y += sys_sunos32.o sunos_ioctl32.o else ifdef CONFIG_SOLARIS_EMUL - O_OBJS += sys_sunos32.o sunos_ioctl32.o + obj-y += sys_sunos32.o sunos_ioctl32.o endif endif -ifdef CONFIG_SMP -O_OBJS += smp.o trampoline.o -endif - -ifdef CONFIG_SPARC32_COMPAT - O_OBJS += sys32.o sys_sparc32.o signal32.o ioctl32.o -endif - -ifdef CONFIG_BINFMT_ELF32 - O_OBJS += binfmt_elf32.o -endif - -ifdef CONFIG_BINFMT_AOUT32 - O_OBJS += binfmt_aout32.o -endif - head.o: head.S ttable.S itlb_base.S dtlb_base.S dtlb_backend.S dtlb_prot.S \ etrap.S rtrap.S winfixup.S entry.S $(CC) $(AFLAGS) -ansi -c $*.S -o $*.o diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c index 1abef824f..2b697dd87 100644 --- a/arch/sparc64/kernel/pci.c +++ b/arch/sparc64/kernel/pci.c @@ -1,4 +1,4 @@ -/* $Id: pci.c,v 1.19 2000/11/08 04:49:17 davem Exp $ +/* $Id: pci.c,v 1.20 2000/12/14 22:57:25 davem Exp $ * pci.c: UltraSparc PCI controller support. * * Copyright (C) 1997, 1998, 1999 David S. Miller (davem@redhat.com) @@ -229,116 +229,4 @@ char * __init pcibios_setup(char *str) return str; } -asmlinkage int sys_pciconfig_read(unsigned long bus, - unsigned long dfn, - unsigned long off, - unsigned long len, - unsigned char *buf) -{ - struct pci_dev *dev; - u8 byte; - u16 word; - u32 dword; - int err = 0; - - if(!capable(CAP_SYS_ADMIN)) - return -EPERM; - - dev = pci_find_slot(bus, dfn); - if (!dev) { - /* Xfree86 is such a turd, it does not check the - * return value and just relies on the buffer being - * set to all 1's to mean "device not present". - */ - switch(len) { - case 1: - put_user(0xff, (unsigned char *)buf); - break; - case 2: - put_user(0xffff, (unsigned short *)buf); - break; - case 4: - put_user(0xffffffff, (unsigned int *)buf); - break; - default: - err = -EINVAL; - break; - }; - goto out; - } - - switch(len) { - case 1: - pci_read_config_byte(dev, off, &byte); - put_user(byte, (unsigned char *)buf); - break; - case 2: - pci_read_config_word(dev, off, &word); - put_user(word, (unsigned short *)buf); - break; - case 4: - pci_read_config_dword(dev, off, &dword); - put_user(dword, (unsigned int *)buf); - break; - - default: - err = -EINVAL; - break; - }; -out: - return err; -} - -asmlinkage int sys_pciconfig_write(unsigned long bus, - unsigned long dfn, - unsigned long off, - unsigned long len, - unsigned char *buf) -{ - struct pci_dev *dev; - u8 byte; - u16 word; - u32 dword; - int err = 0; - - if(!capable(CAP_SYS_ADMIN)) - return -EPERM; - dev = pci_find_slot(bus, dfn); - if (!dev) { - /* See commentary above about Xfree86 */ - goto out; - } - - switch(len) { - case 1: - err = get_user(byte, (u8 *)buf); - if(err) - break; - pci_write_config_byte(dev, off, byte); - break; - - case 2: - err = get_user(word, (u16 *)buf); - if(err) - break; - pci_write_config_byte(dev, off, word); - break; - - case 4: - err = get_user(dword, (u32 *)buf); - if(err) - break; - pci_write_config_byte(dev, off, dword); - break; - - default: - err = -EINVAL; - break; - - }; - -out: - return err; -} - #endif /* !(CONFIG_PCI) */ diff --git a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c index 0964409c9..775c986c8 100644 --- a/arch/sparc64/kernel/sys_sparc32.c +++ b/arch/sparc64/kernel/sys_sparc32.c @@ -1,4 +1,4 @@ -/* $Id: sys_sparc32.c,v 1.168 2000/12/11 18:59:35 davem Exp $ +/* $Id: sys_sparc32.c,v 1.171 2000/12/13 16:34:55 davem Exp $ * sys_sparc32.c: Conversion between 32bit and 64bit native syscalls. * * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) @@ -865,17 +865,13 @@ asmlinkage long sys32_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg mm_segment_t old_fs; long ret; - if(get_flock(&f, (struct flock32 *)arg)) + if (get_flock(&f, (struct flock32 *)arg)) return -EFAULT; old_fs = get_fs(); set_fs (KERNEL_DS); ret = sys_fcntl(fd, cmd, (unsigned long)&f); set_fs (old_fs); if (ret) return ret; - if (f.l_start >= 0x7fffffffUL || - f.l_len >= 0x7fffffffUL || - f.l_start + f.l_len >= 0x7fffffffUL) - return -EOVERFLOW; - if(put_flock(&f, (struct flock32 *)arg)) + if (put_flock(&f, (struct flock32 *)arg)) return -EFAULT; return 0; } @@ -2966,8 +2962,6 @@ static int copy_strings32(int argc, u32 * argv, struct linux_binprm *bprm) err = copy_from_user(kaddr + offset, (char *)A(str), bytes_to_copy); - flush_dcache_page(page); - flush_page_to_ram(page); kunmap(page); if (err) @@ -3453,7 +3447,7 @@ asmlinkage int sys32_get_kernel_syms(struct kernel_sym32 *table) set_fs (KERNEL_DS); sys_get_kernel_syms(tbl); set_fs (old_fs); - for (i = 0; i < len; i++, table += sizeof (struct kernel_sym32)) { + for (i = 0; i < len; i++, table++) { if (put_user (tbl[i].value, &table->value) || copy_to_user (table->name, tbl[i].name, 60)) break; |