Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5ce2955e authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull MIPS fixes from Ralf Baechle:
 "Various fixes across the tree.  The modpost error due to
  virt_addr_valid() not being usable from modules required a number of
  preparatory cleanups so a clean fix was possible."

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
  MIPS: 64-bit: Fix build if !CONFIG_MODULES
  MIPS: Wire up finit_module syscall.
  MIPS: Fix modpost error in modules attepting to use virt_addr_valid().
  MIPS: page.h: Remove now unnecessary #ifndef __ASSEMBLY__ wrapper.
  MIPS: Switch remaining assembler PAGE_SIZE users to <asm/asm-offsets.h>.
  MIPS: Include PAGE_S{IZE,HIFT} in <asm/offset.h>.
  MIPS: Don't include <asm/page.h> unnecessarily.
  MIPS: Fix comment.
  Revert "MIPS: Optimise TLB handlers for MIPS32/64 R2 cores."
  MIPS: perf: Fix build failure in XLP perf support.
  MIPS: Alchemy: Make 32kHz and r4k timer coexist peacefully
parents d0631c6e 2f12fb20
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -39,8 +39,8 @@ config MIPS
	select GENERIC_CLOCKEVENTS
	select GENERIC_CMOS_UPDATE
	select HAVE_MOD_ARCH_SPECIFIC
	select MODULES_USE_ELF_REL
	select MODULES_USE_ELF_RELA if 64BIT
	select MODULES_USE_ELF_REL if MODULES
	select MODULES_USE_ELF_RELA if MODULES && 64BIT

menu "Machine selection"

+5 −20
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ static struct clocksource au1x_counter1_clocksource = {
	.read		= au1x_counter1_read,
	.mask		= CLOCKSOURCE_MASK(32),
	.flags		= CLOCK_SOURCE_IS_CONTINUOUS,
	.rating		= 100,
	.rating		= 1500,
};

static int au1x_rtcmatch2_set_next_event(unsigned long delta,
@@ -84,7 +84,7 @@ static irqreturn_t au1x_rtcmatch2_irq(int irq, void *dev_id)
static struct clock_event_device au1x_rtcmatch2_clockdev = {
	.name		= "rtcmatch2",
	.features	= CLOCK_EVT_FEAT_ONESHOT,
	.rating		= 100,
	.rating		= 1500,
	.set_next_event	= au1x_rtcmatch2_set_next_event,
	.set_mode	= au1x_rtcmatch2_set_mode,
	.cpumask	= cpu_all_mask,
@@ -158,20 +158,6 @@ static int __init alchemy_time_init(unsigned int m2int)
	return -1;
}

static void __init alchemy_setup_c0timer(void)
{
	/*
	 * MIPS kernel assigns 'au1k_wait' to 'cpu_wait' before this
	 * function is called.  Because the Alchemy counters are unusable
	 * the C0 timekeeping code is installed and use of the 'wait'
	 * instruction must be prohibited, which is done most easily by
	 * assigning NULL to cpu_wait.
	 */
	cpu_wait = NULL;
	r4k_clockevent_init();
	init_r4k_clocksource();
}

static int alchemy_m2inttab[] __initdata = {
	AU1000_RTC_MATCH2_INT,
	AU1500_RTC_MATCH2_INT,
@@ -186,8 +172,7 @@ void __init plat_time_init(void)
	int t;

	t = alchemy_get_cputype();
	if (t == ALCHEMY_CPU_UNKNOWN)
		alchemy_setup_c0timer();
	else if (alchemy_time_init(alchemy_m2inttab[t]))
		alchemy_setup_c0timer();
	if (t == ALCHEMY_CPU_UNKNOWN ||
	    alchemy_time_init(alchemy_m2inttab[t]))
		cpu_wait = NULL;	/* wait doesn't work with r4k timer */
}
+4 −5
Original line number Diff line number Diff line
@@ -45,8 +45,6 @@
#define HUGETLB_PAGE_ORDER	({BUILD_BUG(); 0; })
#endif /* CONFIG_MIPS_HUGE_TLB_SUPPORT */

#ifndef __ASSEMBLY__

#include <linux/pfn.h>
#include <asm/io.h>

@@ -139,8 +137,6 @@ typedef struct { unsigned long pgprot; } pgprot_t;
 */
#define ptep_buddy(x)	((pte_t *)((unsigned long)(x) ^ sizeof(pte_t)))

#endif /* !__ASSEMBLY__ */

/*
 * __pa()/__va() should be used only during mem init.
 */
@@ -202,7 +198,10 @@ typedef struct { unsigned long pgprot; } pgprot_t;
#endif

#define virt_to_page(kaddr)	pfn_to_page(PFN_DOWN(virt_to_phys(kaddr)))
#define virt_addr_valid(kaddr)	pfn_valid(PFN_DOWN(virt_to_phys(kaddr)))

extern int __virt_addr_valid(const volatile void *kaddr);
#define virt_addr_valid(kaddr)						\
	__virt_addr_valid((const volatile void *) (kaddr))

#define VM_DATA_DEFAULT_FLAGS	(VM_READ | VM_WRITE | VM_EXEC | \
				 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
+5 −4
Original line number Diff line number Diff line
@@ -29,9 +29,10 @@ struct thread_info {
	__u32			cpu;		/* current CPU */
	int			preempt_count;	/* 0 => preemptable, <0 => BUG */

	mm_segment_t		addr_limit;	/* thread address space:
						   0-0xBFFFFFFF for user-thead
						   0-0xFFFFFFFF for kernel-thread
	mm_segment_t		addr_limit;	/*
						 * thread address space limit:
						 * 0x7fffffff for user-thead
						 * 0xffffffff for kernel-thread
						 */
	struct restart_block	restart_block;
	struct pt_regs		*regs;
+9 −6
Original line number Diff line number Diff line
@@ -368,16 +368,17 @@
#define __NR_process_vm_readv		(__NR_Linux + 345)
#define __NR_process_vm_writev		(__NR_Linux + 346)
#define __NR_kcmp			(__NR_Linux + 347)
#define __NR_finit_module		(__NR_Linux + 348)

/*
 * Offset of the last Linux o32 flavoured syscall
 */
#define __NR_Linux_syscalls		347
#define __NR_Linux_syscalls		348

#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */

#define __NR_O32_Linux			4000
#define __NR_O32_Linux_syscalls		347
#define __NR_O32_Linux_syscalls		348

#if _MIPS_SIM == _MIPS_SIM_ABI64

@@ -692,16 +693,17 @@
#define __NR_process_vm_readv		(__NR_Linux + 304)
#define __NR_process_vm_writev		(__NR_Linux + 305)
#define __NR_kcmp			(__NR_Linux + 306)
#define __NR_finit_module		(__NR_Linux + 307)

/*
 * Offset of the last Linux 64-bit flavoured syscall
 */
#define __NR_Linux_syscalls		306
#define __NR_Linux_syscalls		307

#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */

#define __NR_64_Linux			5000
#define __NR_64_Linux_syscalls		306
#define __NR_64_Linux_syscalls		307

#if _MIPS_SIM == _MIPS_SIM_NABI32

@@ -1021,15 +1023,16 @@
#define __NR_process_vm_readv		(__NR_Linux + 309)
#define __NR_process_vm_writev		(__NR_Linux + 310)
#define __NR_kcmp			(__NR_Linux + 311)
#define __NR_finit_module		(__NR_Linux + 312)

/*
 * Offset of the last N32 flavoured syscall
 */
#define __NR_Linux_syscalls		311
#define __NR_Linux_syscalls		312

#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */

#define __NR_N32_Linux			6000
#define __NR_N32_Linux_syscalls		311
#define __NR_N32_Linux_syscalls		312

#endif /* _UAPI_ASM_UNISTD_H */
Loading