diff --git a/android/GKI_VERSION b/android/GKI_VERSION
index 4a79e042126d..da598c937dca 100644
--- a/android/GKI_VERSION
+++ b/android/GKI_VERSION
@@ -1 +1 @@
-LTS_5.4.86_48ffcbf0b9e7
+LTS_5.4.86_7d99cf8c84a7
diff --git a/android/abi_gki_aarch64.xml b/android/abi_gki_aarch64.xml
index ced999ef6ac8..2e8113c8c557 100644
--- a/android/abi_gki_aarch64.xml
+++ b/android/abi_gki_aarch64.xml
@@ -1842,12 +1842,14 @@
+
+
@@ -4000,6 +4002,7 @@
+
@@ -4100,6 +4103,7 @@
+
@@ -17786,7 +17790,7 @@
-
+
@@ -20404,7 +20408,7 @@
-
+
@@ -30764,7 +30768,20 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -31940,6 +31957,7 @@
+
@@ -32317,6 +32335,17 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -69088,6 +69117,12 @@
+
+
+
+
+
+
@@ -111573,7 +111608,20 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -119876,6 +119924,17 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -121974,57 +122033,57 @@
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
-
+
+
-
-
-
+
+
+
@@ -130072,6 +130131,10 @@
+
+
+
+
@@ -148395,7 +148458,7 @@
-
+
@@ -164374,6 +164437,8 @@
+
+
@@ -164402,6 +164467,11 @@
+
+
+
+
+
@@ -164652,13 +164722,13 @@
-
-
+
+
-
-
-
+
+
+
@@ -166139,9 +166209,9 @@
-
-
-
+
+
+
@@ -166149,9 +166219,9 @@
-
-
-
+
+
+
@@ -166347,33 +166417,33 @@
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
+
+
+
-
-
+
+
@@ -166926,6 +166996,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
@@ -167568,7 +167650,7 @@
-
+
@@ -167576,7 +167658,7 @@
-
+
@@ -167584,7 +167666,7 @@
-
+
@@ -190968,6 +191050,6 @@
diff --git a/android/abi_gki_aarch64_48ffcbf0b9e7.xml b/android/abi_gki_aarch64_7d99cf8c84a7.xml
similarity index 99%
rename from android/abi_gki_aarch64_48ffcbf0b9e7.xml
rename to android/abi_gki_aarch64_7d99cf8c84a7.xml
index aecc8df6dcb3..f65ea5b69f70 100644
--- a/android/abi_gki_aarch64_48ffcbf0b9e7.xml
+++ b/android/abi_gki_aarch64_7d99cf8c84a7.xml
@@ -32759,7 +32759,7 @@
-
+
@@ -33880,7 +33880,7 @@
-
+
@@ -34681,7 +34681,7 @@
-
+
@@ -37244,7 +37244,7 @@
-
+
@@ -38344,7 +38344,7 @@
-
+
@@ -38734,7 +38734,7 @@
-
+
@@ -47010,7 +47010,7 @@
-
+
@@ -49117,7 +49117,7 @@
-
+
@@ -49125,7 +49125,7 @@
-
+
@@ -49133,7 +49133,7 @@
-
+
@@ -49757,7 +49757,7 @@
-
+
@@ -55311,7 +55311,7 @@
-
+
@@ -55319,7 +55319,7 @@
-
+
@@ -55631,7 +55631,7 @@
-
+
@@ -55746,7 +55746,7 @@
-
+
@@ -55797,7 +55797,7 @@
-
+
@@ -58977,7 +58977,7 @@
-
+
@@ -60112,7 +60112,7 @@
-
+
@@ -60120,7 +60120,7 @@
-
+
@@ -61790,7 +61790,7 @@
-
+
@@ -63518,7 +63518,7 @@
-
+
@@ -63526,7 +63526,7 @@
-
+
@@ -64252,7 +64252,7 @@
-
+
@@ -64260,7 +64260,7 @@
-
+
@@ -64268,7 +64268,7 @@
-
+
@@ -64276,7 +64276,7 @@
-
+
@@ -64284,7 +64284,7 @@
-
+
@@ -64295,7 +64295,7 @@
-
+
@@ -64303,7 +64303,7 @@
-
+
@@ -64314,7 +64314,7 @@
-
+
@@ -64322,7 +64322,7 @@
-
+
@@ -64694,7 +64694,7 @@
-
+
@@ -67679,12 +67679,12 @@
-
+
-
+
@@ -67771,7 +67771,7 @@
-
+
@@ -85753,27 +85753,27 @@
-
-
-
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
+
+
-
-
-
+
+
+
@@ -85817,37 +85817,37 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
@@ -86696,25 +86696,25 @@
-
-
-
-
+
+
+
+
-
-
-
+
+
+
-
-
+
+
-
-
-
-
+
+
+
+
@@ -86748,8 +86748,8 @@
-
-
+
+
@@ -113718,7 +113718,7 @@
-
+
@@ -113735,7 +113735,7 @@
-
+
@@ -113743,7 +113743,7 @@
-
+
@@ -113760,7 +113760,7 @@
-
+
@@ -113962,7 +113962,7 @@
-
+
@@ -113976,7 +113976,7 @@
-
+
@@ -113998,7 +113998,7 @@
-
+
@@ -114740,12 +114740,12 @@
-
+
-
+
@@ -114817,7 +114817,7 @@
-
+
@@ -115498,7 +115498,7 @@
-
+
@@ -115532,7 +115532,7 @@
-
+
@@ -115871,7 +115871,7 @@
-
+
@@ -116012,7 +116012,7 @@
-
+
@@ -116358,7 +116358,7 @@
-
+
@@ -116388,7 +116388,7 @@
-
+
@@ -117104,7 +117104,7 @@
-
+
@@ -117511,7 +117511,7 @@
-
+
@@ -118201,7 +118201,7 @@
-
+
@@ -118331,7 +118331,7 @@
-
+
@@ -118362,7 +118362,7 @@
-
+
@@ -118371,7 +118371,7 @@
-
+
@@ -118393,7 +118393,7 @@
-
+
@@ -118404,7 +118404,7 @@
-
+
@@ -118412,7 +118412,7 @@
-
+
@@ -118423,7 +118423,7 @@
-
+
@@ -118471,7 +118471,7 @@
-
+
@@ -118552,7 +118552,7 @@
-
+
@@ -118708,7 +118708,7 @@
-
+
@@ -118722,7 +118722,7 @@
-
+
@@ -118917,7 +118917,7 @@
-
+
@@ -131267,8 +131267,8 @@
-
-
+
+
@@ -132142,6 +132142,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -132328,62 +132384,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -132778,9 +132778,9 @@
-
-
-
+
+
+
@@ -133475,11 +133475,11 @@
-
-
-
-
-
+
+
+
+
+
@@ -139094,7 +139094,7 @@
-
+
diff --git a/android/abi_gki_aarch64_db845c b/android/abi_gki_aarch64_db845c
index 671c62ec75aa..b77a5a8637cb 100644
--- a/android/abi_gki_aarch64_db845c
+++ b/android/abi_gki_aarch64_db845c
@@ -92,6 +92,7 @@
devm_phy_get
devm_pinctrl_register
devm_platform_ioremap_resource
+ devm_regmap_field_alloc
__devm_regmap_init_mmio_clk
devm_regulator_bulk_get
devm_regulator_get
@@ -213,6 +214,7 @@
irq_set_irq_wake
irq_to_desc
jiffies
+ jiffies_to_usecs
kfree
kfree_skb
kimage_vaddr
@@ -251,6 +253,8 @@
__netdev_alloc_skb
netif_napi_add
netif_napi_del
+ nvmem_cell_get
+ nvmem_cell_put
nvmem_cell_read
of_address_to_resource
of_alias_get_id
@@ -368,6 +372,7 @@
__register_rpmsg_driver
regmap_bulk_read
regmap_bulk_write
+ regmap_field_read
regmap_read
regmap_update_bits_base
regmap_write
@@ -1048,8 +1053,6 @@
no_llseek
nsecs_to_jiffies
ns_to_timespec
- nvmem_cell_get
- nvmem_cell_put
of_device_is_available
of_dma_configure
of_drm_find_bridge
@@ -1227,10 +1230,8 @@
of_irq_get
# required by qcom_hwspinlock.ko
- devm_regmap_field_alloc
hwspin_lock_register
hwspin_lock_unregister
- regmap_field_read
regmap_field_update_bits_base
# required by qcom_q6v5.ko
@@ -1252,7 +1253,6 @@
__memcpy_toio
# required by qcom_spmi-regulator.ko
- jiffies_to_usecs
regulator_disable_regmap
regulator_enable_regmap
regulator_is_enabled_regmap
@@ -1263,6 +1263,10 @@
rproc_get_by_child
try_wait_for_completion
+# required by qcom_tsens.ko
+ devm_thermal_zone_of_sensor_register
+ thermal_zone_get_slope
+
# required by qmi_helpers.ko
init_net
kernel_getsockname
diff --git a/android/abi_gki_aarch64_exynos b/android/abi_gki_aarch64_exynos
index ac98ae3dd488..1f795dac9b27 100644
--- a/android/abi_gki_aarch64_exynos
+++ b/android/abi_gki_aarch64_exynos
@@ -1462,6 +1462,7 @@
static_key_initialized
static_key_slow_dec
static_key_slow_inc
+ stpcpy
strcasecmp
strcat
strchr
diff --git a/android/abi_gki_aarch64_galaxy b/android/abi_gki_aarch64_galaxy
index bef65a0d87b9..b65bf734e98c 100644
--- a/android/abi_gki_aarch64_galaxy
+++ b/android/abi_gki_aarch64_galaxy
@@ -1103,9 +1103,11 @@
gpiochip_generic_free
gpiochip_generic_request
gpiochip_get_data
+ gpiochip_irqchip_add_key
gpiochip_line_is_valid
gpiochip_lock_as_irq
gpiochip_remove
+ gpiochip_set_nested_irqchip
gpiochip_unlock_as_irq
gpiod_direction_input
gpiod_direction_output
diff --git a/arch/arm64/configs/db845c_gki.fragment b/arch/arm64/configs/db845c_gki.fragment
index c8ca9a8110c6..2e69bf2494cb 100644
--- a/arch/arm64/configs/db845c_gki.fragment
+++ b/arch/arm64/configs/db845c_gki.fragment
@@ -12,6 +12,7 @@ CONFIG_PINCTRL_QCOM_SPMI_PMIC=m
CONFIG_PINCTRL_SDM845=m
CONFIG_POWER_RESET_QCOM_PON=m
CONFIG_SYSCON_REBOOT_MODE=m
+CONFIG_QCOM_TSENS=m
CONFIG_QCOM_WDT=m
CONFIG_PM8916_WATCHDOG=m
CONFIG_MFD_SPMI_PMIC=m
diff --git a/drivers/base/core.c b/drivers/base/core.c
index d54f9df193b5..49fadbc37a85 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -1373,7 +1373,7 @@ static void device_links_purge(struct device *dev)
return;
mutex_lock(&wfs_lock);
- list_del(&dev->links.needs_suppliers);
+ list_del_init(&dev->links.needs_suppliers);
mutex_unlock(&wfs_lock);
/*
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index d2ecc9c45255..263eca119ff0 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -90,7 +90,7 @@ EXPORT_SYMBOL_GPL(hid_register_report);
* Register a new field for this report.
*/
-static struct hid_field *hid_register_field(struct hid_report *report, unsigned usages, unsigned values)
+static struct hid_field *hid_register_field(struct hid_report *report, unsigned usages)
{
struct hid_field *field;
@@ -101,7 +101,7 @@ static struct hid_field *hid_register_field(struct hid_report *report, unsigned
field = kzalloc((sizeof(struct hid_field) +
usages * sizeof(struct hid_usage) +
- values * sizeof(unsigned)), GFP_KERNEL);
+ usages * sizeof(unsigned)), GFP_KERNEL);
if (!field)
return NULL;
@@ -300,7 +300,7 @@ static int hid_add_field(struct hid_parser *parser, unsigned report_type, unsign
usages = max_t(unsigned, parser->local.usage_index,
parser->global.report_count);
- field = hid_register_field(report, usages, parser->global.report_count);
+ field = hid_register_field(report, usages);
if (!field)
return 0;
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index a9fc831eba60..bc4618ae9c5f 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -4041,7 +4041,7 @@ static void hwsim_virtio_rx_work(struct work_struct *work)
}
vq = hwsim_vqs[HWSIM_VQ_RX];
sg_init_one(sg, skb->head, skb_end_offset(skb));
- err = virtqueue_add_inbuf(vq, sg, 1, skb, GFP_KERNEL);
+ err = virtqueue_add_inbuf(vq, sg, 1, skb, GFP_ATOMIC);
if (WARN(err, "virtqueue_add_inbuf returned %d\n", err))
nlmsg_free(skb);
else
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
index ce92ae227aa1..a08568c85126 100644
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -445,7 +445,7 @@ static void rproc_rvdev_release(struct device *dev)
/**
* rproc_handle_vdev() - handle a vdev fw resource
* @rproc: the remote processor
- * @rsc: the vring resource descriptor
+ * ptr: the vring resource descriptor
* @avail: size of available data (for sanity checking the image)
*
* This resource entry requests the host to statically register a virtio
@@ -469,9 +469,10 @@ static void rproc_rvdev_release(struct device *dev)
*
* Returns 0 on success, or an appropriate error code otherwise
*/
-static int rproc_handle_vdev(struct rproc *rproc, struct fw_rsc_vdev *rsc,
+static int rproc_handle_vdev(struct rproc *rproc, void *ptr,
int offset, int avail)
{
+ struct fw_rsc_vdev *rsc = ptr;
struct device *dev = &rproc->dev;
struct rproc_vdev *rvdev;
int i, ret;
@@ -587,7 +588,7 @@ void rproc_vdev_release(struct kref *ref)
/**
* rproc_handle_trace() - handle a shared trace buffer resource
* @rproc: the remote processor
- * @rsc: the trace resource descriptor
+ * @ptr: the trace resource descriptor
* @avail: size of available data (for sanity checking the image)
*
* In case the remote processor dumps trace logs into memory,
@@ -600,9 +601,10 @@ void rproc_vdev_release(struct kref *ref)
*
* Returns 0 on success, or an appropriate error code otherwise
*/
-static int rproc_handle_trace(struct rproc *rproc, struct fw_rsc_trace *rsc,
+static int rproc_handle_trace(struct rproc *rproc, void *ptr,
int offset, int avail)
{
+ struct fw_rsc_trace *rsc = ptr;
struct rproc_debug_trace *trace;
struct device *dev = &rproc->dev;
char name[15];
@@ -652,7 +654,7 @@ static int rproc_handle_trace(struct rproc *rproc, struct fw_rsc_trace *rsc,
/**
* rproc_handle_devmem() - handle devmem resource entry
* @rproc: remote processor handle
- * @rsc: the devmem resource entry
+ * @ptr: the devmem resource entry
* @avail: size of available data (for sanity checking the image)
*
* Remote processors commonly need to access certain on-chip peripherals.
@@ -674,9 +676,10 @@ static int rproc_handle_trace(struct rproc *rproc, struct fw_rsc_trace *rsc,
* and not allow firmwares to request access to physical addresses that
* are outside those ranges.
*/
-static int rproc_handle_devmem(struct rproc *rproc, struct fw_rsc_devmem *rsc,
+static int rproc_handle_devmem(struct rproc *rproc, void *ptr,
int offset, int avail)
{
+ struct fw_rsc_devmem *rsc = ptr;
struct rproc_mem_entry *mapping;
struct device *dev = &rproc->dev;
int ret;
@@ -853,7 +856,7 @@ static int rproc_release_carveout(struct rproc *rproc,
/**
* rproc_handle_carveout() - handle phys contig memory allocation requests
* @rproc: rproc handle
- * @rsc: the resource entry
+ * @ptr: the resource entry
* @avail: size of available data (for image validation)
*
* This function will handle firmware requests for allocation of physically
@@ -869,9 +872,9 @@ static int rproc_release_carveout(struct rproc *rproc,
* pressure is important; it may have a substantial impact on performance.
*/
static int rproc_handle_carveout(struct rproc *rproc,
- struct fw_rsc_carveout *rsc,
- int offset, int avail)
+ void *ptr, int offset, int avail)
{
+ struct fw_rsc_carveout *rsc = ptr;
struct rproc_mem_entry *carveout;
struct device *dev = &rproc->dev;
@@ -1028,10 +1031,10 @@ EXPORT_SYMBOL(rproc_of_resm_mem_entry_init);
* enum fw_resource_type.
*/
static rproc_handle_resource_t rproc_loading_handlers[RSC_LAST] = {
- [RSC_CARVEOUT] = (rproc_handle_resource_t)rproc_handle_carveout,
- [RSC_DEVMEM] = (rproc_handle_resource_t)rproc_handle_devmem,
- [RSC_TRACE] = (rproc_handle_resource_t)rproc_handle_trace,
- [RSC_VDEV] = (rproc_handle_resource_t)rproc_handle_vdev,
+ [RSC_CARVEOUT] = rproc_handle_carveout,
+ [RSC_DEVMEM] = rproc_handle_devmem,
+ [RSC_TRACE] = rproc_handle_trace,
+ [RSC_VDEV] = rproc_handle_vdev,
};
/* handle firmware resource entries before booting the remote processor */
diff --git a/drivers/scsi/ufs/ufs-mediatek.c b/drivers/scsi/ufs/ufs-mediatek.c
index e22f91695b04..6ac8f1e39796 100644
--- a/drivers/scsi/ufs/ufs-mediatek.c
+++ b/drivers/scsi/ufs/ufs-mediatek.c
@@ -582,7 +582,7 @@ static void ufs_mtk_vreg_set_lpm(struct ufs_hba *hba, bool lpm)
if (!hba->vreg_info.vccq2 || !hba->vreg_info.vcc)
return;
- if (lpm & !hba->vreg_info.vcc->enabled)
+ if (lpm && !hba->vreg_info.vcc->enabled)
regulator_set_mode(hba->vreg_info.vccq2->reg,
REGULATOR_MODE_IDLE);
else if (!lpm)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 0f0a05af8945..cb4c80ab7cf5 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -9077,7 +9077,8 @@ int ufshcd_system_suspend(struct ufs_hba *hba)
(ufs_get_pm_lvl_to_dev_pwr_mode(hba->spm_lvl) ==
hba->curr_dev_pwr_mode) &&
(ufs_get_pm_lvl_to_link_pwr_state(hba->spm_lvl) ==
- hba->uic_link_state))
+ hba->uic_link_state) &&
+ !hba->dev_info.b_rpm_dev_flush_capable)
goto out;
if (pm_runtime_suspended(hba->dev)) {
@@ -9274,6 +9275,7 @@ void ufshcd_remove(struct ufs_hba *hba)
ufs_bsg_remove(hba);
ufs_sysfs_remove_nodes(hba->dev);
scsi_remove_host(hba->host);
+ destroy_workqueue(hba->eh_wq);
/* disable interrupts */
ufshcd_disable_intr(hba, hba->intr_mask);
ufshcd_hba_stop(hba, true);
@@ -9546,6 +9548,7 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)
exit_gating:
ufshcd_exit_clk_scaling(hba);
ufshcd_exit_clk_gating(hba);
+ destroy_workqueue(hba->eh_wq);
out_disable:
hba->is_irq_enabled = false;
ufshcd_hba_exit(hba);
diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h
index 91aee90ec047..db44c7ca098e 100644
--- a/drivers/scsi/ufs/ufshcd.h
+++ b/drivers/scsi/ufs/ufshcd.h
@@ -1462,6 +1462,10 @@ static inline void ufshcd_vops_device_reset(struct ufs_hba *hba)
if (hba->vops && hba->vops->device_reset) {
hba->vops->device_reset(hba);
ufshcd_set_ufs_dev_active(hba);
+ if (ufshcd_is_wb_allowed(hba)) {
+ hba->wb_enabled = false;
+ hba->wb_buf_flush_enabled = false;
+ }
ufshcd_update_reg_hist(&hba->ufs_stats.dev_reset, 0);
}
}
diff --git a/fs/fuse/OWNERS b/fs/fuse/OWNERS
new file mode 100644
index 000000000000..6c04da7a65d5
--- /dev/null
+++ b/fs/fuse/OWNERS
@@ -0,0 +1,2 @@
+# include OWNERS from the authoritative android-mainline branch
+include kernel/common:android-mainline:/fs/fuse/OWNERS
diff --git a/include/net/udp.h b/include/net/udp.h
index e55d5f765807..9ab282cbff20 100644
--- a/include/net/udp.h
+++ b/include/net/udp.h
@@ -171,7 +171,7 @@ struct sk_buff *udp_gro_receive(struct list_head *head, struct sk_buff *skb,
int udp_gro_complete(struct sk_buff *skb, int nhoff, udp_lookup_t lookup);
struct sk_buff *__udp_gso_segment(struct sk_buff *gso_skb,
- netdev_features_t features);
+ netdev_features_t features, bool is_ipv6);
static inline struct udphdr *udp_gro_udphdr(struct sk_buff *skb)
{
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 73caf93f23c0..5959bd691e4a 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -6302,22 +6302,22 @@ static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, int t
static int
select_idle_capacity(struct task_struct *p, struct sched_domain *sd, int target)
{
- unsigned long best_cap = 0;
+ unsigned long task_util, best_cap = 0;
int cpu, best_cpu = -1;
struct cpumask *cpus;
- sync_entity_load_avg(&p->se);
-
cpus = this_cpu_cpumask_var_ptr(select_idle_mask);
cpumask_and(cpus, sched_domain_span(sd), p->cpus_ptr);
+ task_util = uclamp_task_util(p);
+
for_each_cpu_wrap(cpu, cpus, target) {
unsigned long cpu_cap = capacity_of(cpu);
if ((!available_idle_cpu(cpu) && !sched_idle_cpu(cpu)) ||
cpu_isolated(target))
continue;
- if (task_fits_capacity(p, cpu_cap, cpu))
+ if (fits_capacity(task_util, cpu_cap))
return cpu;
if (cpu_cap > best_cap) {
@@ -6329,14 +6329,60 @@ select_idle_capacity(struct task_struct *p, struct sched_domain *sd, int target)
return best_cpu;
}
+static inline bool asym_fits_capacity(int task_util, int cpu)
+{
+ if (static_branch_unlikely(&sched_asym_cpucapacity))
+ return fits_capacity(task_util, capacity_of(cpu));
+
+ return true;
+}
+
/*
* Try and locate an idle core/thread in the LLC cache domain.
*/
static int select_idle_sibling(struct task_struct *p, int prev, int target)
{
struct sched_domain *sd;
+ unsigned long task_util;
int i, recent_used_cpu;
+ /*
+ * On asymmetric system, update task utilization because we will check
+ * that the task fits with cpu's capacity.
+ */
+ if (static_branch_unlikely(&sched_asym_cpucapacity)) {
+ sync_entity_load_avg(&p->se);
+ task_util = uclamp_task_util(p);
+ }
+
+ if ((available_idle_cpu(target) || sched_idle_cpu(target)) &&
+ asym_fits_capacity(task_util, target))
+ return target;
+
+ /*
+ * If the previous CPU is cache affine and idle, don't be stupid:
+ */
+ if (prev != target && cpus_share_cache(prev, target) &&
+ (available_idle_cpu(prev) || sched_idle_cpu(prev)) &&
+ asym_fits_capacity(task_util, prev))
+ return prev;
+
+ /* Check a recently used CPU as a potential idle candidate: */
+ recent_used_cpu = p->recent_used_cpu;
+ if (recent_used_cpu != prev &&
+ recent_used_cpu != target &&
+ cpus_share_cache(recent_used_cpu, target) &&
+ (available_idle_cpu(recent_used_cpu) || sched_idle_cpu(recent_used_cpu)) &&
+ cpumask_test_cpu(p->recent_used_cpu, p->cpus_ptr) &&
+ asym_fits_capacity(task_util, recent_used_cpu)) {
+ /*
+ * Replace recent_used_cpu with prev as it is a potential
+ * candidate for the next wake:
+ */
+ p->recent_used_cpu = prev;
+ return recent_used_cpu;
+ }
+
/*
* For asymmetric CPU capacity systems, our domain of interest is
* sd_asym_cpucapacity rather than sd_llc.
@@ -6351,39 +6397,10 @@ static int select_idle_sibling(struct task_struct *p, int prev, int target)
* SD_ASYM_CPUCAPACITY. These should follow the usual symmetric
* capacity path.
*/
- if (!sd)
- goto symmetric;
-
- i = select_idle_capacity(p, sd, target);
- return ((unsigned)i < nr_cpumask_bits) ? i : target;
- }
-
-symmetric:
- if ((available_idle_cpu(target) || sched_idle_cpu(target)) &&
- !cpu_isolated(target))
- return target;
-
- /*
- * If the previous CPU is cache affine and idle, don't be stupid:
- */
- if (prev != target && cpus_share_cache(prev, target) &&
- ((available_idle_cpu(prev) || sched_idle_cpu(prev)) &&
- !cpu_isolated(prev)))
- return prev;
-
- /* Check a recently used CPU as a potential idle candidate: */
- recent_used_cpu = p->recent_used_cpu;
- if (recent_used_cpu != prev &&
- recent_used_cpu != target &&
- cpus_share_cache(recent_used_cpu, target) &&
- (available_idle_cpu(recent_used_cpu) || sched_idle_cpu(recent_used_cpu)) &&
- cpumask_test_cpu(p->recent_used_cpu, p->cpus_ptr)) {
- /*
- * Replace recent_used_cpu with prev as it is a potential
- * candidate for the next wake:
- */
- p->recent_used_cpu = prev;
- return recent_used_cpu;
+ if (sd) {
+ i = select_idle_capacity(p, sd, target);
+ return ((unsigned)i < nr_cpumask_bits) ? i : target;
+ }
}
sd = rcu_dereference(per_cpu(sd_llc, target));
diff --git a/mm/cma.c b/mm/cma.c
index 24a010f4bb84..8f2c1b0edfa6 100644
--- a/mm/cma.c
+++ b/mm/cma.c
@@ -36,7 +36,6 @@
struct cma cma_areas[MAX_CMA_AREAS];
unsigned cma_area_count;
-static DEFINE_MUTEX(cma_mutex);
phys_addr_t cma_get_base(const struct cma *cma)
{
@@ -508,10 +507,9 @@ struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align,
mutex_unlock(&cma->lock);
pfn = cma->base_pfn + (bitmap_no << cma->order_per_bit);
- mutex_lock(&cma_mutex);
ret = alloc_contig_range(pfn, pfn + count, MIGRATE_CMA,
GFP_KERNEL | (no_warn ? __GFP_NOWARN : 0));
- mutex_unlock(&cma_mutex);
+
if (ret == 0) {
page = pfn_to_page(pfn);
break;
diff --git a/net/core/ethtool.c b/net/core/ethtool.c
index cd9bc67381b2..99ce0ccc66df 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -92,6 +92,7 @@ static const char netdev_features_strings[NETDEV_FEATURE_COUNT][ETH_GSTRING_LEN]
[NETIF_F_GSO_SCTP_BIT] = "tx-sctp-segmentation",
[NETIF_F_GSO_ESP_BIT] = "tx-esp-segmentation",
[NETIF_F_GSO_UDP_L4_BIT] = "tx-udp-segmentation",
+ [NETIF_F_GSO_FRAGLIST_BIT] = "tx-gso-list",
[NETIF_F_FCOE_CRC_BIT] = "tx-checksum-fcoe-crc",
[NETIF_F_SCTP_CRC_BIT] = "tx-checksum-sctp",
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index b87b6334f689..edc9be5aa823 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -3649,7 +3649,8 @@ struct sk_buff *skb_segment_list(struct sk_buff *skb,
unsigned int delta_truesize = 0;
unsigned int delta_len = 0;
struct sk_buff *tail = NULL;
- struct sk_buff *nskb;
+ struct sk_buff *nskb, *tmp;
+ int err;
skb_push(skb, -skb_network_offset(skb) + offset);
@@ -3659,11 +3660,28 @@ struct sk_buff *skb_segment_list(struct sk_buff *skb,
nskb = list_skb;
list_skb = list_skb->next;
+ err = 0;
+ if (skb_shared(nskb)) {
+ tmp = skb_clone(nskb, GFP_ATOMIC);
+ if (tmp) {
+ consume_skb(nskb);
+ nskb = tmp;
+ err = skb_unclone(nskb, GFP_ATOMIC);
+ } else {
+ err = -ENOMEM;
+ }
+ }
+
if (!tail)
skb->next = nskb;
else
tail->next = nskb;
+ if (unlikely(err)) {
+ nskb->next = list_skb;
+ goto err_linearize;
+ }
+
tail = nskb;
delta_len += nskb->len;
diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c
index 9298b0ebc4ff..fd60e5cd1519 100644
--- a/net/ipv4/udp_offload.c
+++ b/net/ipv4/udp_offload.c
@@ -184,8 +184,67 @@ struct sk_buff *skb_udp_tunnel_segment(struct sk_buff *skb,
}
EXPORT_SYMBOL(skb_udp_tunnel_segment);
+static void __udpv4_gso_segment_csum(struct sk_buff *seg,
+ __be32 *oldip, __be32 *newip,
+ __be16 *oldport, __be16 *newport)
+{
+ struct udphdr *uh;
+ struct iphdr *iph;
+
+ if (*oldip == *newip && *oldport == *newport)
+ return;
+
+ uh = udp_hdr(seg);
+ iph = ip_hdr(seg);
+
+ if (uh->check) {
+ inet_proto_csum_replace4(&uh->check, seg, *oldip, *newip,
+ true);
+ inet_proto_csum_replace2(&uh->check, seg, *oldport, *newport,
+ false);
+ if (!uh->check)
+ uh->check = CSUM_MANGLED_0;
+ }
+ *oldport = *newport;
+
+ csum_replace4(&iph->check, *oldip, *newip);
+ *oldip = *newip;
+}
+
+static struct sk_buff *__udpv4_gso_segment_list_csum(struct sk_buff *segs)
+{
+ struct sk_buff *seg;
+ struct udphdr *uh, *uh2;
+ struct iphdr *iph, *iph2;
+
+ seg = segs;
+ uh = udp_hdr(seg);
+ iph = ip_hdr(seg);
+
+ if ((udp_hdr(seg)->dest == udp_hdr(seg->next)->dest) &&
+ (udp_hdr(seg)->source == udp_hdr(seg->next)->source) &&
+ (ip_hdr(seg)->daddr == ip_hdr(seg->next)->daddr) &&
+ (ip_hdr(seg)->saddr == ip_hdr(seg->next)->saddr))
+ return segs;
+
+ while ((seg = seg->next)) {
+ uh2 = udp_hdr(seg);
+ iph2 = ip_hdr(seg);
+
+ __udpv4_gso_segment_csum(seg,
+ &iph2->saddr, &iph->saddr,
+ &uh2->source, &uh->source);
+ __udpv4_gso_segment_csum(seg,
+ &iph2->daddr, &iph->daddr,
+ &uh2->dest, &uh->dest);
+ }
+
+ return segs;
+}
+
static struct sk_buff *__udp_gso_segment_list(struct sk_buff *skb,
- netdev_features_t features)
+ netdev_features_t features,
+ bool is_ipv6)
{
unsigned int mss = skb_shinfo(skb)->gso_size;
@@ -195,11 +254,11 @@ static struct sk_buff *__udp_gso_segment_list(struct sk_buff *skb,
udp_hdr(skb)->len = htons(sizeof(struct udphdr) + mss);
- return skb;
+ return is_ipv6 ? skb : __udpv4_gso_segment_list_csum(skb);
}
struct sk_buff *__udp_gso_segment(struct sk_buff *gso_skb,
- netdev_features_t features)
+ netdev_features_t features, bool is_ipv6)
{
struct sock *sk = gso_skb->sk;
unsigned int sum_truesize = 0;
@@ -211,7 +270,7 @@ struct sk_buff *__udp_gso_segment(struct sk_buff *gso_skb,
__be16 newlen;
if (skb_shinfo(gso_skb)->gso_type & SKB_GSO_FRAGLIST)
- return __udp_gso_segment_list(gso_skb, features);
+ return __udp_gso_segment_list(gso_skb, features, is_ipv6);
mss = skb_shinfo(gso_skb)->gso_size;
if (gso_skb->len <= sizeof(*uh) + mss)
@@ -325,7 +384,7 @@ static struct sk_buff *udp4_ufo_fragment(struct sk_buff *skb,
goto out;
if (skb_shinfo(skb)->gso_type & SKB_GSO_UDP_L4)
- return __udp_gso_segment(skb, features);
+ return __udp_gso_segment(skb, features, false);
mss = skb_shinfo(skb)->gso_size;
if (unlikely(skb->len <= mss))
diff --git a/net/ipv6/udp_offload.c b/net/ipv6/udp_offload.c
index 7a46bd33fa2f..6e06c90fa318 100644
--- a/net/ipv6/udp_offload.c
+++ b/net/ipv6/udp_offload.c
@@ -46,7 +46,7 @@ static struct sk_buff *udp6_ufo_fragment(struct sk_buff *skb,
goto out;
if (skb_shinfo(skb)->gso_type & SKB_GSO_UDP_L4)
- return __udp_gso_segment(skb, features);
+ return __udp_gso_segment(skb, features, true);
/* Do software UFO. Complete and fill in the UDP checksum as HW cannot
* do checksum of UDP packets sent as multiple IP fragments.
diff --git a/net/xfrm/xfrm_compat.c b/net/xfrm/xfrm_compat.c
index c1dee0696dfb..aacbf250a25e 100644
--- a/net/xfrm/xfrm_compat.c
+++ b/net/xfrm/xfrm_compat.c
@@ -234,6 +234,7 @@ static int xfrm_xlate64_attr(struct sk_buff *dst, const struct nlattr *src)
case XFRMA_PAD:
/* Ignore */
return 0;
+ case XFRMA_UNSPEC:
case XFRMA_ALG_AUTH:
case XFRMA_ALG_CRYPT:
case XFRMA_ALG_COMP:
@@ -387,7 +388,7 @@ static int xfrm_attr_cpy32(void *dst, size_t *pos, const struct nlattr *src,
memcpy(nla, src, nla_attr_size(copy_len));
nla->nla_len = nla_attr_size(payload);
- *pos += nla_attr_size(payload);
+ *pos += nla_attr_size(copy_len);
nlmsg->nlmsg_len += nla->nla_len;
memset(dst + *pos, 0, payload - copy_len);
@@ -563,7 +564,7 @@ static struct nlmsghdr *xfrm_user_rcv_msg_compat(const struct nlmsghdr *h32,
return NULL;
len += NLMSG_HDRLEN;
- h64 = kvmalloc(len, GFP_KERNEL | __GFP_ZERO);
+ h64 = kvmalloc(len, GFP_KERNEL);
if (!h64)
return ERR_PTR(-ENOMEM);
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index 83a8cbf2a37a..8bb052bb137e 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -2381,8 +2381,10 @@ int xfrm_user_policy(struct sock *sk, int optname, u8 __user *optval, int optlen
if (in_compat_syscall()) {
struct xfrm_translator *xtr = xfrm_get_translator();
- if (!xtr)
+ if (!xtr) {
+ kfree(data);
return -EOPNOTSUPP;
+ }
err = xtr->xlate_user_policy_sockptr(&data, optlen);
xfrm_put_translator(xtr);
diff --git a/scripts/adjust_autoksyms.sh b/scripts/adjust_autoksyms.sh
index 7028a5a56d66..d8997d4f9273 100755
--- a/scripts/adjust_autoksyms.sh
+++ b/scripts/adjust_autoksyms.sh
@@ -34,9 +34,6 @@ case "$KBUILD_VERBOSE" in
;;
esac
-# We need access to CONFIG_ symbols
-. include/config/auto.conf
-
# Generate a new symbol list file
$CONFIG_SHELL $srctree/scripts/gen_autoksyms.sh "$new_ksyms_file"