]> git.karo-electronics.de Git - karo-tx-linux.git/commit
x86/PCI: initialize PCI bus node numbers early
authorJesse Barnes <jbarnes@virtuousgeek.org>
Fri, 10 Jul 2009 21:04:30 +0000 (14:04 -0700)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Wed, 9 Sep 2009 20:29:21 +0000 (13:29 -0700)
commit2547089ca2db132e307ef68848ba029a8ec2f341
treedb0079b322f964287571644c8376eb49bfcc68b7
parenteaa959df299157e2640fcb3321537501b6afd9e6
x86/PCI: initialize PCI bus node numbers early

The current mp_bus_to_node array is initialized only by AMD specific
code, since AMD platforms have registers that can be used for
determining mode numbers.  On new Intel platforms it's necessary to
initialize this array as well though, otherwise all PCI node numbers
will be 0, when in fact they should be -1 (indicating that I/O isn't
tied to any particular node).

So move the mp_bus_to_node code into the common PCI code, and
initialize it early with a default value of -1.  This may be overridden
later by arch code (e.g. the AMD code).

With this change, PCI consistent memory and other node specific
allocations (e.g. skbuff allocs) should occur on the "current" node.
If, for performance reasons, applications want to be bound to specific
nodes, they should open their devices only after being pinned to the
CPU where they'll run, for maximum locality.

Acked-by: Yinghai Lu <yinghai@kernel.org>
Tested-by: Jesse Brandeburg <jesse.brandeburg@gmail.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
arch/x86/pci/amd_bus.c
arch/x86/pci/common.c