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

Commit 8b65bb57 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull sparc fixes from David Miller:
 "Several fixes here, mostly having to due with either build errors or
  memory corruptions depending upon whether you have THP enabled or not"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc: remove unused wp_works_ok macro
  sparc32: Export vac_cache_size to fix build error
  sparc64: Fix memory corruption when THP is enabled
  sparc64: Fix kernel panic due to erroneous #ifdef surrounding pmd_write()
  arch/sparc: Avoid DCTI Couples
  sparc64: kern_addr_valid regression
  sparc64: Add support for 2G hugepages
  sparc64: Fix size check in huge_pte_alloc
parents 542380a2 86e1066f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@

#define HPAGE_SHIFT		23
#define REAL_HPAGE_SHIFT	22
#define HPAGE_2GB_SHIFT		31
#define HPAGE_256MB_SHIFT	28
#define HPAGE_64K_SHIFT		16
#define REAL_HPAGE_SIZE		(_AC(1,UL) << REAL_HPAGE_SHIFT)
@@ -27,7 +28,7 @@
#define HUGETLB_PAGE_ORDER	(HPAGE_SHIFT - PAGE_SHIFT)
#define HAVE_ARCH_HUGETLB_UNMAPPED_AREA
#define REAL_HPAGE_PER_HPAGE	(_AC(1,UL) << (HPAGE_SHIFT - REAL_HPAGE_SHIFT))
#define HUGE_MAX_HSTATE		3
#define HUGE_MAX_HSTATE		4
#endif

#ifndef __ASSEMBLY__
+8 −7
Original line number Diff line number Diff line
@@ -679,26 +679,27 @@ static inline unsigned long pmd_pfn(pmd_t pmd)
	return pte_pfn(pte);
}

#ifdef CONFIG_TRANSPARENT_HUGEPAGE
static inline unsigned long pmd_dirty(pmd_t pmd)
#define __HAVE_ARCH_PMD_WRITE
static inline unsigned long pmd_write(pmd_t pmd)
{
	pte_t pte = __pte(pmd_val(pmd));

	return pte_dirty(pte);
	return pte_write(pte);
}

static inline unsigned long pmd_young(pmd_t pmd)
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
static inline unsigned long pmd_dirty(pmd_t pmd)
{
	pte_t pte = __pte(pmd_val(pmd));

	return pte_young(pte);
	return pte_dirty(pte);
}

static inline unsigned long pmd_write(pmd_t pmd)
static inline unsigned long pmd_young(pmd_t pmd)
{
	pte_t pte = __pte(pmd_val(pmd));

	return pte_write(pte);
	return pte_young(pte);
}

static inline unsigned long pmd_trans_huge(pmd_t pmd)
+0 −6
Original line number Diff line number Diff line
@@ -18,12 +18,6 @@
#include <asm/signal.h>
#include <asm/page.h>

/*
 * The sparc has no problems with write protection
 */
#define wp_works_ok 1
#define wp_works_ok__is_a_macro /* for versions in ksyms.c */

/* Whee, this is STACK_TOP + PAGE_SIZE and the lowest kernel address too...
 * That one page is used to protect kernel from intruders, so that
 * we can make our access_ok test faster
+0 −4
Original line number Diff line number Diff line
@@ -18,10 +18,6 @@
#include <asm/ptrace.h>
#include <asm/page.h>

/* The sparc has no problems with write protection */
#define wp_works_ok 1
#define wp_works_ok__is_a_macro /* for versions in ksyms.c */

/*
 * User lives in his very own context, and cannot reference us. Note
 * that TASK_SIZE is a misnomer, it really gives maximum user virtual
+4 −0
Original line number Diff line number Diff line
@@ -96,6 +96,7 @@ sparc64_boot:
	andn	%g1, PSTATE_AM, %g1
	wrpr	%g1, 0x0, %pstate
	ba,a,pt	%xcc, 1f
	 nop

	.globl	prom_finddev_name, prom_chosen_path, prom_root_node
	.globl	prom_getprop_name, prom_mmu_name, prom_peer_name
@@ -613,6 +614,7 @@ niagara_tlb_fixup:
	 nop

	ba,a,pt	%xcc, 80f
	 nop
niagara4_patch:
	call	niagara4_patch_copyops
	 nop
@@ -622,6 +624,7 @@ niagara4_patch:
	 nop

	ba,a,pt	%xcc, 80f
	 nop

niagara2_patch:
	call	niagara2_patch_copyops
@@ -632,6 +635,7 @@ niagara2_patch:
	 nop

	ba,a,pt	%xcc, 80f
	 nop

niagara_patch:
	call	niagara_patch_copyops
Loading