numa.c (ef34e0efa22a867f8db16feb79fba9964cfbe253) | numa.c (5a1ea4774ddc2c6bc3ba1415880091eccf1a901e) |
---|---|
1/* 2 * pSeries NUMA support 3 * 4 * Copyright (C) 2002 Anton Blanchard <anton@au.ibm.com>, IBM 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * as published by the Free Software Foundation; either version --- 1053 unchanged lines hidden (view full) --- 1062u64 memory_hotplug_max(void) 1063{ 1064 return max(hot_add_drconf_memory_max(), memblock_end_of_DRAM()); 1065} 1066#endif /* CONFIG_MEMORY_HOTPLUG */ 1067 1068/* Virtual Processor Home Node (VPHN) support */ 1069#ifdef CONFIG_PPC_SPLPAR | 1/* 2 * pSeries NUMA support 3 * 4 * Copyright (C) 2002 Anton Blanchard <anton@au.ibm.com>, IBM 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * as published by the Free Software Foundation; either version --- 1053 unchanged lines hidden (view full) --- 1062u64 memory_hotplug_max(void) 1063{ 1064 return max(hot_add_drconf_memory_max(), memblock_end_of_DRAM()); 1065} 1066#endif /* CONFIG_MEMORY_HOTPLUG */ 1067 1068/* Virtual Processor Home Node (VPHN) support */ 1069#ifdef CONFIG_PPC_SPLPAR |
1070 1071#include "book3s64/vphn.h" 1072 | |
1073struct topology_update_data { 1074 struct topology_update_data *next; 1075 unsigned int cpu; 1076 int old_nid; 1077 int new_nid; 1078}; 1079 1080#define TOPOLOGY_DEF_TIMER_SECS 60 1081 1082static u8 vphn_cpu_change_counts[NR_CPUS][MAX_DISTANCE_REF_POINTS]; 1083static cpumask_t cpu_associativity_changes_mask; 1084static int vphn_enabled; 1085static int prrn_enabled; 1086static void reset_topology_timer(void); 1087static int topology_timer_secs = 1; 1088static int topology_inited; 1089 | 1070struct topology_update_data { 1071 struct topology_update_data *next; 1072 unsigned int cpu; 1073 int old_nid; 1074 int new_nid; 1075}; 1076 1077#define TOPOLOGY_DEF_TIMER_SECS 60 1078 1079static u8 vphn_cpu_change_counts[NR_CPUS][MAX_DISTANCE_REF_POINTS]; 1080static cpumask_t cpu_associativity_changes_mask; 1081static int vphn_enabled; 1082static int prrn_enabled; 1083static void reset_topology_timer(void); 1084static int topology_timer_secs = 1; 1085static int topology_inited; 1086 |
1090static long hcall_vphn(unsigned long cpu, u64 flags, __be32 *associativity) 1091{ 1092 long rc; 1093 long retbuf[PLPAR_HCALL9_BUFSIZE] = {0}; 1094 1095 rc = plpar_hcall9(H_HOME_NODE_ASSOCIATIVITY, retbuf, flags, cpu); 1096 vphn_unpack_associativity(retbuf, associativity); 1097 1098 return rc; 1099} 1100 | |
1101/* 1102 * Change polling interval for associativity changes. 1103 */ 1104int timed_topology_update(int nsecs) 1105{ 1106 if (vphn_enabled) { 1107 if (nsecs > 0) 1108 topology_timer_secs = nsecs; --- 526 unchanged lines hidden --- | 1087/* 1088 * Change polling interval for associativity changes. 1089 */ 1090int timed_topology_update(int nsecs) 1091{ 1092 if (vphn_enabled) { 1093 if (nsecs > 0) 1094 topology_timer_secs = nsecs; --- 526 unchanged lines hidden --- |