[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110214161857.GW18742@htj.dyndns.org>
Date: Mon, 14 Feb 2011 17:18:57 +0100
From: Tejun Heo <tj@...nel.org>
To: Yinghai Lu <yinghai@...nel.org>
Cc: linux-kernel@...r.kernel.org, x86@...nel.org, brgerst@...il.com,
gorcunov@...il.com, shaohui.zheng@...el.com, rientjes@...gle.com,
mingo@...e.hu, hpa@...ux.intel.com
Subject: Re: [PATCH 04/26] x86-64, NUMA: Unify
{acpi|amd}_{numa_init|scan_nodes}() arguments and return values
On Mon, Feb 14, 2011 at 08:14:36AM -0800, Yinghai Lu wrote:
> when system have acpi support but SRAT is NOT there, new
> acpi_numa_init() will return 0 just like SRAT is there and correct.
> So it will skip AMD node scanning.
How does it return 0?
...
cnt = acpi_table_parse_srat(ACPI_SRAT_TYPE_MEMORY_AFFINITY,
acpi_parse_memory_affinity,
NR_NODE_MEMBLKS);
If there's no srat, cnt is zero.
}
/* SLIT: System Locality Information Table */
acpi_table_parse(ACPI_SIG_SLIT, acpi_parse_slit);
acpi_numa_arch_fixup();
if (cnt <= 0)
if cnt is zero, the if is taken
return cnt ?: -ENOENT;
and as cnt is zero, -ENOENT is returned.
return 0;
The function returns 0 iff cnt > 0.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists