aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/crypto/nx/nx-842.c20
-rw-r--r--drivers/crypto/nx/nx.c1
-rw-r--r--drivers/infiniband/hw/ehca/hcp_if.c20
-rw-r--r--drivers/macintosh/smu.c2
-rw-r--r--drivers/macintosh/windfarm_fcu_controls.c14
-rw-r--r--drivers/macintosh/windfarm_lm75_sensor.c14
-rw-r--r--drivers/macintosh/windfarm_max6690_sensor.c13
-rw-r--r--drivers/macintosh/windfarm_smu_sat.c13
-rw-r--r--drivers/net/ethernet/ibm/ehea/ehea_phyp.h20
-rw-r--r--drivers/of/base.c142
-rw-r--r--drivers/video/Kconfig8
-rw-r--r--drivers/video/gxt4500.c15
-rw-r--r--drivers/virt/fsl_hypervisor.c3
13 files changed, 158 insertions, 127 deletions
diff --git a/drivers/crypto/nx/nx-842.c b/drivers/crypto/nx/nx-842.c
index 0ce625738677..6c4c000671c5 100644
--- a/drivers/crypto/nx/nx-842.c
+++ b/drivers/crypto/nx/nx-842.c
@@ -28,7 +28,6 @@
28#include <linux/slab.h> 28#include <linux/slab.h>
29 29
30#include <asm/page.h> 30#include <asm/page.h>
31#include <asm/pSeries_reconfig.h>
32#include <asm/vio.h> 31#include <asm/vio.h>
33 32
34#include "nx_csbcpb.h" /* struct nx_csbcpb */ 33#include "nx_csbcpb.h" /* struct nx_csbcpb */
@@ -1014,26 +1013,23 @@ error_out:
1014 * NOTIFY_BAD encoded with error number on failure, use 1013 * NOTIFY_BAD encoded with error number on failure, use
1015 * notifier_to_errno() to decode this value 1014 * notifier_to_errno() to decode this value
1016 */ 1015 */
1017static int nx842_OF_notifier(struct notifier_block *np, 1016static int nx842_OF_notifier(struct notifier_block *np, unsigned long action,
1018 unsigned long action, 1017 void *update)
1019 void *update)
1020{ 1018{
1021 struct pSeries_reconfig_prop_update *upd; 1019 struct of_prop_reconfig *upd = update;
1022 struct nx842_devdata *local_devdata; 1020 struct nx842_devdata *local_devdata;
1023 struct device_node *node = NULL; 1021 struct device_node *node = NULL;
1024 1022
1025 upd = (struct pSeries_reconfig_prop_update *)update;
1026
1027 rcu_read_lock(); 1023 rcu_read_lock();
1028 local_devdata = rcu_dereference(devdata); 1024 local_devdata = rcu_dereference(devdata);
1029 if (local_devdata) 1025 if (local_devdata)
1030 node = local_devdata->dev->of_node; 1026 node = local_devdata->dev->of_node;
1031 1027
1032 if (local_devdata && 1028 if (local_devdata &&
1033 action == PSERIES_UPDATE_PROPERTY && 1029 action == OF_RECONFIG_UPDATE_PROPERTY &&
1034 !strcmp(upd->node->name, node->name)) { 1030 !strcmp(upd->dn->name, node->name)) {
1035 rcu_read_unlock(); 1031 rcu_read_unlock();
1036 nx842_OF_upd(upd->property); 1032 nx842_OF_upd(upd->prop);
1037 } else 1033 } else
1038 rcu_read_unlock(); 1034 rcu_read_unlock();
1039 1035
@@ -1182,7 +1178,7 @@ static int __init nx842_probe(struct vio_dev *viodev,
1182 synchronize_rcu(); 1178 synchronize_rcu();
1183 kfree(old_devdata); 1179 kfree(old_devdata);
1184 1180
1185 pSeries_reconfig_notifier_register(&nx842_of_nb); 1181 of_reconfig_notifier_register(&nx842_of_nb);
1186 1182
1187 ret = nx842_OF_upd(NULL); 1183 ret = nx842_OF_upd(NULL);
1188 if (ret && ret != -ENODEV) { 1184 if (ret && ret != -ENODEV) {
@@ -1228,7 +1224,7 @@ static int __exit nx842_remove(struct vio_dev *viodev)
1228 spin_lock_irqsave(&devdata_mutex, flags); 1224 spin_lock_irqsave(&devdata_mutex, flags);
1229 old_devdata = rcu_dereference_check(devdata, 1225 old_devdata = rcu_dereference_check(devdata,
1230 lockdep_is_held(&devdata_mutex)); 1226 lockdep_is_held(&devdata_mutex));
1231 pSeries_reconfig_notifier_unregister(&nx842_of_nb); 1227 of_reconfig_notifier_unregister(&nx842_of_nb);
1232 rcu_assign_pointer(devdata, NULL); 1228 rcu_assign_pointer(devdata, NULL);
1233 spin_unlock_irqrestore(&devdata_mutex, flags); 1229 spin_unlock_irqrestore(&devdata_mutex, flags);
1234 synchronize_rcu(); 1230 synchronize_rcu();
diff --git a/drivers/crypto/nx/nx.c b/drivers/crypto/nx/nx.c
index 638110efae9b..f7a8a16aa7d3 100644
--- a/drivers/crypto/nx/nx.c
+++ b/drivers/crypto/nx/nx.c
@@ -33,7 +33,6 @@
33#include <linux/scatterlist.h> 33#include <linux/scatterlist.h>
34#include <linux/device.h> 34#include <linux/device.h>
35#include <linux/of.h> 35#include <linux/of.h>
36#include <asm/pSeries_reconfig.h>
37#include <asm/hvcall.h> 36#include <asm/hvcall.h>
38#include <asm/vio.h> 37#include <asm/vio.h>
39 38
diff --git a/drivers/infiniband/hw/ehca/hcp_if.c b/drivers/infiniband/hw/ehca/hcp_if.c
index 2d41d04fd959..89517ffb4389 100644
--- a/drivers/infiniband/hw/ehca/hcp_if.c
+++ b/drivers/infiniband/hw/ehca/hcp_if.c
@@ -90,26 +90,6 @@
90 90
91static DEFINE_SPINLOCK(hcall_lock); 91static DEFINE_SPINLOCK(hcall_lock);
92 92
93static u32 get_longbusy_msecs(int longbusy_rc)
94{
95 switch (longbusy_rc) {
96 case H_LONG_BUSY_ORDER_1_MSEC:
97 return 1;
98 case H_LONG_BUSY_ORDER_10_MSEC:
99 return 10;
100 case H_LONG_BUSY_ORDER_100_MSEC:
101 return 100;
102 case H_LONG_BUSY_ORDER_1_SEC:
103 return 1000;
104 case H_LONG_BUSY_ORDER_10_SEC:
105 return 10000;
106 case H_LONG_BUSY_ORDER_100_SEC:
107 return 100000;
108 default:
109 return 1;
110 }
111}
112
113static long ehca_plpar_hcall_norets(unsigned long opcode, 93static long ehca_plpar_hcall_norets(unsigned long opcode,
114 unsigned long arg1, 94 unsigned long arg1,
115 unsigned long arg2, 95 unsigned long arg2,
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c
index 196368009001..9c6b96414862 100644
--- a/drivers/macintosh/smu.c
+++ b/drivers/macintosh/smu.c
@@ -997,7 +997,7 @@ static struct smu_sdbp_header *smu_create_sdb_partition(int id)
997 "%02x !\n", id, hdr->id); 997 "%02x !\n", id, hdr->id);
998 goto failure; 998 goto failure;
999 } 999 }
1000 if (prom_add_property(smu->of_node, prop)) { 1000 if (of_add_property(smu->of_node, prop)) {
1001 printk(KERN_DEBUG "SMU: Failed creating sdb-partition-%02x " 1001 printk(KERN_DEBUG "SMU: Failed creating sdb-partition-%02x "
1002 "property !\n", id); 1002 "property !\n", id);
1003 goto failure; 1003 goto failure;
diff --git a/drivers/macintosh/windfarm_fcu_controls.c b/drivers/macintosh/windfarm_fcu_controls.c
index b3411edb324b..fd6ed15a979d 100644
--- a/drivers/macintosh/windfarm_fcu_controls.c
+++ b/drivers/macintosh/windfarm_fcu_controls.c
@@ -593,19 +593,7 @@ static struct i2c_driver wf_fcu_driver = {
593 .id_table = wf_fcu_id, 593 .id_table = wf_fcu_id,
594}; 594};
595 595
596static int __init wf_fcu_init(void) 596module_i2c_driver(wf_fcu_driver);
597{
598 return i2c_add_driver(&wf_fcu_driver);
599}
600
601static void __exit wf_fcu_exit(void)
602{
603 i2c_del_driver(&wf_fcu_driver);
604}
605
606
607module_init(wf_fcu_init);
608module_exit(wf_fcu_exit);
609 597
610MODULE_AUTHOR("Benjamin Herrenschmidt <benh@kernel.crashing.org>"); 598MODULE_AUTHOR("Benjamin Herrenschmidt <benh@kernel.crashing.org>");
611MODULE_DESCRIPTION("FCU control objects for PowerMacs thermal control"); 599MODULE_DESCRIPTION("FCU control objects for PowerMacs thermal control");
diff --git a/drivers/macintosh/windfarm_lm75_sensor.c b/drivers/macintosh/windfarm_lm75_sensor.c
index b0c2d3695b34..9ef32b3df91f 100644
--- a/drivers/macintosh/windfarm_lm75_sensor.c
+++ b/drivers/macintosh/windfarm_lm75_sensor.c
@@ -174,19 +174,7 @@ static struct i2c_driver wf_lm75_driver = {
174 .id_table = wf_lm75_id, 174 .id_table = wf_lm75_id,
175}; 175};
176 176
177static int __init wf_lm75_sensor_init(void) 177module_i2c_driver(wf_lm75_driver);
178{
179 return i2c_add_driver(&wf_lm75_driver);
180}
181
182static void __exit wf_lm75_sensor_exit(void)
183{
184 i2c_del_driver(&wf_lm75_driver);
185}
186
187
188module_init(wf_lm75_sensor_init);
189module_exit(wf_lm75_sensor_exit);
190 178
191MODULE_AUTHOR("Benjamin Herrenschmidt <benh@kernel.crashing.org>"); 179MODULE_AUTHOR("Benjamin Herrenschmidt <benh@kernel.crashing.org>");
192MODULE_DESCRIPTION("LM75 sensor objects for PowerMacs thermal control"); 180MODULE_DESCRIPTION("LM75 sensor objects for PowerMacs thermal control");
diff --git a/drivers/macintosh/windfarm_max6690_sensor.c b/drivers/macintosh/windfarm_max6690_sensor.c
index 371b058d2f7d..945a25b2f31e 100644
--- a/drivers/macintosh/windfarm_max6690_sensor.c
+++ b/drivers/macintosh/windfarm_max6690_sensor.c
@@ -130,18 +130,7 @@ static struct i2c_driver wf_max6690_driver = {
130 .id_table = wf_max6690_id, 130 .id_table = wf_max6690_id,
131}; 131};
132 132
133static int __init wf_max6690_sensor_init(void) 133module_i2c_driver(wf_max6690_driver);
134{
135 return i2c_add_driver(&wf_max6690_driver);
136}
137
138static void __exit wf_max6690_sensor_exit(void)
139{
140 i2c_del_driver(&wf_max6690_driver);
141}
142
143module_init(wf_max6690_sensor_init);
144module_exit(wf_max6690_sensor_exit);
145 134
146MODULE_AUTHOR("Paul Mackerras <paulus@samba.org>"); 135MODULE_AUTHOR("Paul Mackerras <paulus@samba.org>");
147MODULE_DESCRIPTION("MAX6690 sensor objects for PowerMac thermal control"); 136MODULE_DESCRIPTION("MAX6690 sensor objects for PowerMac thermal control");
diff --git a/drivers/macintosh/windfarm_smu_sat.c b/drivers/macintosh/windfarm_smu_sat.c
index 426e810233d7..d87f5ee04ca9 100644
--- a/drivers/macintosh/windfarm_smu_sat.c
+++ b/drivers/macintosh/windfarm_smu_sat.c
@@ -364,18 +364,7 @@ static struct i2c_driver wf_sat_driver = {
364 .id_table = wf_sat_id, 364 .id_table = wf_sat_id,
365}; 365};
366 366
367static int __init sat_sensors_init(void) 367module_i2c_driver(wf_sat_driver);
368{
369 return i2c_add_driver(&wf_sat_driver);
370}
371
372static void __exit sat_sensors_exit(void)
373{
374 i2c_del_driver(&wf_sat_driver);
375}
376
377module_init(sat_sensors_init);
378module_exit(sat_sensors_exit);
379 368
380MODULE_AUTHOR("Paul Mackerras <paulus@samba.org>"); 369MODULE_AUTHOR("Paul Mackerras <paulus@samba.org>");
381MODULE_DESCRIPTION("SMU satellite sensors for PowerMac thermal control"); 370MODULE_DESCRIPTION("SMU satellite sensors for PowerMac thermal control");
diff --git a/drivers/net/ethernet/ibm/ehea/ehea_phyp.h b/drivers/net/ethernet/ibm/ehea/ehea_phyp.h
index 8364815c32ff..99b6c2a38dbf 100644
--- a/drivers/net/ethernet/ibm/ehea/ehea_phyp.h
+++ b/drivers/net/ethernet/ibm/ehea/ehea_phyp.h
@@ -39,26 +39,6 @@
39 * hcp_* - structures, variables and functions releated to Hypervisor Calls 39 * hcp_* - structures, variables and functions releated to Hypervisor Calls
40 */ 40 */
41 41
42static inline u32 get_longbusy_msecs(int long_busy_ret_code)
43{
44 switch (long_busy_ret_code) {
45 case H_LONG_BUSY_ORDER_1_MSEC:
46 return 1;
47 case H_LONG_BUSY_ORDER_10_MSEC:
48 return 10;
49 case H_LONG_BUSY_ORDER_100_MSEC:
50 return 100;
51 case H_LONG_BUSY_ORDER_1_SEC:
52 return 1000;
53 case H_LONG_BUSY_ORDER_10_SEC:
54 return 10000;
55 case H_LONG_BUSY_ORDER_100_SEC:
56 return 100000;
57 default:
58 return 1;
59 }
60}
61
62/* Number of pages which can be registered at once by H_REGISTER_HEA_RPAGES */ 42/* Number of pages which can be registered at once by H_REGISTER_HEA_RPAGES */
63#define EHEA_MAX_RPAGE 512 43#define EHEA_MAX_RPAGE 512
64 44
diff --git a/drivers/of/base.c b/drivers/of/base.c
index be846408dbc1..db8d211a0d05 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1114,13 +1114,36 @@ int of_parse_phandle_with_args(const struct device_node *np, const char *list_na
1114} 1114}
1115EXPORT_SYMBOL(of_parse_phandle_with_args); 1115EXPORT_SYMBOL(of_parse_phandle_with_args);
1116 1116
1117#if defined(CONFIG_OF_DYNAMIC)
1118static int of_property_notify(int action, struct device_node *np,
1119 struct property *prop)
1120{
1121 struct of_prop_reconfig pr;
1122
1123 pr.dn = np;
1124 pr.prop = prop;
1125 return of_reconfig_notify(action, &pr);
1126}
1127#else
1128static int of_property_notify(int action, struct device_node *np,
1129 struct property *prop)
1130{
1131 return 0;
1132}
1133#endif
1134
1117/** 1135/**
1118 * prom_add_property - Add a property to a node 1136 * of_add_property - Add a property to a node
1119 */ 1137 */
1120int prom_add_property(struct device_node *np, struct property *prop) 1138int of_add_property(struct device_node *np, struct property *prop)
1121{ 1139{
1122 struct property **next; 1140 struct property **next;
1123 unsigned long flags; 1141 unsigned long flags;
1142 int rc;
1143
1144 rc = of_property_notify(OF_RECONFIG_ADD_PROPERTY, np, prop);
1145 if (rc)
1146 return rc;
1124 1147
1125 prop->next = NULL; 1148 prop->next = NULL;
1126 write_lock_irqsave(&devtree_lock, flags); 1149 write_lock_irqsave(&devtree_lock, flags);
@@ -1146,18 +1169,23 @@ int prom_add_property(struct device_node *np, struct property *prop)
1146} 1169}
1147 1170
1148/** 1171/**
1149 * prom_remove_property - Remove a property from a node. 1172 * of_remove_property - Remove a property from a node.
1150 * 1173 *
1151 * Note that we don't actually remove it, since we have given out 1174 * Note that we don't actually remove it, since we have given out
1152 * who-knows-how-many pointers to the data using get-property. 1175 * who-knows-how-many pointers to the data using get-property.
1153 * Instead we just move the property to the "dead properties" 1176 * Instead we just move the property to the "dead properties"
1154 * list, so it won't be found any more. 1177 * list, so it won't be found any more.
1155 */ 1178 */
1156int prom_remove_property(struct device_node *np, struct property *prop) 1179int of_remove_property(struct device_node *np, struct property *prop)
1157{ 1180{
1158 struct property **next; 1181 struct property **next;
1159 unsigned long flags; 1182 unsigned long flags;
1160 int found = 0; 1183 int found = 0;
1184 int rc;
1185
1186 rc = of_property_notify(OF_RECONFIG_REMOVE_PROPERTY, np, prop);
1187 if (rc)
1188 return rc;
1161 1189
1162 write_lock_irqsave(&devtree_lock, flags); 1190 write_lock_irqsave(&devtree_lock, flags);
1163 next = &np->properties; 1191 next = &np->properties;
@@ -1187,7 +1215,7 @@ int prom_remove_property(struct device_node *np, struct property *prop)
1187} 1215}
1188 1216
1189/* 1217/*
1190 * prom_update_property - Update a property in a node, if the property does 1218 * of_update_property - Update a property in a node, if the property does
1191 * not exist, add it. 1219 * not exist, add it.
1192 * 1220 *
1193 * Note that we don't actually remove it, since we have given out 1221 * Note that we don't actually remove it, since we have given out
@@ -1195,19 +1223,22 @@ int prom_remove_property(struct device_node *np, struct property *prop)
1195 * Instead we just move the property to the "dead properties" list, 1223 * Instead we just move the property to the "dead properties" list,
1196 * and add the new property to the property list 1224 * and add the new property to the property list
1197 */ 1225 */
1198int prom_update_property(struct device_node *np, 1226int of_update_property(struct device_node *np, struct property *newprop)
1199 struct property *newprop)
1200{ 1227{
1201 struct property **next, *oldprop; 1228 struct property **next, *oldprop;
1202 unsigned long flags; 1229 unsigned long flags;
1203 int found = 0; 1230 int rc, found = 0;
1231
1232 rc = of_property_notify(OF_RECONFIG_UPDATE_PROPERTY, np, newprop);
1233 if (rc)
1234 return rc;
1204 1235
1205 if (!newprop->name) 1236 if (!newprop->name)
1206 return -EINVAL; 1237 return -EINVAL;
1207 1238
1208 oldprop = of_find_property(np, newprop->name, NULL); 1239 oldprop = of_find_property(np, newprop->name, NULL);
1209 if (!oldprop) 1240 if (!oldprop)
1210 return prom_add_property(np, newprop); 1241 return of_add_property(np, newprop);
1211 1242
1212 write_lock_irqsave(&devtree_lock, flags); 1243 write_lock_irqsave(&devtree_lock, flags);
1213 next = &np->properties; 1244 next = &np->properties;
@@ -1246,12 +1277,55 @@ int prom_update_property(struct device_node *np,
1246 * device tree nodes. 1277 * device tree nodes.
1247 */ 1278 */
1248 1279
1280static BLOCKING_NOTIFIER_HEAD(of_reconfig_chain);
1281
1282int of_reconfig_notifier_register(struct notifier_block *nb)
1283{
1284 return blocking_notifier_chain_register(&of_reconfig_chain, nb);
1285}
1286EXPORT_SYMBOL_GPL(of_reconfig_notifier_register);
1287
1288int of_reconfig_notifier_unregister(struct notifier_block *nb)
1289{
1290 return blocking_notifier_chain_unregister(&of_reconfig_chain, nb);
1291}
1292EXPORT_SYMBOL_GPL(of_reconfig_notifier_unregister);
1293
1294int of_reconfig_notify(unsigned long action, void *p)
1295{
1296 int rc;
1297
1298 rc = blocking_notifier_call_chain(&of_reconfig_chain, action, p);
1299 return notifier_to_errno(rc);
1300}
1301
1302#ifdef CONFIG_PROC_DEVICETREE
1303static void of_add_proc_dt_entry(struct device_node *dn)
1304{
1305 struct proc_dir_entry *ent;
1306
1307 ent = proc_mkdir(strrchr(dn->full_name, '/') + 1, dn->parent->pde);
1308 if (ent)
1309 proc_device_tree_add_node(dn, ent);
1310}
1311#else
1312static void of_add_proc_dt_entry(struct device_node *dn)
1313{
1314 return;
1315}
1316#endif
1317
1249/** 1318/**
1250 * of_attach_node - Plug a device node into the tree and global list. 1319 * of_attach_node - Plug a device node into the tree and global list.
1251 */ 1320 */
1252void of_attach_node(struct device_node *np) 1321int of_attach_node(struct device_node *np)
1253{ 1322{
1254 unsigned long flags; 1323 unsigned long flags;
1324 int rc;
1325
1326 rc = of_reconfig_notify(OF_RECONFIG_ATTACH_NODE, np);
1327 if (rc)
1328 return rc;
1255 1329
1256 write_lock_irqsave(&devtree_lock, flags); 1330 write_lock_irqsave(&devtree_lock, flags);
1257 np->sibling = np->parent->child; 1331 np->sibling = np->parent->child;
@@ -1259,24 +1333,61 @@ void of_attach_node(struct device_node *np)
1259 np->parent->child = np; 1333 np->parent->child = np;
1260 of_allnodes = np; 1334 of_allnodes = np;
1261 write_unlock_irqrestore(&devtree_lock, flags); 1335 write_unlock_irqrestore(&devtree_lock, flags);
1336
1337 of_add_proc_dt_entry(np);
1338 return 0;
1262} 1339}
1263 1340
1341#ifdef CONFIG_PROC_DEVICETREE
1342static void of_remove_proc_dt_entry(struct device_node *dn)
1343{
1344 struct device_node *parent = dn->parent;
1345 struct property *prop = dn->properties;
1346
1347 while (prop) {
1348 remove_proc_entry(prop->name, dn->pde);
1349 prop = prop->next;
1350 }
1351
1352 if (dn->pde)
1353 remove_proc_entry(dn->pde->name, parent->pde);
1354}
1355#else
1356static void of_remove_proc_dt_entry(struct device_node *dn)
1357{
1358 return;
1359}
1360#endif
1361
1264/** 1362/**
1265 * of_detach_node - "Unplug" a node from the device tree. 1363 * of_detach_node - "Unplug" a node from the device tree.
1266 * 1364 *
1267 * The caller must hold a reference to the node. The memory associated with 1365 * The caller must hold a reference to the node. The memory associated with
1268 * the node is not freed until its refcount goes to zero. 1366 * the node is not freed until its refcount goes to zero.
1269 */ 1367 */
1270void of_detach_node(struct device_node *np) 1368int of_detach_node(struct device_node *np)
1271{ 1369{
1272 struct device_node *parent; 1370 struct device_node *parent;
1273 unsigned long flags; 1371 unsigned long flags;
1372 int rc = 0;
1373
1374 rc = of_reconfig_notify(OF_RECONFIG_DETACH_NODE, np);
1375 if (rc)
1376 return rc;
1274 1377
1275 write_lock_irqsave(&devtree_lock, flags); 1378 write_lock_irqsave(&devtree_lock, flags);
1276 1379
1380 if (of_node_check_flag(np, OF_DETACHED)) {
1381 /* someone already detached it */
1382 write_unlock_irqrestore(&devtree_lock, flags);
1383 return rc;
1384 }
1385
1277 parent = np->parent; 1386 parent = np->parent;
1278 if (!parent) 1387 if (!parent) {
1279 goto out_unlock; 1388 write_unlock_irqrestore(&devtree_lock, flags);
1389 return rc;
1390 }
1280 1391
1281 if (of_allnodes == np) 1392 if (of_allnodes == np)
1282 of_allnodes = np->allnext; 1393 of_allnodes = np->allnext;
@@ -1301,9 +1412,10 @@ void of_detach_node(struct device_node *np)
1301 } 1412 }
1302 1413
1303 of_node_set_flag(np, OF_DETACHED); 1414 of_node_set_flag(np, OF_DETACHED);
1304
1305out_unlock:
1306 write_unlock_irqrestore(&devtree_lock, flags); 1415 write_unlock_irqrestore(&devtree_lock, flags);
1416
1417 of_remove_proc_dt_entry(np);
1418 return rc;
1307} 1419}
1308#endif /* defined(CONFIG_OF_DYNAMIC) */ 1420#endif /* defined(CONFIG_OF_DYNAMIC) */
1309 1421
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 9c31277b3a81..e7068c508800 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -2140,14 +2140,16 @@ config FB_UDL
2140 To compile as a module, choose M here: the module name is udlfb. 2140 To compile as a module, choose M here: the module name is udlfb.
2141 2141
2142config FB_IBM_GXT4500 2142config FB_IBM_GXT4500
2143 tristate "Framebuffer support for IBM GXT4500P adaptor" 2143 tristate "Framebuffer support for IBM GXT4000P/4500P/6000P/6500P adaptors"
2144 depends on FB && PPC 2144 depends on FB && PPC
2145 select FB_CFB_FILLRECT 2145 select FB_CFB_FILLRECT
2146 select FB_CFB_COPYAREA 2146 select FB_CFB_COPYAREA
2147 select FB_CFB_IMAGEBLIT 2147 select FB_CFB_IMAGEBLIT
2148 ---help--- 2148 ---help---
2149 Say Y here to enable support for the IBM GXT4500P display 2149 Say Y here to enable support for the IBM GXT4000P/6000P and
2150 adaptor, found on some IBM System P (pSeries) machines. 2150 GXT4500P/6500P display adaptor based on Raster Engine RC1000,
2151 found on some IBM System P (pSeries) machines. This driver
2152 doesn't use Geometry Engine GT1000.
2151 2153
2152config FB_PS3 2154config FB_PS3
2153 tristate "PS3 GPU framebuffer driver" 2155 tristate "PS3 GPU framebuffer driver"
diff --git a/drivers/video/gxt4500.c b/drivers/video/gxt4500.c
index 0e9afa41d163..4bdea6e9bd55 100644
--- a/drivers/video/gxt4500.c
+++ b/drivers/video/gxt4500.c
@@ -1,5 +1,6 @@
1/* 1/*
2 * Frame buffer device for IBM GXT4500P and GXT6000P display adaptors 2 * Frame buffer device for IBM GXT4500P/6500P and GXT4000P/6000P
3 * display adaptors
3 * 4 *
4 * Copyright (C) 2006 Paul Mackerras, IBM Corp. <paulus@samba.org> 5 * Copyright (C) 2006 Paul Mackerras, IBM Corp. <paulus@samba.org>
5 */ 6 */
@@ -14,6 +15,8 @@
14#include <linux/string.h> 15#include <linux/string.h>
15 16
16#define PCI_DEVICE_ID_IBM_GXT4500P 0x21c 17#define PCI_DEVICE_ID_IBM_GXT4500P 0x21c
18#define PCI_DEVICE_ID_IBM_GXT6500P 0x21b
19#define PCI_DEVICE_ID_IBM_GXT4000P 0x16e
17#define PCI_DEVICE_ID_IBM_GXT6000P 0x170 20#define PCI_DEVICE_ID_IBM_GXT6000P 0x170
18 21
19/* GXT4500P registers */ 22/* GXT4500P registers */
@@ -173,6 +176,8 @@ static const struct fb_videomode defaultmode __devinitconst = {
173/* List of supported cards */ 176/* List of supported cards */
174enum gxt_cards { 177enum gxt_cards {
175 GXT4500P, 178 GXT4500P,
179 GXT6500P,
180 GXT4000P,
176 GXT6000P 181 GXT6000P
177}; 182};
178 183
@@ -182,6 +187,8 @@ static const struct cardinfo {
182 const char *cardname; 187 const char *cardname;
183} cardinfo[] = { 188} cardinfo[] = {
184 [GXT4500P] = { .refclk_ps = 9259, .cardname = "IBM GXT4500P" }, 189 [GXT4500P] = { .refclk_ps = 9259, .cardname = "IBM GXT4500P" },
190 [GXT6500P] = { .refclk_ps = 9259, .cardname = "IBM GXT6500P" },
191 [GXT4000P] = { .refclk_ps = 40000, .cardname = "IBM GXT4000P" },
185 [GXT6000P] = { .refclk_ps = 40000, .cardname = "IBM GXT6000P" }, 192 [GXT6000P] = { .refclk_ps = 40000, .cardname = "IBM GXT6000P" },
186}; 193};
187 194
@@ -736,6 +743,10 @@ static void __devexit gxt4500_remove(struct pci_dev *pdev)
736static const struct pci_device_id gxt4500_pci_tbl[] = { 743static const struct pci_device_id gxt4500_pci_tbl[] = {
737 { PCI_DEVICE(PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_GXT4500P), 744 { PCI_DEVICE(PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_GXT4500P),
738 .driver_data = GXT4500P }, 745 .driver_data = GXT4500P },
746 { PCI_DEVICE(PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_GXT6500P),
747 .driver_data = GXT6500P },
748 { PCI_DEVICE(PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_GXT4000P),
749 .driver_data = GXT4000P },
739 { PCI_DEVICE(PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_GXT6000P), 750 { PCI_DEVICE(PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_GXT6000P),
740 .driver_data = GXT6000P }, 751 .driver_data = GXT6000P },
741 { 0 } 752 { 0 }
@@ -768,7 +779,7 @@ static void __exit gxt4500_exit(void)
768module_exit(gxt4500_exit); 779module_exit(gxt4500_exit);
769 780
770MODULE_AUTHOR("Paul Mackerras <paulus@samba.org>"); 781MODULE_AUTHOR("Paul Mackerras <paulus@samba.org>");
771MODULE_DESCRIPTION("FBDev driver for IBM GXT4500P/6000P"); 782MODULE_DESCRIPTION("FBDev driver for IBM GXT4500P/6500P and GXT4000P/6000P");
772MODULE_LICENSE("GPL"); 783MODULE_LICENSE("GPL");
773module_param(mode_option, charp, 0); 784module_param(mode_option, charp, 0);
774MODULE_PARM_DESC(mode_option, "Specify resolution as \"<xres>x<yres>[-<bpp>][@<refresh>]\""); 785MODULE_PARM_DESC(mode_option, "Specify resolution as \"<xres>x<yres>[-<bpp>][@<refresh>]\"");
diff --git a/drivers/virt/fsl_hypervisor.c b/drivers/virt/fsl_hypervisor.c
index 4939e0ccc4e5..d294f67d6f84 100644
--- a/drivers/virt/fsl_hypervisor.c
+++ b/drivers/virt/fsl_hypervisor.c
@@ -796,9 +796,6 @@ static int has_fsl_hypervisor(void)
796 struct device_node *node; 796 struct device_node *node;
797 int ret; 797 int ret;
798 798
799 if (!(mfmsr() & MSR_GS))
800 return 0;
801
802 node = of_find_node_by_path("/hypervisor"); 799 node = of_find_node_by_path("/hypervisor");
803 if (!node) 800 if (!node)
804 return 0; 801 return 0;