Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 356346
b: refs/heads/master
c: 919ca86
h: refs/heads/master
v: v3
  • Loading branch information
Ian Munsie authored and Benjamin Herrenschmidt committed Jan 10, 2013
1 parent 346ccd3 commit 4bd3051
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 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: 1dbdafec5d63a1de6c83c89a3e953575d60fd393
refs/heads/master: 919ca8681f48ce81848c76f0ed66edb1bb99209b
15 changes: 14 additions & 1 deletion trunk/arch/powerpc/include/asm/dbell.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,25 @@ enum ppc_dbell {
#define SPRN_DOORBELL_CPUTAG SPRN_TIR
#define PPC_DBELL_TAG_MASK 0x7f

static inline void _ppc_msgsnd(u32 msg)
{
if (cpu_has_feature(CPU_FTR_HVMODE))
__asm__ __volatile__ (PPC_MSGSND(%0) : : "r" (msg));
else
__asm__ __volatile__ (PPC_MSGSNDP(%0) : : "r" (msg));
}

#else /* CONFIG_PPC_BOOK3S */

#define PPC_DBELL_MSGTYPE PPC_DBELL
#define SPRN_DOORBELL_CPUTAG SPRN_PIR
#define PPC_DBELL_TAG_MASK 0x3fff

static inline void _ppc_msgsnd(u32 msg)
{
__asm__ __volatile__ (PPC_MSGSND(%0) : : "r" (msg));
}

#endif /* CONFIG_PPC_BOOK3S */

extern void doorbell_cause_ipi(int cpu, unsigned long data);
Expand All @@ -54,7 +67,7 @@ static inline void ppc_msgsnd(enum ppc_dbell type, u32 flags, u32 tag)
u32 msg = PPC_DBELL_TYPE(type) | (flags & PPC_DBELL_MSG_BRDCAST) |
(tag & 0x07ffffff);

__asm__ __volatile__ (PPC_MSGSND(%0) : : "r" (msg));
_ppc_msgsnd(msg);
}

#endif /* _ASM_POWERPC_DBELL_H */

0 comments on commit 4bd3051

Please sign in to comment.