Merge tag 'v3.10.90' into update
This is the 3.10.90 stable release
This commit is contained in:
@@ -74,6 +74,10 @@ config NO_IOPORT
|
||||
config STACKTRACE_SUPPORT
|
||||
def_bool y
|
||||
|
||||
config ILLEGAL_POINTER_VALUE
|
||||
hex
|
||||
default 0xdead000000000000
|
||||
|
||||
config LOCKDEP_SUPPORT
|
||||
def_bool y
|
||||
|
||||
|
||||
@@ -184,6 +184,11 @@ ENTRY(el2_setup)
|
||||
msr hstr_el2, xzr // Disable CP15 traps to EL2
|
||||
#endif
|
||||
|
||||
/* EL2 debug */
|
||||
mrs x0, pmcr_el0 // Disable debug access traps
|
||||
ubfx x0, x0, #11, #5 // to EL2 and allow access to
|
||||
msr mdcr_el2, x0 // all PMU counters from EL1
|
||||
|
||||
/* Stage-2 translation */
|
||||
msr vttbr_el2, xzr
|
||||
|
||||
|
||||
@@ -239,14 +239,32 @@ int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from)
|
||||
|
||||
/*
|
||||
* VFP save/restore code.
|
||||
*
|
||||
* We have to be careful with endianness, since the fpsimd context-switch
|
||||
* code operates on 128-bit (Q) register values whereas the compat ABI
|
||||
* uses an array of 64-bit (D) registers. Consequently, we need to swap
|
||||
* the two halves of each Q register when running on a big-endian CPU.
|
||||
*/
|
||||
union __fpsimd_vreg {
|
||||
__uint128_t raw;
|
||||
struct {
|
||||
#ifdef __AARCH64EB__
|
||||
u64 hi;
|
||||
u64 lo;
|
||||
#else
|
||||
u64 lo;
|
||||
u64 hi;
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
static int compat_preserve_vfp_context(struct compat_vfp_sigframe __user *frame)
|
||||
{
|
||||
struct fpsimd_state *fpsimd = ¤t->thread.fpsimd_state;
|
||||
compat_ulong_t magic = VFP_MAGIC;
|
||||
compat_ulong_t size = VFP_STORAGE_SIZE;
|
||||
compat_ulong_t fpscr, fpexc;
|
||||
int err = 0;
|
||||
int i, err = 0;
|
||||
|
||||
/*
|
||||
* Save the hardware registers to the fpsimd_state structure.
|
||||
@@ -262,10 +280,15 @@ static int compat_preserve_vfp_context(struct compat_vfp_sigframe __user *frame)
|
||||
/*
|
||||
* Now copy the FP registers. Since the registers are packed,
|
||||
* we can copy the prefix we want (V0-V15) as it is.
|
||||
* FIXME: Won't work if big endian.
|
||||
*/
|
||||
err |= __copy_to_user(&frame->ufp.fpregs, fpsimd->vregs,
|
||||
sizeof(frame->ufp.fpregs));
|
||||
for (i = 0; i < ARRAY_SIZE(frame->ufp.fpregs); i += 2) {
|
||||
union __fpsimd_vreg vreg = {
|
||||
.raw = fpsimd->vregs[i >> 1],
|
||||
};
|
||||
|
||||
__put_user_error(vreg.lo, &frame->ufp.fpregs[i], err);
|
||||
__put_user_error(vreg.hi, &frame->ufp.fpregs[i + 1], err);
|
||||
}
|
||||
|
||||
/* Create an AArch32 fpscr from the fpsr and the fpcr. */
|
||||
fpscr = (fpsimd->fpsr & VFP_FPSCR_STAT_MASK) |
|
||||
@@ -290,7 +313,7 @@ static int compat_restore_vfp_context(struct compat_vfp_sigframe __user *frame)
|
||||
compat_ulong_t magic = VFP_MAGIC;
|
||||
compat_ulong_t size = VFP_STORAGE_SIZE;
|
||||
compat_ulong_t fpscr;
|
||||
int err = 0;
|
||||
int i, err = 0;
|
||||
|
||||
__get_user_error(magic, &frame->magic, err);
|
||||
__get_user_error(size, &frame->size, err);
|
||||
@@ -300,12 +323,14 @@ static int compat_restore_vfp_context(struct compat_vfp_sigframe __user *frame)
|
||||
if (magic != VFP_MAGIC || size != VFP_STORAGE_SIZE)
|
||||
return -EINVAL;
|
||||
|
||||
/*
|
||||
* Copy the FP registers into the start of the fpsimd_state.
|
||||
* FIXME: Won't work if big endian.
|
||||
*/
|
||||
err |= __copy_from_user(fpsimd.vregs, frame->ufp.fpregs,
|
||||
sizeof(frame->ufp.fpregs));
|
||||
/* Copy the FP registers into the start of the fpsimd_state. */
|
||||
for (i = 0; i < ARRAY_SIZE(frame->ufp.fpregs); i += 2) {
|
||||
union __fpsimd_vreg vreg;
|
||||
|
||||
__get_user_error(vreg.lo, &frame->ufp.fpregs[i], err);
|
||||
__get_user_error(vreg.hi, &frame->ufp.fpregs[i + 1], err);
|
||||
fpsimd.vregs[i >> 1] = vreg.raw;
|
||||
}
|
||||
|
||||
/* Extract the fpsr and the fpcr from the fpscr */
|
||||
__get_user_error(fpscr, &frame->ufp.fpscr, err);
|
||||
|
||||
@@ -524,8 +524,8 @@ void do_cpu_irq_mask(struct pt_regs *regs)
|
||||
struct pt_regs *old_regs;
|
||||
unsigned long eirr_val;
|
||||
int irq, cpu = smp_processor_id();
|
||||
#ifdef CONFIG_SMP
|
||||
struct irq_desc *desc;
|
||||
#ifdef CONFIG_SMP
|
||||
cpumask_t dest;
|
||||
#endif
|
||||
|
||||
@@ -538,8 +538,12 @@ void do_cpu_irq_mask(struct pt_regs *regs)
|
||||
goto set_out;
|
||||
irq = eirr_to_irq(eirr_val);
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
/* Filter out spurious interrupts, mostly from serial port at bootup */
|
||||
desc = irq_to_desc(irq);
|
||||
if (unlikely(!desc->action))
|
||||
goto set_out;
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
cpumask_copy(&dest, desc->irq_data.affinity);
|
||||
if (irqd_is_per_cpu(&desc->irq_data) &&
|
||||
!cpu_isset(smp_processor_id(), dest)) {
|
||||
|
||||
@@ -130,7 +130,19 @@
|
||||
#define pte_iterate_hashed_end() } while(0)
|
||||
|
||||
#ifdef CONFIG_PPC_HAS_HASH_64K
|
||||
#define pte_pagesize_index(mm, addr, pte) get_slice_psize(mm, addr)
|
||||
/*
|
||||
* We expect this to be called only for user addresses or kernel virtual
|
||||
* addresses other than the linear mapping.
|
||||
*/
|
||||
#define pte_pagesize_index(mm, addr, pte) \
|
||||
({ \
|
||||
unsigned int psize; \
|
||||
if (is_kernel_addr(addr)) \
|
||||
psize = MMU_PAGE_4K; \
|
||||
else \
|
||||
psize = get_slice_psize(mm, addr); \
|
||||
psize; \
|
||||
})
|
||||
#else
|
||||
#define pte_pagesize_index(mm, addr, pte) MMU_PAGE_4K
|
||||
#endif
|
||||
|
||||
@@ -255,6 +255,7 @@ extern void rtas_power_off(void);
|
||||
extern void rtas_halt(void);
|
||||
extern void rtas_os_term(char *str);
|
||||
extern int rtas_get_sensor(int sensor, int index, int *state);
|
||||
extern int rtas_get_sensor_fast(int sensor, int index, int *state);
|
||||
extern int rtas_get_power_level(int powerdomain, int *level);
|
||||
extern int rtas_set_power_level(int powerdomain, int level, int *setlevel);
|
||||
extern bool rtas_indicator_present(int token, int *maxindex);
|
||||
|
||||
@@ -584,6 +584,23 @@ int rtas_get_sensor(int sensor, int index, int *state)
|
||||
}
|
||||
EXPORT_SYMBOL(rtas_get_sensor);
|
||||
|
||||
int rtas_get_sensor_fast(int sensor, int index, int *state)
|
||||
{
|
||||
int token = rtas_token("get-sensor-state");
|
||||
int rc;
|
||||
|
||||
if (token == RTAS_UNKNOWN_SERVICE)
|
||||
return -ENOENT;
|
||||
|
||||
rc = rtas_call(token, 2, 2, state, sensor, index);
|
||||
WARN_ON(rc == RTAS_BUSY || (rc >= RTAS_EXTENDED_DELAY_MIN &&
|
||||
rc <= RTAS_EXTENDED_DELAY_MAX));
|
||||
|
||||
if (rc < 0)
|
||||
return rtas_error_rc(rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
bool rtas_indicator_present(int token, int *maxindex)
|
||||
{
|
||||
int proplen, count, i;
|
||||
|
||||
@@ -187,7 +187,8 @@ static irqreturn_t ras_epow_interrupt(int irq, void *dev_id)
|
||||
int state;
|
||||
int critical;
|
||||
|
||||
status = rtas_get_sensor(EPOW_SENSOR_TOKEN, EPOW_SENSOR_INDEX, &state);
|
||||
status = rtas_get_sensor_fast(EPOW_SENSOR_TOKEN, EPOW_SENSOR_INDEX,
|
||||
&state);
|
||||
|
||||
if (state > 3)
|
||||
critical = 1; /* Time Critical */
|
||||
|
||||
@@ -137,6 +137,7 @@ page_table_range_init_count(unsigned long start, unsigned long end)
|
||||
|
||||
vaddr = start;
|
||||
pgd_idx = pgd_index(vaddr);
|
||||
pmd_idx = pmd_index(vaddr);
|
||||
|
||||
for ( ; (pgd_idx < PTRS_PER_PGD) && (vaddr != end); pgd_idx++) {
|
||||
for (; (pmd_idx < PTRS_PER_PMD) && (vaddr != end);
|
||||
|
||||
@@ -176,7 +176,12 @@ void bpf_jit_compile(struct sk_filter *fp)
|
||||
}
|
||||
cleanup_addr = proglen; /* epilogue address */
|
||||
|
||||
for (pass = 0; pass < 10; pass++) {
|
||||
/* JITed image shrinks with every pass and the loop iterates
|
||||
* until the image stops shrinking. Very large bpf programs
|
||||
* may converge on the last pass. In such case do one more
|
||||
* pass to emit the final image
|
||||
*/
|
||||
for (pass = 0; pass < 10 || image; pass++) {
|
||||
u8 seen_or_pass0 = (pass == 0) ? (SEEN_XREG | SEEN_DATAREF | SEEN_MEM) : seen;
|
||||
/* no prologue/epilogue for trivial filters (RET something) */
|
||||
proglen = 0;
|
||||
|
||||
Reference in New Issue
Block a user