aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/sn
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64/sn')
-rw-r--r--arch/ia64/sn/kernel/tiocx.c25
-rw-r--r--arch/ia64/sn/kernel/xpc_partition.c6
2 files changed, 15 insertions, 16 deletions
diff --git a/arch/ia64/sn/kernel/tiocx.c b/arch/ia64/sn/kernel/tiocx.c
index ab9b5f35c2a7..a087b274847e 100644
--- a/arch/ia64/sn/kernel/tiocx.c
+++ b/arch/ia64/sn/kernel/tiocx.c
@@ -432,7 +432,7 @@ static int tiocx_reload(struct cx_dev *cx_dev)
432 return cx_device_reload(cx_dev); 432 return cx_device_reload(cx_dev);
433} 433}
434 434
435static ssize_t show_cxdev_control(struct device *dev, char *buf) 435static ssize_t show_cxdev_control(struct device *dev, struct device_attribute *attr, char *buf)
436{ 436{
437 struct cx_dev *cx_dev = to_cx_dev(dev); 437 struct cx_dev *cx_dev = to_cx_dev(dev);
438 438
@@ -442,7 +442,7 @@ static ssize_t show_cxdev_control(struct device *dev, char *buf)
442 tiocx_btchar_get(cx_dev->cx_id.nasid)); 442 tiocx_btchar_get(cx_dev->cx_id.nasid));
443} 443}
444 444
445static ssize_t store_cxdev_control(struct device *dev, const char *buf, 445static ssize_t store_cxdev_control(struct device *dev, struct device_attribute *attr, const char *buf,
446 size_t count) 446 size_t count)
447{ 447{
448 int n; 448 int n;
@@ -518,25 +518,22 @@ static int __init tiocx_init(void)
518 return 0; 518 return 0;
519} 519}
520 520
521static void __exit tiocx_exit(void) 521static int cx_remove_device(struct device * dev, void * data)
522{ 522{
523 struct device *dev; 523 struct cx_dev *cx_dev = to_cx_dev(dev);
524 struct device *tdev; 524 device_remove_file(dev, &dev_attr_cxdev_control);
525 cx_device_unregister(cx_dev);
526 return 0;
527}
525 528
529static void __exit tiocx_exit(void)
530{
526 DBG("tiocx_exit\n"); 531 DBG("tiocx_exit\n");
527 532
528 /* 533 /*
529 * Unregister devices. 534 * Unregister devices.
530 */ 535 */
531 list_for_each_entry_safe(dev, tdev, &tiocx_bus_type.devices.list, 536 bus_for_each_dev(&tiocx_bus_type, NULL, NULL, cx_remove_device);
532 bus_list) {
533 if (dev) {
534 struct cx_dev *cx_dev = to_cx_dev(dev);
535 device_remove_file(dev, &dev_attr_cxdev_control);
536 cx_device_unregister(cx_dev);
537 }
538 }
539
540 bus_unregister(&tiocx_bus_type); 537 bus_unregister(&tiocx_bus_type);
541} 538}
542 539
diff --git a/arch/ia64/sn/kernel/xpc_partition.c b/arch/ia64/sn/kernel/xpc_partition.c
index 2c3c4a8af553..cd7ed73f0e7a 100644
--- a/arch/ia64/sn/kernel/xpc_partition.c
+++ b/arch/ia64/sn/kernel/xpc_partition.c
@@ -22,6 +22,7 @@
22#include <linux/cache.h> 22#include <linux/cache.h>
23#include <linux/mmzone.h> 23#include <linux/mmzone.h>
24#include <linux/nodemask.h> 24#include <linux/nodemask.h>
25#include <asm/uncached.h>
25#include <asm/sn/bte.h> 26#include <asm/sn/bte.h>
26#include <asm/sn/intr.h> 27#include <asm/sn/intr.h>
27#include <asm/sn/sn_sal.h> 28#include <asm/sn/sn_sal.h>
@@ -183,7 +184,7 @@ xpc_rsvd_page_init(void)
183 * memory protections are never restricted. 184 * memory protections are never restricted.
184 */ 185 */
185 if ((amos_page = xpc_vars->amos_page) == NULL) { 186 if ((amos_page = xpc_vars->amos_page) == NULL) {
186 amos_page = (AMO_t *) mspec_kalloc_page(0); 187 amos_page = (AMO_t *) TO_AMO(uncached_alloc_page(0));
187 if (amos_page == NULL) { 188 if (amos_page == NULL) {
188 dev_err(xpc_part, "can't allocate page of AMOs\n"); 189 dev_err(xpc_part, "can't allocate page of AMOs\n");
189 return NULL; 190 return NULL;
@@ -200,7 +201,8 @@ xpc_rsvd_page_init(void)
200 if (ret != 0) { 201 if (ret != 0) {
201 dev_err(xpc_part, "can't change memory " 202 dev_err(xpc_part, "can't change memory "
202 "protections\n"); 203 "protections\n");
203 mspec_kfree_page((unsigned long) amos_page); 204 uncached_free_page(__IA64_UNCACHED_OFFSET |
205 TO_PHYS((u64) amos_page));
204 return NULL; 206 return NULL;
205 } 207 }
206 } 208 }