Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from torvalds:master #315

Merged
merged 24 commits into from
Nov 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
33b6c39
Input: adxl34x - clean up a data type in adxl34x_probe()
Oct 27, 2020
b188458
Input: i8042 - allow insmod to succeed on devices without an i8042 co…
jwrdegoede Oct 27, 2020
31b4d8e
MIPS: export has_transparent_hugepage() for modules
rddunlap Oct 23, 2020
77e70d3
Input: sunkbd - avoid use-after-free in teardown paths
dtor Oct 26, 2020
ce9dfaf
s390: fix system call exit path
hcahca Nov 3, 2020
c583bcb
rcu: Don't invoke try_invoke_on_locked_down_task() with irqs disabled
paulmckrcu Sep 24, 2020
676650d
Input: resistive-adc-touch - fix kconfig dependency on IIO_BUFFER
necipfazil Nov 12, 2020
ae3d608
Input: elan_i2c - fix firmware update on newer ICs
jinglewu Nov 12, 2020
966e7ea
s390: update defconfigs
hcahca Nov 10, 2020
78d732e
s390/cpum_sf.c: fix file permission for cpum_sfb_size
Nov 11, 2020
e24a87b
perf lock: Correct field name "flags"
Nov 4, 2020
b0e5a05
perf lock: Don't free "lock_seq_stat" if read_count isn't zero
Nov 4, 2020
db1a8b9
tools arch: Update arch/x86/lib/mem{cpy,set}_64.S copies used in 'per…
acmel Nov 9, 2020
db2ac2e
perf test: Fix a typo in cs-etm testing
Nov 10, 2020
dd94ac8
perf test: Update branch sample pattern for cs-etm
Nov 10, 2020
1c756cd
perf inject: Fix file corruption due to event deletion
Nov 13, 2020
568beb2
perf test: Avoid an msan warning in a copied stack.
captain5050 Nov 13, 2020
61a2f1a
MIPS: kernel: Fix for_each_memblock conversion
tsbogend Nov 16, 2020
ac3b57a
MIPS: Alchemy: Fix memleak in alchemy_clk_setup_cpu
Nov 13, 2020
9dacf44
Merge branch 'urgent-fixes' of git://git.kernel.org/pub/scm/linux/ker…
torvalds Nov 17, 2020
be1dd66
Merge tag 'perf-tools-fixes-for-v5.10-2020-11-17' of git://git.kernel…
torvalds Nov 17, 2020
ed129cd
Merge tag 'mips_fixes_5.10_1' of git://git.kernel.org/pub/scm/linux/k…
torvalds Nov 17, 2020
111e91a
Merge tag 's390-5.10-4' of git://git.kernel.org/pub/scm/linux/kernel/…
torvalds Nov 17, 2020
0fa8ee0
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
torvalds Nov 17, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion arch/mips/alchemy/common/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ static struct clk __init *alchemy_clk_setup_cpu(const char *parent_name,
{
struct clk_init_data id;
struct clk_hw *h;
struct clk *clk;

h = kzalloc(sizeof(*h), GFP_KERNEL);
if (!h)
Expand All @@ -164,7 +165,13 @@ static struct clk __init *alchemy_clk_setup_cpu(const char *parent_name,
id.ops = &alchemy_clkops_cpu;
h->init = &id;

return clk_register(NULL, h);
clk = clk_register(NULL, h);
if (IS_ERR(clk)) {
pr_err("failed to register clock\n");
kfree(h);
}

return clk;
}

/* AUXPLLs ************************************************************/
Expand Down
6 changes: 3 additions & 3 deletions arch/mips/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ static void __init bootmem_init(void)
static void __init bootmem_init(void)
{
phys_addr_t ramstart, ramend;
phys_addr_t start, end;
u64 i;
unsigned long start, end;
int i;

ramstart = memblock_start_of_DRAM();
ramend = memblock_end_of_DRAM();
Expand Down Expand Up @@ -300,7 +300,7 @@ static void __init bootmem_init(void)

min_low_pfn = ARCH_PFN_OFFSET;
max_pfn = PFN_DOWN(ramend);
for_each_mem_range(i, &start, &end) {
for_each_mem_pfn_range(i, MAX_NUMNODES, &start, &end, NULL) {
/*
* Skip highmem here so we get an accurate max_low_pfn if low
* memory stops short of high memory.
Expand Down
1 change: 1 addition & 0 deletions arch/mips/mm/tlb-r4k.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,7 @@ int has_transparent_hugepage(void)
}
return mask == PM_HUGE_MASK;
}
EXPORT_SYMBOL(has_transparent_hugepage);

#endif /* CONFIG_TRANSPARENT_HUGEPAGE */

Expand Down
1 change: 1 addition & 0 deletions arch/s390/configs/debug_defconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONFIG_UAPI_HEADER_TEST=y
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_WATCH_QUEUE=y
Expand Down
2 changes: 2 additions & 0 deletions arch/s390/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ ENTRY(system_call)
#endif
LOCKDEP_SYS_EXIT
.Lsysc_tif:
DISABLE_INTS
TSTMSK __PT_FLAGS(%r11),_PIF_WORK
jnz .Lsysc_work
TSTMSK __TI_flags(%r12),_TIF_WORK
Expand All @@ -444,6 +445,7 @@ ENTRY(system_call)
# One of the work bits is on. Find out which one.
#
.Lsysc_work:
ENABLE_INTS
TSTMSK __TI_flags(%r12),_TIF_NEED_RESCHED
jo .Lsysc_reschedule
TSTMSK __PT_FLAGS(%r11),_PIF_SYSCALL_RESTART
Expand Down
2 changes: 1 addition & 1 deletion arch/s390/kernel/perf_cpum_sf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2228,4 +2228,4 @@ static int __init init_cpum_sampling_pmu(void)
}

arch_initcall(init_cpum_sampling_pmu);
core_param(cpum_sfb_size, CPUM_SF_MAX_SDB, sfb_size, 0640);
core_param(cpum_sfb_size, CPUM_SF_MAX_SDB, sfb_size, 0644);
41 changes: 33 additions & 8 deletions drivers/input/keyboard/sunkbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ static irqreturn_t sunkbd_interrupt(struct serio *serio,
switch (data) {

case SUNKBD_RET_RESET:
schedule_work(&sunkbd->tq);
if (sunkbd->enabled)
schedule_work(&sunkbd->tq);
sunkbd->reset = -1;
break;

Expand Down Expand Up @@ -200,16 +201,12 @@ static int sunkbd_initialize(struct sunkbd *sunkbd)
}

/*
* sunkbd_reinit() sets leds and beeps to a state the computer remembers they
* were in.
* sunkbd_set_leds_beeps() sets leds and beeps to a state the computer remembers
* they were in.
*/

static void sunkbd_reinit(struct work_struct *work)
static void sunkbd_set_leds_beeps(struct sunkbd *sunkbd)
{
struct sunkbd *sunkbd = container_of(work, struct sunkbd, tq);

wait_event_interruptible_timeout(sunkbd->wait, sunkbd->reset >= 0, HZ);

serio_write(sunkbd->serio, SUNKBD_CMD_SETLED);
serio_write(sunkbd->serio,
(!!test_bit(LED_CAPSL, sunkbd->dev->led) << 3) |
Expand All @@ -222,11 +219,39 @@ static void sunkbd_reinit(struct work_struct *work)
SUNKBD_CMD_BELLOFF - !!test_bit(SND_BELL, sunkbd->dev->snd));
}


/*
* sunkbd_reinit() wait for the keyboard reset to complete and restores state
* of leds and beeps.
*/

static void sunkbd_reinit(struct work_struct *work)
{
struct sunkbd *sunkbd = container_of(work, struct sunkbd, tq);

/*
* It is OK that we check sunkbd->enabled without pausing serio,
* as we only want to catch true->false transition that will
* happen once and we will be woken up for it.
*/
wait_event_interruptible_timeout(sunkbd->wait,
sunkbd->reset >= 0 || !sunkbd->enabled,
HZ);

if (sunkbd->reset >= 0 && sunkbd->enabled)
sunkbd_set_leds_beeps(sunkbd);
}

static void sunkbd_enable(struct sunkbd *sunkbd, bool enable)
{
serio_pause_rx(sunkbd->serio);
sunkbd->enabled = enable;
serio_continue_rx(sunkbd->serio);

if (!enable) {
wake_up_interruptible(&sunkbd->wait);
cancel_work_sync(&sunkbd->tq);
}
}

/*
Expand Down
2 changes: 1 addition & 1 deletion drivers/input/misc/adxl34x.c
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ struct adxl34x *adxl34x_probe(struct device *dev, int irq,
struct input_dev *input_dev;
const struct adxl34x_platform_data *pdata;
int err, range, i;
unsigned char revid;
int revid;

if (!irq) {
dev_err(dev, "no IRQ?\n");
Expand Down
2 changes: 1 addition & 1 deletion drivers/input/mouse/elan_i2c.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ struct elan_transport_ops {
int (*iap_reset)(struct i2c_client *client);

int (*prepare_fw_update)(struct i2c_client *client, u16 ic_type,
u8 iap_version);
u8 iap_version, u16 fw_page_size);
int (*write_fw_block)(struct i2c_client *client, u16 fw_page_size,
const u8 *page, u16 checksum, int idx);
int (*finish_fw_update)(struct i2c_client *client,
Expand Down
3 changes: 2 additions & 1 deletion drivers/input/mouse/elan_i2c_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,8 @@ static int __elan_update_firmware(struct elan_tp_data *data,
u16 sw_checksum = 0, fw_checksum = 0;

error = data->ops->prepare_fw_update(client, data->ic_type,
data->iap_version);
data->iap_version,
data->fw_page_size);
if (error)
return error;

Expand Down
10 changes: 5 additions & 5 deletions drivers/input/mouse/elan_i2c_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ static int elan_i2c_set_flash_key(struct i2c_client *client)
return 0;
}

static int elan_read_write_iap_type(struct i2c_client *client)
static int elan_read_write_iap_type(struct i2c_client *client, u16 fw_page_size)
{
int error;
u16 constant;
Expand All @@ -526,7 +526,7 @@ static int elan_read_write_iap_type(struct i2c_client *client)

do {
error = elan_i2c_write_cmd(client, ETP_I2C_IAP_TYPE_CMD,
ETP_I2C_IAP_TYPE_REG);
fw_page_size / 2);
if (error) {
dev_err(&client->dev,
"cannot write iap type: %d\n", error);
Expand All @@ -543,7 +543,7 @@ static int elan_read_write_iap_type(struct i2c_client *client)
constant = le16_to_cpup((__le16 *)val);
dev_dbg(&client->dev, "iap type reg: 0x%04x\n", constant);

if (constant == ETP_I2C_IAP_TYPE_REG)
if (constant == fw_page_size / 2)
return 0;

} while (--retry > 0);
Expand All @@ -553,7 +553,7 @@ static int elan_read_write_iap_type(struct i2c_client *client)
}

static int elan_i2c_prepare_fw_update(struct i2c_client *client, u16 ic_type,
u8 iap_version)
u8 iap_version, u16 fw_page_size)
{
struct device *dev = &client->dev;
int error;
Expand Down Expand Up @@ -594,7 +594,7 @@ static int elan_i2c_prepare_fw_update(struct i2c_client *client, u16 ic_type,
}

if (ic_type >= 0x0D && iap_version >= 1) {
error = elan_read_write_iap_type(client);
error = elan_read_write_iap_type(client, fw_page_size);
if (error)
return error;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/input/mouse/elan_i2c_smbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ static int elan_smbus_set_flash_key(struct i2c_client *client)
}

static int elan_smbus_prepare_fw_update(struct i2c_client *client, u16 ic_type,
u8 iap_version)
u8 iap_version, u16 fw_page_size)
{
struct device *dev = &client->dev;
int len;
Expand Down
12 changes: 11 additions & 1 deletion drivers/input/serio/i8042.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ module_param_named(unmask_kbd_data, i8042_unmask_kbd_data, bool, 0600);
MODULE_PARM_DESC(unmask_kbd_data, "Unconditional enable (may reveal sensitive data) of normally sanitize-filtered kbd data traffic debug log [pre-condition: i8042.debug=1 enabled]");
#endif

static bool i8042_present;
static bool i8042_bypass_aux_irq_test;
static char i8042_kbd_firmware_id[128];
static char i8042_aux_firmware_id[128];
Expand Down Expand Up @@ -343,6 +344,9 @@ int i8042_command(unsigned char *param, int command)
unsigned long flags;
int retval;

if (!i8042_present)
return -1;

spin_lock_irqsave(&i8042_lock, flags);
retval = __i8042_command(param, command);
spin_unlock_irqrestore(&i8042_lock, flags);
Expand Down Expand Up @@ -1612,12 +1616,15 @@ static int __init i8042_init(void)

err = i8042_platform_init();
if (err)
return err;
return (err == -ENODEV) ? 0 : err;

err = i8042_controller_check();
if (err)
goto err_platform_exit;

/* Set this before creating the dev to allow i8042_command to work right away */
i8042_present = true;

pdev = platform_create_bundle(&i8042_driver, i8042_probe, NULL, 0, NULL, 0);
if (IS_ERR(pdev)) {
err = PTR_ERR(pdev);
Expand All @@ -1636,6 +1643,9 @@ static int __init i8042_init(void)

static void __exit i8042_exit(void)
{
if (!i8042_present)
return;

platform_device_unregister(i8042_platform_device);
platform_driver_unregister(&i8042_driver);
i8042_platform_exit();
Expand Down
1 change: 1 addition & 0 deletions drivers/input/touchscreen/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ config TOUCHSCREEN_AD7879_SPI
config TOUCHSCREEN_ADC
tristate "Generic ADC based resistive touchscreen"
depends on IIO
select IIO_BUFFER
select IIO_BUFFER_CB
help
Say Y here if you want to use the generic ADC
Expand Down
22 changes: 17 additions & 5 deletions kernel/rcu/tree_stall.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,13 +249,16 @@ static bool check_slow_task(struct task_struct *t, void *arg)

/*
* Scan the current list of tasks blocked within RCU read-side critical
* sections, printing out the tid of each.
* sections, printing out the tid of each of the first few of them.
*/
static int rcu_print_task_stall(struct rcu_node *rnp)
static int rcu_print_task_stall(struct rcu_node *rnp, unsigned long flags)
__releases(rnp->lock)
{
int i = 0;
int ndetected = 0;
struct rcu_stall_chk_rdr rscr;
struct task_struct *t;
struct task_struct *ts[8];

if (!rcu_preempt_blocked_readers_cgp(rnp))
return 0;
Expand All @@ -264,6 +267,14 @@ static int rcu_print_task_stall(struct rcu_node *rnp)
t = list_entry(rnp->gp_tasks->prev,
struct task_struct, rcu_node_entry);
list_for_each_entry_continue(t, &rnp->blkd_tasks, rcu_node_entry) {
get_task_struct(t);
ts[i++] = t;
if (i >= ARRAY_SIZE(ts))
break;
}
raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
for (i--; i; i--) {
t = ts[i];
if (!try_invoke_on_locked_down_task(t, check_slow_task, &rscr))
pr_cont(" P%d", t->pid);
else
Expand All @@ -273,6 +284,7 @@ static int rcu_print_task_stall(struct rcu_node *rnp)
".q"[rscr.rs.b.need_qs],
".e"[rscr.rs.b.exp_hint],
".l"[rscr.on_blkd_list]);
put_task_struct(t);
ndetected++;
}
pr_cont("\n");
Expand All @@ -293,8 +305,9 @@ static void rcu_print_detail_task_stall_rnp(struct rcu_node *rnp)
* Because preemptible RCU does not exist, we never have to check for
* tasks blocked within RCU read-side critical sections.
*/
static int rcu_print_task_stall(struct rcu_node *rnp)
static int rcu_print_task_stall(struct rcu_node *rnp, unsigned long flags)
{
raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
return 0;
}
#endif /* #else #ifdef CONFIG_PREEMPT_RCU */
Expand Down Expand Up @@ -472,15 +485,14 @@ static void print_other_cpu_stall(unsigned long gp_seq, unsigned long gps)
pr_err("INFO: %s detected stalls on CPUs/tasks:\n", rcu_state.name);
rcu_for_each_leaf_node(rnp) {
raw_spin_lock_irqsave_rcu_node(rnp, flags);
ndetected += rcu_print_task_stall(rnp);
if (rnp->qsmask != 0) {
for_each_leaf_node_possible_cpu(rnp, cpu)
if (rnp->qsmask & leaf_node_cpu_bit(rnp, cpu)) {
print_cpu_stall_info(cpu);
ndetected++;
}
}
raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
ndetected += rcu_print_task_stall(rnp, flags); // Releases rnp->lock.
}

for_each_possible_cpu(cpu)
Expand Down
8 changes: 3 additions & 5 deletions tools/arch/x86/lib/memcpy_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* to a jmp to memcpy_erms which does the REP; MOVSB mem copy.
*/

.weak memcpy

/*
* memcpy - Copy a memory block.
*
Expand All @@ -30,7 +28,7 @@
* rax original destination
*/
SYM_FUNC_START_ALIAS(__memcpy)
SYM_FUNC_START_LOCAL(memcpy)
SYM_FUNC_START_WEAK(memcpy)
ALTERNATIVE_2 "jmp memcpy_orig", "", X86_FEATURE_REP_GOOD, \
"jmp memcpy_erms", X86_FEATURE_ERMS

Expand All @@ -51,14 +49,14 @@ EXPORT_SYMBOL(__memcpy)
* memcpy_erms() - enhanced fast string memcpy. This is faster and
* simpler than memcpy. Use memcpy_erms when possible.
*/
SYM_FUNC_START(memcpy_erms)
SYM_FUNC_START_LOCAL(memcpy_erms)
movq %rdi, %rax
movq %rdx, %rcx
rep movsb
ret
SYM_FUNC_END(memcpy_erms)

SYM_FUNC_START(memcpy_orig)
SYM_FUNC_START_LOCAL(memcpy_orig)
movq %rdi, %rax

cmpq $0x20, %rdx
Expand Down
Loading