Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 17 Apr 2007 23:51:32 +0000 (16:51 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 17 Apr 2007 23:51:32 +0000 (16:51 -0700)
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [BRIDGE]: Unaligned access when comparing ethernet addresses
  [SCTP]: Unmap v4mapped addresses during SCTP_BINDX_REM_ADDR operation.
  [SCTP]: Fix assertion (!atomic_read(&sk->sk_rmem_alloc)) failed message
  [NET]: Set a separate lockdep class for neighbour table's proxy_queue
  [NET]: Fix UDP checksum issue in net poll mode.
  [KEY]: Fix conversion between IPSEC_MODE_xxx and XFRM_MODE_xxx.
  [NET]: Get rid of alloc_skb_from_cache

29 files changed:
arch/alpha/kernel/core_mcpcia.c
arch/alpha/kernel/err_titan.c
arch/alpha/kernel/module.c
arch/alpha/kernel/sys_nautilus.c
arch/alpha/kernel/sys_noritake.c
arch/alpha/kernel/sys_rawhide.c
arch/alpha/kernel/sys_sio.c
arch/alpha/kernel/sys_sx164.c
arch/alpha/kernel/sys_titan.c
arch/i386/kernel/nmi.c
arch/i386/kernel/vmlinux.lds.S
arch/x86_64/kernel/nmi.c
arch/x86_64/kernel/vmlinux.lds.S
drivers/char/mem.c
drivers/hwmon/w83627ehf.c
drivers/i2c/busses/Kconfig
drivers/i2c/busses/i2c-pasemi.c
drivers/infiniband/hw/mthca/mthca_mr.c
drivers/macintosh/smu.c
drivers/spi/spi_s3c24xx.c
fs/exec.c
fs/ufs/inode.c
include/asm-alpha/compiler.h
include/asm-alpha/core_mcpcia.h
include/asm-alpha/io.h
include/asm-powerpc/systbl.h
include/linux/io.h
include/linux/plist.h
net/sunrpc/svcauth_unix.c

index 8d01907..381fec0 100644 (file)
@@ -40,8 +40,6 @@
 # define DBG_CFG(args)
 #endif
 
-#define MCPCIA_MAX_HOSES 4
-
 /*
  * Given a bus, device, and function number, compute resulting
  * configuration space address and setup the MCPCIA_HAXR2 register
index febe71c..543d96d 100644 (file)
@@ -16,6 +16,7 @@
 #include <asm/smp.h>
 #include <asm/err_common.h>
 #include <asm/err_ev6.h>
+#include <asm/irq_regs.h>
 
 #include "err_impl.h"
 #include "proto.h"
index aac6d4b..bd03dc9 100644 (file)
@@ -285,12 +285,12 @@ apply_relocate_add(Elf64_Shdr *sechdrs, const char *strtab,
                reloc_overflow:
                        if (ELF64_ST_TYPE (sym->st_info) == STT_SECTION)
                          printk(KERN_ERR
-                                "module %s: Relocation overflow vs section %d\n",
-                                me->name, sym->st_shndx);
+                                "module %s: Relocation (type %lu) overflow vs section %d\n",
+                                me->name, r_type, sym->st_shndx);
                        else
                          printk(KERN_ERR
-                                "module %s: Relocation overflow vs %s\n",
-                                me->name, strtab + sym->st_name);
+                                "module %s: Relocation (type %lu) overflow vs %s\n",
+                                me->name, r_type, strtab + sym->st_name);
                        return -ENOEXEC;
                }
        }
index e7594a7..920196b 100644 (file)
@@ -70,6 +70,12 @@ nautilus_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
        /* Preserve the IRQ set up by the console.  */
 
        u8 irq;
+       /* UP1500: AGP INTA is actually routed to IRQ 5, not IRQ 10 as
+          console reports. Check the device id of AGP bridge to distinguish
+          UP1500 from UP1000/1100. Note: 'pin' is 2 due to bridge swizzle. */
+       if (slot == 1 && pin == 2 &&
+           dev->bus->self && dev->bus->self->device == 0x700f)
+               return 5;
        pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
        return irq;
 }
index de6ba34..eb2a1d6 100644 (file)
@@ -66,6 +66,13 @@ noritake_startup_irq(unsigned int irq)
        return 0;
 }
 
+static void
+noritake_end_irq(unsigned int irq)
+{
+        if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
+                noritake_enable_irq(irq);
+}
+
 static struct hw_interrupt_type noritake_irq_type = {
        .typename       = "NORITAKE",
        .startup        = noritake_startup_irq,
@@ -73,7 +80,7 @@ static struct hw_interrupt_type noritake_irq_type = {
        .enable         = noritake_enable_irq,
        .disable        = noritake_disable_irq,
        .ack            = noritake_disable_irq,
-       .end            = noritake_enable_irq,
+       .end            = noritake_end_irq,
 };
 
 static void 
index 581d08c..672cb2d 100644 (file)
@@ -52,6 +52,9 @@ rawhide_update_irq_hw(int hose, int mask)
        *(vuip)MCPCIA_INT_MASK0(MCPCIA_HOSE2MID(hose));
 }
 
+#define hose_exists(h) \
+  (((h) < MCPCIA_MAX_HOSES) && (cached_irq_masks[(h)] != 0))
+
 static inline void 
 rawhide_enable_irq(unsigned int irq)
 {
@@ -59,6 +62,9 @@ rawhide_enable_irq(unsigned int irq)
 
        irq -= 16;
        hose = irq / 24;
+       if (!hose_exists(hose)) /* if hose non-existent, exit */
+               return;
+
        irq -= hose * 24;
        mask = 1 << irq;
 
@@ -76,6 +82,9 @@ rawhide_disable_irq(unsigned int irq)
 
        irq -= 16;
        hose = irq / 24;
+       if (!hose_exists(hose)) /* if hose non-existent, exit */
+               return;
+
        irq -= hose * 24;
        mask = ~(1 << irq) | hose_irq_masks[hose];
 
@@ -93,6 +102,9 @@ rawhide_mask_and_ack_irq(unsigned int irq)
 
        irq -= 16;
        hose = irq / 24;
+       if (!hose_exists(hose)) /* if hose non-existent, exit */
+               return;
+
        irq -= hose * 24;
        mask1 = 1 << irq;
        mask = ~mask1 | hose_irq_masks[hose];
@@ -169,6 +181,9 @@ rawhide_init_irq(void)
 
        mcpcia_init_hoses();
 
+       /* Clear them all; only hoses that exist will be non-zero. */
+       for (i = 0; i < MCPCIA_MAX_HOSES; i++) cached_irq_masks[i] = 0;
+
        for (hose = hose_head; hose; hose = hose->next) {
                unsigned int h = hose->index;
                unsigned int mask = hose_irq_masks[h];
index a654014..14b5a75 100644 (file)
@@ -84,12 +84,16 @@ alphabook1_init_arch(void)
 static void __init
 sio_pci_route(void)
 {
-#if defined(ALPHA_RESTORE_SRM_SETUP)
-       /* First, read and save the original setting. */
+       unsigned int orig_route_tab;
+
+       /* First, ALWAYS read and print the original setting. */
        pci_bus_read_config_dword(pci_isa_hose->bus, PCI_DEVFN(7, 0), 0x60,
-                                 &saved_config.orig_route_tab);
+                                 &orig_route_tab);
        printk("%s: PIRQ original 0x%x new 0x%x\n", __FUNCTION__,
-              saved_config.orig_route_tab, alpha_mv.sys.sio.route_tab);
+              orig_route_tab, alpha_mv.sys.sio.route_tab);
+
+#if defined(ALPHA_RESTORE_SRM_SETUP)
+       saved_config.orig_route_tab = orig_route_tab;
 #endif
 
        /* Now override with desired setting. */
@@ -334,7 +338,7 @@ struct alpha_machine_vector avanti_mv __initmv = {
        .pci_swizzle            = common_swizzle,
 
        .sys = { .sio = {
-               .route_tab      = 0x0b0a0e0f,
+               .route_tab      = 0x0b0a050f, /* leave 14 for IDE, 9 for SND */
        }}
 };
 ALIAS_MV(avanti)
index 94ad68b..41d4ad4 100644 (file)
@@ -132,7 +132,7 @@ sx164_init_arch(void)
 
        if (amask(AMASK_MAX) != 0
            && alpha_using_srm
-           && (cpu->pal_revision & 0xffff) == 0x117) {
+           && (cpu->pal_revision & 0xffff) <= 0x117) {
                __asm__ __volatile__(
                "lda    $16,8($31)\n"
                "call_pal 9\n"          /* Allow PALRES insns in kernel mode */
index 29ab7db..f009b7b 100644 (file)
@@ -257,8 +257,7 @@ titan_dispatch_irqs(u64 mask)
         */
        while (mask) {
                /* convert to SRM vector... priority is <63> -> <0> */
-               __asm__("ctlz %1, %0" : "=r"(vector) : "r"(mask));
-               vector = 63 - vector;
+               vector = 63 - __kernel_ctlz(mask);
                mask &= ~(1UL << vector);       /* clear it out          */
                vector = 0x900 + (vector << 4); /* convert to SRM vector */
                
index a98ba88..9f1e8c1 100644 (file)
@@ -41,16 +41,17 @@ int nmi_watchdog_enabled;
  *   different subsystems this reservation system just tries to coordinate
  *   things a little
  */
-static DEFINE_PER_CPU(unsigned long, perfctr_nmi_owner);
-static DEFINE_PER_CPU(unsigned long, evntsel_nmi_owner[3]);
-
-static cpumask_t backtrace_mask = CPU_MASK_NONE;
 
 /* this number is calculated from Intel's MSR_P4_CRU_ESCR5 register and it's
  * offset from MSR_P4_BSU_ESCR0.  It will be the max for all platforms (for now)
  */
 #define NMI_MAX_COUNTER_BITS 66
+#define NMI_MAX_COUNTER_LONGS BITS_TO_LONGS(NMI_MAX_COUNTER_BITS)
 
+static DEFINE_PER_CPU(unsigned long, perfctr_nmi_owner[NMI_MAX_COUNTER_LONGS]);
+static DEFINE_PER_CPU(unsigned long, evntsel_nmi_owner[NMI_MAX_COUNTER_LONGS]);
+
+static cpumask_t backtrace_mask = CPU_MASK_NONE;
 /* nmi_active:
  * >0: the lapic NMI watchdog is active, but can be disabled
  * <0: the lapic NMI watchdog has not been set up, and cannot
index ca51610..6f38f81 100644 (file)
@@ -26,7 +26,7 @@ OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
 OUTPUT_ARCH(i386)
 ENTRY(phys_startup_32)
 jiffies = jiffies_64;
-_proxy_pda = 0;
+_proxy_pda = 1;
 
 PHDRS {
        text PT_LOAD FLAGS(5);  /* R_E */
index a90996c..dfab9f1 100644 (file)
@@ -39,15 +39,17 @@ int panic_on_unrecovered_nmi;
  *   different subsystems this reservation system just tries to coordinate
  *   things a little
  */
-static DEFINE_PER_CPU(unsigned, perfctr_nmi_owner);
-static DEFINE_PER_CPU(unsigned, evntsel_nmi_owner[2]);
-
-static cpumask_t backtrace_mask = CPU_MASK_NONE;
 
 /* this number is calculated from Intel's MSR_P4_CRU_ESCR5 register and it's
  * offset from MSR_P4_BSU_ESCR0.  It will be the max for all platforms (for now)
  */
 #define NMI_MAX_COUNTER_BITS 66
+#define NMI_MAX_COUNTER_LONGS BITS_TO_LONGS(NMI_MAX_COUNTER_BITS)
+
+static DEFINE_PER_CPU(unsigned, perfctr_nmi_owner[NMI_MAX_COUNTER_LONGS]);
+static DEFINE_PER_CPU(unsigned, evntsel_nmi_owner[NMI_MAX_COUNTER_LONGS]);
+
+static cpumask_t backtrace_mask = CPU_MASK_NONE;
 
 /* nmi_active:
  * >0: the lapic NMI watchdog is active, but can be disabled
index b73212c..5176ecf 100644 (file)
@@ -13,7 +13,7 @@ OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
 OUTPUT_ARCH(i386:x86-64)
 ENTRY(phys_startup_64)
 jiffies_64 = jiffies;
-_proxy_pda = 0;
+_proxy_pda = 1;
 PHDRS {
        text PT_LOAD FLAGS(5);  /* R_E */
        data PT_LOAD FLAGS(7);  /* RWE */
index f5c160c..5f06696 100644 (file)
@@ -248,7 +248,7 @@ static unsigned long get_unmapped_area_mem(struct file *file,
 {
        if (!valid_mmap_phys_addr_range(pgoff, len))
                return (unsigned long) -EINVAL;
-       return pgoff;
+       return pgoff << PAGE_SHIFT;
 }
 
 /* can't do an in-place private mapping if there's no MMU */
index da5828f..01206eb 100644 (file)
@@ -407,7 +407,7 @@ static void w83627ehf_write_fan_div(struct i2c_client *client, int nr)
                break;
        case 4:
                reg = (w83627ehf_read_value(client, W83627EHF_REG_DIODE) & 0x73)
-                   | ((data->fan_div[4] & 0x03) << 3)
+                   | ((data->fan_div[4] & 0x03) << 2)
                    | ((data->fan_div[4] & 0x04) << 5);
                w83627ehf_write_value(client, W83627EHF_REG_DIODE, reg);
                break;
@@ -471,9 +471,9 @@ static struct w83627ehf_data *w83627ehf_update_device(struct device *dev)
                           time */
                        if (data->fan[i] == 0xff
                         && data->fan_div[i] < 0x07) {
-                               dev_dbg(&client->dev, "Increasing fan %d "
+                               dev_dbg(&client->dev, "Increasing fan%d "
                                        "clock divider from %u to %u\n",
-                                       i, div_from_reg(data->fan_div[i]),
+                                       i + 1, div_from_reg(data->fan_div[i]),
                                        div_from_reg(data->fan_div[i] + 1));
                                data->fan_div[i]++;
                                w83627ehf_write_fan_div(client, i);
index fb19dbb..ece31d2 100644 (file)
@@ -344,8 +344,7 @@ config I2C_PARPORT_LIGHT
 
 config I2C_PASEMI
        tristate "PA Semi SMBus interface"
-#      depends on PPC_PASEMI && I2C && PCI
-       depends on I2C && PCI
+       depends on PPC_PASEMI && I2C && PCI
        help
          Supports the PA Semi PWRficient on-chip SMBus interfaces.
 
index f54fb5d..bf89eee 100644 (file)
@@ -141,7 +141,7 @@ static int pasemi_i2c_xfer_msg(struct i2c_adapter *adapter,
                for (i = 0; i < msg->len - 1; i++)
                        TXFIFO_WR(smbus, msg->buf[i]);
 
-               TXFIFO_WR(smbus, msg->buf[msg->len] |
+               TXFIFO_WR(smbus, msg->buf[msg->len-1] |
                          (stop ? MTXFIFO_STOP : 0));
        }
 
@@ -226,7 +226,7 @@ static int pasemi_smb_xfer(struct i2c_adapter *adapter,
                        rd = RXFIFO_RD(smbus);
                        len = min_t(u8, (rd & MRXFIFO_DATA_M),
                                    I2C_SMBUS_BLOCK_MAX);
-                       TXFIFO_WR(smbus, (len + 1) | MTXFIFO_READ |
+                       TXFIFO_WR(smbus, len | MTXFIFO_READ |
                                         MTXFIFO_STOP);
                } else {
                        len = min_t(u8, data->block[0], I2C_SMBUS_BLOCK_MAX);
@@ -258,7 +258,7 @@ static int pasemi_smb_xfer(struct i2c_adapter *adapter,
                rd = RXFIFO_RD(smbus);
                len = min_t(u8, (rd & MRXFIFO_DATA_M),
                            I2C_SMBUS_BLOCK_MAX - len);
-               TXFIFO_WR(smbus, (len + 1) | MTXFIFO_READ | MTXFIFO_STOP);
+               TXFIFO_WR(smbus, len | MTXFIFO_READ | MTXFIFO_STOP);
                break;
 
        default:
index fdb576d..ee561c5 100644 (file)
@@ -835,6 +835,7 @@ void mthca_arbel_fmr_unmap(struct mthca_dev *dev, struct mthca_fmr *fmr)
 
        key = arbel_key_to_hw_index(fmr->ibmr.lkey);
        key &= dev->limits.num_mpts - 1;
+       key = adjust_key(dev, key);
        fmr->ibmr.lkey = fmr->ibmr.rkey = arbel_hw_index_to_key(key);
 
        fmr->maps = 0;
index 3096836..c9f3dc4 100644 (file)
@@ -1259,9 +1259,9 @@ static int smu_release(struct inode *inode, struct file *file)
                        set_current_state(TASK_UNINTERRUPTIBLE);
                        if (pp->cmd.status != 1)
                                break;
-                       spin_lock_irqsave(&pp->lock, flags);
-                       schedule();
                        spin_unlock_irqrestore(&pp->lock, flags);
+                       schedule();
+                       spin_lock_irqsave(&pp->lock, flags);
                }
                set_current_state(TASK_RUNNING);
                remove_wait_queue(&pp->wait, &wait);
index 220abce..b10211c 100644 (file)
@@ -77,7 +77,7 @@ static void s3c24xx_spi_chipsel(struct spi_device *spi, int value)
 
        switch (value) {
        case BITBANG_CS_INACTIVE:
-               hw->pdata->set_cs(hw->pdata, spi->chip_select, cspol^1);
+               hw->set_cs(hw->pdata, spi->chip_select, cspol^1);
                break;
 
        case BITBANG_CS_ACTIVE:
@@ -98,7 +98,7 @@ static void s3c24xx_spi_chipsel(struct spi_device *spi, int value)
                /* write new configration */
 
                writeb(spcon, hw->regs + S3C2410_SPCON);
-               hw->pdata->set_cs(hw->pdata, spi->chip_select, cspol);
+               hw->set_cs(hw->pdata, spi->chip_select, cspol);
 
                break;
        }
index 7e36c6f..3155e91 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1244,13 +1244,17 @@ EXPORT_SYMBOL(set_binfmt);
  * name into corename, which must have space for at least
  * CORENAME_MAX_SIZE bytes plus one byte for the zero terminator.
  */
-static void format_corename(char *corename, const char *pattern, long signr)
+static int format_corename(char *corename, const char *pattern, long signr)
 {
        const char *pat_ptr = pattern;
        char *out_ptr = corename;
        char *const out_end = corename + CORENAME_MAX_SIZE;
        int rc;
        int pid_in_pattern = 0;
+       int ispipe = 0;
+
+       if (*pattern == '|')
+               ispipe = 1;
 
        /* Repeat as long as we have more pattern to process and more output
           space */
@@ -1341,8 +1345,8 @@ static void format_corename(char *corename, const char *pattern, long signr)
         *
         * If core_pattern does not include a %p (as is the default)
         * and core_uses_pid is set, then .%pid will be appended to
-        * the filename */
-       if (!pid_in_pattern
+        * the filename. Do not do this for piped commands. */
+       if (!ispipe && !pid_in_pattern
             && (core_uses_pid || atomic_read(&current->mm->mm_users) != 1)) {
                rc = snprintf(out_ptr, out_end - out_ptr,
                              ".%d", current->tgid);
@@ -1350,8 +1354,9 @@ static void format_corename(char *corename, const char *pattern, long signr)
                        goto out;
                out_ptr += rc;
        }
-      out:
+out:
        *out_ptr = 0;
+       return ispipe;
 }
 
 static void zap_process(struct task_struct *start)
@@ -1502,16 +1507,15 @@ int do_coredump(long signr, int exit_code, struct pt_regs * regs)
         * uses lock_kernel()
         */
        lock_kernel();
-       format_corename(corename, core_pattern, signr);
+       ispipe = format_corename(corename, core_pattern, signr);
        unlock_kernel();
-       if (corename[0] == '|') {
+       if (ispipe) {
                /* SIGPIPE can happen, but it's just never processed */
                if(call_usermodehelper_pipe(corename+1, NULL, NULL, &file)) {
                        printk(KERN_INFO "Core dump to %s pipe failed\n",
                               corename);
                        goto fail_unlock;
                }
-               ispipe = 1;
        } else
                file = filp_open(corename,
                                 O_CREAT | 2 | O_NOFOLLOW | O_LARGEFILE | flag,
index 013d7af..f18b791 100644 (file)
@@ -601,7 +601,7 @@ static void ufs_set_inode_ops(struct inode *inode)
                                   ufs_get_inode_dev(inode->i_sb, UFS_I(inode)));
 }
 
-static void ufs1_read_inode(struct inode *inode, struct ufs_inode *ufs_inode)
+static int ufs1_read_inode(struct inode *inode, struct ufs_inode *ufs_inode)
 {
        struct ufs_inode_info *ufsi = UFS_I(inode);
        struct super_block *sb = inode->i_sb;
@@ -613,8 +613,10 @@ static void ufs1_read_inode(struct inode *inode, struct ufs_inode *ufs_inode)
         */
        inode->i_mode = mode = fs16_to_cpu(sb, ufs_inode->ui_mode);
        inode->i_nlink = fs16_to_cpu(sb, ufs_inode->ui_nlink);
-       if (inode->i_nlink == 0)
+       if (inode->i_nlink == 0) {
                ufs_error (sb, "ufs_read_inode", "inode %lu has zero nlink\n", inode->i_ino);
+               return -1;
+       }
        
        /*
         * Linux now has 32-bit uid and gid, so we can support EFT.
@@ -643,9 +645,10 @@ static void ufs1_read_inode(struct inode *inode, struct ufs_inode *ufs_inode)
                for (i = 0; i < (UFS_NDADDR + UFS_NINDIR) * 4; i++)
                        ufsi->i_u1.i_symlink[i] = ufs_inode->ui_u2.ui_symlink[i];
        }
+       return 0;
 }
 
-static void ufs2_read_inode(struct inode *inode, struct ufs2_inode *ufs2_inode)
+static int ufs2_read_inode(struct inode *inode, struct ufs2_inode *ufs2_inode)
 {
        struct ufs_inode_info *ufsi = UFS_I(inode);
        struct super_block *sb = inode->i_sb;
@@ -658,8 +661,10 @@ static void ufs2_read_inode(struct inode *inode, struct ufs2_inode *ufs2_inode)
         */
        inode->i_mode = mode = fs16_to_cpu(sb, ufs2_inode->ui_mode);
        inode->i_nlink = fs16_to_cpu(sb, ufs2_inode->ui_nlink);
-       if (inode->i_nlink == 0)
+       if (inode->i_nlink == 0) {
                ufs_error (sb, "ufs_read_inode", "inode %lu has zero nlink\n", inode->i_ino);
+               return -1;
+       }
 
         /*
          * Linux now has 32-bit uid and gid, so we can support EFT.
@@ -690,6 +695,7 @@ static void ufs2_read_inode(struct inode *inode, struct ufs2_inode *ufs2_inode)
                for (i = 0; i < (UFS_NDADDR + UFS_NINDIR) * 4; i++)
                        ufsi->i_u1.i_symlink[i] = ufs2_inode->ui_u2.ui_symlink[i];
        }
+       return 0;
 }
 
 void ufs_read_inode(struct inode * inode)
@@ -698,6 +704,7 @@ void ufs_read_inode(struct inode * inode)
        struct super_block * sb;
        struct ufs_sb_private_info * uspi;
        struct buffer_head * bh;
+       int err;
 
        UFSD("ENTER, ino %lu\n", inode->i_ino);
 
@@ -720,14 +727,17 @@ void ufs_read_inode(struct inode * inode)
        if ((UFS_SB(sb)->s_flags & UFS_TYPE_MASK) == UFS_TYPE_UFS2) {
                struct ufs2_inode *ufs2_inode = (struct ufs2_inode *)bh->b_data;
 
-               ufs2_read_inode(inode,
-                               ufs2_inode + ufs_inotofsbo(inode->i_ino));
+               err = ufs2_read_inode(inode,
+                                     ufs2_inode + ufs_inotofsbo(inode->i_ino));
        } else {
                struct ufs_inode *ufs_inode = (struct ufs_inode *)bh->b_data;
 
-               ufs1_read_inode(inode, ufs_inode + ufs_inotofsbo(inode->i_ino));
+               err = ufs1_read_inode(inode,
+                                     ufs_inode + ufs_inotofsbo(inode->i_ino));
        }
 
+       if (err)
+               goto bad_inode;
        inode->i_version++;
        ufsi->i_lastfrag =
                (inode->i_size + uspi->s_fsize - 1) >> uspi->s_fshift;
@@ -888,6 +898,8 @@ void ufs_delete_inode (struct inode * inode)
        loff_t old_i_size;
 
        truncate_inode_pages(&inode->i_data, 0);
+       if (is_bad_inode(inode))
+               goto no_delete;
        /*UFS_I(inode)->i_dtime = CURRENT_TIME;*/
        lock_kernel();
        mark_inode_dirty(inode);
@@ -898,4 +910,7 @@ void ufs_delete_inode (struct inode * inode)
                ufs_warning(inode->i_sb, __FUNCTION__, "ufs_truncate failed\n");
        ufs_free_inode (inode);
        unlock_kernel();
+       return;
+no_delete:
+       clear_inode(inode);     /* We must guarantee clearing of inode... */
 }
index d2768cc..da6bb19 100644 (file)
@@ -17,9 +17,6 @@
 # define __kernel_extbl(val, shift)    __builtin_alpha_extbl(val, shift)
 # define __kernel_extwl(val, shift)    __builtin_alpha_extwl(val, shift)
 # define __kernel_cmpbge(a, b)         __builtin_alpha_cmpbge(a, b)
-# define __kernel_cttz(x)              __builtin_ctzl(x)
-# define __kernel_ctlz(x)              __builtin_clzl(x)
-# define __kernel_ctpop(x)             __builtin_popcountl(x)
 #else
 # define __kernel_insbl(val, shift)                                    \
   ({ unsigned long __kir;                                              \
   ({ unsigned long __kir;                                              \
      __asm__("cmpbge %r2,%1,%0" : "=r"(__kir) : "rI"(b), "rJ"(a));     \
      __kir; })
+#endif
+
+#ifdef __alpha_cix__
+# if __GNUC__ == 3 && __GNUC_MINOR__ >= 4 || __GNUC__ > 3
+#  define __kernel_cttz(x)             __builtin_ctzl(x)
+#  define __kernel_ctlz(x)             __builtin_clzl(x)
+#  define __kernel_ctpop(x)            __builtin_popcountl(x)
+# else
+#  define __kernel_cttz(x)                                             \
+   ({ unsigned long __kir;                                             \
+      __asm__("cttz %1,%0" : "=r"(__kir) : "r"(x));                    \
+      __kir; })
+#  define __kernel_ctlz(x)                                             \
+   ({ unsigned long __kir;                                             \
+      __asm__("ctlz %1,%0" : "=r"(__kir) : "r"(x));                    \
+      __kir; })
+#  define __kernel_ctpop(x)                                            \
+   ({ unsigned long __kir;                                             \
+      __asm__("ctpop %1,%0" : "=r"(__kir) : "r"(x));                   \
+      __kir; })
+# endif
+#else
 # define __kernel_cttz(x)                                              \
   ({ unsigned long __kir;                                              \
-     __asm__("cttz %1,%0" : "=r"(__kir) : "r"(x));                     \
+     __asm__(".arch ev67; cttz %1,%0" : "=r"(__kir) : "r"(x));         \
      __kir; })
 # define __kernel_ctlz(x)                                              \
   ({ unsigned long __kir;                                              \
-     __asm__("ctlz %1,%0" : "=r"(__kir) : "r"(x));                     \
+     __asm__(".arch ev67; ctlz %1,%0" : "=r"(__kir) : "r"(x));         \
      __kir; })
 # define __kernel_ctpop(x)                                             \
   ({ unsigned long __kir;                                              \
-     __asm__("ctpop %1,%0" : "=r"(__kir) : "r"(x));                    \
+     __asm__(".arch ev67; ctpop %1,%0" : "=r"(__kir) : "r"(x));                \
      __kir; })
 #endif
 
 #else
 #define __kernel_ldbu(mem)                             \
   ({ unsigned char __kir;                              \
-     __asm__("ldbu %0,%1" : "=r"(__kir) : "m"(mem));   \
+     __asm__(".arch ev56;                              \
+             ldbu %0,%1" : "=r"(__kir) : "m"(mem));    \
      __kir; })
 #define __kernel_ldwu(mem)                             \
   ({ unsigned short __kir;                             \
-     __asm__("ldwu %0,%1" : "=r"(__kir) : "m"(mem));   \
+     __asm__(".arch ev56;                              \
+             ldwu %0,%1" : "=r"(__kir) : "m"(mem));    \
      __kir; })
-#define __kernel_stb(val,mem) \
-  __asm__("stb %1,%0" : "=m"(mem) : "r"(val))
-#define __kernel_stw(val,mem) \
-  __asm__("stw %1,%0" : "=m"(mem) : "r"(val))
+#define __kernel_stb(val,mem)                          \
+  __asm__(".arch ev56;                                 \
+          stb %1,%0" : "=m"(mem) : "r"(val))
+#define __kernel_stw(val,mem)                          \
+  __asm__(".arch ev56;                                 \
+          stw %1,%0" : "=m"(mem) : "r"(val))
 #endif
 
 #ifdef __KERNEL__
index 980a3c5..525b4f6 100644 (file)
@@ -72,6 +72,8 @@
  *
  */
 
+#define MCPCIA_MAX_HOSES 4
+
 #define MCPCIA_MID(m)          ((unsigned long)(m) << 33)
 
 /* Dodge has PCI0 and PCI1 at MID 4 and 5 respectively. 
index 24bdcc8..21a86f1 100644 (file)
@@ -113,6 +113,7 @@ static inline unsigned long virt_to_bus(void *address)
        unsigned long bus = phys + __direct_map_base;
        return phys <= __direct_map_size ? bus : 0;
 }
+#define isa_virt_to_bus virt_to_bus
 
 static inline void *bus_to_virt(unsigned long address)
 {
index 8d853c5..0b00068 100644 (file)
@@ -288,7 +288,7 @@ COMPAT_SYS(ppoll)
 SYSCALL_SPU(unshare)
 SYSCALL_SPU(splice)
 SYSCALL_SPU(tee)
-SYSCALL_SPU(vmsplice)
+COMPAT_SYS_SPU(vmsplice)
 COMPAT_SYS_SPU(openat)
 SYSCALL_SPU(mkdirat)
 SYSCALL_SPU(mknodat)
index c244a0c..09d3512 100644 (file)
@@ -33,9 +33,22 @@ int ioremap_page_range(unsigned long addr, unsigned long end,
 /*
  * Managed iomap interface
  */
+#ifdef CONFIG_HAS_IOPORT
 void __iomem * devm_ioport_map(struct device *dev, unsigned long port,
                               unsigned int nr);
 void devm_ioport_unmap(struct device *dev, void __iomem *addr);
+#else
+static inline void __iomem *devm_ioport_map(struct device *dev,
+                                            unsigned long port,
+                                            unsigned int nr)
+{
+       return NULL;
+}
+
+static inline void devm_ioport_unmap(struct device *dev, void __iomem *addr)
+{
+}
+#endif
 
 void __iomem * devm_ioremap(struct device *dev, unsigned long offset,
                            unsigned long size);
index b95818a..85de2f0 100644 (file)
@@ -97,9 +97,9 @@ struct plist_node {
 #endif
 
 /**
- * #PLIST_HEAD_INIT - static struct plist_head initializer
- *
+ * PLIST_HEAD_INIT - static struct plist_head initializer
  * @head:      struct plist_head variable name
+ * @_lock:     lock to initialize for this list
  */
 #define PLIST_HEAD_INIT(head, _lock)                   \
 {                                                      \
@@ -109,8 +109,7 @@ struct plist_node {
 }
 
 /**
- * #PLIST_NODE_INIT - static struct plist_node initializer
- *
+ * PLIST_NODE_INIT - static struct plist_node initializer
  * @node:      struct plist_node variable name
  * @__prio:    initial node priority
  */
@@ -122,8 +121,8 @@ struct plist_node {
 
 /**
  * plist_head_init - dynamic struct plist_head initializer
- *
  * @head:      &struct plist_head pointer
+ * @lock:      list spinlock, remembered for debugging
  */
 static inline void
 plist_head_init(struct plist_head *head, spinlock_t *lock)
@@ -137,7 +136,6 @@ plist_head_init(struct plist_head *head, spinlock_t *lock)
 
 /**
  * plist_node_init - Dynamic struct plist_node initializer
- *
  * @node:      &struct plist_node pointer
  * @prio:      initial node priority
  */
@@ -152,49 +150,46 @@ extern void plist_del(struct plist_node *node, struct plist_head *head);
 
 /**
  * plist_for_each - iterate over the plist
- *
- * @pos1:      the type * to use as a loop counter.
- * @head:      the head for your list.
+ * @pos:       the type * to use as a loop counter
+ * @head:      the head for your list
  */
 #define plist_for_each(pos, head)      \
         list_for_each_entry(pos, &(head)->node_list, plist.node_list)
 
 /**
- * plist_for_each_entry_safe - iterate over a plist of given type safe
- * against removal of list entry
+ * plist_for_each_safe - iterate safely over a plist of given type
+ * @pos:       the type * to use as a loop counter
+ * @n: another type * to use as temporary storage
+ * @head:      the head for your list
  *
- * @pos1:      the type * to use as a loop counter.
- * @n1:        another type * to use as temporary storage
- * @head:      the head for your list.
+ * Iterate over a plist of given type, safe against removal of list entry.
  */
 #define plist_for_each_safe(pos, n, head)      \
         list_for_each_entry_safe(pos, n, &(head)->node_list, plist.node_list)
 
 /**
  * plist_for_each_entry        - iterate over list of given type
- *
- * @pos:       the type * to use as a loop counter.
- * @head:      the head for your list.
- * @member:    the name of the list_struct within the struct.
+ * @pos:       the type * to use as a loop counter
+ * @head:      the head for your list
+ * @mem:       the name of the list_struct within the struct
  */
 #define plist_for_each_entry(pos, head, mem)   \
         list_for_each_entry(pos, &(head)->node_list, mem.plist.node_list)
 
 /**
- * plist_for_each_entry_safe - iterate over list of given type safe against
- * removal of list entry
- *
- * @pos:       the type * to use as a loop counter.
+ * plist_for_each_entry_safe - iterate safely over list of given type
+ * @pos:       the type * to use as a loop counter
  * @n:         another type * to use as temporary storage
- * @head:      the head for your list.
- * @m:         the name of the list_struct within the struct.
+ * @head:      the head for your list
+ * @m:         the name of the list_struct within the struct
+ *
+ * Iterate over list of given type, safe against removal of list entry.
  */
 #define plist_for_each_entry_safe(pos, n, head, m)     \
        list_for_each_entry_safe(pos, n, &(head)->node_list, m.plist.node_list)
 
 /**
  * plist_head_empty - return !0 if a plist_head is empty
- *
  * @head:      &struct plist_head pointer
  */
 static inline int plist_head_empty(const struct plist_head *head)
@@ -204,7 +199,6 @@ static inline int plist_head_empty(const struct plist_head *head)
 
 /**
  * plist_node_empty - return !0 if plist_node is not on a list
- *
  * @node:      &struct plist_node pointer
  */
 static inline int plist_node_empty(const struct plist_node *node)
@@ -216,10 +210,9 @@ static inline int plist_node_empty(const struct plist_node *node)
 
 /**
  * plist_first_entry - get the struct for the first entry
- *
- * @ptr:       the &struct plist_head pointer.
- * @type:      the type of the struct this is embedded in.
- * @member:    the name of the list_struct within the struct.
+ * @head:      the &struct plist_head pointer
+ * @type:      the type of the struct this is embedded in
+ * @member:    the name of the list_struct within the struct
  */
 #ifdef CONFIG_DEBUG_PI_LIST
 # define plist_first_entry(head, type, member) \
@@ -234,7 +227,6 @@ static inline int plist_node_empty(const struct plist_node *node)
 
 /**
  * plist_first - return the first node (and thus, highest priority)
- *
  * @head:      the &struct plist_head pointer
  *
  * Assumes the plist is _not_ empty.
index 9bae409..2bd23ea 100644 (file)
@@ -383,7 +383,10 @@ void svcauth_unix_purge(void)
 static inline struct ip_map *
 ip_map_cached_get(struct svc_rqst *rqstp)
 {
-       struct ip_map *ipm = rqstp->rq_sock->sk_info_authunix;
+       struct ip_map *ipm;
+       struct svc_sock *svsk = rqstp->rq_sock;
+       spin_lock_bh(&svsk->sk_defer_lock);
+       ipm = svsk->sk_info_authunix;
        if (ipm != NULL) {
                if (!cache_valid(&ipm->h)) {
                        /*
@@ -391,12 +394,14 @@ ip_map_cached_get(struct svc_rqst *rqstp)
                         * remembered, e.g. by a second mount from the
                         * same IP address.
                         */
-                       rqstp->rq_sock->sk_info_authunix = NULL;
+                       svsk->sk_info_authunix = NULL;
+                       spin_unlock_bh(&svsk->sk_defer_lock);
                        cache_put(&ipm->h, &ip_map_cache);
                        return NULL;
                }
                cache_get(&ipm->h);
        }
+       spin_unlock_bh(&svsk->sk_defer_lock);
        return ipm;
 }
 
@@ -405,9 +410,15 @@ ip_map_cached_put(struct svc_rqst *rqstp, struct ip_map *ipm)
 {
        struct svc_sock *svsk = rqstp->rq_sock;
 
-       if (svsk->sk_sock->type == SOCK_STREAM && svsk->sk_info_authunix == NULL)
-               svsk->sk_info_authunix = ipm;   /* newly cached, keep the reference */
-       else
+       spin_lock_bh(&svsk->sk_defer_lock);
+       if (svsk->sk_sock->type == SOCK_STREAM &&
+           svsk->sk_info_authunix == NULL) {
+               /* newly cached, keep the reference */
+               svsk->sk_info_authunix = ipm;
+               ipm = NULL;
+       }
+       spin_unlock_bh(&svsk->sk_defer_lock);
+       if (ipm)
                cache_put(&ipm->h, &ip_map_cache);
 }