Path: blob/master/arch/powerpc/platforms/iseries/exception.h
10820 views
#ifndef _ASM_POWERPC_ISERIES_EXCEPTION_H1#define _ASM_POWERPC_ISERIES_EXCEPTION_H2/*3* Extracted from head_64.S4*5* PowerPC version6* Copyright (C) 1995-1996 Gary Thomas ([email protected])7*8* Rewritten by Cort Dougan ([email protected]) for PReP9* Copyright (C) 1996 Cort Dougan <[email protected]>10* Adapted for Power Macintosh by Paul Mackerras.11* Low-level exception handlers and MMU support12* rewritten by Paul Mackerras.13* Copyright (C) 1996 Paul Mackerras.14*15* Adapted for 64bit PowerPC by Dave Engebretsen, Peter Bergner, and16* Mike Corrigan {engebret|bergner|mikejc}@us.ibm.com17*18* This file contains the low-level support and setup for the19* PowerPC-64 platform, including trap and interrupt dispatch.20*21* This program is free software; you can redistribute it and/or22* modify it under the terms of the GNU General Public License23* as published by the Free Software Foundation; either version24* 2 of the License, or (at your option) any later version.25*/26#include <asm/exception-64s.h>2728#define EXCEPTION_PROLOG_ISERIES_1 \29mfmsr r10; \30ld r12,PACALPPACAPTR(r13); \31ld r11,LPPACASRR0(r12); \32ld r12,LPPACASRR1(r12); \33ori r10,r10,MSR_RI; \34mtmsrd r10,13536#define STD_EXCEPTION_ISERIES(label, area) \37.globl label##_iSeries; \38label##_iSeries: \39HMT_MEDIUM; \40mtspr SPRN_SPRG_SCRATCH0,r13; /* save r13 */ \41EXCEPTION_PROLOG_1(area); \42EXCEPTION_PROLOG_ISERIES_1; \43b label##_common4445#define MASKABLE_EXCEPTION_ISERIES(label) \46.globl label##_iSeries; \47label##_iSeries: \48HMT_MEDIUM; \49mtspr SPRN_SPRG_SCRATCH0,r13; /* save r13 */ \50EXCEPTION_PROLOG_1(PACA_EXGEN); \51lbz r10,PACASOFTIRQEN(r13); \52cmpwi 0,r10,0; \53beq- label##_iSeries_masked; \54EXCEPTION_PROLOG_ISERIES_1; \55b label##_common; \5657#endif /* _ASM_POWERPC_ISERIES_EXCEPTION_H */585960