Commit e62c31e2 authored by Richard Henderson's avatar Richard Henderson Committed by Richard Henderson

[ALPHA] Formatting cleanup, warning removal, move declarations

to header files where they belong.
parent 29a54be1
This diff is collapsed.
...@@ -56,20 +56,20 @@ struct ...@@ -56,20 +56,20 @@ struct
/* /*
* Routines to access TIG registers. * Routines to access TIG registers.
*/ */
static volatile unsigned long * static inline volatile unsigned long *
mk_tig_addr(int offset) mk_tig_addr(int offset)
{ {
return (volatile unsigned long *)(TITAN_TIG_SPACE + (offset << 6)); return (volatile unsigned long *)(TITAN_TIG_SPACE + (offset << 6));
} }
u8 static inline u8
titan_read_tig(int offset, u8 value) titan_read_tig(int offset, u8 value)
{ {
volatile unsigned long *tig_addr = mk_tig_addr(offset); volatile unsigned long *tig_addr = mk_tig_addr(offset);
return (u8)(*tig_addr & 0xff); return (u8)(*tig_addr & 0xff);
} }
void static inline void
titan_write_tig(int offset, u8 value) titan_write_tig(int offset, u8 value)
{ {
volatile unsigned long *tig_addr = mk_tig_addr(offset); volatile unsigned long *tig_addr = mk_tig_addr(offset);
...@@ -207,7 +207,7 @@ titan_pci_tbi(struct pci_controller *hose, dma_addr_t start, dma_addr_t end) ...@@ -207,7 +207,7 @@ titan_pci_tbi(struct pci_controller *hose, dma_addr_t start, dma_addr_t end)
volatile unsigned long *csr; volatile unsigned long *csr;
unsigned long value; unsigned long value;
/* Get the right hose */ /* Get the right hose. */
port = &pachip->g_port; port = &pachip->g_port;
if (hose->index & 2) if (hose->index & 2)
port = &pachip->a_port; port = &pachip->a_port;
...@@ -242,6 +242,7 @@ titan_query_agp(titan_pachip_port *port) ...@@ -242,6 +242,7 @@ titan_query_agp(titan_pachip_port *port)
return pctl.pctl_r_bits.apctl_v_agp_present; return pctl.pctl_r_bits.apctl_v_agp_present;
} }
static void __init static void __init
titan_init_one_pachip_port(titan_pachip_port *port, int index) titan_init_one_pachip_port(titan_pachip_port *port, int index)
{ {
...@@ -308,7 +309,7 @@ titan_init_one_pachip_port(titan_pachip_port *port, int index) ...@@ -308,7 +309,7 @@ titan_init_one_pachip_port(titan_pachip_port *port, int index)
/* /*
* Set up the PCI to main memory translation windows. * Set up the PCI to main memory translation windows.
* *
* Note: Window 3 on Titan is Scatter-Gather ONLY * Note: Window 3 on Titan is Scatter-Gather ONLY.
* *
* Window 0 is scatter-gather 8MB at 8MB (for isa) * Window 0 is scatter-gather 8MB at 8MB (for isa)
* Window 1 is direct access 1GB at 2GB * Window 1 is direct access 1GB at 2GB
...@@ -334,11 +335,11 @@ titan_init_one_pachip_port(titan_pachip_port *port, int index) ...@@ -334,11 +335,11 @@ titan_init_one_pachip_port(titan_pachip_port *port, int index)
port->wsba[3].csr = 0; port->wsba[3].csr = 0;
/* Enable the Monster Window to make DAC pci64 possible. */ /* Enable the Monster Window to make DAC pci64 possible. */
port->pctl.csr |= pctl_m_mwin; port->pctl.csr |= pctl_m_mwin;
/* /*
* If it's an AGP port, initialize agplastwr * If it's an AGP port, initialize agplastwr.
*/ */
if (titan_query_agp(port)) if (titan_query_agp(port))
port->port_specific.a.agplastwr.csr = __direct_map_base; port->port_specific.a.agplastwr.csr = __direct_map_base;
...@@ -374,7 +375,7 @@ titan_init_vga_hose(void) ...@@ -374,7 +375,7 @@ titan_init_vga_hose(void)
* Our hose numbering matches the console's, so just find * Our hose numbering matches the console's, so just find
* the right one... * the right one...
*/ */
for(hose = hose_head; hose; hose = hose->next) { for (hose = hose_head; hose; hose = hose->next) {
if (hose->index == h) break; if (hose->index == h) break;
} }
...@@ -413,14 +414,14 @@ titan_init_arch(void) ...@@ -413,14 +414,14 @@ titan_init_arch(void)
ioport_resource.end = ~0UL; ioport_resource.end = ~0UL;
iomem_resource.end = ~0UL; iomem_resource.end = ~0UL;
/* PCI DMA Direct Mapping is 1GB at 2GB */ /* PCI DMA Direct Mapping is 1GB at 2GB. */
__direct_map_base = 0x80000000; __direct_map_base = 0x80000000;
__direct_map_size = 0x40000000; __direct_map_size = 0x40000000;
/* Init the PA chip(s) */ /* Init the PA chip(s). */
titan_init_pachips(TITAN_pachip0, TITAN_pachip1); titan_init_pachips(TITAN_pachip0, TITAN_pachip1);
/* Check for graphic console location (if any) */ /* Check for graphic console location (if any). */
titan_init_vga_hose(); titan_init_vga_hose();
} }
...@@ -450,8 +451,8 @@ titan_kill_pachips(titan_pachip *pachip0, titan_pachip *pachip1) ...@@ -450,8 +451,8 @@ titan_kill_pachips(titan_pachip *pachip0, titan_pachip *pachip1)
int pchip1_present = TITAN_cchip->csc.csr & 1L<<14; int pchip1_present = TITAN_cchip->csc.csr & 1L<<14;
if (pchip1_present) { if (pchip1_present) {
titan_kill_one_pachip_port(&pachip0->g_port, 1); titan_kill_one_pachip_port(&pachip1->g_port, 1);
titan_kill_one_pachip_port(&pachip0->a_port, 3); titan_kill_one_pachip_port(&pachip1->a_port, 3);
} }
titan_kill_one_pachip_port(&pachip0->g_port, 0); titan_kill_one_pachip_port(&pachip0->g_port, 0);
titan_kill_one_pachip_port(&pachip0->a_port, 2); titan_kill_one_pachip_port(&pachip0->a_port, 2);
...@@ -465,7 +466,7 @@ titan_kill_arch(int mode) ...@@ -465,7 +466,7 @@ titan_kill_arch(int mode)
/* /*
* IO map support * IO map support.
*/ */
unsigned long unsigned long
titan_ioremap(unsigned long addr, unsigned long size) titan_ioremap(unsigned long addr, unsigned long size)
...@@ -480,7 +481,7 @@ titan_ioremap(unsigned long addr, unsigned long size) ...@@ -480,7 +481,7 @@ titan_ioremap(unsigned long addr, unsigned long size)
unsigned long pfn; unsigned long pfn;
/* /*
* Adjust the addr * Adjust the addr.
*/ */
#ifdef CONFIG_VGA_HOSE #ifdef CONFIG_VGA_HOSE
if (pci_vga_hose && __titan_is_mem_vga(addr)) { if (pci_vga_hose && __titan_is_mem_vga(addr)) {
...@@ -490,9 +491,9 @@ titan_ioremap(unsigned long addr, unsigned long size) ...@@ -490,9 +491,9 @@ titan_ioremap(unsigned long addr, unsigned long size)
#endif #endif
/* /*
* Find the hose * Find the hose.
*/ */
for(hose = hose_head; hose; hose = hose->next) for (hose = hose_head; hose; hose = hose->next)
if (hose->index == h) break; if (hose->index == h) break;
if (!hose) return (unsigned long)NULL; if (!hose) return (unsigned long)NULL;
...@@ -504,7 +505,7 @@ titan_ioremap(unsigned long addr, unsigned long size) ...@@ -504,7 +505,7 @@ titan_ioremap(unsigned long addr, unsigned long size)
return addr - __direct_map_base + TITAN_MEM_BIAS; return addr - __direct_map_base + TITAN_MEM_BIAS;
/* /*
* Check the scatter-gather arena... * Check the scatter-gather arena.
*/ */
if (hose->sg_pci && if (hose->sg_pci &&
baddr >= (unsigned long)hose->sg_pci->dma_base && baddr >= (unsigned long)hose->sg_pci->dma_base &&
...@@ -524,7 +525,7 @@ titan_ioremap(unsigned long addr, unsigned long size) ...@@ -524,7 +525,7 @@ titan_ioremap(unsigned long addr, unsigned long size)
area = get_vm_area(size, VM_IOREMAP); area = get_vm_area(size, VM_IOREMAP);
if (!area) return (unsigned long)NULL; if (!area) return (unsigned long)NULL;
ptes = hose->sg_pci->ptes; ptes = hose->sg_pci->ptes;
for(vaddr = (unsigned long)area->addr; for (vaddr = (unsigned long)area->addr;
baddr <= last; baddr <= last;
baddr += PAGE_SIZE, vaddr += PAGE_SIZE) { baddr += PAGE_SIZE, vaddr += PAGE_SIZE) {
pfn = ptes[baddr >> PAGE_SHIFT]; pfn = ptes[baddr >> PAGE_SHIFT];
...@@ -551,7 +552,7 @@ titan_ioremap(unsigned long addr, unsigned long size) ...@@ -551,7 +552,7 @@ titan_ioremap(unsigned long addr, unsigned long size)
} }
/* /*
* Not found - assume legacy ioremap * Not found - assume legacy ioremap.
*/ */
return addr + TITAN_MEM_BIAS; return addr + TITAN_MEM_BIAS;
...@@ -562,16 +563,16 @@ titan_iounmap(unsigned long addr) ...@@ -562,16 +563,16 @@ titan_iounmap(unsigned long addr)
{ {
if (((long)addr >> 41) == -2) if (((long)addr >> 41) == -2)
return; /* kseg map, nothing to do */ return; /* kseg map, nothing to do */
if (addr) return vfree((void *)(PAGE_MASK & addr)); if (addr)
vfree((void *)(PAGE_MASK & addr));
} }
EXPORT_SYMBOL(titan_ioremap); EXPORT_SYMBOL(titan_ioremap);
EXPORT_SYMBOL(titan_iounmap); EXPORT_SYMBOL(titan_iounmap);
/* /*
* AGP GART Support * AGP GART Support.
*/ */
#if defined(CONFIG_ALPHA_CORE_AGP)
#include <linux/agp_backend.h> #include <linux/agp_backend.h>
#include <asm/agp_backend.h> #include <asm/agp_backend.h>
#include <linux/slab.h> #include <linux/slab.h>
...@@ -585,12 +586,14 @@ struct titan_agp_aperture { ...@@ -585,12 +586,14 @@ struct titan_agp_aperture {
long pg_count; long pg_count;
}; };
static int titan_agp_setup(alpha_agp_info *agp) static int
titan_agp_setup(alpha_agp_info *agp)
{ {
struct titan_agp_aperture *aper; struct titan_agp_aperture *aper;
aper = kmalloc(sizeof(struct titan_agp_aperture), GFP_KERNEL); aper = kmalloc(sizeof(struct titan_agp_aperture), GFP_KERNEL);
if (aper == NULL) return -ENOMEM; if (aper == NULL)
return -ENOMEM;
aper->arena = agp->hose->sg_pci; aper->arena = agp->hose->sg_pci;
aper->pg_count = TITAN_AGP_APER_SIZE / PAGE_SIZE; aper->pg_count = TITAN_AGP_APER_SIZE / PAGE_SIZE;
...@@ -610,7 +613,8 @@ static int titan_agp_setup(alpha_agp_info *agp) ...@@ -610,7 +613,8 @@ static int titan_agp_setup(alpha_agp_info *agp)
return 0; return 0;
} }
static void titan_agp_cleanup(alpha_agp_info *agp) static void
titan_agp_cleanup(alpha_agp_info *agp)
{ {
struct titan_agp_aperture *aper = agp->aperture.sysdata; struct titan_agp_aperture *aper = agp->aperture.sysdata;
int status; int status;
...@@ -623,13 +627,15 @@ static void titan_agp_cleanup(alpha_agp_info *agp) ...@@ -623,13 +627,15 @@ static void titan_agp_cleanup(alpha_agp_info *agp)
status = iommu_release(aper->arena, aper->pg_start, status = iommu_release(aper->arena, aper->pg_start,
aper->pg_count); aper->pg_count);
} }
if (status < 0) printk(KERN_ERR "Failed to release AGP memory\n"); if (status < 0)
printk(KERN_ERR "Failed to release AGP memory\n");
kfree(aper); kfree(aper);
kfree(agp); kfree(agp);
} }
static int titan_agp_configure(alpha_agp_info *agp) static int
titan_agp_configure(alpha_agp_info *agp)
{ {
union TPAchipPCTL pctl; union TPAchipPCTL pctl;
titan_pachip_port *port = agp->private; titan_pachip_port *port = agp->private;
...@@ -652,19 +658,19 @@ static int titan_agp_configure(alpha_agp_info *agp) ...@@ -652,19 +658,19 @@ static int titan_agp_configure(alpha_agp_info *agp)
pctl.pctl_r_bits.apctl_v_agp_lp_rd = 7; pctl.pctl_r_bits.apctl_v_agp_lp_rd = 7;
/* /*
* AGP Enable * AGP Enable.
*/ */
pctl.pctl_r_bits.apctl_v_agp_en = agp->mode.bits.enable; pctl.pctl_r_bits.apctl_v_agp_en = agp->mode.bits.enable;
/* Tell the user... */ /* Tell the user. */
printk("Enabling AGP: %dX%s\n", printk("Enabling AGP: %dX%s\n",
1 << pctl.pctl_r_bits.apctl_v_agp_rate, 1 << pctl.pctl_r_bits.apctl_v_agp_rate,
pctl.pctl_r_bits.apctl_v_agp_sba_en ? " - SBA" : ""); pctl.pctl_r_bits.apctl_v_agp_sba_en ? " - SBA" : "");
/* Write it */ /* Write it. */
port->pctl.csr = pctl.pctl_q_whole; port->pctl.csr = pctl.pctl_q_whole;
/* And wait at least 5000 66MHz cycles (per Titan spec) */ /* And wait at least 5000 66MHz cycles (per Titan spec). */
udelay(100); udelay(100);
return 0; return 0;
...@@ -721,7 +727,6 @@ struct alpha_agp_ops titan_agp_ops = ...@@ -721,7 +727,6 @@ struct alpha_agp_ops titan_agp_ops =
alpha_agp_info * alpha_agp_info *
titan_agp_info(void) titan_agp_info(void)
{ {
extern struct pci_controller *hose_head;
alpha_agp_info *agp; alpha_agp_info *agp;
struct pci_controller *hose; struct pci_controller *hose;
titan_pachip_port *port; titan_pachip_port *port;
...@@ -729,7 +734,7 @@ titan_agp_info(void) ...@@ -729,7 +734,7 @@ titan_agp_info(void)
union TPAchipPCTL pctl; union TPAchipPCTL pctl;
/* /*
* Find the AGP port * Find the AGP port.
*/ */
port = &TITAN_pachip0->a_port; port = &TITAN_pachip0->a_port;
if (titan_query_agp(port)) if (titan_query_agp(port))
...@@ -739,21 +744,22 @@ titan_agp_info(void) ...@@ -739,21 +744,22 @@ titan_agp_info(void)
hosenum = 3; hosenum = 3;
/* /*
* Find the hose the port is on * Find the hose the port is on.
*/ */
for(hose = hose_head; hose; hose = hose->next) { for (hose = hose_head; hose; hose = hose->next)
if (hose->index == hosenum) break; if (hose->index == hosenum)
} break;
if (!hose || !hose->sg_pci) return NULL; if (!hose || !hose->sg_pci)
return NULL;
/* /*
* Allocate the info structure * Allocate the info structure.
*/ */
agp = kmalloc(sizeof(*agp), GFP_KERNEL); agp = kmalloc(sizeof(*agp), GFP_KERNEL);
/* /*
* Fill it in * Fill it in.
*/ */
agp->type = 0 /* FIXME: ALPHA_CORE_AGP */; agp->type = 0 /* FIXME: ALPHA_CORE_AGP */;
agp->hose = hose; agp->hose = hose;
...@@ -761,7 +767,7 @@ titan_agp_info(void) ...@@ -761,7 +767,7 @@ titan_agp_info(void)
agp->ops = &titan_agp_ops; agp->ops = &titan_agp_ops;
/* /*
* Aperture - not configured until ops.setup() * Aperture - not configured until ops.setup().
* *
* FIXME - should we go ahead and allocate it here? * FIXME - should we go ahead and allocate it here?
*/ */
...@@ -770,7 +776,7 @@ titan_agp_info(void) ...@@ -770,7 +776,7 @@ titan_agp_info(void)
agp->aperture.sysdata = NULL; agp->aperture.sysdata = NULL;
/* /*
* Capabilities * Capabilities.
*/ */
agp->capability.lw = 0; agp->capability.lw = 0;
agp->capability.bits.rate = 3; /* 2x, 1x */ agp->capability.bits.rate = 3; /* 2x, 1x */
...@@ -778,7 +784,7 @@ titan_agp_info(void) ...@@ -778,7 +784,7 @@ titan_agp_info(void)
agp->capability.bits.rq = 7; /* 8 - 1 */ agp->capability.bits.rq = 7; /* 8 - 1 */
/* /*
* Mode * Mode.
*/ */
pctl.pctl_q_whole = port->pctl.csr; pctl.pctl_q_whole = port->pctl.csr;
agp->mode.lw = 0; agp->mode.lw = 0;
...@@ -789,4 +795,3 @@ titan_agp_info(void) ...@@ -789,4 +795,3 @@ titan_agp_info(void)
return agp; return agp;
} }
#endif /* CONFIG_ALPHA_CORE_AGP */
...@@ -357,7 +357,6 @@ void __init ...@@ -357,7 +357,6 @@ void __init
tsunami_init_arch(void) tsunami_init_arch(void)
{ {
#ifdef NXM_MACHINE_CHECKS_ON_TSUNAMI #ifdef NXM_MACHINE_CHECKS_ON_TSUNAMI
extern asmlinkage void entInt(void);
unsigned long tmp; unsigned long tmp;
/* Ho hum.. init_arch is called before init_IRQ, but we need to be /* Ho hum.. init_arch is called before init_IRQ, but we need to be
......
...@@ -18,8 +18,6 @@ ...@@ -18,8 +18,6 @@
#include "err_impl.h" #include "err_impl.h"
#include "proto.h" #include "proto.h"
#if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_MARVEL)
void void
marvel_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs) marvel_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs)
...@@ -32,9 +30,7 @@ marvel_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs) ...@@ -32,9 +30,7 @@ marvel_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs)
mb(); mb();
draina(); draina();
srm_printk("MARVEL MACHINE CHECK!!!\n"); /* HACK */
el_process_subpacket(el_ptr); el_process_subpacket(el_ptr);
srm_printk("...PROCESSED\n"); /* HACK */
switch(vector) { switch(vector) {
case SCB_Q_SYSEVENT: case SCB_Q_SYSEVENT:
...@@ -44,13 +40,12 @@ srm_printk("...PROCESSED\n"); /* HACK */ ...@@ -44,13 +40,12 @@ srm_printk("...PROCESSED\n"); /* HACK */
case SCB_Q_SYSERR: case SCB_Q_SYSERR:
printk(KERN_CRIT "MARVEL SYSMCHK/ERR %ld\n", vector); printk(KERN_CRIT "MARVEL SYSMCHK/ERR %ld\n", vector);
break; break;
default: /* don't know it - pass it up */ default:
/* Don't know it - pass it up. */
return ev7_machine_check(vector, la_ptr, regs); return ev7_machine_check(vector, la_ptr, regs);
} }
/* /* Release the logout frame. */
* Release the logout frame
*/
wrmces(0x7); wrmces(0x7);
mb(); mb();
} }
...@@ -60,4 +55,3 @@ marvel_register_error_handlers(void) ...@@ -60,4 +55,3 @@ marvel_register_error_handlers(void)
{ {
ev7_register_error_handlers(); ev7_register_error_handlers();
} }
#endif /* CONFIG_ALPHA_GENERIC || CONFIG_ALPHA_MARVEL */
...@@ -18,12 +18,6 @@ ...@@ -18,12 +18,6 @@
#include "err_impl.h" #include "err_impl.h"
#include "proto.h" #include "proto.h"
/*
* Titan generic
*/
#if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_TITAN)
static int static int
titan_parse_c_misc(u64 c_misc, int print) titan_parse_c_misc(u64 c_misc, int print)
...@@ -253,7 +247,7 @@ titan_parse_p_perror(int which, int port, u64 perror, int print) ...@@ -253,7 +247,7 @@ titan_parse_p_perror(int which, int port, u64 perror, int print)
if (perror & TITAN__PCHIP_PERROR__LOST) if (perror & TITAN__PCHIP_PERROR__LOST)
printk("%s Lost Error\n", err_print_prefix); printk("%s Lost Error\n", err_print_prefix);
printk("%s Command: 0x%x - %s\n" printk("%s Command: 0x%x - %s\n"
" Address: 0x%lx\n", " Address: 0x%lx\n",
err_print_prefix, err_print_prefix,
cmd, perror_cmd[cmd], cmd, perror_cmd[cmd],
addr); addr);
...@@ -336,7 +330,7 @@ titan_parse_p_agperror(int which, u64 agperror, int print) ...@@ -336,7 +330,7 @@ titan_parse_p_agperror(int which, u64 agperror, int print)
if (agperror & TITAN__PCHIP_AGPERROR__LOST) if (agperror & TITAN__PCHIP_AGPERROR__LOST)
printk("%s Lost Error\n", err_print_prefix); printk("%s Lost Error\n", err_print_prefix);
printk("%s Command: 0x%x - %s, %d Quadwords%s\n" printk("%s Command: 0x%x - %s, %d Quadwords%s\n"
" Address: 0x%lx\n", " Address: 0x%lx\n",
err_print_prefix, cmd, agperror_cmd[cmd], len, err_print_prefix, cmd, agperror_cmd[cmd], len,
(agperror & TITAN__PCHIP_AGPERROR__FENCE) ? ", FENCE" : "", (agperror & TITAN__PCHIP_AGPERROR__FENCE) ? ", FENCE" : "",
addr); addr);
...@@ -389,7 +383,7 @@ titan_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs) ...@@ -389,7 +383,7 @@ titan_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs)
((unsigned long)mchk_header + mchk_header->sys_offset); ((unsigned long)mchk_header + mchk_header->sys_offset);
u64 irqmask; u64 irqmask;
/* /*
* Mask of Titan interrupt sources which are reported as machine checks * Mask of Titan interrupt sources which are reported as machine checks
* *
* 63 - CChip Error * 63 - CChip Error
...@@ -545,7 +539,7 @@ el_process_regatta_subpacket(struct el_subpacket *header) ...@@ -545,7 +539,7 @@ el_process_regatta_subpacket(struct el_subpacket *header)
err_print_prefix, err_print_prefix,
(int)header->by_type.regatta_frame.cpuid); (int)header->by_type.regatta_frame.cpuid);
status = privateer_process_logout_frame((struct el_common *) status = privateer_process_logout_frame((struct el_common *)
header->by_type.regatta_frame.data_start, 1); header->by_type.regatta_frame.data_start, 1);
break; break;
default: default:
printk("%s ** REGATTA TYPE %d SUBPACKET\n", printk("%s ** REGATTA TYPE %d SUBPACKET\n",
...@@ -559,31 +553,25 @@ el_process_regatta_subpacket(struct el_subpacket *header) ...@@ -559,31 +553,25 @@ el_process_regatta_subpacket(struct el_subpacket *header)
} }
static struct el_subpacket_handler titan_subpacket_handler = static struct el_subpacket_handler titan_subpacket_handler =
SUBPACKET_HANDLER_INIT(EL_CLASS__REGATTA_FAMILY, SUBPACKET_HANDLER_INIT(EL_CLASS__REGATTA_FAMILY,
el_process_regatta_subpacket); el_process_regatta_subpacket);
void void
titan_register_error_handlers(void) titan_register_error_handlers(void)
{ {
int i; size_t i;
for(i = 0; for (i = 0; i < ARRAY_SIZE (el_titan_annotations); i++)
i < sizeof(el_titan_annotations)/sizeof(el_titan_annotations[1]);
i++) {
cdl_register_subpacket_annotation(&el_titan_annotations[i]); cdl_register_subpacket_annotation(&el_titan_annotations[i]);
}
cdl_register_subpacket_handler(&titan_subpacket_handler); cdl_register_subpacket_handler(&titan_subpacket_handler);
} }
#endif /* CONFIG_ALPHA_GENERIC || CONFIG_ALPHA_TITAN */
/* /*
* Privateer * Privateer
*/ */
#if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_TITAN)
static int static int
privateer_process_680_frame(struct el_common *mchk_header, int print) privateer_process_680_frame(struct el_common *mchk_header, int print)
{ {
...@@ -601,14 +589,14 @@ privateer_process_680_frame(struct el_common *mchk_header, int print) ...@@ -601,14 +589,14 @@ privateer_process_680_frame(struct el_common *mchk_header, int print)
/* TODO - decode instead of just dumping... */ /* TODO - decode instead of just dumping... */
printk("%s Summary Flags: %016lx\n" printk("%s Summary Flags: %016lx\n"
" CChip DIRx: %016lx\n" " CChip DIRx: %016lx\n"
" System Management IR: %016lx\n" " System Management IR: %016lx\n"
" CPU IR: %016lx\n" " CPU IR: %016lx\n"
" Power Supply IR: %016lx\n" " Power Supply IR: %016lx\n"
" LM78 Fault Status: %016lx\n" " LM78 Fault Status: %016lx\n"
" System Doors: %016lx\n" " System Doors: %016lx\n"
" Temperature Warning: %016lx\n" " Temperature Warning: %016lx\n"
" Fan Control: %016lx\n" " Fan Control: %016lx\n"
" Fatal Power Down Code: %016lx\n", " Fatal Power Down Code: %016lx\n",
err_print_prefix, err_print_prefix,
emchk->summary, emchk->summary,
emchk->c_dirx, emchk->c_dirx,
...@@ -632,7 +620,7 @@ privateer_process_logout_frame(struct el_common *mchk_header, int print) ...@@ -632,7 +620,7 @@ privateer_process_logout_frame(struct el_common *mchk_header, int print)
(struct el_common_EV6_mcheck *)mchk_header; (struct el_common_EV6_mcheck *)mchk_header;
int status = MCHK_DISPOSITION_UNKNOWN_ERROR; int status = MCHK_DISPOSITION_UNKNOWN_ERROR;
/* /*
* Machine check codes * Machine check codes
*/ */
#define PRIVATEER_MCHK__CORR_ECC 0x86 /* 630 */ #define PRIVATEER_MCHK__CORR_ECC 0x86 /* 630 */
...@@ -717,13 +705,13 @@ privateer_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs) ...@@ -717,13 +705,13 @@ privateer_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs)
#define PRIVATEER_HOTPLUG_INTERRUPT_MASK (0xE00UL) #define PRIVATEER_HOTPLUG_INTERRUPT_MASK (0xE00UL)
/* /*
* Sync the processor * Sync the processor.
*/ */
mb(); mb();
draina(); draina();
/* /*
* Only handle system events here * Only handle system events here.
*/ */
if (vector != SCB_Q_SYSEVENT) if (vector != SCB_Q_SYSEVENT)
return titan_machine_check(vector, la_ptr, regs); return titan_machine_check(vector, la_ptr, regs);
...@@ -742,23 +730,18 @@ privateer_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs) ...@@ -742,23 +730,18 @@ privateer_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs)
/* /*
* Convert any pending interrupts which report as 680 machine * Convert any pending interrupts which report as 680 machine
* checks to interrupts * checks to interrupts.
*/ */
irqmask = tmchk->c_dirx & PRIVATEER_680_INTERRUPT_MASK; irqmask = tmchk->c_dirx & PRIVATEER_680_INTERRUPT_MASK;
/* /*
* Dispatch the interrupt(s) * Dispatch the interrupt(s).
*/ */
titan_dispatch_irqs(irqmask, regs); titan_dispatch_irqs(irqmask, regs);
/* /*
* Release the logout frame * Release the logout frame.
*/ */
wrmces(0x7); wrmces(0x7);
mb(); mb();
} }
#endif /* CONFIG_ALPHA_GENERIC || CONFIG_ALPHA_TITAN */
/*
* linux/arch/alpha/kernel/gct.c
*/
#include <linux/config.h> #include <linux/config.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/types.h> #include <linux/types.h>
...@@ -12,32 +16,33 @@ gct6_find_nodes(gct6_node *node, gct6_search_struct *search) ...@@ -12,32 +16,33 @@ gct6_find_nodes(gct6_node *node, gct6_search_struct *search)
gct6_search_struct *wanted; gct6_search_struct *wanted;
int status = 0; int status = 0;
/* first check the magic number */ /* First check the magic number. */
if (node->magic != GCT_NODE_MAGIC) { if (node->magic != GCT_NODE_MAGIC) {
printk(KERN_ERR "GCT Node MAGIC incorrect - GCT invalid\n"); printk(KERN_ERR "GCT Node MAGIC incorrect - GCT invalid\n");
return -EINVAL; return -EINVAL;
} }
/* check against the search struct */ /* Check against the search struct. */
for(wanted = search; for (wanted = search;
wanted && (wanted->type | wanted->subtype); wanted && (wanted->type | wanted->subtype);
wanted++) { wanted++) {
if (node->type != wanted->type) continue; if (node->type != wanted->type)
if (node->subtype != wanted->subtype) continue; continue;
if (node->subtype != wanted->subtype)
/* found it -- call out */ continue;
if (wanted->callout) wanted->callout(node);
/* Found it -- call out. */
if (wanted->callout)
wanted->callout(node);
} }
/* now walk the tree, siblings first.. */ /* Now walk the tree, siblings first. */
if (node->next) if (node->next)
status |= gct6_find_nodes(GCT_NODE_PTR(node->next), search); status |= gct6_find_nodes(GCT_NODE_PTR(node->next), search);
/* then the children */ /* Then the children. */
if (node->child) if (node->child)
status |= gct6_find_nodes(GCT_NODE_PTR(node->child), search); status |= gct6_find_nodes(GCT_NODE_PTR(node->child), search);
return status; return status;
} }
...@@ -825,7 +825,7 @@ extern struct timezone sys_tz; ...@@ -825,7 +825,7 @@ extern struct timezone sys_tz;
extern int do_sys_settimeofday(struct timeval *tv, struct timezone *tz); extern int do_sys_settimeofday(struct timeval *tv, struct timezone *tz);
extern int do_getitimer(int which, struct itimerval *value); extern int do_getitimer(int which, struct itimerval *value);
extern int do_setitimer(int which, struct itimerval *, struct itimerval *); extern int do_setitimer(int which, struct itimerval *, struct itimerval *);
asmlinkage int sys_utimes(char *, struct timeval *); extern asmlinkage int sys_utimes(char *, struct timeval *);
extern int do_adjtimex(struct timex *); extern int do_adjtimex(struct timex *);
struct timeval32 struct timeval32
......
...@@ -150,6 +150,9 @@ struct pci_iommu_arena ...@@ -150,6 +150,9 @@ struct pci_iommu_arena
extern struct pci_controller *hose_head, **hose_tail; extern struct pci_controller *hose_head, **hose_tail;
extern struct pci_controller *pci_isa_hose; extern struct pci_controller *pci_isa_hose;
/* Indicate that we trust the console to configure things properly. */
extern int pci_probe_only;
extern void common_init_pci(void); extern void common_init_pci(void);
extern u8 common_swizzle(struct pci_dev *, u8 *); extern u8 common_swizzle(struct pci_dev *, u8 *);
extern struct pci_controller *alloc_pci_controller(void); extern struct pci_controller *alloc_pci_controller(void);
......
#include <linux/config.h> #include <linux/config.h>
/* Prototypes of functions used across modules here in this directory. */ /* Prototypes of functions used across modules here in this directory. */
#define vucp volatile unsigned char * #define vucp volatile unsigned char *
...@@ -52,6 +54,10 @@ extern int marvel_cpuid_to_nid(int); ...@@ -52,6 +54,10 @@ extern int marvel_cpuid_to_nid(int);
extern unsigned long marvel_node_mem_start(int); extern unsigned long marvel_node_mem_start(int);
extern unsigned long marvel_node_mem_size(int); extern unsigned long marvel_node_mem_size(int);
extern int marvel_srmcons_allowed(void); extern int marvel_srmcons_allowed(void);
extern struct _alpha_agp_info *marvel_agp_info(void);
struct io7 *marvel_find_io7(int pe);
struct io7 *marvel_next_io7(struct io7 *prev);
void io7_clear_errors(struct io7 *io7);
/* core_mcpcia.c */ /* core_mcpcia.c */
extern struct pci_ops mcpcia_pci_ops; extern struct pci_ops mcpcia_pci_ops;
...@@ -80,6 +86,7 @@ extern void titan_init_arch(void); ...@@ -80,6 +86,7 @@ extern void titan_init_arch(void);
extern void titan_kill_arch(int); extern void titan_kill_arch(int);
extern void titan_machine_check(u64, u64, struct pt_regs *); extern void titan_machine_check(u64, u64, struct pt_regs *);
extern void titan_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); extern void titan_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
extern struct _alpha_agp_info *titan_agp_info(void);
/* core_tsunami.c */ /* core_tsunami.c */
extern struct pci_ops tsunami_pci_ops; extern struct pci_ops tsunami_pci_ops;
...@@ -161,6 +168,9 @@ extern int ptrace_cancel_bpt (struct task_struct *child); ...@@ -161,6 +168,9 @@ extern int ptrace_cancel_bpt (struct task_struct *child);
extern void dik_show_regs(struct pt_regs *regs, unsigned long *r9_15); extern void dik_show_regs(struct pt_regs *regs, unsigned long *r9_15);
extern void die_if_kernel(char *, struct pt_regs *, long, unsigned long *); extern void die_if_kernel(char *, struct pt_regs *, long, unsigned long *);
/* sys_titan.c */
extern void titan_dispatch_irqs(u64, struct pt_regs *);
/* ../mm/init.c */ /* ../mm/init.c */
extern void switch_to_system_map(void); extern void switch_to_system_map(void);
extern void srm_paging_stop(void); extern void srm_paging_stop(void);
......
...@@ -290,7 +290,7 @@ setup_memory(void *kernel_end) ...@@ -290,7 +290,7 @@ setup_memory(void *kernel_end)
(hwrpb->mddt_offset + (unsigned long) hwrpb); (hwrpb->mddt_offset + (unsigned long) hwrpb);
for_each_mem_cluster(memdesc, cluster, i) { for_each_mem_cluster(memdesc, cluster, i) {
printk("memcluster %d, usage %01lx, start %8lu, end %8lu\n", printk("memcluster %lu, usage %01lx, start %8lu, end %8lu\n",
i, cluster->usage, cluster->start_pfn, i, cluster->usage, cluster->start_pfn,
cluster->start_pfn + cluster->numpages); cluster->start_pfn + cluster->numpages);
......
...@@ -83,7 +83,6 @@ cycles_t cacheflush_time; ...@@ -83,7 +83,6 @@ cycles_t cacheflush_time;
unsigned long cache_decay_ticks; unsigned long cache_decay_ticks;
extern void calibrate_delay(void); extern void calibrate_delay(void);
extern asmlinkage void entInt(void);
......
/* /*
* linux/arch/alpha/kernel/sys_io7.c * linux/arch/alpha/kernel/sys_marvel.c
* *
* Marvel / IO7 support * Marvel / IO7 support
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/mm.h> #include <linux/mm.h>
...@@ -30,15 +31,7 @@ ...@@ -30,15 +31,7 @@
/* /*
* private functions in core_marvel.c * Interrupt handling.
*/
struct io7 *marvel_find_io7(int pe);
struct io7 *marvel_next_io7(struct io7 *prev);
void io7_clear_errors(struct io7 *io7);
/*
* Interrupt handling
*/ */
#define IRQ_VEC_PE_SHIFT (10) #define IRQ_VEC_PE_SHIFT (10)
#define IRQ_VEC_IRQ_MASK ((1 << IRQ_VEC_PE_SHIFT) - 1) #define IRQ_VEC_IRQ_MASK ((1 << IRQ_VEC_PE_SHIFT) - 1)
...@@ -161,12 +154,14 @@ io7_end_irq(unsigned int irq) ...@@ -161,12 +154,14 @@ io7_end_irq(unsigned int irq)
io7_enable_irq(irq); io7_enable_irq(irq);
} }
static void marvel_irq_noop(unsigned int irq) static void
marvel_irq_noop(unsigned int irq)
{ {
return; return;
} }
static unsigned int marvel_irq_noop_return(unsigned int irq) static unsigned int
marvel_irq_noop_return(unsigned int irq)
{ {
return 0; return 0;
} }
...@@ -291,7 +286,7 @@ init_io7_irqs(struct io7 *io7, ...@@ -291,7 +286,7 @@ init_io7_irqs(struct io7 *io7,
* traverse the mesh, but if it's not an SMP kernel, they have to * traverse the mesh, but if it's not an SMP kernel, they have to
* go to the boot CPU. Send them all to the boot CPU for now, * go to the boot CPU. Send them all to the boot CPU for now,
* as each secondary starts, it can redirect it's local device * as each secondary starts, it can redirect it's local device
* interrupts * interrupts.
*/ */
printk(" Interrupts reported to CPU at PE %u\n", boot_cpuid); printk(" Interrupts reported to CPU at PE %u\n", boot_cpuid);
...@@ -304,27 +299,27 @@ init_io7_irqs(struct io7 *io7, ...@@ -304,27 +299,27 @@ init_io7_irqs(struct io7 *io7,
io7_redirect_irq(io7, &io7->csrs->STV_CTL.csr, boot_cpuid); io7_redirect_irq(io7, &io7->csrs->STV_CTL.csr, boot_cpuid);
io7_redirect_irq(io7, &io7->csrs->HEI_CTL.csr, boot_cpuid); io7_redirect_irq(io7, &io7->csrs->HEI_CTL.csr, boot_cpuid);
/* set up the lsi irqs */ /* Set up the lsi irqs. */
for(i = 0; i < 128; ++i) { for (i = 0; i < 128; ++i) {
irq_desc[base + i].status = IRQ_DISABLED | IRQ_LEVEL; irq_desc[base + i].status = IRQ_DISABLED | IRQ_LEVEL;
irq_desc[base + i].handler = lsi_ops; irq_desc[base + i].handler = lsi_ops;
} }
/* disable the implemented irqs in hardware */ /* Disable the implemented irqs in hardware. */
for(i = 0; i < 0x60; ++i) for (i = 0; i < 0x60; ++i)
init_one_io7_lsi(io7, i, boot_cpuid); init_one_io7_lsi(io7, i, boot_cpuid);
init_one_io7_lsi(io7, 0x74, boot_cpuid); init_one_io7_lsi(io7, 0x74, boot_cpuid);
init_one_io7_lsi(io7, 0x75, boot_cpuid); init_one_io7_lsi(io7, 0x75, boot_cpuid);
/* set up the msi irqs */ /* Set up the msi irqs. */
for(i = 128; i < (128 + 512); ++i) { for (i = 128; i < (128 + 512); ++i) {
irq_desc[base + i].status = IRQ_DISABLED | IRQ_LEVEL; irq_desc[base + i].status = IRQ_DISABLED | IRQ_LEVEL;
irq_desc[base + i].handler = msi_ops; irq_desc[base + i].handler = msi_ops;
} }
for(i = 0; i < 16; ++i) for (i = 0; i < 16; ++i)
init_one_io7_msi(io7, i, boot_cpuid); init_one_io7_msi(io7, i, boot_cpuid);
spin_unlock(&io7->irq_lock); spin_unlock(&io7->irq_lock);
...@@ -336,16 +331,15 @@ marvel_init_irq(void) ...@@ -336,16 +331,15 @@ marvel_init_irq(void)
int i; int i;
struct io7 *io7 = NULL; struct io7 *io7 = NULL;
/* reserve the legacy irqs */ /* Reserve the legacy irqs. */
for(i = 0; i < 16; ++i) { for (i = 0; i < 16; ++i) {
irq_desc[i].status = IRQ_DISABLED; irq_desc[i].status = IRQ_DISABLED;
irq_desc[i].handler = &marvel_legacy_irq_type; irq_desc[i].handler = &marvel_legacy_irq_type;
} }
/* init the io7 irqs */ /* Init the io7 irqs. */
for(io7 = NULL; (io7 = marvel_next_io7(io7)) != NULL; ) { for (io7 = NULL; (io7 = marvel_next_io7(io7)) != NULL; )
init_io7_irqs(io7, &io7_lsi_irq_type, &io7_msi_irq_type); init_io7_irqs(io7, &io7_lsi_irq_type, &io7_msi_irq_type);
}
} }
static int static int
...@@ -401,7 +395,6 @@ marvel_map_irq(struct pci_dev *dev, u8 slot, u8 pin) ...@@ -401,7 +395,6 @@ marvel_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
printk(" forcing LSI interrupt on irq %d [0x%x]\n", irq, irq); printk(" forcing LSI interrupt on irq %d [0x%x]\n", irq, irq);
#endif #endif
} }
irq += 16; /* offset for legacy */ irq += 16; /* offset for legacy */
...@@ -413,7 +406,6 @@ marvel_map_irq(struct pci_dev *dev, u8 slot, u8 pin) ...@@ -413,7 +406,6 @@ marvel_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
static void __init static void __init
marvel_init_pci(void) marvel_init_pci(void)
{ {
extern int pci_probe_only;
struct io7 *io7; struct io7 *io7;
marvel_register_error_handlers(); marvel_register_error_handlers();
...@@ -425,8 +417,8 @@ marvel_init_pci(void) ...@@ -425,8 +417,8 @@ marvel_init_pci(void)
locate_and_init_vga(NULL); locate_and_init_vga(NULL);
#endif #endif
/* clear any io7 errors */ /* Clear any io7 errors. */
for(io7 = NULL; (io7 = marvel_next_io7(io7)) != NULL; ) for (io7 = NULL; (io7 = marvel_next_io7(io7)) != NULL; )
io7_clear_errors(io7); io7_clear_errors(io7);
} }
...@@ -443,37 +435,36 @@ marvel_smp_callin(void) ...@@ -443,37 +435,36 @@ marvel_smp_callin(void)
struct io7 *io7 = marvel_find_io7(cpuid); struct io7 *io7 = marvel_find_io7(cpuid);
unsigned int i; unsigned int i;
if (io7) { if (!io7)
/* return;
* There is a local IO7 - redirect all of it's interrupts here
*/ /*
printk("Redirecting IO7 interrupts to local CPU at PE %u\n", * There is a local IO7 - redirect all of it's interrupts here.
cpuid); */
printk("Redirecting IO7 interrupts to local CPU at PE %u\n", cpuid);
/* redirect the error IRQS here */
io7_redirect_irq(io7, &io7->csrs->HLT_CTL.csr, cpuid); /* Redirect the error IRQS here. */
io7_redirect_irq(io7, &io7->csrs->HPI_CTL.csr, cpuid); io7_redirect_irq(io7, &io7->csrs->HLT_CTL.csr, cpuid);
io7_redirect_irq(io7, &io7->csrs->CRD_CTL.csr, cpuid); io7_redirect_irq(io7, &io7->csrs->HPI_CTL.csr, cpuid);
io7_redirect_irq(io7, &io7->csrs->STV_CTL.csr, cpuid); io7_redirect_irq(io7, &io7->csrs->CRD_CTL.csr, cpuid);
io7_redirect_irq(io7, &io7->csrs->HEI_CTL.csr, cpuid); io7_redirect_irq(io7, &io7->csrs->STV_CTL.csr, cpuid);
io7_redirect_irq(io7, &io7->csrs->HEI_CTL.csr, cpuid);
/* redirect the implemented LSIs here */
for(i = 0; i < 0x60; ++i) /* Redirect the implemented LSIs here. */
io7_redirect_one_lsi(io7, i, cpuid); for (i = 0; i < 0x60; ++i)
io7_redirect_one_lsi(io7, i, cpuid);
io7_redirect_one_lsi(io7, 0x74, cpuid);
io7_redirect_one_lsi(io7, 0x75, cpuid); io7_redirect_one_lsi(io7, 0x74, cpuid);
io7_redirect_one_lsi(io7, 0x75, cpuid);
/* redirect the MSIs here */
for(i = 0; i < 16; ++i) /* Redirect the MSIs here. */
io7_redirect_one_msi(io7, i, cpuid); for (i = 0; i < 16; ++i)
} io7_redirect_one_msi(io7, i, cpuid);
} }
/* /*
* System Vectors * System Vectors
*/ */
extern void *marvel_agp_info(void);
struct alpha_machine_vector marvel_ev7_mv __initmv = { struct alpha_machine_vector marvel_ev7_mv __initmv = {
.vector_name = "MARVEL/EV7", .vector_name = "MARVEL/EV7",
DO_EV7_MMU, DO_EV7_MMU,
...@@ -506,5 +497,3 @@ struct alpha_machine_vector marvel_ev7_mv __initmv = { ...@@ -506,5 +497,3 @@ struct alpha_machine_vector marvel_ev7_mv __initmv = {
.node_mem_size = marvel_node_mem_size, .node_mem_size = marvel_node_mem_size,
}; };
ALIAS_MV(marvel_ev7) ALIAS_MV(marvel_ev7)
...@@ -187,7 +187,7 @@ static void __init ...@@ -187,7 +187,7 @@ static void __init
init_titan_irqs(struct hw_interrupt_type * ops, int imin, int imax) init_titan_irqs(struct hw_interrupt_type * ops, int imin, int imax)
{ {
long i; long i;
for(i = imin; i <= imax; ++i) { for (i = imin; i <= imax; ++i) {
irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
irq_desc[i].handler = ops; irq_desc[i].handler = ops;
} }
...@@ -255,7 +255,7 @@ titan_dispatch_irqs(u64 mask, struct pt_regs *regs) ...@@ -255,7 +255,7 @@ titan_dispatch_irqs(u64 mask, struct pt_regs *regs)
/* /*
* Dispatch all requested interrupts * Dispatch all requested interrupts
*/ */
while(mask) { while (mask) {
/* convert to SRM vector... priority is <63> -> <0> */ /* convert to SRM vector... priority is <63> -> <0> */
__asm__("ctlz %1, %0" : "=r"(vector) : "r"(mask)); __asm__("ctlz %1, %0" : "=r"(vector) : "r"(mask));
vector = 63 - vector; vector = 63 - vector;
...@@ -291,12 +291,12 @@ titan_late_init(void) ...@@ -291,12 +291,12 @@ titan_late_init(void)
"PChip 1 C_Error", NULL); "PChip 1 C_Error", NULL);
/* /*
* Register our error handlers * Register our error handlers.
*/ */
titan_register_error_handlers(); titan_register_error_handlers();
/* /*
* Check if the console left us any error logs * Check if the console left us any error logs.
*/ */
cdl_check_console_data_log(); cdl_check_console_data_log();
...@@ -308,23 +308,21 @@ titan_map_irq(struct pci_dev *dev, u8 slot, u8 pin) ...@@ -308,23 +308,21 @@ titan_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
u8 intline; u8 intline;
int irq; int irq;
/* get the current intline */ /* Get the current intline. */
pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &intline); pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &intline);
irq = intline; irq = intline;
/* is it explicitly routed through ISA? */ /* Is it explicitly routed through ISA? */
if ((irq & 0xF0) == 0xE0) if ((irq & 0xF0) == 0xE0)
return irq; return irq;
/* offset by 16 to make room for ISA interrupts 0 - 15 */ /* Offset by 16 to make room for ISA interrupts 0 - 15. */
return irq + 16; return irq + 16;
} }
static void __init static void __init
titan_init_pci(void) titan_init_pci(void)
{ {
extern int pci_probe_only;
/* /*
* This isn't really the right place, but there's some init * This isn't really the right place, but there's some init
* that needs to be done after everything is basically up. * that needs to be done after everything is basically up.
...@@ -348,7 +346,7 @@ privateer_init_pci(void) ...@@ -348,7 +346,7 @@ privateer_init_pci(void)
{ {
/* /*
* Hook a couple of extra err interrupts that the * Hook a couple of extra err interrupts that the
* common titan code won't * common titan code won't.
*/ */
request_irq(53+16, titan_intr_nop, SA_INTERRUPT, request_irq(53+16, titan_intr_nop, SA_INTERRUPT,
"NMI", NULL); "NMI", NULL);
...@@ -356,20 +354,15 @@ privateer_init_pci(void) ...@@ -356,20 +354,15 @@ privateer_init_pci(void)
"Temperature Warning", NULL); "Temperature Warning", NULL);
/* /*
* Finish with the common version * Finish with the common version.
*/ */
return titan_init_pci(); return titan_init_pci();
} }
/* /*
* The System Vectors * The System Vectors.
*/ */
#if defined(CONFIG_ALPHA_CORE_AGP)
extern void *titan_agp_info(void);
#endif
struct alpha_machine_vector titan_mv __initmv = { struct alpha_machine_vector titan_mv __initmv = {
.vector_name = "TITAN", .vector_name = "TITAN",
DO_EV6_MMU, DO_EV6_MMU,
...@@ -385,9 +378,7 @@ struct alpha_machine_vector titan_mv __initmv = { ...@@ -385,9 +378,7 @@ struct alpha_machine_vector titan_mv __initmv = {
.nr_irqs = 80, /* 64 + 16 */ .nr_irqs = 80, /* 64 + 16 */
/* device_interrupt will be filled in by titan_init_irq */ /* device_interrupt will be filled in by titan_init_irq */
#if defined(CONFIG_ALPHA_CORE_AGP)
.agp_info = titan_agp_info, .agp_info = titan_agp_info,
#endif
.init_arch = titan_init_arch, .init_arch = titan_init_arch,
.init_irq = titan_legacy_init_irq, .init_irq = titan_legacy_init_irq,
...@@ -415,9 +406,7 @@ struct alpha_machine_vector privateer_mv __initmv = { ...@@ -415,9 +406,7 @@ struct alpha_machine_vector privateer_mv __initmv = {
.nr_irqs = 80, /* 64 + 16 */ .nr_irqs = 80, /* 64 + 16 */
/* device_interrupt will be filled in by titan_init_irq */ /* device_interrupt will be filled in by titan_init_irq */
#if defined(CONFIG_ALPHA_CORE_AGP)
.agp_info = titan_agp_info, .agp_info = titan_agp_info,
#endif
.init_arch = titan_init_arch, .init_arch = titan_init_arch,
.init_irq = titan_legacy_init_irq, .init_irq = titan_legacy_init_irq,
...@@ -430,4 +419,3 @@ struct alpha_machine_vector privateer_mv __initmv = { ...@@ -430,4 +419,3 @@ struct alpha_machine_vector privateer_mv __initmv = {
}; };
/* No alpha_mv alias for privateer since we compile it /* No alpha_mv alias for privateer since we compile it
in unconditionally with titan; setup_arch knows how to cope. */ in unconditionally with titan; setup_arch knows how to cope. */
...@@ -118,7 +118,7 @@ dik_show_trace(unsigned long *sp) ...@@ -118,7 +118,7 @@ dik_show_trace(unsigned long *sp)
long i = 0; long i = 0;
printk("Trace:"); printk("Trace:");
while (0x1ff8 & (unsigned long) sp) { while (0x1ff8 & (unsigned long) sp) {
extern unsigned long _stext, _etext; extern char _stext[], _etext[];
unsigned long tmp = *sp; unsigned long tmp = *sp;
sp++; sp++;
if (tmp < (unsigned long) &_stext) if (tmp < (unsigned long) &_stext)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment