aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/i386/kernel/smpboot.c6
-rw-r--r--arch/i386/mm/boot_ioremap.c7
-rw-r--r--arch/ia64/kernel/acpi.c13
-rw-r--r--arch/ia64/kernel/numa.c34
-rw-r--r--arch/ia64/kernel/topology.c6
-rw-r--r--arch/sparc64/solaris/misc.c20
-rw-r--r--arch/sparc64/solaris/socksys.c6
-rw-r--r--drivers/ata/pata_pdc2027x.c6
-rw-r--r--drivers/char/rtc.c5
-rw-r--r--drivers/media/video/videodev.c2
-rw-r--r--drivers/net/qla3xxx.c49
-rw-r--r--drivers/net/qla3xxx.h2
-rw-r--r--drivers/net/sunlance.c10
-rw-r--r--drivers/scsi/aic94xx/aic94xx.h2
-rw-r--r--drivers/scsi/aic94xx/aic94xx_hwi.c8
-rw-r--r--drivers/scsi/aic94xx/aic94xx_hwi.h6
-rw-r--r--drivers/scsi/aic94xx/aic94xx_seq.c2
-rw-r--r--drivers/scsi/aic94xx/aic94xx_task.c10
-rw-r--r--drivers/scsi/libsas/sas_scsi_host.c2
-rw-r--r--drivers/scsi/scsi.c16
-rw-r--r--drivers/video/fbsysfs.c12
-rw-r--r--fs/autofs4/expire.c6
-rw-r--r--include/asm-alpha/libata-portmap.h1
-rw-r--r--include/asm-frv/libata-portmap.h1
-rw-r--r--include/asm-i386/libata-portmap.h1
-rw-r--r--include/asm-ia64/libata-portmap.h1
-rw-r--r--include/asm-ia64/numa.h4
-rw-r--r--include/asm-powerpc/libata-portmap.h1
-rw-r--r--include/asm-sparc/libata-portmap.h1
-rw-r--r--include/asm-sparc64/libata-portmap.h1
-rw-r--r--include/asm-x86_64/libata-portmap.h1
-rw-r--r--include/linux/libata.h8
-rw-r--r--include/scsi/libsas.h4
-rw-r--r--kernel/module.c6
-rw-r--r--mm/page_alloc.c4
-rw-r--r--sound/sparc/amd7930.c20
36 files changed, 170 insertions, 114 deletions
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c
index f948419c888a..efe07990e7fc 100644
--- a/arch/i386/kernel/smpboot.c
+++ b/arch/i386/kernel/smpboot.c
@@ -642,9 +642,13 @@ static void map_cpu_to_logical_apicid(void)
642{ 642{
643 int cpu = smp_processor_id(); 643 int cpu = smp_processor_id();
644 int apicid = logical_smp_processor_id(); 644 int apicid = logical_smp_processor_id();
645 int node = apicid_to_node(apicid);
646
647 if (!node_online(node))
648 node = first_online_node;
645 649
646 cpu_2_logical_apicid[cpu] = apicid; 650 cpu_2_logical_apicid[cpu] = apicid;
647 map_cpu_to_node(cpu, apicid_to_node(apicid)); 651 map_cpu_to_node(cpu, node);
648} 652}
649 653
650static void unmap_cpu_to_logical_apicid(int cpu) 654static void unmap_cpu_to_logical_apicid(int cpu)
diff --git a/arch/i386/mm/boot_ioremap.c b/arch/i386/mm/boot_ioremap.c
index 5d44f4f5ff59..4de11f508c3a 100644
--- a/arch/i386/mm/boot_ioremap.c
+++ b/arch/i386/mm/boot_ioremap.c
@@ -29,8 +29,11 @@
29 */ 29 */
30 30
31#define BOOT_PTE_PTRS (PTRS_PER_PTE*2) 31#define BOOT_PTE_PTRS (PTRS_PER_PTE*2)
32#define boot_pte_index(address) \ 32
33 (((address) >> PAGE_SHIFT) & (BOOT_PTE_PTRS - 1)) 33static unsigned long boot_pte_index(unsigned long vaddr)
34{
35 return __pa(vaddr) >> PAGE_SHIFT;
36}
34 37
35static inline boot_pte_t* boot_vaddr_to_pte(void *address) 38static inline boot_pte_t* boot_vaddr_to_pte(void *address)
36{ 39{
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index 0176556aeecc..32c3abededc6 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -771,16 +771,19 @@ int acpi_map_cpu2node(acpi_handle handle, int cpu, long physid)
771{ 771{
772#ifdef CONFIG_ACPI_NUMA 772#ifdef CONFIG_ACPI_NUMA
773 int pxm_id; 773 int pxm_id;
774 int nid;
774 775
775 pxm_id = acpi_get_pxm(handle); 776 pxm_id = acpi_get_pxm(handle);
776
777 /* 777 /*
778 * Assuming that the container driver would have set the proximity 778 * We don't have cpu-only-node hotadd. But if the system equips
779 * domain and would have initialized pxm_to_node(pxm_id) && pxm_flag 779 * SRAT table, pxm is already found and node is ready.
780 * So, just pxm_to_nid(pxm) is OK.
781 * This code here is for the system which doesn't have full SRAT
782 * table for possible cpus.
780 */ 783 */
781 node_cpuid[cpu].nid = (pxm_id < 0) ? 0 : pxm_to_node(pxm_id); 784 nid = acpi_map_pxm_to_node(pxm_id);
782
783 node_cpuid[cpu].phys_id = physid; 785 node_cpuid[cpu].phys_id = physid;
786 node_cpuid[cpu].nid = nid;
784#endif 787#endif
785 return (0); 788 return (0);
786} 789}
diff --git a/arch/ia64/kernel/numa.c b/arch/ia64/kernel/numa.c
index 1cc360c83e7a..20340631179f 100644
--- a/arch/ia64/kernel/numa.c
+++ b/arch/ia64/kernel/numa.c
@@ -29,6 +29,36 @@ EXPORT_SYMBOL(cpu_to_node_map);
29 29
30cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned; 30cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned;
31 31
32void __cpuinit map_cpu_to_node(int cpu, int nid)
33{
34 int oldnid;
35 if (nid < 0) { /* just initialize by zero */
36 cpu_to_node_map[cpu] = 0;
37 return;
38 }
39 /* sanity check first */
40 oldnid = cpu_to_node_map[cpu];
41 if (cpu_isset(cpu, node_to_cpu_mask[oldnid])) {
42 return; /* nothing to do */
43 }
44 /* we don't have cpu-driven node hot add yet...
45 In usual case, node is created from SRAT at boot time. */
46 if (!node_online(nid))
47 nid = first_online_node;
48 cpu_to_node_map[cpu] = nid;
49 cpu_set(cpu, node_to_cpu_mask[nid]);
50 return;
51}
52
53void __cpuinit unmap_cpu_from_node(int cpu, int nid)
54{
55 WARN_ON(!cpu_isset(cpu, node_to_cpu_mask[nid]));
56 WARN_ON(cpu_to_node_map[cpu] != nid);
57 cpu_to_node_map[cpu] = 0;
58 cpu_clear(cpu, node_to_cpu_mask[nid]);
59}
60
61
32/** 62/**
33 * build_cpu_to_node_map - setup cpu to node and node to cpumask arrays 63 * build_cpu_to_node_map - setup cpu to node and node to cpumask arrays
34 * 64 *
@@ -49,8 +79,6 @@ void __init build_cpu_to_node_map(void)
49 node = node_cpuid[i].nid; 79 node = node_cpuid[i].nid;
50 break; 80 break;
51 } 81 }
52 cpu_to_node_map[cpu] = (node >= 0) ? node : 0; 82 map_cpu_to_node(cpu, node);
53 if (node >= 0)
54 cpu_set(cpu, node_to_cpu_mask[node]);
55 } 83 }
56} 84}
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c
index f648c610b10c..05bdf7affb43 100644
--- a/arch/ia64/kernel/topology.c
+++ b/arch/ia64/kernel/topology.c
@@ -36,6 +36,9 @@ int arch_register_cpu(int num)
36 */ 36 */
37 if (!can_cpei_retarget() && is_cpu_cpei_target(num)) 37 if (!can_cpei_retarget() && is_cpu_cpei_target(num))
38 sysfs_cpus[num].cpu.no_control = 1; 38 sysfs_cpus[num].cpu.no_control = 1;
39#ifdef CONFIG_NUMA
40 map_cpu_to_node(num, node_cpuid[num].nid);
41#endif
39#endif 42#endif
40 43
41 return register_cpu(&sysfs_cpus[num].cpu, num); 44 return register_cpu(&sysfs_cpus[num].cpu, num);
@@ -45,7 +48,8 @@ int arch_register_cpu(int num)
45 48
46void arch_unregister_cpu(int num) 49void arch_unregister_cpu(int num)
47{ 50{
48 return unregister_cpu(&sysfs_cpus[num].cpu); 51 unregister_cpu(&sysfs_cpus[num].cpu);
52 unmap_cpu_from_node(num, cpu_to_node(num));
49} 53}
50EXPORT_SYMBOL(arch_register_cpu); 54EXPORT_SYMBOL(arch_register_cpu);
51EXPORT_SYMBOL(arch_unregister_cpu); 55EXPORT_SYMBOL(arch_unregister_cpu);
diff --git a/arch/sparc64/solaris/misc.c b/arch/sparc64/solaris/misc.c
index 8135ec322c9c..642541769a17 100644
--- a/arch/sparc64/solaris/misc.c
+++ b/arch/sparc64/solaris/misc.c
@@ -736,20 +736,15 @@ struct exec_domain solaris_exec_domain = {
736 736
737extern int init_socksys(void); 737extern int init_socksys(void);
738 738
739#ifdef MODULE
740
741MODULE_AUTHOR("Jakub Jelinek (jj@ultra.linux.cz), Patrik Rak (prak3264@ss1000.ms.mff.cuni.cz)"); 739MODULE_AUTHOR("Jakub Jelinek (jj@ultra.linux.cz), Patrik Rak (prak3264@ss1000.ms.mff.cuni.cz)");
742MODULE_DESCRIPTION("Solaris binary emulation module"); 740MODULE_DESCRIPTION("Solaris binary emulation module");
743MODULE_LICENSE("GPL"); 741MODULE_LICENSE("GPL");
744 742
745#ifdef __sparc_v9__
746extern u32 tl0_solaris[8]; 743extern u32 tl0_solaris[8];
747#define update_ttable(x) \ 744#define update_ttable(x) \
748 tl0_solaris[3] = (((long)(x) - (long)tl0_solaris - 3) >> 2) | 0x40000000; \ 745 tl0_solaris[3] = (((long)(x) - (long)tl0_solaris - 3) >> 2) | 0x40000000; \
749 wmb(); \ 746 wmb(); \
750 __asm__ __volatile__ ("flush %0" : : "r" (&tl0_solaris[3])) 747 __asm__ __volatile__ ("flush %0" : : "r" (&tl0_solaris[3]))
751#else
752#endif
753 748
754extern u32 solaris_sparc_syscall[]; 749extern u32 solaris_sparc_syscall[];
755extern u32 solaris_syscall[]; 750extern u32 solaris_syscall[];
@@ -757,7 +752,7 @@ extern void cleanup_socksys(void);
757 752
758extern u32 entry64_personality_patch; 753extern u32 entry64_personality_patch;
759 754
760int init_module(void) 755static int __init solaris_init(void)
761{ 756{
762 int ret; 757 int ret;
763 758
@@ -777,19 +772,12 @@ int init_module(void)
777 return 0; 772 return 0;
778} 773}
779 774
780void cleanup_module(void) 775static void __exit solaris_exit(void)
781{ 776{
782 update_ttable(solaris_syscall); 777 update_ttable(solaris_syscall);
783 cleanup_socksys(); 778 cleanup_socksys();
784 unregister_exec_domain(&solaris_exec_domain); 779 unregister_exec_domain(&solaris_exec_domain);
785} 780}
786 781
787#else 782module_init(solaris_init);
788int init_solaris_emul(void) 783module_exit(solaris_exit);
789{
790 register_exec_domain(&solaris_exec_domain);
791 init_socksys();
792 return 0;
793}
794#endif
795
diff --git a/arch/sparc64/solaris/socksys.c b/arch/sparc64/solaris/socksys.c
index bc3df95bc057..7c90e41fd3be 100644
--- a/arch/sparc64/solaris/socksys.c
+++ b/arch/sparc64/solaris/socksys.c
@@ -168,8 +168,7 @@ static struct file_operations socksys_fops = {
168 .release = socksys_release, 168 .release = socksys_release,
169}; 169};
170 170
171int __init 171int __init init_socksys(void)
172init_socksys(void)
173{ 172{
174 int ret; 173 int ret;
175 struct file * file; 174 struct file * file;
@@ -199,8 +198,7 @@ init_socksys(void)
199 return 0; 198 return 0;
200} 199}
201 200
202void 201void __exit cleanup_socksys(void)
203cleanup_socksys(void)
204{ 202{
205 if (unregister_chrdev(30, "socksys")) 203 if (unregister_chrdev(30, "socksys"))
206 printk ("Couldn't unregister socksys character device\n"); 204 printk ("Couldn't unregister socksys character device\n");
diff --git a/drivers/ata/pata_pdc2027x.c b/drivers/ata/pata_pdc2027x.c
index 56b8c1ee2937..31ab9c886209 100644
--- a/drivers/ata/pata_pdc2027x.c
+++ b/drivers/ata/pata_pdc2027x.c
@@ -242,7 +242,7 @@ MODULE_DEVICE_TABLE(pci, pdc2027x_pci_tbl);
242 * @ap: Port 242 * @ap: Port
243 * @offset: offset from mmio base 243 * @offset: offset from mmio base
244 */ 244 */
245static inline void* port_mmio(struct ata_port *ap, unsigned int offset) 245static inline void __iomem *port_mmio(struct ata_port *ap, unsigned int offset)
246{ 246{
247 return ap->host->mmio_base + ap->port_no * 0x100 + offset; 247 return ap->host->mmio_base + ap->port_no * 0x100 + offset;
248} 248}
@@ -253,7 +253,7 @@ static inline void* port_mmio(struct ata_port *ap, unsigned int offset)
253 * @adev: device 253 * @adev: device
254 * @offset: offset from mmio base 254 * @offset: offset from mmio base
255 */ 255 */
256static inline void* dev_mmio(struct ata_port *ap, struct ata_device *adev, unsigned int offset) 256static inline void __iomem *dev_mmio(struct ata_port *ap, struct ata_device *adev, unsigned int offset)
257{ 257{
258 u8 adj = (adev->devno) ? 0x08 : 0x00; 258 u8 adj = (adev->devno) ? 0x08 : 0x00;
259 return port_mmio(ap, offset) + adj; 259 return port_mmio(ap, offset) + adj;
@@ -758,7 +758,7 @@ static int __devinit pdc2027x_init_one(struct pci_dev *pdev, const struct pci_de
758 758
759 struct ata_probe_ent *probe_ent = NULL; 759 struct ata_probe_ent *probe_ent = NULL;
760 unsigned long base; 760 unsigned long base;
761 void *mmio_base; 761 void __iomem *mmio_base;
762 int rc; 762 int rc;
763 763
764 if (!printed_version++) 764 if (!printed_version++)
diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c
index 6e6a7c7a7eff..ab6429b4a84e 100644
--- a/drivers/char/rtc.c
+++ b/drivers/char/rtc.c
@@ -209,11 +209,12 @@ static const unsigned char days_in_mo[] =
209 */ 209 */
210static inline unsigned char rtc_is_updating(void) 210static inline unsigned char rtc_is_updating(void)
211{ 211{
212 unsigned long flags;
212 unsigned char uip; 213 unsigned char uip;
213 214
214 spin_lock_irq(&rtc_lock); 215 spin_lock_irqsave(&rtc_lock, flags);
215 uip = (CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP); 216 uip = (CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP);
216 spin_unlock_irq(&rtc_lock); 217 spin_unlock_irqrestore(&rtc_lock, flags);
217 return uip; 218 return uip;
218} 219}
219 220
diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c
index 88bf2af2a0e7..edd7b83c3464 100644
--- a/drivers/media/video/videodev.c
+++ b/drivers/media/video/videodev.c
@@ -836,7 +836,7 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
836 break; 836 break;
837 } 837 }
838 838
839 if (index<=0 || index >= vfd->tvnormsize) { 839 if (index < 0 || index >= vfd->tvnormsize) {
840 ret=-EINVAL; 840 ret=-EINVAL;
841 break; 841 break;
842 } 842 }
diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c
index 09a481a71838..157471846349 100644
--- a/drivers/net/qla3xxx.c
+++ b/drivers/net/qla3xxx.c
@@ -189,31 +189,31 @@ static u32 ql_read_page0_reg(struct ql3_adapter *qdev, u32 __iomem *reg)
189} 189}
190 190
191static void ql_write_common_reg_l(struct ql3_adapter *qdev, 191static void ql_write_common_reg_l(struct ql3_adapter *qdev,
192 u32 * reg, u32 value) 192 u32 __iomem *reg, u32 value)
193{ 193{
194 unsigned long hw_flags; 194 unsigned long hw_flags;
195 195
196 spin_lock_irqsave(&qdev->hw_lock, hw_flags); 196 spin_lock_irqsave(&qdev->hw_lock, hw_flags);
197 writel(value, (u32 *) reg); 197 writel(value, reg);
198 readl(reg); 198 readl(reg);
199 spin_unlock_irqrestore(&qdev->hw_lock, hw_flags); 199 spin_unlock_irqrestore(&qdev->hw_lock, hw_flags);
200 return; 200 return;
201} 201}
202 202
203static void ql_write_common_reg(struct ql3_adapter *qdev, 203static void ql_write_common_reg(struct ql3_adapter *qdev,
204 u32 * reg, u32 value) 204 u32 __iomem *reg, u32 value)
205{ 205{
206 writel(value, (u32 *) reg); 206 writel(value, reg);
207 readl(reg); 207 readl(reg);
208 return; 208 return;
209} 209}
210 210
211static void ql_write_page0_reg(struct ql3_adapter *qdev, 211static void ql_write_page0_reg(struct ql3_adapter *qdev,
212 u32 * reg, u32 value) 212 u32 __iomem *reg, u32 value)
213{ 213{
214 if (qdev->current_page != 0) 214 if (qdev->current_page != 0)
215 ql_set_register_page(qdev,0); 215 ql_set_register_page(qdev,0);
216 writel(value, (u32 *) reg); 216 writel(value, reg);
217 readl(reg); 217 readl(reg);
218 return; 218 return;
219} 219}
@@ -222,11 +222,11 @@ static void ql_write_page0_reg(struct ql3_adapter *qdev,
222 * Caller holds hw_lock. Only called during init. 222 * Caller holds hw_lock. Only called during init.
223 */ 223 */
224static void ql_write_page1_reg(struct ql3_adapter *qdev, 224static void ql_write_page1_reg(struct ql3_adapter *qdev,
225 u32 * reg, u32 value) 225 u32 __iomem *reg, u32 value)
226{ 226{
227 if (qdev->current_page != 1) 227 if (qdev->current_page != 1)
228 ql_set_register_page(qdev,1); 228 ql_set_register_page(qdev,1);
229 writel(value, (u32 *) reg); 229 writel(value, reg);
230 readl(reg); 230 readl(reg);
231 return; 231 return;
232} 232}
@@ -235,11 +235,11 @@ static void ql_write_page1_reg(struct ql3_adapter *qdev,
235 * Caller holds hw_lock. Only called during init. 235 * Caller holds hw_lock. Only called during init.
236 */ 236 */
237static void ql_write_page2_reg(struct ql3_adapter *qdev, 237static void ql_write_page2_reg(struct ql3_adapter *qdev,
238 u32 * reg, u32 value) 238 u32 __iomem *reg, u32 value)
239{ 239{
240 if (qdev->current_page != 2) 240 if (qdev->current_page != 2)
241 ql_set_register_page(qdev,2); 241 ql_set_register_page(qdev,2);
242 writel(value, (u32 *) reg); 242 writel(value, reg);
243 readl(reg); 243 readl(reg);
244 return; 244 return;
245} 245}
@@ -1687,7 +1687,7 @@ static void ql_update_lrg_bufq_prod_index(struct ql3_adapter *qdev)
1687 qdev->lrg_buf_next_free = lrg_buf_q_ele; 1687 qdev->lrg_buf_next_free = lrg_buf_q_ele;
1688 1688
1689 ql_write_common_reg(qdev, 1689 ql_write_common_reg(qdev,
1690 (u32 *) & port_regs->CommonRegs. 1690 &port_regs->CommonRegs.
1691 rxLargeQProducerIndex, 1691 rxLargeQProducerIndex,
1692 qdev->lrg_buf_q_producer_index); 1692 qdev->lrg_buf_q_producer_index);
1693 } 1693 }
@@ -1924,13 +1924,13 @@ static int ql_tx_rx_clean(struct ql3_adapter *qdev,
1924 } 1924 }
1925 1925
1926 ql_write_common_reg(qdev, 1926 ql_write_common_reg(qdev,
1927 (u32 *) & port_regs->CommonRegs. 1927 &port_regs->CommonRegs.
1928 rxSmallQProducerIndex, 1928 rxSmallQProducerIndex,
1929 qdev->small_buf_q_producer_index); 1929 qdev->small_buf_q_producer_index);
1930 } 1930 }
1931 1931
1932 ql_write_common_reg(qdev, 1932 ql_write_common_reg(qdev,
1933 (u32 *) & port_regs->CommonRegs.rspQConsumerIndex, 1933 &port_regs->CommonRegs.rspQConsumerIndex,
1934 qdev->rsp_consumer_index); 1934 qdev->rsp_consumer_index);
1935 spin_unlock_irqrestore(&qdev->hw_lock, hw_flags); 1935 spin_unlock_irqrestore(&qdev->hw_lock, hw_flags);
1936 1936
@@ -2057,7 +2057,7 @@ static int ql3xxx_send(struct sk_buff *skb, struct net_device *ndev)
2057 qdev->req_producer_index = 0; 2057 qdev->req_producer_index = 0;
2058 wmb(); 2058 wmb();
2059 ql_write_common_reg_l(qdev, 2059 ql_write_common_reg_l(qdev,
2060 (u32 *) & port_regs->CommonRegs.reqQProducerIndex, 2060 &port_regs->CommonRegs.reqQProducerIndex,
2061 qdev->req_producer_index); 2061 qdev->req_producer_index);
2062 2062
2063 ndev->trans_start = jiffies; 2063 ndev->trans_start = jiffies;
@@ -2474,8 +2474,8 @@ static void ql_free_mem_resources(struct ql3_adapter *qdev)
2474 2474
2475static int ql_init_misc_registers(struct ql3_adapter *qdev) 2475static int ql_init_misc_registers(struct ql3_adapter *qdev)
2476{ 2476{
2477 struct ql3xxx_local_ram_registers *local_ram = 2477 struct ql3xxx_local_ram_registers __iomem *local_ram =
2478 (struct ql3xxx_local_ram_registers *)qdev->mem_map_registers; 2478 (void __iomem *)qdev->mem_map_registers;
2479 2479
2480 if(ql_sem_spinlock(qdev, QL_DDR_RAM_SEM_MASK, 2480 if(ql_sem_spinlock(qdev, QL_DDR_RAM_SEM_MASK,
2481 (QL_RESOURCE_BITS_BASE_CODE | (qdev->mac_index) * 2481 (QL_RESOURCE_BITS_BASE_CODE | (qdev->mac_index) *
@@ -2535,7 +2535,7 @@ static int ql_adapter_initialize(struct ql3_adapter *qdev)
2535 u32 value; 2535 u32 value;
2536 struct ql3xxx_port_registers __iomem *port_regs = qdev->mem_map_registers; 2536 struct ql3xxx_port_registers __iomem *port_regs = qdev->mem_map_registers;
2537 struct ql3xxx_host_memory_registers __iomem *hmem_regs = 2537 struct ql3xxx_host_memory_registers __iomem *hmem_regs =
2538 (struct ql3xxx_host_memory_registers *)port_regs; 2538 (void __iomem *)port_regs;
2539 u32 delay = 10; 2539 u32 delay = 10;
2540 int status = 0; 2540 int status = 0;
2541 2541
@@ -2640,11 +2640,11 @@ static int ql_adapter_initialize(struct ql3_adapter *qdev)
2640 qdev->lrg_buf_free_tail = NULL; 2640 qdev->lrg_buf_free_tail = NULL;
2641 2641
2642 ql_write_common_reg(qdev, 2642 ql_write_common_reg(qdev,
2643 (u32 *) & port_regs->CommonRegs. 2643 &port_regs->CommonRegs.
2644 rxSmallQProducerIndex, 2644 rxSmallQProducerIndex,
2645 qdev->small_buf_q_producer_index); 2645 qdev->small_buf_q_producer_index);
2646 ql_write_common_reg(qdev, 2646 ql_write_common_reg(qdev,
2647 (u32 *) & port_regs->CommonRegs. 2647 &port_regs->CommonRegs.
2648 rxLargeQProducerIndex, 2648 rxLargeQProducerIndex,
2649 qdev->lrg_buf_q_producer_index); 2649 qdev->lrg_buf_q_producer_index);
2650 2650
@@ -2787,7 +2787,7 @@ static int ql_adapter_reset(struct ql3_adapter *qdev)
2787 "%s: Issue soft reset to chip.\n", 2787 "%s: Issue soft reset to chip.\n",
2788 qdev->ndev->name); 2788 qdev->ndev->name);
2789 ql_write_common_reg(qdev, 2789 ql_write_common_reg(qdev,
2790 (u32 *) & port_regs->CommonRegs.ispControlStatus, 2790 &port_regs->CommonRegs.ispControlStatus,
2791 ((ISP_CONTROL_SR << 16) | ISP_CONTROL_SR)); 2791 ((ISP_CONTROL_SR << 16) | ISP_CONTROL_SR));
2792 2792
2793 /* Wait 3 seconds for reset to complete. */ 2793 /* Wait 3 seconds for reset to complete. */
@@ -2817,7 +2817,7 @@ static int ql_adapter_reset(struct ql3_adapter *qdev)
2817 printk(KERN_DEBUG PFX 2817 printk(KERN_DEBUG PFX
2818 "ql_adapter_reset: clearing RI after reset.\n"); 2818 "ql_adapter_reset: clearing RI after reset.\n");
2819 ql_write_common_reg(qdev, 2819 ql_write_common_reg(qdev,
2820 (u32 *) & port_regs->CommonRegs. 2820 &port_regs->CommonRegs.
2821 ispControlStatus, 2821 ispControlStatus,
2822 ((ISP_CONTROL_RI << 16) | ISP_CONTROL_RI)); 2822 ((ISP_CONTROL_RI << 16) | ISP_CONTROL_RI));
2823 } 2823 }
@@ -2825,7 +2825,7 @@ static int ql_adapter_reset(struct ql3_adapter *qdev)
2825 if (max_wait_time == 0) { 2825 if (max_wait_time == 0) {
2826 /* Issue Force Soft Reset */ 2826 /* Issue Force Soft Reset */
2827 ql_write_common_reg(qdev, 2827 ql_write_common_reg(qdev,
2828 (u32 *) & port_regs->CommonRegs. 2828 &port_regs->CommonRegs.
2829 ispControlStatus, 2829 ispControlStatus,
2830 ((ISP_CONTROL_FSR << 16) | 2830 ((ISP_CONTROL_FSR << 16) |
2831 ISP_CONTROL_FSR)); 2831 ISP_CONTROL_FSR));
@@ -3243,8 +3243,7 @@ static void ql_reset_work(struct ql3_adapter *qdev)
3243 "%s: clearing NRI after reset.\n", 3243 "%s: clearing NRI after reset.\n",
3244 qdev->ndev->name); 3244 qdev->ndev->name);
3245 ql_write_common_reg(qdev, 3245 ql_write_common_reg(qdev,
3246 (u32 *) & 3246 &port_regs->
3247 port_regs->
3248 CommonRegs. 3247 CommonRegs.
3249 ispControlStatus, 3248 ispControlStatus,
3250 ((ISP_CONTROL_RI << 3249 ((ISP_CONTROL_RI <<
@@ -3509,7 +3508,7 @@ static void __devexit ql3xxx_remove(struct pci_dev *pdev)
3509 qdev->workqueue = NULL; 3508 qdev->workqueue = NULL;
3510 } 3509 }
3511 3510
3512 iounmap((void *)qdev->mmap_virt_base); 3511 iounmap(qdev->mem_map_registers);
3513 pci_release_regions(pdev); 3512 pci_release_regions(pdev);
3514 pci_set_drvdata(pdev, NULL); 3513 pci_set_drvdata(pdev, NULL);
3515 free_netdev(ndev); 3514 free_netdev(ndev);
diff --git a/drivers/net/qla3xxx.h b/drivers/net/qla3xxx.h
index 9492cee6b083..65da2c0bfda6 100644
--- a/drivers/net/qla3xxx.h
+++ b/drivers/net/qla3xxx.h
@@ -1093,7 +1093,7 @@ struct ql3_adapter {
1093 spinlock_t hw_lock; 1093 spinlock_t hw_lock;
1094 1094
1095 /* PCI Bus Relative Register Addresses */ 1095 /* PCI Bus Relative Register Addresses */
1096 u8 *mmap_virt_base; /* stores return value from ioremap() */ 1096 u8 __iomem *mmap_virt_base; /* stores return value from ioremap() */
1097 struct ql3xxx_port_registers __iomem *mem_map_registers; 1097 struct ql3xxx_port_registers __iomem *mem_map_registers;
1098 u32 current_page; /* tracks current register page */ 1098 u32 current_page; /* tracks current register page */
1099 1099
diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c
index 77670741e101..feb42db10ee1 100644
--- a/drivers/net/sunlance.c
+++ b/drivers/net/sunlance.c
@@ -1323,9 +1323,9 @@ static const struct ethtool_ops sparc_lance_ethtool_ops = {
1323 .get_link = sparc_lance_get_link, 1323 .get_link = sparc_lance_get_link,
1324}; 1324};
1325 1325
1326static int __init sparc_lance_probe_one(struct sbus_dev *sdev, 1326static int __devinit sparc_lance_probe_one(struct sbus_dev *sdev,
1327 struct sbus_dma *ledma, 1327 struct sbus_dma *ledma,
1328 struct sbus_dev *lebuffer) 1328 struct sbus_dev *lebuffer)
1329{ 1329{
1330 static unsigned version_printed; 1330 static unsigned version_printed;
1331 struct net_device *dev; 1331 struct net_device *dev;
@@ -1515,7 +1515,7 @@ fail:
1515} 1515}
1516 1516
1517/* On 4m, find the associated dma for the lance chip */ 1517/* On 4m, find the associated dma for the lance chip */
1518static inline struct sbus_dma *find_ledma(struct sbus_dev *sdev) 1518static struct sbus_dma * __devinit find_ledma(struct sbus_dev *sdev)
1519{ 1519{
1520 struct sbus_dma *p; 1520 struct sbus_dma *p;
1521 1521
@@ -1533,7 +1533,7 @@ static inline struct sbus_dma *find_ledma(struct sbus_dev *sdev)
1533 1533
1534/* Find all the lance cards on the system and initialize them */ 1534/* Find all the lance cards on the system and initialize them */
1535static struct sbus_dev sun4_sdev; 1535static struct sbus_dev sun4_sdev;
1536static int __init sparc_lance_init(void) 1536static int __devinit sparc_lance_init(void)
1537{ 1537{
1538 if ((idprom->id_machtype == (SM_SUN4|SM_4_330)) || 1538 if ((idprom->id_machtype == (SM_SUN4|SM_4_330)) ||
1539 (idprom->id_machtype == (SM_SUN4|SM_4_470))) { 1539 (idprom->id_machtype == (SM_SUN4|SM_4_470))) {
diff --git a/drivers/scsi/aic94xx/aic94xx.h b/drivers/scsi/aic94xx/aic94xx.h
index 1bd5b4ecf3d5..71a031df7a34 100644
--- a/drivers/scsi/aic94xx/aic94xx.h
+++ b/drivers/scsi/aic94xx/aic94xx.h
@@ -94,7 +94,7 @@ void asd_dev_gone(struct domain_device *dev);
94 94
95void asd_invalidate_edb(struct asd_ascb *ascb, int edb_id); 95void asd_invalidate_edb(struct asd_ascb *ascb, int edb_id);
96 96
97int asd_execute_task(struct sas_task *, int num, unsigned long gfp_flags); 97int asd_execute_task(struct sas_task *, int num, gfp_t gfp_flags);
98 98
99/* ---------- TMFs ---------- */ 99/* ---------- TMFs ---------- */
100int asd_abort_task(struct sas_task *); 100int asd_abort_task(struct sas_task *);
diff --git a/drivers/scsi/aic94xx/aic94xx_hwi.c b/drivers/scsi/aic94xx/aic94xx_hwi.c
index a24201351108..1d8c5e5f442e 100644
--- a/drivers/scsi/aic94xx/aic94xx_hwi.c
+++ b/drivers/scsi/aic94xx/aic94xx_hwi.c
@@ -267,7 +267,7 @@ static int asd_init_dl(struct asd_ha_struct *asd_ha)
267 267
268/* ---------- EDB and ESCB init ---------- */ 268/* ---------- EDB and ESCB init ---------- */
269 269
270static int asd_alloc_edbs(struct asd_ha_struct *asd_ha, unsigned int gfp_flags) 270static int asd_alloc_edbs(struct asd_ha_struct *asd_ha, gfp_t gfp_flags)
271{ 271{
272 struct asd_seq_data *seq = &asd_ha->seq; 272 struct asd_seq_data *seq = &asd_ha->seq;
273 int i; 273 int i;
@@ -298,7 +298,7 @@ Err_unroll:
298} 298}
299 299
300static int asd_alloc_escbs(struct asd_ha_struct *asd_ha, 300static int asd_alloc_escbs(struct asd_ha_struct *asd_ha,
301 unsigned int gfp_flags) 301 gfp_t gfp_flags)
302{ 302{
303 struct asd_seq_data *seq = &asd_ha->seq; 303 struct asd_seq_data *seq = &asd_ha->seq;
304 struct asd_ascb *escb; 304 struct asd_ascb *escb;
@@ -1028,7 +1028,7 @@ irqreturn_t asd_hw_isr(int irq, void *dev_id, struct pt_regs *regs)
1028/* ---------- SCB handling ---------- */ 1028/* ---------- SCB handling ---------- */
1029 1029
1030static inline struct asd_ascb *asd_ascb_alloc(struct asd_ha_struct *asd_ha, 1030static inline struct asd_ascb *asd_ascb_alloc(struct asd_ha_struct *asd_ha,
1031 unsigned int gfp_flags) 1031 gfp_t gfp_flags)
1032{ 1032{
1033 extern kmem_cache_t *asd_ascb_cache; 1033 extern kmem_cache_t *asd_ascb_cache;
1034 struct asd_seq_data *seq = &asd_ha->seq; 1034 struct asd_seq_data *seq = &asd_ha->seq;
@@ -1086,7 +1086,7 @@ undo:
1086 */ 1086 */
1087struct asd_ascb *asd_ascb_alloc_list(struct asd_ha_struct 1087struct asd_ascb *asd_ascb_alloc_list(struct asd_ha_struct
1088 *asd_ha, int *num, 1088 *asd_ha, int *num,
1089 unsigned int gfp_flags) 1089 gfp_t gfp_flags)
1090{ 1090{
1091 struct asd_ascb *first = NULL; 1091 struct asd_ascb *first = NULL;
1092 1092
diff --git a/drivers/scsi/aic94xx/aic94xx_hwi.h b/drivers/scsi/aic94xx/aic94xx_hwi.h
index c7d505388fed..8498144aa5e1 100644
--- a/drivers/scsi/aic94xx/aic94xx_hwi.h
+++ b/drivers/scsi/aic94xx/aic94xx_hwi.h
@@ -242,7 +242,7 @@ struct asd_ha_struct {
242 242
243/* ---------- DMA allocs ---------- */ 243/* ---------- DMA allocs ---------- */
244 244
245static inline struct asd_dma_tok *asd_dmatok_alloc(unsigned int flags) 245static inline struct asd_dma_tok *asd_dmatok_alloc(gfp_t flags)
246{ 246{
247 return kmem_cache_alloc(asd_dma_token_cache, flags); 247 return kmem_cache_alloc(asd_dma_token_cache, flags);
248} 248}
@@ -254,7 +254,7 @@ static inline void asd_dmatok_free(struct asd_dma_tok *token)
254 254
255static inline struct asd_dma_tok *asd_alloc_coherent(struct asd_ha_struct * 255static inline struct asd_dma_tok *asd_alloc_coherent(struct asd_ha_struct *
256 asd_ha, size_t size, 256 asd_ha, size_t size,
257 unsigned int flags) 257 gfp_t flags)
258{ 258{
259 struct asd_dma_tok *token = asd_dmatok_alloc(flags); 259 struct asd_dma_tok *token = asd_dmatok_alloc(flags);
260 if (token) { 260 if (token) {
@@ -376,7 +376,7 @@ irqreturn_t asd_hw_isr(int irq, void *dev_id, struct pt_regs *regs);
376 376
377struct asd_ascb *asd_ascb_alloc_list(struct asd_ha_struct 377struct asd_ascb *asd_ascb_alloc_list(struct asd_ha_struct
378 *asd_ha, int *num, 378 *asd_ha, int *num,
379 unsigned int gfp_mask); 379 gfp_t gfp_mask);
380 380
381int asd_post_ascb_list(struct asd_ha_struct *asd_ha, struct asd_ascb *ascb, 381int asd_post_ascb_list(struct asd_ha_struct *asd_ha, struct asd_ascb *ascb,
382 int num); 382 int num);
diff --git a/drivers/scsi/aic94xx/aic94xx_seq.c b/drivers/scsi/aic94xx/aic94xx_seq.c
index d9b6da5fd06c..56e4b3ba6a08 100644
--- a/drivers/scsi/aic94xx/aic94xx_seq.c
+++ b/drivers/scsi/aic94xx/aic94xx_seq.c
@@ -764,7 +764,7 @@ static void asd_init_lseq_mdp(struct asd_ha_struct *asd_ha, int lseq)
764 asd_write_reg_word(asd_ha, LmSEQ_FIRST_INV_SCB_SITE(lseq), 764 asd_write_reg_word(asd_ha, LmSEQ_FIRST_INV_SCB_SITE(lseq),
765 (u16)last_scb_site_no+1); 765 (u16)last_scb_site_no+1);
766 asd_write_reg_word(asd_ha, LmSEQ_INTEN_SAVE(lseq), 766 asd_write_reg_word(asd_ha, LmSEQ_INTEN_SAVE(lseq),
767 (u16) LmM0INTEN_MASK & 0xFFFF0000 >> 16); 767 (u16) ((LmM0INTEN_MASK & 0xFFFF0000) >> 16));
768 asd_write_reg_word(asd_ha, LmSEQ_INTEN_SAVE(lseq) + 2, 768 asd_write_reg_word(asd_ha, LmSEQ_INTEN_SAVE(lseq) + 2,
769 (u16) LmM0INTEN_MASK & 0xFFFF); 769 (u16) LmM0INTEN_MASK & 0xFFFF);
770 asd_write_reg_byte(asd_ha, LmSEQ_LINK_RST_FRM_LEN(lseq), 0); 770 asd_write_reg_byte(asd_ha, LmSEQ_LINK_RST_FRM_LEN(lseq), 0);
diff --git a/drivers/scsi/aic94xx/aic94xx_task.c b/drivers/scsi/aic94xx/aic94xx_task.c
index 285e70dae933..d202ed5a6709 100644
--- a/drivers/scsi/aic94xx/aic94xx_task.c
+++ b/drivers/scsi/aic94xx/aic94xx_task.c
@@ -53,7 +53,7 @@ static const u8 data_dir_flags[] = {
53 53
54static inline int asd_map_scatterlist(struct sas_task *task, 54static inline int asd_map_scatterlist(struct sas_task *task,
55 struct sg_el *sg_arr, 55 struct sg_el *sg_arr,
56 unsigned long gfp_flags) 56 gfp_t gfp_flags)
57{ 57{
58 struct asd_ascb *ascb = task->lldd_task; 58 struct asd_ascb *ascb = task->lldd_task;
59 struct asd_ha_struct *asd_ha = ascb->ha; 59 struct asd_ha_struct *asd_ha = ascb->ha;
@@ -368,7 +368,7 @@ Again:
368/* ---------- ATA ---------- */ 368/* ---------- ATA ---------- */
369 369
370static int asd_build_ata_ascb(struct asd_ascb *ascb, struct sas_task *task, 370static int asd_build_ata_ascb(struct asd_ascb *ascb, struct sas_task *task,
371 unsigned long gfp_flags) 371 gfp_t gfp_flags)
372{ 372{
373 struct domain_device *dev = task->dev; 373 struct domain_device *dev = task->dev;
374 struct scb *scb; 374 struct scb *scb;
@@ -437,7 +437,7 @@ static void asd_unbuild_ata_ascb(struct asd_ascb *a)
437/* ---------- SMP ---------- */ 437/* ---------- SMP ---------- */
438 438
439static int asd_build_smp_ascb(struct asd_ascb *ascb, struct sas_task *task, 439static int asd_build_smp_ascb(struct asd_ascb *ascb, struct sas_task *task,
440 unsigned long gfp_flags) 440 gfp_t gfp_flags)
441{ 441{
442 struct asd_ha_struct *asd_ha = ascb->ha; 442 struct asd_ha_struct *asd_ha = ascb->ha;
443 struct domain_device *dev = task->dev; 443 struct domain_device *dev = task->dev;
@@ -487,7 +487,7 @@ static void asd_unbuild_smp_ascb(struct asd_ascb *a)
487/* ---------- SSP ---------- */ 487/* ---------- SSP ---------- */
488 488
489static int asd_build_ssp_ascb(struct asd_ascb *ascb, struct sas_task *task, 489static int asd_build_ssp_ascb(struct asd_ascb *ascb, struct sas_task *task,
490 unsigned long gfp_flags) 490 gfp_t gfp_flags)
491{ 491{
492 struct domain_device *dev = task->dev; 492 struct domain_device *dev = task->dev;
493 struct scb *scb; 493 struct scb *scb;
@@ -550,7 +550,7 @@ static inline int asd_can_queue(struct asd_ha_struct *asd_ha, int num)
550} 550}
551 551
552int asd_execute_task(struct sas_task *task, const int num, 552int asd_execute_task(struct sas_task *task, const int num,
553 unsigned long gfp_flags) 553 gfp_t gfp_flags)
554{ 554{
555 int res = 0; 555 int res = 0;
556 LIST_HEAD(alist); 556 LIST_HEAD(alist);
diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c
index 43e0e4e36934..7f9e89bcac7e 100644
--- a/drivers/scsi/libsas/sas_scsi_host.c
+++ b/drivers/scsi/libsas/sas_scsi_host.c
@@ -134,7 +134,7 @@ static enum task_attribute sas_scsi_get_task_attr(struct scsi_cmnd *cmd)
134 134
135static struct sas_task *sas_create_task(struct scsi_cmnd *cmd, 135static struct sas_task *sas_create_task(struct scsi_cmnd *cmd,
136 struct domain_device *dev, 136 struct domain_device *dev,
137 unsigned long gfp_flags) 137 gfp_t gfp_flags)
138{ 138{
139 struct sas_task *task = sas_alloc_task(gfp_flags); 139 struct sas_task *task = sas_alloc_task(gfp_flags);
140 struct scsi_lun lun; 140 struct scsi_lun lun;
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index c51b5769eac8..7a054f9d1ee3 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -96,22 +96,26 @@ unsigned int scsi_logging_level;
96EXPORT_SYMBOL(scsi_logging_level); 96EXPORT_SYMBOL(scsi_logging_level);
97#endif 97#endif
98 98
99/* NB: These are exposed through /proc/scsi/scsi and form part of the ABI.
100 * You may not alter any existing entry (although adding new ones is
101 * encouraged once assigned by ANSI/INCITS T10
102 */
99static const char *const scsi_device_types[] = { 103static const char *const scsi_device_types[] = {
100 "Direct access ", 104 "Direct-Access ",
101 "Sequential access", 105 "Sequential-Access",
102 "Printer ", 106 "Printer ",
103 "Processor ", 107 "Processor ",
104 "WORM ", 108 "WORM ",
105 "CD/DVD ", 109 "CD-ROM ",
106 "Scanner ", 110 "Scanner ",
107 "Optical memory ", 111 "Optical Device ",
108 "Media changer ", 112 "Medium Changer ",
109 "Communications ", 113 "Communications ",
110 "ASC IT8 ", 114 "ASC IT8 ",
111 "ASC IT8 ", 115 "ASC IT8 ",
112 "RAID ", 116 "RAID ",
113 "Enclosure ", 117 "Enclosure ",
114 "Direct access RBC", 118 "Direct-Access-RBC",
115 "Optical card ", 119 "Optical card ",
116 "Bridge controller", 120 "Bridge controller",
117 "Object storage ", 121 "Object storage ",
diff --git a/drivers/video/fbsysfs.c b/drivers/video/fbsysfs.c
index 4f78f234473d..c151dcf68786 100644
--- a/drivers/video/fbsysfs.c
+++ b/drivers/video/fbsysfs.c
@@ -397,6 +397,12 @@ static ssize_t store_bl_curve(struct class_device *class_device,
397 u8 tmp_curve[FB_BACKLIGHT_LEVELS]; 397 u8 tmp_curve[FB_BACKLIGHT_LEVELS];
398 unsigned int i; 398 unsigned int i;
399 399
400 /* Some drivers don't use framebuffer_alloc(), but those also
401 * don't have backlights.
402 */
403 if (!fb_info || !fb_info->bl_dev)
404 return -ENODEV;
405
400 if (count != (FB_BACKLIGHT_LEVELS / 8 * 24)) 406 if (count != (FB_BACKLIGHT_LEVELS / 8 * 24))
401 return -EINVAL; 407 return -EINVAL;
402 408
@@ -430,6 +436,12 @@ static ssize_t show_bl_curve(struct class_device *class_device, char *buf)
430 ssize_t len = 0; 436 ssize_t len = 0;
431 unsigned int i; 437 unsigned int i;
432 438
439 /* Some drivers don't use framebuffer_alloc(), but those also
440 * don't have backlights.
441 */
442 if (!fb_info || !fb_info->bl_dev)
443 return -ENODEV;
444
433 mutex_lock(&fb_info->bl_mutex); 445 mutex_lock(&fb_info->bl_mutex);
434 for (i = 0; i < FB_BACKLIGHT_LEVELS; i += 8) 446 for (i = 0; i < FB_BACKLIGHT_LEVELS; i += 8)
435 len += snprintf(&buf[len], PAGE_SIZE, 447 len += snprintf(&buf[len], PAGE_SIZE,
diff --git a/fs/autofs4/expire.c b/fs/autofs4/expire.c
index 8dbd44f10e9d..d96e5c14a9ca 100644
--- a/fs/autofs4/expire.c
+++ b/fs/autofs4/expire.c
@@ -32,7 +32,7 @@ static inline int autofs4_can_expire(struct dentry *dentry,
32 32
33 if (!do_now) { 33 if (!do_now) {
34 /* Too young to die */ 34 /* Too young to die */
35 if (time_after(ino->last_used + timeout, now)) 35 if (!timeout || time_after(ino->last_used + timeout, now))
36 return 0; 36 return 0;
37 37
38 /* update last_used here :- 38 /* update last_used here :-
@@ -253,7 +253,7 @@ static struct dentry *autofs4_expire_direct(struct super_block *sb,
253 struct dentry *root = dget(sb->s_root); 253 struct dentry *root = dget(sb->s_root);
254 int do_now = how & AUTOFS_EXP_IMMEDIATE; 254 int do_now = how & AUTOFS_EXP_IMMEDIATE;
255 255
256 if (!sbi->exp_timeout || !root) 256 if (!root)
257 return NULL; 257 return NULL;
258 258
259 now = jiffies; 259 now = jiffies;
@@ -293,7 +293,7 @@ static struct dentry *autofs4_expire_indirect(struct super_block *sb,
293 int do_now = how & AUTOFS_EXP_IMMEDIATE; 293 int do_now = how & AUTOFS_EXP_IMMEDIATE;
294 int exp_leaves = how & AUTOFS_EXP_LEAVES; 294 int exp_leaves = how & AUTOFS_EXP_LEAVES;
295 295
296 if ( !sbi->exp_timeout || !root ) 296 if (!root)
297 return NULL; 297 return NULL;
298 298
299 now = jiffies; 299 now = jiffies;
diff --git a/include/asm-alpha/libata-portmap.h b/include/asm-alpha/libata-portmap.h
deleted file mode 100644
index 75484ef0c743..000000000000
--- a/include/asm-alpha/libata-portmap.h
+++ /dev/null
@@ -1 +0,0 @@
1#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
index 75484ef0c743..000000000000
--- a/include/asm-frv/libata-portmap.h
+++ /dev/null
@@ -1 +0,0 @@
1#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
index 75484ef0c743..000000000000
--- a/include/asm-i386/libata-portmap.h
+++ /dev/null
@@ -1 +0,0 @@
1#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
index 75484ef0c743..000000000000
--- a/include/asm-ia64/libata-portmap.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/libata-portmap.h>
diff --git a/include/asm-ia64/numa.h b/include/asm-ia64/numa.h
index e5a8260593a5..e0a1d173e42d 100644
--- a/include/asm-ia64/numa.h
+++ b/include/asm-ia64/numa.h
@@ -64,6 +64,10 @@ extern int paddr_to_nid(unsigned long paddr);
64 64
65#define local_nodeid (cpu_to_node_map[smp_processor_id()]) 65#define local_nodeid (cpu_to_node_map[smp_processor_id()])
66 66
67extern void map_cpu_to_node(int cpu, int nid);
68extern void unmap_cpu_from_node(int cpu, int nid);
69
70
67#else /* !CONFIG_NUMA */ 71#else /* !CONFIG_NUMA */
68 72
69#define paddr_to_nid(addr) 0 73#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
index 75484ef0c743..000000000000
--- a/include/asm-powerpc/libata-portmap.h
+++ /dev/null
@@ -1 +0,0 @@
1#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
index 75484ef0c743..000000000000
--- a/include/asm-sparc/libata-portmap.h
+++ /dev/null
@@ -1 +0,0 @@
1#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
index 75484ef0c743..000000000000
--- a/include/asm-sparc64/libata-portmap.h
+++ /dev/null
@@ -1 +0,0 @@
1#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
index 75484ef0c743..000000000000
--- a/include/asm-x86_64/libata-portmap.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/libata-portmap.h>
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 1ef3d3901b47..d6a3d4b345fc 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -36,7 +36,15 @@
36#include <linux/workqueue.h> 36#include <linux/workqueue.h>
37#include <scsi/scsi_host.h> 37#include <scsi/scsi_host.h>
38 38
39/*
40 * Define if arch has non-standard setup. This is a _PCI_ standard
41 * not a legacy or ISA standard.
42 */
43#ifdef CONFIG_ATA_NONSTANDARD
39#include <asm/libata-portmap.h> 44#include <asm/libata-portmap.h>
45#else
46#include <asm-generic/libata-portmap.h>
47#endif
40 48
41/* 49/*
42 * compile-time options: to be removed as soon as all the drivers are 50 * compile-time options: to be removed as soon as all the drivers are
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
index 8e39982fc3db..9582e8401669 100644
--- a/include/scsi/libsas.h
+++ b/include/scsi/libsas.h
@@ -534,7 +534,7 @@ struct sas_task {
534#define SAS_TASK_STATE_DONE 2 534#define SAS_TASK_STATE_DONE 2
535#define SAS_TASK_STATE_ABORTED 4 535#define SAS_TASK_STATE_ABORTED 4
536 536
537static inline struct sas_task *sas_alloc_task(unsigned long flags) 537static inline struct sas_task *sas_alloc_task(gfp_t flags)
538{ 538{
539 extern kmem_cache_t *sas_task_cache; 539 extern kmem_cache_t *sas_task_cache;
540 struct sas_task *task = kmem_cache_alloc(sas_task_cache, flags); 540 struct sas_task *task = kmem_cache_alloc(sas_task_cache, flags);
@@ -570,7 +570,7 @@ struct sas_domain_function_template {
570 void (*lldd_dev_gone)(struct domain_device *); 570 void (*lldd_dev_gone)(struct domain_device *);
571 571
572 int (*lldd_execute_task)(struct sas_task *, int num, 572 int (*lldd_execute_task)(struct sas_task *, int num,
573 unsigned long gfp_flags); 573 gfp_t gfp_flags);
574 574
575 /* Task Management Functions. Must be called from process context. */ 575 /* Task Management Functions. Must be called from process context. */
576 int (*lldd_abort_task)(struct sas_task *); 576 int (*lldd_abort_task)(struct sas_task *);
diff --git a/kernel/module.c b/kernel/module.c
index 2a19cd47c046..b7fe6e840963 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1054,6 +1054,12 @@ static int mod_sysfs_setup(struct module *mod,
1054{ 1054{
1055 int err; 1055 int err;
1056 1056
1057 if (!module_subsys.kset.subsys) {
1058 printk(KERN_ERR "%s: module_subsys not initialized\n",
1059 mod->name);
1060 err = -EINVAL;
1061 goto out;
1062 }
1057 memset(&mod->mkobj.kobj, 0, sizeof(mod->mkobj.kobj)); 1063 memset(&mod->mkobj.kobj, 0, sizeof(mod->mkobj.kobj));
1058 err = kobject_set_name(&mod->mkobj.kobj, "%s", mod->name); 1064 err = kobject_set_name(&mod->mkobj.kobj, "%s", mod->name);
1059 if (err) 1065 if (err)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 3b5358a0561f..8a52ba9fe693 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1845,8 +1845,10 @@ static inline void free_zone_pagesets(int cpu)
1845 for_each_zone(zone) { 1845 for_each_zone(zone) {
1846 struct per_cpu_pageset *pset = zone_pcp(zone, cpu); 1846 struct per_cpu_pageset *pset = zone_pcp(zone, cpu);
1847 1847
1848 /* Free per_cpu_pageset if it is slab allocated */
1849 if (pset != &boot_pageset[cpu])
1850 kfree(pset);
1848 zone_pcp(zone, cpu) = NULL; 1851 zone_pcp(zone, cpu) = NULL;
1849 kfree(pset);
1850 } 1852 }
1851} 1853}
1852 1854
diff --git a/sound/sparc/amd7930.c b/sound/sparc/amd7930.c
index 2bd8e40b8541..be0bd503f013 100644
--- a/sound/sparc/amd7930.c
+++ b/sound/sparc/amd7930.c
@@ -755,7 +755,7 @@ static struct snd_pcm_ops snd_amd7930_capture_ops = {
755 .pointer = snd_amd7930_capture_pointer, 755 .pointer = snd_amd7930_capture_pointer,
756}; 756};
757 757
758static int __init snd_amd7930_pcm(struct snd_amd7930 *amd) 758static int __devinit snd_amd7930_pcm(struct snd_amd7930 *amd)
759{ 759{
760 struct snd_pcm *pcm; 760 struct snd_pcm *pcm;
761 int err; 761 int err;
@@ -870,7 +870,7 @@ static int snd_amd7930_put_volume(struct snd_kcontrol *kctl, struct snd_ctl_elem
870 return change; 870 return change;
871} 871}
872 872
873static struct snd_kcontrol_new amd7930_controls[] __initdata = { 873static struct snd_kcontrol_new amd7930_controls[] __devinitdata = {
874 { 874 {
875 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 875 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
876 .name = "Monitor Volume", 876 .name = "Monitor Volume",
@@ -900,7 +900,7 @@ static struct snd_kcontrol_new amd7930_controls[] __initdata = {
900 }, 900 },
901}; 901};
902 902
903static int __init snd_amd7930_mixer(struct snd_amd7930 *amd) 903static int __devinit snd_amd7930_mixer(struct snd_amd7930 *amd)
904{ 904{
905 struct snd_card *card; 905 struct snd_card *card;
906 int idx, err; 906 int idx, err;
@@ -945,11 +945,11 @@ static struct snd_device_ops snd_amd7930_dev_ops = {
945 .dev_free = snd_amd7930_dev_free, 945 .dev_free = snd_amd7930_dev_free,
946}; 946};
947 947
948static int __init snd_amd7930_create(struct snd_card *card, 948static int __devinit snd_amd7930_create(struct snd_card *card,
949 struct resource *rp, 949 struct resource *rp,
950 unsigned int reg_size, 950 unsigned int reg_size,
951 int irq, int dev, 951 int irq, int dev,
952 struct snd_amd7930 **ramd) 952 struct snd_amd7930 **ramd)
953{ 953{
954 unsigned long flags; 954 unsigned long flags;
955 struct snd_amd7930 *amd; 955 struct snd_amd7930 *amd;
@@ -1013,7 +1013,7 @@ static int __init snd_amd7930_create(struct snd_card *card,
1013 return 0; 1013 return 0;
1014} 1014}
1015 1015
1016static int __init amd7930_attach_common(struct resource *rp, int irq) 1016static int __devinit amd7930_attach_common(struct resource *rp, int irq)
1017{ 1017{
1018 static int dev_num; 1018 static int dev_num;
1019 struct snd_card *card; 1019 struct snd_card *card;
@@ -1065,7 +1065,7 @@ out_err:
1065 return err; 1065 return err;
1066} 1066}
1067 1067
1068static int __init amd7930_obio_attach(struct device_node *dp) 1068static int __devinit amd7930_obio_attach(struct device_node *dp)
1069{ 1069{
1070 struct linux_prom_registers *regs; 1070 struct linux_prom_registers *regs;
1071 struct linux_prom_irqs *irqp; 1071 struct linux_prom_irqs *irqp;