aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-01-06 11:20:56 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-01-06 11:20:56 -0500
commita32296f93821497d794ab8e1312d677717479777 (patch)
tree2845539ba3a2f3e33567b33a3e4d1eae940b6310 /drivers/ide
parent07af5a5b0241422e4ca2dd114eaa1d7ad0165cb5 (diff)
ide: NUMA aware allocation of host and port structures
kzalloc() -> kzalloc_node() in ide_host_alloc(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-probe.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 2fca32ed576f..00c7e5a67bd1 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -1391,9 +1391,11 @@ static void ide_free_port_slot(int idx)
1391struct ide_host *ide_host_alloc(const struct ide_port_info *d, hw_regs_t **hws) 1391struct ide_host *ide_host_alloc(const struct ide_port_info *d, hw_regs_t **hws)
1392{ 1392{
1393 struct ide_host *host; 1393 struct ide_host *host;
1394 struct device *dev = hws[0] ? hws[0]->dev : NULL;
1395 int node = dev ? dev_to_node(dev) : -1;
1394 int i; 1396 int i;
1395 1397
1396 host = kzalloc(sizeof(*host), GFP_KERNEL); 1398 host = kzalloc_node(sizeof(*host), GFP_KERNEL, node);
1397 if (host == NULL) 1399 if (host == NULL)
1398 return NULL; 1400 return NULL;
1399 1401
@@ -1404,7 +1406,7 @@ struct ide_host *ide_host_alloc(const struct ide_port_info *d, hw_regs_t **hws)
1404 if (hws[i] == NULL) 1406 if (hws[i] == NULL)
1405 continue; 1407 continue;
1406 1408
1407 hwif = kzalloc(sizeof(*hwif), GFP_KERNEL); 1409 hwif = kzalloc_node(sizeof(*hwif), GFP_KERNEL, node);
1408 if (hwif == NULL) 1410 if (hwif == NULL)
1409 continue; 1411 continue;
1410 1412
@@ -1429,8 +1431,7 @@ struct ide_host *ide_host_alloc(const struct ide_port_info *d, hw_regs_t **hws)
1429 return NULL; 1431 return NULL;
1430 } 1432 }
1431 1433
1432 if (hws[0]) 1434 host->dev[0] = dev;
1433 host->dev[0] = hws[0]->dev;
1434 1435
1435 if (d) { 1436 if (d) {
1436 host->init_chipset = d->init_chipset; 1437 host->init_chipset = d->init_chipset;