mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
* google/android-4.14-stable: UPSTREAM: lib/vsprintf: Hash printed address for netdev bits fallback UPSTREAM: lib/vsprintf: Prepare for more general use of ptr_to_id() UPSTREAM: lib/vsprintf: Make ptr argument conts in ptr_to_id() UPSTREAM: vsprintf: Replace memory barrier with static_key for random_ptr_key update UPSTREAM: lib/test_printf.c: accept "ptrval" as valid result for plain 'p' tests UPSTREAM: lib/vsprintf: Do not handle %pO[^F] as %px BACKPORT: l2tp: fix race in pppol2tp_release with session object destroy BACKPORT: l2tp: don't use inet_shutdown on ppp session destroy Linux 4.14.285 tcp: drop the hash_32() part from the index calculation tcp: increase source port perturb table to 2^16 tcp: dynamically allocate the perturb table used by source ports tcp: add small random increments to the source port tcp: use different parts of the port_offset for index and offset tcp: add some entropy in __inet_hash_connect() xprtrdma: fix incorrect header size calculations usb: gadget: u_ether: fix regression in setting fixed MAC address s390/mm: use non-quiescing sske for KVM switch to keyed guest l2tp: fix race in pppol2tp_release with session object destroy l2tp: don't use inet_shutdown on ppp session destroy virtio-pci: Remove wrong address verification in vp_del_vqs() ext4: add reserved GDT blocks check ext4: make variable "count" signed ext4: fix bug_on ext4_mb_use_inode_pa serial: 8250: Store to lsr_save_flags after lsr read usb: gadget: lpc32xx_udc: Fix refcount leak in lpc32xx_udc_probe usb: dwc2: Fix memory leak in dwc2_hcd_init USB: serial: io_ti: add Agilent E5805A support USB: serial: option: add support for Cinterion MV31 with new baseline comedi: vmk80xx: fix expression for tx buffer size irqchip/gic/realview: Fix refcount leak in realview_gic_of_init certs/blacklist_hashes.c: fix const confusion in certs blacklist arm64: ftrace: fix branch range checks net: bgmac: Fix an erroneous kfree() in bgmac_remove() misc: atmel-ssc: Fix IRQ check in ssc_probe tty: goldfish: Fix free_irq() on remove i40e: Fix call trace in setup_tx_descriptors pNFS: Don't keep retrying if the server replied NFS4ERR_LAYOUTUNAVAILABLE random: credit cpu and bootloader seeds by default net: ethernet: mtk_eth_soc: fix misuse of mem alloc interface netdev[napi]_alloc_frag ipv6: Fix signed integer overflow in l2tp_ip6_sendmsg nfc: nfcmrvl: Fix memory leak in nfcmrvl_play_deferred virtio-mmio: fix missing put_device() when vm_cmdline_parent registration failed scsi: pmcraid: Fix missing resource cleanup in error case scsi: ipr: Fix missing/incorrect resource cleanup in error case scsi: lpfc: Fix port stuck in bypassed state after LIP in PT2PT topology scsi: vmw_pvscsi: Expand vcpuHint to 16 bits ASoC: wm8962: Fix suspend while playing music ata: libata-core: fix NULL pointer deref in ata_host_alloc_pinfo() ASoC: cs42l56: Correct typo in minimum level for SX volume controls ASoC: cs42l52: Correct TLV for Bypass Volume ASoC: cs53l30: Correct number of volume levels on SX controls ASoC: cs42l52: Fix TLV scales for mixer controls random: account for arch randomness in bits random: mark bootloader randomness code as __init random: avoid checking crng_ready() twice in random_init() crypto: drbg - make reseeding from get_random_bytes() synchronous crypto: drbg - always try to free Jitter RNG instance crypto: drbg - move dynamic ->reseed_threshold adjustments to __drbg_seed() crypto: drbg - track whether DRBG was seeded with !rng_is_initialized() crypto: drbg - prepare for more fine-grained tracking of seeding state crypto: drbg - always seeded with SP800-90B compliant noise source crypto: drbg - add FIPS 140-2 CTRNG for noise source Revert "random: use static branch for crng_ready()" random: check for signals after page of pool writes random: wire up fops->splice_{read,write}_iter() random: convert to using fops->write_iter() random: move randomize_page() into mm where it belongs random: move initialization functions out of hot pages random: use proper return types on get_random_{int,long}_wait() random: remove extern from functions in header random: use static branch for crng_ready() random: credit architectural init the exact amount random: handle latent entropy and command line from random_init() random: use proper jiffies comparison macro random: remove ratelimiting for in-kernel unseeded randomness random: avoid initializing twice in credit race random: use symbolic constants for crng_init states siphash: use one source of truth for siphash permutations random: help compiler out with fast_mix() by using simpler arguments random: do not use input pool from hard IRQs random: order timer entropy functions below interrupt functions random: do not pretend to handle premature next security model random: do not use batches when !crng_ready() random: insist on random_get_entropy() existing in order to simplify xtensa: use fallback for random_get_entropy() instead of zero sparc: use fallback for random_get_entropy() instead of zero um: use fallback for random_get_entropy() instead of zero x86/tsc: Use fallback for random_get_entropy() instead of zero nios2: use fallback for random_get_entropy() instead of zero arm: use fallback for random_get_entropy() instead of zero mips: use fallback for random_get_entropy() instead of just c0 random m68k: use fallback for random_get_entropy() instead of zero timekeeping: Add raw clock fallback for random_get_entropy() powerpc: define get_cycles macro for arch-override alpha: define get_cycles macro for arch-override parisc: define get_cycles macro for arch-override s390: define get_cycles macro for arch-override ia64: define get_cycles macro for arch-override init: call time_init() before rand_initialize() random: fix sysctl documentation nits random: document crng_fast_key_erasure() destination possibility random: make random_get_entropy() return an unsigned long random: check for signals every PAGE_SIZE chunk of /dev/[u]random random: check for signal_pending() outside of need_resched() check random: do not allow user to keep crng key around on stack random: do not split fast init input in add_hwgenerator_randomness() random: mix build-time latent entropy into pool at init random: re-add removed comment about get_random_{u32,u64} reseeding random: treat bootloader trust toggle the same way as cpu trust toggle random: skip fast_init if hwrng provides large chunk of entropy random: check for signal and try earlier when generating entropy random: reseed more often immediately after booting random: make consistent usage of crng_ready() random: use SipHash as interrupt entropy accumulator random: replace custom notifier chain with standard one random: don't let 644 read-only sysctls be written to random: give sysctl_random_min_urandom_seed a more sensible value random: do crng pre-init loading in worker rather than irq random: unify cycles_t and jiffies usage and types random: cleanup UUID handling random: only wake up writers after zap if threshold was passed random: round-robin registers as ulong, not u32 random: clear fast pool, crng, and batches in cpuhp bring up random: pull add_hwgenerator_randomness() declaration into random.h random: check for crng_init == 0 in add_device_randomness() random: unify early init crng load accounting random: do not take pool spinlock at boot random: defer fast pool mixing to worker random: rewrite header introductory comment random: group sysctl functions random: group userspace read/write functions random: group entropy collection functions random: group entropy extraction functions random: group initialization wait functions random: remove whitespace and reorder includes random: remove useless header comment random: introduce drain_entropy() helper to declutter crng_reseed() random: deobfuscate irq u32/u64 contributions random: add proper SPDX header random: remove unused tracepoints random: remove ifdef'd out interrupt bench random: tie batched entropy generation to base_crng generation random: zero buffer after reading entropy from userspace random: remove outdated INT_MAX >> 6 check in urandom_read() random: use hash function for crng_slow_load() random: absorb fast pool into input pool after fast load random: do not xor RDRAND when writing into /dev/random random: ensure early RDSEED goes through mixer on init random: inline leaves of rand_initialize() random: use RDSEED instead of RDRAND in entropy extraction random: fix locking in crng_fast_load() random: remove batched entropy locking random: remove use_input_pool parameter from crng_reseed() random: make credit_entropy_bits() always safe random: always wake up entropy writers after extraction random: use linear min-entropy accumulation crediting random: simplify entropy debiting random: use computational hash for entropy extraction random: only call crng_finalize_init() for primary_crng random: access primary_pool directly rather than through pointer random: continually use hwgenerator randomness random: simplify arithmetic function flow in account() random: access input_pool_data directly rather than through pointer random: cleanup fractional entropy shift constants random: prepend remaining pool constants with POOL_ random: de-duplicate INPUT_POOL constants random: remove unused OUTPUT_POOL constants random: rather than entropy_store abstraction, use global random: try to actively add entropy rather than passively wait for it random: remove unused extract_entropy() reserved argument random: remove incomplete last_data logic random: cleanup integer types crypto: chacha20 - Fix chacha20_block() keystream alignment (again) random: cleanup poolinfo abstraction random: fix typo in comments random: don't reset crng_init_cnt on urandom_read() random: avoid superfluous call to RDRAND in CRNG extraction random: early initialization of ChaCha constants random: initialize ChaCha20 constants with correct endianness random: use IS_ENABLED(CONFIG_NUMA) instead of ifdefs random: harmonize "crng init done" messages random: mix bootloader randomness into pool random: do not re-init if crng_reseed completes before primary init random: do not sign extend bytes for rotation when mixing random: use BLAKE2s instead of SHA1 in extraction random: remove unused irq_flags argument from add_interrupt_randomness() random: document add_hwgenerator_randomness() with other input functions crypto: blake2s - adjust include guard naming crypto: blake2s - include <linux/bug.h> instead of <asm/bug.h> MAINTAINERS: co-maintain random.c random: remove dead code left over from blocking pool random: avoid arch_get_random_seed_long() when collecting IRQ randomness random: add arch_get_random_*long_early() powerpc: Use bool in archrandom.h linux/random.h: Mark CONFIG_ARCH_RANDOM functions __must_check linux/random.h: Use false with bool linux/random.h: Remove arch_has_random, arch_has_random_seed s390: Remove arch_has_random, arch_has_random_seed powerpc: Remove arch_has_random, arch_has_random_seed x86: Remove arch_has_random, arch_has_random_seed random: avoid warnings for !CONFIG_NUMA builds random: split primary/secondary crng init paths random: remove some dead code of poolinfo random: fix typo in add_timer_randomness() random: Add and use pr_fmt() random: convert to ENTROPY_BITS for better code readability random: remove unnecessary unlikely() random: remove kernel.random.read_wakeup_threshold random: delete code to pull data into pools random: remove the blocking pool random: fix crash on multiple early calls to add_bootloader_randomness() char/random: silence a lockdep splat with printk() random: make /dev/random be almost like /dev/urandom random: ignore GRND_RANDOM in getentropy(2) random: add GRND_INSECURE to return best-effort non-cryptographic bytes random: Add a urandom_read_nowait() for random APIs that don't warn random: Don't wake crng_init_wait when crng_init == 1 lib/crypto: sha1: re-roll loops to reduce code size lib/crypto: blake2s: move hmac construction into wireguard crypto: blake2s - generic C library implementation and selftest crypto: Deduplicate le32_to_cpu_array() and cpu_to_le32_array() Revert "hwrng: core - Freeze khwrng thread during suspend" char/random: Add a newline at the end of the file random: Use wait_event_freezable() in add_hwgenerator_randomness() fdt: add support for rng-seed random: Support freezable kthreads in add_hwgenerator_randomness() random: fix soft lockup when trying to read from an uninitialized blocking pool latent_entropy: avoid build error when plugin cflags are not set random: document get_random_int() family random: move rand_initialize() earlier random: only read from /dev/random after its pool has received 128 bits drivers/char/random.c: make primary_crng static drivers/char/random.c: remove unused stuct poolinfo::poolbits drivers/char/random.c: constify poolinfo_table random: make CPU trust a boot parameter random: Make crng state queryable random: remove preempt disabled region random: add a config option to trust the CPU's hwrng random: Return nbytes filled from hw RNG random: Fix whitespace pre random-bytes work drivers/char/random.c: remove unused dont_count_entropy random: optimize add_interrupt_randomness random: always fill buffer in get_random_bytes_wait crypto: chacha20 - Fix keystream alignment for chacha20_block() 9p: missing chunk of "fs/9p: Don't update file type when updating file attributes" UPSTREAM: ext4: verify dir block before splitting it UPSTREAM: ext4: fix use-after-free in ext4_rename_dir_prepare BACKPORT: ext4: Only advertise encrypted_casefold when encryption and unicode are enabled BACKPORT: ext4: fix no-key deletion for encrypt+casefold BACKPORT: ext4: optimize match for casefolded encrypted dirs BACKPORT: ext4: handle casefolding with encryption Revert "ANDROID: ext4: Handle casefolding with encryption" Revert "ANDROID: ext4: Optimize match for casefolded encrypted dirs" Revert "ext4: fix use-after-free in ext4_rename_dir_prepare" Revert "ext4: verify dir block before splitting it" Linux 4.14.284 x86/speculation/mmio: Print SMT warning KVM: x86/speculation: Disable Fill buffer clear within guests x86/speculation/mmio: Reuse SRBDS mitigation for SBDS x86/speculation/srbds: Update SRBDS mitigation selection x86/speculation/mmio: Add sysfs reporting for Processor MMIO Stale Data x86/speculation/mmio: Enable CPU Fill buffer clearing on idle x86/bugs: Group MDS, TAA & Processor MMIO Stale Data mitigations x86/speculation/mmio: Add mitigation for Processor MMIO Stale Data x86/speculation: Add a common function for MD_CLEAR mitigation update x86/speculation/mmio: Enumerate Processor MMIO Stale Data bug Documentation: Add documentation for Processor MMIO Stale Data x86/cpu: Add another Alder Lake CPU to the Intel family x86/cpu: Add Lakefield, Alder Lake and Rocket Lake models to the to Intel CPU family x86/cpu: Add Comet Lake to the Intel CPU models header x86/CPU: Add more Icelake model numbers x86/CPU: Add Icelake model number x86/cpu: Add Cannonlake to Intel family x86/cpu: Add Jasper Lake to Intel family cpu/speculation: Add prototype for cpu_show_srbds() x86/cpu: Add Elkhart Lake to Intel family Linux 4.14.283 tcp: fix tcp_mtup_probe_success vs wrong snd_cwnd PCI: qcom: Fix unbalanced PHY init on probe errors mtd: cfi_cmdset_0002: Use chip_ready() for write on S29GL064N mtd: cfi_cmdset_0002: Move and rename chip_check/chip_ready/chip_good_for_write md/raid0: Ignore RAID0 layout if the second zone has only one device powerpc/32: Fix overread/overwrite of thread_struct via ptrace Input: bcm5974 - set missing URB_NO_TRANSFER_DMA_MAP urb flag ixgbe: fix unexpected VLAN Rx in promisc mode on VF ixgbe: fix bcast packets Rx on VF after promisc removal nfc: st21nfca: fix memory leaks in EVT_TRANSACTION handling nfc: st21nfca: fix incorrect validating logic in EVT_TRANSACTION ata: libata-transport: fix {dma|pio|xfer}_mode sysfs files cifs: return errors during session setup during reconnects ALSA: hda/conexant - Fix loopback issue with CX20632 vringh: Fix loop descriptors check in the indirect cases nodemask: Fix return values to be unsigned nbd: fix io hung while disconnecting device nbd: fix race between nbd_alloc_config() and module removal nbd: call genl_unregister_family() first in nbd_cleanup() modpost: fix undefined behavior of is_arm_mapping_symbol() drm/radeon: fix a possible null pointer dereference Revert "net: af_key: add check for pfkey_broadcast in function pfkey_process" md: protect md_unregister_thread from reentrancy kernfs: Separate kernfs_pr_cont_buf and rename_lock. serial: msm_serial: disable interrupts in __msm_console_write() staging: rtl8712: fix uninit-value in r871xu_drv_init() clocksource/drivers/sp804: Avoid error on multiple instances extcon: Modify extcon device to be created after driver data is set misc: rtsx: set NULL intfdata when probe fails usb: dwc2: gadget: don't reset gadget's driver->bus USB: hcd-pci: Fully suspend across freeze/thaw cycle drivers: usb: host: Fix deadlock in oxu_bus_suspend() drivers: tty: serial: Fix deadlock in sa1100_set_termios() USB: host: isp116x: check return value after calling platform_get_resource() drivers: staging: rtl8192e: Fix deadlock in rtllib_beacons_stop() tty: Fix a possible resource leak in icom_probe tty: synclink_gt: Fix null-pointer-dereference in slgt_clean() lkdtm/usercopy: Expand size of "out of frame" object iio: dummy: iio_simple_dummy: check the return value of kstrdup() drm: imx: fix compiler warning with gcc-12 net: altera: Fix refcount leak in altera_tse_mdio_create net: ipv6: unexport __init-annotated seg6_hmac_init() net: xfrm: unexport __init-annotated xfrm4_protocol_init() net: mdio: unexport __init-annotated mdio_bus_init() SUNRPC: Fix the calculation of xdr->end in xdr_get_next_encode_buffer() net/mlx4_en: Fix wrong return value on ioctl EEPROM query failure ata: pata_octeon_cf: Fix refcount leak in octeon_cf_probe xprtrdma: treat all calls not a bcall when bc_serv is NULL video: fbdev: pxa3xx-gcu: release the resources correctly in pxa3xx_gcu_probe/remove() m68knommu: fix undefined reference to `_init_sp' m68knommu: set ZERO_PAGE() to the allocated zeroed page i2c: cadence: Increase timeout per message if necessary tracing: Avoid adding tracer option before update_tracer_options tracing: Fix sleeping function called from invalid context on RT kernel mips: cpc: Fix refcount leak in mips_cpc_default_phys_base perf c2c: Fix sorting in percent_rmt_hitm_cmp() tcp: tcp_rtx_synack() can be called from process context ubi: ubi_create_volume: Fix use-after-free when volume creation failed jffs2: fix memory leak in jffs2_do_fill_super modpost: fix removing numeric suffixes net: dsa: mv88e6xxx: Fix refcount leak in mv88e6xxx_mdios_register net: ethernet: mtk_eth_soc: out of bounds read in mtk_hwlro_get_fdir_entry() clocksource/drivers/oxnas-rps: Fix irq_of_parse_and_map() return value firmware: dmi-sysfs: Fix memory leak in dmi_sysfs_register_handle serial: st-asc: Sanitize CSIZE and correct PARENB for CS7 serial: sh-sci: Don't allow CS5-6 serial: txx9: Don't allow CS5-6 serial: digicolor-usart: Don't allow CS5-6 serial: meson: acquire port->lock in startup() rtc: mt6397: check return value after calling platform_get_resource() soc: rockchip: Fix refcount leak in rockchip_grf_init coresight: cpu-debug: Replace mutex with mutex_trylock on panic notifier rpmsg: qcom_smd: Fix irq_of_parse_and_map() return value pwm: lp3943: Fix duty calculation in case period was clamped USB: storage: karma: fix rio_karma_init return usb: usbip: add missing device lock on tweak configuration cmd usb: usbip: fix a refcount leak in stub_probe() tty: goldfish: Use tty_port_destroy() to destroy port staging: greybus: codecs: fix type confusion of list iterator variable pcmcia: db1xxx_ss: restrict to MIPS_DB1XXX boards netfilter: nf_tables: disallow non-stateful expression in sets earlier MIPS: IP27: Remove incorrect `cpu_has_fpu' override RDMA/rxe: Generate a completion for unsupported/invalid opcode phy: qcom-qmp: fix reset-controller leak on probe errors dt-bindings: gpio: altera: correct interrupt-cells docs/conf.py: Cope with removal of language=None in Sphinx 5.0.0 phy: qcom-qmp: fix struct clk leak on probe errors arm64: dts: qcom: ipq8074: fix the sleep clock frequency gma500: fix an incorrect NULL check on list iterator carl9170: tx: fix an incorrect use of list iterator ASoC: rt5514: Fix event generation for "DSP Voice Wake Up" control rtl818x: Prevent using not initialized queues hugetlb: fix huge_pmd_unshare address update nodemask.h: fix compilation error with GCC12 iommu/msm: Fix an incorrect NULL check on list iterator um: Fix out-of-bounds read in LDT setup um: chan_user: Fix winch_tramp() return value mac80211: upgrade passive scan to active scan on DFS channels after beacon rx irqchip: irq-xtensa-mx: fix initial IRQ affinity irqchip/armada-370-xp: Do not touch Performance Counter Overflow on A375, A38x, A39x RDMA/hfi1: Fix potential integer multiplication overflow errors md: fix an incorrect NULL check in md_reload_sb md: fix an incorrect NULL check in does_sb_need_changing drm/bridge: analogix_dp: Grab runtime PM reference for DP-AUX drm/nouveau/clk: Fix an incorrect NULL check on list iterator drm/amdgpu/cs: make commands with 0 chunks illegal behaviour. scsi: ufs: qcom: Add a readl() to make sure ref_clk gets enabled scsi: dc395x: Fix a missing check on list iterator ocfs2: dlmfs: fix error handling of user_dlm_destroy_lock dlm: fix missing lkb refcount handling dlm: fix plock invalid read ext4: avoid cycles in directory h-tree ext4: verify dir block before splitting it ext4: fix bug_on in ext4_writepages ext4: fix use-after-free in ext4_rename_dir_prepare fs-writeback: writeback_sb_inodes:Recalculate 'wrote' according skipped pages iwlwifi: mvm: fix assert 1F04 upon reconfig wifi: mac80211: fix use-after-free in chanctx code perf jevents: Fix event syntax error caused by ExtSel perf c2c: Use stdio interface if slang is not supported iommu/amd: Increase timeout waiting for GA log enablement video: fbdev: clcdfb: Fix refcount leak in clcdfb_of_vram_setup iommu/mediatek: Add list_del in mtk_iommu_remove mailbox: forward the hrtimer if not queued and under a lock powerpc/fsl_rio: Fix refcount leak in fsl_rio_setup powerpc/perf: Fix the threshold compare group constraint for power9 Input: sparcspkr - fix refcount leak in bbc_beep_probe tty: fix deadlock caused by calling printk() under tty_port->lock powerpc/4xx/cpm: Fix return value of __setup() handler powerpc/idle: Fix return value of __setup() handler powerpc/8xx: export 'cpm_setbrg' for modules drivers/base/node.c: fix compaction sysfs file leak pinctrl: mvebu: Fix irq_of_parse_and_map() return value scsi: fcoe: Fix Wstringop-overflow warnings in fcoe_wwn_from_mac() mfd: ipaq-micro: Fix error check return value of platform_get_irq() ARM: dts: bcm2835-rpi-b: Fix GPIO line names ARM: dts: bcm2835-rpi-zero-w: Fix GPIO line name for Wifi/BT soc: qcom: smsm: Fix missing of_node_put() in smsm_parse_ipc soc: qcom: smp2p: Fix missing of_node_put() in smp2p_parse_ipc rxrpc: Don't try to resend the request if we're receiving the reply rxrpc: Fix listen() setting the bar too high for the prealloc rings ASoC: wm2000: fix missing clk_disable_unprepare() on error in wm2000_anc_transition() sctp: read sk->sk_bound_dev_if once in sctp_rcv() m68k: math-emu: Fix dependencies of math emulation support Bluetooth: fix dangling sco_conn and use-after-free in sco_sock_timeout media: pvrusb2: fix array-index-out-of-bounds in pvr2_i2c_core_init media: exynos4-is: Change clk_disable to clk_disable_unprepare media: st-delta: Fix PM disable depth imbalance in delta_probe regulator: pfuze100: Fix refcount leak in pfuze_parse_regulators_dt ASoC: mxs-saif: Fix refcount leak in mxs_saif_probe media: uvcvideo: Fix missing check to determine if element is found in list drm/msm: return an error pointer in msm_gem_prime_get_sg_table() x86/mm: Cleanup the control_va_addr_alignment() __setup handler irqchip/aspeed-i2c-ic: Fix irq_of_parse_and_map() return value x86: Fix return value of __setup handlers drm/rockchip: vop: fix possible null-ptr-deref in vop_bind() drm/msm/hdmi: check return value after calling platform_get_resource_byname() drm/msm/dsi: fix error checks and return values for DSI xmit functions x86/pm: Fix false positive kmemleak report in msr_build_context() fsnotify: fix wrong lockdep annotations inotify: show inotify mask flags in proc fdinfo ath9k_htc: fix potential out of bounds access with invalid rxstatus->rs_keyix spi: img-spfi: Fix pm_runtime_get_sync() error checking HID: hid-led: fix maximum brightness for Dream Cheeky efi: Add missing prototype for efi_capsule_setup_info NFC: NULL out the dev->rfkill to prevent UAF spi: spi-ti-qspi: Fix return value handling of wait_for_completion_timeout drm/mediatek: Fix mtk_cec_mask() x86/delay: Fix the wrong asm constraint in delay_loop() ASoC: mediatek: Fix missing of_node_put in mt2701_wm8960_machine_probe ASoC: mediatek: Fix error handling in mt8173_max98090_dev_probe ath9k: fix ar9003_get_eepmisc drm: fix EDID struct for old ARM OABI format RDMA/hfi1: Prevent panic when SDMA is disabled macintosh/via-pmu: Fix build failure when CONFIG_INPUT is disabled powerpc/xics: fix refcount leak in icp_opal_init() tracing: incorrect isolate_mote_t cast in mm_vmscan_lru_isolate PCI: Avoid pci_dev_lock() AB/BA deadlock with sriov_numvfs_store() ARM: hisi: Add missing of_node_put after of_find_compatible_node ARM: dts: exynos: add atmel,24c128 fallback to Samsung EEPROM ARM: versatile: Add missing of_node_put in dcscb_init fat: add ratelimit to fat*_ent_bread() ARM: OMAP1: clock: Fix UART rate reporting algorithm fs: jfs: fix possible NULL pointer dereference in dbFree() ARM: dts: ox820: align interrupt controller node name with dtschema eth: tg3: silence the GCC 12 array-bounds warning rxrpc: Return an error to sendmsg if call failed media: exynos4-is: Fix compile warning net: phy: micrel: Allow probing without .driver_data ASoC: rt5645: Fix errorenous cleanup order nvme-pci: fix a NULL pointer dereference in nvme_alloc_admin_tags openrisc: start CPU timer early in boot rtlwifi: Use pr_warn instead of WARN_ONCE ipmi:ssif: Check for NULL msg when handling events and messages dma-debug: change allocation mode from GFP_NOWAIT to GFP_ATIOMIC s390/preempt: disable __preempt_count_add() optimization for PROFILE_ALL_BRANCHES ASoC: dapm: Don't fold register value changes into notifications ipv6: Don't send rs packets to the interface of ARPHRD_TUNNEL drm/amd/pm: fix the compile warning scsi: megaraid: Fix error check return value of register_chrdev() media: cx25821: Fix the warning when removing the module media: pci: cx23885: Fix the error handling in cx23885_initdev() media: venus: hfi: avoid null dereference in deinit ath9k: fix QCA9561 PA bias level drm/amd/pm: fix double free in si_parse_power_table() ALSA: jack: Access input_dev under mutex ACPICA: Avoid cache flush inside virtual machines ipw2x00: Fix potential NULL dereference in libipw_xmit() b43: Fix assigning negative value to unsigned variable b43legacy: Fix assigning negative value to unsigned variable mwifiex: add mutex lock for call in mwifiex_dfs_chan_sw_work_queue drm/virtio: fix NULL pointer dereference in virtio_gpu_conn_get_modes btrfs: repair super block num_devices automatically btrfs: add "0x" prefix for unsupported optional features ptrace: Reimplement PTRACE_KILL by always sending SIGKILL ptrace/xtensa: Replace PT_SINGLESTEP with TIF_SINGLESTEP USB: new quirk for Dell Gen 2 devices USB: serial: option: add Quectel BG95 modem binfmt_flat: do not stop relocating GOT entries prematurely on riscv
402 lines
12 KiB
C
402 lines
12 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __CPUHOTPLUG_H
|
|
#define __CPUHOTPLUG_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
/*
|
|
* CPU-up CPU-down
|
|
*
|
|
* BP AP BP AP
|
|
*
|
|
* OFFLINE OFFLINE
|
|
* | ^
|
|
* v |
|
|
* BRINGUP_CPU->AP_OFFLINE BRINGUP_CPU <- AP_IDLE_DEAD (idle thread/play_dead)
|
|
* | AP_OFFLINE
|
|
* v (IRQ-off) ,---------------^
|
|
* AP_ONLNE | (stop_machine)
|
|
* | TEARDOWN_CPU <- AP_ONLINE_IDLE
|
|
* | ^
|
|
* v |
|
|
* AP_ACTIVE AP_ACTIVE
|
|
*/
|
|
|
|
enum cpuhp_state {
|
|
CPUHP_INVALID = -1,
|
|
CPUHP_OFFLINE = 0,
|
|
CPUHP_CREATE_THREADS,
|
|
CPUHP_PERF_PREPARE,
|
|
CPUHP_PERF_X86_PREPARE,
|
|
CPUHP_PERF_X86_AMD_UNCORE_PREP,
|
|
CPUHP_PERF_BFIN,
|
|
CPUHP_PERF_POWER,
|
|
CPUHP_PERF_SUPERH,
|
|
CPUHP_X86_HPET_DEAD,
|
|
CPUHP_X86_APB_DEAD,
|
|
CPUHP_X86_MCE_DEAD,
|
|
CPUHP_VIRT_NET_DEAD,
|
|
CPUHP_SLUB_DEAD,
|
|
CPUHP_MM_WRITEBACK_DEAD,
|
|
CPUHP_MM_VMSTAT_DEAD,
|
|
CPUHP_SOFTIRQ_DEAD,
|
|
CPUHP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U_PREPARE,
|
|
CPUHP_SH_SH3X_PREPARE,
|
|
CPUHP_NET_FLOW_PREPARE,
|
|
CPUHP_TOPOLOGY_PREPARE,
|
|
CPUHP_NET_IUCV_PREPARE,
|
|
CPUHP_ARM_BL_PREPARE,
|
|
CPUHP_TRACE_RB_PREPARE,
|
|
CPUHP_MM_ZS_PREPARE,
|
|
CPUHP_MM_ZSWP_MEM_PREPARE,
|
|
CPUHP_MM_ZSWP_POOL_PREPARE,
|
|
CPUHP_KVM_PPC_BOOK3S_PREPARE,
|
|
CPUHP_ZCOMP_PREPARE,
|
|
CPUHP_TIMERS_PREPARE,
|
|
CPUHP_MIPS_SOC_PREPARE,
|
|
CPUHP_BP_PREPARE_DYN,
|
|
CPUHP_BP_PREPARE_DYN_END = CPUHP_BP_PREPARE_DYN + 20,
|
|
CPUHP_BRINGUP_CPU,
|
|
CPUHP_AP_IDLE_DEAD,
|
|
CPUHP_AP_OFFLINE,
|
|
CPUHP_AP_SCHED_STARTING,
|
|
CPUHP_AP_RCUTREE_DYING,
|
|
CPUHP_AP_KMAP_DYING,
|
|
CPUHP_AP_IRQ_GIC_STARTING,
|
|
CPUHP_AP_EDAC_PMU_STARTING,
|
|
CPUHP_AP_IRQ_HIP04_STARTING,
|
|
CPUHP_AP_IRQ_ARMADA_XP_STARTING,
|
|
CPUHP_AP_IRQ_BCM2836_STARTING,
|
|
CPUHP_AP_ARM_MVEBU_COHERENCY,
|
|
CPUHP_AP_MICROCODE_LOADER,
|
|
CPUHP_AP_PERF_X86_AMD_UNCORE_STARTING,
|
|
CPUHP_AP_PERF_X86_STARTING,
|
|
CPUHP_AP_PERF_X86_AMD_IBS_STARTING,
|
|
CPUHP_AP_PERF_X86_CQM_STARTING,
|
|
CPUHP_AP_PERF_X86_CSTATE_STARTING,
|
|
CPUHP_AP_PERF_XTENSA_STARTING,
|
|
CPUHP_AP_PERF_METAG_STARTING,
|
|
CPUHP_AP_MIPS_OP_LOONGSON3_STARTING,
|
|
CPUHP_AP_ARM_VFP_STARTING,
|
|
CPUHP_AP_ARM64_DEBUG_MONITORS_STARTING,
|
|
CPUHP_AP_PERF_ARM_HW_BREAKPOINT_STARTING,
|
|
CPUHP_AP_PERF_ARM_ACPI_STARTING,
|
|
CPUHP_AP_PERF_ARM_STARTING,
|
|
CPUHP_AP_ARM_L2X0_STARTING,
|
|
CPUHP_AP_EXYNOS4_MCT_TIMER_STARTING,
|
|
CPUHP_AP_ARM_ARCH_TIMER_STARTING,
|
|
CPUHP_AP_ARM_GLOBAL_TIMER_STARTING,
|
|
CPUHP_AP_JCORE_TIMER_STARTING,
|
|
CPUHP_AP_ARM_TWD_STARTING,
|
|
CPUHP_AP_METAG_TIMER_STARTING,
|
|
CPUHP_AP_QCOM_TIMER_STARTING,
|
|
CPUHP_AP_QCOM_CPUFREQ_STARTING,
|
|
CPUHP_AP_QCOM_SLEEP_STARTING,
|
|
CPUHP_AP_ARMADA_TIMER_STARTING,
|
|
CPUHP_AP_MARCO_TIMER_STARTING,
|
|
CPUHP_AP_MIPS_GIC_TIMER_STARTING,
|
|
CPUHP_AP_ARC_TIMER_STARTING,
|
|
CPUHP_AP_KVM_STARTING,
|
|
CPUHP_AP_KVM_ARM_VGIC_INIT_STARTING,
|
|
CPUHP_AP_KVM_ARM_VGIC_STARTING,
|
|
CPUHP_AP_KVM_ARM_TIMER_STARTING,
|
|
/* Must be the last timer callback */
|
|
CPUHP_AP_DUMMY_TIMER_STARTING,
|
|
CPUHP_AP_ARM_XEN_STARTING,
|
|
CPUHP_AP_ARM_SAVE_RESTORE_CORESIGHT4_STARTING,
|
|
CPUHP_AP_ARM_MM_CORESIGHT4_STARTING,
|
|
CPUHP_AP_ARM_CORESIGHT_STARTING,
|
|
CPUHP_AP_ARM64_ISNDEP_STARTING,
|
|
CPUHP_AP_SMPCFD_DYING,
|
|
CPUHP_AP_X86_TBOOT_DYING,
|
|
CPUHP_AP_ONLINE,
|
|
CPUHP_TEARDOWN_CPU,
|
|
CPUHP_AP_ON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int __cpuhp_setup_state(enum cpuhp_state state, const char *name, bool invoke,
|
|
int (*startup)(unsigned int cpu),
|
|
int (*teardown)(unsigned int cpu), bool multi_instance);
|
|
|
|
int __cpuhp_setup_state_cpuslocked(enum cpuhp_state state, const char *name,
|
|
bool invoke,
|
|
int (*startup)(unsigned int cpu),
|
|
int (*teardown)(unsigned int cpu),
|
|
bool multi_instance);
|
|
/**
|
|
* cpuhp_setup_state - Setup hotplug state callbacks with calling the callbacks
|
|
* @state: The state for which the calls are installed
|
|
* @name: Name of the callback (will be used in debug output)
|
|
* @startup: startup callback function
|
|
* @teardown: teardown callback function
|
|
*
|
|
* Installs the callback functions and invokes the startup callback on
|
|
* the present cpus which have already reached the @state.
|
|
*/
|
|
static inline int cpuhp_setup_state(enum cpuhp_state state,
|
|
const char *name,
|
|
int (*startup)(unsigned int cpu),
|
|
int (*teardown)(unsigned int cpu))
|
|
{
|
|
return __cpuhp_setup_state(state, name, true, startup, teardown, false);
|
|
}
|
|
|
|
static inline int cpuhp_setup_state_cpuslocked(enum cpuhp_state state,
|
|
const char *name,
|
|
int (*startup)(unsigned int cpu),
|
|
int (*teardown)(unsigned int cpu))
|
|
{
|
|
return __cpuhp_setup_state_cpuslocked(state, name, true, startup,
|
|
teardown, false);
|
|
}
|
|
|
|
/**
|
|
* cpuhp_setup_state_nocalls - Setup hotplug state callbacks without calling the
|
|
* callbacks
|
|
* @state: The state for which the calls are installed
|
|
* @name: Name of the callback.
|
|
* @startup: startup callback function
|
|
* @teardown: teardown callback function
|
|
*
|
|
* Same as @cpuhp_setup_state except that no calls are executed are invoked
|
|
* during installation of this callback. NOP if SMP=n or HOTPLUG_CPU=n.
|
|
*/
|
|
static inline int cpuhp_setup_state_nocalls(enum cpuhp_state state,
|
|
const char *name,
|
|
int (*startup)(unsigned int cpu),
|
|
int (*teardown)(unsigned int cpu))
|
|
{
|
|
return __cpuhp_setup_state(state, name, false, startup, teardown,
|
|
false);
|
|
}
|
|
|
|
static inline int cpuhp_setup_state_nocalls_cpuslocked(enum cpuhp_state state,
|
|
const char *name,
|
|
int (*startup)(unsigned int cpu),
|
|
int (*teardown)(unsigned int cpu))
|
|
{
|
|
return __cpuhp_setup_state_cpuslocked(state, name, false, startup,
|
|
teardown, false);
|
|
}
|
|
|
|
/**
|
|
* cpuhp_setup_state_multi - Add callbacks for multi state
|
|
* @state: The state for which the calls are installed
|
|
* @name: Name of the callback.
|
|
* @startup: startup callback function
|
|
* @teardown: teardown callback function
|
|
*
|
|
* Sets the internal multi_instance flag and prepares a state to work as a multi
|
|
* instance callback. No callbacks are invoked at this point. The callbacks are
|
|
* invoked once an instance for this state are registered via
|
|
* @cpuhp_state_add_instance or @cpuhp_state_add_instance_nocalls.
|
|
*/
|
|
static inline int cpuhp_setup_state_multi(enum cpuhp_state state,
|
|
const char *name,
|
|
int (*startup)(unsigned int cpu,
|
|
struct hlist_node *node),
|
|
int (*teardown)(unsigned int cpu,
|
|
struct hlist_node *node))
|
|
{
|
|
return __cpuhp_setup_state(state, name, false,
|
|
(void *) startup,
|
|
(void *) teardown, true);
|
|
}
|
|
|
|
int __cpuhp_state_add_instance(enum cpuhp_state state, struct hlist_node *node,
|
|
bool invoke);
|
|
int __cpuhp_state_add_instance_cpuslocked(enum cpuhp_state state,
|
|
struct hlist_node *node, bool invoke);
|
|
|
|
/**
|
|
* cpuhp_state_add_instance - Add an instance for a state and invoke startup
|
|
* callback.
|
|
* @state: The state for which the instance is installed
|
|
* @node: The node for this individual state.
|
|
*
|
|
* Installs the instance for the @state and invokes the startup callback on
|
|
* the present cpus which have already reached the @state. The @state must have
|
|
* been earlier marked as multi-instance by @cpuhp_setup_state_multi.
|
|
*/
|
|
static inline int cpuhp_state_add_instance(enum cpuhp_state state,
|
|
struct hlist_node *node)
|
|
{
|
|
return __cpuhp_state_add_instance(state, node, true);
|
|
}
|
|
|
|
/**
|
|
* cpuhp_state_add_instance_nocalls - Add an instance for a state without
|
|
* invoking the startup callback.
|
|
* @state: The state for which the instance is installed
|
|
* @node: The node for this individual state.
|
|
*
|
|
* Installs the instance for the @state The @state must have been earlier
|
|
* marked as multi-instance by @cpuhp_setup_state_multi.
|
|
*/
|
|
static inline int cpuhp_state_add_instance_nocalls(enum cpuhp_state state,
|
|
struct hlist_node *node)
|
|
{
|
|
return __cpuhp_state_add_instance(state, node, false);
|
|
}
|
|
|
|
static inline int
|
|
cpuhp_state_add_instance_nocalls_cpuslocked(enum cpuhp_state state,
|
|
struct hlist_node *node)
|
|
{
|
|
return __cpuhp_state_add_instance_cpuslocked(state, node, false);
|
|
}
|
|
|
|
void __cpuhp_remove_state(enum cpuhp_state state, bool invoke);
|
|
void __cpuhp_remove_state_cpuslocked(enum cpuhp_state state, bool invoke);
|
|
|
|
/**
|
|
* cpuhp_remove_state - Remove hotplug state callbacks and invoke the teardown
|
|
* @state: The state for which the calls are removed
|
|
*
|
|
* Removes the callback functions and invokes the teardown callback on
|
|
* the present cpus which have already reached the @state.
|
|
*/
|
|
static inline void cpuhp_remove_state(enum cpuhp_state state)
|
|
{
|
|
__cpuhp_remove_state(state, true);
|
|
}
|
|
|
|
/**
|
|
* cpuhp_remove_state_nocalls - Remove hotplug state callbacks without invoking
|
|
* teardown
|
|
* @state: The state for which the calls are removed
|
|
*/
|
|
static inline void cpuhp_remove_state_nocalls(enum cpuhp_state state)
|
|
{
|
|
__cpuhp_remove_state(state, false);
|
|
}
|
|
|
|
static inline void cpuhp_remove_state_nocalls_cpuslocked(enum cpuhp_state state)
|
|
{
|
|
__cpuhp_remove_state_cpuslocked(state, false);
|
|
}
|
|
|
|
/**
|
|
* cpuhp_remove_multi_state - Remove hotplug multi state callback
|
|
* @state: The state for which the calls are removed
|
|
*
|
|
* Removes the callback functions from a multi state. This is the reverse of
|
|
* cpuhp_setup_state_multi(). All instances should have been removed before
|
|
* invoking this function.
|
|
*/
|
|
static inline void cpuhp_remove_multi_state(enum cpuhp_state state)
|
|
{
|
|
__cpuhp_remove_state(state, false);
|
|
}
|
|
|
|
int __cpuhp_state_remove_instance(enum cpuhp_state state,
|
|
struct hlist_node *node, bool invoke);
|
|
|
|
/**
|
|
* cpuhp_state_remove_instance - Remove hotplug instance from state and invoke
|
|
* the teardown callback
|
|
* @state: The state from which the instance is removed
|
|
* @node: The node for this individual state.
|
|
*
|
|
* Removes the instance and invokes the teardown callback on the present cpus
|
|
* which have already reached the @state.
|
|
*/
|
|
static inline int cpuhp_state_remove_instance(enum cpuhp_state state,
|
|
struct hlist_node *node)
|
|
{
|
|
return __cpuhp_state_remove_instance(state, node, true);
|
|
}
|
|
|
|
/**
|
|
* cpuhp_state_remove_instance_nocalls - Remove hotplug instance from state
|
|
* without invoking the reatdown callback
|
|
* @state: The state from which the instance is removed
|
|
* @node: The node for this individual state.
|
|
*
|
|
* Removes the instance without invoking the teardown callback.
|
|
*/
|
|
static inline int cpuhp_state_remove_instance_nocalls(enum cpuhp_state state,
|
|
struct hlist_node *node)
|
|
{
|
|
return __cpuhp_state_remove_instance(state, node, false);
|
|
}
|
|
|
|
#ifdef CONFIG_SMP
|
|
void cpuhp_online_idle(enum cpuhp_state state);
|
|
#else
|
|
static inline void cpuhp_online_idle(enum cpuhp_state state) { }
|
|
#endif
|
|
|
|
#endif
|