Skip to content

Commit

Permalink
Merge branch 'android-4.9-q' of https://android.googlesource.com/kern…
Browse files Browse the repository at this point in the history
…el/common into lineage-19.1
  • Loading branch information
zeelog committed Jul 3, 2022
2 parents 88395a3 + 47df852 commit dccc6cd
Show file tree
Hide file tree
Showing 39 changed files with 110 additions and 294 deletions.
2 changes: 1 addition & 1 deletion Documentation/ABI/testing/sysfs-bus-iio-vf610
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
What: /sys/bus/iio/devices/iio:deviceX/conversion_mode
What: /sys/bus/iio/devices/iio:deviceX/in_conversion_mode
KernelVersion: 4.2
Contact: [email protected]
Description:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION = 4
PATCHLEVEL = 9
SUBLEVEL = 320
SUBLEVEL = 321
EXTRAVERSION =
NAME = Roaring Lionus

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/imx6qdl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@
regulator-name = "vddpu";
regulator-min-microvolt = <725000>;
regulator-max-microvolt = <1450000>;
regulator-enable-ramp-delay = <150>;
regulator-enable-ramp-delay = <380>;
anatop-reg-offset = <0x140>;
anatop-vol-bit-shift = <9>;
anatop-vol-bit-width = <5>;
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-axxia/platsmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ static int axxia_boot_secondary(unsigned int cpu, struct task_struct *idle)
return -ENOENT;

syscon = of_iomap(syscon_np, 0);
of_node_put(syscon_np);
if (!syscon)
return -ENOMEM;

Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-cns3xxx/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ static void __init cns3xxx_init(void)
/* De-Asscer SATA Reset */
cns3xxx_pwr_soft_rst(CNS3XXX_PWR_SOFTWARE_RST(SATA));
}
of_node_put(dn);

dn = of_find_compatible_node(NULL, NULL, "cavium,cns3420-sdhci");
if (of_device_is_available(dn)) {
Expand All @@ -392,6 +393,7 @@ static void __init cns3xxx_init(void)
cns3xxx_pwr_clk_en(CNS3XXX_PWR_CLK_EN(SDIO));
cns3xxx_pwr_soft_rst(CNS3XXX_PWR_SOFTWARE_RST(SDIO));
}
of_node_put(dn);

pm_power_off = cns3xxx_power_off;

Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-exynos/exynos.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ static void exynos_map_pmu(void)
np = of_find_matching_node(NULL, exynos_dt_pmu_match);
if (np)
pmu_base_addr = of_iomap(np, 0);
of_node_put(np);
}

static void __init exynos_init_irq(void)
Expand Down
2 changes: 0 additions & 2 deletions arch/mips/vr41xx/common/icu.c
Original file line number Diff line number Diff line change
Expand Up @@ -653,8 +653,6 @@ static int icu_get_irq(unsigned int irq)

printk(KERN_ERR "spurious ICU interrupt: %04x,%04x\n", pend1, pend2);

atomic_inc(&irq_err_count);

return -1;
}

Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -1591,7 +1591,7 @@ void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp)
tm_reclaim_current(0);
#endif

memset(regs->gpr, 0, sizeof(regs->gpr));
memset(&regs->gpr[1], 0, sizeof(regs->gpr) - sizeof(regs->gpr[0]));
regs->ctr = 0;
regs->link = 0;
regs->xer = 0;
Expand Down
2 changes: 2 additions & 0 deletions arch/powerpc/platforms/pseries/pseries.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,6 @@ unsigned long pseries_memory_block_size(void);

void pseries_setup_rfi_flush(void);

void pseries_rng_init(void);

#endif /* _PSERIES_PSERIES_H */
11 changes: 3 additions & 8 deletions arch/powerpc/platforms/pseries/rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <asm/archrandom.h>
#include <asm/machdep.h>
#include <asm/plpar_wrappers.h>
#include "pseries.h"


static int pseries_get_random_long(unsigned long *v)
Expand All @@ -28,19 +29,13 @@ static int pseries_get_random_long(unsigned long *v)
return 0;
}

static __init int rng_init(void)
void __init pseries_rng_init(void)
{
struct device_node *dn;

dn = of_find_compatible_node(NULL, NULL, "ibm,random");
if (!dn)
return -ENODEV;

pr_info("Registering arch random hook.\n");

return;
ppc_md.get_random_seed = pseries_get_random_long;

of_node_put(dn);
return 0;
}
machine_subsys_initcall(pseries, rng_init);
1 change: 1 addition & 0 deletions arch/powerpc/platforms/pseries/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,7 @@ static void __init pSeries_setup_arch(void)
}

ppc_md.pcibios_root_bridge_prepare = pseries_root_bridge_prepare;
pseries_rng_init();
}

static int __init pSeries_init_panel(void)
Expand Down
7 changes: 7 additions & 0 deletions arch/x86/include/asm/kexec.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#ifndef __ASSEMBLY__

#include <linux/string.h>
#include <linux/module.h>

#include <asm/page.h>
#include <asm/ptrace.h>
Expand Down Expand Up @@ -206,6 +207,12 @@ struct kexec_entry64_regs {
uint64_t r15;
uint64_t rip;
};

#ifdef CONFIG_KEXEC_FILE
int arch_kexec_apply_relocations_add(const Elf_Ehdr *ehdr,
Elf_Shdr *sechdrs, unsigned int relsec);
#define arch_kexec_apply_relocations_add arch_kexec_apply_relocations_add
#endif
#endif

typedef void crash_vmclear_fn(void);
Expand Down
1 change: 1 addition & 0 deletions arch/xtensa/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ static void __init calibrate_ccount(void)
cpu = of_find_compatible_node(NULL, NULL, "cdns,xtensa-cpu");
if (cpu) {
clk = of_clk_get(cpu, 0);
of_node_put(cpu);
if (!IS_ERR(clk)) {
ccount_freq = clk_get_rate(clk);
return;
Expand Down
1 change: 1 addition & 0 deletions arch/xtensa/platforms/xtfpga/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ static int __init machine_setup(void)

if ((eth = of_find_compatible_node(eth, NULL, "opencores,ethoc")))
update_local_mac(eth);
of_node_put(eth);
return 0;
}
arch_initcall(machine_setup);
Expand Down
4 changes: 2 additions & 2 deletions drivers/char/random.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ static RAW_NOTIFIER_HEAD(random_ready_chain);

/* Control how we warn userspace. */
static struct ratelimit_state urandom_warning =
RATELIMIT_STATE_INIT("warn_urandom_randomness", HZ, 3);
RATELIMIT_STATE_INIT_FLAGS("urandom_warning", HZ, 3, RATELIMIT_MSG_ON_RELEASE);
static int ratelimit_disable __read_mostly =
IS_ENABLED(CONFIG_WARN_ALL_UNSEEDED_RANDOM);
module_param_named(ratelimit_disable, ratelimit_disable, int, 0644);
Expand Down Expand Up @@ -997,7 +997,7 @@ void add_interrupt_randomness(int irq)
if (new_count & MIX_INFLIGHT)
return;

if (new_count < 64 && !time_is_before_jiffies(fast_pool->last + HZ))
if (new_count < 1024 && !time_is_before_jiffies(fast_pool->last + HZ))
return;

if (unlikely(!fast_pool->mix.func))
Expand Down
2 changes: 0 additions & 2 deletions drivers/gpio/gpio-vr41xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,6 @@ static int giu_get_irq(unsigned int irq)
printk(KERN_ERR "spurious GIU interrupt: %04x(%04x),%04x(%04x)\n",
maskl, pendl, maskh, pendh);

atomic_inc(&irq_err_count);

return -EINVAL;
}

Expand Down
10 changes: 0 additions & 10 deletions drivers/gpu/drm/drm_crtc_helper_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@

#include <drm/drm_dp_helper.h>

/* drm_fb_helper.c */
#ifdef CONFIG_DRM_FBDEV_EMULATION
int drm_fb_helper_modinit(void);
#else
static inline int drm_fb_helper_modinit(void)
{
return 0;
}
#endif

/* drm_dp_aux_dev.c */
#ifdef CONFIG_DRM_DP_AUX_CHARDEV
int drm_dp_aux_dev_init(void);
Expand Down
21 changes: 0 additions & 21 deletions drivers/gpu/drm/drm_fb_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -2324,24 +2324,3 @@ int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper)
return 0;
}
EXPORT_SYMBOL(drm_fb_helper_hotplug_event);

/* The Kconfig DRM_KMS_HELPER selects FRAMEBUFFER_CONSOLE (if !EXPERT)
* but the module doesn't depend on any fb console symbols. At least
* attempt to load fbcon to avoid leaving the system without a usable console.
*/
int __init drm_fb_helper_modinit(void)
{
#if defined(CONFIG_FRAMEBUFFER_CONSOLE_MODULE) && !defined(CONFIG_EXPERT)
const char *name = "fbcon";
struct module *fbcon;

mutex_lock(&module_mutex);
fbcon = find_module(name);
mutex_unlock(&module_mutex);

if (!fbcon)
request_module_nowait(name);
#endif
return 0;
}
EXPORT_SYMBOL(drm_fb_helper_modinit);
25 changes: 12 additions & 13 deletions drivers/gpu/drm/drm_kms_helper_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,18 @@ MODULE_LICENSE("GPL and additional rights");

static int __init drm_kms_helper_init(void)
{
int ret;

/* Call init functions from specific kms helpers here */
ret = drm_fb_helper_modinit();
if (ret < 0)
goto out;

ret = drm_dp_aux_dev_init();
if (ret < 0)
goto out;

out:
return ret;
/*
* The Kconfig DRM_KMS_HELPER selects FRAMEBUFFER_CONSOLE (if !EXPERT)
* but the module doesn't depend on any fb console symbols. At least
* attempt to load fbcon to avoid leaving the system without a usable
* console.
*/
if (IS_ENABLED(CONFIG_DRM_FBDEV_EMULATION) &&
IS_MODULE(CONFIG_FRAMEBUFFER_CONSOLE) &&
!IS_ENABLED(CONFIG_EXPERT))
request_module_nowait("fbcon");

return drm_dp_aux_dev_init();
}

static void __exit drm_kms_helper_exit(void)
Expand Down
3 changes: 2 additions & 1 deletion drivers/iio/accel/bma180.c
Original file line number Diff line number Diff line change
Expand Up @@ -776,11 +776,12 @@ static int bma180_probe(struct i2c_client *client,
data->trig->dev.parent = &client->dev;
data->trig->ops = &bma180_trigger_ops;
iio_trigger_set_drvdata(data->trig, indio_dev);
indio_dev->trig = iio_trigger_get(data->trig);

ret = iio_trigger_register(data->trig);
if (ret)
goto err_trigger_free;

indio_dev->trig = iio_trigger_get(data->trig);
}

ret = iio_triggered_buffer_setup(indio_dev, NULL,
Expand Down
10 changes: 7 additions & 3 deletions drivers/iio/accel/mma8452.c
Original file line number Diff line number Diff line change
Expand Up @@ -1405,10 +1405,14 @@ static int mma8452_reset(struct i2c_client *client)
int i;
int ret;

ret = i2c_smbus_write_byte_data(client, MMA8452_CTRL_REG2,
/*
* Find on fxls8471, after config reset bit, it reset immediately,
* and will not give ACK, so here do not check the return value.
* The following code will read the reset register, and check whether
* this reset works.
*/
i2c_smbus_write_byte_data(client, MMA8452_CTRL_REG2,
MMA8452_CTRL_REG2_RST);
if (ret < 0)
return ret;

for (i = 0; i < 10; i++) {
usleep_range(100, 200);
Expand Down
1 change: 1 addition & 0 deletions drivers/iio/trigger/iio-trig-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ static int iio_sysfs_trigger_remove(int id)
}

iio_trigger_unregister(t->trig);
irq_work_sync(&t->work);
iio_trigger_free(t->trig);

list_del(&t->l);
Expand Down
8 changes: 7 additions & 1 deletion drivers/md/dm-era-target.c
Original file line number Diff line number Diff line change
Expand Up @@ -1398,7 +1398,7 @@ static void start_worker(struct era *era)
static void stop_worker(struct era *era)
{
atomic_set(&era->suspended, 1);
flush_workqueue(era->wq);
drain_workqueue(era->wq);
}

/*----------------------------------------------------------------
Expand Down Expand Up @@ -1583,6 +1583,12 @@ static void era_postsuspend(struct dm_target *ti)
}

stop_worker(era);

r = metadata_commit(era->md);
if (r) {
DMERR("%s: metadata_commit failed", __func__);
/* FIXME: fail mode */
}
}

static int era_preresume(struct dm_target *ti)
Expand Down
4 changes: 3 additions & 1 deletion drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3014,9 +3014,11 @@ static void bond_activebackup_arp_mon(struct work_struct *work)
if (!rtnl_trylock())
return;

if (should_notify_peers)
if (should_notify_peers) {
bond->send_peer_notif--;
call_netdevice_notifiers(NETDEV_NOTIFY_PEERS,
bond->dev);
}
if (should_notify_rtnl) {
bond_slave_state_notify(bond);
bond_slave_link_notify(bond);
Expand Down
12 changes: 5 additions & 7 deletions drivers/net/ethernet/intel/igb/igb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -8161,11 +8161,10 @@ static void igb_init_dmac(struct igb_adapter *adapter, u32 pba)
struct e1000_hw *hw = &adapter->hw;
u32 dmac_thr;
u16 hwm;
u32 reg;

if (hw->mac.type > e1000_82580) {
if (adapter->flags & IGB_FLAG_DMAC) {
u32 reg;

/* force threshold to 0. */
wr32(E1000_DMCTXTH, 0);

Expand Down Expand Up @@ -8198,7 +8197,6 @@ static void igb_init_dmac(struct igb_adapter *adapter, u32 pba)
/* Disable BMC-to-OS Watchdog Enable */
if (hw->mac.type != e1000_i354)
reg &= ~E1000_DMACR_DC_BMC2OSW_EN;

wr32(E1000_DMACR, reg);

/* no lower threshold to disable
Expand All @@ -8215,12 +8213,12 @@ static void igb_init_dmac(struct igb_adapter *adapter, u32 pba)
*/
wr32(E1000_DMCTXTH, (IGB_MIN_TXPBSIZE -
(IGB_TX_BUF_4096 + adapter->max_frame_size)) >> 6);
}

/* make low power state decision controlled
* by DMA coal
*/
if (hw->mac.type >= e1000_i210 ||
(adapter->flags & IGB_FLAG_DMAC)) {
reg = rd32(E1000_PCIEMISC);
reg &= ~E1000_PCIEMISC_LX_DECISION;
reg |= E1000_PCIEMISC_LX_DECISION;
wr32(E1000_PCIEMISC, reg);
} /* endif adapter->dmac is not disabled */
} else if (hw->mac.type == e1000_82580) {
Expand Down
8 changes: 6 additions & 2 deletions drivers/of/fdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1136,6 +1136,10 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname,

/* try to clear seed so it won't be found. */
fdt_nop_property(initial_boot_params, node, "rng-seed");

/* update CRC check value */
of_fdt_crc32 = crc32_be(~0, initial_boot_params,
fdt_totalsize(initial_boot_params));
}

/* break now */
Expand Down Expand Up @@ -1239,6 +1243,8 @@ bool __init early_init_dt_verify(void *params)

/* Setup flat device-tree pointer */
initial_boot_params = params;
of_fdt_crc32 = crc32_be(~0, initial_boot_params,
fdt_totalsize(initial_boot_params));
return true;
}

Expand All @@ -1264,8 +1270,6 @@ bool __init early_init_dt_scan(void *params)
return false;

early_init_dt_scan_nodes();
of_fdt_crc32 = crc32_be(~0, initial_boot_params,
fdt_totalsize(initial_boot_params));
return true;
}

Expand Down
Loading

0 comments on commit dccc6cd

Please sign in to comment.