Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 57787
b: refs/heads/master
c: 17ee4f4
h: refs/heads/master
i:
  57785: 23b63c1
  57783: 4544540
v: v3
  • Loading branch information
Jens Axboe committed Jun 15, 2007
1 parent 1be7b53 commit fe1d93c
Show file tree
Hide file tree
Showing 23 changed files with 129 additions and 294 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3ea88d6738ebda95e05ada0c7b72f224d0a36953
refs/heads/master: 17ee4f49ab2c802c7818fa71c4e7e351a7230b86
1 change: 0 additions & 1 deletion trunk/arch/avr32/boards/atstk1000/atstk1002.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ static struct spi_board_info spi0_board_info[] __initdata = {
.modalias = "ltv350qv",
.max_speed_hz = 16000000,
.chip_select = 1,
.mode = SPI_MODE_3,
},
};

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/avr32/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ asmlinkage void do_page_fault(unsigned long ecr, struct pt_regs *regs)
up_read(&mm->mmap_sem);

if (user_mode(regs)) {
if (exception_trace && printk_ratelimit())
if (exception_trace)
printk("%s%s[%d]: segfault at %08lx pc %08lx "
"sp %08lx ecr %lu\n",
is_init(tsk) ? KERN_EMERG : KERN_INFO,
Expand Down
12 changes: 6 additions & 6 deletions trunk/arch/mips/kernel/smp-mt.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,13 @@ static irqreturn_t ipi_call_interrupt(int irq, void *dev_id)

static struct irqaction irq_resched = {
.handler = ipi_resched_interrupt,
.flags = IRQF_DISABLED|IRQF_PERCPU,
.flags = IRQF_DISABLED,
.name = "IPI_resched"
};

static struct irqaction irq_call = {
.handler = ipi_call_interrupt,
.flags = IRQF_DISABLED|IRQF_PERCPU,
.flags = IRQF_DISABLED,
.name = "IPI_call"
};

Expand Down Expand Up @@ -275,7 +275,10 @@ void __init plat_prepare_cpus(unsigned int max_cpus)
setup_irq(cpu_ipi_resched_irq, &irq_resched);
setup_irq(cpu_ipi_call_irq, &irq_call);

/* need to mark IPI's as IRQ_PER_CPU */
irq_desc[cpu_ipi_resched_irq].status |= IRQ_PER_CPU;
set_irq_handler(cpu_ipi_resched_irq, handle_percpu_irq);
irq_desc[cpu_ipi_call_irq].status |= IRQ_PER_CPU;
set_irq_handler(cpu_ipi_call_irq, handle_percpu_irq);
}

Expand Down Expand Up @@ -323,11 +326,8 @@ void prom_boot_secondary(int cpu, struct task_struct *idle)

void prom_init_secondary(void)
{
/* Enable per-cpu interrupts */

/* This is Malta specific: IPI,performance and timer inetrrupts */
write_c0_status((read_c0_status() & ~ST0_IM ) |
(STATUSF_IP0 | STATUSF_IP1 | STATUSF_IP6 | STATUSF_IP7));
(STATUSF_IP0 | STATUSF_IP1 | STATUSF_IP7));
}

void prom_smp_finish(void)
Expand Down
44 changes: 13 additions & 31 deletions trunk/arch/mips/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,44 +199,26 @@ int (*perf_irq)(void) = null_perf_irq;
EXPORT_SYMBOL(null_perf_irq);
EXPORT_SYMBOL(perf_irq);

/*
* Performance counter IRQ or -1 if shared with timer
*/
int mipsxx_perfcount_irq;
EXPORT_SYMBOL(mipsxx_perfcount_irq);

/*
* Possibly handle a performance counter interrupt.
* Return true if the timer interrupt should not be checked
*/
static inline int handle_perf_irq (int r2)
{
/*
* The performance counter overflow interrupt may be shared with the
* timer interrupt (mipsxx_perfcount_irq < 0). If it is and a
* performance counter has overflowed (perf_irq() == IRQ_HANDLED)
* and we can't reliably determine if a counter interrupt has also
* happened (!r2) then don't check for a timer interrupt.
*/
return (mipsxx_perfcount_irq < 0) &&
perf_irq() == IRQ_HANDLED &&
!r2;
}

asmlinkage void ll_timer_interrupt(int irq)
{
int r2 = cpu_has_mips_r2;

irq_enter();
kstat_this_cpu.irqs[irq]++;

if (handle_perf_irq(r2))
goto out;

if (r2 && ((read_c0_cause() & (1 << 30)) == 0))
goto out;
/*
* Suckage alert:
* Before R2 of the architecture there was no way to see if a
* performance counter interrupt was pending, so we have to run the
* performance counter interrupt handler anyway.
*/
if (!r2 || (read_c0_cause() & (1 << 26)))
if (perf_irq())
goto out;

timer_interrupt(irq, NULL);
/* we keep interrupt disabled all the time */
if (!r2 || (read_c0_cause() & (1 << 30)))
timer_interrupt(irq, NULL);

out:
irq_exit();
Expand Down Expand Up @@ -276,7 +258,7 @@ unsigned int mips_hpt_frequency;

static struct irqaction timer_irqaction = {
.handler = timer_interrupt,
.flags = IRQF_DISABLED | IRQF_PERCPU,
.flags = IRQF_DISABLED,
.name = "timer",
};

Expand Down
62 changes: 18 additions & 44 deletions trunk/arch/mips/mips-boards/generic/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ int *_prom_argv, *_prom_envp;

int init_debug = 0;

int mips_revision_corid;
int mips_revision_sconid;
unsigned int mips_revision_corid;

/* Bonito64 system controller register base. */
unsigned long _pcictrl_bonito;
Expand Down Expand Up @@ -276,38 +275,13 @@ void __init prom_init(void)
else
mips_revision_corid = MIPS_REVISION_CORID_CORE_EMUL_MSC;
}

mips_revision_sconid = MIPS_REVISION_SCONID;
if (mips_revision_sconid == MIPS_REVISION_SCON_OTHER) {
switch (mips_revision_corid) {
case MIPS_REVISION_CORID_QED_RM5261:
case MIPS_REVISION_CORID_CORE_LV:
case MIPS_REVISION_CORID_CORE_FPGA:
case MIPS_REVISION_CORID_CORE_FPGAR2:
mips_revision_sconid = MIPS_REVISION_SCON_GT64120;
break;
case MIPS_REVISION_CORID_CORE_EMUL_BON:
case MIPS_REVISION_CORID_BONITO64:
case MIPS_REVISION_CORID_CORE_20K:
mips_revision_sconid = MIPS_REVISION_SCON_BONITO;
break;
case MIPS_REVISION_CORID_CORE_MSC:
case MIPS_REVISION_CORID_CORE_FPGA2:
case MIPS_REVISION_CORID_CORE_FPGA3:
case MIPS_REVISION_CORID_CORE_24K:
case MIPS_REVISION_CORID_CORE_EMUL_MSC:
mips_revision_sconid = MIPS_REVISION_SCON_SOCIT;
break;
default:
mips_display_message("CC Error");
while (1); /* We die here... */
}
}

switch (mips_revision_sconid) {
switch(mips_revision_corid) {
u32 start, map, mask, data;

case MIPS_REVISION_SCON_GT64120:
case MIPS_REVISION_CORID_QED_RM5261:
case MIPS_REVISION_CORID_CORE_LV:
case MIPS_REVISION_CORID_CORE_FPGA:
case MIPS_REVISION_CORID_CORE_FPGAR2:
/*
* Setup the North bridge to do Master byte-lane swapping
* when running in bigendian.
Expand All @@ -331,7 +305,9 @@ void __init prom_init(void)
set_io_port_base(MALTA_GT_PORT_BASE);
break;

case MIPS_REVISION_SCON_BONITO:
case MIPS_REVISION_CORID_CORE_EMUL_BON:
case MIPS_REVISION_CORID_BONITO64:
case MIPS_REVISION_CORID_CORE_20K:
_pcictrl_bonito_pcicfg = (unsigned long)ioremap(BONITO_PCICFG_BASE, BONITO_PCICFG_SIZE);

/*
Expand All @@ -358,10 +334,13 @@ void __init prom_init(void)
set_io_port_base(MALTA_BONITO_PORT_BASE);
break;

case MIPS_REVISION_SCON_SOCIT:
case MIPS_REVISION_SCON_ROCIT:
case MIPS_REVISION_CORID_CORE_MSC:
case MIPS_REVISION_CORID_CORE_FPGA2:
case MIPS_REVISION_CORID_CORE_FPGA3:
case MIPS_REVISION_CORID_CORE_24K:
case MIPS_REVISION_CORID_CORE_EMUL_MSC:
_pcictrl_msc = (unsigned long)ioremap(MIPS_MSC01_PCI_REG_BASE, 0x2000);
mips_pci_controller:

mb();
MSC_READ(MSC01_PCI_CFG, data);
MSC_WRITE(MSC01_PCI_CFG, data & ~MSC01_PCI_CFG_EN_BIT);
Expand Down Expand Up @@ -395,15 +374,10 @@ void __init prom_init(void)
set_io_port_base(MALTA_MSC_PORT_BASE);
break;

case MIPS_REVISION_SCON_SOCITSC:
case MIPS_REVISION_SCON_SOCITSCP:
_pcictrl_msc = (unsigned long)ioremap(MIPS_SOCITSC_PCI_REG_BASE, 0x2000);
goto mips_pci_controller;

default:
/* Unknown system controller */
mips_display_message("SC Error");
while (1); /* We die here... */
/* Unknown Core card */
mips_display_message("CC Error");
while(1); /* We die here... */
}
#endif
board_nmi_handler_setup = mips_nmi_setup;
Expand Down
20 changes: 13 additions & 7 deletions trunk/arch/mips/mips-boards/generic/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,11 @@ void __init mips_pcibios_init(void)
struct pci_controller *controller;
resource_size_t start, end, map, start1, end1, map1, map2, map3, mask;

switch (mips_revision_sconid) {
case MIPS_REVISION_SCON_GT64120:
switch (mips_revision_corid) {
case MIPS_REVISION_CORID_QED_RM5261:
case MIPS_REVISION_CORID_CORE_LV:
case MIPS_REVISION_CORID_CORE_FPGA:
case MIPS_REVISION_CORID_CORE_FPGAR2:
/*
* Due to a bug in the Galileo system controller, we need
* to setup the PCI BAR for the Galileo internal registers.
Expand Down Expand Up @@ -158,7 +161,9 @@ void __init mips_pcibios_init(void)
controller = &gt64120_controller;
break;

case MIPS_REVISION_SCON_BONITO:
case MIPS_REVISION_CORID_BONITO64:
case MIPS_REVISION_CORID_CORE_20K:
case MIPS_REVISION_CORID_CORE_EMUL_BON:
/* Set up resource ranges from the controller's registers. */
map = BONITO_PCIMAP;
map1 = (BONITO_PCIMAP & BONITO_PCIMAP_PCIMAP_LO0) >>
Expand Down Expand Up @@ -190,10 +195,11 @@ void __init mips_pcibios_init(void)
controller = &bonito64_controller;
break;

case MIPS_REVISION_SCON_SOCIT:
case MIPS_REVISION_SCON_ROCIT:
case MIPS_REVISION_SCON_SOCITSC:
case MIPS_REVISION_SCON_SOCITSCP:
case MIPS_REVISION_CORID_CORE_MSC:
case MIPS_REVISION_CORID_CORE_FPGA2:
case MIPS_REVISION_CORID_CORE_FPGA3:
case MIPS_REVISION_CORID_CORE_24K:
case MIPS_REVISION_CORID_CORE_EMUL_MSC:
/* Set up resource ranges from the controller's registers. */
MSC_READ(MSC01_PCI_SC2PMBASL, start);
MSC_READ(MSC01_PCI_SC2PMMSKL, mask);
Expand Down
Loading

0 comments on commit fe1d93c

Please sign in to comment.