mirror of
https://github.com/torvalds/linux.git
synced 2024-12-26 21:02:19 +00:00
[PATCH] sparc64 pt_regs fixes
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
0d84438d98
commit
6d24c8dc2e
@ -79,7 +79,7 @@ static void __ebus_dma_reset(struct ebus_dma_info *p, int no_drain)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static irqreturn_t ebus_dma_irq(int irq, void *dev_id, struct pt_regs *regs)
|
static irqreturn_t ebus_dma_irq(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
struct ebus_dma_info *p = dev_id;
|
struct ebus_dma_info *p = dev_id;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
@ -547,9 +547,11 @@ void timer_irq(int irq, struct pt_regs *regs)
|
|||||||
void handler_irq(int irq, struct pt_regs *regs)
|
void handler_irq(int irq, struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
struct ino_bucket *bucket;
|
struct ino_bucket *bucket;
|
||||||
|
struct pt_regs *old_regs;
|
||||||
|
|
||||||
clear_softint(1 << irq);
|
clear_softint(1 << irq);
|
||||||
|
|
||||||
|
old_regs = set_irq_regs(regs);
|
||||||
irq_enter();
|
irq_enter();
|
||||||
|
|
||||||
/* Sliiiick... */
|
/* Sliiiick... */
|
||||||
@ -558,12 +560,13 @@ void handler_irq(int irq, struct pt_regs *regs)
|
|||||||
struct ino_bucket *next = __bucket(bucket->irq_chain);
|
struct ino_bucket *next = __bucket(bucket->irq_chain);
|
||||||
|
|
||||||
bucket->irq_chain = 0;
|
bucket->irq_chain = 0;
|
||||||
__do_IRQ(bucket->virt_irq, regs);
|
__do_IRQ(bucket->virt_irq);
|
||||||
|
|
||||||
bucket = next;
|
bucket = next;
|
||||||
}
|
}
|
||||||
|
|
||||||
irq_exit();
|
irq_exit();
|
||||||
|
set_irq_regs(old_regs);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct sun5_timer {
|
struct sun5_timer {
|
||||||
|
@ -533,7 +533,7 @@ static void psycho_check_iommu_error(struct pci_controller_info *p,
|
|||||||
#define PSYCHO_UEAFSR_RESV2 0x00000000007fffffUL /* Reserved */
|
#define PSYCHO_UEAFSR_RESV2 0x00000000007fffffUL /* Reserved */
|
||||||
#define PSYCHO_UE_AFAR 0x0038UL
|
#define PSYCHO_UE_AFAR 0x0038UL
|
||||||
|
|
||||||
static irqreturn_t psycho_ue_intr(int irq, void *dev_id, struct pt_regs *regs)
|
static irqreturn_t psycho_ue_intr(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
struct pci_controller_info *p = dev_id;
|
struct pci_controller_info *p = dev_id;
|
||||||
unsigned long afsr_reg = p->pbm_A.controller_regs + PSYCHO_UE_AFSR;
|
unsigned long afsr_reg = p->pbm_A.controller_regs + PSYCHO_UE_AFSR;
|
||||||
@ -610,7 +610,7 @@ static irqreturn_t psycho_ue_intr(int irq, void *dev_id, struct pt_regs *regs)
|
|||||||
#define PSYCHO_CEAFSR_RESV2 0x00000000007fffffUL /* Reserved */
|
#define PSYCHO_CEAFSR_RESV2 0x00000000007fffffUL /* Reserved */
|
||||||
#define PSYCHO_CE_AFAR 0x0040UL
|
#define PSYCHO_CE_AFAR 0x0040UL
|
||||||
|
|
||||||
static irqreturn_t psycho_ce_intr(int irq, void *dev_id, struct pt_regs *regs)
|
static irqreturn_t psycho_ce_intr(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
struct pci_controller_info *p = dev_id;
|
struct pci_controller_info *p = dev_id;
|
||||||
unsigned long afsr_reg = p->pbm_A.controller_regs + PSYCHO_CE_AFSR;
|
unsigned long afsr_reg = p->pbm_A.controller_regs + PSYCHO_CE_AFSR;
|
||||||
@ -735,7 +735,7 @@ static irqreturn_t psycho_pcierr_intr_other(struct pci_pbm_info *pbm, int is_pbm
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static irqreturn_t psycho_pcierr_intr(int irq, void *dev_id, struct pt_regs *regs)
|
static irqreturn_t psycho_pcierr_intr(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
struct pci_pbm_info *pbm = dev_id;
|
struct pci_pbm_info *pbm = dev_id;
|
||||||
struct pci_controller_info *p = pbm->parent;
|
struct pci_controller_info *p = pbm->parent;
|
||||||
|
@ -574,7 +574,7 @@ static void sabre_check_iommu_error(struct pci_controller_info *p,
|
|||||||
spin_unlock_irqrestore(&iommu->lock, flags);
|
spin_unlock_irqrestore(&iommu->lock, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
static irqreturn_t sabre_ue_intr(int irq, void *dev_id, struct pt_regs *regs)
|
static irqreturn_t sabre_ue_intr(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
struct pci_controller_info *p = dev_id;
|
struct pci_controller_info *p = dev_id;
|
||||||
unsigned long afsr_reg = p->pbm_A.controller_regs + SABRE_UE_AFSR;
|
unsigned long afsr_reg = p->pbm_A.controller_regs + SABRE_UE_AFSR;
|
||||||
@ -634,7 +634,7 @@ static irqreturn_t sabre_ue_intr(int irq, void *dev_id, struct pt_regs *regs)
|
|||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
static irqreturn_t sabre_ce_intr(int irq, void *dev_id, struct pt_regs *regs)
|
static irqreturn_t sabre_ce_intr(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
struct pci_controller_info *p = dev_id;
|
struct pci_controller_info *p = dev_id;
|
||||||
unsigned long afsr_reg = p->pbm_A.controller_regs + SABRE_CE_AFSR;
|
unsigned long afsr_reg = p->pbm_A.controller_regs + SABRE_CE_AFSR;
|
||||||
@ -726,7 +726,7 @@ static irqreturn_t sabre_pcierr_intr_other(struct pci_controller_info *p)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static irqreturn_t sabre_pcierr_intr(int irq, void *dev_id, struct pt_regs *regs)
|
static irqreturn_t sabre_pcierr_intr(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
struct pci_controller_info *p = dev_id;
|
struct pci_controller_info *p = dev_id;
|
||||||
unsigned long afsr_reg, afar_reg;
|
unsigned long afsr_reg, afar_reg;
|
||||||
|
@ -515,7 +515,7 @@ static void schizo_check_iommu_error(struct pci_controller_info *p,
|
|||||||
#define SCHIZO_UEAFSR_MTAG 0x000000000000e000UL /* Safari */
|
#define SCHIZO_UEAFSR_MTAG 0x000000000000e000UL /* Safari */
|
||||||
#define SCHIZO_UEAFSR_ECCSYND 0x00000000000001ffUL /* Safari */
|
#define SCHIZO_UEAFSR_ECCSYND 0x00000000000001ffUL /* Safari */
|
||||||
|
|
||||||
static irqreturn_t schizo_ue_intr(int irq, void *dev_id, struct pt_regs *regs)
|
static irqreturn_t schizo_ue_intr(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
struct pci_controller_info *p = dev_id;
|
struct pci_controller_info *p = dev_id;
|
||||||
unsigned long afsr_reg = p->pbm_B.controller_regs + SCHIZO_UE_AFSR;
|
unsigned long afsr_reg = p->pbm_B.controller_regs + SCHIZO_UE_AFSR;
|
||||||
@ -603,7 +603,7 @@ static irqreturn_t schizo_ue_intr(int irq, void *dev_id, struct pt_regs *regs)
|
|||||||
#define SCHIZO_CEAFSR_MTAG 0x000000000000e000UL
|
#define SCHIZO_CEAFSR_MTAG 0x000000000000e000UL
|
||||||
#define SCHIZO_CEAFSR_ECCSYND 0x00000000000001ffUL
|
#define SCHIZO_CEAFSR_ECCSYND 0x00000000000001ffUL
|
||||||
|
|
||||||
static irqreturn_t schizo_ce_intr(int irq, void *dev_id, struct pt_regs *regs)
|
static irqreturn_t schizo_ce_intr(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
struct pci_controller_info *p = dev_id;
|
struct pci_controller_info *p = dev_id;
|
||||||
unsigned long afsr_reg = p->pbm_B.controller_regs + SCHIZO_CE_AFSR;
|
unsigned long afsr_reg = p->pbm_B.controller_regs + SCHIZO_CE_AFSR;
|
||||||
@ -778,7 +778,7 @@ static irqreturn_t schizo_pcierr_intr_other(struct pci_pbm_info *pbm)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static irqreturn_t schizo_pcierr_intr(int irq, void *dev_id, struct pt_regs *regs)
|
static irqreturn_t schizo_pcierr_intr(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
struct pci_pbm_info *pbm = dev_id;
|
struct pci_pbm_info *pbm = dev_id;
|
||||||
struct pci_controller_info *p = pbm->parent;
|
struct pci_controller_info *p = pbm->parent;
|
||||||
@ -933,7 +933,7 @@ static irqreturn_t schizo_pcierr_intr(int irq, void *dev_id, struct pt_regs *reg
|
|||||||
/* We only expect UNMAP errors here. The rest of the Safari errors
|
/* We only expect UNMAP errors here. The rest of the Safari errors
|
||||||
* are marked fatal and thus cause a system reset.
|
* are marked fatal and thus cause a system reset.
|
||||||
*/
|
*/
|
||||||
static irqreturn_t schizo_safarierr_intr(int irq, void *dev_id, struct pt_regs *regs)
|
static irqreturn_t schizo_safarierr_intr(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
struct pci_controller_info *p = dev_id;
|
struct pci_controller_info *p = dev_id;
|
||||||
u64 errlog;
|
u64 errlog;
|
||||||
|
@ -35,7 +35,7 @@ static void __iomem *power_reg;
|
|||||||
static DECLARE_WAIT_QUEUE_HEAD(powerd_wait);
|
static DECLARE_WAIT_QUEUE_HEAD(powerd_wait);
|
||||||
static int button_pressed;
|
static int button_pressed;
|
||||||
|
|
||||||
static irqreturn_t power_handler(int irq, void *dev_id, struct pt_regs *regs)
|
static irqreturn_t power_handler(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
if (button_pressed == 0) {
|
if (button_pressed == 0) {
|
||||||
button_pressed = 1;
|
button_pressed = 1;
|
||||||
|
@ -839,7 +839,7 @@ unsigned int sbus_build_irq(void *buscookie, unsigned int ino)
|
|||||||
#define SYSIO_UEAFSR_SIZE 0x00001c0000000000UL /* Bad transfer size 2^SIZE */
|
#define SYSIO_UEAFSR_SIZE 0x00001c0000000000UL /* Bad transfer size 2^SIZE */
|
||||||
#define SYSIO_UEAFSR_MID 0x000003e000000000UL /* UPA MID causing the fault */
|
#define SYSIO_UEAFSR_MID 0x000003e000000000UL /* UPA MID causing the fault */
|
||||||
#define SYSIO_UEAFSR_RESV2 0x0000001fffffffffUL /* Reserved */
|
#define SYSIO_UEAFSR_RESV2 0x0000001fffffffffUL /* Reserved */
|
||||||
static irqreturn_t sysio_ue_handler(int irq, void *dev_id, struct pt_regs *regs)
|
static irqreturn_t sysio_ue_handler(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
struct sbus_bus *sbus = dev_id;
|
struct sbus_bus *sbus = dev_id;
|
||||||
struct sbus_iommu *iommu = sbus->iommu;
|
struct sbus_iommu *iommu = sbus->iommu;
|
||||||
@ -911,7 +911,7 @@ static irqreturn_t sysio_ue_handler(int irq, void *dev_id, struct pt_regs *regs)
|
|||||||
#define SYSIO_CEAFSR_SIZE 0x00001c0000000000UL /* Bad transfer size 2^SIZE */
|
#define SYSIO_CEAFSR_SIZE 0x00001c0000000000UL /* Bad transfer size 2^SIZE */
|
||||||
#define SYSIO_CEAFSR_MID 0x000003e000000000UL /* UPA MID causing the fault */
|
#define SYSIO_CEAFSR_MID 0x000003e000000000UL /* UPA MID causing the fault */
|
||||||
#define SYSIO_CEAFSR_RESV2 0x0000001fffffffffUL /* Reserved */
|
#define SYSIO_CEAFSR_RESV2 0x0000001fffffffffUL /* Reserved */
|
||||||
static irqreturn_t sysio_ce_handler(int irq, void *dev_id, struct pt_regs *regs)
|
static irqreturn_t sysio_ce_handler(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
struct sbus_bus *sbus = dev_id;
|
struct sbus_bus *sbus = dev_id;
|
||||||
struct sbus_iommu *iommu = sbus->iommu;
|
struct sbus_iommu *iommu = sbus->iommu;
|
||||||
@ -988,7 +988,7 @@ static irqreturn_t sysio_ce_handler(int irq, void *dev_id, struct pt_regs *regs)
|
|||||||
#define SYSIO_SBAFSR_SIZE 0x00001c0000000000UL /* Size of transfer */
|
#define SYSIO_SBAFSR_SIZE 0x00001c0000000000UL /* Size of transfer */
|
||||||
#define SYSIO_SBAFSR_MID 0x000003e000000000UL /* MID causing the error */
|
#define SYSIO_SBAFSR_MID 0x000003e000000000UL /* MID causing the error */
|
||||||
#define SYSIO_SBAFSR_RESV3 0x0000001fffffffffUL /* Reserved */
|
#define SYSIO_SBAFSR_RESV3 0x0000001fffffffffUL /* Reserved */
|
||||||
static irqreturn_t sysio_sbus_error_handler(int irq, void *dev_id, struct pt_regs *regs)
|
static irqreturn_t sysio_sbus_error_handler(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
struct sbus_bus *sbus = dev_id;
|
struct sbus_bus *sbus = dev_id;
|
||||||
struct sbus_iommu *iommu = sbus->iommu;
|
struct sbus_iommu *iommu = sbus->iommu;
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#include <asm/cpudata.h>
|
#include <asm/cpudata.h>
|
||||||
|
|
||||||
#include <asm/irq.h>
|
#include <asm/irq.h>
|
||||||
|
#include <asm/irq_regs.h>
|
||||||
#include <asm/page.h>
|
#include <asm/page.h>
|
||||||
#include <asm/pgtable.h>
|
#include <asm/pgtable.h>
|
||||||
#include <asm/oplib.h>
|
#include <asm/oplib.h>
|
||||||
@ -1187,6 +1188,7 @@ void smp_percpu_timer_interrupt(struct pt_regs *regs)
|
|||||||
unsigned long compare, tick, pstate;
|
unsigned long compare, tick, pstate;
|
||||||
int cpu = smp_processor_id();
|
int cpu = smp_processor_id();
|
||||||
int user = user_mode(regs);
|
int user = user_mode(regs);
|
||||||
|
struct pt_regs *old_regs;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check for level 14 softint.
|
* Check for level 14 softint.
|
||||||
@ -1203,8 +1205,9 @@ void smp_percpu_timer_interrupt(struct pt_regs *regs)
|
|||||||
clear_softint(tick_mask);
|
clear_softint(tick_mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
old_regs = set_irq_regs(regs);
|
||||||
do {
|
do {
|
||||||
profile_tick(CPU_PROFILING, regs);
|
profile_tick(CPU_PROFILING);
|
||||||
if (!--prof_counter(cpu)) {
|
if (!--prof_counter(cpu)) {
|
||||||
irq_enter();
|
irq_enter();
|
||||||
|
|
||||||
@ -1236,6 +1239,7 @@ void smp_percpu_timer_interrupt(struct pt_regs *regs)
|
|||||||
: /* no outputs */
|
: /* no outputs */
|
||||||
: "r" (pstate));
|
: "r" (pstate));
|
||||||
} while (time_after_eq(tick, compare));
|
} while (time_after_eq(tick, compare));
|
||||||
|
set_irq_regs(old_regs);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __init smp_setup_percpu_timer(void)
|
static void __init smp_setup_percpu_timer(void)
|
||||||
|
@ -208,7 +208,7 @@ static void sun_fd_enable_dma(void)
|
|||||||
pdma_areasize = pdma_size;
|
pdma_areasize = pdma_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
irqreturn_t sparc_floppy_irq(int irq, void *dev_cookie, struct pt_regs *regs)
|
irqreturn_t sparc_floppy_irq(int irq, void *dev_cookie)
|
||||||
{
|
{
|
||||||
if (likely(doing_pdma)) {
|
if (likely(doing_pdma)) {
|
||||||
void __iomem *stat = (void __iomem *) fdc_status;
|
void __iomem *stat = (void __iomem *) fdc_status;
|
||||||
@ -255,7 +255,7 @@ irqreturn_t sparc_floppy_irq(int irq, void *dev_cookie, struct pt_regs *regs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
main_interrupt:
|
main_interrupt:
|
||||||
return floppy_interrupt(irq, dev_cookie, regs);
|
return floppy_interrupt(irq, dev_cookie);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sun_fd_request_irq(void)
|
static int sun_fd_request_irq(void)
|
||||||
@ -311,7 +311,7 @@ struct sun_pci_dma_op {
|
|||||||
static struct sun_pci_dma_op sun_pci_dma_current = { -1U, 0, 0, NULL};
|
static struct sun_pci_dma_op sun_pci_dma_current = { -1U, 0, 0, NULL};
|
||||||
static struct sun_pci_dma_op sun_pci_dma_pending = { -1U, 0, 0, NULL};
|
static struct sun_pci_dma_op sun_pci_dma_pending = { -1U, 0, 0, NULL};
|
||||||
|
|
||||||
extern irqreturn_t floppy_interrupt(int irq, void *dev_id, struct pt_regs *regs);
|
extern irqreturn_t floppy_interrupt(int irq, void *dev_id);
|
||||||
|
|
||||||
static unsigned char sun_pci_fd_inb(unsigned long port)
|
static unsigned char sun_pci_fd_inb(unsigned long port)
|
||||||
{
|
{
|
||||||
@ -446,7 +446,7 @@ static int sun_pci_fd_eject(int drive)
|
|||||||
|
|
||||||
void sun_pci_fd_dma_callback(struct ebus_dma_info *p, int event, void *cookie)
|
void sun_pci_fd_dma_callback(struct ebus_dma_info *p, int event, void *cookie)
|
||||||
{
|
{
|
||||||
floppy_interrupt(0, NULL, NULL);
|
floppy_interrupt(0, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
1
include/asm-sparc64/irq_regs.h
Normal file
1
include/asm-sparc64/irq_regs.h
Normal file
@ -0,0 +1 @@
|
|||||||
|
#include <asm-generic/irq_regs.h>
|
Loading…
Reference in New Issue
Block a user