Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 40841
b: refs/heads/master
c: 1a4b0fc
h: refs/heads/master
i:
  40839: b5498dd
v: v3
  • Loading branch information
Jes Sorensen authored and Linus Torvalds committed Nov 13, 2006
1 parent ad8b6a4 commit c662049
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d67afe5ed00070de0965bfc98de5f6ed3a80a73e
refs/heads/master: 1a4b0fc503ff4149f5915be4aeb179b9453cf485
9 changes: 9 additions & 0 deletions trunk/arch/ia64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,15 @@ source "net/Kconfig"

source "drivers/Kconfig"

config MSPEC
tristate "Memory special operations driver"
depends on IA64
select IA64_UNCACHED_ALLOCATOR
help
If you have an ia64 and you want to enable memory special
operations support (formerly known as fetchop), say Y here,
otherwise say N.

source "fs/Kconfig"

source "lib/Kconfig"
Expand Down
8 changes: 0 additions & 8 deletions trunk/drivers/char/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -409,14 +409,6 @@ config SGI_MBCS
If you have an SGI Altix with an attached SABrick
say Y or M here, otherwise say N.

config MSPEC
tristate "Memory special operations driver"
depends on IA64
help
If you have an ia64 and you want to enable memory special
operations support (formerly known as fetchop), say Y here,
otherwise say N.

source "drivers/serial/Kconfig"

config UNIX98_PTYS
Expand Down
8 changes: 7 additions & 1 deletion trunk/drivers/char/mspec.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ enum {
MSPEC_UNCACHED
};

#ifdef CONFIG_SGI_SN
static int is_sn2;
#else
#define is_sn2 0
#endif

/*
* One of these structures is allocated when an mspec region is mmaped. The
Expand Down Expand Up @@ -211,7 +215,7 @@ mspec_nopfn(struct vm_area_struct *vma, unsigned long address)
if (vdata->type == MSPEC_FETCHOP)
paddr = TO_AMO(maddr);
else
paddr = __pa(TO_CAC(maddr));
paddr = maddr & ~__IA64_UNCACHED_OFFSET;

pfn = paddr >> PAGE_SHIFT;

Expand Down Expand Up @@ -335,6 +339,7 @@ mspec_init(void)
* The fetchop device only works on SN2 hardware, uncached and cached
* memory drivers should both be valid on all ia64 hardware
*/
#ifdef CONFIG_SGI_SN
if (ia64_platform_is("sn2")) {
is_sn2 = 1;
if (is_shub2()) {
Expand Down Expand Up @@ -363,6 +368,7 @@ mspec_init(void)
goto free_scratch_pages;
}
}
#endif
ret = misc_register(&cached_miscdev);
if (ret) {
printk(KERN_ERR "%s: failed to register device %i\n",
Expand Down
6 changes: 5 additions & 1 deletion trunk/include/asm-ia64/sn/addrs.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,13 @@
*/
#define TO_PHYS(x) (TO_PHYS_MASK & (x))
#define TO_CAC(x) (CAC_BASE | TO_PHYS(x))
#ifdef CONFIG_SGI_SN
#define TO_AMO(x) (AMO_BASE | TO_PHYS(x))
#define TO_GET(x) (GET_BASE | TO_PHYS(x))

#else
#define TO_AMO(x) ({ BUG(); x; })
#define TO_GET(x) ({ BUG(); x; })
#endif

/*
* Covert from processor physical address to II/TIO physical address:
Expand Down

0 comments on commit c662049

Please sign in to comment.