Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm
Pull ARM fixes from Russell King: "Small set of fixes again." * 'fixes' of git://git.linaro.org/people/rmk/linux-arm: ARM: 7419/1: vfp: fix VFP flushing regression on sigreturn path ARM: 7418/1: LPAE: fix access flag setup in mem_type_table ARM: prevent VM_GROWSDOWN mmaps extending below FIRST_USER_ADDRESS ARM: 7417/1: vfp: ensure preemption is disabled when enabling VFP access
This commit is contained in:
@@ -247,7 +247,9 @@ good_area:
|
|||||||
return handle_mm_fault(mm, vma, addr & PAGE_MASK, flags);
|
return handle_mm_fault(mm, vma, addr & PAGE_MASK, flags);
|
||||||
|
|
||||||
check_stack:
|
check_stack:
|
||||||
if (vma->vm_flags & VM_GROWSDOWN && !expand_stack(vma, addr))
|
/* Don't allow expansion below FIRST_USER_ADDRESS */
|
||||||
|
if (vma->vm_flags & VM_GROWSDOWN &&
|
||||||
|
addr >= FIRST_USER_ADDRESS && !expand_stack(vma, addr))
|
||||||
goto good_area;
|
goto good_area;
|
||||||
out:
|
out:
|
||||||
return fault;
|
return fault;
|
||||||
|
@@ -489,7 +489,8 @@ static void __init build_mem_type_table(void)
|
|||||||
*/
|
*/
|
||||||
for (i = 0; i < ARRAY_SIZE(mem_types); i++) {
|
for (i = 0; i < ARRAY_SIZE(mem_types); i++) {
|
||||||
mem_types[i].prot_pte |= PTE_EXT_AF;
|
mem_types[i].prot_pte |= PTE_EXT_AF;
|
||||||
mem_types[i].prot_sect |= PMD_SECT_AF;
|
if (mem_types[i].prot_sect)
|
||||||
|
mem_types[i].prot_sect |= PMD_SECT_AF;
|
||||||
}
|
}
|
||||||
kern_pgprot |= PTE_EXT_AF;
|
kern_pgprot |= PTE_EXT_AF;
|
||||||
vecs_pgprot |= PTE_EXT_AF;
|
vecs_pgprot |= PTE_EXT_AF;
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/cpu.h>
|
#include <linux/cpu.h>
|
||||||
#include <linux/cpu_pm.h>
|
#include <linux/cpu_pm.h>
|
||||||
|
#include <linux/hardirq.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/notifier.h>
|
#include <linux/notifier.h>
|
||||||
#include <linux/signal.h>
|
#include <linux/signal.h>
|
||||||
@@ -432,7 +433,10 @@ void VFP_bounce(u32 trigger, u32 fpexc, struct pt_regs *regs)
|
|||||||
|
|
||||||
static void vfp_enable(void *unused)
|
static void vfp_enable(void *unused)
|
||||||
{
|
{
|
||||||
u32 access = get_copro_access();
|
u32 access;
|
||||||
|
|
||||||
|
BUG_ON(preemptible());
|
||||||
|
access = get_copro_access();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Enable full access to VFP (cp10 and cp11)
|
* Enable full access to VFP (cp10 and cp11)
|
||||||
@@ -573,12 +577,6 @@ int vfp_preserve_user_clear_hwstate(struct user_vfp __user *ufp,
|
|||||||
* entry.
|
* entry.
|
||||||
*/
|
*/
|
||||||
hwstate->fpscr &= ~(FPSCR_LENGTH_MASK | FPSCR_STRIDE_MASK);
|
hwstate->fpscr &= ~(FPSCR_LENGTH_MASK | FPSCR_STRIDE_MASK);
|
||||||
|
|
||||||
/*
|
|
||||||
* Disable VFP in the hwstate so that we can detect if it gets
|
|
||||||
* used.
|
|
||||||
*/
|
|
||||||
hwstate->fpexc &= ~FPEXC_EN;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -591,12 +589,8 @@ int vfp_restore_user_hwstate(struct user_vfp __user *ufp,
|
|||||||
unsigned long fpexc;
|
unsigned long fpexc;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
|
||||||
/*
|
/* Disable VFP to avoid corrupting the new thread state. */
|
||||||
* If VFP has been used, then disable it to avoid corrupting
|
vfp_flush_hwstate(thread);
|
||||||
* the new thread state.
|
|
||||||
*/
|
|
||||||
if (hwstate->fpexc & FPEXC_EN)
|
|
||||||
vfp_flush_hwstate(thread);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copy the floating point registers. There can be unused
|
* Copy the floating point registers. There can be unused
|
||||||
@@ -657,7 +651,7 @@ static int __init vfp_init(void)
|
|||||||
unsigned int cpu_arch = cpu_architecture();
|
unsigned int cpu_arch = cpu_architecture();
|
||||||
|
|
||||||
if (cpu_arch >= CPU_ARCH_ARMv6)
|
if (cpu_arch >= CPU_ARCH_ARMv6)
|
||||||
vfp_enable(NULL);
|
on_each_cpu(vfp_enable, NULL, 1);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* First check that there is a VFP that we can use.
|
* First check that there is a VFP that we can use.
|
||||||
@@ -678,8 +672,6 @@ static int __init vfp_init(void)
|
|||||||
} else {
|
} else {
|
||||||
hotcpu_notifier(vfp_hotplug, 0);
|
hotcpu_notifier(vfp_hotplug, 0);
|
||||||
|
|
||||||
smp_call_function(vfp_enable, NULL, 1);
|
|
||||||
|
|
||||||
VFP_arch = (vfpsid & FPSID_ARCH_MASK) >> FPSID_ARCH_BIT; /* Extract the architecture version */
|
VFP_arch = (vfpsid & FPSID_ARCH_MASK) >> FPSID_ARCH_BIT; /* Extract the architecture version */
|
||||||
printk("implementor %02x architecture %d part %02x variant %x rev %x\n",
|
printk("implementor %02x architecture %d part %02x variant %x rev %x\n",
|
||||||
(vfpsid & FPSID_IMPLEMENTER_MASK) >> FPSID_IMPLEMENTER_BIT,
|
(vfpsid & FPSID_IMPLEMENTER_MASK) >> FPSID_IMPLEMENTER_BIT,
|
||||||
|
Reference in New Issue
Block a user