From patchwork Thu Mar 25 23:33:04 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Rientjes X-Patchwork-Id: 88407 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2PNXEE5014391 for ; Thu, 25 Mar 2010 23:33:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751505Ab0CYXdN (ORCPT ); Thu, 25 Mar 2010 19:33:13 -0400 Received: from smtp-out.google.com ([216.239.44.51]:31297 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751406Ab0CYXdL (ORCPT ); Thu, 25 Mar 2010 19:33:11 -0400 Received: from hpaq11.eem.corp.google.com (hpaq11.eem.corp.google.com [10.3.21.11]) by smtp-out.google.com with ESMTP id o2PNX9bn021302; Thu, 25 Mar 2010 16:33:10 -0700 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1269559990; bh=V+oxd/57lxLdAIOFC6yZsUQboyY=; h=Date:From:To:cc:Subject:Message-ID:MIME-Version:Content-Type; b=Hku68a3NgLbEv5esCU/OJ0TL2TYkUuQEdHP+cNlTsKtqmVD3kv+Z5u0HDSTrflJNa OjLt+08yLP8ttaOGBvF1w== DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=date:from:x-x-sender:to:cc:subject:message-id:user-agent: mime-version:content-type:x-system-of-record; b=Z6PYQU7gHqxxxxs909rAwdNpWkji6iARzMUIvr9oU/sxpB4SMevVEpdVP0DYabOOr rP6eWGU/dde2XS7SeQqgg== Received: from pzk6 (pzk6.prod.google.com [10.243.19.134]) by hpaq11.eem.corp.google.com with ESMTP id o2PNX4BC025029; Fri, 26 Mar 2010 00:33:08 +0100 Received: by pzk6 with SMTP id 6so212177pzk.1 for ; Thu, 25 Mar 2010 16:33:07 -0700 (PDT) Received: by 10.115.39.11 with SMTP id r11mr2903733waj.100.1269559987206; Thu, 25 Mar 2010 16:33:07 -0700 (PDT) Received: from chino.kir.corp.google.com (chino.kir.corp.google.com [172.31.6.135]) by mx.google.com with ESMTPS id 20sm205731pzk.15.2010.03.25.16.33.06 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 25 Mar 2010 16:33:06 -0700 (PDT) Date: Thu, 25 Mar 2010 16:33:04 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Len Brown cc: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Subject: [patch] acpi: map pxms to low node ids Message-ID: User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 X-System-Of-Record: true Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 25 Mar 2010 23:33:14 +0000 (UTC) diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c --- a/drivers/acpi/numa.c +++ b/drivers/acpi/numa.c @@ -61,8 +61,10 @@ int node_to_pxm(int node) void __acpi_map_pxm_to_node(int pxm, int node) { - pxm_to_node_map[pxm] = node; - node_to_pxm_map[node] = pxm; + if (pxm_to_node_map[pxm] == NUMA_NO_NODE || node < pxm_to_node_map[pxm]) + pxm_to_node_map[pxm] = node; + if (node_to_pxm_map[node] == PXM_INVAL || pxm < node_to_pxm_map[node]) + node_to_pxm_map[node] = pxm; } int acpi_map_pxm_to_node(int pxm)