diff options
Diffstat (limited to 'arch/powerpc/platforms/cell')
-rw-r--r-- | arch/powerpc/platforms/cell/iommu.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c index 208005ca262c..031124a8e37b 100644 --- a/arch/powerpc/platforms/cell/iommu.c +++ b/arch/powerpc/platforms/cell/iommu.c | |||
@@ -1150,12 +1150,23 @@ static int iommu_fixed_disabled; | |||
1150 | 1150 | ||
1151 | static int __init setup_iommu_fixed(char *str) | 1151 | static int __init setup_iommu_fixed(char *str) |
1152 | { | 1152 | { |
1153 | struct device_node *pciep; | ||
1154 | |||
1153 | if (strcmp(str, "off") == 0) | 1155 | if (strcmp(str, "off") == 0) |
1154 | iommu_fixed_disabled = 1; | 1156 | iommu_fixed_disabled = 1; |
1155 | 1157 | ||
1156 | else if (strcmp(str, "weak") == 0) | 1158 | /* If we can find a pcie-endpoint in the device tree assume that |
1159 | * we're on a triblade or a CAB so by default the fixed mapping | ||
1160 | * should be set to be weakly ordered; but only if the boot | ||
1161 | * option WASN'T set for strong ordering | ||
1162 | */ | ||
1163 | pciep = of_find_node_by_type(NULL, "pcie-endpoint"); | ||
1164 | |||
1165 | if (strcmp(str, "weak") == 0 || (pciep && strcmp(str, "strong") != 0)) | ||
1157 | iommu_fixed_is_weak = 1; | 1166 | iommu_fixed_is_weak = 1; |
1158 | 1167 | ||
1168 | of_node_put(pciep); | ||
1169 | |||
1159 | return 1; | 1170 | return 1; |
1160 | } | 1171 | } |
1161 | __setup("iommu_fixed=", setup_iommu_fixed); | 1172 | __setup("iommu_fixed=", setup_iommu_fixed); |