Path: blob/master/arch/powerpc/include/asm/dbell.h
15117 views
/*1* Copyright 2009 Freescale Semicondutor, Inc.2*3* This program is free software; you can redistribute it and/or4* modify it under the terms of the GNU General Public License5* as published by the Free Software Foundation; either version6* 2 of the License, or (at your option) any later version.7*8* provides masks and opcode images for use by code generation, emulation9* and for instructions that older assemblers might not know about10*/11#ifndef _ASM_POWERPC_DBELL_H12#define _ASM_POWERPC_DBELL_H1314#include <linux/smp.h>15#include <linux/threads.h>1617#include <asm/ppc-opcode.h>1819#define PPC_DBELL_MSG_BRDCAST (0x04000000)20#define PPC_DBELL_TYPE(x) (((x) & 0xf) << 28)21enum ppc_dbell {22PPC_DBELL = 0, /* doorbell */23PPC_DBELL_CRIT = 1, /* critical doorbell */24PPC_G_DBELL = 2, /* guest doorbell */25PPC_G_DBELL_CRIT = 3, /* guest critical doorbell */26PPC_G_DBELL_MC = 4, /* guest mcheck doorbell */27};2829extern void doorbell_cause_ipi(int cpu, unsigned long data);30extern void doorbell_exception(struct pt_regs *regs);31extern void doorbell_setup_this_cpu(void);3233static inline void ppc_msgsnd(enum ppc_dbell type, u32 flags, u32 tag)34{35u32 msg = PPC_DBELL_TYPE(type) | (flags & PPC_DBELL_MSG_BRDCAST) |36(tag & 0x07ffffff);3738__asm__ __volatile__ (PPC_MSGSND(%0) : : "r" (msg));39}4041#endif /* _ASM_POWERPC_DBELL_H */424344