traps.c (79acbb3ff2d8095b692e1502b9eb2ccec348de26) | traps.c (68a64357d15ae4f596e92715719071952006e83c) |
---|---|
1/* 2 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 7 * 2 of the License, or (at your option) any later version. 8 * --- 39 unchanged lines hidden (view full) --- 48#include <asm/backlight.h> 49#endif 50#ifdef CONFIG_PPC64 51#include <asm/firmware.h> 52#include <asm/processor.h> 53#endif 54#include <asm/kexec.h> 55 | 1/* 2 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 7 * 2 of the License, or (at your option) any later version. 8 * --- 39 unchanged lines hidden (view full) --- 48#include <asm/backlight.h> 49#endif 50#ifdef CONFIG_PPC64 51#include <asm/firmware.h> 52#include <asm/processor.h> 53#endif 54#include <asm/kexec.h> 55 |
56#ifdef CONFIG_PPC64 /* XXX */ 57#define _IO_BASE pci_io_base 58#endif 59 | |
60#ifdef CONFIG_DEBUGGER 61int (*__debugger)(struct pt_regs *regs); 62int (*__debugger_ipi)(struct pt_regs *regs); 63int (*__debugger_bpt)(struct pt_regs *regs); 64int (*__debugger_sstep)(struct pt_regs *regs); 65int (*__debugger_iabr_match)(struct pt_regs *regs); 66int (*__debugger_dabr_match)(struct pt_regs *regs); 67int (*__debugger_fault_handler)(struct pt_regs *regs); --- 168 unchanged lines hidden (view full) --- 236 * table. 237 * Note that the 601 only takes a machine check on TEA 238 * (transfer error ack) signal assertion, and does not 239 * set any of the top 16 bits of SRR1. 240 * -- paulus. 241 */ 242static inline int check_io_access(struct pt_regs *regs) 243{ | 56#ifdef CONFIG_DEBUGGER 57int (*__debugger)(struct pt_regs *regs); 58int (*__debugger_ipi)(struct pt_regs *regs); 59int (*__debugger_bpt)(struct pt_regs *regs); 60int (*__debugger_sstep)(struct pt_regs *regs); 61int (*__debugger_iabr_match)(struct pt_regs *regs); 62int (*__debugger_dabr_match)(struct pt_regs *regs); 63int (*__debugger_fault_handler)(struct pt_regs *regs); --- 168 unchanged lines hidden (view full) --- 232 * table. 233 * Note that the 601 only takes a machine check on TEA 234 * (transfer error ack) signal assertion, and does not 235 * set any of the top 16 bits of SRR1. 236 * -- paulus. 237 */ 238static inline int check_io_access(struct pt_regs *regs) 239{ |
244#if defined(CONFIG_PPC_PMAC) && defined(CONFIG_PPC32) | 240#ifdef CONFIG_PPC32 |
245 unsigned long msr = regs->msr; 246 const struct exception_table_entry *entry; 247 unsigned int *nip = (unsigned int *)regs->nip; 248 249 if (((msr & 0xffff0000) == 0 || (msr & (0x80000 | 0x40000))) 250 && (entry = search_exception_tables(regs->nip)) != NULL) { 251 /* 252 * Check that it's a sync instruction, or somewhere --- 16 unchanged lines hidden (view full) --- 269 printk(KERN_DEBUG "%s bad port %lx at %p\n", 270 (*nip & 0x100)? "OUT to": "IN from", 271 regs->gpr[rb] - _IO_BASE, nip); 272 regs->msr |= MSR_RI; 273 regs->nip = entry->fixup; 274 return 1; 275 } 276 } | 241 unsigned long msr = regs->msr; 242 const struct exception_table_entry *entry; 243 unsigned int *nip = (unsigned int *)regs->nip; 244 245 if (((msr & 0xffff0000) == 0 || (msr & (0x80000 | 0x40000))) 246 && (entry = search_exception_tables(regs->nip)) != NULL) { 247 /* 248 * Check that it's a sync instruction, or somewhere --- 16 unchanged lines hidden (view full) --- 265 printk(KERN_DEBUG "%s bad port %lx at %p\n", 266 (*nip & 0x100)? "OUT to": "IN from", 267 regs->gpr[rb] - _IO_BASE, nip); 268 regs->msr |= MSR_RI; 269 regs->nip = entry->fixup; 270 return 1; 271 } 272 } |
277#endif /* CONFIG_PPC_PMAC && CONFIG_PPC32 */ | 273#endif /* CONFIG_PPC32 */ |
278 return 0; 279} 280 281#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) 282/* On 4xx, the reason for the machine check or program exception 283 is in the ESR. */ 284#define get_reason(regs) ((regs)->dsisr) 285#ifndef CONFIG_FSL_BOOKE --- 826 unchanged lines hidden --- | 274 return 0; 275} 276 277#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) 278/* On 4xx, the reason for the machine check or program exception 279 is in the ESR. */ 280#define get_reason(regs) ((regs)->dsisr) 281#ifndef CONFIG_FSL_BOOKE --- 826 unchanged lines hidden --- |