aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-03-26 16:39:17 -0400
committerIngo Molnar <mingo@elte.hu>2009-03-27 12:28:43 -0400
commit6e15cf04860074ad032e88c306bea656bbdd0f22 (patch)
treec346383bb7563e8d66b2f4a502f875b259c34870 /drivers/net/sfc
parentbe0ea69674ed95e1e98cb3687a241badc756d228 (diff)
parent60db56422043aaa455ac7f858ce23c273220f9d9 (diff)
Merge branch 'core/percpu' into percpu-cpumask-x86-for-linus-2
Conflicts: arch/parisc/kernel/irq.c arch/x86/include/asm/fixmap_64.h arch/x86/include/asm/setup.h kernel/irq/handle.c Semantic merge: arch/x86/include/asm/fixmap.h Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/net/sfc')
-rw-r--r--drivers/net/sfc/efx.c17
-rw-r--r--drivers/net/sfc/falcon.c24
2 files changed, 24 insertions, 17 deletions
diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c
index 6eff9ca6c6c..00c23b1babc 100644
--- a/drivers/net/sfc/efx.c
+++ b/drivers/net/sfc/efx.c
@@ -894,20 +894,27 @@ static void efx_fini_io(struct efx_nic *efx)
894 * interrupts across them. */ 894 * interrupts across them. */
895static int efx_wanted_rx_queues(void) 895static int efx_wanted_rx_queues(void)
896{ 896{
897 cpumask_t core_mask; 897 cpumask_var_t core_mask;
898 int count; 898 int count;
899 int cpu; 899 int cpu;
900 900
901 cpus_clear(core_mask); 901 if (!alloc_cpumask_var(&core_mask, GFP_KERNEL)) {
902 printk(KERN_WARNING
903 "efx.c: allocation failure, irq balancing hobbled\n");
904 return 1;
905 }
906
907 cpumask_clear(core_mask);
902 count = 0; 908 count = 0;
903 for_each_online_cpu(cpu) { 909 for_each_online_cpu(cpu) {
904 if (!cpu_isset(cpu, core_mask)) { 910 if (!cpumask_test_cpu(cpu, core_mask)) {
905 ++count; 911 ++count;
906 cpus_or(core_mask, core_mask, 912 cpumask_or(core_mask, core_mask,
907 topology_core_siblings(cpu)); 913 topology_core_cpumask(cpu));
908 } 914 }
909 } 915 }
910 916
917 free_cpumask_var(core_mask);
911 return count; 918 return count;
912} 919}
913 920
diff --git a/drivers/net/sfc/falcon.c b/drivers/net/sfc/falcon.c
index 23a1b148d5b..d4629ab2c61 100644
--- a/drivers/net/sfc/falcon.c
+++ b/drivers/net/sfc/falcon.c
@@ -340,10 +340,10 @@ static int falcon_alloc_special_buffer(struct efx_nic *efx,
340 nic_data->next_buffer_table += buffer->entries; 340 nic_data->next_buffer_table += buffer->entries;
341 341
342 EFX_LOG(efx, "allocating special buffers %d-%d at %llx+%x " 342 EFX_LOG(efx, "allocating special buffers %d-%d at %llx+%x "
343 "(virt %p phys %lx)\n", buffer->index, 343 "(virt %p phys %llx)\n", buffer->index,
344 buffer->index + buffer->entries - 1, 344 buffer->index + buffer->entries - 1,
345 (unsigned long long)buffer->dma_addr, len, 345 (u64)buffer->dma_addr, len,
346 buffer->addr, virt_to_phys(buffer->addr)); 346 buffer->addr, (u64)virt_to_phys(buffer->addr));
347 347
348 return 0; 348 return 0;
349} 349}
@@ -355,10 +355,10 @@ static void falcon_free_special_buffer(struct efx_nic *efx,
355 return; 355 return;
356 356
357 EFX_LOG(efx, "deallocating special buffers %d-%d at %llx+%x " 357 EFX_LOG(efx, "deallocating special buffers %d-%d at %llx+%x "
358 "(virt %p phys %lx)\n", buffer->index, 358 "(virt %p phys %llx)\n", buffer->index,
359 buffer->index + buffer->entries - 1, 359 buffer->index + buffer->entries - 1,
360 (unsigned long long)buffer->dma_addr, buffer->len, 360 (u64)buffer->dma_addr, buffer->len,
361 buffer->addr, virt_to_phys(buffer->addr)); 361 buffer->addr, (u64)virt_to_phys(buffer->addr));
362 362
363 pci_free_consistent(efx->pci_dev, buffer->len, buffer->addr, 363 pci_free_consistent(efx->pci_dev, buffer->len, buffer->addr,
364 buffer->dma_addr); 364 buffer->dma_addr);
@@ -2357,10 +2357,10 @@ int falcon_probe_port(struct efx_nic *efx)
2357 FALCON_MAC_STATS_SIZE); 2357 FALCON_MAC_STATS_SIZE);
2358 if (rc) 2358 if (rc)
2359 return rc; 2359 return rc;
2360 EFX_LOG(efx, "stats buffer at %llx (virt %p phys %lx)\n", 2360 EFX_LOG(efx, "stats buffer at %llx (virt %p phys %llx)\n",
2361 (unsigned long long)efx->stats_buffer.dma_addr, 2361 (u64)efx->stats_buffer.dma_addr,
2362 efx->stats_buffer.addr, 2362 efx->stats_buffer.addr,
2363 virt_to_phys(efx->stats_buffer.addr)); 2363 (u64)virt_to_phys(efx->stats_buffer.addr));
2364 2364
2365 return 0; 2365 return 0;
2366} 2366}
@@ -2935,9 +2935,9 @@ int falcon_probe_nic(struct efx_nic *efx)
2935 goto fail4; 2935 goto fail4;
2936 BUG_ON(efx->irq_status.dma_addr & 0x0f); 2936 BUG_ON(efx->irq_status.dma_addr & 0x0f);
2937 2937
2938 EFX_LOG(efx, "INT_KER at %llx (virt %p phys %lx)\n", 2938 EFX_LOG(efx, "INT_KER at %llx (virt %p phys %llx)\n",
2939 (unsigned long long)efx->irq_status.dma_addr, 2939 (u64)efx->irq_status.dma_addr,
2940 efx->irq_status.addr, virt_to_phys(efx->irq_status.addr)); 2940 efx->irq_status.addr, (u64)virt_to_phys(efx->irq_status.addr));
2941 2941
2942 falcon_probe_spi_devices(efx); 2942 falcon_probe_spi_devices(efx);
2943 2943