Merge commit 'origin/master' into next

This commit is contained in:
Benjamin Herrenschmidt
2010-05-07 11:29:25 +10:00
commit 1ed31d6db9
984 muutettua tiedostoa jossa 15274 lisäystä ja 6793 poistoa

Näytä tiedosto

@@ -116,7 +116,7 @@ void loadcam_entry(int idx)
mtspr(SPRN_MAS2, TLBCAM[idx].MAS2);
mtspr(SPRN_MAS3, TLBCAM[idx].MAS3);
if (cur_cpu_spec->cpu_features & MMU_FTR_BIG_PHYS)
if (mmu_has_feature(MMU_FTR_BIG_PHYS))
mtspr(SPRN_MAS7, TLBCAM[idx].MAS7);
asm volatile("isync;tlbwe;isync" : : : "memory");
@@ -152,18 +152,13 @@ static void settlbcam(int index, unsigned long virt, phys_addr_t phys,
TLBCAM[index].MAS3 = (phys & MAS3_RPN) | MAS3_SX | MAS3_SR;
TLBCAM[index].MAS3 |= ((flags & _PAGE_RW) ? MAS3_SW : 0);
if (cur_cpu_spec->cpu_features & MMU_FTR_BIG_PHYS)
if (mmu_has_feature(MMU_FTR_BIG_PHYS))
TLBCAM[index].MAS7 = (u64)phys >> 32;
#ifndef CONFIG_KGDB /* want user access for breakpoints */
if (flags & _PAGE_USER) {
TLBCAM[index].MAS3 |= MAS3_UX | MAS3_UR;
TLBCAM[index].MAS3 |= ((flags & _PAGE_RW) ? MAS3_UW : 0);
}
#else
TLBCAM[index].MAS3 |= MAS3_UX | MAS3_UR;
TLBCAM[index].MAS3 |= ((flags & _PAGE_RW) ? MAS3_UW : 0);
#endif
tlbcam_addrs[index].start = virt;
tlbcam_addrs[index].limit = virt + size - 1;

Näytä tiedosto

@@ -267,10 +267,11 @@ EXPORT_SYMBOL_GPL(of_node_to_nid);
*/
static int __init find_min_common_depth(void)
{
int depth;
int depth, index;
const unsigned int *ref_points;
struct device_node *rtas_root;
unsigned int len;
struct device_node *options;
rtas_root = of_find_node_by_path("/rtas");
@@ -283,11 +284,23 @@ static int __init find_min_common_depth(void)
* configuration (should be all 0's) and the second is for a normal
* NUMA configuration.
*/
index = 1;
ref_points = of_get_property(rtas_root,
"ibm,associativity-reference-points", &len);
/*
* For type 1 affinity information we want the first field
*/
options = of_find_node_by_path("/options");
if (options) {
const char *str;
str = of_get_property(options, "ibm,associativity-form", NULL);
if (str && !strcmp(str, "1"))
index = 0;
}
if ((len >= 2 * sizeof(unsigned int)) && ref_points) {
depth = ref_points[1];
depth = ref_points[index];
} else {
dbg("NUMA: ibm,associativity-reference-points not found.\n");
depth = -1;