From 58318a94495e9cd79bb408fa8913b899e3d2fd69 Mon Sep 17 00:00:00 2001 From: Mark Nelson Date: Thu, 24 Jul 2008 14:28:48 +1000 Subject: [PATCH] --- yaml --- r: 106095 b: refs/heads/master c: 7886250e9d71b24d0205ac6798ee855fb3836318 h: refs/heads/master i: 106093: 90a14381438af2a670a02206fb8b5128612ac411 106091: 200605812da5ca154c1d94d2403e4c167b3f3814 106087: 6ac6b5b32f4045848b07000361adb503f209096f 106079: 20a76128d78b2a65d44fb724ff3101906d4e6179 v: v3 --- [refs] | 2 +- trunk/arch/powerpc/platforms/cell/iommu.c | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 08d19ac508db..28698e664612 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d6a61bfc06d6f2248f3e75f208d64e794082013c +refs/heads/master: 7886250e9d71b24d0205ac6798ee855fb3836318 diff --git a/trunk/arch/powerpc/platforms/cell/iommu.c b/trunk/arch/powerpc/platforms/cell/iommu.c index 208005ca262c..031124a8e37b 100644 --- a/trunk/arch/powerpc/platforms/cell/iommu.c +++ b/trunk/arch/powerpc/platforms/cell/iommu.c @@ -1150,12 +1150,23 @@ static int iommu_fixed_disabled; static int __init setup_iommu_fixed(char *str) { + struct device_node *pciep; + if (strcmp(str, "off") == 0) iommu_fixed_disabled = 1; - else if (strcmp(str, "weak") == 0) + /* If we can find a pcie-endpoint in the device tree assume that + * we're on a triblade or a CAB so by default the fixed mapping + * should be set to be weakly ordered; but only if the boot + * option WASN'T set for strong ordering + */ + pciep = of_find_node_by_type(NULL, "pcie-endpoint"); + + if (strcmp(str, "weak") == 0 || (pciep && strcmp(str, "strong") != 0)) iommu_fixed_is_weak = 1; + of_node_put(pciep); + return 1; } __setup("iommu_fixed=", setup_iommu_fixed);