diff options
author | Tseng-Hui (Frank) Lin <thlin@linux.vnet.ibm.com> | 2011-05-02 16:43:04 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-05-04 01:19:26 -0400 |
commit | 851d2e2fe8dbcbe3afcad6fc4569c881d8ad4ce9 (patch) | |
tree | 94082e7751a66236febed1cf18a1f01a02084ae9 /arch/powerpc/include/asm/mmu-hash64.h | |
parent | a32e252f7cdfb3675a4e50215cfac356ed8952c4 (diff) |
powerpc: Add Initiate Coprocessor Store Word (icswx) support
Icswx is a PowerPC instruction to send data to a co-processor. On Book-S
processors the LPAR_ID and process ID (PID) of the owning process are
registered in the window context of the co-processor at initialization
time. When the icswx instruction is executed the L2 generates a cop-reg
transaction on PowerBus. The transaction has no address and the
processor does not perform an MMU access to authenticate the transaction.
The co-processor compares the LPAR_ID and the PID included in the
transaction and the LPAR_ID and PID held in the window context to
determine if the process is authorized to generate the transaction.
The OS needs to assign a 16-bit PID for the process. This cop-PID needs
to be updated during context switch. The cop-PID needs to be destroyed
when the context is destroyed.
Signed-off-by: Sonny Rao <sonnyrao@linux.vnet.ibm.com>
Signed-off-by: Tseng-Hui (Frank) Lin <thlin@linux.vnet.ibm.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm/mmu-hash64.h')
-rw-r--r-- | arch/powerpc/include/asm/mmu-hash64.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/mmu-hash64.h b/arch/powerpc/include/asm/mmu-hash64.h index ae7b3efec8e5..d865bd909c7d 100644 --- a/arch/powerpc/include/asm/mmu-hash64.h +++ b/arch/powerpc/include/asm/mmu-hash64.h | |||
@@ -408,6 +408,7 @@ static inline void subpage_prot_init_new_context(struct mm_struct *mm) { } | |||
408 | #endif /* CONFIG_PPC_SUBPAGE_PROT */ | 408 | #endif /* CONFIG_PPC_SUBPAGE_PROT */ |
409 | 409 | ||
410 | typedef unsigned long mm_context_id_t; | 410 | typedef unsigned long mm_context_id_t; |
411 | struct spinlock; | ||
411 | 412 | ||
412 | typedef struct { | 413 | typedef struct { |
413 | mm_context_id_t id; | 414 | mm_context_id_t id; |
@@ -423,6 +424,11 @@ typedef struct { | |||
423 | #ifdef CONFIG_PPC_SUBPAGE_PROT | 424 | #ifdef CONFIG_PPC_SUBPAGE_PROT |
424 | struct subpage_prot_table spt; | 425 | struct subpage_prot_table spt; |
425 | #endif /* CONFIG_PPC_SUBPAGE_PROT */ | 426 | #endif /* CONFIG_PPC_SUBPAGE_PROT */ |
427 | #ifdef CONFIG_PPC_ICSWX | ||
428 | struct spinlock *cop_lockp; /* guard acop and cop_pid */ | ||
429 | unsigned long acop; /* mask of enabled coprocessor types */ | ||
430 | unsigned int cop_pid; /* pid value used with coprocessors */ | ||
431 | #endif /* CONFIG_PPC_ICSWX */ | ||
426 | } mm_context_t; | 432 | } mm_context_t; |
427 | 433 | ||
428 | 434 | ||