Skip to content

Commit

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

Pull MIPS fixes from Ralf Baechle:
 "This is the first round of fixes and tying up loose ends for MIPS.

   - plenty of fixes for build errors in specific obscure configurations
   - remove redundant code on the Lantiq platform
   - removal of a useless SEAD I2C driver that was causing a build issue
   - fix an earlier TLB exeption handler fix to also work on Octeon.
   - fix ISA level dependencies in FPU emulator's instruction decoding.
   - don't hardcode kernel command line in Octeon software emulator.
   - fix an earlier fix for the Loondson 2 clock setting"

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
  MIPS: SEAD3: Fix I2C device registration.
  MIPS: SEAD3: Nuke PIC32 I2C driver.
  MIPS: ftrace: Fix a microMIPS build problem
  MIPS: MSP71xx: Fix build error
  MIPS: Malta: Do not build the malta-amon.c file if CMP is not enabled
  MIPS: Prevent compiler warning from cop2_{save,restore}
  MIPS: Kconfig: Add missing MIPS_CPS dependencies to PM and cpuidle
  MIPS: idle: Remove leftover __pastwait symbol and its references
  MIPS: Sibyte: Include the swarm subdir to the sb1250 LittleSur builds
  MIPS: ptrace.h: Add a missing include
  MIPS: ath79: Fix compilation error when CONFIG_PCI is disabled
  MIPS: MSP71xx: Remove compilation error when CONFIG_MIPS_MT is present
  MIPS: Octeon: Remove special case for simulator command line.
  MIPS: tlbex: Properly fix HUGE TLB Refill exception handler
  MIPS: loongson2_cpufreq: Fix CPU clock rate setting mismerge
  pci: pci-lantiq: remove duplicate check on resource
  MIPS: Lasat: Add missing CONFIG_PROC_FS dependency to PICVUE_PROC
  MIPS: cp1emu: Fix ISA restrictions for cop1x_op instructions
  • Loading branch information
torvalds committed Oct 24, 2014
2 parents cdc63a0 + 4846f11 commit 2cc9188
Show file tree
Hide file tree
Showing 22 changed files with 30 additions and 575 deletions.
1 change: 1 addition & 0 deletions arch/mips/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2066,6 +2066,7 @@ config MIPS_CPS
support is unavailable.

config MIPS_CPS_PM
depends on MIPS_CPS
select MIPS_CPC
bool

Expand Down
2 changes: 1 addition & 1 deletion arch/mips/ath79/mach-db120.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ static void __init db120_pci_init(u8 *eeprom)
ath79_register_pci();
}
#else
static inline void db120_pci_init(void) {}
static inline void db120_pci_init(u8 *eeprom) {}
#endif /* CONFIG_PCI */

static void __init db120_setup(void)
Expand Down
9 changes: 0 additions & 9 deletions arch/mips/cavium-octeon/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -806,15 +806,6 @@ void __init prom_init(void)
#endif
}

if (octeon_is_simulation()) {
/*
* The simulator uses a mtdram device pre filled with
* the filesystem. Also specify the calibration delay
* to avoid calculating it every time.
*/
strcat(arcs_cmdline, " rw root=1f00 slram=root,0x40000000,+1073741824");
}

mips_hpt_frequency = octeon_get_clock_rate();

octeon_init_cvmcount();
Expand Down
8 changes: 4 additions & 4 deletions arch/mips/include/asm/cop2.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ extern void nlm_cop2_restore(struct nlm_cop2_state *);

#define cop2_present 1
#define cop2_lazy_restore 1
#define cop2_save(r) do { (r); } while (0)
#define cop2_restore(r) do { (r); } while (0)
#define cop2_save(r) do { (void)(r); } while (0)
#define cop2_restore(r) do { (void)(r); } while (0)

#else

#define cop2_present 0
#define cop2_lazy_restore 0
#define cop2_save(r) do { (r); } while (0)
#define cop2_restore(r) do { (r); } while (0)
#define cop2_save(r) do { (void)(r); } while (0)
#define cop2_restore(r) do { (void)(r); } while (0)
#endif

enum cu2_ops {
Expand Down
4 changes: 2 additions & 2 deletions arch/mips/include/asm/ftrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ do { \
asm volatile ( \
"1: " load " %[tmp_dst], 0(%[tmp_src])\n" \
" li %[tmp_err], 0\n" \
"2:\n" \
"2: .insn\n" \
\
".section .fixup, \"ax\"\n" \
"3: li %[tmp_err], 1\n" \
Expand All @@ -46,7 +46,7 @@ do { \
asm volatile ( \
"1: " store " %[tmp_src], 0(%[tmp_dst])\n"\
" li %[tmp_err], 0\n" \
"2:\n" \
"2: .insn\n" \
\
".section .fixup, \"ax\"\n" \
"3: li %[tmp_err], 1\n" \
Expand Down
7 changes: 0 additions & 7 deletions arch/mips/include/asm/idle.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,12 @@ extern void (*cpu_wait)(void);
extern void r4k_wait(void);
extern asmlinkage void __r4k_wait(void);
extern void r4k_wait_irqoff(void);
extern void __pastwait(void);

static inline int using_rollback_handler(void)
{
return cpu_wait == r4k_wait;
}

static inline int address_is_in_r4k_wait_irqoff(unsigned long addr)
{
return addr >= (unsigned long)r4k_wait_irqoff &&
addr < (unsigned long)__pastwait;
}

extern int mips_cpuidle_wait_enter(struct cpuidle_device *dev,
struct cpuidle_driver *drv, int index);

Expand Down
2 changes: 2 additions & 0 deletions arch/mips/include/uapi/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#ifndef _UAPI_ASM_PTRACE_H
#define _UAPI_ASM_PTRACE_H

#include <linux/types.h>

/* 0 - 31 are integer registers, 32 - 63 are fp registers. */
#define FPR_BASE 32
#define PC 64
Expand Down
3 changes: 0 additions & 3 deletions arch/mips/kernel/idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ void r4k_wait_irqoff(void)
" wait \n"
" .set pop \n");
local_irq_enable();
__asm__(
" .globl __pastwait \n"
"__pastwait: \n");
}

/*
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/lasat/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ config PICVUE

config PICVUE_PROC
tristate "PICVUE LCD display driver /proc interface"
depends on PICVUE
depends on PICVUE && PROC_FS

config DS1603
bool "DS1603 RTC driver"
Expand Down
5 changes: 3 additions & 2 deletions arch/mips/loongson/lemote-2f/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ EXPORT_SYMBOL(clk_put);

int clk_set_rate(struct clk *clk, unsigned long rate)
{
unsigned int rate_khz = rate / 1000;
struct cpufreq_frequency_table *pos;
int ret = 0;
int regval;
Expand All @@ -107,9 +108,9 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
propagate_rate(clk);

cpufreq_for_each_valid_entry(pos, loongson2_clockmod_table)
if (rate == pos->frequency)
if (rate_khz == pos->frequency)
break;
if (rate != pos->frequency)
if (rate_khz != pos->frequency)
return -ENOTSUPP;

clk->rate = rate;
Expand Down
4 changes: 2 additions & 2 deletions arch/mips/math-emu/cp1emu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,7 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_struct *ctx,
goto emul;

case cop1x_op:
if (cpu_has_mips_4_5 || cpu_has_mips64)
if (cpu_has_mips_4_5 || cpu_has_mips64 || cpu_has_mips32r2)
/* its one of ours */
goto emul;

Expand Down Expand Up @@ -1068,7 +1068,7 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_struct *ctx,
break;

case cop1x_op:
if (!cpu_has_mips_4_5 && !cpu_has_mips64)
if (!cpu_has_mips_4_5 && !cpu_has_mips64 && !cpu_has_mips32r2)
return SIGILL;

sig = fpux_emu(xcp, ctx, ir, fault_addr);
Expand Down
6 changes: 5 additions & 1 deletion arch/mips/mm/tlbex.c
Original file line number Diff line number Diff line change
Expand Up @@ -1062,6 +1062,7 @@ static void build_update_entries(u32 **p, unsigned int tmp, unsigned int ptep)
struct mips_huge_tlb_info {
int huge_pte;
int restore_scratch;
bool need_reload_pte;
};

static struct mips_huge_tlb_info
Expand All @@ -1076,6 +1077,7 @@ build_fast_tlb_refill_handler (u32 **p, struct uasm_label **l,

rv.huge_pte = scratch;
rv.restore_scratch = 0;
rv.need_reload_pte = false;

if (check_for_high_segbits) {
UASM_i_MFC0(p, tmp, C0_BADVADDR);
Expand Down Expand Up @@ -1264,6 +1266,7 @@ static void build_r4000_tlb_refill_handler(void)
} else {
htlb_info.huge_pte = K0;
htlb_info.restore_scratch = 0;
htlb_info.need_reload_pte = true;
vmalloc_mode = refill_noscratch;
/*
* create the plain linear handler
Expand Down Expand Up @@ -1300,7 +1303,8 @@ static void build_r4000_tlb_refill_handler(void)
}
#ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT
uasm_l_tlb_huge_update(&l, p);
UASM_i_LW(&p, K0, 0, K1);
if (htlb_info.need_reload_pte)
UASM_i_LW(&p, htlb_info.huge_pte, 0, K1);
build_huge_update_entries(&p, htlb_info.huge_pte, K1);
build_huge_tlb_write_entry(&p, &l, &r, K0, tlb_random,
htlb_info.restore_scratch);
Expand Down
3 changes: 2 additions & 1 deletion arch/mips/mti-malta/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
# Copyright (C) 2008 Wind River Systems, Inc.
# written by Ralf Baechle <[email protected]>
#
obj-y := malta-amon.o malta-display.o malta-init.o \
obj-y := malta-display.o malta-init.o \
malta-int.o malta-memory.o malta-platform.o \
malta-reset.o malta-setup.o malta-time.o

obj-$(CONFIG_MIPS_CMP) += malta-amon.o
obj-$(CONFIG_MIPS_MALTA_PM) += malta-pm.o
1 change: 0 additions & 1 deletion arch/mips/mti-sead3/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ obj-y := sead3-lcd.o sead3-display.o sead3-init.o \
sead3-setup.o sead3-time.o

obj-y += sead3-i2c-dev.o sead3-i2c.o \
sead3-pic32-i2c-drv.o sead3-pic32-bus.o \
leds-sead3.o sead3-leds.o

obj-$(CONFIG_EARLY_PRINTK) += sead3-console.o
Expand Down
8 changes: 1 addition & 7 deletions arch/mips/mti-sead3/sead3-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
*
* Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
*/
#include <linux/module.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <irq.h>

struct resource sead3_i2c_resources[] = {
{
Expand All @@ -30,8 +28,4 @@ static int __init sead3_i2c_init(void)
return platform_device_register(&sead3_i2c_device);
}

module_init(sead3_i2c_init);

MODULE_AUTHOR("Chris Dearman <[email protected]>");
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("I2C probe driver for SEAD3");
device_initcall(sead3_i2c_init);
102 changes: 0 additions & 102 deletions arch/mips/mti-sead3/sead3-pic32-bus.c

This file was deleted.

Loading

0 comments on commit 2cc9188

Please sign in to comment.