Skip to content

Commit

Permalink
Merge pull request torvalds#218 from zandrey/5.4-2.2.x-imx
Browse files Browse the repository at this point in the history
Update 5.4-2.2.x-imx to v5.4.90
  • Loading branch information
otavio authored Jan 18, 2021
2 parents 36733e6 + 873af59 commit 5bf4994
Show file tree
Hide file tree
Showing 58 changed files with 453 additions and 238 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 5
PATCHLEVEL = 4
SUBLEVEL = 89
SUBLEVEL = 90
EXTRAVERSION =
NAME = Kleptomaniac Octopus

Expand Down
8 changes: 5 additions & 3 deletions arch/arm/mach-omap2/omap_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,12 @@ static int _omap_device_notifier_call(struct notifier_block *nb,
break;
case BUS_NOTIFY_BIND_DRIVER:
od = to_omap_device(pdev);
if (od && (od->_state == OMAP_DEVICE_STATE_ENABLED) &&
pm_runtime_status_suspended(dev)) {
if (od) {
od->_driver_status = BUS_NOTIFY_BIND_DRIVER;
pm_runtime_set_active(dev);
if (od->_state == OMAP_DEVICE_STATE_ENABLED &&
pm_runtime_status_suspended(dev)) {
pm_runtime_set_active(dev);
}
}
break;
case BUS_NOTIFY_ADD_DEVICE:
Expand Down
4 changes: 4 additions & 0 deletions arch/arm64/kvm/sys_regs.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,10 @@ static void reset_pmcr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *r)
{
u64 pmcr, val;

/* No PMU available, PMCR_EL0 may UNDEF... */
if (!kvm_arm_support_pmu_v3())
return;

pmcr = read_sysreg(pmcr_el0);
/*
* Writable bits of PMCR_EL0 (ARMV8_PMU_PMCR_MASK) are reset to UNKNOWN
Expand Down
3 changes: 2 additions & 1 deletion arch/x86/entry/entry_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -869,9 +869,10 @@ GLOBAL(__begin_SYSENTER_singlestep_region)
* Xen doesn't set %esp to be precisely what the normal SYSENTER
* entry point expects, so fix it up before using the normal path.
*/
ENTRY(xen_sysenter_target)
SYM_CODE_START(xen_sysenter_target)
addl $5*4, %esp /* remove xen-provided frame */
jmp .Lsysenter_past_esp
SYM_CODE_END(xen_sysenter_target)
#endif

/*
Expand Down
7 changes: 4 additions & 3 deletions arch/x86/kernel/acpi/wakeup_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
.code32
ALIGN

ENTRY(wakeup_pmode_return)
wakeup_pmode_return:
SYM_CODE_START(wakeup_pmode_return)
movw $__KERNEL_DS, %ax
movw %ax, %ss
movw %ax, %fs
Expand Down Expand Up @@ -39,6 +38,7 @@ wakeup_pmode_return:
# jump to place where we left off
movl saved_eip, %eax
jmp *%eax
SYM_CODE_END(wakeup_pmode_return)

bogus_magic:
jmp bogus_magic
Expand Down Expand Up @@ -72,7 +72,7 @@ restore_registers:
popfl
ret

ENTRY(do_suspend_lowlevel)
SYM_CODE_START(do_suspend_lowlevel)
call save_processor_state
call save_registers
pushl $3
Expand All @@ -87,6 +87,7 @@ ret_point:
call restore_registers
call restore_processor_state
ret
SYM_CODE_END(do_suspend_lowlevel)

.data
ALIGN
Expand Down
113 changes: 49 additions & 64 deletions arch/x86/kernel/cpu/resctrl/rdtgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -525,85 +525,70 @@ static void rdtgroup_remove(struct rdtgroup *rdtgrp)
kfree(rdtgrp);
}

struct task_move_callback {
struct callback_head work;
struct rdtgroup *rdtgrp;
};

static void move_myself(struct callback_head *head)
static void _update_task_closid_rmid(void *task)
{
struct task_move_callback *callback;
struct rdtgroup *rdtgrp;

callback = container_of(head, struct task_move_callback, work);
rdtgrp = callback->rdtgrp;

/*
* If resource group was deleted before this task work callback
* was invoked, then assign the task to root group and free the
* resource group.
* If the task is still current on this CPU, update PQR_ASSOC MSR.
* Otherwise, the MSR is updated when the task is scheduled in.
*/
if (atomic_dec_and_test(&rdtgrp->waitcount) &&
(rdtgrp->flags & RDT_DELETED)) {
current->closid = 0;
current->rmid = 0;
rdtgroup_remove(rdtgrp);
}

preempt_disable();
/* update PQR_ASSOC MSR to make resource group go into effect */
resctrl_sched_in();
preempt_enable();
if (task == current)
resctrl_sched_in();
}

kfree(callback);
static void update_task_closid_rmid(struct task_struct *t)
{
if (IS_ENABLED(CONFIG_SMP) && task_curr(t))
smp_call_function_single(task_cpu(t), _update_task_closid_rmid, t, 1);
else
_update_task_closid_rmid(t);
}

static int __rdtgroup_move_task(struct task_struct *tsk,
struct rdtgroup *rdtgrp)
{
struct task_move_callback *callback;
int ret;

callback = kzalloc(sizeof(*callback), GFP_KERNEL);
if (!callback)
return -ENOMEM;
callback->work.func = move_myself;
callback->rdtgrp = rdtgrp;
/* If the task is already in rdtgrp, no need to move the task. */
if ((rdtgrp->type == RDTCTRL_GROUP && tsk->closid == rdtgrp->closid &&
tsk->rmid == rdtgrp->mon.rmid) ||
(rdtgrp->type == RDTMON_GROUP && tsk->rmid == rdtgrp->mon.rmid &&
tsk->closid == rdtgrp->mon.parent->closid))
return 0;

/*
* Take a refcount, so rdtgrp cannot be freed before the
* callback has been invoked.
* Set the task's closid/rmid before the PQR_ASSOC MSR can be
* updated by them.
*
* For ctrl_mon groups, move both closid and rmid.
* For monitor groups, can move the tasks only from
* their parent CTRL group.
*/
atomic_inc(&rdtgrp->waitcount);
ret = task_work_add(tsk, &callback->work, true);
if (ret) {
/*
* Task is exiting. Drop the refcount and free the callback.
* No need to check the refcount as the group cannot be
* deleted before the write function unlocks rdtgroup_mutex.
*/
atomic_dec(&rdtgrp->waitcount);
kfree(callback);
rdt_last_cmd_puts("Task exited\n");
} else {
/*
* For ctrl_mon groups move both closid and rmid.
* For monitor groups, can move the tasks only from
* their parent CTRL group.
*/
if (rdtgrp->type == RDTCTRL_GROUP) {
tsk->closid = rdtgrp->closid;

if (rdtgrp->type == RDTCTRL_GROUP) {
tsk->closid = rdtgrp->closid;
tsk->rmid = rdtgrp->mon.rmid;
} else if (rdtgrp->type == RDTMON_GROUP) {
if (rdtgrp->mon.parent->closid == tsk->closid) {
tsk->rmid = rdtgrp->mon.rmid;
} else if (rdtgrp->type == RDTMON_GROUP) {
if (rdtgrp->mon.parent->closid == tsk->closid) {
tsk->rmid = rdtgrp->mon.rmid;
} else {
rdt_last_cmd_puts("Can't move task to different control group\n");
ret = -EINVAL;
}
} else {
rdt_last_cmd_puts("Can't move task to different control group\n");
return -EINVAL;
}
}
return ret;

/*
* Ensure the task's closid and rmid are written before determining if
* the task is current that will decide if it will be interrupted.
*/
barrier();

/*
* By now, the task's closid and rmid are set. If the task is current
* on a CPU, the PQR_ASSOC MSR needs to be updated to make the resource
* group go into effect. If the task is not current, the MSR will be
* updated when the task is scheduled in.
*/
update_task_closid_rmid(tsk);

return 0;
}

/**
Expand Down
3 changes: 2 additions & 1 deletion arch/x86/kernel/ftrace_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ WEAK(ftrace_stub)
ret
END(ftrace_caller)

ENTRY(ftrace_regs_caller)
SYM_CODE_START(ftrace_regs_caller)
/*
* We're here from an mcount/fentry CALL, and the stack frame looks like:
*
Expand Down Expand Up @@ -163,6 +163,7 @@ GLOBAL(ftrace_regs_call)
popl %eax

jmp .Lftrace_ret
SYM_CODE_END(ftrace_regs_caller)

#ifdef CONFIG_FUNCTION_GRAPH_TRACER
ENTRY(ftrace_graph_caller)
Expand Down
3 changes: 2 additions & 1 deletion arch/x86/kernel/head_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ RESERVE_BRK(pagetables, INIT_MAP_SIZE)
* can.
*/
__HEAD
ENTRY(startup_32)
SYM_CODE_START(startup_32)
movl pa(initial_stack),%ecx

/* test KEEP_SEGMENTS flag to see if the bootloader is asking
Expand Down Expand Up @@ -172,6 +172,7 @@ num_subarch_entries = (. - subarch_entries) / 4
#else
jmp .Ldefault_entry
#endif /* CONFIG_PARAVIRT */
SYM_CODE_END(startup_32)

#ifdef CONFIG_HOTPLUG_CPU
/*
Expand Down
6 changes: 4 additions & 2 deletions arch/x86/power/hibernate_asm_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ENTRY(swsusp_arch_suspend)
ret
ENDPROC(swsusp_arch_suspend)

ENTRY(restore_image)
SYM_CODE_START(restore_image)
/* prepare to jump to the image kernel */
movl restore_jump_address, %ebx
movl restore_cr3, %ebp
Expand All @@ -45,9 +45,10 @@ ENTRY(restore_image)
/* jump to relocated restore code */
movl relocated_restore_code, %eax
jmpl *%eax
SYM_CODE_END(restore_image)

/* code below has been relocated to a safe page */
ENTRY(core_restore_code)
SYM_CODE_START(core_restore_code)
movl temp_pgt, %eax
movl %eax, %cr3

Expand Down Expand Up @@ -77,6 +78,7 @@ copy_loop:

done:
jmpl *%ebx
SYM_CODE_END(core_restore_code)

/* code below belongs to the image kernel */
.align PAGE_SIZE
Expand Down
6 changes: 4 additions & 2 deletions arch/x86/realmode/rm/trampoline_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
.code16

.balign PAGE_SIZE
ENTRY(trampoline_start)
SYM_CODE_START(trampoline_start)
wbinvd # Needed for NUMA-Q should be harmless for others

LJMPW_RM(1f)
Expand All @@ -54,11 +54,13 @@ ENTRY(trampoline_start)
lmsw %dx # into protected mode

ljmpl $__BOOT_CS, $pa_startup_32
SYM_CODE_END(trampoline_start)

.section ".text32","ax"
.code32
ENTRY(startup_32) # note: also used from wakeup_asm.S
SYM_CODE_START(startup_32) # note: also used from wakeup_asm.S
jmp *%eax
SYM_CODE_END(startup_32)

.bss
.balign 8
Expand Down
7 changes: 4 additions & 3 deletions arch/x86/xen/xen-asm_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
_ASM_EXTABLE(1b,2b)
.endm

ENTRY(xen_iret)
SYM_CODE_START(xen_iret)
/* test eflags for special cases */
testl $(X86_EFLAGS_VM | XEN_EFLAGS_NMI), 8(%esp)
jnz hyper_iret
Expand Down Expand Up @@ -122,6 +122,7 @@ xen_iret_end_crit:
hyper_iret:
/* put this out of line since its very rarely used */
jmp hypercall_page + __HYPERVISOR_iret * 32
SYM_CODE_END(xen_iret)

.globl xen_iret_start_crit, xen_iret_end_crit

Expand Down Expand Up @@ -152,7 +153,7 @@ hyper_iret:
* The only caveat is that if the outer eax hasn't been restored yet (i.e.
* it's still on stack), we need to restore its value here.
*/
ENTRY(xen_iret_crit_fixup)
SYM_CODE_START(xen_iret_crit_fixup)
/*
* Paranoia: Make sure we're really coming from kernel space.
* One could imagine a case where userspace jumps into the
Expand All @@ -179,4 +180,4 @@ ENTRY(xen_iret_crit_fixup)

2:
ret
END(xen_iret_crit_fixup)
SYM_CODE_END(xen_iret_crit_fixup)
9 changes: 6 additions & 3 deletions block/genhd.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,14 +222,17 @@ struct hd_struct *disk_part_iter_next(struct disk_part_iter *piter)
part = rcu_dereference(ptbl->part[piter->idx]);
if (!part)
continue;
get_device(part_to_dev(part));
piter->part = part;
if (!part_nr_sects_read(part) &&
!(piter->flags & DISK_PITER_INCL_EMPTY) &&
!(piter->flags & DISK_PITER_INCL_EMPTY_PART0 &&
piter->idx == 0))
piter->idx == 0)) {
put_device(part_to_dev(part));
piter->part = NULL;
continue;
}

get_device(part_to_dev(part));
piter->part = part;
piter->idx += inc;
break;
}
Expand Down
9 changes: 7 additions & 2 deletions drivers/base/regmap/regmap-debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -583,18 +583,23 @@ void regmap_debugfs_init(struct regmap *map, const char *name)
devname = dev_name(map->dev);

if (name) {
map->debugfs_name = kasprintf(GFP_KERNEL, "%s-%s",
if (!map->debugfs_name) {
map->debugfs_name = kasprintf(GFP_KERNEL, "%s-%s",
devname, name);
if (!map->debugfs_name)
return;
}
name = map->debugfs_name;
} else {
name = devname;
}

if (!strcmp(name, "dummy")) {
kfree(map->debugfs_name);

map->debugfs_name = kasprintf(GFP_KERNEL, "dummy%d",
dummy_index);
if (!map->debugfs_name)
return;
name = map->debugfs_name;
dummy_index++;
}
Expand Down
1 change: 1 addition & 0 deletions drivers/block/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ config BLK_DEV_RBD
config BLK_DEV_RSXX
tristate "IBM Flash Adapter 900GB Full Height PCIe Device Driver"
depends on PCI
select CRC32
help
Device driver for IBM's high speed PCIe SSD
storage device: Flash Adapter 900GB Full Height.
Expand Down
Loading

0 comments on commit 5bf4994

Please sign in to comment.