From 95db6b748fc86297827fbd9c9ef174d491c9ad89 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Wed, 16 Feb 2000 01:07:24 +0000 Subject: Merge with Linux 2.3.40. --- arch/alpha/kernel/core_mcpcia.c | 2 + arch/alpha/kernel/entry.S | 6 +-- arch/alpha/kernel/osf_sys.c | 102 ++-------------------------------------- arch/alpha/kernel/pci.c | 16 +++++-- 4 files changed, 20 insertions(+), 106 deletions(-) (limited to 'arch/alpha/kernel') diff --git a/arch/alpha/kernel/core_mcpcia.c b/arch/alpha/kernel/core_mcpcia.c index 4b165940d..847958212 100644 --- a/arch/alpha/kernel/core_mcpcia.c +++ b/arch/alpha/kernel/core_mcpcia.c @@ -560,12 +560,14 @@ mcpcia_machine_check(unsigned long vector, unsigned long la_ptr, switch (expected) { case 0: + { /* FIXME: how do we figure out which hose the error was on? */ struct pci_controler *hose; for (hose = hose_head; hose; hose = hose->next) mcpcia_pci_clr_err(hose2mid(hose->index)); break; + } case 1: mcpcia_pci_clr_err(mcheck_extra(cpu)); break; diff --git a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S index 6b37bd23c..af1567fd1 100644 --- a/arch/alpha/kernel/entry.S +++ b/arch/alpha/kernel/entry.S @@ -985,9 +985,9 @@ sys_call_table: .quad osf_utsname .quad sys_lchown .quad osf_shmat - .quad sys_shmctlold /* 210 */ + .quad sys_shmctl /* 210 */ .quad sys_shmdt - .quad sys_shmget + .quad osf_shmget .quad alpha_ni_syscall .quad alpha_ni_syscall .quad alpha_ni_syscall /* 215 */ @@ -1150,4 +1150,4 @@ sys_call_table: .quad sys_setresgid .quad sys_getresgid .quad sys_ni_syscall /* sys_dipc */ - .quad sys_shmctl + .quad sys_shmget diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index e81687bdb..95e539d34 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c @@ -439,7 +439,7 @@ static int osf_ufs_mount(char *dirname, struct ufs_args *args, int flags) dentry = getdev(tmp.devname, 0); retval = PTR_ERR(dentry); - if (IS_ERR(dentry) + if (IS_ERR(dentry)) goto out; retval = do_mount(dentry->d_inode->i_bdev, tmp.devname, dirname, "ext2", flags, NULL); @@ -471,7 +471,6 @@ out: static int osf_procfs_mount(char *dirname, struct procfs_args *args, int flags) { - int retval; struct procfs_args tmp; if (copy_from_user(&tmp, args, sizeof(tmp))) @@ -1401,102 +1400,7 @@ asmlinkage int sys_old_adjtimex(struct timex32 *txc_p) return ret; } -struct shmid_ds_old { - struct ipc_perm shm_perm; /* operation perms */ - int shm_segsz; /* size of segment (bytes) */ - __kernel_time_t shm_atime; /* last attach time */ - __kernel_time_t shm_dtime; /* last detach time */ - __kernel_time_t shm_ctime; /* last change time */ - __kernel_ipc_pid_t shm_cpid; /* pid of creator */ - __kernel_ipc_pid_t shm_lpid; /* pid of last operator */ - unsigned short shm_nattch; /* no. of current attaches */ - unsigned short shm_unused; /* compatibility */ - void *shm_unused2; /* ditto - used by DIPC */ - void *shm_unused3; /* unused */ -}; - -struct shminfo_old { - int shmmax; - int shmmin; - int shmmni; - int shmseg; - int shmall; -}; - -asmlinkage long sys_shmctlold(int shmid, int cmd, struct shmid_ds_old *buf) +asmlinkage long osf_shmget (key_t key, int size, int flag) { - struct shmid_ds arg; - long ret; - mm_segment_t old_fs; - - if (cmd == IPC_SET) { - struct shmid_ds_old tbuf; - - if(copy_from_user (&tbuf, buf, sizeof(*buf))) - return -EFAULT; - arg.shm_perm = tbuf.shm_perm; - arg.shm_segsz = tbuf.shm_segsz; - arg.shm_atime = tbuf.shm_atime; - arg.shm_dtime = tbuf.shm_dtime; - arg.shm_ctime = tbuf.shm_ctime; - arg.shm_cpid = tbuf.shm_cpid; - arg.shm_lpid = tbuf.shm_lpid; - arg.shm_nattch = tbuf.shm_nattch; - arg.shm_unused = tbuf.shm_unused; - arg.shm_unused2 = tbuf.shm_unused2; - arg.shm_unused3 = tbuf.shm_unused3; - } - old_fs = get_fs (); - set_fs (KERNEL_DS); - ret = sys_shmctl(shmid, cmd, &arg); - set_fs (old_fs); - if (ret < 0) - return(ret); - switch(cmd) { - case IPC_INFO: - { - struct shminfo *tbuf = (struct shminfo *) &arg; - struct shminfo_old shminfo_oldst; - - shminfo_oldst.shmmax = (tbuf->shmmax > INT_MAX ? - INT_MAX : tbuf->shmmax); - shminfo_oldst.shmmin = tbuf->shmmin; - shminfo_oldst.shmmni = tbuf->shmmni; - shminfo_oldst.shmseg = tbuf->shmseg; - shminfo_oldst.shmall = tbuf->shmall; - if (copy_to_user(buf, &shminfo_oldst, - sizeof(struct shminfo_old))) - return -EFAULT; - return(ret); - } - case SHM_INFO: - { - struct shm_info *tbuf = (struct shm_info *) &arg; - - if (copy_to_user (buf, tbuf, sizeof(struct shm_info))) - return -EFAULT; - return(ret); - } - case SHM_STAT: - case IPC_STAT: - { - struct shmid_ds_old tbuf; - - tbuf.shm_perm = arg.shm_perm; - tbuf.shm_segsz = arg.shm_segsz; - tbuf.shm_atime = arg.shm_atime; - tbuf.shm_dtime = arg.shm_dtime; - tbuf.shm_ctime = arg.shm_ctime; - tbuf.shm_cpid = arg.shm_cpid; - tbuf.shm_lpid = arg.shm_lpid; - tbuf.shm_nattch = arg.shm_nattch; - tbuf.shm_unused = arg.shm_unused; - tbuf.shm_unused2 = arg.shm_unused2; - tbuf.shm_unused3 = arg.shm_unused3; - if (copy_to_user (buf, &tbuf, sizeof(tbuf))) - return -EFAULT; - return(ret); - } - } - return(ret); + return sys_shmget (key, size, flag); } diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c index 601cb9401..aa0a8d968 100644 --- a/arch/alpha/kernel/pci.c +++ b/arch/alpha/kernel/pci.c @@ -251,11 +251,13 @@ pcibios_fixup_bus(struct pci_bus *bus) /* Propogate hose info into the subordinate devices. */ struct pci_controler *hose = (struct pci_controler *) bus->sysdata; - struct pci_dev *dev; + struct list_head *ln; bus->resource[0] = hose->io_space; bus->resource[1] = hose->mem_space; - for (dev = bus->devices; dev; dev = dev->sibling) { + + for (ln = bus->devices.next; ln != &bus->devices; ln = ln->next) { + struct pci_dev *dev = pci_dev_b(ln); if ((dev->class >> 8) != PCI_CLASS_BRIDGE_PCI) pcibios_fixup_device_resources(dev, bus); } @@ -322,6 +324,13 @@ pcibios_fixup_pbus_ranges(struct pci_bus * bus, ranges->mem_end -= bus->resource[1]->start; } +int __init +pcibios_enable_device(struct pci_dev *dev) +{ + /* Not needed, since we enable all devices at startup. */ + return 0; +} + void __init common_init_pci(void) { @@ -339,8 +348,7 @@ common_init_pci(void) next_busno += 1; } - pci_assign_unassigned_resources(alpha_mv.min_io_address, - alpha_mv.min_mem_address); + pci_assign_unassigned_resources(); pci_fixup_irqs(alpha_mv.pci_swizzle, alpha_mv.pci_map_irq); pci_set_bus_ranges(); } -- cgit v1.2.3