Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73876
b: refs/heads/master
c: adea27f
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Nov 16, 2007
1 parent 632c7e2 commit 4e61825
Show file tree
Hide file tree
Showing 48 changed files with 339 additions and 239 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: 7799652557d966e49512479f4d3b9079bbc01fff
refs/heads/master: adea27f4ba29200c989194a3f6214b652d009e83
3 changes: 0 additions & 3 deletions trunk/arch/avr32/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ config AVR32
There is an AVR32 Linux project with a web page at
http://avr32linux.org/.

config UID16
bool

config GENERIC_GPIO
bool
default y
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/avr32/mach-at32ap/at32ap7000.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ static struct resource at32ap700x_rtc0_resource[] = {
static struct resource at32_wdt0_resource[] = {
{
.start = 0xfff000b0,
.end = 0xfff000bf,
.end = 0xfff000cf,
.flags = IORESOURCE_MEM,
},
};
Expand Down Expand Up @@ -690,7 +690,7 @@ static struct resource atmel_usart0_resource[] = {
IRQ(6),
};
DEFINE_DEV_DATA(atmel_usart, 0);
DEV_CLK(usart, atmel_usart0, pba, 4);
DEV_CLK(usart, atmel_usart0, pba, 3);

static struct atmel_uart_data atmel_usart1_data = {
.use_dma_tx = 1,
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/avr32/mach-at32ap/hsmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#define DEBUG
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/init.h>
Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/avr32/mach-at32ap/intc.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <linux/irq.h>
#include <linux/platform_device.h>

#include <asm/intc.h>
#include <asm/io.h>

#include "intc.h"
Expand Down Expand Up @@ -136,7 +137,8 @@ void __init init_IRQ(void)
panic("Interrupt controller initialization failed!\n");
}

unsigned long intc_get_pending(int group)
unsigned long intc_get_pending(unsigned int group)
{
return intc_readl(&intc0, INTREQ0 + 4 * group);
}
EXPORT_SYMBOL_GPL(intc_get_pending);
11 changes: 1 addition & 10 deletions trunk/arch/mips/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -361,10 +361,10 @@ config QEMU
select PCSPEAKER
select SWAP_IO_SPACE
select SYS_HAS_CPU_MIPS32_R1
select SYS_HAS_EARLY_PRINTK
select SYS_SUPPORTS_32BIT_KERNEL
select SYS_SUPPORTS_BIG_ENDIAN
select SYS_SUPPORTS_LITTLE_ENDIAN
select ARCH_SPARSEMEM_ENABLE
select GENERIC_HARDIRQS_NO__DO_IRQ
select NR_CPUS_DEFAULT_1
select SYS_SUPPORTS_SMP
Expand Down Expand Up @@ -1409,7 +1409,6 @@ config MIPS_MT_SMP
depends on SYS_SUPPORTS_MULTITHREADING
select CPU_MIPSR2_IRQ_VI
select CPU_MIPSR2_IRQ_EI
select CPU_MIPSR2_SRS
select MIPS_MT
select NR_CPUS_DEFAULT_2
select SMP
Expand All @@ -1426,7 +1425,6 @@ config MIPS_MT_SMTC
select GENERIC_CLOCKEVENTS_BROADCAST
select CPU_MIPSR2_IRQ_VI
select CPU_MIPSR2_IRQ_EI
select CPU_MIPSR2_SRS
select MIPS_MT
select NR_CPUS_DEFAULT_8
select SMP
Expand All @@ -1453,7 +1451,6 @@ config MIPS_VPE_LOADER
depends on SYS_SUPPORTS_MULTITHREADING
select CPU_MIPSR2_IRQ_VI
select CPU_MIPSR2_IRQ_EI
select CPU_MIPSR2_SRS
select MIPS_MT
help
Includes a loader for loading an elf relocatable object
Expand Down Expand Up @@ -1582,12 +1579,6 @@ config CPU_MIPSR2_IRQ_VI
config CPU_MIPSR2_IRQ_EI
bool

#
# Shadow registers are an R2 feature
#
config CPU_MIPSR2_SRS
bool

config CPU_HAS_SYNC
bool
depends on !CPU_R3000
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/mips/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ endif

ifneq ($(SUBARCH),$(ARCH))
ifeq ($(CROSS_COMPILE),)
CROSS_COMPILE := $(call cc-cross-prefix, $(tool-archpref)-linux- $(tool-archpref)-gnu-linux- $(tool-archpref)-unknown-gnu-linux-)
CROSS_COMPILE := $(call cc-cross-prefix, $(tool-archpref)-linux- $(tool-archpref)-linux-gnu- $(tool-archpref)-unknown-linux-gnu-)
endif
endif

Expand Down
6 changes: 5 additions & 1 deletion trunk/arch/mips/kernel/cevt-bcm1480.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ static int sibyte_next_event(unsigned long delta, struct clock_event_device *cd)
cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT));

__raw_writeq(0, cfg);
__raw_writeq(delta - 1, init);
__raw_writeq(M_SCD_TIMER_ENABLE, cfg);

Expand Down Expand Up @@ -122,7 +123,7 @@ void __cpuinit sb1480_clockevent_init(void)
CLOCK_EVT_FEAT_ONESHOT;
clockevent_set_clock(cd, V_SCD_TIMER_FREQ);
cd->max_delta_ns = clockevent_delta2ns(0x7fffff, cd);
cd->min_delta_ns = clockevent_delta2ns(1, cd);
cd->min_delta_ns = clockevent_delta2ns(2, cd);
cd->rating = 200;
cd->irq = irq;
cd->cpumask = cpumask_of_cpu(cpu);
Expand All @@ -143,7 +144,10 @@ void __cpuinit sb1480_clockevent_init(void)

action->handler = sibyte_counter_handler;
action->flags = IRQF_DISABLED | IRQF_PERCPU;
action->mask = cpumask_of_cpu(cpu);
action->name = name;
action->dev_id = cd;

irq_set_affinity(irq, cpumask_of_cpu(cpu));
setup_irq(irq, action);
}
6 changes: 5 additions & 1 deletion trunk/arch/mips/kernel/cevt-sb1250.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ static int sibyte_next_event(unsigned long delta, struct clock_event_device *cd)
cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT));

__raw_writeq(0, cfg);
__raw_writeq(delta - 1, init);
__raw_writeq(M_SCD_TIMER_ENABLE, cfg);

Expand Down Expand Up @@ -121,7 +122,7 @@ void __cpuinit sb1250_clockevent_init(void)
CLOCK_EVT_FEAT_ONESHOT;
clockevent_set_clock(cd, V_SCD_TIMER_FREQ);
cd->max_delta_ns = clockevent_delta2ns(0x7fffff, cd);
cd->min_delta_ns = clockevent_delta2ns(1, cd);
cd->min_delta_ns = clockevent_delta2ns(2, cd);
cd->rating = 200;
cd->irq = irq;
cd->cpumask = cpumask_of_cpu(cpu);
Expand All @@ -142,7 +143,10 @@ void __cpuinit sb1250_clockevent_init(void)

action->handler = sibyte_counter_handler;
action->flags = IRQF_DISABLED | IRQF_PERCPU;
action->mask = cpumask_of_cpu(cpu);
action->name = name;
action->dev_id = cd;

irq_set_affinity(irq, cpumask_of_cpu(cpu));
setup_irq(irq, action);
}
5 changes: 5 additions & 0 deletions trunk/arch/mips/kernel/cpu-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -943,6 +943,11 @@ __init void cpu_probe(void)
}

__cpu_name[cpu] = cpu_to_name(c);

if (cpu_has_mips_r2)
c->srsets = ((read_c0_srsctl() >> 26) & 0x0f) + 1;
else
c->srsets = 1;
}

__init void cpu_report(void)
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/mips/kernel/csrc-sb1250.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static cycle_t sb1250_hpt_read(void)
}

struct clocksource bcm1250_clocksource = {
.name = "MIPS",
.name = "bcm1250-counter-3",
.rating = 200,
.read = sb1250_hpt_read,
.mask = CLOCKSOURCE_MASK(23),
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/mips/kernel/genex.S
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ NESTED(handle_int, PT_SIZE, sp)
and k0, ST0_IEP
bnez k0, 1f

mfc0 k0, EP0_EPC
mfc0 k0, CP0_EPC
.set noreorder
j k0
rfe
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/mips/kernel/irq-rm7000.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ void __init rm7k_cpu_irq_init(void)

for (i = base; i < base + 4; i++)
set_irq_chip_and_handler(i, &rm7k_irq_controller,
handle_level_irq);
handle_percpu_irq);
}
2 changes: 1 addition & 1 deletion trunk/arch/mips/kernel/irq-rm9000.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,5 @@ void __init rm9k_cpu_irq_init(void)

rm9000_perfcount_irq = base + 1;
set_irq_chip_and_handler(rm9000_perfcount_irq, &rm9k_perfcounter_irq,
handle_level_irq);
handle_percpu_irq);
}
2 changes: 1 addition & 1 deletion trunk/arch/mips/kernel/irq_cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,5 +116,5 @@ void __init mips_cpu_irq_init(void)

for (i = irq_base + 2; i < irq_base + 8; i++)
set_irq_chip_and_handler(i, &mips_cpu_irq_controller,
handle_level_irq);
handle_percpu_irq);
}
2 changes: 2 additions & 0 deletions trunk/arch/mips/kernel/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ static int show_cpuinfo(struct seq_file *m, void *v)
cpu_has_dsp ? " dsp" : "",
cpu_has_mipsmt ? " mt" : ""
);
seq_printf(m, "shadow register sets\t: %d\n",
cpu_data[n].srsets);

sprintf(fmt, "VCE%%c exceptions\t\t: %s\n",
cpu_has_vce ? "%u" : "not available");
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/mips/kernel/scall64-n32.S
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ EXPORT(sysn32_call_table)
PTR sys_ni_syscall /* 6170, was get_kernel_syms */
PTR sys_ni_syscall /* was query_module */
PTR sys_quotactl
PTR sys_nfsservctl
PTR compat_sys_nfsservctl
PTR sys_ni_syscall /* res. for getpmsg */
PTR sys_ni_syscall /* 6175 for putpmsg */
PTR sys_ni_syscall /* res. for afs_syscall */
Expand Down
68 changes: 3 additions & 65 deletions trunk/arch/mips/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -1100,59 +1100,6 @@ void *set_except_vector(int n, void *addr)
return (void *)old_handler;
}

#ifdef CONFIG_CPU_MIPSR2_SRS
/*
* MIPSR2 shadow register set allocation
* FIXME: SMP...
*/

static struct shadow_registers {
/*
* Number of shadow register sets supported
*/
unsigned long sr_supported;
/*
* Bitmap of allocated shadow registers
*/
unsigned long sr_allocated;
} shadow_registers;

static void mips_srs_init(void)
{
shadow_registers.sr_supported = ((read_c0_srsctl() >> 26) & 0x0f) + 1;
printk(KERN_INFO "%ld MIPSR2 register sets available\n",
shadow_registers.sr_supported);
shadow_registers.sr_allocated = 1; /* Set 0 used by kernel */
}

int mips_srs_max(void)
{
return shadow_registers.sr_supported;
}

int mips_srs_alloc(void)
{
struct shadow_registers *sr = &shadow_registers;
int set;

again:
set = find_first_zero_bit(&sr->sr_allocated, sr->sr_supported);
if (set >= sr->sr_supported)
return -1;

if (test_and_set_bit(set, &sr->sr_allocated))
goto again;

return set;
}

void mips_srs_free(int set)
{
struct shadow_registers *sr = &shadow_registers;

clear_bit(set, &sr->sr_allocated);
}

static asmlinkage void do_default_vi(void)
{
show_regs(get_irq_regs());
Expand All @@ -1163,6 +1110,7 @@ static void *set_vi_srs_handler(int n, vi_handler_t addr, int srs)
{
unsigned long handler;
unsigned long old_handler = vi_handlers[n];
int srssets = current_cpu_data.srsets;
u32 *w;
unsigned char *b;

Expand All @@ -1178,15 +1126,15 @@ static void *set_vi_srs_handler(int n, vi_handler_t addr, int srs)

b = (unsigned char *)(ebase + 0x200 + n*VECTORSPACING);

if (srs >= mips_srs_max())
if (srs >= srssets)
panic("Shadow register set %d not supported", srs);

if (cpu_has_veic) {
if (board_bind_eic_interrupt)
board_bind_eic_interrupt(n, srs);
} else if (cpu_has_vint) {
/* SRSMap is only defined if shadow sets are implemented */
if (mips_srs_max() > 1)
if (srssets > 1)
change_c0_srsmap(0xf << n*4, srs << n*4);
}

Expand Down Expand Up @@ -1253,14 +1201,6 @@ void *set_vi_handler(int n, vi_handler_t addr)
return set_vi_srs_handler(n, addr, 0);
}

#else

static inline void mips_srs_init(void)
{
}

#endif /* CONFIG_CPU_MIPSR2_SRS */

/*
* This is used by native signal handling
*/
Expand Down Expand Up @@ -1503,8 +1443,6 @@ void __init trap_init(void)
else
ebase = CAC_BASE;

mips_srs_init();

per_cpu_trap_init();

/*
Expand Down
14 changes: 10 additions & 4 deletions trunk/arch/mips/kernel/vpe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1003,6 +1003,7 @@ static void cleanup_tc(struct tc *tc)
write_tc_c0_tcstatus(tmp);

write_tc_c0_tchalt(TCHALT_H);
mips_ihb();

/* bind it to anything other than VPE1 */
// write_tc_c0_tcbind(read_tc_c0_tcbind() & ~TCBIND_CURVPE); // | TCBIND_CURVPE
Expand Down Expand Up @@ -1235,9 +1236,12 @@ int vpe_free(vpe_handle vpe)
settc(t->index);
write_vpe_c0_vpeconf0(read_vpe_c0_vpeconf0() & ~VPECONF0_VPA);

/* mark the TC unallocated and halt'ed */
write_tc_c0_tcstatus(read_tc_c0_tcstatus() & ~TCSTATUS_A);
/* halt the TC */
write_tc_c0_tchalt(TCHALT_H);
mips_ihb();

/* mark the TC unallocated */
write_tc_c0_tcstatus(read_tc_c0_tcstatus() & ~TCSTATUS_A);

v->state = VPE_STATE_UNUSED;

Expand Down Expand Up @@ -1533,14 +1537,16 @@ static int __init vpe_module_init(void)
t->pvpe = get_vpe(0); /* set the parent vpe */
}

/* halt the TC */
write_tc_c0_tchalt(TCHALT_H);
mips_ihb();

tmp = read_tc_c0_tcstatus();

/* mark not activated and not dynamically allocatable */
tmp &= ~(TCSTATUS_A | TCSTATUS_DA);
tmp |= TCSTATUS_IXMT; /* interrupt exempt */
write_tc_c0_tcstatus(tmp);

write_tc_c0_tchalt(TCHALT_H);
}
}

Expand Down
Loading

0 comments on commit 4e61825

Please sign in to comment.