Skip to content

Commit

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

* 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus: (28 commits)
  MIPS: Alchemy: fix xxs1500 build error
  MIPS: Invalidate old TLB mappings when updating huge page PTEs.
  MIPS: Hibernation: Fixes for PAGE_SIZE >= 64kb
  MIPS: JZ4740: Set one-shot feature flag for the clockevent
  MIPS: JZ4740: Export symbols to the watchdog driver module
  MIPS: JZ4740: Fix GCC 4.6.0 build error.
  MIPS: Audit: Fix success success argument pass to audit_syscall_exit
  MIPS: Fix calc_vmlinuz_load_addr build warnings.
  MIPS: Alchemy: Fix GCC 4.6.0 build error.
  MIPS: Document former use of timerfd(2) syscall number.
  MIPS: IP27: Fix GCC 4.6.0 build error.
  MIPS: IP27: Fix GCC 4.6.0 build error.
  MIPS: bcm63xx: Fix header_crc comment in bcm963xx_tag.h
  MIPS: Octeon: Guard the Kconfig body with CPU_CAVIUM_OCTEON
  MIPS: Octeon: Cleanup Kconfig IRQ_CPU* symbols.
  MIPS: Rename .data..mostly and properly handle it in linker script
  MIPS: MSP: Fix build error
  MIPS: MSP71xx: Fix typo in msp_per_irq_controller
  MIPS: Loongson: Fix GCC 2.6.0 build error.
  MIPS: Jazz: Fix GCC 4.6.0 build error
  ...
  • Loading branch information
torvalds committed May 10, 2011
2 parents 675badf + 780914c commit 54b3335
Show file tree
Hide file tree
Showing 32 changed files with 80 additions and 97 deletions.
5 changes: 0 additions & 5 deletions arch/mips/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -997,9 +997,6 @@ config IRQ_GT641XX
config IRQ_GIC
bool

config IRQ_CPU_OCTEON
bool

config MIPS_BOARDS_GEN
bool

Expand Down Expand Up @@ -1359,8 +1356,6 @@ config CPU_SB1
config CPU_CAVIUM_OCTEON
bool "Cavium Octeon processor"
depends on SYS_HAS_CPU_CAVIUM_OCTEON
select IRQ_CPU
select IRQ_CPU_OCTEON
select CPU_HAS_PREFETCH
select CPU_SUPPORTS_64BIT_KERNEL
select SYS_SUPPORTS_SMP
Expand Down
61 changes: 33 additions & 28 deletions arch/mips/alchemy/devboards/db1x00/board_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,10 @@ const char *get_system_type(void)
void __init board_setup(void)
{
unsigned long bcsr1, bcsr2;
u32 pin_func;

bcsr1 = DB1000_BCSR_PHYS_ADDR;
bcsr2 = DB1000_BCSR_PHYS_ADDR + DB1000_BCSR_HEXLED_OFS;

pin_func = 0;

#ifdef CONFIG_MIPS_DB1000
printk(KERN_INFO "AMD Alchemy Au1000/Db1000 Board\n");
#endif
Expand Down Expand Up @@ -164,44 +161,52 @@ void __init board_setup(void)
/* Not valid for Au1550 */
#if defined(CONFIG_IRDA) && \
(defined(CONFIG_SOC_AU1000) || defined(CONFIG_SOC_AU1100))
/* Set IRFIRSEL instead of GPIO15 */
pin_func = au_readl(SYS_PINFUNC) | SYS_PF_IRF;
au_writel(pin_func, SYS_PINFUNC);
/* Power off until the driver is in use */
bcsr_mod(BCSR_RESETS, BCSR_RESETS_IRDA_MODE_MASK,
BCSR_RESETS_IRDA_MODE_OFF);
{
u32 pin_func;

/* Set IRFIRSEL instead of GPIO15 */
pin_func = au_readl(SYS_PINFUNC) | SYS_PF_IRF;
au_writel(pin_func, SYS_PINFUNC);
/* Power off until the driver is in use */
bcsr_mod(BCSR_RESETS, BCSR_RESETS_IRDA_MODE_MASK,
BCSR_RESETS_IRDA_MODE_OFF);
}
#endif
bcsr_write(BCSR_PCMCIA, 0); /* turn off PCMCIA power */

/* Enable GPIO[31:0] inputs */
alchemy_gpio1_input_enable();

#ifdef CONFIG_MIPS_MIRAGE
/* GPIO[20] is output */
alchemy_gpio_direction_output(20, 0);
{
u32 pin_func;

/* Set GPIO[210:208] instead of SSI_0 */
pin_func = au_readl(SYS_PINFUNC) | SYS_PF_S0;
/* GPIO[20] is output */
alchemy_gpio_direction_output(20, 0);

/* Set GPIO[215:211] for LEDs */
pin_func |= 5 << 2;
/* Set GPIO[210:208] instead of SSI_0 */
pin_func = au_readl(SYS_PINFUNC) | SYS_PF_S0;

/* Set GPIO[214:213] for more LEDs */
pin_func |= 5 << 12;
/* Set GPIO[215:211] for LEDs */
pin_func |= 5 << 2;

/* Set GPIO[207:200] instead of PCMCIA/LCD */
pin_func |= SYS_PF_LCD | SYS_PF_PC;
au_writel(pin_func, SYS_PINFUNC);
/* Set GPIO[214:213] for more LEDs */
pin_func |= 5 << 12;

/*
* Enable speaker amplifier. This should
* be part of the audio driver.
*/
alchemy_gpio_direction_output(209, 1);
/* Set GPIO[207:200] instead of PCMCIA/LCD */
pin_func |= SYS_PF_LCD | SYS_PF_PC;
au_writel(pin_func, SYS_PINFUNC);

pm_power_off = mirage_power_off;
_machine_halt = mirage_power_off;
_machine_restart = (void(*)(char *))mips_softreset;
/*
* Enable speaker amplifier. This should
* be part of the audio driver.
*/
alchemy_gpio_direction_output(209, 1);

pm_power_off = mirage_power_off;
_machine_halt = mirage_power_off;
_machine_restart = (void(*)(char *))mips_softreset;
}
#endif

#ifdef CONFIG_MIPS_BOSPORUS
Expand Down
5 changes: 2 additions & 3 deletions arch/mips/alchemy/xxs1500/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,9 @@ void __init prom_init(void)
prom_init_cmdline();

memsize_str = prom_getenv("memsize");
if (!memsize_str)
if (!memsize_str || strict_strtoul(memsize_str, 0, &memsize))
memsize = 0x04000000;
else
strict_strtoul(memsize_str, 0, &memsize);

add_memory_region(0, memsize, BOOT_MEM_RAM);
}

Expand Down
2 changes: 1 addition & 1 deletion arch/mips/boot/compressed/calc_vmlinuz_load_addr.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

int main(int argc, char *argv[])
{
unsigned long long vmlinux_size, vmlinux_load_addr, vmlinuz_load_addr;
struct stat sb;
uint64_t vmlinux_size, vmlinux_load_addr, vmlinuz_load_addr;

if (argc != 3) {
fprintf(stderr, "Usage: %s <pathname> <vmlinux_load_addr>\n",
Expand Down
15 changes: 4 additions & 11 deletions arch/mips/cavium-octeon/Kconfig
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
config CAVIUM_OCTEON_SPECIFIC_OPTIONS
bool "Enable Octeon specific options"
depends on CPU_CAVIUM_OCTEON
default "y"
if CPU_CAVIUM_OCTEON

config CAVIUM_CN63XXP1
bool "Enable CN63XXP1 errata worarounds"
depends on CAVIUM_OCTEON_SPECIFIC_OPTIONS
default "n"
help
The CN63XXP1 chip requires build time workarounds to
Expand All @@ -16,7 +12,6 @@ config CAVIUM_CN63XXP1

config CAVIUM_OCTEON_2ND_KERNEL
bool "Build the kernel to be used as a 2nd kernel on the same chip"
depends on CAVIUM_OCTEON_SPECIFIC_OPTIONS
default "n"
help
This option configures this kernel to be linked at a different
Expand All @@ -26,7 +21,6 @@ config CAVIUM_OCTEON_2ND_KERNEL

config CAVIUM_OCTEON_HW_FIX_UNALIGNED
bool "Enable hardware fixups of unaligned loads and stores"
depends on CAVIUM_OCTEON_SPECIFIC_OPTIONS
default "y"
help
Configure the Octeon hardware to automatically fix unaligned loads
Expand All @@ -38,7 +32,6 @@ config CAVIUM_OCTEON_HW_FIX_UNALIGNED

config CAVIUM_OCTEON_CVMSEG_SIZE
int "Number of L1 cache lines reserved for CVMSEG memory"
depends on CAVIUM_OCTEON_SPECIFIC_OPTIONS
range 0 54
default 1
help
Expand All @@ -50,7 +43,6 @@ config CAVIUM_OCTEON_CVMSEG_SIZE

config CAVIUM_OCTEON_LOCK_L2
bool "Lock often used kernel code in the L2"
depends on CAVIUM_OCTEON_SPECIFIC_OPTIONS
default "y"
help
Enable locking parts of the kernel into the L2 cache.
Expand Down Expand Up @@ -93,7 +85,6 @@ config CAVIUM_OCTEON_LOCK_L2_MEMCPY
config ARCH_SPARSEMEM_ENABLE
def_bool y
select SPARSEMEM_STATIC
depends on CPU_CAVIUM_OCTEON

config CAVIUM_OCTEON_HELPER
def_bool y
Expand All @@ -107,6 +98,8 @@ config NEED_SG_DMA_LENGTH

config SWIOTLB
def_bool y
depends on CPU_CAVIUM_OCTEON
select IOMMU_HELPER
select NEED_SG_DMA_LENGTH


endif # CPU_CAVIUM_OCTEON
2 changes: 1 addition & 1 deletion arch/mips/include/asm/cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
#define SMP_CACHE_SHIFT L1_CACHE_SHIFT
#define SMP_CACHE_BYTES L1_CACHE_BYTES

#define __read_mostly __attribute__((__section__(".data.read_mostly")))
#define __read_mostly __attribute__((__section__(".data..read_mostly")))

#endif /* _ASM_CACHE_H */
3 changes: 3 additions & 0 deletions arch/mips/include/asm/cevt-r4k.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
#ifndef __ASM_CEVT_R4K_H
#define __ASM_CEVT_R4K_H

#include <linux/clockchips.h>
#include <asm/time.h>

DECLARE_PER_CPU(struct clock_event_device, mips_clockevent_device);

void mips_event_handler(struct clock_event_device *dev);
Expand Down
1 change: 1 addition & 0 deletions arch/mips/include/asm/hugetlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ static inline pte_t huge_ptep_get_and_clear(struct mm_struct *mm,
static inline void huge_ptep_clear_flush(struct vm_area_struct *vma,
unsigned long addr, pte_t *ptep)
{
flush_tlb_mm(vma->vm_mm);
}

static inline int huge_pte_none(pte_t pte)
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/include/asm/mach-bcm63xx/bcm963xx_tag.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ struct bcm_tag {
char kernel_crc[CRC_LEN];
/* 228-235: Unused at present */
char reserved1[8];
/* 236-239: CRC32 of header excluding tagVersion */
/* 236-239: CRC32 of header excluding last 20 bytes */
char header_crc[CRC_LEN];
/* 240-255: Unused at present */
char reserved2[16];
Expand Down
5 changes: 2 additions & 3 deletions arch/mips/jazz/jazzdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ EXPORT_SYMBOL(vdma_free);
*/
int vdma_remap(unsigned long laddr, unsigned long paddr, unsigned long size)
{
int first, pages, npages;
int first, pages;

if (laddr > 0xffffff) {
if (vdma_debug)
Expand All @@ -228,8 +228,7 @@ int vdma_remap(unsigned long laddr, unsigned long paddr, unsigned long size)
return -EINVAL; /* invalid physical address */
}

npages = pages =
(((paddr & (VDMA_PAGESIZE - 1)) + size) >> 12) + 1;
pages = (((paddr & (VDMA_PAGESIZE - 1)) + size) >> 12) + 1;
first = laddr >> 12;
if (vdma_debug)
printk("vdma_remap: first=%x, pages=%x\n", first, pages);
Expand Down
4 changes: 1 addition & 3 deletions arch/mips/jz4740/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,7 @@ EXPORT_SYMBOL_GPL(jz4740_dma_get_residue);

static void jz4740_dma_chan_irq(struct jz4740_dma_chan *dma)
{
uint32_t status;

status = jz4740_dma_read(JZ_REG_DMA_STATUS_CTRL(dma->id));
(void) jz4740_dma_read(JZ_REG_DMA_STATUS_CTRL(dma->id));

jz4740_dma_write_mask(JZ_REG_DMA_STATUS_CTRL(dma->id), 0,
JZ_DMA_STATUS_CTRL_ENABLE | JZ_DMA_STATUS_CTRL_TRANSFER_DONE);
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/jz4740/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ static int jz4740_clockevent_set_next(unsigned long evt,

static struct clock_event_device jz4740_clockevent = {
.name = "jz4740-timer",
.features = CLOCK_EVT_FEAT_PERIODIC,
.features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
.set_next_event = jz4740_clockevent_set_next,
.set_mode = jz4740_clockevent_set_mode,
.rating = 200,
Expand Down
2 changes: 2 additions & 0 deletions arch/mips/jz4740/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ void jz4740_timer_enable_watchdog(void)
{
writel(BIT(16), jz4740_timer_base + JZ_REG_TIMER_STOP_CLEAR);
}
EXPORT_SYMBOL_GPL(jz4740_timer_enable_watchdog);

void jz4740_timer_disable_watchdog(void)
{
writel(BIT(16), jz4740_timer_base + JZ_REG_TIMER_STOP_SET);
}
EXPORT_SYMBOL_GPL(jz4740_timer_disable_watchdog);

void __init jz4740_timer_init(void)
{
Expand Down
5 changes: 3 additions & 2 deletions arch/mips/kernel/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

#define JAL 0x0c000000 /* jump & link: ip --> ra, jump to target */
#define ADDR_MASK 0x03ffffff /* op_code|addr : 31...26|25 ....0 */
#define JUMP_RANGE_MASK ((1UL << 28) - 1)

#define INSN_NOP 0x00000000 /* nop */
#define INSN_JAL(addr) \
Expand All @@ -44,12 +45,12 @@ static inline void ftrace_dyn_arch_init_insns(void)

/* jal (ftrace_caller + 8), jump over the first two instruction */
buf = (u32 *)&insn_jal_ftrace_caller;
uasm_i_jal(&buf, (FTRACE_ADDR + 8));
uasm_i_jal(&buf, (FTRACE_ADDR + 8) & JUMP_RANGE_MASK);

#ifdef CONFIG_FUNCTION_GRAPH_TRACER
/* j ftrace_graph_caller */
buf = (u32 *)&insn_j_ftrace_graph_caller;
uasm_i_j(&buf, (unsigned long)ftrace_graph_caller);
uasm_i_j(&buf, (unsigned long)ftrace_graph_caller & JUMP_RANGE_MASK);
#endif
}

Expand Down
4 changes: 2 additions & 2 deletions arch/mips/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,8 @@ asmlinkage void do_syscall_trace(struct pt_regs *regs, int entryexit)
secure_computing(regs->regs[2]);

if (unlikely(current->audit_context) && entryexit)
audit_syscall_exit(AUDITSC_RESULT(regs->regs[2]),
regs->regs[2]);
audit_syscall_exit(AUDITSC_RESULT(regs->regs[7]),
-regs->regs[2]);

if (!(current->ptrace & PT_PTRACED))
goto out;
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/kernel/scall32-o32.S
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ einval: li v0, -ENOSYS
sys sys_ioprio_get 2 /* 4315 */
sys sys_utimensat 4
sys sys_signalfd 3
sys sys_ni_syscall 0
sys sys_ni_syscall 0 /* was timerfd */
sys sys_eventfd 1
sys sys_fallocate 6 /* 4320 */
sys sys_timerfd_create 2
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/kernel/scall64-64.S
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ sys_call_table:
PTR sys_ioprio_get
PTR sys_utimensat /* 5275 */
PTR sys_signalfd
PTR sys_ni_syscall
PTR sys_ni_syscall /* was timerfd */
PTR sys_eventfd
PTR sys_fallocate
PTR sys_timerfd_create /* 5280 */
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/kernel/scall64-n32.S
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ EXPORT(sysn32_call_table)
PTR sys_ioprio_get
PTR compat_sys_utimensat
PTR compat_sys_signalfd /* 6280 */
PTR sys_ni_syscall
PTR sys_ni_syscall /* was timerfd */
PTR sys_eventfd
PTR sys_fallocate
PTR sys_timerfd_create
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/kernel/scall64-o32.S
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ sys_call_table:
PTR sys_ioprio_get /* 4315 */
PTR compat_sys_utimensat
PTR compat_sys_signalfd
PTR sys_ni_syscall
PTR sys_ni_syscall /* was timerfd */
PTR sys_eventfd
PTR sys32_fallocate /* 4320 */
PTR sys_timerfd_create
Expand Down
1 change: 1 addition & 0 deletions arch/mips/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ SECTIONS
INIT_TASK_DATA(PAGE_SIZE)
NOSAVE_DATA
CACHELINE_ALIGNED_DATA(1 << CONFIG_MIPS_L1_CACHE_SHIFT)
READ_MOSTLY_DATA(1 << CONFIG_MIPS_L1_CACHE_SHIFT)
DATA_DATA
CONSTRUCTORS
}
Expand Down
5 changes: 3 additions & 2 deletions arch/mips/loongson/common/env.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ unsigned long memsize, highmemsize;

#define parse_even_earlier(res, option, p) \
do { \
int ret; \
unsigned int tmp __maybe_unused; \
\
if (strncmp(option, (char *)p, strlen(option)) == 0) \
ret = strict_strtol((char *)p + strlen(option"="), 10, &res); \
tmp = strict_strtol((char *)p + strlen(option"="), 10, &res); \
} while (0)

void __init prom_init_env(void)
Expand Down
2 changes: 0 additions & 2 deletions arch/mips/mm/c-r4k.c
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,6 @@ static int __cpuinit probe_scache(void)
unsigned long flags, addr, begin, end, pow2;
unsigned int config = read_c0_config();
struct cpuinfo_mips *c = &current_cpu_data;
int tmp;

if (config & CONF_SC)
return 0;
Expand Down Expand Up @@ -1108,7 +1107,6 @@ static int __cpuinit probe_scache(void)

/* Now search for the wrap around point. */
pow2 = (128 * 1024);
tmp = 0;
for (addr = begin + (128 * 1024); addr < end; addr = begin + pow2) {
cache_op(Index_Load_Tag_SD, addr);
__asm__ __volatile__("nop; nop; nop; nop;"); /* hazard... */
Expand Down
Loading

0 comments on commit 54b3335

Please sign in to comment.