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

Commit 83da00fb authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull two sparc fixes from David Miller:

 1) Fix boots with gcc-4.9 compiled sparc64 kernels.

 2) Add missing __get_user_pages_fast() on sparc64 to fix hangs on
    futexes used in transparent hugepage areas.

    It's really idiotic to have a weak symbolled fallback that just
    returns zero, and causes this kind of bug.  There should be no
    backup implementation and the link should fail if the architecture
    fails to provide __get_user_pages_fast() and supports transparent
    hugepages.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc64: Implement __get_user_pages_fast().
  sparc64: Fix register corruption in top-most kernel stack frame during boot.
parents 96971e9a 06090e8e
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -62,7 +62,8 @@ struct linux_mem_p1275 {
/* You must call prom_init() before using any of the library services,
/* You must call prom_init() before using any of the library services,
 * preferably as early as possible.  Pass it the romvec pointer.
 * preferably as early as possible.  Pass it the romvec pointer.
 */
 */
void prom_init(void *cif_handler, void *cif_stack);
void prom_init(void *cif_handler);
void prom_init_report(void);


/* Boot argument acquisition, returns the boot command line string. */
/* Boot argument acquisition, returns the boot command line string. */
char *prom_getbootargs(void);
char *prom_getbootargs(void);
+2 −0
Original line number Original line Diff line number Diff line
@@ -48,6 +48,8 @@ unsigned long safe_compute_effective_address(struct pt_regs *, unsigned int);
#endif
#endif


#ifdef CONFIG_SPARC64
#ifdef CONFIG_SPARC64
void __init start_early_boot(void);

/* unaligned_64.c */
/* unaligned_64.c */
int handle_ldf_stq(u32 insn, struct pt_regs *regs);
int handle_ldf_stq(u32 insn, struct pt_regs *regs);
void handle_ld_nf(u32 insn, struct pt_regs *regs);
void handle_ld_nf(u32 insn, struct pt_regs *regs);
+0 −3
Original line number Original line Diff line number Diff line
@@ -65,13 +65,10 @@ struct pause_patch_entry {
extern struct pause_patch_entry __pause_3insn_patch,
extern struct pause_patch_entry __pause_3insn_patch,
	__pause_3insn_patch_end;
	__pause_3insn_patch_end;


void __init per_cpu_patch(void);
void sun4v_patch_1insn_range(struct sun4v_1insn_patch_entry *,
void sun4v_patch_1insn_range(struct sun4v_1insn_patch_entry *,
			     struct sun4v_1insn_patch_entry *);
			     struct sun4v_1insn_patch_entry *);
void sun4v_patch_2insn_range(struct sun4v_2insn_patch_entry *,
void sun4v_patch_2insn_range(struct sun4v_2insn_patch_entry *,
			     struct sun4v_2insn_patch_entry *);
			     struct sun4v_2insn_patch_entry *);
void __init sun4v_patch(void);
void __init boot_cpu_id_too_large(int cpu);
extern unsigned int dcache_parity_tl1_occurred;
extern unsigned int dcache_parity_tl1_occurred;
extern unsigned int icache_parity_tl1_occurred;
extern unsigned int icache_parity_tl1_occurred;


+4 −36
Original line number Original line Diff line number Diff line
@@ -672,14 +672,12 @@ tlb_fixup_done:
	sethi	%hi(init_thread_union), %g6
	sethi	%hi(init_thread_union), %g6
	or	%g6, %lo(init_thread_union), %g6
	or	%g6, %lo(init_thread_union), %g6
	ldx	[%g6 + TI_TASK], %g4
	ldx	[%g6 + TI_TASK], %g4
	mov	%sp, %l6


	wr	%g0, ASI_P, %asi
	wr	%g0, ASI_P, %asi
	mov	1, %g1
	mov	1, %g1
	sllx	%g1, THREAD_SHIFT, %g1
	sllx	%g1, THREAD_SHIFT, %g1
	sub	%g1, (STACKFRAME_SZ + STACK_BIAS), %g1
	sub	%g1, (STACKFRAME_SZ + STACK_BIAS), %g1
	add	%g6, %g1, %sp
	add	%g6, %g1, %sp
	mov	0, %fp


	/* Set per-cpu pointer initially to zero, this makes
	/* Set per-cpu pointer initially to zero, this makes
	 * the boot-cpu use the in-kernel-image per-cpu areas
	 * the boot-cpu use the in-kernel-image per-cpu areas
@@ -706,44 +704,14 @@ tlb_fixup_done:
	 nop
	 nop
#endif
#endif


	mov	%l6, %o1			! OpenPROM stack
	call	prom_init
	call	prom_init
	 mov	%l7, %o0			! OpenPROM cif handler
	 mov	%l7, %o0			! OpenPROM cif handler


	/* Initialize current_thread_info()->cpu as early as possible.
	/* To create a one-register-window buffer between the kernel's
	 * In order to do that accurately we have to patch up the get_cpuid()
	 * initial stack and the last stack frame we use from the firmware,
	 * assembler sequences.  And that, in turn, requires that we know
	 * do the rest of the boot from a C helper function.
	 * if we are on a Starfire box or not.  While we're here, patch up
	 * the sun4v sequences as well.
	 */
	 */
	call	check_if_starfire
	call	start_early_boot
	 nop
	call	per_cpu_patch
	 nop
	call	sun4v_patch
	 nop

#ifdef CONFIG_SMP
	call	hard_smp_processor_id
	 nop
	cmp	%o0, NR_CPUS
	blu,pt	%xcc, 1f
	 nop
	call	boot_cpu_id_too_large
	 nop
	/* Not reached... */

1:
#else
	mov	0, %o0
#endif
	sth	%o0, [%g6 + TI_CPU]

	call	prom_init_report
	 nop

	/* Off we go.... */
	call	start_kernel
	 nop
	 nop
	/* Not reached... */
	/* Not reached... */


+0 −1
Original line number Original line Diff line number Diff line
@@ -109,7 +109,6 @@ hv_cpu_startup:
	sllx		%g5, THREAD_SHIFT, %g5
	sllx		%g5, THREAD_SHIFT, %g5
	sub		%g5, (STACKFRAME_SZ + STACK_BIAS), %g5
	sub		%g5, (STACKFRAME_SZ + STACK_BIAS), %g5
	add		%g6, %g5, %sp
	add		%g6, %g5, %sp
	mov		0, %fp


	call		init_irqwork_curcpu
	call		init_irqwork_curcpu
	 nop
	 nop
Loading