mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
Merge 5.4.274 into android11-5.4-lts
Changes in 5.4.274
amdkfd: use calloc instead of kzalloc to avoid integer overflow
Documentation/hw-vuln: Update spectre doc
x86/cpu: Support AMD Automatic IBRS
x86/bugs: Use sysfs_emit()
timers: Update kernel-doc for various functions
timers: Use del_timer_sync() even on UP
timers: Rename del_timer_sync() to timer_delete_sync()
wifi: brcmfmac: Fix use-after-free bug in brcmf_cfg80211_detach
media: staging: ipu3-imgu: Set fields before media_entity_pads_init()
clk: qcom: gcc-sdm845: Add soft dependency on rpmhpd
smack: Set SMACK64TRANSMUTE only for dirs in smack_inode_setxattr()
smack: Handle SMACK64TRANSMUTE in smack_inode_setsecurity()
ARM: dts: mmp2-brownstone: Don't redeclare phandle references
arm: dts: marvell: Fix maxium->maxim typo in brownstone dts
serial: max310x: fix NULL pointer dereference in I2C instantiation
media: xc4000: Fix atomicity violation in xc4000_get_frequency
KVM: Always flush async #PF workqueue when vCPU is being destroyed
sparc64: NMI watchdog: fix return value of __setup handler
sparc: vDSO: fix return value of __setup handler
crypto: qat - fix double free during reset
crypto: qat - resolve race condition during AER recovery
selftests/mqueue: Set timeout to 180 seconds
ext4: correct best extent lstart adjustment logic
fat: fix uninitialized field in nostale filehandles
ubifs: Set page uptodate in the correct place
ubi: Check for too small LEB size in VTBL code
ubi: correct the calculation of fastmap size
mtd: rawnand: meson: fix scrambling mode value in command macro
parisc: Do not hardcode registers in checksum functions
parisc: Fix ip_fast_csum
parisc: Fix csum_ipv6_magic on 32-bit systems
parisc: Fix csum_ipv6_magic on 64-bit systems
parisc: Strip upper 32 bit of sum in csum_ipv6_magic for 64-bit builds
PM: suspend: Set mem_sleep_current during kernel command line setup
clk: qcom: gcc-ipq8074: fix terminating of frequency table arrays
clk: qcom: mmcc-apq8084: fix terminating of frequency table arrays
clk: qcom: mmcc-msm8974: fix terminating of frequency table arrays
powerpc/fsl: Fix mfpmr build errors with newer binutils
USB: serial: ftdi_sio: add support for GMC Z216C Adapter IR-USB
USB: serial: add device ID for VeriFone adapter
USB: serial: cp210x: add ID for MGP Instruments PDS100
USB: serial: option: add MeiG Smart SLM320 product
USB: serial: cp210x: add pid/vid for TDK NC0110013M and MM0110113M
PM: sleep: wakeirq: fix wake irq warning in system suspend
mmc: tmio: avoid concurrent runs of mmc_request_done()
fuse: don't unhash root
btrfs: fix off-by-one chunk length calculation at contains_pending_extent()
PCI: Drop pci_device_remove() test of pci_dev->driver
PCI/PM: Drain runtime-idle callbacks before driver removal
Revert "Revert "md/raid5: Wait for MD_SB_CHANGE_PENDING in raid5d""
dm-raid: fix lockdep waring in "pers->hot_add_disk"
mmc: core: Fix switch on gp3 partition
hwmon: (amc6821) add of_match table
ext4: fix corruption during on-line resize
firmware: meson_sm: Rework driver as a proper platform driver
nvmem: meson-efuse: fix function pointer type mismatch
slimbus: core: Remove usage of the deprecated ida_simple_xx() API
speakup: Fix 8bit characters from direct synth
kbuild: Move -Wenum-{compare-conditional,enum-conversion} into W=1
vfio/platform: Disable virqfds on cleanup
ring-buffer: Fix resetting of shortest_full
ring-buffer: Fix full_waiters_pending in poll
soc: fsl: qbman: Always disable interrupts when taking cgr_lock
soc: fsl: qbman: Add helper for sanity checking cgr ops
soc: fsl: qbman: Add CGR update function
soc: fsl: qbman: Use raw spinlock for cgr_lock
s390/zcrypt: fix reference counting on zcrypt card objects
drm/exynos: do not return negative values from .get_modes()
drm/imx/ipuv3: do not return negative values from .get_modes()
drm/vc4: hdmi: do not return negative values from .get_modes()
memtest: use {READ,WRITE}_ONCE in memory scanning
nilfs2: fix failure to detect DAT corruption in btree and direct mappings
nilfs2: use a more common logging style
nilfs2: prevent kernel bug at submit_bh_wbc()
x86/CPU/AMD: Update the Zenbleed microcode revisions
ahci: asm1064: correct count of reported ports
ahci: asm1064: asm1166: don't limit reported ports
dm snapshot: fix lockup in dm_exception_table_exit
comedi: comedi_test: Prevent timers rescheduling during deletion
netfilter: nf_tables: mark set as dead when unbinding anonymous set with timeout
netfilter: nf_tables: disallow anonymous set with timeout flag
netfilter: nf_tables: reject constant set with timeout
xfrm: Avoid clang fortify warning in copy_to_user_tmpl()
ALSA: hda/realtek - Fix headset Mic no show at resume back for Lenovo ALC897 platform
USB: usb-storage: Prevent divide-by-0 error in isd200_ata_command
usb: gadget: ncm: Fix handling of zero block length packets
usb: port: Don't try to peer unused USB ports based on location
tty: serial: fsl_lpuart: avoid idle preamble pending if CTS is enabled
vt: fix unicode buffer corruption when deleting characters
fs/aio: Check IOCB_AIO_RW before the struct aio_kiocb conversion
objtool: is_fentry_call() crashes if call has no destination
objtool: Add support for intra-function calls
x86/speculation: Support intra-function call validation
xen/events: close evtchn after mapping cleanup
printk: Update @console_may_schedule in console_trylock_spinning()
btrfs: allocate btrfs_ioctl_defrag_range_args on stack
Revert "loop: Check for overflow while configuring loop"
loop: Call loop_config_discard() only after new config is applied
loop: Remove sector_t truncation checks
loop: Factor out setting loop device size
loop: Refactor loop_set_status() size calculation
loop: Factor out configuring loop from status
loop: Check for overflow while configuring loop
loop: loop_set_status_from_info() check before assignment
perf/core: Fix reentry problem in perf_output_read_group()
efivarfs: Request at most 512 bytes for variable names
powerpc: xor_vmx: Add '-mhard-float' to CFLAGS
bounds: support non-power-of-two CONFIG_NR_CPUS
vt: fix memory overlapping when deleting chars in the buffer
mm/memory-failure: fix an incorrect use of tail pages
mm/migrate: set swap entry values of THP tail pages properly.
wifi: mac80211: check/clear fast rx for non-4addr sta VLAN changes
exec: Fix NOMMU linux_binprm::exec in transfer_args_to_stack()
mmc: core: Initialize mmc_blk_ioc_data
mmc: core: Avoid negative index with array access
usb: cdc-wdm: close race between read and workqueue
ALSA: sh: aica: reorder cleanup operations to avoid UAF bugs
scsi: core: Fix unremoved procfs host directory regression
usb: dwc2: host: Fix remote wakeup from hibernation
usb: dwc2: host: Fix hibernation flow
usb: dwc2: host: Fix ISOC flow in DDMA mode
usb: dwc2: gadget: LPM flow fix
usb: udc: remove warning when queue disabled ep
scsi: qla2xxx: Fix command flush on cable pull
x86/cpu: Enable STIBP on AMD if Automatic IBRS is enabled
scsi: lpfc: Correct size for wqe for memset()
USB: core: Fix deadlock in usb_deauthorize_interface()
nfc: nci: Fix uninit-value in nci_dev_up and nci_ntf_packet
ixgbe: avoid sleeping allocation in ixgbe_ipsec_vf_add_sa()
tcp: properly terminate timers for kernel sockets
dm integrity: fix out-of-range warning
r8169: fix issue caused by buggy BIOS on certain boards with RTL8168d
x86/cpufeatures: Add new word for scattered features
Bluetooth: hci_event: set the conn encrypted before conn establishes
Bluetooth: Fix TOCTOU in HCI debugfs implementation
netfilter: nf_tables: disallow timeout for anonymous sets
net/rds: fix possible cp null dereference
vfio/pci: Disable auto-enable of exclusive INTx IRQ
vfio/pci: Lock external INTx masking ops
vfio: Introduce interface to flush virqfd inject workqueue
vfio/pci: Create persistent INTx handler
vfio/platform: Create persistent IRQ handlers
Revert "x86/mm/ident_map: Use gbpages only where full GB page should be mapped."
mm, vmscan: prevent infinite loop for costly GFP_NOIO | __GFP_RETRY_MAYFAIL allocations
netfilter: nf_tables: flush pending destroy work before exit_net release
netfilter: nf_tables: Fix potential data-race in __nft_flowtable_type_get()
bpf, sockmap: Prevent lock inversion deadlock in map delete elem
net/sched: act_skbmod: prevent kernel-infoleak
net: stmmac: fix rx queue priority assignment
selftests: reuseaddr_conflict: add missing new line at the end of the output
ipv6: Fix infinite recursion in fib6_dump_done().
i40e: fix vf may be used uninitialized in this function warning
staging: mmal-vchiq: Allocate and free components as required
staging: mmal-vchiq: Fix client_component for 64 bit kernel
staging: vc04_services: changen strncpy() to strscpy_pad()
staging: vc04_services: fix information leak in create_component()
fs: add a vfs_fchown helper
fs: add a vfs_fchmod helper
initramfs: switch initramfs unpacking to struct file based APIs
init: open /initrd.image with O_LARGEFILE
erspan: Add type I version 0 support.
erspan: make sure erspan_base_hdr is present in skb->head
net: ravb: Always process TX descriptor ring
ASoC: ops: Fix wraparound for mask in snd_soc_get_volsw
ata: sata_sx4: fix pdc20621_get_from_dimm() on 64-bit
scsi: mylex: Fix sysfs buffer lengths
ata: sata_mv: Fix PCI device ID table declaration compilation warning
ALSA: hda/realtek: Update Panasonic CF-SZ6 quirk to support headset with microphone
x86/mce: Make sure to grab mce_sysfs_mutex in set_bank()
s390/entry: align system call table on 8 bytes
wifi: ath9k: fix LNA selection in ath_ant_try_scan()
VMCI: Fix memcpy() run-time warning in dg_dispatch_as_host()
panic: Flush kernel log buffer at the end
arm64: dts: rockchip: fix rk3328 hdmi ports node
arm64: dts: rockchip: fix rk3399 hdmi ports node
ionic: set adminq irq affinity
tools/power x86_energy_perf_policy: Fix file leak in get_pkg_num()
btrfs: handle chunk tree lookup error in btrfs_relocate_sys_chunks()
btrfs: export: handle invalid inode or root reference in btrfs_get_parent()
btrfs: send: handle path ref underflow in header iterate_inode_ref()
Bluetooth: btintel: Fix null ptr deref in btintel_read_version
Input: synaptics-rmi4 - fail probing if memory allocation for "phys" fails
sysv: don't call sb_bread() with pointers_lock held
scsi: lpfc: Fix possible memory leak in lpfc_rcv_padisc()
isofs: handle CDs with bad root inode but good Joliet root directory
media: sta2x11: fix irq handler cast
drm/amd/display: Fix nanosec stat overflow
SUNRPC: increase size of rpc_wait_queue.qlen from unsigned short to unsigned int
Revert "ACPI: PM: Block ASUS B1400CEAE from suspend to idle by default"
block: prevent division by zero in blk_rq_stat_sum()
Input: allocate keycode for Display refresh rate toggle
ktest: force $buildonly = 1 for 'make_warnings_file' test type
tools: iio: replace seekdir() in iio_generic_buffer
usb: typec: tcpci: add generic tcpci fallback compatible
usb: sl811-hcd: only defined function checkdone if QUIRK2 is defined
fbdev: viafb: fix typo in hw_bitblt_1 and hw_bitblt_2
fbmon: prevent division by zero in fb_videomode_from_videomode()
netfilter: nf_tables: reject new basechain after table flag update
netfilter: nf_tables: release batch on table validation from abort path
netfilter: nf_tables: release mutex after nft_gc_seq_end from abort path
netfilter: nf_tables: discard table flag update with pending basechain deletion
tty: n_gsm: require CAP_NET_ADMIN to attach N_GSM0710 ldisc
drm/vkms: call drm_atomic_helper_shutdown before drm_dev_put()
virtio: reenable config if freezing device failed
x86/mm/pat: fix VM_PAT handling in COW mappings
drm/i915/gt: Reset queue_priority_hint on parking
x86/alternative: Don't call text_poke() in lazy TLB mode
Bluetooth: btintel: Fixe build regression
VMCI: Fix possible memcpy() run-time warning in vmci_datagram_invoke_guest_handler()
erspan: Check IFLA_GRE_ERSPAN_VER is set.
ip_gre: do not report erspan version on GRE interface
firmware: meson_sm: fix to avoid potential NULL pointer dereference
Linux 5.4.274
Change-Id: I759c99412f0d27d194308663aa08ab3682a1c43c
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
commit
46cf330263
205 changed files with 2383 additions and 1337 deletions
|
|
@ -996,7 +996,7 @@ struct qman_portal {
|
|||
/* linked-list of CSCN handlers. */
|
||||
struct list_head cgr_cbs;
|
||||
/* list lock */
|
||||
spinlock_t cgr_lock;
|
||||
raw_spinlock_t cgr_lock;
|
||||
struct work_struct congestion_work;
|
||||
struct work_struct mr_work;
|
||||
char irqname[MAX_IRQNAME];
|
||||
|
|
@ -1286,7 +1286,7 @@ static int qman_create_portal(struct qman_portal *portal,
|
|||
/* if the given mask is NULL, assume all CGRs can be seen */
|
||||
qman_cgrs_fill(&portal->cgrs[0]);
|
||||
INIT_LIST_HEAD(&portal->cgr_cbs);
|
||||
spin_lock_init(&portal->cgr_lock);
|
||||
raw_spin_lock_init(&portal->cgr_lock);
|
||||
INIT_WORK(&portal->congestion_work, qm_congestion_task);
|
||||
INIT_WORK(&portal->mr_work, qm_mr_process_task);
|
||||
portal->bits = 0;
|
||||
|
|
@ -1461,11 +1461,14 @@ static void qm_congestion_task(struct work_struct *work)
|
|||
union qm_mc_result *mcr;
|
||||
struct qman_cgr *cgr;
|
||||
|
||||
spin_lock(&p->cgr_lock);
|
||||
/*
|
||||
* FIXME: QM_MCR_TIMEOUT is 10ms, which is too long for a raw spinlock!
|
||||
*/
|
||||
raw_spin_lock_irq(&p->cgr_lock);
|
||||
qm_mc_start(&p->p);
|
||||
qm_mc_commit(&p->p, QM_MCC_VERB_QUERYCONGESTION);
|
||||
if (!qm_mc_result_timeout(&p->p, &mcr)) {
|
||||
spin_unlock(&p->cgr_lock);
|
||||
raw_spin_unlock_irq(&p->cgr_lock);
|
||||
dev_crit(p->config->dev, "QUERYCONGESTION timeout\n");
|
||||
qman_p_irqsource_add(p, QM_PIRQ_CSCI);
|
||||
return;
|
||||
|
|
@ -1481,7 +1484,7 @@ static void qm_congestion_task(struct work_struct *work)
|
|||
list_for_each_entry(cgr, &p->cgr_cbs, node)
|
||||
if (cgr->cb && qman_cgrs_get(&c, cgr->cgrid))
|
||||
cgr->cb(p, cgr, qman_cgrs_get(&rr, cgr->cgrid));
|
||||
spin_unlock(&p->cgr_lock);
|
||||
raw_spin_unlock_irq(&p->cgr_lock);
|
||||
qman_p_irqsource_add(p, QM_PIRQ_CSCI);
|
||||
}
|
||||
|
||||
|
|
@ -2438,7 +2441,7 @@ int qman_create_cgr(struct qman_cgr *cgr, u32 flags,
|
|||
preempt_enable();
|
||||
|
||||
cgr->chan = p->config->channel;
|
||||
spin_lock(&p->cgr_lock);
|
||||
raw_spin_lock_irq(&p->cgr_lock);
|
||||
|
||||
if (opts) {
|
||||
struct qm_mcc_initcgr local_opts = *opts;
|
||||
|
|
@ -2475,12 +2478,28 @@ int qman_create_cgr(struct qman_cgr *cgr, u32 flags,
|
|||
qman_cgrs_get(&p->cgrs[1], cgr->cgrid))
|
||||
cgr->cb(p, cgr, 1);
|
||||
out:
|
||||
spin_unlock(&p->cgr_lock);
|
||||
raw_spin_unlock_irq(&p->cgr_lock);
|
||||
put_affine_portal();
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(qman_create_cgr);
|
||||
|
||||
static struct qman_portal *qman_cgr_get_affine_portal(struct qman_cgr *cgr)
|
||||
{
|
||||
struct qman_portal *p = get_affine_portal();
|
||||
|
||||
if (cgr->chan != p->config->channel) {
|
||||
/* attempt to delete from other portal than creator */
|
||||
dev_err(p->config->dev, "CGR not owned by current portal");
|
||||
dev_dbg(p->config->dev, " create 0x%x, delete 0x%x\n",
|
||||
cgr->chan, p->config->channel);
|
||||
put_affine_portal();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
int qman_delete_cgr(struct qman_cgr *cgr)
|
||||
{
|
||||
unsigned long irqflags;
|
||||
|
|
@ -2488,19 +2507,13 @@ int qman_delete_cgr(struct qman_cgr *cgr)
|
|||
struct qm_mcc_initcgr local_opts;
|
||||
int ret = 0;
|
||||
struct qman_cgr *i;
|
||||
struct qman_portal *p = get_affine_portal();
|
||||
struct qman_portal *p = qman_cgr_get_affine_portal(cgr);
|
||||
|
||||
if (cgr->chan != p->config->channel) {
|
||||
/* attempt to delete from other portal than creator */
|
||||
dev_err(p->config->dev, "CGR not owned by current portal");
|
||||
dev_dbg(p->config->dev, " create 0x%x, delete 0x%x\n",
|
||||
cgr->chan, p->config->channel);
|
||||
if (!p)
|
||||
return -EINVAL;
|
||||
|
||||
ret = -EINVAL;
|
||||
goto put_portal;
|
||||
}
|
||||
memset(&local_opts, 0, sizeof(struct qm_mcc_initcgr));
|
||||
spin_lock_irqsave(&p->cgr_lock, irqflags);
|
||||
raw_spin_lock_irqsave(&p->cgr_lock, irqflags);
|
||||
list_del(&cgr->node);
|
||||
/*
|
||||
* If there are no other CGR objects for this CGRID in the list,
|
||||
|
|
@ -2525,8 +2538,7 @@ int qman_delete_cgr(struct qman_cgr *cgr)
|
|||
/* add back to the list */
|
||||
list_add(&cgr->node, &p->cgr_cbs);
|
||||
release_lock:
|
||||
spin_unlock_irqrestore(&p->cgr_lock, irqflags);
|
||||
put_portal:
|
||||
raw_spin_unlock_irqrestore(&p->cgr_lock, irqflags);
|
||||
put_affine_portal();
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -2557,6 +2569,54 @@ void qman_delete_cgr_safe(struct qman_cgr *cgr)
|
|||
}
|
||||
EXPORT_SYMBOL(qman_delete_cgr_safe);
|
||||
|
||||
static int qman_update_cgr(struct qman_cgr *cgr, struct qm_mcc_initcgr *opts)
|
||||
{
|
||||
int ret;
|
||||
unsigned long irqflags;
|
||||
struct qman_portal *p = qman_cgr_get_affine_portal(cgr);
|
||||
|
||||
if (!p)
|
||||
return -EINVAL;
|
||||
|
||||
raw_spin_lock_irqsave(&p->cgr_lock, irqflags);
|
||||
ret = qm_modify_cgr(cgr, 0, opts);
|
||||
raw_spin_unlock_irqrestore(&p->cgr_lock, irqflags);
|
||||
put_affine_portal();
|
||||
return ret;
|
||||
}
|
||||
|
||||
struct update_cgr_params {
|
||||
struct qman_cgr *cgr;
|
||||
struct qm_mcc_initcgr *opts;
|
||||
int ret;
|
||||
};
|
||||
|
||||
static void qman_update_cgr_smp_call(void *p)
|
||||
{
|
||||
struct update_cgr_params *params = p;
|
||||
|
||||
params->ret = qman_update_cgr(params->cgr, params->opts);
|
||||
}
|
||||
|
||||
int qman_update_cgr_safe(struct qman_cgr *cgr, struct qm_mcc_initcgr *opts)
|
||||
{
|
||||
struct update_cgr_params params = {
|
||||
.cgr = cgr,
|
||||
.opts = opts,
|
||||
};
|
||||
|
||||
preempt_disable();
|
||||
if (qman_cgr_cpus[cgr->cgrid] != smp_processor_id())
|
||||
smp_call_function_single(qman_cgr_cpus[cgr->cgrid],
|
||||
qman_update_cgr_smp_call, ¶ms,
|
||||
true);
|
||||
else
|
||||
params.ret = qman_update_cgr(cgr, opts);
|
||||
preempt_enable();
|
||||
return params.ret;
|
||||
}
|
||||
EXPORT_SYMBOL(qman_update_cgr_safe);
|
||||
|
||||
/* Cleanup FQs */
|
||||
|
||||
static int _qm_mr_consume_and_match_verb(struct qm_portal *p, int v)
|
||||
|
|
|
|||
Loading…
Reference in a new issue