Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
authorLinus Torvalds <torvalds@g5.osdl.org>
Tue, 26 Sep 2006 00:39:55 +0000 (17:39 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 26 Sep 2006 00:39:55 +0000 (17:39 -0700)
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [NetLabel]: update docs with website information
  [NetLabel]: rework the Netlink attribute handling (part 2)
  [NetLabel]: rework the Netlink attribute handling (part 1)
  [Netlink]: add nla_validate_nested()
  [NETLINK]: add nla_for_each_nested() to the interface list
  [NetLabel]: change the SELinux permissions
  [NetLabel]: make the CIPSOv4 cache spinlocks bottom half safe
  [NetLabel]: correct improper handling of non-NetLabel peer contexts
  [TCP]: make cubic the default
  [TCP]: default congestion control menu
  [ATM] he: Fix __init/__devinit conflict
  [NETFILTER]: Add dscp,DSCP headers to header-y
  [DCCP]: Introduce dccp_probe
  [DCCP]: Use constants for CCIDs
  [DCCP]: Introduce constants for CCID numbers
  [DCCP]: Allow default/fallback service code.

36 files changed:
arch/i386/kernel/smpboot.c
arch/i386/mm/boot_ioremap.c
arch/ia64/kernel/acpi.c
arch/ia64/kernel/numa.c
arch/ia64/kernel/topology.c
arch/sparc64/solaris/misc.c
arch/sparc64/solaris/socksys.c
drivers/ata/pata_pdc2027x.c
drivers/char/rtc.c
drivers/media/video/videodev.c
drivers/net/qla3xxx.c
drivers/net/qla3xxx.h
drivers/net/sunlance.c
drivers/scsi/aic94xx/aic94xx.h
drivers/scsi/aic94xx/aic94xx_hwi.c
drivers/scsi/aic94xx/aic94xx_hwi.h
drivers/scsi/aic94xx/aic94xx_seq.c
drivers/scsi/aic94xx/aic94xx_task.c
drivers/scsi/libsas/sas_scsi_host.c
drivers/scsi/scsi.c
drivers/video/fbsysfs.c
fs/autofs4/expire.c
include/asm-alpha/libata-portmap.h [deleted file]
include/asm-frv/libata-portmap.h [deleted file]
include/asm-i386/libata-portmap.h [deleted file]
include/asm-ia64/libata-portmap.h [deleted file]
include/asm-ia64/numa.h
include/asm-powerpc/libata-portmap.h [deleted file]
include/asm-sparc/libata-portmap.h [deleted file]
include/asm-sparc64/libata-portmap.h [deleted file]
include/asm-x86_64/libata-portmap.h [deleted file]
include/linux/libata.h
include/scsi/libsas.h
kernel/module.c
mm/page_alloc.c
sound/sparc/amd7930.c

index f948419c888a85905aa768f1aaeaf0c5378ca910..efe07990e7fca6e6508b8e5ceb54caa55bad47c8 100644 (file)
@@ -642,9 +642,13 @@ static void map_cpu_to_logical_apicid(void)
 {
        int cpu = smp_processor_id();
        int apicid = logical_smp_processor_id();
+       int node = apicid_to_node(apicid);
+
+       if (!node_online(node))
+               node = first_online_node;
 
        cpu_2_logical_apicid[cpu] = apicid;
-       map_cpu_to_node(cpu, apicid_to_node(apicid));
+       map_cpu_to_node(cpu, node);
 }
 
 static void unmap_cpu_to_logical_apicid(int cpu)
index 5d44f4f5ff592a479d965449f1962dbe39daaee9..4de11f508c3a0ffb161aa95e8cd910471323aae4 100644 (file)
  */
 
 #define BOOT_PTE_PTRS (PTRS_PER_PTE*2)
-#define boot_pte_index(address) \
-            (((address) >> PAGE_SHIFT) & (BOOT_PTE_PTRS - 1))
+
+static unsigned long boot_pte_index(unsigned long vaddr) 
+{
+       return __pa(vaddr) >> PAGE_SHIFT;
+}
 
 static inline boot_pte_t* boot_vaddr_to_pte(void *address)
 {
index 0176556aeeccbf28fa6c14a9c99f07f51750d9ae..32c3abededc69aac74e522b9d06687066a716ccb 100644 (file)
@@ -771,16 +771,19 @@ int acpi_map_cpu2node(acpi_handle handle, int cpu, long physid)
 {
 #ifdef CONFIG_ACPI_NUMA
        int pxm_id;
+       int nid;
 
        pxm_id = acpi_get_pxm(handle);
-
        /*
-        * Assuming that the container driver would have set the proximity
-        * domain and would have initialized pxm_to_node(pxm_id) && pxm_flag
+        * We don't have cpu-only-node hotadd. But if the system equips
+        * SRAT table, pxm is already found and node is ready.
+        * So, just pxm_to_nid(pxm) is OK.
+        * This code here is for the system which doesn't have full SRAT
+        * table for possible cpus.
         */
-       node_cpuid[cpu].nid = (pxm_id < 0) ? 0 : pxm_to_node(pxm_id);
-
+       nid = acpi_map_pxm_to_node(pxm_id);
        node_cpuid[cpu].phys_id = physid;
+       node_cpuid[cpu].nid = nid;
 #endif
        return (0);
 }
index 1cc360c83e7af01b1ddfc632d3a7f5f071764363..20340631179f669fd7d9216d85f210c2a4cf381e 100644 (file)
@@ -29,6 +29,36 @@ EXPORT_SYMBOL(cpu_to_node_map);
 
 cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned;
 
+void __cpuinit map_cpu_to_node(int cpu, int nid)
+{
+       int oldnid;
+       if (nid < 0) { /* just initialize by zero */
+               cpu_to_node_map[cpu] = 0;
+               return;
+       }
+       /* sanity check first */
+       oldnid = cpu_to_node_map[cpu];
+       if (cpu_isset(cpu, node_to_cpu_mask[oldnid])) {
+               return; /* nothing to do */
+       }
+       /* we don't have cpu-driven node hot add yet...
+          In usual case, node is created from SRAT at boot time. */
+       if (!node_online(nid))
+               nid = first_online_node;
+       cpu_to_node_map[cpu] = nid;
+       cpu_set(cpu, node_to_cpu_mask[nid]);
+       return;
+}
+
+void __cpuinit unmap_cpu_from_node(int cpu, int nid)
+{
+       WARN_ON(!cpu_isset(cpu, node_to_cpu_mask[nid]));
+       WARN_ON(cpu_to_node_map[cpu] != nid);
+       cpu_to_node_map[cpu] = 0;
+       cpu_clear(cpu, node_to_cpu_mask[nid]);
+}
+
+
 /**
  * build_cpu_to_node_map - setup cpu to node and node to cpumask arrays
  *
@@ -49,8 +79,6 @@ void __init build_cpu_to_node_map(void)
                                node = node_cpuid[i].nid;
                                break;
                        }
-               cpu_to_node_map[cpu] = (node >= 0) ? node : 0;
-               if (node >= 0)
-                       cpu_set(cpu, node_to_cpu_mask[node]);
+               map_cpu_to_node(cpu, node);
        }
 }
index f648c610b10c50882b7fcbd0869e19b3659539b6..05bdf7affb431742a7c0f7ea8c167bea6300c530 100644 (file)
@@ -36,6 +36,9 @@ int arch_register_cpu(int num)
         */
        if (!can_cpei_retarget() && is_cpu_cpei_target(num))
                sysfs_cpus[num].cpu.no_control = 1;
+#ifdef CONFIG_NUMA
+       map_cpu_to_node(num, node_cpuid[num].nid);
+#endif
 #endif
 
        return register_cpu(&sysfs_cpus[num].cpu, num);
@@ -45,7 +48,8 @@ int arch_register_cpu(int num)
 
 void arch_unregister_cpu(int num)
 {
-       return unregister_cpu(&sysfs_cpus[num].cpu);
+       unregister_cpu(&sysfs_cpus[num].cpu);
+       unmap_cpu_from_node(num, cpu_to_node(num));
 }
 EXPORT_SYMBOL(arch_register_cpu);
 EXPORT_SYMBOL(arch_unregister_cpu);
index 8135ec322c9c02dc71f071ba6db6c97900d35c05..642541769a179970c077dba52e23c2d1d90984a3 100644 (file)
@@ -736,20 +736,15 @@ struct exec_domain solaris_exec_domain = {
 
 extern int init_socksys(void);
 
-#ifdef MODULE
-
 MODULE_AUTHOR("Jakub Jelinek (jj@ultra.linux.cz), Patrik Rak (prak3264@ss1000.ms.mff.cuni.cz)");
 MODULE_DESCRIPTION("Solaris binary emulation module");
 MODULE_LICENSE("GPL");
 
-#ifdef __sparc_v9__
 extern u32 tl0_solaris[8];
 #define update_ttable(x)                                                                               \
        tl0_solaris[3] = (((long)(x) - (long)tl0_solaris - 3) >> 2) | 0x40000000;                       \
        wmb();          \
        __asm__ __volatile__ ("flush %0" : : "r" (&tl0_solaris[3]))
-#else
-#endif 
 
 extern u32 solaris_sparc_syscall[];
 extern u32 solaris_syscall[];
@@ -757,7 +752,7 @@ extern void cleanup_socksys(void);
 
 extern u32 entry64_personality_patch;
 
-int init_module(void)
+static int __init solaris_init(void)
 {
        int ret;
 
@@ -777,19 +772,12 @@ int init_module(void)
        return 0;
 }
 
-void cleanup_module(void)
+static void __exit solaris_exit(void)
 {
        update_ttable(solaris_syscall);
        cleanup_socksys();
        unregister_exec_domain(&solaris_exec_domain);
 }
 
-#else
-int init_solaris_emul(void)
-{
-       register_exec_domain(&solaris_exec_domain);
-       init_socksys();
-       return 0;
-}
-#endif
-
+module_init(solaris_init);
+module_exit(solaris_exit);
index bc3df95bc05773b9a74419c6692f342dd9005120..7c90e41fd3bea4cdcfc6f257323c8e9790a1fec3 100644 (file)
@@ -168,8 +168,7 @@ static struct file_operations socksys_fops = {
        .release =      socksys_release,
 };
 
-int __init
-init_socksys(void)
+int __init init_socksys(void)
 {
        int ret;
        struct file * file;
@@ -199,8 +198,7 @@ init_socksys(void)
        return 0;
 }
 
-void
-cleanup_socksys(void)
+void __exit cleanup_socksys(void)
 {
        if (unregister_chrdev(30, "socksys"))
                printk ("Couldn't unregister socksys character device\n");
index 56b8c1ee293709f6ec16bdbd1724c07d83168d66..31ab9c886209e8e870a340a27fc2522764f752c9 100644 (file)
@@ -242,7 +242,7 @@ MODULE_DEVICE_TABLE(pci, pdc2027x_pci_tbl);
  *     @ap: Port
  *     @offset: offset from mmio base
  */
-static inline voidport_mmio(struct ata_port *ap, unsigned int offset)
+static inline void __iomem *port_mmio(struct ata_port *ap, unsigned int offset)
 {
        return ap->host->mmio_base + ap->port_no * 0x100 + offset;
 }
@@ -253,7 +253,7 @@ static inline void* port_mmio(struct ata_port *ap, unsigned int offset)
  *     @adev: device
  *     @offset: offset from mmio base
  */
-static inline voiddev_mmio(struct ata_port *ap, struct ata_device *adev, unsigned int offset)
+static inline void __iomem *dev_mmio(struct ata_port *ap, struct ata_device *adev, unsigned int offset)
 {
        u8 adj = (adev->devno) ? 0x08 : 0x00;
        return port_mmio(ap, offset) + adj;
@@ -758,7 +758,7 @@ static int __devinit pdc2027x_init_one(struct pci_dev *pdev, const struct pci_de
 
        struct ata_probe_ent *probe_ent = NULL;
        unsigned long base;
-       void *mmio_base;
+       void __iomem *mmio_base;
        int rc;
 
        if (!printed_version++)
index 6e6a7c7a7eff191bc56f1d634afed8bdd85f9304..ab6429b4a84e424a9e390d3946bbd1ff6a8c316f 100644 (file)
@@ -209,11 +209,12 @@ static const unsigned char days_in_mo[] =
  */
 static inline unsigned char rtc_is_updating(void)
 {
+       unsigned long flags;
        unsigned char uip;
 
-       spin_lock_irq(&rtc_lock);
+       spin_lock_irqsave(&rtc_lock, flags);
        uip = (CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP);
-       spin_unlock_irq(&rtc_lock);
+       spin_unlock_irqrestore(&rtc_lock, flags);
        return uip;
 }
 
index 88bf2af2a0e715d575ca6614139d8becfc16fb05..edd7b83c3464b4a2367c6391b30fcee2f9abcbe7 100644 (file)
@@ -836,7 +836,7 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
                        break;
                }
 
-               if (index<=0 || index >= vfd->tvnormsize) {
+               if (index < 0 || index >= vfd->tvnormsize) {
                        ret=-EINVAL;
                        break;
                }
index 09a481a71838f7e9e60b4511c7d78583348185e3..1574718463495278aca0e262a827d0cec21424a1 100644 (file)
@@ -189,31 +189,31 @@ static u32 ql_read_page0_reg(struct ql3_adapter *qdev, u32 __iomem *reg)
 }
 
 static void ql_write_common_reg_l(struct ql3_adapter *qdev,
-                               u32 reg, u32 value)
+                               u32 __iomem *reg, u32 value)
 {
        unsigned long hw_flags;
 
        spin_lock_irqsave(&qdev->hw_lock, hw_flags);
-       writel(value, (u32 *) reg);
+       writel(value, reg);
        readl(reg);
        spin_unlock_irqrestore(&qdev->hw_lock, hw_flags);
        return;
 }
 
 static void ql_write_common_reg(struct ql3_adapter *qdev,
-                               u32 reg, u32 value)
+                               u32 __iomem *reg, u32 value)
 {
-       writel(value, (u32 *) reg);
+       writel(value, reg);
        readl(reg);
        return;
 }
 
 static void ql_write_page0_reg(struct ql3_adapter *qdev,
-                              u32 reg, u32 value)
+                              u32 __iomem *reg, u32 value)
 {
        if (qdev->current_page != 0)
                ql_set_register_page(qdev,0);
-       writel(value, (u32 *) reg);
+       writel(value, reg);
        readl(reg);
        return;
 }
@@ -222,11 +222,11 @@ static void ql_write_page0_reg(struct ql3_adapter *qdev,
  * Caller holds hw_lock. Only called during init.
  */
 static void ql_write_page1_reg(struct ql3_adapter *qdev,
-                              u32 reg, u32 value)
+                              u32 __iomem *reg, u32 value)
 {
        if (qdev->current_page != 1)
                ql_set_register_page(qdev,1);
-       writel(value, (u32 *) reg);
+       writel(value, reg);
        readl(reg);
        return;
 }
@@ -235,11 +235,11 @@ static void ql_write_page1_reg(struct ql3_adapter *qdev,
  * Caller holds hw_lock. Only called during init.
  */
 static void ql_write_page2_reg(struct ql3_adapter *qdev,
-                              u32 reg, u32 value)
+                              u32 __iomem *reg, u32 value)
 {
        if (qdev->current_page != 2)
                ql_set_register_page(qdev,2);
-       writel(value, (u32 *) reg);
+       writel(value, reg);
        readl(reg);
        return;
 }
@@ -1687,7 +1687,7 @@ static void ql_update_lrg_bufq_prod_index(struct ql3_adapter *qdev)
                qdev->lrg_buf_next_free = lrg_buf_q_ele;
 
                ql_write_common_reg(qdev,
-                                   (u32 *) & port_regs->CommonRegs.
+                                   &port_regs->CommonRegs.
                                    rxLargeQProducerIndex,
                                    qdev->lrg_buf_q_producer_index);
        }
@@ -1924,13 +1924,13 @@ static int ql_tx_rx_clean(struct ql3_adapter *qdev,
                }
 
                ql_write_common_reg(qdev,
-                                   (u32 *) & port_regs->CommonRegs.
+                                   &port_regs->CommonRegs.
                                    rxSmallQProducerIndex,
                                    qdev->small_buf_q_producer_index);
        }
 
        ql_write_common_reg(qdev,
-                           (u32 *) & port_regs->CommonRegs.rspQConsumerIndex,
+                           &port_regs->CommonRegs.rspQConsumerIndex,
                            qdev->rsp_consumer_index);
        spin_unlock_irqrestore(&qdev->hw_lock, hw_flags);
 
@@ -2057,7 +2057,7 @@ static int ql3xxx_send(struct sk_buff *skb, struct net_device *ndev)
                qdev->req_producer_index = 0;
        wmb();
        ql_write_common_reg_l(qdev,
-                           (u32 *) & port_regs->CommonRegs.reqQProducerIndex,
+                           &port_regs->CommonRegs.reqQProducerIndex,
                            qdev->req_producer_index);
 
        ndev->trans_start = jiffies;
@@ -2474,8 +2474,8 @@ static void ql_free_mem_resources(struct ql3_adapter *qdev)
 
 static int ql_init_misc_registers(struct ql3_adapter *qdev)
 {
-       struct ql3xxx_local_ram_registers *local_ram =
-           (struct ql3xxx_local_ram_registers *)qdev->mem_map_registers;
+       struct ql3xxx_local_ram_registers __iomem *local_ram =
+           (void __iomem *)qdev->mem_map_registers;
 
        if(ql_sem_spinlock(qdev, QL_DDR_RAM_SEM_MASK,
                        (QL_RESOURCE_BITS_BASE_CODE | (qdev->mac_index) *
@@ -2535,7 +2535,7 @@ static int ql_adapter_initialize(struct ql3_adapter *qdev)
        u32 value;
        struct ql3xxx_port_registers __iomem *port_regs = qdev->mem_map_registers;
        struct ql3xxx_host_memory_registers __iomem *hmem_regs =
-           (struct ql3xxx_host_memory_registers *)port_regs;
+                                               (void __iomem *)port_regs;
        u32 delay = 10;
        int status = 0;
 
@@ -2640,11 +2640,11 @@ static int ql_adapter_initialize(struct ql3_adapter *qdev)
        qdev->lrg_buf_free_tail = NULL;
 
        ql_write_common_reg(qdev,
-                           (u32 *) & port_regs->CommonRegs.
+                           &port_regs->CommonRegs.
                            rxSmallQProducerIndex,
                            qdev->small_buf_q_producer_index);
        ql_write_common_reg(qdev,
-                           (u32 *) & port_regs->CommonRegs.
+                           &port_regs->CommonRegs.
                            rxLargeQProducerIndex,
                            qdev->lrg_buf_q_producer_index);
 
@@ -2787,7 +2787,7 @@ static int ql_adapter_reset(struct ql3_adapter *qdev)
               "%s: Issue soft reset to chip.\n",
               qdev->ndev->name);
        ql_write_common_reg(qdev,
-                           (u32 *) & port_regs->CommonRegs.ispControlStatus,
+                           &port_regs->CommonRegs.ispControlStatus,
                            ((ISP_CONTROL_SR << 16) | ISP_CONTROL_SR));
 
        /* Wait 3 seconds for reset to complete. */
@@ -2817,7 +2817,7 @@ static int ql_adapter_reset(struct ql3_adapter *qdev)
                printk(KERN_DEBUG PFX
                       "ql_adapter_reset: clearing RI after reset.\n");
                ql_write_common_reg(qdev,
-                                   (u32 *) & port_regs->CommonRegs.
+                                   &port_regs->CommonRegs.
                                    ispControlStatus,
                                    ((ISP_CONTROL_RI << 16) | ISP_CONTROL_RI));
        }
@@ -2825,7 +2825,7 @@ static int ql_adapter_reset(struct ql3_adapter *qdev)
        if (max_wait_time == 0) {
                /* Issue Force Soft Reset */
                ql_write_common_reg(qdev,
-                                   (u32 *) & port_regs->CommonRegs.
+                                   &port_regs->CommonRegs.
                                    ispControlStatus,
                                    ((ISP_CONTROL_FSR << 16) |
                                     ISP_CONTROL_FSR));
@@ -3243,8 +3243,7 @@ static void ql_reset_work(struct ql3_adapter *qdev)
                                       "%s: clearing NRI after reset.\n",
                                       qdev->ndev->name);
                                ql_write_common_reg(qdev,
-                                                   (u32 *) &
-                                                   port_regs->
+                                                   &port_regs->
                                                    CommonRegs.
                                                    ispControlStatus,
                                                    ((ISP_CONTROL_RI <<
@@ -3509,7 +3508,7 @@ static void __devexit ql3xxx_remove(struct pci_dev *pdev)
                qdev->workqueue = NULL;
        }
 
-       iounmap((void *)qdev->mmap_virt_base);
+       iounmap(qdev->mem_map_registers);
        pci_release_regions(pdev);
        pci_set_drvdata(pdev, NULL);
        free_netdev(ndev);
index 9492cee6b083a8580a78fcb6e87b60633c17d2dd..65da2c0bfda6b4369d130fa1916efcaa07644461 100644 (file)
@@ -1093,7 +1093,7 @@ struct ql3_adapter {
        spinlock_t hw_lock;
 
        /* PCI Bus Relative Register Addresses */
-       u8 *mmap_virt_base;     /* stores return value from ioremap() */
+       u8 __iomem *mmap_virt_base;     /* stores return value from ioremap() */
        struct ql3xxx_port_registers __iomem *mem_map_registers;
        u32 current_page;       /* tracks current register page */
 
index 77670741e101384ded859d3307860a5a870bdc1f..feb42db10ee1abd853e43f87964c5f57cbbd413d 100644 (file)
@@ -1323,9 +1323,9 @@ static const struct ethtool_ops sparc_lance_ethtool_ops = {
        .get_link               = sparc_lance_get_link,
 };
 
-static int __init sparc_lance_probe_one(struct sbus_dev *sdev,
-                                       struct sbus_dma *ledma,
-                                       struct sbus_dev *lebuffer)
+static int __devinit sparc_lance_probe_one(struct sbus_dev *sdev,
+                                          struct sbus_dma *ledma,
+                                          struct sbus_dev *lebuffer)
 {
        static unsigned version_printed;
        struct net_device *dev;
@@ -1515,7 +1515,7 @@ fail:
 }
 
 /* On 4m, find the associated dma for the lance chip */
-static inline struct sbus_dma *find_ledma(struct sbus_dev *sdev)
+static struct sbus_dma * __devinit find_ledma(struct sbus_dev *sdev)
 {
        struct sbus_dma *p;
 
@@ -1533,7 +1533,7 @@ static inline struct sbus_dma *find_ledma(struct sbus_dev *sdev)
 
 /* Find all the lance cards on the system and initialize them */
 static struct sbus_dev sun4_sdev;
-static int __init sparc_lance_init(void)
+static int __devinit sparc_lance_init(void)
 {
        if ((idprom->id_machtype == (SM_SUN4|SM_4_330)) ||
            (idprom->id_machtype == (SM_SUN4|SM_4_470))) {
index 1bd5b4ecf3d597a7bb374288ce8c644861cda9b9..71a031df7a34320af014a1a64dc66364e3bae348 100644 (file)
@@ -94,7 +94,7 @@ void asd_dev_gone(struct domain_device *dev);
 
 void asd_invalidate_edb(struct asd_ascb *ascb, int edb_id);
 
-int  asd_execute_task(struct sas_task *, int num, unsigned long gfp_flags);
+int  asd_execute_task(struct sas_task *, int num, gfp_t gfp_flags);
 
 /* ---------- TMFs ---------- */
 int  asd_abort_task(struct sas_task *);
index a24201351108117b23e8fbee686a3cdb2e01eb31..1d8c5e5f442e668fefb8aacd2522583182ce0f4f 100644 (file)
@@ -267,7 +267,7 @@ static int asd_init_dl(struct asd_ha_struct *asd_ha)
 
 /* ---------- EDB and ESCB init ---------- */
 
-static int asd_alloc_edbs(struct asd_ha_struct *asd_ha, unsigned int gfp_flags)
+static int asd_alloc_edbs(struct asd_ha_struct *asd_ha, gfp_t gfp_flags)
 {
        struct asd_seq_data *seq = &asd_ha->seq;
        int i;
@@ -298,7 +298,7 @@ Err_unroll:
 }
 
 static int asd_alloc_escbs(struct asd_ha_struct *asd_ha,
-                          unsigned int gfp_flags)
+                          gfp_t gfp_flags)
 {
        struct asd_seq_data *seq = &asd_ha->seq;
        struct asd_ascb *escb;
@@ -1028,7 +1028,7 @@ irqreturn_t asd_hw_isr(int irq, void *dev_id, struct pt_regs *regs)
 /* ---------- SCB handling ---------- */
 
 static inline struct asd_ascb *asd_ascb_alloc(struct asd_ha_struct *asd_ha,
-                                             unsigned int gfp_flags)
+                                             gfp_t gfp_flags)
 {
        extern kmem_cache_t *asd_ascb_cache;
        struct asd_seq_data *seq = &asd_ha->seq;
@@ -1086,7 +1086,7 @@ undo:
  */
 struct asd_ascb *asd_ascb_alloc_list(struct asd_ha_struct
                                     *asd_ha, int *num,
-                                    unsigned int gfp_flags)
+                                    gfp_t gfp_flags)
 {
        struct asd_ascb *first = NULL;
 
index c7d505388fed2653272b242d0122583d79fd348d..8498144aa5e1594eb1e2ecdc09dfb466c7bb48a6 100644 (file)
@@ -242,7 +242,7 @@ struct asd_ha_struct {
 
 /* ---------- DMA allocs ---------- */
 
-static inline struct asd_dma_tok *asd_dmatok_alloc(unsigned int flags)
+static inline struct asd_dma_tok *asd_dmatok_alloc(gfp_t flags)
 {
        return kmem_cache_alloc(asd_dma_token_cache, flags);
 }
@@ -254,7 +254,7 @@ static inline void asd_dmatok_free(struct asd_dma_tok *token)
 
 static inline struct asd_dma_tok *asd_alloc_coherent(struct asd_ha_struct *
                                                     asd_ha, size_t size,
-                                                    unsigned int flags)
+                                                    gfp_t flags)
 {
        struct asd_dma_tok *token = asd_dmatok_alloc(flags);
        if (token) {
@@ -376,7 +376,7 @@ irqreturn_t asd_hw_isr(int irq, void *dev_id, struct pt_regs *regs);
 
 struct asd_ascb *asd_ascb_alloc_list(struct asd_ha_struct
                                     *asd_ha, int *num,
-                                    unsigned int gfp_mask);
+                                    gfp_t gfp_mask);
 
 int  asd_post_ascb_list(struct asd_ha_struct *asd_ha, struct asd_ascb *ascb,
                        int num);
index d9b6da5fd06cad0e36c82e9d5c63c32707dade2d..56e4b3ba6a08a79710ac5190bccc41fe099e0905 100644 (file)
@@ -764,7 +764,7 @@ static void asd_init_lseq_mdp(struct asd_ha_struct *asd_ha,  int lseq)
        asd_write_reg_word(asd_ha, LmSEQ_FIRST_INV_SCB_SITE(lseq),
                           (u16)last_scb_site_no+1);
        asd_write_reg_word(asd_ha, LmSEQ_INTEN_SAVE(lseq),
-                           (u16) LmM0INTEN_MASK & 0xFFFF0000 >> 16);
+                           (u16) ((LmM0INTEN_MASK & 0xFFFF0000) >> 16));
        asd_write_reg_word(asd_ha, LmSEQ_INTEN_SAVE(lseq) + 2,
                            (u16) LmM0INTEN_MASK & 0xFFFF);
        asd_write_reg_byte(asd_ha, LmSEQ_LINK_RST_FRM_LEN(lseq), 0);
index 285e70dae933d4d3e56c76c3846c86e0bb1afa5c..d202ed5a6709560b5793bcb53c6314b1ea3b967d 100644 (file)
@@ -53,7 +53,7 @@ static const u8 data_dir_flags[] = {
 
 static inline int asd_map_scatterlist(struct sas_task *task,
                                      struct sg_el *sg_arr,
-                                     unsigned long gfp_flags)
+                                     gfp_t gfp_flags)
 {
        struct asd_ascb *ascb = task->lldd_task;
        struct asd_ha_struct *asd_ha = ascb->ha;
@@ -368,7 +368,7 @@ Again:
 /* ---------- ATA ---------- */
 
 static int asd_build_ata_ascb(struct asd_ascb *ascb, struct sas_task *task,
-                             unsigned long gfp_flags)
+                             gfp_t gfp_flags)
 {
        struct domain_device *dev = task->dev;
        struct scb *scb;
@@ -437,7 +437,7 @@ static void asd_unbuild_ata_ascb(struct asd_ascb *a)
 /* ---------- SMP ---------- */
 
 static int asd_build_smp_ascb(struct asd_ascb *ascb, struct sas_task *task,
-                             unsigned long gfp_flags)
+                             gfp_t gfp_flags)
 {
        struct asd_ha_struct *asd_ha = ascb->ha;
        struct domain_device *dev = task->dev;
@@ -487,7 +487,7 @@ static void asd_unbuild_smp_ascb(struct asd_ascb *a)
 /* ---------- SSP ---------- */
 
 static int asd_build_ssp_ascb(struct asd_ascb *ascb, struct sas_task *task,
-                             unsigned long gfp_flags)
+                             gfp_t gfp_flags)
 {
        struct domain_device *dev = task->dev;
        struct scb *scb;
@@ -550,7 +550,7 @@ static inline int asd_can_queue(struct asd_ha_struct *asd_ha, int num)
 }
 
 int asd_execute_task(struct sas_task *task, const int num,
-                    unsigned long gfp_flags)
+                    gfp_t gfp_flags)
 {
        int res = 0;
        LIST_HEAD(alist);
index 43e0e4e369346408a2512259960812755714db0a..7f9e89bcac7eacc4feae3b9a9bc6df846244a1c6 100644 (file)
@@ -134,7 +134,7 @@ static enum task_attribute sas_scsi_get_task_attr(struct scsi_cmnd *cmd)
 
 static struct sas_task *sas_create_task(struct scsi_cmnd *cmd,
                                               struct domain_device *dev,
-                                              unsigned long gfp_flags)
+                                              gfp_t gfp_flags)
 {
        struct sas_task *task = sas_alloc_task(gfp_flags);
        struct scsi_lun lun;
index c51b5769eac82790331bc9013ee6e571b2536d84..7a054f9d1ee38230a7b59344e3e791d217f46d79 100644 (file)
@@ -96,22 +96,26 @@ unsigned int scsi_logging_level;
 EXPORT_SYMBOL(scsi_logging_level);
 #endif
 
+/* NB: These are exposed through /proc/scsi/scsi and form part of the ABI.
+ * You may not alter any existing entry (although adding new ones is
+ * encouraged once assigned by ANSI/INCITS T10
+ */
 static const char *const scsi_device_types[] = {
-       "Direct access    ",
-       "Sequential access",
+       "Direct-Access    ",
+       "Sequential-Access",
        "Printer          ",
        "Processor        ",
        "WORM             ",
-       "CD/DVD           ",
+       "CD-ROM           ",
        "Scanner          ",
-       "Optical memory   ",
-       "Media changer    ",
+       "Optical Device   ",
+       "Medium Changer   ",
        "Communications   ",
        "ASC IT8          ",
        "ASC IT8          ",
        "RAID             ",
        "Enclosure        ",
-       "Direct access RBC",
+       "Direct-Access-RBC",
        "Optical card     ",
        "Bridge controller",
        "Object storage   ",
index 4f78f234473d78ca36a25b0e34239ea052aedac0..c151dcf68786a1c5ca1987f209e83351db5159d7 100644 (file)
@@ -397,6 +397,12 @@ static ssize_t store_bl_curve(struct class_device *class_device,
        u8 tmp_curve[FB_BACKLIGHT_LEVELS];
        unsigned int i;
 
+       /* Some drivers don't use framebuffer_alloc(), but those also
+        * don't have backlights.
+        */
+       if (!fb_info || !fb_info->bl_dev)
+               return -ENODEV;
+
        if (count != (FB_BACKLIGHT_LEVELS / 8 * 24))
                return -EINVAL;
 
@@ -430,6 +436,12 @@ static ssize_t show_bl_curve(struct class_device *class_device, char *buf)
        ssize_t len = 0;
        unsigned int i;
 
+       /* Some drivers don't use framebuffer_alloc(), but those also
+        * don't have backlights.
+        */
+       if (!fb_info || !fb_info->bl_dev)
+               return -ENODEV;
+
        mutex_lock(&fb_info->bl_mutex);
        for (i = 0; i < FB_BACKLIGHT_LEVELS; i += 8)
                len += snprintf(&buf[len], PAGE_SIZE,
index 8dbd44f10e9dbec10775834ae40480c1d4b98232..d96e5c14a9caaaaa2c498b3e5f833176634e3b14 100644 (file)
@@ -32,7 +32,7 @@ static inline int autofs4_can_expire(struct dentry *dentry,
 
        if (!do_now) {
                /* Too young to die */
-               if (time_after(ino->last_used + timeout, now))
+               if (!timeout || time_after(ino->last_used + timeout, now))
                        return 0;
 
                /* update last_used here :-
@@ -253,7 +253,7 @@ static struct dentry *autofs4_expire_direct(struct super_block *sb,
        struct dentry *root = dget(sb->s_root);
        int do_now = how & AUTOFS_EXP_IMMEDIATE;
 
-       if (!sbi->exp_timeout || !root)
+       if (!root)
                return NULL;
 
        now = jiffies;
@@ -293,7 +293,7 @@ static struct dentry *autofs4_expire_indirect(struct super_block *sb,
        int do_now = how & AUTOFS_EXP_IMMEDIATE;
        int exp_leaves = how & AUTOFS_EXP_LEAVES;
 
-       if ( !sbi->exp_timeout || !root )
+       if (!root)
                return NULL;
 
        now = jiffies;
diff --git a/include/asm-alpha/libata-portmap.h b/include/asm-alpha/libata-portmap.h
deleted file mode 100644 (file)
index 75484ef..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/libata-portmap.h>
diff --git a/include/asm-frv/libata-portmap.h b/include/asm-frv/libata-portmap.h
deleted file mode 100644 (file)
index 75484ef..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/libata-portmap.h>
diff --git a/include/asm-i386/libata-portmap.h b/include/asm-i386/libata-portmap.h
deleted file mode 100644 (file)
index 75484ef..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/libata-portmap.h>
diff --git a/include/asm-ia64/libata-portmap.h b/include/asm-ia64/libata-portmap.h
deleted file mode 100644 (file)
index 75484ef..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/libata-portmap.h>
index e5a8260593a55e3c15f88a6bc8391a8b8e021db3..e0a1d173e42df07fd74ebee65ffde116b9e76ec9 100644 (file)
@@ -64,6 +64,10 @@ extern int paddr_to_nid(unsigned long paddr);
 
 #define local_nodeid (cpu_to_node_map[smp_processor_id()])
 
+extern void map_cpu_to_node(int cpu, int nid);
+extern void unmap_cpu_from_node(int cpu, int nid);
+
+
 #else /* !CONFIG_NUMA */
 
 #define paddr_to_nid(addr)     0
diff --git a/include/asm-powerpc/libata-portmap.h b/include/asm-powerpc/libata-portmap.h
deleted file mode 100644 (file)
index 75484ef..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/libata-portmap.h>
diff --git a/include/asm-sparc/libata-portmap.h b/include/asm-sparc/libata-portmap.h
deleted file mode 100644 (file)
index 75484ef..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/libata-portmap.h>
diff --git a/include/asm-sparc64/libata-portmap.h b/include/asm-sparc64/libata-portmap.h
deleted file mode 100644 (file)
index 75484ef..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/libata-portmap.h>
diff --git a/include/asm-x86_64/libata-portmap.h b/include/asm-x86_64/libata-portmap.h
deleted file mode 100644 (file)
index 75484ef..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/libata-portmap.h>
index 1ef3d3901b479450339bc7389fe0ed30f9a029d3..d6a3d4b345fc7b6f26dbd9c035178eabaf2120dd 100644 (file)
 #include <linux/workqueue.h>
 #include <scsi/scsi_host.h>
 
+/*
+ * Define if arch has non-standard setup.  This is a _PCI_ standard
+ * not a legacy or ISA standard.
+ */
+#ifdef CONFIG_ATA_NONSTANDARD
 #include <asm/libata-portmap.h>
+#else
+#include <asm-generic/libata-portmap.h>
+#endif
 
 /*
  * compile-time options: to be removed as soon as all the drivers are
index 8e39982fc3db257b7a13d52f8733458a8e9c4329..9582e8401669b89ceba0d555499c0d3e263c8e30 100644 (file)
@@ -534,7 +534,7 @@ struct sas_task {
 #define SAS_TASK_STATE_DONE     2
 #define SAS_TASK_STATE_ABORTED  4
 
-static inline struct sas_task *sas_alloc_task(unsigned long flags)
+static inline struct sas_task *sas_alloc_task(gfp_t flags)
 {
        extern kmem_cache_t *sas_task_cache;
        struct sas_task *task = kmem_cache_alloc(sas_task_cache, flags);
@@ -570,7 +570,7 @@ struct sas_domain_function_template {
        void (*lldd_dev_gone)(struct domain_device *);
 
        int (*lldd_execute_task)(struct sas_task *, int num,
-                                unsigned long gfp_flags);
+                                gfp_t gfp_flags);
 
        /* Task Management Functions. Must be called from process context. */
        int (*lldd_abort_task)(struct sas_task *);
index 2a19cd47c0469462947991e5c6ee7259b4d7ea54..b7fe6e84096303865f20e1c606c6bb35c77451c8 100644 (file)
@@ -1054,6 +1054,12 @@ static int mod_sysfs_setup(struct module *mod,
 {
        int err;
 
+       if (!module_subsys.kset.subsys) {
+               printk(KERN_ERR "%s: module_subsys not initialized\n",
+                      mod->name);
+               err = -EINVAL;
+               goto out;
+       }
        memset(&mod->mkobj.kobj, 0, sizeof(mod->mkobj.kobj));
        err = kobject_set_name(&mod->mkobj.kobj, "%s", mod->name);
        if (err)
index 3b5358a0561fa99366fbb9c7d2f858c40208b0fb..8a52ba9fe693bcf749486c3ec5ae6f1e26849700 100644 (file)
@@ -1845,8 +1845,10 @@ static inline void free_zone_pagesets(int cpu)
        for_each_zone(zone) {
                struct per_cpu_pageset *pset = zone_pcp(zone, cpu);
 
+               /* Free per_cpu_pageset if it is slab allocated */
+               if (pset != &boot_pageset[cpu])
+                       kfree(pset);
                zone_pcp(zone, cpu) = NULL;
-               kfree(pset);
        }
 }
 
index 2bd8e40b854114436c8e50afcbf42e73141e7815..be0bd503f013350ae67b580e3b624f8bb5bb214c 100644 (file)
@@ -755,7 +755,7 @@ static struct snd_pcm_ops snd_amd7930_capture_ops = {
        .pointer        =       snd_amd7930_capture_pointer,
 };
 
-static int __init snd_amd7930_pcm(struct snd_amd7930 *amd)
+static int __devinit snd_amd7930_pcm(struct snd_amd7930 *amd)
 {
        struct snd_pcm *pcm;
        int err;
@@ -870,7 +870,7 @@ static int snd_amd7930_put_volume(struct snd_kcontrol *kctl, struct snd_ctl_elem
        return change;
 }
 
-static struct snd_kcontrol_new amd7930_controls[] __initdata = {
+static struct snd_kcontrol_new amd7930_controls[] __devinitdata = {
        {
                .iface          =       SNDRV_CTL_ELEM_IFACE_MIXER,
                .name           =       "Monitor Volume",
@@ -900,7 +900,7 @@ static struct snd_kcontrol_new amd7930_controls[] __initdata = {
        },
 };
 
-static int __init snd_amd7930_mixer(struct snd_amd7930 *amd)
+static int __devinit snd_amd7930_mixer(struct snd_amd7930 *amd)
 {
        struct snd_card *card;
        int idx, err;
@@ -945,11 +945,11 @@ static struct snd_device_ops snd_amd7930_dev_ops = {
        .dev_free       =       snd_amd7930_dev_free,
 };
 
-static int __init snd_amd7930_create(struct snd_card *card,
-                                    struct resource *rp,
-                                    unsigned int reg_size,
-                                    int irq, int dev,
-                                    struct snd_amd7930 **ramd)
+static int __devinit snd_amd7930_create(struct snd_card *card,
+                                       struct resource *rp,
+                                       unsigned int reg_size,
+                                       int irq, int dev,
+                                       struct snd_amd7930 **ramd)
 {
        unsigned long flags;
        struct snd_amd7930 *amd;
@@ -1013,7 +1013,7 @@ static int __init snd_amd7930_create(struct snd_card *card,
        return 0;
 }
 
-static int __init amd7930_attach_common(struct resource *rp, int irq)
+static int __devinit amd7930_attach_common(struct resource *rp, int irq)
 {
        static int dev_num;
        struct snd_card *card;
@@ -1065,7 +1065,7 @@ out_err:
        return err;
 }
 
-static int __init amd7930_obio_attach(struct device_node *dp)
+static int __devinit amd7930_obio_attach(struct device_node *dp)
 {
        struct linux_prom_registers *regs;
        struct linux_prom_irqs *irqp;