aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/Kconfig8
-rw-r--r--drivers/char/mspec.c8
2 files changed, 7 insertions, 9 deletions
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
index 39a9f8cc6412..2af12fc45115 100644
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -409,14 +409,6 @@ config SGI_MBCS
409 If you have an SGI Altix with an attached SABrick 409 If you have an SGI Altix with an attached SABrick
410 say Y or M here, otherwise say N. 410 say Y or M here, otherwise say N.
411 411
412config MSPEC
413 tristate "Memory special operations driver"
414 depends on IA64
415 help
416 If you have an ia64 and you want to enable memory special
417 operations support (formerly known as fetchop), say Y here,
418 otherwise say N.
419
420source "drivers/serial/Kconfig" 412source "drivers/serial/Kconfig"
421 413
422config UNIX98_PTYS 414config UNIX98_PTYS
diff --git a/drivers/char/mspec.c b/drivers/char/mspec.c
index 5c0dec39cf6c..235e89226112 100644
--- a/drivers/char/mspec.c
+++ b/drivers/char/mspec.c
@@ -72,7 +72,11 @@ enum {
72 MSPEC_UNCACHED 72 MSPEC_UNCACHED
73}; 73};
74 74
75#ifdef CONFIG_SGI_SN
75static int is_sn2; 76static int is_sn2;
77#else
78#define is_sn2 0
79#endif
76 80
77/* 81/*
78 * One of these structures is allocated when an mspec region is mmaped. The 82 * One of these structures is allocated when an mspec region is mmaped. The
@@ -211,7 +215,7 @@ mspec_nopfn(struct vm_area_struct *vma, unsigned long address)
211 if (vdata->type == MSPEC_FETCHOP) 215 if (vdata->type == MSPEC_FETCHOP)
212 paddr = TO_AMO(maddr); 216 paddr = TO_AMO(maddr);
213 else 217 else
214 paddr = __pa(TO_CAC(maddr)); 218 paddr = maddr & ~__IA64_UNCACHED_OFFSET;
215 219
216 pfn = paddr >> PAGE_SHIFT; 220 pfn = paddr >> PAGE_SHIFT;
217 221
@@ -335,6 +339,7 @@ mspec_init(void)
335 * The fetchop device only works on SN2 hardware, uncached and cached 339 * The fetchop device only works on SN2 hardware, uncached and cached
336 * memory drivers should both be valid on all ia64 hardware 340 * memory drivers should both be valid on all ia64 hardware
337 */ 341 */
342#ifdef CONFIG_SGI_SN
338 if (ia64_platform_is("sn2")) { 343 if (ia64_platform_is("sn2")) {
339 is_sn2 = 1; 344 is_sn2 = 1;
340 if (is_shub2()) { 345 if (is_shub2()) {
@@ -363,6 +368,7 @@ mspec_init(void)
363 goto free_scratch_pages; 368 goto free_scratch_pages;
364 } 369 }
365 } 370 }
371#endif
366 ret = misc_register(&cached_miscdev); 372 ret = misc_register(&cached_miscdev);
367 if (ret) { 373 if (ret) {
368 printk(KERN_ERR "%s: failed to register device %i\n", 374 printk(KERN_ERR "%s: failed to register device %i\n",