aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2018-09-04 20:20:32 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2018-09-04 20:20:32 -0700
commit406fd2667fe82045e972fcb99e3169fd734f08c4 (patch)
treef3e54d846d5e52fdfa7ba4e37600117bcdb39b1c
parentf4ebbb85ef9f90b103bdb6ec6873711a1cf172a5 (diff)
parentd4656248b982aba2eda775112605ffedd2ec934f (diff)
Merge "Merge 222144baeccd75453e696969b3e7a0d12662d8b7 on remote branch"LA.UM.6.6.2.r1-05000-89xx.0
-rw-r--r--arch/arm64/boot/dts/qcom/msm8937.dtsi1
-rw-r--r--arch/arm64/boot/dts/qcom/msm8953.dtsi8
-rw-r--r--arch/arm64/boot/dts/qcom/sdm439.dtsi12
-rw-r--r--drivers/cpufreq/cpufreq.c3
-rw-r--r--drivers/devfreq/governor_cpufreq.c6
-rw-r--r--drivers/leds/leds-qpnp-flash-v2.c51
-rw-r--r--drivers/pinctrl/qcom/pinctrl-msm.c6
-rw-r--r--drivers/power/supply/qcom/smb5-lib.c3
-rw-r--r--drivers/soc/qcom/bam_dmux.c12
-rw-r--r--drivers/soc/qcom/big_cluster_min_freq_adjust.c10
-rw-r--r--drivers/soc/qcom/microdump_collector.c17
-rw-r--r--drivers/soc/qcom/rpm-smd.c41
-rw-r--r--drivers/soc/qcom/scm.c70
-rw-r--r--include/linux/cpufreq.h1
-rw-r--r--include/soc/qcom/scm.h9
-rwxr-xr-xkernel/sched/fair.c10
-rw-r--r--net/wireless/nl80211.c1
-rw-r--r--security/pfe/pfk_ice.c11
18 files changed, 157 insertions, 115 deletions
diff --git a/arch/arm64/boot/dts/qcom/msm8937.dtsi b/arch/arm64/boot/dts/qcom/msm8937.dtsi
index 85e304319757..8b0387bb343c 100644
--- a/arch/arm64/boot/dts/qcom/msm8937.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8937.dtsi
@@ -923,6 +923,7 @@
qcom,vdd-voltage-level = <0 1200000 1200000>;
vbus_otg-supply = <&smbcharger_charger_otg>;
+ qcom,hsusb-otg-phy-init-seq = <0x06 0x82 0xffffffff>;
qcom,hsusb-otg-phy-type = <3>; /* SNPS Femto PHY */
qcom,hsusb-otg-mode = <3>; /* OTG mode */
qcom,hsusb-otg-otg-control = <2>; /* PMIC */
diff --git a/arch/arm64/boot/dts/qcom/msm8953.dtsi b/arch/arm64/boot/dts/qcom/msm8953.dtsi
index dda983a90cf0..d47d616fa52f 100644
--- a/arch/arm64/boot/dts/qcom/msm8953.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8953.dtsi
@@ -68,7 +68,7 @@
other_ext_mem: other_ext_region@0 {
compatible = "removed-dma-pool";
no-map;
- reg = <0x0 0x85300000 0x0 0x1500000>;
+ reg = <0x0 0x85b00000 0x0 0xd00000>;
};
modem_mem: modem_region@0 {
@@ -89,12 +89,6 @@
reg = <0x0 0x8e700000 0x0 0x700000>;
};
- vm_fw_mem: vm_fw_mem@0 {
- compatible = "removed-dma-pool";
- no-map;
- reg = <0x0 0x92a00000 0x0 0x7800000>;
- };
-
venus_mem: venus_region@0 {
compatible = "shared-dma-pool";
reusable;
diff --git a/arch/arm64/boot/dts/qcom/sdm439.dtsi b/arch/arm64/boot/dts/qcom/sdm439.dtsi
index 9067bc9093f0..ef8ea1f30642 100644
--- a/arch/arm64/boot/dts/qcom/sdm439.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm439.dtsi
@@ -238,6 +238,18 @@
};
};
+&modem_mem {
+ reg = <0x0 0x86800000 0x0 0x5500000>;
+};
+
+&adsp_fw_mem {
+ reg = <0x0 0x8bd00000 0x0 0x1100000>;
+};
+
+&wcnss_fw_mem {
+ reg = <0x0 0x8ce00000 0x0 0x700000>;
+};
+
&soc {
pil_gpu: qcom,kgsl-hyp {
compatible = "qcom,pil-tz-generic";
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index cd817a2e08e3..1a8139a616fd 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1461,6 +1461,9 @@ static int cpufreq_offline(unsigned int cpu)
policy->freq_table = NULL;
}
+ blocking_notifier_call_chain(&cpufreq_policy_notifier_list,
+ CPUFREQ_STOP, policy);
+
unlock:
up_write(&policy->rwsem);
return 0;
diff --git a/drivers/devfreq/governor_cpufreq.c b/drivers/devfreq/governor_cpufreq.c
index 03ec792fa984..3c7fc8b4fb34 100644
--- a/drivers/devfreq/governor_cpufreq.c
+++ b/drivers/devfreq/governor_cpufreq.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2015, 2018, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -182,14 +182,14 @@ static int cpufreq_policy_notifier(struct notifier_block *nb,
struct cpufreq_policy *policy = data;
switch (event) {
- case CPUFREQ_CREATE_POLICY:
+ case CPUFREQ_START:
mutex_lock(&state_lock);
add_policy(policy);
update_all_devfreqs();
mutex_unlock(&state_lock);
break;
- case CPUFREQ_REMOVE_POLICY:
+ case CPUFREQ_STOP:
mutex_lock(&state_lock);
if (state[policy->cpu]) {
state[policy->cpu]->on = false;
diff --git a/drivers/leds/leds-qpnp-flash-v2.c b/drivers/leds/leds-qpnp-flash-v2.c
index d4b64ba800e6..95eec82b85a0 100644
--- a/drivers/leds/leds-qpnp-flash-v2.c
+++ b/drivers/leds/leds-qpnp-flash-v2.c
@@ -712,8 +712,11 @@ static int get_property_from_fg(struct qpnp_flash_led *led,
union power_supply_propval pval = {0, };
if (!led->bms_psy) {
- pr_err("no bms psy found\n");
- return -EINVAL;
+ led->bms_psy = power_supply_get_by_name("bms");
+ if (!led->bms_psy) {
+ pr_err_ratelimited("Couldn't get bms_psy\n");
+ return -ENODEV;
+ }
}
rc = power_supply_get_property(led->bms_psy, prop, &pval);
@@ -1760,41 +1763,6 @@ static struct device_attribute qpnp_flash_led_attrs[] = {
__ATTR(enable, 0664, NULL, qpnp_flash_led_prepare_store),
};
-static int flash_led_psy_notifier_call(struct notifier_block *nb,
- unsigned long ev, void *v)
-{
- struct power_supply *psy = v;
- struct qpnp_flash_led *led =
- container_of(nb, struct qpnp_flash_led, nb);
-
- if (ev != PSY_EVENT_PROP_CHANGED)
- return NOTIFY_OK;
-
- if (!strcmp(psy->desc->name, "bms")) {
- led->bms_psy = power_supply_get_by_name("bms");
- if (!led->bms_psy)
- pr_err("Failed to get bms power_supply\n");
- else
- power_supply_unreg_notifier(&led->nb);
- }
-
- return NOTIFY_OK;
-}
-
-static int flash_led_psy_register_notifier(struct qpnp_flash_led *led)
-{
- int rc;
-
- led->nb.notifier_call = flash_led_psy_notifier_call;
- rc = power_supply_reg_notifier(&led->nb);
- if (rc < 0) {
- pr_err("Couldn't register psy notifier, rc = %d\n", rc);
- return rc;
- }
-
- return 0;
-}
-
/* irq handler */
static irqreturn_t qpnp_flash_led_irq_handler(int irq, void *_led)
{
@@ -2788,15 +2756,6 @@ static int qpnp_flash_led_probe(struct platform_device *pdev)
}
}
- led->bms_psy = power_supply_get_by_name("bms");
- if (!led->bms_psy) {
- rc = flash_led_psy_register_notifier(led);
- if (rc < 0) {
- pr_err("Couldn't register psy notifier, rc = %d\n", rc);
- goto error_switch_register;
- }
- }
-
rc = qpnp_flash_led_init_settings(led);
if (rc < 0) {
pr_err("Failed to initialize flash LED, rc=%d\n", rc);
diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c
index f51ab9e3340a..4fd654ada081 100644
--- a/drivers/pinctrl/qcom/pinctrl-msm.c
+++ b/drivers/pinctrl/qcom/pinctrl-msm.c
@@ -1403,6 +1403,12 @@ static void msm_gpio_setup_dir_connects(struct msm_pinctrl *pctrl)
static int msm_gpiochip_to_irq(struct gpio_chip *chip, unsigned int offset)
{
struct irq_fwspec fwspec;
+ struct irq_domain *domain = chip->irqdomain;
+ int virq;
+
+ virq = irq_find_mapping(domain, offset);
+ if (virq)
+ return virq;
fwspec.fwnode = of_node_to_fwnode(chip->of_node);
fwspec.param[0] = offset;
diff --git a/drivers/power/supply/qcom/smb5-lib.c b/drivers/power/supply/qcom/smb5-lib.c
index f64044f690f8..28e91c98d2a5 100644
--- a/drivers/power/supply/qcom/smb5-lib.c
+++ b/drivers/power/supply/qcom/smb5-lib.c
@@ -1681,9 +1681,6 @@ int smblib_set_prop_system_temp_level(struct smb_charger *chg,
return -EINVAL;
chg->system_temp_level = val->intval;
- /* disable parallel charge in case of system temp level */
- vote(chg->pl_disable_votable, THERMAL_DAEMON_VOTER,
- chg->system_temp_level ? true : false, 0);
if (chg->system_temp_level == chg->thermal_levels)
return vote(chg->chg_disable_votable,
diff --git a/drivers/soc/qcom/bam_dmux.c b/drivers/soc/qcom/bam_dmux.c
index 3b75e744a5ec..84e51931cbac 100644
--- a/drivers/soc/qcom/bam_dmux.c
+++ b/drivers/soc/qcom/bam_dmux.c
@@ -1099,6 +1099,12 @@ int msm_bam_dmux_open(uint32_t id, void *priv,
kfree(hdr);
return -ENODEV;
}
+ if (in_global_reset) {
+ BAM_DMUX_LOG("%s: In SSR... ch_id[%d]\n", __func__, id);
+ spin_unlock_irqrestore(&bam_ch[id].lock, flags);
+ kfree(hdr);
+ return -ENODEV;
+ }
bam_ch[id].notify = notify;
bam_ch[id].priv = priv;
@@ -1177,6 +1183,12 @@ int msm_bam_dmux_close(uint32_t id)
return 0;
}
+ if (in_global_reset) {
+ BAM_DMUX_LOG("%s: In SSR... ch_id[%d]\n", __func__, id);
+ read_unlock(&ul_wakeup_lock);
+ return 0;
+ }
+
hdr = kmalloc(sizeof(struct bam_mux_hdr), GFP_ATOMIC);
if (hdr == NULL) {
read_unlock(&ul_wakeup_lock);
diff --git a/drivers/soc/qcom/big_cluster_min_freq_adjust.c b/drivers/soc/qcom/big_cluster_min_freq_adjust.c
index 979dd81193ba..32feedc0530f 100644
--- a/drivers/soc/qcom/big_cluster_min_freq_adjust.c
+++ b/drivers/soc/qcom/big_cluster_min_freq_adjust.c
@@ -180,6 +180,11 @@ static int enable_big_min_freq_adjust(void)
if (!p->min_freq_floor)
p->min_freq_floor = POLICY_MIN;
+ p->min_freq_state = RESET_MIN_FLOOR;
+ p->min_freq_request = RESET_MIN_FLOOR;
+ spin_lock_init(&p->lock);
+ p->big_min_freq_on = true;
+
ret = cpu_pm_register_notifier(&cpu_pm_nb);
if (ret) {
pr_err("Failed to register for PM notification\n");
@@ -193,11 +198,6 @@ static int enable_big_min_freq_adjust(void)
return ret;
}
- p->min_freq_state = RESET_MIN_FLOOR;
- p->min_freq_request = RESET_MIN_FLOOR;
- spin_lock_init(&p->lock);
- p->big_min_freq_on = true;
-
/* If BIG cluster is active at this time and continue to be active
* forever, in that case min frequency of the cluster will never be
* set to floor value. This is to trigger the state machine and set
diff --git a/drivers/soc/qcom/microdump_collector.c b/drivers/soc/qcom/microdump_collector.c
index 4a22b4dc6c4e..6e9da60ed118 100644
--- a/drivers/soc/qcom/microdump_collector.c
+++ b/drivers/soc/qcom/microdump_collector.c
@@ -48,9 +48,9 @@ static int microdump_modem_notifier_nb(struct notifier_block *nb,
crash_reason = smem_get_entry(SMEM_SSR_REASON_MSS0, &size_reason
, 0, SMEM_ANY_HOST_FLAG);
if (IS_ERR_OR_NULL(crash_reason)) {
- pr_err("%s: Error in getting SMEM_reason pointer\n",
- __func__);
- return -ENODEV;
+ pr_info("%s: smem %d not available\n",
+ __func__, SMEM_SSR_REASON_MSS0);
+ goto out;
}
segment[0].v_address = crash_reason;
@@ -58,9 +58,9 @@ static int microdump_modem_notifier_nb(struct notifier_block *nb,
crash_data = smem_get_entry(smem_id, &size_data, SMEM_MODEM, 0);
if (IS_ERR_OR_NULL(crash_data)) {
- pr_err("%s: Error in getting SMEM_data pointer\n",
- __func__);
- return -ENODEV;
+ pr_info("%s: smem %d not available\n ",
+ __func__, smem_id);
+ goto out;
}
segment[1].v_address = crash_data;
@@ -68,10 +68,11 @@ static int microdump_modem_notifier_nb(struct notifier_block *nb,
ret = do_ramdump(drv->microdump_dev, segment, 2);
if (ret)
- pr_err("%s: do_ramdump() failed\n", __func__);
+ pr_info("%s: do_ramdump() failed\n", __func__);
}
- return ret;
+out:
+ return NOTIFY_OK;
}
static int microdump_modem_ssr_register_notifier(struct microdump_data *drv)
diff --git a/drivers/soc/qcom/rpm-smd.c b/drivers/soc/qcom/rpm-smd.c
index c254a49c44af..f9180a99168d 100644
--- a/drivers/soc/qcom/rpm-smd.c
+++ b/drivers/soc/qcom/rpm-smd.c
@@ -747,6 +747,7 @@ static int msm_rpm_read_sleep_ack(void)
{
int ret;
char buf[MAX_ERR_BUFFER_SIZE] = {0};
+ uint32_t msg_id;
if (glink_enabled)
ret = msm_rpm_glink_rx_poll(glink_data->glink_handle);
@@ -773,24 +774,42 @@ static int msm_rpm_read_sleep_ack(void)
* spinlock from being locked out.
*/
- if (!timeout) {
- pr_err("Timed out waiting for RPM ACK\n");
+ if (!timeout)
return -EAGAIN;
- }
ret = msm_rpm_read_smd_data(buf);
- if (!ret)
+ if (!ret) {
+ /* Mimic Glink behavior to ensure that the
+ * data is read and the msg is removed from
+ * the wait list. We should have gotten here
+ * only when there are no drivers waiting on
+ * ACKs. msm_rpm_get_entry_from_msg_id()
+ * return non-NULL only then.
+ */
+ msg_id = msm_rpm_get_msg_id_from_ack(buf);
+ msm_rpm_process_ack(msg_id, 0);
ret = smd_is_pkt_avail(msm_rpm_data.ch_info);
+ }
}
return ret;
}
+static void msm_rpm_flush_noack_messages(void)
+{
+ while (!list_empty(&msm_rpm_wait_list)) {
+ if (!msm_rpm_read_sleep_ack())
+ break;
+ }
+}
+
static int msm_rpm_flush_requests(bool print)
{
struct rb_node *t;
int ret;
int count = 0;
+ msm_rpm_flush_noack_messages();
+
for (t = rb_first(&tr_root); t; t = rb_next(t)) {
struct slp_buf *s = rb_entry(t, struct slp_buf, node);
@@ -827,8 +846,10 @@ static int msm_rpm_flush_requests(bool print)
if (ret >= 0)
count--;
- else
+ else {
+ pr_err("Timed out waiting for RPM ACK\n");
return ret;
+ }
}
}
return 0;
@@ -1057,14 +1078,18 @@ static void msm_rpm_notify(void *data, unsigned int event)
bool msm_rpm_waiting_for_ack(void)
{
- bool ret;
+ bool ret = false;
unsigned long flags;
+ struct msm_rpm_wait_data *elem = NULL;
spin_lock_irqsave(&msm_rpm_list_lock, flags);
- ret = list_empty(&msm_rpm_wait_list);
+ elem = list_first_entry_or_null(&msm_rpm_wait_list,
+ struct msm_rpm_wait_data, list);
+ if (elem)
+ ret = !elem->delete_on_ack;
spin_unlock_irqrestore(&msm_rpm_list_lock, flags);
- return !ret;
+ return ret;
}
static struct msm_rpm_wait_data *msm_rpm_get_entry_from_msg_id(uint32_t msg_id)
diff --git a/drivers/soc/qcom/scm.c b/drivers/soc/qcom/scm.c
index fec6f17abb64..a64ddae9678e 100644
--- a/drivers/soc/qcom/scm.c
+++ b/drivers/soc/qcom/scm.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2017, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2010-2018, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -635,28 +635,7 @@ static int allocate_extra_arg_buffer(struct scm_desc *desc, gfp_t flags)
return 0;
}
-/**
- * scm_call2() - Invoke a syscall in the secure world
- * @fn_id: The function ID for this syscall
- * @desc: Descriptor structure containing arguments and return values
- *
- * Sends a command to the SCM and waits for the command to finish processing.
- * This should *only* be called in pre-emptible context.
- *
- * A note on cache maintenance:
- * Note that any buffers that are expected to be accessed by the secure world
- * must be flushed before invoking scm_call and invalidated in the cache
- * immediately after scm_call returns. An important point that must be noted
- * is that on ARMV8 architectures, invalidation actually also causes a dirty
- * cache line to be cleaned (flushed + unset-dirty-bit). Therefore it is of
- * paramount importance that the buffer be flushed before invoking scm_call2,
- * even if you don't care about the contents of that buffer.
- *
- * Note that cache maintenance on the argument buffer (desc->args) is taken care
- * of by scm_call2; however, callers are responsible for any other cached
- * buffers passed over to the secure world.
-*/
-int scm_call2(u32 fn_id, struct scm_desc *desc)
+static int __scm_call2(u32 fn_id, struct scm_desc *desc, bool retry)
{
int arglen = desc->arginfo & 0xf;
int ret, retry_count = 0;
@@ -670,7 +649,6 @@ int scm_call2(u32 fn_id, struct scm_desc *desc)
return ret;
x0 = fn_id | scm_version_mask;
-
do {
mutex_lock(&scm_lock);
@@ -700,13 +678,15 @@ int scm_call2(u32 fn_id, struct scm_desc *desc)
mutex_unlock(&scm_lmh_lock);
mutex_unlock(&scm_lock);
+ if (!retry)
+ goto out;
if (ret == SCM_V2_EBUSY)
msleep(SCM_EBUSY_WAIT_MS);
if (retry_count == 33)
pr_warn("scm: secure world has been busy for 1 second!\n");
- } while (ret == SCM_V2_EBUSY && (retry_count++ < SCM_EBUSY_MAX_RETRY));
-
+ } while (ret == SCM_V2_EBUSY && (retry_count++ < SCM_EBUSY_MAX_RETRY));
+out:
if (ret < 0)
pr_err("scm_call failed: func id %#llx, ret: %d, syscall returns: %#llx, %#llx, %#llx\n",
x0, ret, desc->ret[0], desc->ret[1], desc->ret[2]);
@@ -717,9 +697,47 @@ int scm_call2(u32 fn_id, struct scm_desc *desc)
return scm_remap_error(ret);
return 0;
}
+
+/**
+ * scm_call2() - Invoke a syscall in the secure world
+ * @fn_id: The function ID for this syscall
+ * @desc: Descriptor structure containing arguments and return values
+ *
+ * Sends a command to the SCM and waits for the command to finish processing.
+ * This should *only* be called in pre-emptible context.
+ *
+ * A note on cache maintenance:
+ * Note that any buffers that are expected to be accessed by the secure world
+ * must be flushed before invoking scm_call and invalidated in the cache
+ * immediately after scm_call returns. An important point that must be noted
+ * is that on ARMV8 architectures, invalidation actually also causes a dirty
+ * cache line to be cleaned (flushed + unset-dirty-bit). Therefore it is of
+ * paramount importance that the buffer be flushed before invoking scm_call2,
+ * even if you don't care about the contents of that buffer.
+ *
+ * Note that cache maintenance on the argument buffer (desc->args) is taken care
+ * of by scm_call2; however, callers are responsible for any other cached
+ * buffers passed over to the secure world.
+ */
+int scm_call2(u32 fn_id, struct scm_desc *desc)
+{
+ return __scm_call2(fn_id, desc, true);
+}
EXPORT_SYMBOL(scm_call2);
/**
+ * scm_call2_noretry() - Invoke a syscall in the secure world
+ *
+ * Similar to scm_call2 except that there is no retry mechanism
+ * implemented.
+ */
+int scm_call2_noretry(u32 fn_id, struct scm_desc *desc)
+{
+ return __scm_call2(fn_id, desc, false);
+}
+EXPORT_SYMBOL(scm_call2_noretry);
+
+/**
* scm_call2_atomic() - Invoke a syscall in the secure world
*
* Similar to scm_call2 except that this can be invoked in atomic context.
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 23beb580a03a..0a57482ad0f7 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -424,6 +424,7 @@ static inline void cpufreq_resume(void) {}
#define CPUFREQ_START (2)
#define CPUFREQ_CREATE_POLICY (3)
#define CPUFREQ_REMOVE_POLICY (4)
+#define CPUFREQ_STOP (5)
/* Govinfo Notifiers */
#define CPUFREQ_LOAD_CHANGE (0)
diff --git a/include/soc/qcom/scm.h b/include/soc/qcom/scm.h
index 63698cf00aa0..fa64d5d38875 100644
--- a/include/soc/qcom/scm.h
+++ b/include/soc/qcom/scm.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2017, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2010-2018, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -100,6 +100,8 @@ extern int scm_call(u32 svc_id, u32 cmd_id, const void *cmd_buf, size_t cmd_len,
extern int scm_call2(u32 cmd_id, struct scm_desc *desc);
+extern int scm_call2_noretry(u32 cmd_id, struct scm_desc *desc);
+
extern int scm_call2_atomic(u32 cmd_id, struct scm_desc *desc);
extern int scm_call_noalloc(u32 svc_id, u32 cmd_id, const void *cmd_buf,
@@ -149,6 +151,11 @@ static inline int scm_call2(u32 cmd_id, struct scm_desc *desc)
return 0;
}
+static inline int scm_call2_noretry(u32 cmd_id, struct scm_desc *desc)
+{
+ return 0;
+}
+
static inline int scm_call2_atomic(u32 cmd_id, struct scm_desc *desc)
{
return 0;
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 2bef25a128c2..83fc3e020462 100755
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -10293,8 +10293,12 @@ static inline int find_new_ilb(int type)
rcu_read_lock();
sd = rcu_dereference_check_sched_domain(rq->sd);
if (sd) {
- cpumask_and(&cpumask, nohz.idle_cpus_mask,
- sched_domain_span(sd));
+ if (energy_aware() && rq->misfit_task)
+ cpumask_andnot(&cpumask, nohz.idle_cpus_mask,
+ sched_domain_span(sd));
+ else
+ cpumask_and(&cpumask, nohz.idle_cpus_mask,
+ sched_domain_span(sd));
cpumask_andnot(&cpumask, &cpumask,
cpu_isolated_mask);
ilb = cpumask_first(&cpumask);
@@ -10305,7 +10309,7 @@ static inline int find_new_ilb(int type)
if (!energy_aware() ||
(capacity_orig_of(cpu) ==
cpu_rq(cpu)->rd->max_cpu_capacity.val ||
- cpu_overutilized(cpu))) {
+ (cpu_overutilized(cpu) && rq->nr_running > 1))) {
cpumask_andnot(&cpumask, nohz.idle_cpus_mask,
cpu_isolated_mask);
ilb = cpumask_first(&cpumask);
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index e6b916b49ef7..ee32a6730dfc 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -11428,6 +11428,7 @@ static int nl80211_update_ft_ies(struct sk_buff *skb, struct genl_info *info)
return -EOPNOTSUPP;
if (!info->attrs[NL80211_ATTR_MDID] ||
+ !info->attrs[NL80211_ATTR_IE] ||
!is_valid_ie_attr(info->attrs[NL80211_ATTR_IE]))
return -EINVAL;
diff --git a/security/pfe/pfk_ice.c b/security/pfe/pfk_ice.c
index 16ed5162665d..a86042c98e1f 100644
--- a/security/pfe/pfk_ice.c
+++ b/security/pfe/pfk_ice.c
@@ -121,7 +121,7 @@ int qti_pfk_ice_set_key(uint32_t index, uint8_t *key, uint8_t *salt,
goto out;
}
- ret = scm_call2(smc_id, &desc);
+ ret = scm_call2_noretry(smc_id, &desc);
if (ret) {
pr_err("%s: Set Key Error: %d\n", __func__, ret);
@@ -134,13 +134,14 @@ int qti_pfk_ice_set_key(uint32_t index, uint8_t *key, uint8_t *salt,
smc_id = TZ_ES_INVALIDATE_ICE_KEY_ID;
desc.arginfo = TZ_ES_INVALIDATE_ICE_KEY_PARAM_ID;
desc.args[0] = index;
- ret1 = scm_call2(smc_id, &desc);
+ ret1 = scm_call2_noretry(smc_id, &desc);
if (ret1)
pr_err("%s: Invalidate Key Error: %d\n", __func__,
ret1);
- goto out;
}
- ret = qcom_ice_setup_ice_hw((const char *)s_type, false);
+ ret1 = qcom_ice_setup_ice_hw((const char *)s_type, false);
+ if (ret1)
+ pr_err("%s: Error %d disabling clocks\n", __func__, ret1);
out:
return ret;
@@ -175,7 +176,7 @@ int qti_pfk_ice_invalidate_key(uint32_t index, char *storage_type)
return ret;
}
- ret = scm_call2(smc_id, &desc);
+ ret = scm_call2_noretry(smc_id, &desc);
if (ret) {
pr_err("%s: Error: 0x%x\n", __func__, ret);