Skip to content

Commit

Permalink
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-…
Browse files Browse the repository at this point in the history
…linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] IP27: Build fix
  [MIPS] Wire up ioprio_set and ioprio_get.
  [MIPS] Fix __raw_read_trylock() to allow multiple readers
  [MIPS] Export __copy_user_inatomic.
  [MIPS] R2 bitops compile fix for gcc < 4.0.
  [MIPS] TX39: Remove redundant tx39_blast_icache() calls
  [MIPS] Cobalt: Fix early printk
  [MIPS] SMTC: De-obscure Malta hooks.
  [MIPS] SMTC: Add fordward declarations for mm_struct and task_struct.
  [MIPS] SMTC: <asm/mips_mt.h> must include <linux/cpumask.h>
  [MIPS] SMTC: <asm/smtc_ipi.h> must include <linux/spinlock.h>
  [MIPS] Atlas, Malta: Fix build warning.
  • Loading branch information
Linus Torvalds committed Mar 7, 2007
2 parents 03154a2 + 063ea77 commit 185d84b
Show file tree
Hide file tree
Showing 20 changed files with 84 additions and 87 deletions.
2 changes: 1 addition & 1 deletion arch/mips/Kconfig
Expand Up @@ -167,6 +167,7 @@ config MIPS_COBALT
select IRQ_CPU
select MIPS_GT64111
select SYS_HAS_CPU_NEVADA
select SYS_HAS_EARLY_PRINTK
select SYS_SUPPORTS_32BIT_KERNEL
select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL
select SYS_SUPPORTS_LITTLE_ENDIAN
Expand Down Expand Up @@ -837,7 +838,6 @@ source "arch/mips/tx4927/Kconfig"
source "arch/mips/tx4938/Kconfig"
source "arch/mips/vr41xx/Kconfig"
source "arch/mips/philips/pnx8550/common/Kconfig"
source "arch/mips/cobalt/Kconfig"

endmenu

Expand Down
7 changes: 0 additions & 7 deletions arch/mips/cobalt/Kconfig

This file was deleted.

5 changes: 1 addition & 4 deletions arch/mips/cobalt/console.c
Expand Up @@ -9,11 +9,8 @@
#include <asm/addrspace.h>
#include <asm/mach-cobalt/cobalt.h>

static void putchar(int c)
void prom_putchar(char c)
{
if(c == '\n')
putchar('\r');

while(!(COBALT_UART[UART_LSR] & UART_LSR_THRE))
;

Expand Down
1 change: 1 addition & 0 deletions arch/mips/kernel/mips_ksyms.c
Expand Up @@ -37,6 +37,7 @@ EXPORT_SYMBOL(kernel_thread);
* Userspace access stuff.
*/
EXPORT_SYMBOL(__copy_user);
EXPORT_SYMBOL(__copy_user_inatomic);
EXPORT_SYMBOL(__bzero);
EXPORT_SYMBOL(__strncpy_from_user_nocheck_asm);
EXPORT_SYMBOL(__strncpy_from_user_asm);
Expand Down
2 changes: 2 additions & 0 deletions arch/mips/kernel/scall32-o32.S
Expand Up @@ -656,6 +656,8 @@ einval: li v0, -EINVAL
sys sys_kexec_load 4
sys sys_getcpu 3
sys sys_epoll_pwait 6
sys sys_ioprio_set 3
sys sys_ioprio_get 2
.endm

/* We pre-compute the number of _instruction_ bytes needed to
Expand Down
3 changes: 3 additions & 0 deletions arch/mips/kernel/scall64-64.S
Expand Up @@ -471,3 +471,6 @@ sys_call_table:
PTR sys_kexec_load /* 5270 */
PTR sys_getcpu
PTR sys_epoll_pwait
PTR sys_ioprio_set
PTR sys_ioprio_get
.size sys_call_table,.-sys_call_table
5 changes: 4 additions & 1 deletion arch/mips/kernel/scall64-n32.S
Expand Up @@ -395,5 +395,8 @@ EXPORT(sysn32_call_table)
PTR compat_sys_set_robust_list
PTR compat_sys_get_robust_list
PTR compat_sys_kexec_load
PTR sys_getcpu
PTR sys_getcpu /* 6275 */
PTR compat_sys_epoll_pwait
PTR sys_ioprio_set
PTR sys_ioprio_get
.size sysn32_call_table,.-sysn32_call_table
2 changes: 2 additions & 0 deletions arch/mips/kernel/scall64-o32.S
Expand Up @@ -519,4 +519,6 @@ sys_call_table:
PTR compat_sys_kexec_load
PTR sys_getcpu
PTR compat_sys_epoll_pwait
PTR sys_ioprio_set
PTR sys_ioprio_get /* 4315 */
.size sys_call_table,.-sys_call_table
4 changes: 2 additions & 2 deletions arch/mips/mips-boards/generic/init.c
Expand Up @@ -251,8 +251,6 @@ void __init mips_ejtag_setup (void)

void __init prom_init(void)
{
u32 start, map, mask, data;

prom_argc = fw_arg0;
_prom_argv = (int *) fw_arg1;
_prom_envp = (int *) fw_arg2;
Expand All @@ -278,6 +276,8 @@ void __init prom_init(void)
mips_revision_corid = MIPS_REVISION_CORID_CORE_EMUL_MSC;
}
switch(mips_revision_corid) {
u32 start, map, mask, data;

case MIPS_REVISION_CORID_QED_RM5261:
case MIPS_REVISION_CORID_CORE_LV:
case MIPS_REVISION_CORID_CORE_FPGA:
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/mips-boards/malta/Makefile
Expand Up @@ -21,4 +21,4 @@

obj-y := malta_int.o malta_setup.o
obj-$(CONFIG_MTD) += malta_mtd.o
obj-$(CONFIG_SMP) += malta_smp.o
obj-$(CONFIG_MIPS_MT_SMTC) += malta_smtc.o
@@ -1,36 +1,23 @@
/*
* Malta Platform-specific hooks for SMP operation
*/
#include <linux/init.h>

#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/cpumask.h>
#include <linux/interrupt.h>

#include <asm/atomic.h>
#include <asm/cpu.h>
#include <asm/processor.h>
#include <asm/system.h>
#include <asm/hardirq.h>
#include <asm/mmu_context.h>
#include <asm/smp.h>
#ifdef CONFIG_MIPS_MT_SMTC
#include <asm/mipsregs.h>
#include <asm/mipsmtregs.h>
#include <asm/smtc.h>
#include <asm/smtc_ipi.h>
#endif /* CONFIG_MIPS_MT_SMTC */

/* VPE/SMP Prototype implements platform interfaces directly */
#if !defined(CONFIG_MIPS_MT_SMP)

/*
* Cause the specified action to be performed on a targeted "CPU"
*/

void core_send_ipi(int cpu, unsigned int action)
{
/* "CPU" may be TC of same VPE, VPE of same CPU, or different CPU */
#ifdef CONFIG_MIPS_MT_SMTC
/* "CPU" may be TC of same VPE, VPE of same CPU, or different CPU */
smtc_send_ipi(cpu, LINUX_SMP_IPI, action);
#endif /* CONFIG_MIPS_MT_SMTC */
}

/*
Expand All @@ -39,9 +26,7 @@ void core_send_ipi(int cpu, unsigned int action)

void prom_boot_secondary(int cpu, struct task_struct *idle)
{
#ifdef CONFIG_MIPS_MT_SMTC
smtc_boot_secondary(cpu, idle);
#endif /* CONFIG_MIPS_MT_SMTC */
}

/*
Expand All @@ -50,7 +35,6 @@ void prom_boot_secondary(int cpu, struct task_struct *idle)

void prom_init_secondary(void)
{
#ifdef CONFIG_MIPS_MT_SMTC
void smtc_init_secondary(void);
int myvpe;

Expand All @@ -65,7 +49,6 @@ void prom_init_secondary(void)
}

smtc_init_secondary();
#endif /* CONFIG_MIPS_MT_SMTC */
}

/*
Expand Down Expand Up @@ -93,9 +76,7 @@ void __init plat_prepare_cpus(unsigned int max_cpus)

void prom_smp_finish(void)
{
#ifdef CONFIG_MIPS_MT_SMTC
smtc_smp_finish();
#endif /* CONFIG_MIPS_MT_SMTC */
}

/*
Expand All @@ -105,5 +86,3 @@ void prom_smp_finish(void)
void prom_cpus_done(void)
{
}

#endif /* CONFIG_MIPS32R2_MT_SMP */
18 changes: 6 additions & 12 deletions arch/mips/mm/c-tx39.c
Expand Up @@ -128,7 +128,6 @@ static inline void tx39_flush_cache_all(void)
return;

tx39_blast_dcache();
tx39_blast_icache();
}

static inline void tx39___flush_cache_all(void)
Expand All @@ -142,24 +141,19 @@ static void tx39_flush_cache_mm(struct mm_struct *mm)
if (!cpu_has_dc_aliases)
return;

if (cpu_context(smp_processor_id(), mm) != 0) {
tx39_flush_cache_all();
}
if (cpu_context(smp_processor_id(), mm) != 0)
tx39_blast_dcache();
}

static void tx39_flush_cache_range(struct vm_area_struct *vma,
unsigned long start, unsigned long end)
{
int exec;

if (!cpu_has_dc_aliases)
return;
if (!(cpu_context(smp_processor_id(), vma->vm_mm)))
return;

exec = vma->vm_flags & VM_EXEC;
if (cpu_has_dc_aliases || exec)
tx39_blast_dcache();
if (exec)
tx39_blast_icache();
tx39_blast_dcache();
}

static void tx39_flush_cache_page(struct vm_area_struct *vma, unsigned long page, unsigned long pfn)
Expand Down Expand Up @@ -218,7 +212,7 @@ static void tx39_flush_cache_page(struct vm_area_struct *vma, unsigned long page

static void local_tx39_flush_data_cache_page(void * addr)
{
tx39_blast_dcache_page(addr);
tx39_blast_dcache_page((unsigned long)addr);
}

static void tx39_flush_data_cache_page(unsigned long addr)
Expand Down
2 changes: 0 additions & 2 deletions arch/mips/sgi-ip27/ip27-init.c
Expand Up @@ -191,7 +191,6 @@ static inline void ioc3_eth_init(void)
ioc3->eier = 0;
}

extern void ip27_setup_console(void);
extern void ip27_time_init(void);
extern void ip27_reboot_setup(void);

Expand All @@ -200,7 +199,6 @@ void __init plat_mem_setup(void)
hubreg_t p, e, n_mode;
nasid_t nid;

ip27_setup_console();
ip27_reboot_setup();

/*
Expand Down

0 comments on commit 185d84b

Please sign in to comment.