This is the 5.4.285 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmcuLG4ACgkQONu9yGCS aT7BrA/+NGLfwp3lfOunHEhrw/IwD/tbMJuAOn5P2rvrg3f2aCVjboJpHh0pwL6O Axt4uEmJOo7++8mEo9cCBdLPSv5lQPK+j1uIXjKfdISODJYVqLf6g7GGHSdq/Ijj BCSW24P+Kl+XK0NHiyzlS2+XFP+Xk6T5yErV0cBwt6KFotYWjaAlpwDlCGHtvdra RROVwCQWVxGrCDLPEYeQIP3cD1fp/A3Q/d3quJLK1xo6SXAFBZjlYcOvl76i4ogj 6ZZPBdIusk24pjpnhaIwmlzbmfqWbp5T2uJHJGaXNfSioIKSs1CdKP9zsOnGxoDl Iv3c65O/IZbLz/77z1yKDPWn9lQ1uu0sr15Bq6G720HOvk1reKbBwP+XeWNnl8PF RLdDxVAYqIFxfMsWGHgc7NzToRH/Z2AkqmTcm+uYHh+u9z4gXbVKXcgOX/EBFKKL rlVjwOsTzPm2NV81EP4bDKNag+3D6yoYn1zJV6Qdu7j/Wsn69OjFEuMIVeXf1olv BGGdTwleHgA8ml18xZkoCun3J9NORhaCgdfz979fwSdxBBpGHxDcklWZtQMJxfgl UpD0huZWoD3mjIx557N9Rxh270L7ETQMSLd3B6Bu2qy6Gd9V4Ik0R33nEEiodPfU bxmZ3r/Fzqs8Zzc3V/NrKCgxopf/yLcdXfOJCpNyL9oXaxCH8oQ= =W8Y0 -----END PGP SIGNATURE----- Merge 5.4.285 into android11-5.4-lts Changes in 5.4.285 usbnet: ipheth: fix carrier detection in modes 1 and 4 net: ethernet: use ip_hdrlen() instead of bit shift net: phy: vitesse: repair vsc73xx autonegotiation scripts: kconfig: merge_config: config files: add a trailing newline arm64: dts: rockchip: override BIOS_DISABLE signal via GPIO hog on RK3399 Puma ice: fix accounting for filters shared by multiple VSIs net/mlx5e: Add missing link modes to ptys2ethtool_map net: ftgmac100: Enable TX interrupt to avoid TX timeout net: dpaa: Pad packets to ETH_ZLEN spi: nxp-fspi: fix the KASAN report out-of-bounds bug soundwire: stream: Revert "soundwire: stream: fix programming slave ports for non-continous port maps" selftests: breakpoints: Fix a typo of function name ASoC: allow module autoloading for table db1200_pids ALSA: hda/realtek - Fixed ALC256 headphone no sound ALSA: hda/realtek - FIxed ALC285 headphone no sound pinctrl: at91: make it work with current gpiolib microblaze: don't treat zero reserved memory regions as error net: ftgmac100: Ensure tx descriptor updates are visible wifi: iwlwifi: mvm: fix iwl_mvm_max_scan_ie_fw_cmd_room() wifi: iwlwifi: mvm: don't wait for tx queues if firmware is dead ASoC: tda7419: fix module autoloading drm: komeda: Fix an issue related to normalized zpos spi: bcm63xx: Enable module autoloading x86/hyperv: Set X86_FEATURE_TSC_KNOWN_FREQ when Hyper-V provides frequency ocfs2: add bounds checking to ocfs2_xattr_find_entry() ocfs2: strict bound check before memcmp in ocfs2_xattr_find_entry() gpio: prevent potential speculation leaks in gpio_device_get_desc() inet: inet_defrag: prevent sk release while still in use bpf: Fix DEVMAP_HASH overflow check on 32-bit arches USB: serial: pl2303: add device id for Macrosilicon MS3020 USB: usbtmc: prevent kernel-usb-infoleak ACPI: PMIC: Remove unneeded check in tps68470_pmic_opregion_probe() wifi: ath9k: fix parameter check in ath9k_init_debug() wifi: ath9k: Remove error checks when creating debugfs entries fs: explicitly unregister per-superblock BDIs mount: warn only once about timestamp range expiration fs/namespace: fnic: Switch to use %ptTd mount: handle OOM on mnt_warn_timestamp_expiry can: j1939: use correct function name in comment netfilter: nf_tables: elements with timeout below CONFIG_HZ never expire netfilter: nf_tables: reject element expiration with no timeout netfilter: nf_tables: reject expiration higher than timeout wifi: cfg80211: fix UBSAN noise in cfg80211_wext_siwscan() wifi: cfg80211: fix two more possible UBSAN-detected off-by-one errors mac80211: parse radiotap header when selecting Tx queue wifi: mac80211: use two-phase skb reclamation in ieee80211_do_stop() wifi: wilc1000: fix potential RCU dereference issue in wilc_parse_join_bss_param sock_map: Add a cond_resched() in sock_hash_free() can: bcm: Clear bo->bcm_proc_read after remove_proc_entry(). Bluetooth: btusb: Fix not handling ZPL/short-transfer net: tipc: avoid possible garbage value block, bfq: fix possible UAF for bfqq->bic with merge chain block, bfq: choose the last bfqq from merge chain in bfq_setup_cooperator() block, bfq: don't break merge chain in bfq_split_bfqq() spi: ppc4xx: handle irq_of_parse_and_map() errors spi: ppc4xx: Avoid returning 0 when failed to parse and map IRQ ARM: dts: imx7d-zii-rmu2: fix Ethernet PHY pinctrl property ARM: versatile: fix OF node leak in CPUs prepare reset: berlin: fix OF node leak in probe() error path clocksource/drivers/qcom: Add missing iounmap() on errors in msm_dt_timer_init() hwmon: (max16065) Fix overflows seen when writing limits mtd: slram: insert break after errors in parsing the map hwmon: (ntc_thermistor) fix module autoloading power: supply: axp20x_battery: allow disabling battery charging power: supply: axp20x_battery: Remove design from min and max voltage power: supply: max17042_battery: Fix SOC threshold calc w/ no current sense fbdev: hpfb: Fix an error handling path in hpfb_dio_probe() mtd: powernv: Add check devm_kasprintf() returned value drm/stm: Fix an error handling path in stm_drm_platform_probe() drm/amdgpu: Replace one-element array with flexible-array member drm/amdgpu: properly handle vbios fake edid sizing drm/radeon: Replace one-element array with flexible-array member drm/radeon: properly handle vbios fake edid sizing drm/rockchip: vop: Allow 4096px width scaling drm/rockchip: dw_hdmi: Fix reading EDID when using a forced mode drm/radeon/evergreen_cs: fix int overflow errors in cs track offsets jfs: fix out-of-bounds in dbNextAG() and diAlloc() drm/msm: Fix incorrect file name output in adreno_request_fw() drm/msm/a5xx: disable preemption in submits by default drm/msm/a5xx: properly clear preemption records on resume drm/msm/a5xx: fix races in preemption evaluation stage ipmi: docs: don't advertise deprecated sysfs entries drm/msm: fix %s null argument error drivers:drm:exynos_drm_gsc:Fix wrong assignment in gsc_bind() xen: use correct end address of kernel for conflict checking xen/swiotlb: add alignment check for dma buffers tpm: Clean up TPM space after command failure selftests/bpf: Fix compile error from rlim_t in sk_storage_map.c selftests/bpf: Fix compiling flow_dissector.c with musl-libc selftests/bpf: Fix compiling tcp_rtt.c with musl-libc selftests/bpf: Fix error compiling test_lru_map.c xz: cleanup CRC32 edits from 2018 kthread: add kthread_work tracepoints kthread: fix task state in kthread worker if being frozen jbd2: introduce/export functions jbd2_journal_submit|finish_inode_data_buffers() ext4: clear EXT4_GROUP_INFO_WAS_TRIMMED_BIT even mount with discard smackfs: Use rcu_assign_pointer() to ensure safe assignment in smk_set_cipso ext4: avoid negative min_clusters in find_group_orlov() ext4: return error on ext4_find_inline_entry ext4: avoid OOB when system.data xattr changes underneath the filesystem nilfs2: fix potential null-ptr-deref in nilfs_btree_insert() nilfs2: determine empty node blocks as corrupted nilfs2: fix potential oob read in nilfs_btree_check_delete() bpf: Fix bpf_strtol and bpf_strtoul helpers for 32bit perf sched timehist: Fix missing free of session in perf_sched__timehist() perf sched timehist: Fixed timestamp error when unable to confirm event sched_in time perf time-utils: Fix 32-bit nsec parsing clk: rockchip: Set parent rate for DCLK_VOP clock on RK3228 drivers: media: dvb-frontends/rtl2832: fix an out-of-bounds write error drivers: media: dvb-frontends/rtl2830: fix an out-of-bounds write error PCI: keystone: Fix if-statement expression in ks_pcie_quirk() PCI: xilinx-nwl: Fix register misspelling RDMA/iwcm: Fix WARNING:at_kernel/workqueue.c:#check_flush_dependency pinctrl: single: fix missing error code in pcs_probe() clk: ti: dra7-atl: Fix leak of of_nodes pinctrl: mvebu: Fix devinit_dove_pinctrl_probe function watchdog: imx_sc_wdt: Don't disable WDT in suspend RDMA/hns: Optimize hem allocation performance riscv: Fix fp alignment bug in perf_callchain_user() RDMA/cxgb4: Added NULL check for lookup_atid ntb: intel: Fix the NULL vs IS_ERR() bug for debugfs_create_dir() nfsd: call cache_put if xdr_reserve_space returns NULL nfsd: return -EINVAL when namelen is 0 f2fs: enhance to update i_mode and acl atomically in f2fs_setattr() f2fs: fix typo f2fs: fix to update i_ctime in __f2fs_setxattr() f2fs: remove unneeded check condition in __f2fs_setxattr() f2fs: reduce expensive checkpoint trigger frequency iio: adc: ad7606: fix oversampling gpio array iio: adc: ad7606: fix standby gpio state to match the documentation coresight: tmc: sg: Do not leak sg_table netfilter: nf_reject_ipv6: fix nf_reject_ip6_tcphdr_put() net: seeq: Fix use after free vulnerability in ether3 Driver Due to Race Condition tcp: check skb is non-NULL in tcp_rto_delta_us() net: qrtr: Update packets cloning when broadcasting netfilter: ctnetlink: compile ctnetlink_label_size with CONFIG_NF_CONNTRACK_EVENTS crypto: aead,cipher - zeroize key buffer after use Remove *.orig pattern from .gitignore soc: versatile: integrator: fix OF node leak in probe() error path drm/amd/display: Round calculated vtotal USB: appledisplay: close race between probe and completion handler USB: misc: cypress_cy7c63: check for short transfer USB: class: CDC-ACM: fix race between get_serial and set_serial firmware_loader: Block path traversal tty: rp2: Fix reset with non forgiving PCIe host bridges drbd: Fix atomicity violation in drbd_uuid_set_bm() drbd: Add NULL check for net_conf to prevent dereference in state validation ACPI: sysfs: validate return type of _STR method ACPI: resource: Add another DMI match for the TongFang GMxXGxx wifi: rtw88: 8822c: Fix reported RX band width debugobjects: Fix conditions in fill_pool() f2fs: prevent possible int overflow in dir_block_index() f2fs: avoid potential int overflow in sanity_check_area_boundary() hwrng: mtk - Use devm_pm_runtime_enable vfs: fix race between evice_inodes() and find_inode()&iput() fs: Fix file_set_fowner LSM hook inconsistencies nfs: fix memory leak in error path of nfs4_do_reclaim ASoC: meson: axg: extract sound card utils ASoC: meson: axg-card: fix 'use-after-free' PCI: xilinx-nwl: Use irq_data_get_irq_chip_data() PCI: xilinx-nwl: Fix off-by-one in INTx IRQ handler soc: versatile: realview: fix memory leak during device remove soc: versatile: realview: fix soc_dev leak during device remove usb: yurex: Replace snprintf() with the safer scnprintf() variant USB: misc: yurex: fix race between read and write pps: remove usage of the deprecated ida_simple_xx() API pps: add an error check in parport_attach mm: only enforce minimum stack gap size if it's sensible i2c: aspeed: Update the stop sw state when the bus recovery occurs i2c: isch: Add missed 'else' usb: yurex: Fix inconsistent locking bug in yurex_read() mailbox: rockchip: fix a typo in module autoloading mailbox: bcm2835: Fix timeout during suspend mode ceph: remove the incorrect Fw reference check when dirtying pages Minor fixes to the CAIF Transport drivers Kconfig file drivers: net: Fix Kconfig indentation, continued ieee802154: Fix build error net/mlx5: Added cond_resched() to crdump collection netfilter: uapi: NFTA_FLOWTABLE_HOOK is NLA_NESTED net: ieee802154: mcr20a: Use IRQF_NO_AUTOEN flag in request_irq() netfilter: nf_tables: prevent nf_skb_duplicated corruption Bluetooth: btmrvl_sdio: Refactor irq wakeup Bluetooth: btmrvl: Use IRQF_NO_AUTOEN flag in request_irq() net: ethernet: lantiq_etop: fix memory disclosure net: avoid potential underflow in qdisc_pkt_len_init() with UFO net: add more sanity checks to qdisc_pkt_len_init() ipv4: ip_gre: Fix drops of small packets in ipgre_xmit sctp: set sk_state back to CLOSED if autobind fails in sctp_listen_start ALSA: hda/realtek: Fix the push button function for the ALC257 ALSA: hda/generic: Unconditionally prefer preferred_dacs pairs ALSA: hda/conexant: Fix conflicting quirk for System76 Pangolin f2fs: Require FMODE_WRITE for atomic write ioctls wifi: ath9k: fix possible integer overflow in ath9k_get_et_stats() wifi: ath9k_htc: Use __skb_set_length() for resetting urb before resubmit ice: Adjust over allocation of memory in ice_sched_add_root_node() and ice_sched_add_node() net: hisilicon: hip04: fix OF node leak in probe() net: hisilicon: hns_dsaf_mac: fix OF node leak in hns_mac_get_info() net: hisilicon: hns_mdio: fix OF node leak in probe() ACPICA: Fix memory leak if acpi_ps_get_next_namepath() fails ACPICA: Fix memory leak if acpi_ps_get_next_field() fails net: sched: consistently use rcu_replace_pointer() in taprio_change() wifi: rtw88: select WANT_DEV_COREDUMP ACPI: EC: Do not release locks during operation region accesses ACPICA: check null return of ACPI_ALLOCATE_ZEROED() in acpi_db_convert_to_package() tipc: guard against string buffer overrun net: mvpp2: Increase size of queue_name buffer ipv4: Check !in_dev earlier for ioctl(SIOCSIFADDR). ipv4: Mask upper DSCP bits and ECN bits in NETLINK_FIB_LOOKUP family tcp: avoid reusing FIN_WAIT2 when trying to find port in connect() process ACPICA: iasl: handle empty connection_node proc: add config & param to block forcing mem writes wifi: mwifiex: Fix memcpy() field-spanning write warning in mwifiex_cmd_802_11_scan_ext() nfp: Use IRQF_NO_AUTOEN flag in request_irq() signal: Replace BUG_ON()s ALSA: asihpi: Fix potential OOB array access ALSA: hdsp: Break infinite MIDI input flush loop x86/syscall: Avoid memcpy() for ia32 syscall_get_arguments() fbdev: pxafb: Fix possible use after free in pxafb_task() power: reset: brcmstb: Do not go into infinite loop if reset fails ata: sata_sil: Rename sil_blacklist to sil_quirks jfs: UBSAN: shift-out-of-bounds in dbFindBits jfs: Fix uaf in dbFreeBits jfs: check if leafidx greater than num leaves per dmap tree jfs: Fix uninit-value access of new_ea in ea_buffer drm/amd/display: Check stream before comparing them drm/amd/display: Fix index out of bounds in degamma hardware format translation drm/amd/display: Initialize get_bytes_per_element's default to 1 drm/printer: Allow NULL data in devcoredump printer scsi: aacraid: Rearrange order of struct aac_srb_unit drm/radeon/r100: Handle unknown family in r100_cp_init_microcode() of/irq: Refer to actual buffer size in of_irq_parse_one() ext4: ext4_search_dir should return a proper error ext4: fix i_data_sem unlock order in ext4_ind_migrate() spi: s3c64xx: fix timeout counters in flush_fifo selftests: breakpoints: use remaining time to check if suspend succeed selftests: vDSO: fix vDSO symbols lookup for powerpc64 i2c: stm32f7: Do not prepare/unprepare clock during runtime suspend/resume i2c: xiic: Wait for TX empty to avoid missed TX NAKs firmware: tegra: bpmp: Drop unused mbox_client_to_bpmp() spi: bcm63xx: Fix module autoloading perf/core: Fix small negative period being ignored parisc: Fix itlb miss handler for 64-bit programs drm: Consistently use struct drm_mode_rect for FB_DAMAGE_CLIPS ALSA: core: add isascii() check to card ID generator ext4: no need to continue when the number of entries is 1 ext4: propagate errors from ext4_find_extent() in ext4_insert_range() ext4: fix incorrect tid assumption in __jbd2_log_wait_for_space() ext4: aovid use-after-free in ext4_ext_insert_extent() ext4: fix double brelse() the buffer of the extents path ext4: fix incorrect tid assumption in ext4_wait_for_tail_page_commit() parisc: Fix 64-bit userspace syscall path parisc: Fix stack start for ADDR_NO_RANDOMIZE personality of/irq: Support #msi-cells=<0> in of_msi_get_domain drm: omapdrm: Add missing check for alloc_ordered_workqueue jbd2: stop waiting for space when jbd2_cleanup_journal_tail() returns error mm: krealloc: consider spare memory for __GFP_ZERO ocfs2: fix the la space leak when unmounting an ocfs2 volume ocfs2: fix uninit-value in ocfs2_get_block() ocfs2: reserve space for inline xattr before attaching reflink tree ocfs2: cancel dqi_sync_work before freeing oinfo ocfs2: remove unreasonable unlock in ocfs2_read_blocks ocfs2: fix null-ptr-deref when journal load failed. ocfs2: fix possible null-ptr-deref in ocfs2_set_buffer_uptodate riscv: define ILLEGAL_POINTER_VALUE for 64bit aoe: fix the potential use-after-free problem in more places clk: rockchip: fix error for unknown clocks media: sun4i_csi: Implement link validate for sun4i_csi subdev media: uapi/linux/cec.h: cec_msg_set_reply_to: zero flags media: venus: fix use after free bug in venus_remove due to race condition iio: magnetometer: ak8975: Fix reading for ak099xx sensors tomoyo: fallback to realpath if symlink's pathname does not exist rtc: at91sam9: fix OF node leak in probe() error path Input: adp5589-keys - fix adp5589_gpio_get_value() ACPI: resource: Add Asus Vivobook X1704VAP to irq1_level_low_skip_override[] ACPI: resource: Add Asus ExpertBook B2502CVA to irq1_level_low_skip_override[] btrfs: fix a NULL pointer dereference when failed to start a new trasacntion btrfs: wait for fixup workers before stopping cleaner kthread during umount gpio: davinci: fix lazy disable i2c: qcom-geni: Let firmware specify irq trigger flags i2c: qcom-geni: Grow a dev pointer to simplify code i2c: qcom-geni: Use IRQF_NO_AUTOEN flag in request_irq() arm64: Add Cortex-715 CPU part definition arm64: cputype: Add Neoverse-N3 definitions arm64: errata: Expand speculative SSBS workaround once more uprobes: fix kernel info leak via "[uprobes]" vma nfsd: use ktime_get_seconds() for timestamps nfsd: fix delegation_blocked() to block correctly for at least 30 seconds clk: qcom: rpmh: Simplify clk_rpmh_bcm_send_cmd() clk: qcom: clk-rpmh: Fix overflow in BCM vote r8169: Fix spelling mistake: "tx_underun" -> "tx_underrun" r8169: add tally counter fields added with RTL8125 ACPI: battery: Simplify battery hook locking ACPI: battery: Fix possible crash when unregistering a battery hook ext4: fix inode tree inconsistency caused by ENOMEM unicode: Don't special case ignorable code points net: ethernet: cortina: Drop TSO support tracing: Remove precision vsnprintf() check from print event drm/crtc: fix uninitialized variable use even harder tracing: Have saved_cmdlines arrays all in one allocation virtio_console: fix misc probe bugs Input: synaptics-rmi4 - fix UAF of IRQ domain on driver removal bpf: Check percpu map value size first s390/facility: Disable compile time optimization for decompressor code s390/mm: Add cond_resched() to cmm_alloc/free_pages() ext4: nested locking for xattr inode s390/cpum_sf: Remove WARN_ON_ONCE statements ktest.pl: Avoid false positives with grub2 skip regex clk: bcm: bcm53573: fix OF node leak in init PCI: Add ACS quirk for Qualcomm SA8775P i2c: i801: Use a different adapter-name for IDF adapters PCI: Mark Creative Labs EMU20k2 INTx masking as broken ntb: ntb_hw_switchtec: Fix use after free vulnerability in switchtec_ntb_remove due to race condition media: videobuf2-core: clear memory related fields in __vb2_plane_dmabuf_put() usb: chipidea: udc: enable suspend interrupt after usb reset usb: dwc2: Adjust the timing of USB Driver Interrupt Registration in the Crashkernel Scenario virtio_pmem: Check device status before requesting flush tools/iio: Add memory allocation failure check for trigger_name driver core: bus: Return -EIO instead of 0 when show/store invalid bus attribute fbdev: sisfb: Fix strbuf array overflow RDMA/rxe: Fix seg fault in rxe_comp_queue_pkt ice: fix VLAN replay after reset SUNRPC: Fix integer overflow in decode_rc_list() tcp: fix to allow timestamp undo if no retransmits were sent tcp: fix tcp_enter_recovery() to zero retrans_stamp when it's safe netfilter: br_netfilter: fix panic with metadata_dst skb Bluetooth: RFCOMM: FIX possible deadlock in rfcomm_sk_state_change gpio: aspeed: Add the flush write to ensure the write complete. gpio: aspeed: Use devm_clk api to manage clock source igb: Do not bring the device up after non-fatal error net/sched: accept TCA_STAB only for root qdisc net: ibm: emac: mal: fix wrong goto net: annotate lockless accesses to sk->sk_ack_backlog net: annotate lockless accesses to sk->sk_max_ack_backlog sctp: ensure sk_state is set to CLOSED if hashing fails in sctp_listen_start ppp: fix ppp_async_encode() illegal access slip: make slhc_remember() more robust against malicious packets locking/lockdep: Fix bad recursion pattern locking/lockdep: Rework lockdep_lock locking/lockdep: Avoid potential access of invalid memory in lock_class lockdep: fix deadlock issue between lockdep and rcu resource: fix region_intersects() vs add_memory_driver_managed() CDC-NCM: avoid overflow in sanity checking HID: plantronics: Workaround for an unexcepted opposite volume key Revert "usb: yurex: Replace snprintf() with the safer scnprintf() variant" usb: dwc3: core: Stop processing of pending events if controller is halted usb: xhci: Fix problem with xhci resume from suspend usb: storage: ignore bogus device raised by JieLi BR21 USB sound chip hid: intel-ish-hid: Fix uninitialized variable 'rv' in ish_fw_xfer_direct_dma net: Fix an unsafe loop on the list nouveau/dmem: Fix vulnerability in migrate_to_ram upon copy error posix-clock: Fix missing timespec64 check in pc_clock_settime() arm64: probes: Remove broken LDR (literal) uprobe support arm64: probes: Fix simulate_ldr*_literal() tracing/kprobes: Return EADDRNOTAVAIL when func matches several symbols tracing/kprobes: Fix symbol counting logic by looking at modules as well PCI: Add function 0 DMA alias quirk for Glenfly Arise chip fat: fix uninitialized variable mm/swapfile: skip HugeTLB pages for unuse_vma wifi: mac80211: fix potential key use-after-free KVM: Fix a data race on last_boosted_vcpu in kvm_vcpu_on_spin() s390/sclp_vt220: Convert newlines to CRLF instead of LFCR KVM: s390: Change virtual to physical address access in diag 0x258 handler x86/cpufeatures: Define X86_FEATURE_AMD_IBPB_RET blk-rq-qos: fix crash on rq_qos_wait vs. rq_qos_wake_function race drm/vmwgfx: Handle surface check failure correctly iio: dac: ltc1660: add missing select REGMAP_SPI in Kconfig iio: dac: stm32-dac-core: add missing select REGMAP_MMIO in Kconfig iio: adc: ti-ads8688: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig iio: hid-sensors: Fix an error handling path in _hid_sensor_set_report_latency() iio: light: opt3001: add missing full-scale range value iio: proximity: mb1232: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig iio: adc: ti-ads124s08: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig Bluetooth: Remove debugfs directory on module init failure Bluetooth: btusb: Fix regression with fake CSR controllers 0a12:0001 xhci: Fix incorrect stream context type macro USB: serial: option: add support for Quectel EG916Q-GL USB: serial: option: add Telit FN920C04 MBIM compositions parport: Proper fix for array out-of-bounds access x86/resctrl: Annotate get_mem_config() functions as __init x86/apic: Always explicitly disarm TSC-deadline timer nilfs2: propagate directory read errors from nilfs_find_entry() erofs: fix lz4 inplace decompression mac80211: Fix NULL ptr deref for injected rate info RDMA/bnxt_re: Fix incorrect AVID type in WQE structure ARM: dts: bcm2837-rpi-cm3-io3: Fix HDMI hpd-gpio pin RDMA/cxgb4: Fix RDMA_CM_EVENT_UNREACHABLE error for iWARP ipv4: give an IPv4 dev to blackhole_netdev RDMA/bnxt_re: Return more meaningful error drm/msm/dsi: fix 32-bit signed integer extension in pclk_rate calculation macsec: don't increment counters for an unrelated SA net: ethernet: aeroflex: fix potential memory leak in greth_start_xmit_gbit() net: systemport: fix potential memory leak in bcm_sysport_xmit() genetlink: hold RCU in genlmsg_mcast() smb: client: fix OOBs when building SMB2_IOCTL request usb: typec: altmode should keep reference to parent Bluetooth: bnep: fix wild-memory-access in proto_unregister arm64:uprobe fix the uprobe SWBP_INSN in big-endian arm64: probes: Fix uprobes for big-endian kernels KVM: s390: gaccess: Refactor gpa and length calculation KVM: s390: gaccess: Refactor access address range check KVM: s390: gaccess: Cleanup access to guest pages KVM: s390: gaccess: Check if guest address is in memslot drm/vboxvideo: Replace fake VLA at end of vbva_mouse_pointer_shape with real VLA udf: fix uninit-value use in udf_get_fileshortad jfs: Fix sanity check in dbMount tracing: Consider the NULL character when validating the event length net/sun3_82586: fix potential memory leak in sun3_82586_send_packet() be2net: fix potential memory leak in be_xmit() net: usb: usbnet: fix name regression net: sched: fix use-after-free in taprio_change() r8169: avoid unsolicited interrupts posix-clock: posix-clock: Fix unbalanced locking in pc_clock_settime() ALSA: firewire-lib: Avoid division by zero in apply_constraint_to_size() ALSA: hda/realtek: Update default depop procedure drm/amd: Guard against bad data for ATIF ACPI method ACPI: resource: Add LG 16T90SP to irq1_level_low_skip_override[] ACPI: button: Add DMI quirk for Samsung Galaxy Book2 to fix initial lid detection issue nilfs2: fix kernel bug due to missing clearing of buffer delay flag ALSA: hda/realtek: Add subwoofer quirk for Acer Predator G9-593 hv_netvsc: Fix VF namespace also in synthetic NIC NETDEV_REGISTER event selinux: improve error checking in sel_write_load() arm64/uprobes: change the uprobe_opcode_t typedef to fix the sparse warning xfrm: validate new SA's prefixlen using SA family when sel.family is unset cgroup: Fix potential overflow issue when checking max_depth wifi: mac80211: skip non-uploaded keys in ieee80211_iter_keys mac80211: do drv_reconfig_complete() before restarting all mac80211: Add support to trigger sta disconnect on hardware restart wifi: iwlwifi: mvm: disconnect station vifs if recovery failed wifi: iwlwifi: mvm: Fix response handling in iwl_mvm_send_recovery_cmd() ASoC: cs42l51: Fix some error handling paths in cs42l51_probe() dt-bindings: gpu: Convert Samsung Image Rotator to dt-schema gtp: simplify error handling code in 'gtp_encap_enable()' gtp: allow -1 to be specified as file description from userspace net/sched: stop qdisc_tree_reduce_backlog on TC_H_ROOT bpf: Fix out-of-bounds write in trie_get_next_key() net: support ip generic csum processing in skb_csum_hwoffload_help net: skip offload for NETIF_F_IPV6_CSUM if ipv6 header contains extension netfilter: nft_payload: sanitize offset and length before calling skb_checksum() drivers/misc: ti-st: Remove unneeded variable in st_tty_open firmware: arm_sdei: Fix the input parameter of cpuhp_remove_state() net: amd: mvme147: Fix probe banner message misc: sgi-gru: Don't disable preemption in GRU driver usbip: tools: Fix detach_port() invalid port error path usb: phy: Fix API devm_usb_put_phy() can not release the phy xhci: Fix Link TRB DMA in command ring stopped completion event Revert "driver core: Fix uevent_show() vs driver detach race" wifi: mac80211: do not pass a stopped vif to the driver in .get_txpower wifi: ath10k: Fix memory leak in management tx wifi: iwlegacy: Clear stale interrupts before resuming device staging: iio: frequency: ad9832: fix division by zero in ad9832_calc_freqreg() nilfs2: fix potential deadlock with newly created symlinks riscv: Remove unused GENERATING_ASM_OFFSETS ocfs2: pass u64 to ocfs2_truncate_inline maybe overflow nilfs2: fix kernel bug due to missing clearing of checked flag mm: shmem: fix data-race in shmem_getattr() Revert "drm/mipi-dsi: Set the fwnode for mipi_dsi_device" vt: prevent kernel-infoleak in con_font_get() mac80211: always have ieee80211_sta_restart() mm: krealloc: Fix MTE false alarm in __do_krealloc Linux 5.4.285 Change-Id: Ie1859b6122e2fdacf18a1fe83f792b855fd0e54c Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
commit
94424b0fce
433 changed files with 3808 additions and 2000 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -120,7 +120,6 @@ GTAGS
|
|||
# id-utils files
|
||||
ID
|
||||
|
||||
*.orig
|
||||
*~
|
||||
\#*#
|
||||
|
||||
|
|
|
|||
|
|
@ -518,7 +518,7 @@ at module load time (for a module) with::
|
|||
[dbg_probe=1]
|
||||
|
||||
The addresses are normal I2C addresses. The adapter is the string
|
||||
name of the adapter, as shown in /sys/class/i2c-adapter/i2c-<n>/name.
|
||||
name of the adapter, as shown in /sys/bus/i2c/devices/i2c-<n>/name.
|
||||
It is *NOT* i2c-<n> itself. Also, the comparison is done ignoring
|
||||
spaces, so if the name is "This is an I2C chip" you can say
|
||||
adapter_name=ThisisanI2cchip. This is because it's hard to pass in
|
||||
|
|
|
|||
|
|
@ -3818,6 +3818,16 @@
|
|||
printk.time= Show timing data prefixed to each printk message line
|
||||
Format: <bool> (1/Y/y=enable, 0/N/n=disable)
|
||||
|
||||
proc_mem.force_override= [KNL]
|
||||
Format: {always | ptrace | never}
|
||||
Traditionally /proc/pid/mem allows memory permissions to be
|
||||
overridden without restrictions. This option may be set to
|
||||
restrict that. Can be one of:
|
||||
- 'always': traditional behavior always allows mem overrides.
|
||||
- 'ptrace': only allow mem overrides for active ptracers.
|
||||
- 'never': never allow mem overrides.
|
||||
If not specified, default is the CONFIG_PROC_MEM_* choice.
|
||||
|
||||
processor.max_cstate= [HW,ACPI]
|
||||
Limit processor to maximum C-state
|
||||
max_cstate=9 overrides any DMI blacklist limit.
|
||||
|
|
|
|||
|
|
@ -98,6 +98,8 @@ stable kernels.
|
|||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
| ARM | Cortex-A710 | #3324338 | ARM64_ERRATUM_3194386 |
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
| ARM | Cortex-A715 | #3456084 | ARM64_ERRATUM_3194386 |
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
| ARM | Cortex-A720 | #3456091 | ARM64_ERRATUM_3194386 |
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
| ARM | Cortex-A725 | #3456106 | ARM64_ERRATUM_3194386 |
|
||||
|
|
@ -124,6 +126,8 @@ stable kernels.
|
|||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
| ARM | Neoverse-N2 | #3324339 | ARM64_ERRATUM_3194386 |
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
| ARM | Neoverse-N3 | #3456111 | ARM64_ERRATUM_3194386 |
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
| ARM | Neoverse-V1 | #3324341 | ARM64_ERRATUM_3194386 |
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
| ARM | Neoverse-V2 | #3324336 | ARM64_ERRATUM_3194386 |
|
||||
|
|
|
|||
|
|
@ -1,28 +0,0 @@
|
|||
* Samsung Image Rotator
|
||||
|
||||
Required properties:
|
||||
- compatible : value should be one of the following:
|
||||
* "samsung,s5pv210-rotator" for Rotator IP in S5PV210
|
||||
* "samsung,exynos4210-rotator" for Rotator IP in Exynos4210
|
||||
* "samsung,exynos4212-rotator" for Rotator IP in Exynos4212/4412
|
||||
* "samsung,exynos5250-rotator" for Rotator IP in Exynos5250
|
||||
|
||||
- reg : Physical base address of the IP registers and length of memory
|
||||
mapped region.
|
||||
|
||||
- interrupts : Interrupt specifier for rotator interrupt, according to format
|
||||
specific to interrupt parent.
|
||||
|
||||
- clocks : Clock specifier for rotator clock, according to generic clock
|
||||
bindings. (See Documentation/devicetree/bindings/clock/exynos*.txt)
|
||||
|
||||
- clock-names : Names of clocks. For exynos rotator, it should be "rotator".
|
||||
|
||||
Example:
|
||||
rotator@12810000 {
|
||||
compatible = "samsung,exynos4210-rotator";
|
||||
reg = <0x12810000 0x1000>;
|
||||
interrupts = <0 83 0>;
|
||||
clocks = <&clock 278>;
|
||||
clock-names = "rotator";
|
||||
};
|
||||
48
Documentation/devicetree/bindings/gpu/samsung-rotator.yaml
Normal file
48
Documentation/devicetree/bindings/gpu/samsung-rotator.yaml
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/gpu/samsung-rotator.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Samsung SoC Image Rotator
|
||||
|
||||
maintainers:
|
||||
- Inki Dae <inki.dae@samsung.com>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- "samsung,s5pv210-rotator"
|
||||
- "samsung,exynos4210-rotator"
|
||||
- "samsung,exynos4212-rotator"
|
||||
- "samsung,exynos5250-rotator"
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
maxItems: 1
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: rotator
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
- clocks
|
||||
- clock-names
|
||||
|
||||
examples:
|
||||
- |
|
||||
rotator@12810000 {
|
||||
compatible = "samsung,exynos4210-rotator";
|
||||
reg = <0x12810000 0x1000>;
|
||||
interrupts = <0 83 0>;
|
||||
clocks = <&clock 278>;
|
||||
clock-names = "rotator";
|
||||
};
|
||||
|
||||
2
Makefile
2
Makefile
|
|
@ -1,7 +1,7 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 4
|
||||
SUBLEVEL = 284
|
||||
SUBLEVEL = 285
|
||||
EXTRAVERSION =
|
||||
NAME = Kleptomaniac Octopus
|
||||
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@
|
|||
};
|
||||
|
||||
&hdmi {
|
||||
hpd-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>;
|
||||
hpd-gpios = <&expgpio 0 GPIO_ACTIVE_LOW>;
|
||||
power-domains = <&power RPI_POWER_DOMAIN_HDMI>;
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -350,7 +350,7 @@
|
|||
|
||||
&iomuxc_lpsr {
|
||||
pinctrl_enet1_phy_interrupt: enet1phyinterruptgrp {
|
||||
fsl,phy = <
|
||||
fsl,pins = <
|
||||
MX7D_PAD_LPSR_GPIO1_IO02__GPIO1_IO2 0x08
|
||||
>;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ static void __init realview_smp_prepare_cpus(unsigned int max_cpus)
|
|||
return;
|
||||
}
|
||||
map = syscon_node_to_regmap(np);
|
||||
of_node_put(np);
|
||||
if (IS_ERR(map)) {
|
||||
pr_err("PLATSMP: No syscon regmap\n");
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -605,6 +605,7 @@ config ARM64_ERRATUM_3194386
|
|||
* ARM Cortex-A78C erratum 3324346
|
||||
* ARM Cortex-A78C erratum 3324347
|
||||
* ARM Cortex-A710 erratam 3324338
|
||||
* ARM Cortex-A715 errartum 3456084
|
||||
* ARM Cortex-A720 erratum 3456091
|
||||
* ARM Cortex-A725 erratum 3456106
|
||||
* ARM Cortex-X1 erratum 3324344
|
||||
|
|
@ -615,6 +616,7 @@ config ARM64_ERRATUM_3194386
|
|||
* ARM Cortex-X925 erratum 3324334
|
||||
* ARM Neoverse-N1 erratum 3324349
|
||||
* ARM Neoverse N2 erratum 3324339
|
||||
* ARM Neoverse-N3 erratum 3456111
|
||||
* ARM Neoverse-V1 erratum 3324341
|
||||
* ARM Neoverse V2 erratum 3324336
|
||||
* ARM Neoverse-V3 erratum 3312417
|
||||
|
|
|
|||
|
|
@ -148,6 +148,22 @@
|
|||
drive-impedance-ohm = <33>;
|
||||
};
|
||||
|
||||
&gpio3 {
|
||||
/*
|
||||
* The Qseven BIOS_DISABLE signal on the RK3399-Q7 keeps the on-module
|
||||
* eMMC and SPI flash powered-down initially (in fact it keeps the
|
||||
* reset signal asserted). BIOS_DISABLE_OVERRIDE pin allows to override
|
||||
* that signal so that eMMC and SPI can be used regardless of the state
|
||||
* of the signal.
|
||||
*/
|
||||
bios-disable-override-hog {
|
||||
gpios = <RK_PD5 GPIO_ACTIVE_LOW>;
|
||||
gpio-hog;
|
||||
line-name = "bios_disable_override";
|
||||
output-high;
|
||||
};
|
||||
};
|
||||
|
||||
&gmac {
|
||||
assigned-clocks = <&cru SCLK_RMII_SRC>;
|
||||
assigned-clock-parents = <&clkin_gmac>;
|
||||
|
|
@ -432,9 +448,14 @@
|
|||
|
||||
&pinctrl {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&q7_thermal_pin>;
|
||||
pinctrl-0 = <&q7_thermal_pin &bios_disable_override_hog_pin>;
|
||||
|
||||
gpios {
|
||||
bios_disable_override_hog_pin: bios-disable-override-hog-pin {
|
||||
rockchip,pins =
|
||||
<3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
|
||||
q7_thermal_pin: q7-thermal-pin {
|
||||
rockchip,pins =
|
||||
<0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@
|
|||
#define ARM_CPU_PART_CORTEX_A78 0xD41
|
||||
#define ARM_CPU_PART_CORTEX_X1 0xD44
|
||||
#define ARM_CPU_PART_CORTEX_A710 0xD47
|
||||
#define ARM_CPU_PART_CORTEX_A715 0xD4D
|
||||
#define ARM_CPU_PART_CORTEX_X2 0xD48
|
||||
#define ARM_CPU_PART_NEOVERSE_N2 0xD49
|
||||
#define ARM_CPU_PART_CORTEX_A78C 0xD4B
|
||||
|
|
@ -88,6 +89,7 @@
|
|||
#define ARM_CPU_PART_NEOVERSE_V3 0xD84
|
||||
#define ARM_CPU_PART_CORTEX_X925 0xD85
|
||||
#define ARM_CPU_PART_CORTEX_A725 0xD87
|
||||
#define ARM_CPU_PART_NEOVERSE_N3 0xD8E
|
||||
|
||||
#define APM_CPU_PART_POTENZA 0x000
|
||||
|
||||
|
|
@ -126,6 +128,7 @@
|
|||
#define MIDR_CORTEX_A78 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A78)
|
||||
#define MIDR_CORTEX_X1 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_X1)
|
||||
#define MIDR_CORTEX_A710 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A710)
|
||||
#define MIDR_CORTEX_A715 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A715)
|
||||
#define MIDR_CORTEX_X2 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_X2)
|
||||
#define MIDR_NEOVERSE_N2 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_NEOVERSE_N2)
|
||||
#define MIDR_CORTEX_A78C MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A78C)
|
||||
|
|
@ -137,6 +140,7 @@
|
|||
#define MIDR_NEOVERSE_V3 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_NEOVERSE_V3)
|
||||
#define MIDR_CORTEX_X925 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_X925)
|
||||
#define MIDR_CORTEX_A725 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A725)
|
||||
#define MIDR_NEOVERSE_N3 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_NEOVERSE_N3)
|
||||
#define MIDR_THUNDERX MIDR_CPU_MODEL(ARM_CPU_IMP_CAVIUM, CAVIUM_CPU_PART_THUNDERX)
|
||||
#define MIDR_THUNDERX_81XX MIDR_CPU_MODEL(ARM_CPU_IMP_CAVIUM, CAVIUM_CPU_PART_THUNDERX_81XX)
|
||||
#define MIDR_THUNDERX_83XX MIDR_CPU_MODEL(ARM_CPU_IMP_CAVIUM, CAVIUM_CPU_PART_THUNDERX_83XX)
|
||||
|
|
|
|||
|
|
@ -10,21 +10,19 @@
|
|||
#include <asm/insn.h>
|
||||
#include <asm/probes.h>
|
||||
|
||||
#define MAX_UINSN_BYTES AARCH64_INSN_SIZE
|
||||
|
||||
#define UPROBE_SWBP_INSN BRK64_OPCODE_UPROBES
|
||||
#define UPROBE_SWBP_INSN cpu_to_le32(BRK64_OPCODE_UPROBES)
|
||||
#define UPROBE_SWBP_INSN_SIZE AARCH64_INSN_SIZE
|
||||
#define UPROBE_XOL_SLOT_BYTES MAX_UINSN_BYTES
|
||||
#define UPROBE_XOL_SLOT_BYTES AARCH64_INSN_SIZE
|
||||
|
||||
typedef u32 uprobe_opcode_t;
|
||||
typedef __le32 uprobe_opcode_t;
|
||||
|
||||
struct arch_uprobe_task {
|
||||
};
|
||||
|
||||
struct arch_uprobe {
|
||||
union {
|
||||
u8 insn[MAX_UINSN_BYTES];
|
||||
u8 ixol[MAX_UINSN_BYTES];
|
||||
__le32 insn;
|
||||
__le32 ixol;
|
||||
};
|
||||
struct arch_probe_insn api;
|
||||
bool simulate;
|
||||
|
|
|
|||
|
|
@ -848,6 +848,7 @@ static const struct midr_range erratum_spec_ssbs_list[] = {
|
|||
MIDR_ALL_VERSIONS(MIDR_CORTEX_A78),
|
||||
MIDR_ALL_VERSIONS(MIDR_CORTEX_A78C),
|
||||
MIDR_ALL_VERSIONS(MIDR_CORTEX_A710),
|
||||
MIDR_ALL_VERSIONS(MIDR_CORTEX_A715),
|
||||
MIDR_ALL_VERSIONS(MIDR_CORTEX_A720),
|
||||
MIDR_ALL_VERSIONS(MIDR_CORTEX_A725),
|
||||
MIDR_ALL_VERSIONS(MIDR_CORTEX_X1),
|
||||
|
|
@ -858,6 +859,7 @@ static const struct midr_range erratum_spec_ssbs_list[] = {
|
|||
MIDR_ALL_VERSIONS(MIDR_CORTEX_X925),
|
||||
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N1),
|
||||
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N2),
|
||||
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N3),
|
||||
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_V1),
|
||||
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_V2),
|
||||
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_V3),
|
||||
|
|
|
|||
|
|
@ -96,10 +96,6 @@ arm_probe_decode_insn(probe_opcode_t insn, struct arch_probe_insn *api)
|
|||
aarch64_insn_is_blr(insn) ||
|
||||
aarch64_insn_is_ret(insn)) {
|
||||
api->handler = simulate_br_blr_ret;
|
||||
} else if (aarch64_insn_is_ldr_lit(insn)) {
|
||||
api->handler = simulate_ldr_literal;
|
||||
} else if (aarch64_insn_is_ldrsw_lit(insn)) {
|
||||
api->handler = simulate_ldrsw_literal;
|
||||
} else {
|
||||
/*
|
||||
* Instruction cannot be stepped out-of-line and we don't
|
||||
|
|
@ -137,6 +133,17 @@ arm_kprobe_decode_insn(kprobe_opcode_t *addr, struct arch_specific_insn *asi)
|
|||
probe_opcode_t insn = le32_to_cpu(*addr);
|
||||
probe_opcode_t *scan_end = NULL;
|
||||
unsigned long size = 0, offset = 0;
|
||||
struct arch_probe_insn *api = &asi->api;
|
||||
|
||||
if (aarch64_insn_is_ldr_lit(insn)) {
|
||||
api->handler = simulate_ldr_literal;
|
||||
decoded = INSN_GOOD_NO_SLOT;
|
||||
} else if (aarch64_insn_is_ldrsw_lit(insn)) {
|
||||
api->handler = simulate_ldrsw_literal;
|
||||
decoded = INSN_GOOD_NO_SLOT;
|
||||
} else {
|
||||
decoded = arm_probe_decode_insn(insn, &asi->api);
|
||||
}
|
||||
|
||||
/*
|
||||
* If there's a symbol defined in front of and near enough to
|
||||
|
|
@ -154,7 +161,6 @@ arm_kprobe_decode_insn(kprobe_opcode_t *addr, struct arch_specific_insn *asi)
|
|||
else
|
||||
scan_end = addr - MAX_ATOMIC_CONTEXT_SIZE;
|
||||
}
|
||||
decoded = arm_probe_decode_insn(insn, &asi->api);
|
||||
|
||||
if (decoded != INSN_REJECTED && scan_end)
|
||||
if (is_probed_address_atomic(addr - 1, scan_end))
|
||||
|
|
|
|||
|
|
@ -170,17 +170,15 @@ simulate_tbz_tbnz(u32 opcode, long addr, struct pt_regs *regs)
|
|||
void __kprobes
|
||||
simulate_ldr_literal(u32 opcode, long addr, struct pt_regs *regs)
|
||||
{
|
||||
u64 *load_addr;
|
||||
unsigned long load_addr;
|
||||
int xn = opcode & 0x1f;
|
||||
int disp;
|
||||
|
||||
disp = ldr_displacement(opcode);
|
||||
load_addr = (u64 *) (addr + disp);
|
||||
load_addr = addr + ldr_displacement(opcode);
|
||||
|
||||
if (opcode & (1 << 30)) /* x0-x30 */
|
||||
set_x_reg(regs, xn, *load_addr);
|
||||
set_x_reg(regs, xn, READ_ONCE(*(u64 *)load_addr));
|
||||
else /* w0-w30 */
|
||||
set_w_reg(regs, xn, *load_addr);
|
||||
set_w_reg(regs, xn, READ_ONCE(*(u32 *)load_addr));
|
||||
|
||||
instruction_pointer_set(regs, instruction_pointer(regs) + 4);
|
||||
}
|
||||
|
|
@ -188,14 +186,12 @@ simulate_ldr_literal(u32 opcode, long addr, struct pt_regs *regs)
|
|||
void __kprobes
|
||||
simulate_ldrsw_literal(u32 opcode, long addr, struct pt_regs *regs)
|
||||
{
|
||||
s32 *load_addr;
|
||||
unsigned long load_addr;
|
||||
int xn = opcode & 0x1f;
|
||||
int disp;
|
||||
|
||||
disp = ldr_displacement(opcode);
|
||||
load_addr = (s32 *) (addr + disp);
|
||||
load_addr = addr + ldr_displacement(opcode);
|
||||
|
||||
set_x_reg(regs, xn, *load_addr);
|
||||
set_x_reg(regs, xn, READ_ONCE(*(s32 *)load_addr));
|
||||
|
||||
instruction_pointer_set(regs, instruction_pointer(regs) + 4);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, struct mm_struct *mm,
|
|||
else if (!IS_ALIGNED(addr, AARCH64_INSN_SIZE))
|
||||
return -EINVAL;
|
||||
|
||||
insn = *(probe_opcode_t *)(&auprobe->insn[0]);
|
||||
insn = le32_to_cpu(auprobe->insn);
|
||||
|
||||
switch (arm_probe_decode_insn(insn, &auprobe->api)) {
|
||||
case INSN_REJECTED:
|
||||
|
|
@ -108,7 +108,7 @@ bool arch_uprobe_skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs)
|
|||
if (!auprobe->simulate)
|
||||
return false;
|
||||
|
||||
insn = *(probe_opcode_t *)(&auprobe->insn[0]);
|
||||
insn = le32_to_cpu(auprobe->insn);
|
||||
addr = instruction_pointer(regs);
|
||||
|
||||
if (auprobe->api.handler)
|
||||
|
|
|
|||
|
|
@ -276,11 +276,6 @@ asmlinkage void __init mmu_init(void)
|
|||
{
|
||||
unsigned int kstart, ksize;
|
||||
|
||||
if (!memblock.reserved.cnt) {
|
||||
pr_emerg("Error memory count\n");
|
||||
machine_restart(NULL);
|
||||
}
|
||||
|
||||
if ((u32) memblock.memory.regions[0].size < 0x400000) {
|
||||
pr_emerg("Memory must be greater than 4MB\n");
|
||||
machine_restart(NULL);
|
||||
|
|
|
|||
|
|
@ -1078,8 +1078,7 @@ ENTRY_CFI(intr_save) /* for os_hpmc */
|
|||
STREG %r16, PT_ISR(%r29)
|
||||
STREG %r17, PT_IOR(%r29)
|
||||
|
||||
#if 0 && defined(CONFIG_64BIT)
|
||||
/* Revisit when we have 64-bit code above 4Gb */
|
||||
#if defined(CONFIG_64BIT)
|
||||
b,n intr_save2
|
||||
|
||||
skip_save_ior:
|
||||
|
|
@ -1087,8 +1086,7 @@ skip_save_ior:
|
|||
* need to adjust iasq/iaoq here in the same way we adjusted isr/ior
|
||||
* above.
|
||||
*/
|
||||
extrd,u,* %r8,PSW_W_BIT,1,%r1
|
||||
cmpib,COND(=),n 1,%r1,intr_save2
|
||||
bb,COND(>=),n %r8,PSW_W_BIT,intr_save2
|
||||
LDREG PT_IASQ0(%r29), %r16
|
||||
LDREG PT_IAOQ0(%r29), %r17
|
||||
/* adjust iasq/iaoq */
|
||||
|
|
|
|||
|
|
@ -217,10 +217,10 @@ linux_gateway_entry:
|
|||
|
||||
#ifdef CONFIG_64BIT
|
||||
ldil L%sys_call_table, %r1
|
||||
or,= %r2,%r2,%r2
|
||||
addil L%(sys_call_table64-sys_call_table), %r1
|
||||
or,ev %r2,%r2,%r2
|
||||
ldil L%sys_call_table64, %r1
|
||||
ldo R%sys_call_table(%r1), %r19
|
||||
or,= %r2,%r2,%r2
|
||||
or,ev %r2,%r2,%r2
|
||||
ldo R%sys_call_table64(%r1), %r19
|
||||
#else
|
||||
load32 sys_call_table, %r19
|
||||
|
|
@ -355,10 +355,10 @@ tracesys_next:
|
|||
extrd,u %r19,63,1,%r2 /* W hidden in bottom bit */
|
||||
|
||||
ldil L%sys_call_table, %r1
|
||||
or,= %r2,%r2,%r2
|
||||
addil L%(sys_call_table64-sys_call_table), %r1
|
||||
or,ev %r2,%r2,%r2
|
||||
ldil L%sys_call_table64, %r1
|
||||
ldo R%sys_call_table(%r1), %r19
|
||||
or,= %r2,%r2,%r2
|
||||
or,ev %r2,%r2,%r2
|
||||
ldo R%sys_call_table64(%r1), %r19
|
||||
#else
|
||||
load32 sys_call_table, %r19
|
||||
|
|
@ -931,6 +931,8 @@ ENTRY(sys_call_table)
|
|||
END(sys_call_table)
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
#undef __SYSCALL_WITH_COMPAT
|
||||
#define __SYSCALL_WITH_COMPAT(nr, native, compat) __SYSCALL(nr, native)
|
||||
.align 8
|
||||
ENTRY(sys_call_table64)
|
||||
#include <asm/syscall_table_64.h> /* 64-bit native syscalls */
|
||||
|
|
|
|||
|
|
@ -139,6 +139,11 @@ config GENERIC_HWEIGHT
|
|||
config FIX_EARLYCON_MEM
|
||||
def_bool y
|
||||
|
||||
config ILLEGAL_POINTER_VALUE
|
||||
hex
|
||||
default 0 if 32BIT
|
||||
default 0xdead000000000000 if 64BIT
|
||||
|
||||
config PGTABLE_LEVELS
|
||||
int
|
||||
default 3 if 64BIT
|
||||
|
|
|
|||
|
|
@ -4,8 +4,6 @@
|
|||
* Copyright (C) 2017 SiFive
|
||||
*/
|
||||
|
||||
#define GENERATING_ASM_OFFSETS
|
||||
|
||||
#include <linux/kbuild.h>
|
||||
#include <linux/sched.h>
|
||||
#include <asm/thread_info.h>
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ void perf_callchain_user(struct perf_callchain_entry_ctx *entry,
|
|||
perf_callchain_store(entry, regs->sepc);
|
||||
|
||||
fp = user_backtrace(entry, fp, regs->ra);
|
||||
while (fp && !(fp & 0x3) && entry->nr < entry->max_stack)
|
||||
while (fp && !(fp & 0x7) && entry->nr < entry->max_stack)
|
||||
fp = user_backtrace(entry, fp, 0);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,8 +53,10 @@ static inline int test_facility(unsigned long nr)
|
|||
unsigned long facilities_als[] = { FACILITIES_ALS };
|
||||
|
||||
if (__builtin_constant_p(nr) && nr < sizeof(facilities_als) * 8) {
|
||||
if (__test_facility(nr, &facilities_als))
|
||||
return 1;
|
||||
if (__test_facility(nr, &facilities_als)) {
|
||||
if (!__is_defined(__DECOMPRESSOR))
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return __test_facility(nr, &S390_lowcore.stfle_fac_list);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1412,7 +1412,7 @@ static int aux_output_begin(struct perf_output_handle *handle,
|
|||
unsigned long head, base, offset;
|
||||
struct hws_trailer_entry *te;
|
||||
|
||||
if (WARN_ON_ONCE(handle->head & ~PAGE_MASK))
|
||||
if (handle->head & ~PAGE_MASK)
|
||||
return -EINVAL;
|
||||
|
||||
aux->head = handle->head >> PAGE_SHIFT;
|
||||
|
|
@ -1580,7 +1580,7 @@ static void hw_collect_aux(struct cpu_hw_sf *cpuhw)
|
|||
unsigned long num_sdb;
|
||||
|
||||
aux = perf_get_aux(handle);
|
||||
if (WARN_ON_ONCE(!aux))
|
||||
if (!aux)
|
||||
return;
|
||||
|
||||
/* Inform user space new data arrived */
|
||||
|
|
@ -1599,7 +1599,7 @@ static void hw_collect_aux(struct cpu_hw_sf *cpuhw)
|
|||
debug_sprintf_event(sfdbg, 1, "AUX buffer used up\n");
|
||||
break;
|
||||
}
|
||||
if (WARN_ON_ONCE(!aux))
|
||||
if (!aux)
|
||||
return;
|
||||
|
||||
/* Update head and alert_mark to new position */
|
||||
|
|
@ -1836,12 +1836,8 @@ static void cpumsf_pmu_start(struct perf_event *event, int flags)
|
|||
{
|
||||
struct cpu_hw_sf *cpuhw = this_cpu_ptr(&cpu_hw_sf);
|
||||
|
||||
if (WARN_ON_ONCE(!(event->hw.state & PERF_HES_STOPPED)))
|
||||
if (!(event->hw.state & PERF_HES_STOPPED))
|
||||
return;
|
||||
|
||||
if (flags & PERF_EF_RELOAD)
|
||||
WARN_ON_ONCE(!(event->hw.state & PERF_HES_UPTODATE));
|
||||
|
||||
perf_pmu_disable(event->pmu);
|
||||
event->hw.state = 0;
|
||||
cpuhw->lsctl.cs = 1;
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ static int __diag_page_ref_service(struct kvm_vcpu *vcpu)
|
|||
vcpu->stat.diagnose_258++;
|
||||
if (vcpu->run->s.regs.gprs[rx] & 7)
|
||||
return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION);
|
||||
rc = read_guest(vcpu, vcpu->run->s.regs.gprs[rx], rx, &parm, sizeof(parm));
|
||||
rc = read_guest_real(vcpu, vcpu->run->s.regs.gprs[rx], &parm, sizeof(parm));
|
||||
if (rc)
|
||||
return kvm_s390_inject_prog_cond(vcpu, rc);
|
||||
if (parm.parm_version != 2 || parm.parm_len < 5 || parm.code != 0x258)
|
||||
|
|
|
|||
|
|
@ -794,46 +794,102 @@ static int low_address_protection_enabled(struct kvm_vcpu *vcpu,
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int guest_page_range(struct kvm_vcpu *vcpu, unsigned long ga, u8 ar,
|
||||
unsigned long *pages, unsigned long nr_pages,
|
||||
const union asce asce, enum gacc_mode mode)
|
||||
/**
|
||||
* guest_range_to_gpas() - Calculate guest physical addresses of page fragments
|
||||
* covering a logical range
|
||||
* @vcpu: virtual cpu
|
||||
* @ga: guest address, start of range
|
||||
* @ar: access register
|
||||
* @gpas: output argument, may be NULL
|
||||
* @len: length of range in bytes
|
||||
* @asce: address-space-control element to use for translation
|
||||
* @mode: access mode
|
||||
*
|
||||
* Translate a logical range to a series of guest absolute addresses,
|
||||
* such that the concatenation of page fragments starting at each gpa make up
|
||||
* the whole range.
|
||||
* The translation is performed as if done by the cpu for the given @asce, @ar,
|
||||
* @mode and state of the @vcpu.
|
||||
* If the translation causes an exception, its program interruption code is
|
||||
* returned and the &struct kvm_s390_pgm_info pgm member of @vcpu is modified
|
||||
* such that a subsequent call to kvm_s390_inject_prog_vcpu() will inject
|
||||
* a correct exception into the guest.
|
||||
* The resulting gpas are stored into @gpas, unless it is NULL.
|
||||
*
|
||||
* Note: All fragments except the first one start at the beginning of a page.
|
||||
* When deriving the boundaries of a fragment from a gpa, all but the last
|
||||
* fragment end at the end of the page.
|
||||
*
|
||||
* Return:
|
||||
* * 0 - success
|
||||
* * <0 - translation could not be performed, for example if guest
|
||||
* memory could not be accessed
|
||||
* * >0 - an access exception occurred. In this case the returned value
|
||||
* is the program interruption code and the contents of pgm may
|
||||
* be used to inject an exception into the guest.
|
||||
*/
|
||||
static int guest_range_to_gpas(struct kvm_vcpu *vcpu, unsigned long ga, u8 ar,
|
||||
unsigned long *gpas, unsigned long len,
|
||||
const union asce asce, enum gacc_mode mode)
|
||||
{
|
||||
psw_t *psw = &vcpu->arch.sie_block->gpsw;
|
||||
unsigned int offset = offset_in_page(ga);
|
||||
unsigned int fragment_len;
|
||||
int lap_enabled, rc = 0;
|
||||
enum prot_type prot;
|
||||
unsigned long gpa;
|
||||
|
||||
lap_enabled = low_address_protection_enabled(vcpu, asce);
|
||||
while (nr_pages) {
|
||||
while (min(PAGE_SIZE - offset, len) > 0) {
|
||||
fragment_len = min(PAGE_SIZE - offset, len);
|
||||
ga = kvm_s390_logical_to_effective(vcpu, ga);
|
||||
if (mode == GACC_STORE && lap_enabled && is_low_address(ga))
|
||||
return trans_exc(vcpu, PGM_PROTECTION, ga, ar, mode,
|
||||
PROT_TYPE_LA);
|
||||
ga &= PAGE_MASK;
|
||||
if (psw_bits(*psw).dat) {
|
||||
rc = guest_translate(vcpu, ga, pages, asce, mode, &prot);
|
||||
rc = guest_translate(vcpu, ga, &gpa, asce, mode, &prot);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
} else {
|
||||
*pages = kvm_s390_real_to_abs(vcpu, ga);
|
||||
if (kvm_is_error_gpa(vcpu->kvm, *pages))
|
||||
gpa = kvm_s390_real_to_abs(vcpu, ga);
|
||||
if (kvm_is_error_gpa(vcpu->kvm, gpa))
|
||||
rc = PGM_ADDRESSING;
|
||||
}
|
||||
if (rc)
|
||||
return trans_exc(vcpu, rc, ga, ar, mode, prot);
|
||||
ga += PAGE_SIZE;
|
||||
pages++;
|
||||
nr_pages--;
|
||||
if (gpas)
|
||||
*gpas++ = gpa;
|
||||
offset = 0;
|
||||
ga += fragment_len;
|
||||
len -= fragment_len;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int access_guest_page(struct kvm *kvm, enum gacc_mode mode, gpa_t gpa,
|
||||
void *data, unsigned int len)
|
||||
{
|
||||
const unsigned int offset = offset_in_page(gpa);
|
||||
const gfn_t gfn = gpa_to_gfn(gpa);
|
||||
int rc;
|
||||
|
||||
if (!gfn_to_memslot(kvm, gfn))
|
||||
return PGM_ADDRESSING;
|
||||
if (mode == GACC_STORE)
|
||||
rc = kvm_write_guest_page(kvm, gfn, data, offset, len);
|
||||
else
|
||||
rc = kvm_read_guest_page(kvm, gfn, data, offset, len);
|
||||
return rc;
|
||||
}
|
||||
|
||||
int access_guest(struct kvm_vcpu *vcpu, unsigned long ga, u8 ar, void *data,
|
||||
unsigned long len, enum gacc_mode mode)
|
||||
{
|
||||
psw_t *psw = &vcpu->arch.sie_block->gpsw;
|
||||
unsigned long _len, nr_pages, gpa, idx;
|
||||
unsigned long pages_array[2];
|
||||
unsigned long *pages;
|
||||
unsigned long nr_pages, idx;
|
||||
unsigned long gpa_array[2];
|
||||
unsigned int fragment_len;
|
||||
unsigned long *gpas;
|
||||
int need_ipte_lock;
|
||||
union asce asce;
|
||||
int rc;
|
||||
|
|
@ -845,50 +901,45 @@ int access_guest(struct kvm_vcpu *vcpu, unsigned long ga, u8 ar, void *data,
|
|||
if (rc)
|
||||
return rc;
|
||||
nr_pages = (((ga & ~PAGE_MASK) + len - 1) >> PAGE_SHIFT) + 1;
|
||||
pages = pages_array;
|
||||
if (nr_pages > ARRAY_SIZE(pages_array))
|
||||
pages = vmalloc(array_size(nr_pages, sizeof(unsigned long)));
|
||||
if (!pages)
|
||||
gpas = gpa_array;
|
||||
if (nr_pages > ARRAY_SIZE(gpa_array))
|
||||
gpas = vmalloc(array_size(nr_pages, sizeof(unsigned long)));
|
||||
if (!gpas)
|
||||
return -ENOMEM;
|
||||
need_ipte_lock = psw_bits(*psw).dat && !asce.r;
|
||||
if (need_ipte_lock)
|
||||
ipte_lock(vcpu);
|
||||
rc = guest_page_range(vcpu, ga, ar, pages, nr_pages, asce, mode);
|
||||
rc = guest_range_to_gpas(vcpu, ga, ar, gpas, len, asce, mode);
|
||||
for (idx = 0; idx < nr_pages && !rc; idx++) {
|
||||
gpa = *(pages + idx) + (ga & ~PAGE_MASK);
|
||||
_len = min(PAGE_SIZE - (gpa & ~PAGE_MASK), len);
|
||||
if (mode == GACC_STORE)
|
||||
rc = kvm_write_guest(vcpu->kvm, gpa, data, _len);
|
||||
else
|
||||
rc = kvm_read_guest(vcpu->kvm, gpa, data, _len);
|
||||
len -= _len;
|
||||
ga += _len;
|
||||
data += _len;
|
||||
fragment_len = min(PAGE_SIZE - offset_in_page(gpas[idx]), len);
|
||||
rc = access_guest_page(vcpu->kvm, mode, gpas[idx], data, fragment_len);
|
||||
len -= fragment_len;
|
||||
data += fragment_len;
|
||||
}
|
||||
if (need_ipte_lock)
|
||||
ipte_unlock(vcpu);
|
||||
if (nr_pages > ARRAY_SIZE(pages_array))
|
||||
vfree(pages);
|
||||
if (nr_pages > ARRAY_SIZE(gpa_array))
|
||||
vfree(gpas);
|
||||
return rc;
|
||||
}
|
||||
|
||||
int access_guest_real(struct kvm_vcpu *vcpu, unsigned long gra,
|
||||
void *data, unsigned long len, enum gacc_mode mode)
|
||||
{
|
||||
unsigned long _len, gpa;
|
||||
unsigned int fragment_len;
|
||||
unsigned long gpa;
|
||||
int rc = 0;
|
||||
|
||||
while (len && !rc) {
|
||||
gpa = kvm_s390_real_to_abs(vcpu, gra);
|
||||
_len = min(PAGE_SIZE - (gpa & ~PAGE_MASK), len);
|
||||
if (mode)
|
||||
rc = write_guest_abs(vcpu, gpa, data, _len);
|
||||
else
|
||||
rc = read_guest_abs(vcpu, gpa, data, _len);
|
||||
len -= _len;
|
||||
gra += _len;
|
||||
data += _len;
|
||||
fragment_len = min(PAGE_SIZE - offset_in_page(gpa), len);
|
||||
rc = access_guest_page(vcpu->kvm, mode, gpa, data, fragment_len);
|
||||
len -= fragment_len;
|
||||
gra += fragment_len;
|
||||
data += fragment_len;
|
||||
}
|
||||
if (rc > 0)
|
||||
vcpu->arch.pgm.code = rc;
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
@ -904,8 +955,6 @@ int access_guest_real(struct kvm_vcpu *vcpu, unsigned long gra,
|
|||
int guest_translate_address(struct kvm_vcpu *vcpu, unsigned long gva, u8 ar,
|
||||
unsigned long *gpa, enum gacc_mode mode)
|
||||
{
|
||||
psw_t *psw = &vcpu->arch.sie_block->gpsw;
|
||||
enum prot_type prot;
|
||||
union asce asce;
|
||||
int rc;
|
||||
|
||||
|
|
@ -913,23 +962,7 @@ int guest_translate_address(struct kvm_vcpu *vcpu, unsigned long gva, u8 ar,
|
|||
rc = get_vcpu_asce(vcpu, &asce, gva, ar, mode);
|
||||
if (rc)
|
||||
return rc;
|
||||
if (is_low_address(gva) && low_address_protection_enabled(vcpu, asce)) {
|
||||
if (mode == GACC_STORE)
|
||||
return trans_exc(vcpu, PGM_PROTECTION, gva, 0,
|
||||
mode, PROT_TYPE_LA);
|
||||
}
|
||||
|
||||
if (psw_bits(*psw).dat && !asce.r) { /* Use DAT? */
|
||||
rc = guest_translate(vcpu, gva, gpa, asce, mode, &prot);
|
||||
if (rc > 0)
|
||||
return trans_exc(vcpu, rc, gva, 0, mode, prot);
|
||||
} else {
|
||||
*gpa = kvm_s390_real_to_abs(vcpu, gva);
|
||||
if (kvm_is_error_gpa(vcpu->kvm, *gpa))
|
||||
return trans_exc(vcpu, rc, gva, PGM_ADDRESSING, mode, 0);
|
||||
}
|
||||
|
||||
return rc;
|
||||
return guest_range_to_gpas(vcpu, gva, ar, gpa, 1, asce, mode);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -938,17 +971,14 @@ int guest_translate_address(struct kvm_vcpu *vcpu, unsigned long gva, u8 ar,
|
|||
int check_gva_range(struct kvm_vcpu *vcpu, unsigned long gva, u8 ar,
|
||||
unsigned long length, enum gacc_mode mode)
|
||||
{
|
||||
unsigned long gpa;
|
||||
unsigned long currlen;
|
||||
union asce asce;
|
||||
int rc = 0;
|
||||
|
||||
rc = get_vcpu_asce(vcpu, &asce, gva, ar, mode);
|
||||
if (rc)
|
||||
return rc;
|
||||
ipte_lock(vcpu);
|
||||
while (length > 0 && !rc) {
|
||||
currlen = min(length, PAGE_SIZE - (gva % PAGE_SIZE));
|
||||
rc = guest_translate_address(vcpu, gva, ar, &gpa, mode);
|
||||
gva += currlen;
|
||||
length -= currlen;
|
||||
}
|
||||
rc = guest_range_to_gpas(vcpu, gva, ar, NULL, length, asce, mode);
|
||||
ipte_unlock(vcpu);
|
||||
|
||||
return rc;
|
||||
|
|
|
|||
|
|
@ -344,11 +344,12 @@ int read_guest_abs(struct kvm_vcpu *vcpu, unsigned long gpa, void *data,
|
|||
* @len: number of bytes to copy
|
||||
*
|
||||
* Copy @len bytes from @data (kernel space) to @gra (guest real address).
|
||||
* It is up to the caller to ensure that the entire guest memory range is
|
||||
* valid memory before calling this function.
|
||||
* Guest low address and key protection are not checked.
|
||||
*
|
||||
* Returns zero on success or -EFAULT on error.
|
||||
* Returns zero on success, -EFAULT when copying from @data failed, or
|
||||
* PGM_ADRESSING in case @gra is outside a memslot. In this case, pgm check info
|
||||
* is also stored to allow injecting into the guest (if applicable) using
|
||||
* kvm_s390_inject_prog_cond().
|
||||
*
|
||||
* If an error occurs data may have been copied partially to guest memory.
|
||||
*/
|
||||
|
|
@ -367,11 +368,12 @@ int write_guest_real(struct kvm_vcpu *vcpu, unsigned long gra, void *data,
|
|||
* @len: number of bytes to copy
|
||||
*
|
||||
* Copy @len bytes from @gra (guest real address) to @data (kernel space).
|
||||
* It is up to the caller to ensure that the entire guest memory range is
|
||||
* valid memory before calling this function.
|
||||
* Guest key protection is not checked.
|
||||
*
|
||||
* Returns zero on success or -EFAULT on error.
|
||||
* Returns zero on success, -EFAULT when copying to @data failed, or
|
||||
* PGM_ADRESSING in case @gra is outside a memslot. In this case, pgm check info
|
||||
* is also stored to allow injecting into the guest (if applicable) using
|
||||
* kvm_s390_inject_prog_cond().
|
||||
*
|
||||
* If an error occurs data may have been copied partially to kernel space.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -98,11 +98,12 @@ static long cmm_alloc_pages(long nr, long *counter,
|
|||
(*counter)++;
|
||||
spin_unlock(&cmm_lock);
|
||||
nr--;
|
||||
cond_resched();
|
||||
}
|
||||
return nr;
|
||||
}
|
||||
|
||||
static long cmm_free_pages(long nr, long *counter, struct cmm_page_array **list)
|
||||
static long __cmm_free_pages(long nr, long *counter, struct cmm_page_array **list)
|
||||
{
|
||||
struct cmm_page_array *pa;
|
||||
unsigned long addr;
|
||||
|
|
@ -126,6 +127,21 @@ static long cmm_free_pages(long nr, long *counter, struct cmm_page_array **list)
|
|||
return nr;
|
||||
}
|
||||
|
||||
static long cmm_free_pages(long nr, long *counter, struct cmm_page_array **list)
|
||||
{
|
||||
long inc = 0;
|
||||
|
||||
while (nr) {
|
||||
inc = min(256L, nr);
|
||||
nr -= inc;
|
||||
inc = __cmm_free_pages(inc, counter, list);
|
||||
if (inc)
|
||||
break;
|
||||
cond_resched();
|
||||
}
|
||||
return nr + inc;
|
||||
}
|
||||
|
||||
static int cmm_oom_notify(struct notifier_block *self,
|
||||
unsigned long dummy, void *parm)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@
|
|||
#define X86_FEATURE_SPEC_STORE_BYPASS_DISABLE ( 7*32+23) /* "" Disable Speculative Store Bypass. */
|
||||
#define X86_FEATURE_LS_CFG_SSBD ( 7*32+24) /* "" AMD SSBD implementation via LS_CFG MSR */
|
||||
#define X86_FEATURE_IBRS ( 7*32+25) /* Indirect Branch Restricted Speculation */
|
||||
#define X86_FEATURE_IBPB ( 7*32+26) /* Indirect Branch Prediction Barrier */
|
||||
#define X86_FEATURE_IBPB ( 7*32+26) /* "ibpb" Indirect Branch Prediction Barrier without a guaranteed RSB flush */
|
||||
#define X86_FEATURE_STIBP ( 7*32+27) /* Single Thread Indirect Branch Predictors */
|
||||
#define X86_FEATURE_ZEN ( 7*32+28) /* "" CPU is AMD family 0x17 (Zen) */
|
||||
#define X86_FEATURE_L1TF_PTEINV ( 7*32+29) /* "" L1TF workaround PTE inversion */
|
||||
|
|
@ -308,6 +308,7 @@
|
|||
#define X86_FEATURE_VIRT_SSBD (13*32+25) /* Virtualized Speculative Store Bypass Disable */
|
||||
#define X86_FEATURE_AMD_SSB_NO (13*32+26) /* "" Speculative Store Bypass is fixed in hardware. */
|
||||
#define X86_FEATURE_BTC_NO (13*32+29) /* "" Not vulnerable to Branch Type Confusion */
|
||||
#define X86_FEATURE_AMD_IBPB_RET (13*32+30) /* "" IBPB clears return address predictor */
|
||||
|
||||
/* Thermal and Power Management Leaf, CPUID level 0x00000006 (EAX), word 14 */
|
||||
#define X86_FEATURE_DTHERM (14*32+ 0) /* Digital Thermal Sensor */
|
||||
|
|
|
|||
|
|
@ -94,7 +94,12 @@ static inline void syscall_get_arguments(struct task_struct *task,
|
|||
struct pt_regs *regs,
|
||||
unsigned long *args)
|
||||
{
|
||||
memcpy(args, ®s->bx, 6 * sizeof(args[0]));
|
||||
args[0] = regs->bx;
|
||||
args[1] = regs->cx;
|
||||
args[2] = regs->dx;
|
||||
args[3] = regs->si;
|
||||
args[4] = regs->di;
|
||||
args[5] = regs->bp;
|
||||
}
|
||||
|
||||
static inline void syscall_set_arguments(struct task_struct *task,
|
||||
|
|
|
|||
|
|
@ -491,7 +491,19 @@ static int lapic_timer_shutdown(struct clock_event_device *evt)
|
|||
v = apic_read(APIC_LVTT);
|
||||
v |= (APIC_LVT_MASKED | LOCAL_TIMER_VECTOR);
|
||||
apic_write(APIC_LVTT, v);
|
||||
apic_write(APIC_TMICT, 0);
|
||||
|
||||
/*
|
||||
* Setting APIC_LVT_MASKED (above) should be enough to tell
|
||||
* the hardware that this timer will never fire. But AMD
|
||||
* erratum 411 and some Intel CPU behavior circa 2024 say
|
||||
* otherwise. Time for belt and suspenders programming: mask
|
||||
* the timer _and_ zero the counter registers:
|
||||
*/
|
||||
if (v & APIC_LVT_TIMER_TSCDEADLINE)
|
||||
wrmsrl(MSR_IA32_TSC_DEADLINE, 0);
|
||||
else
|
||||
apic_write(APIC_TMICT, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -256,6 +256,7 @@ static void __init ms_hyperv_init_platform(void)
|
|||
ms_hyperv.misc_features & HV_FEATURE_FREQUENCY_MSRS_AVAILABLE) {
|
||||
x86_platform.calibrate_tsc = hv_get_tsc_khz;
|
||||
x86_platform.calibrate_cpu = hv_get_tsc_khz;
|
||||
setup_force_cpu_cap(X86_FEATURE_TSC_KNOWN_FREQ);
|
||||
}
|
||||
|
||||
if (ms_hyperv.hints & HV_X64_ENLIGHTENED_VMCS_RECOMMENDED) {
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@ static inline bool rdt_get_mb_table(struct rdt_resource *r)
|
|||
return false;
|
||||
}
|
||||
|
||||
static bool __get_mem_config_intel(struct rdt_resource *r)
|
||||
static __init bool __get_mem_config_intel(struct rdt_resource *r)
|
||||
{
|
||||
union cpuid_0x10_3_eax eax;
|
||||
union cpuid_0x10_x_edx edx;
|
||||
|
|
@ -277,7 +277,7 @@ static bool __get_mem_config_intel(struct rdt_resource *r)
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool __rdt_get_mem_config_amd(struct rdt_resource *r)
|
||||
static __init bool __rdt_get_mem_config_amd(struct rdt_resource *r)
|
||||
{
|
||||
union cpuid_0x10_3_eax eax;
|
||||
union cpuid_0x10_x_edx edx;
|
||||
|
|
|
|||
|
|
@ -875,7 +875,7 @@ char * __init xen_memory_setup(void)
|
|||
* to relocating (and even reusing) pages with kernel text or data.
|
||||
*/
|
||||
if (xen_is_e820_reserved(__pa_symbol(_text),
|
||||
__pa_symbol(__bss_stop) - __pa_symbol(_text))) {
|
||||
__pa_symbol(_end) - __pa_symbol(_text))) {
|
||||
xen_raw_console_write("Xen hypervisor allocated kernel memory conflicts with E820 map\n");
|
||||
BUG();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2610,8 +2610,12 @@ bfq_setup_cooperator(struct bfq_data *bfqd, struct bfq_queue *bfqq,
|
|||
struct bfq_queue *in_service_bfqq, *new_bfqq;
|
||||
|
||||
/* if a merge has already been setup, then proceed with that first */
|
||||
if (bfqq->new_bfqq)
|
||||
return bfqq->new_bfqq;
|
||||
new_bfqq = bfqq->new_bfqq;
|
||||
if (new_bfqq) {
|
||||
while (new_bfqq->new_bfqq)
|
||||
new_bfqq = new_bfqq->new_bfqq;
|
||||
return new_bfqq;
|
||||
}
|
||||
|
||||
/*
|
||||
* Do not perform queue merging if the device is non
|
||||
|
|
@ -5990,7 +5994,7 @@ bfq_split_bfqq(struct bfq_io_cq *bic, struct bfq_queue *bfqq)
|
|||
{
|
||||
bfq_log_bfqq(bfqq->bfqd, bfqq, "splitting queue");
|
||||
|
||||
if (bfqq_process_refs(bfqq) == 1) {
|
||||
if (bfqq_process_refs(bfqq) == 1 && !bfqq->new_bfqq) {
|
||||
bfqq->pid = current->pid;
|
||||
bfq_clear_bfqq_coop(bfqq);
|
||||
bfq_clear_bfqq_split_coop(bfqq);
|
||||
|
|
@ -6175,7 +6179,8 @@ static struct bfq_queue *bfq_init_rq(struct request *rq)
|
|||
* addition, if the queue has also just been split, we have to
|
||||
* resume its state.
|
||||
*/
|
||||
if (likely(bfqq != &bfqd->oom_bfqq) && bfqq_process_refs(bfqq) == 1) {
|
||||
if (likely(bfqq != &bfqd->oom_bfqq) && !bfqq->new_bfqq &&
|
||||
bfqq_process_refs(bfqq) == 1) {
|
||||
bfqq->bic = bic;
|
||||
if (split) {
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -225,8 +225,8 @@ static int rq_qos_wake_function(struct wait_queue_entry *curr,
|
|||
|
||||
data->got_token = true;
|
||||
smp_wmb();
|
||||
list_del_init(&curr->entry);
|
||||
wake_up_process(data->task);
|
||||
list_del_init_careful(&curr->entry);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,8 +40,7 @@ static int setkey_unaligned(struct crypto_aead *tfm, const u8 *key,
|
|||
alignbuffer = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1);
|
||||
memcpy(alignbuffer, key, keylen);
|
||||
ret = crypto_aead_alg(tfm)->setkey(tfm, alignbuffer, keylen);
|
||||
memset(alignbuffer, 0, keylen);
|
||||
kfree(buffer);
|
||||
kzfree(buffer);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,8 +33,7 @@ static int setkey_unaligned(struct crypto_tfm *tfm, const u8 *key,
|
|||
alignbuffer = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1);
|
||||
memcpy(alignbuffer, key, keylen);
|
||||
ret = cia->cia_setkey(tfm, alignbuffer, keylen);
|
||||
memset(alignbuffer, 0, keylen);
|
||||
kfree(buffer);
|
||||
kzfree(buffer);
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -170,6 +170,8 @@ acpi_status acpi_db_convert_to_package(char *string, union acpi_object *object)
|
|||
elements =
|
||||
ACPI_ALLOCATE_ZEROED(DB_DEFAULT_PKG_ELEMENTS *
|
||||
sizeof(union acpi_object));
|
||||
if (!elements)
|
||||
return (AE_NO_MEMORY);
|
||||
|
||||
this = string;
|
||||
for (i = 0; i < (DB_DEFAULT_PKG_ELEMENTS - 1); i++) {
|
||||
|
|
|
|||
|
|
@ -437,6 +437,9 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info)
|
|||
|
||||
if (info->connection_node) {
|
||||
second_desc = info->connection_node->object;
|
||||
if (second_desc == NULL) {
|
||||
break;
|
||||
}
|
||||
if (!(second_desc->common.flags & AOPOBJ_DATA_VALID)) {
|
||||
status =
|
||||
acpi_ds_get_buffer_arguments(second_desc);
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@ acpi_ps_get_next_package_length(struct acpi_parse_state *parser_state);
|
|||
static union acpi_parse_object *acpi_ps_get_next_field(struct acpi_parse_state
|
||||
*parser_state);
|
||||
|
||||
static void acpi_ps_free_field_list(union acpi_parse_object *start);
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: acpi_ps_get_next_package_length
|
||||
|
|
@ -683,6 +685,39 @@ static union acpi_parse_object *acpi_ps_get_next_field(struct acpi_parse_state
|
|||
return_PTR(field);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: acpi_ps_free_field_list
|
||||
*
|
||||
* PARAMETERS: start - First Op in field list
|
||||
*
|
||||
* RETURN: None.
|
||||
*
|
||||
* DESCRIPTION: Free all Op objects inside a field list.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
static void acpi_ps_free_field_list(union acpi_parse_object *start)
|
||||
{
|
||||
union acpi_parse_object *cur = start;
|
||||
union acpi_parse_object *next;
|
||||
union acpi_parse_object *arg;
|
||||
|
||||
while (cur) {
|
||||
next = cur->common.next;
|
||||
|
||||
/* AML_INT_CONNECTION_OP can have a single argument */
|
||||
|
||||
arg = acpi_ps_get_arg(cur, 0);
|
||||
if (arg) {
|
||||
acpi_ps_free_op(arg);
|
||||
}
|
||||
|
||||
acpi_ps_free_op(cur);
|
||||
cur = next;
|
||||
}
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: acpi_ps_get_next_arg
|
||||
|
|
@ -751,6 +786,10 @@ acpi_ps_get_next_arg(struct acpi_walk_state *walk_state,
|
|||
while (parser_state->aml < parser_state->pkg_end) {
|
||||
field = acpi_ps_get_next_field(parser_state);
|
||||
if (!field) {
|
||||
if (arg) {
|
||||
acpi_ps_free_field_list(arg);
|
||||
}
|
||||
|
||||
return_ACPI_STATUS(AE_NO_MEMORY);
|
||||
}
|
||||
|
||||
|
|
@ -820,6 +859,10 @@ acpi_ps_get_next_arg(struct acpi_walk_state *walk_state,
|
|||
acpi_ps_get_next_namepath(walk_state, parser_state,
|
||||
arg,
|
||||
ACPI_NOT_METHOD_CALL);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
acpi_ps_free_op(arg);
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
} else {
|
||||
/* Single complex argument, nothing returned */
|
||||
|
||||
|
|
@ -854,6 +897,10 @@ acpi_ps_get_next_arg(struct acpi_walk_state *walk_state,
|
|||
acpi_ps_get_next_namepath(walk_state, parser_state,
|
||||
arg,
|
||||
ACPI_POSSIBLE_METHOD_CALL);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
acpi_ps_free_op(arg);
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
|
||||
if (arg->common.aml_opcode == AML_INT_METHODCALL_OP) {
|
||||
|
||||
|
|
|
|||
|
|
@ -706,27 +706,34 @@ static LIST_HEAD(acpi_battery_list);
|
|||
static LIST_HEAD(battery_hook_list);
|
||||
static DEFINE_MUTEX(hook_mutex);
|
||||
|
||||
static void __battery_hook_unregister(struct acpi_battery_hook *hook, int lock)
|
||||
static void battery_hook_unregister_unlocked(struct acpi_battery_hook *hook)
|
||||
{
|
||||
struct acpi_battery *battery;
|
||||
|
||||
/*
|
||||
* In order to remove a hook, we first need to
|
||||
* de-register all the batteries that are registered.
|
||||
*/
|
||||
if (lock)
|
||||
mutex_lock(&hook_mutex);
|
||||
list_for_each_entry(battery, &acpi_battery_list, list) {
|
||||
hook->remove_battery(battery->bat);
|
||||
}
|
||||
list_del(&hook->list);
|
||||
if (lock)
|
||||
mutex_unlock(&hook_mutex);
|
||||
list_del_init(&hook->list);
|
||||
|
||||
pr_info("extension unregistered: %s\n", hook->name);
|
||||
}
|
||||
|
||||
void battery_hook_unregister(struct acpi_battery_hook *hook)
|
||||
{
|
||||
__battery_hook_unregister(hook, 1);
|
||||
mutex_lock(&hook_mutex);
|
||||
/*
|
||||
* Ignore already unregistered battery hooks. This might happen
|
||||
* if a battery hook was previously unloaded due to an error when
|
||||
* adding a new battery.
|
||||
*/
|
||||
if (!list_empty(&hook->list))
|
||||
battery_hook_unregister_unlocked(hook);
|
||||
|
||||
mutex_unlock(&hook_mutex);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(battery_hook_unregister);
|
||||
|
||||
|
|
@ -735,7 +742,6 @@ void battery_hook_register(struct acpi_battery_hook *hook)
|
|||
struct acpi_battery *battery;
|
||||
|
||||
mutex_lock(&hook_mutex);
|
||||
INIT_LIST_HEAD(&hook->list);
|
||||
list_add(&hook->list, &battery_hook_list);
|
||||
/*
|
||||
* Now that the driver is registered, we need
|
||||
|
|
@ -752,7 +758,7 @@ void battery_hook_register(struct acpi_battery_hook *hook)
|
|||
* hooks.
|
||||
*/
|
||||
pr_err("extension failed to load: %s", hook->name);
|
||||
__battery_hook_unregister(hook, 0);
|
||||
battery_hook_unregister_unlocked(hook);
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
|
@ -789,7 +795,7 @@ static void battery_hook_add_battery(struct acpi_battery *battery)
|
|||
*/
|
||||
pr_err("error in extension, unloading: %s",
|
||||
hook_node->name);
|
||||
__battery_hook_unregister(hook_node, 0);
|
||||
battery_hook_unregister_unlocked(hook_node);
|
||||
}
|
||||
}
|
||||
mutex_unlock(&hook_mutex);
|
||||
|
|
@ -822,7 +828,7 @@ static void __exit battery_hook_exit(void)
|
|||
* need to remove the hooks.
|
||||
*/
|
||||
list_for_each_entry_safe(hook, ptr, &battery_hook_list, list) {
|
||||
__battery_hook_unregister(hook, 1);
|
||||
battery_hook_unregister(hook);
|
||||
}
|
||||
mutex_destroy(&hook_mutex);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,6 +111,17 @@ static const struct dmi_system_id lid_blacklst[] = {
|
|||
},
|
||||
.driver_data = (void *)(long)ACPI_BUTTON_LID_INIT_OPEN,
|
||||
},
|
||||
{
|
||||
/*
|
||||
* Samsung galaxybook2 ,initial _LID device notification returns
|
||||
* lid closed.
|
||||
*/
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "750XED"),
|
||||
},
|
||||
.driver_data = (void *)(long)ACPI_BUTTON_LID_INIT_OPEN,
|
||||
},
|
||||
{}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -533,8 +533,9 @@ int acpi_device_setup_files(struct acpi_device *dev)
|
|||
* If device has _STR, 'description' file is created
|
||||
*/
|
||||
if (acpi_has_method(dev->handle, "_STR")) {
|
||||
status = acpi_evaluate_object(dev->handle, "_STR",
|
||||
NULL, &buffer);
|
||||
status = acpi_evaluate_object_typed(dev->handle, "_STR",
|
||||
NULL, &buffer,
|
||||
ACPI_TYPE_BUFFER);
|
||||
if (ACPI_FAILURE(status))
|
||||
buffer.pointer = NULL;
|
||||
dev->pnp.str_obj = buffer.pointer;
|
||||
|
|
|
|||
|
|
@ -790,6 +790,9 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec,
|
|||
unsigned long tmp;
|
||||
int ret = 0;
|
||||
|
||||
if (t->rdata)
|
||||
memset(t->rdata, 0, t->rlen);
|
||||
|
||||
/* start transaction */
|
||||
spin_lock_irqsave(&ec->lock, tmp);
|
||||
/* Enable GPE for command processing (IBF=0/OBF=1) */
|
||||
|
|
@ -826,8 +829,6 @@ static int acpi_ec_transaction(struct acpi_ec *ec, struct transaction *t)
|
|||
|
||||
if (!ec || (!t) || (t->wlen && !t->wdata) || (t->rlen && !t->rdata))
|
||||
return -EINVAL;
|
||||
if (t->rdata)
|
||||
memset(t->rdata, 0, t->rlen);
|
||||
|
||||
mutex_lock(&ec->mutex);
|
||||
if (ec->global_lock) {
|
||||
|
|
@ -854,7 +855,7 @@ static int acpi_ec_burst_enable(struct acpi_ec *ec)
|
|||
.wdata = NULL, .rdata = &d,
|
||||
.wlen = 0, .rlen = 1};
|
||||
|
||||
return acpi_ec_transaction(ec, &t);
|
||||
return acpi_ec_transaction_unlocked(ec, &t);
|
||||
}
|
||||
|
||||
static int acpi_ec_burst_disable(struct acpi_ec *ec)
|
||||
|
|
@ -864,7 +865,7 @@ static int acpi_ec_burst_disable(struct acpi_ec *ec)
|
|||
.wlen = 0, .rlen = 0};
|
||||
|
||||
return (acpi_ec_read_status(ec) & ACPI_EC_FLAG_BURST) ?
|
||||
acpi_ec_transaction(ec, &t) : 0;
|
||||
acpi_ec_transaction_unlocked(ec, &t) : 0;
|
||||
}
|
||||
|
||||
static int acpi_ec_read(struct acpi_ec *ec, u8 address, u8 *data)
|
||||
|
|
@ -880,6 +881,19 @@ static int acpi_ec_read(struct acpi_ec *ec, u8 address, u8 *data)
|
|||
return result;
|
||||
}
|
||||
|
||||
static int acpi_ec_read_unlocked(struct acpi_ec *ec, u8 address, u8 *data)
|
||||
{
|
||||
int result;
|
||||
u8 d;
|
||||
struct transaction t = {.command = ACPI_EC_COMMAND_READ,
|
||||
.wdata = &address, .rdata = &d,
|
||||
.wlen = 1, .rlen = 1};
|
||||
|
||||
result = acpi_ec_transaction_unlocked(ec, &t);
|
||||
*data = d;
|
||||
return result;
|
||||
}
|
||||
|
||||
static int acpi_ec_write(struct acpi_ec *ec, u8 address, u8 data)
|
||||
{
|
||||
u8 wdata[2] = { address, data };
|
||||
|
|
@ -890,6 +904,16 @@ static int acpi_ec_write(struct acpi_ec *ec, u8 address, u8 data)
|
|||
return acpi_ec_transaction(ec, &t);
|
||||
}
|
||||
|
||||
static int acpi_ec_write_unlocked(struct acpi_ec *ec, u8 address, u8 data)
|
||||
{
|
||||
u8 wdata[2] = { address, data };
|
||||
struct transaction t = {.command = ACPI_EC_COMMAND_WRITE,
|
||||
.wdata = wdata, .rdata = NULL,
|
||||
.wlen = 2, .rlen = 0};
|
||||
|
||||
return acpi_ec_transaction_unlocked(ec, &t);
|
||||
}
|
||||
|
||||
int ec_read(u8 addr, u8 *val)
|
||||
{
|
||||
int err;
|
||||
|
|
@ -1300,6 +1324,7 @@ acpi_ec_space_handler(u32 function, acpi_physical_address address,
|
|||
struct acpi_ec *ec = handler_context;
|
||||
int result = 0, i, bytes = bits / 8;
|
||||
u8 *value = (u8 *)value64;
|
||||
u32 glk;
|
||||
|
||||
if ((address > 0xFF) || !value || !handler_context)
|
||||
return AE_BAD_PARAMETER;
|
||||
|
|
@ -1307,13 +1332,25 @@ acpi_ec_space_handler(u32 function, acpi_physical_address address,
|
|||
if (function != ACPI_READ && function != ACPI_WRITE)
|
||||
return AE_BAD_PARAMETER;
|
||||
|
||||
mutex_lock(&ec->mutex);
|
||||
|
||||
if (ec->global_lock) {
|
||||
acpi_status status;
|
||||
|
||||
status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
result = -ENODEV;
|
||||
goto unlock;
|
||||
}
|
||||
}
|
||||
|
||||
if (ec->busy_polling || bits > 8)
|
||||
acpi_ec_burst_enable(ec);
|
||||
|
||||
for (i = 0; i < bytes; ++i, ++address, ++value) {
|
||||
result = (function == ACPI_READ) ?
|
||||
acpi_ec_read(ec, address, value) :
|
||||
acpi_ec_write(ec, address, *value);
|
||||
acpi_ec_read_unlocked(ec, address, value) :
|
||||
acpi_ec_write_unlocked(ec, address, *value);
|
||||
if (result < 0)
|
||||
break;
|
||||
}
|
||||
|
|
@ -1321,6 +1358,12 @@ acpi_ec_space_handler(u32 function, acpi_physical_address address,
|
|||
if (ec->busy_polling || bits > 8)
|
||||
acpi_ec_burst_disable(ec);
|
||||
|
||||
if (ec->global_lock)
|
||||
acpi_release_global_lock(glk);
|
||||
|
||||
unlock:
|
||||
mutex_unlock(&ec->mutex);
|
||||
|
||||
switch (result) {
|
||||
case -EINVAL:
|
||||
return AE_BAD_PARAMETER;
|
||||
|
|
|
|||
|
|
@ -376,10 +376,8 @@ static int tps68470_pmic_opregion_probe(struct platform_device *pdev)
|
|||
struct tps68470_pmic_opregion *opregion;
|
||||
acpi_status status;
|
||||
|
||||
if (!dev || !tps68470_regmap) {
|
||||
dev_warn(dev, "dev or regmap is NULL\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
if (!tps68470_regmap)
|
||||
return dev_err_probe(dev, -EINVAL, "regmap is missing\n");
|
||||
|
||||
if (!handle) {
|
||||
dev_warn(dev, "acpi handle is NULL\n");
|
||||
|
|
|
|||
|
|
@ -442,6 +442,13 @@ static const struct dmi_system_id asus_laptop[] = {
|
|||
DMI_MATCH(DMI_BOARD_NAME, "B2402CBA"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* Asus Vivobook X1704VAP */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "X1704VAP"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* TongFang GMxXGxx/TUXEDO Polaris 15 Gen5 AMD */
|
||||
.matches = {
|
||||
|
|
@ -455,6 +462,12 @@ static const struct dmi_system_id asus_laptop[] = {
|
|||
DMI_MATCH(DMI_BOARD_NAME, "B1402CVA"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* TongFang GMxXGxX/TUXEDO Polaris 15 Gen5 AMD */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "GMxXGxX"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* TongFang GMxXGxx sold as Eluktronics Inc. RP-15 */
|
||||
.matches = {
|
||||
|
|
@ -481,12 +494,26 @@ static const struct dmi_system_id asus_laptop[] = {
|
|||
DMI_MATCH(DMI_BOARD_NAME, "GXxHRXx"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* Asus ExpertBook B2502CVA */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "B2502CVA"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* TongFang GMxHGxx/TUXEDO Stellaris Slim Gen1 AMD */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "GMxHGxx"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* LG Electronics 16T90SP */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "LG Electronics"),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "16T90SP"),
|
||||
},
|
||||
},
|
||||
{ }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ static const struct pci_device_id sil_pci_tbl[] = {
|
|||
static const struct sil_drivelist {
|
||||
const char *product;
|
||||
unsigned int quirk;
|
||||
} sil_blacklist [] = {
|
||||
} sil_quirks[] = {
|
||||
{ "ST320012AS", SIL_QUIRK_MOD15WRITE },
|
||||
{ "ST330013AS", SIL_QUIRK_MOD15WRITE },
|
||||
{ "ST340017AS", SIL_QUIRK_MOD15WRITE },
|
||||
|
|
@ -601,8 +601,8 @@ static void sil_thaw(struct ata_port *ap)
|
|||
* list, and apply the fixups to only the specific
|
||||
* devices/hosts/firmwares that need it.
|
||||
*
|
||||
* 20040111 - Seagate drives affected by the Mod15Write bug are blacklisted
|
||||
* The Maxtor quirk is in the blacklist, but I'm keeping the original
|
||||
* 20040111 - Seagate drives affected by the Mod15Write bug are quirked
|
||||
* The Maxtor quirk is in sil_quirks, but I'm keeping the original
|
||||
* pessimistic fix for the following reasons...
|
||||
* - There seems to be less info on it, only one device gleaned off the
|
||||
* Windows driver, maybe only one is affected. More info would be greatly
|
||||
|
|
@ -621,9 +621,9 @@ static void sil_dev_config(struct ata_device *dev)
|
|||
|
||||
ata_id_c_string(dev->id, model_num, ATA_ID_PROD, sizeof(model_num));
|
||||
|
||||
for (n = 0; sil_blacklist[n].product; n++)
|
||||
if (!strcmp(sil_blacklist[n].product, model_num)) {
|
||||
quirks = sil_blacklist[n].quirk;
|
||||
for (n = 0; sil_quirks[n].product; n++)
|
||||
if (!strcmp(sil_quirks[n].product, model_num)) {
|
||||
quirks = sil_quirks[n].quirk;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -103,7 +103,8 @@ static ssize_t bus_attr_show(struct kobject *kobj, struct attribute *attr,
|
|||
{
|
||||
struct bus_attribute *bus_attr = to_bus_attr(attr);
|
||||
struct subsys_private *subsys_priv = to_subsys_private(kobj);
|
||||
ssize_t ret = 0;
|
||||
/* return -EIO for reading a bus attribute without show() */
|
||||
ssize_t ret = -EIO;
|
||||
|
||||
if (bus_attr->show)
|
||||
ret = bus_attr->show(subsys_priv->bus, buf);
|
||||
|
|
@ -115,7 +116,8 @@ static ssize_t bus_attr_store(struct kobject *kobj, struct attribute *attr,
|
|||
{
|
||||
struct bus_attribute *bus_attr = to_bus_attr(attr);
|
||||
struct subsys_private *subsys_priv = to_subsys_private(kobj);
|
||||
ssize_t ret = 0;
|
||||
/* return -EIO for writing a bus attribute without store() */
|
||||
ssize_t ret = -EIO;
|
||||
|
||||
if (bus_attr->store)
|
||||
ret = bus_attr->store(subsys_priv->bus, buf, count);
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
#include <linux/mutex.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/rcupdate.h>
|
||||
#include <linux/sched/signal.h>
|
||||
#include <linux/sysfs.h>
|
||||
|
||||
|
|
@ -1832,7 +1831,6 @@ static int dev_uevent(struct kset *kset, struct kobject *kobj,
|
|||
struct kobj_uevent_env *env)
|
||||
{
|
||||
struct device *dev = kobj_to_dev(kobj);
|
||||
struct device_driver *driver;
|
||||
int retval = 0;
|
||||
|
||||
/* add device node properties if present */
|
||||
|
|
@ -1861,12 +1859,8 @@ static int dev_uevent(struct kset *kset, struct kobject *kobj,
|
|||
if (dev->type && dev->type->name)
|
||||
add_uevent_var(env, "DEVTYPE=%s", dev->type->name);
|
||||
|
||||
/* Synchronize with module_remove_driver() */
|
||||
rcu_read_lock();
|
||||
driver = READ_ONCE(dev->driver);
|
||||
if (driver)
|
||||
add_uevent_var(env, "DRIVER=%s", driver->name);
|
||||
rcu_read_unlock();
|
||||
if (dev->driver)
|
||||
add_uevent_var(env, "DRIVER=%s", dev->driver->name);
|
||||
|
||||
/* Add common DT information about the device */
|
||||
of_device_uevent(dev, env);
|
||||
|
|
@ -1936,8 +1930,11 @@ static ssize_t uevent_show(struct device *dev, struct device_attribute *attr,
|
|||
if (!env)
|
||||
return -ENOMEM;
|
||||
|
||||
/* Synchronize with really_probe() */
|
||||
device_lock(dev);
|
||||
/* let the kset specific function add its keys */
|
||||
retval = kset->uevent_ops->uevent(kset, &dev->kobj, env);
|
||||
device_unlock(dev);
|
||||
if (retval)
|
||||
goto out;
|
||||
|
||||
|
|
|
|||
|
|
@ -755,6 +755,26 @@ static void fw_abort_batch_reqs(struct firmware *fw)
|
|||
mutex_unlock(&fw_lock);
|
||||
}
|
||||
|
||||
/*
|
||||
* Reject firmware file names with ".." path components.
|
||||
* There are drivers that construct firmware file names from device-supplied
|
||||
* strings, and we don't want some device to be able to tell us "I would like to
|
||||
* be sent my firmware from ../../../etc/shadow, please".
|
||||
*
|
||||
* Search for ".." surrounded by either '/' or start/end of string.
|
||||
*
|
||||
* This intentionally only looks at the firmware name, not at the firmware base
|
||||
* directory or at symlink contents.
|
||||
*/
|
||||
static bool name_contains_dotdot(const char *name)
|
||||
{
|
||||
size_t name_len = strlen(name);
|
||||
|
||||
return strcmp(name, "..") == 0 || strncmp(name, "../", 3) == 0 ||
|
||||
strstr(name, "/../") != NULL ||
|
||||
(name_len >= 3 && strcmp(name+name_len-3, "/..") == 0);
|
||||
}
|
||||
|
||||
/* called from request_firmware() and request_firmware_work_func() */
|
||||
static int
|
||||
_request_firmware(const struct firmware **firmware_p, const char *name,
|
||||
|
|
@ -774,6 +794,14 @@ _request_firmware(const struct firmware **firmware_p, const char *name,
|
|||
goto out;
|
||||
}
|
||||
|
||||
if (name_contains_dotdot(name)) {
|
||||
dev_warn(device,
|
||||
"Firmware load for '%s' refused, path contains '..' component\n",
|
||||
name);
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = _request_firmware_prepare(&fw, name, device, buf, size,
|
||||
opt_flags);
|
||||
if (ret <= 0) /* error or already assigned */
|
||||
|
|
@ -835,6 +863,8 @@ _request_firmware(const struct firmware **firmware_p, const char *name,
|
|||
* @name will be used as $FIRMWARE in the uevent environment and
|
||||
* should be distinctive enough not to be confused with any other
|
||||
* firmware image for this or any other device.
|
||||
* It must not contain any ".." path components - "foo/bar..bin" is
|
||||
* allowed, but "foo/../bar.bin" is not.
|
||||
*
|
||||
* Caller must hold the reference count of @device.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
#include <linux/errno.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/rcupdate.h>
|
||||
#include "base.h"
|
||||
|
||||
static char *make_driver_name(struct device_driver *drv)
|
||||
|
|
@ -78,9 +77,6 @@ void module_remove_driver(struct device_driver *drv)
|
|||
if (!drv)
|
||||
return;
|
||||
|
||||
/* Synchronize with dev_uevent() */
|
||||
synchronize_rcu();
|
||||
|
||||
sysfs_remove_link(&drv->p->kobj, "module");
|
||||
|
||||
if (drv->owner)
|
||||
|
|
|
|||
|
|
@ -362,6 +362,7 @@ ata_rw_frameinit(struct frame *f)
|
|||
}
|
||||
|
||||
ah->cmdstat = ATA_CMD_PIO_READ | writebit | extbit;
|
||||
dev_hold(t->ifp->nd);
|
||||
skb->dev = t->ifp->nd;
|
||||
}
|
||||
|
||||
|
|
@ -402,6 +403,8 @@ aoecmd_ata_rw(struct aoedev *d)
|
|||
__skb_queue_head_init(&queue);
|
||||
__skb_queue_tail(&queue, skb);
|
||||
aoenet_xmit(&queue);
|
||||
} else {
|
||||
dev_put(f->t->ifp->nd);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -484,10 +487,13 @@ resend(struct aoedev *d, struct frame *f)
|
|||
memcpy(h->dst, t->addr, sizeof h->dst);
|
||||
memcpy(h->src, t->ifp->nd->dev_addr, sizeof h->src);
|
||||
|
||||
dev_hold(t->ifp->nd);
|
||||
skb->dev = t->ifp->nd;
|
||||
skb = skb_clone(skb, GFP_ATOMIC);
|
||||
if (skb == NULL)
|
||||
if (skb == NULL) {
|
||||
dev_put(t->ifp->nd);
|
||||
return;
|
||||
}
|
||||
f->sent = ktime_get();
|
||||
__skb_queue_head_init(&queue);
|
||||
__skb_queue_tail(&queue, skb);
|
||||
|
|
@ -618,6 +624,8 @@ probe(struct aoetgt *t)
|
|||
__skb_queue_head_init(&queue);
|
||||
__skb_queue_tail(&queue, skb);
|
||||
aoenet_xmit(&queue);
|
||||
} else {
|
||||
dev_put(f->t->ifp->nd);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1405,6 +1413,7 @@ aoecmd_ata_id(struct aoedev *d)
|
|||
ah->cmdstat = ATA_CMD_ID_ATA;
|
||||
ah->lba3 = 0xa0;
|
||||
|
||||
dev_hold(t->ifp->nd);
|
||||
skb->dev = t->ifp->nd;
|
||||
|
||||
d->rttavg = RTTAVG_INIT;
|
||||
|
|
@ -1414,6 +1423,8 @@ aoecmd_ata_id(struct aoedev *d)
|
|||
skb = skb_clone(skb, GFP_ATOMIC);
|
||||
if (skb)
|
||||
f->sent = ktime_get();
|
||||
else
|
||||
dev_put(t->ifp->nd);
|
||||
|
||||
return skb;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3509,10 +3509,12 @@ void drbd_uuid_new_current(struct drbd_device *device) __must_hold(local)
|
|||
void drbd_uuid_set_bm(struct drbd_device *device, u64 val) __must_hold(local)
|
||||
{
|
||||
unsigned long flags;
|
||||
if (device->ldev->md.uuid[UI_BITMAP] == 0 && val == 0)
|
||||
return;
|
||||
|
||||
spin_lock_irqsave(&device->ldev->md.uuid_lock, flags);
|
||||
if (device->ldev->md.uuid[UI_BITMAP] == 0 && val == 0) {
|
||||
spin_unlock_irqrestore(&device->ldev->md.uuid_lock, flags);
|
||||
return;
|
||||
}
|
||||
|
||||
if (val == 0) {
|
||||
drbd_uuid_move_history(device);
|
||||
device->ldev->md.uuid[UI_HISTORY_START] = device->ldev->md.uuid[UI_BITMAP];
|
||||
|
|
|
|||
|
|
@ -876,7 +876,7 @@ is_valid_state(struct drbd_device *device, union drbd_state ns)
|
|||
ns.disk == D_OUTDATED)
|
||||
rv = SS_CONNECTED_OUTDATES;
|
||||
|
||||
else if ((ns.conn == C_VERIFY_S || ns.conn == C_VERIFY_T) &&
|
||||
else if (nc && (ns.conn == C_VERIFY_S || ns.conn == C_VERIFY_T) &&
|
||||
(nc->verify_alg[0] == 0))
|
||||
rv = SS_NO_VERIFY_ALG;
|
||||
|
||||
|
|
|
|||
|
|
@ -105,13 +105,15 @@ static int btmrvl_sdio_probe_of(struct device *dev,
|
|||
} else {
|
||||
ret = devm_request_irq(dev, cfg->irq_bt,
|
||||
btmrvl_wake_irq_bt,
|
||||
0, "bt_wake", card);
|
||||
IRQF_NO_AUTOEN, "bt_wake", card);
|
||||
if (ret) {
|
||||
dev_err(dev,
|
||||
"Failed to request irq_bt %d (%d)\n",
|
||||
cfg->irq_bt, ret);
|
||||
}
|
||||
disable_irq(cfg->irq_bt);
|
||||
|
||||
/* Configure wakeup (enabled by default) */
|
||||
device_init_wakeup(dev, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1654,6 +1656,7 @@ static void btmrvl_sdio_remove(struct sdio_func *func)
|
|||
MODULE_SHUTDOWN_REQ);
|
||||
btmrvl_sdio_disable_host_int(card);
|
||||
}
|
||||
|
||||
BT_DBG("unregister dev");
|
||||
card->priv->surprise_removed = true;
|
||||
btmrvl_sdio_unregister_dev(card);
|
||||
|
|
@ -1690,7 +1693,8 @@ static int btmrvl_sdio_suspend(struct device *dev)
|
|||
}
|
||||
|
||||
/* Enable platform specific wakeup interrupt */
|
||||
if (card->plt_wake_cfg && card->plt_wake_cfg->irq_bt >= 0) {
|
||||
if (card->plt_wake_cfg && card->plt_wake_cfg->irq_bt >= 0 &&
|
||||
device_may_wakeup(dev)) {
|
||||
card->plt_wake_cfg->wake_by_bt = false;
|
||||
enable_irq(card->plt_wake_cfg->irq_bt);
|
||||
enable_irq_wake(card->plt_wake_cfg->irq_bt);
|
||||
|
|
@ -1707,7 +1711,8 @@ static int btmrvl_sdio_suspend(struct device *dev)
|
|||
BT_ERR("HS not activated, suspend failed!");
|
||||
/* Disable platform specific wakeup interrupt */
|
||||
if (card->plt_wake_cfg &&
|
||||
card->plt_wake_cfg->irq_bt >= 0) {
|
||||
card->plt_wake_cfg->irq_bt >= 0 &&
|
||||
device_may_wakeup(dev)) {
|
||||
disable_irq_wake(card->plt_wake_cfg->irq_bt);
|
||||
disable_irq(card->plt_wake_cfg->irq_bt);
|
||||
}
|
||||
|
|
@ -1767,7 +1772,8 @@ static int btmrvl_sdio_resume(struct device *dev)
|
|||
hci_resume_dev(hcidev);
|
||||
|
||||
/* Disable platform specific wakeup interrupt */
|
||||
if (card->plt_wake_cfg && card->plt_wake_cfg->irq_bt >= 0) {
|
||||
if (card->plt_wake_cfg && card->plt_wake_cfg->irq_bt >= 0 &&
|
||||
device_may_wakeup(dev)) {
|
||||
disable_irq_wake(card->plt_wake_cfg->irq_bt);
|
||||
disable_irq(card->plt_wake_cfg->irq_bt);
|
||||
if (card->plt_wake_cfg->wake_by_bt)
|
||||
|
|
|
|||
|
|
@ -834,7 +834,15 @@ static int btusb_submit_intr_urb(struct hci_dev *hdev, gfp_t mem_flags)
|
|||
if (!urb)
|
||||
return -ENOMEM;
|
||||
|
||||
size = le16_to_cpu(data->intr_ep->wMaxPacketSize);
|
||||
if (le16_to_cpu(data->udev->descriptor.idVendor) == 0x0a12 &&
|
||||
le16_to_cpu(data->udev->descriptor.idProduct) == 0x0001)
|
||||
/* Fake CSR devices don't seem to support sort-transter */
|
||||
size = le16_to_cpu(data->intr_ep->wMaxPacketSize);
|
||||
else
|
||||
/* Use maximum HCI Event size so the USB stack handles
|
||||
* ZPL/short-transfer automatically.
|
||||
*/
|
||||
size = HCI_MAX_EVENT_SIZE;
|
||||
|
||||
buf = kmalloc(size, mem_flags);
|
||||
if (!buf) {
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ static int mtk_rng_probe(struct platform_device *pdev)
|
|||
dev_set_drvdata(&pdev->dev, priv);
|
||||
pm_runtime_set_autosuspend_delay(&pdev->dev, RNG_AUTOSUSPEND_TIMEOUT);
|
||||
pm_runtime_use_autosuspend(&pdev->dev);
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
devm_pm_runtime_enable(&pdev->dev);
|
||||
|
||||
dev_info(&pdev->dev, "registered RNG driver\n");
|
||||
|
||||
|
|
|
|||
|
|
@ -48,6 +48,8 @@ static ssize_t tpm_dev_transmit(struct tpm_chip *chip, struct tpm_space *space,
|
|||
|
||||
if (!ret)
|
||||
ret = tpm2_commit_space(chip, space, buf, &len);
|
||||
else
|
||||
tpm2_flush_space(chip);
|
||||
|
||||
out_rc:
|
||||
return ret ? ret : len;
|
||||
|
|
|
|||
|
|
@ -166,6 +166,9 @@ void tpm2_flush_space(struct tpm_chip *chip)
|
|||
struct tpm_space *space = &chip->work_space;
|
||||
int i;
|
||||
|
||||
if (!space)
|
||||
return;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(space->context_tbl); i++)
|
||||
if (space->context_tbl[i] && ~space->context_tbl[i])
|
||||
tpm2_flush_context(chip, space->context_tbl[i]);
|
||||
|
|
|
|||
|
|
@ -2051,25 +2051,27 @@ static int virtcons_probe(struct virtio_device *vdev)
|
|||
multiport = true;
|
||||
}
|
||||
|
||||
err = init_vqs(portdev);
|
||||
if (err < 0) {
|
||||
dev_err(&vdev->dev, "Error %d initializing vqs\n", err);
|
||||
goto free_chrdev;
|
||||
}
|
||||
|
||||
spin_lock_init(&portdev->ports_lock);
|
||||
INIT_LIST_HEAD(&portdev->ports);
|
||||
INIT_LIST_HEAD(&portdev->list);
|
||||
|
||||
virtio_device_ready(portdev->vdev);
|
||||
|
||||
INIT_WORK(&portdev->config_work, &config_work_handler);
|
||||
INIT_WORK(&portdev->control_work, &control_work_handler);
|
||||
|
||||
if (multiport) {
|
||||
spin_lock_init(&portdev->c_ivq_lock);
|
||||
spin_lock_init(&portdev->c_ovq_lock);
|
||||
}
|
||||
|
||||
err = init_vqs(portdev);
|
||||
if (err < 0) {
|
||||
dev_err(&vdev->dev, "Error %d initializing vqs\n", err);
|
||||
goto free_chrdev;
|
||||
}
|
||||
|
||||
virtio_device_ready(portdev->vdev);
|
||||
|
||||
if (multiport) {
|
||||
err = fill_queue(portdev->c_ivq, &portdev->c_ivq_lock);
|
||||
if (err < 0) {
|
||||
dev_err(&vdev->dev,
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ static void bcm53573_ilp_init(struct device_node *np)
|
|||
goto err_free_ilp;
|
||||
}
|
||||
|
||||
ilp->regmap = syscon_node_to_regmap(of_get_parent(np));
|
||||
ilp->regmap = syscon_node_to_regmap(np->parent);
|
||||
if (IS_ERR(ilp->regmap)) {
|
||||
err = PTR_ERR(ilp->regmap);
|
||||
goto err_free_ilp;
|
||||
|
|
|
|||
|
|
@ -259,38 +259,35 @@ static int clk_rpmh_bcm_send_cmd(struct clk_rpmh *c, bool enable)
|
|||
{
|
||||
struct tcs_cmd cmd = { 0 };
|
||||
u32 cmd_state;
|
||||
int ret;
|
||||
int ret = 0;
|
||||
|
||||
mutex_lock(&rpmh_clk_lock);
|
||||
|
||||
cmd_state = 0;
|
||||
if (enable) {
|
||||
cmd_state = 1;
|
||||
if (c->aggr_state)
|
||||
cmd_state = c->aggr_state;
|
||||
} else {
|
||||
cmd_state = 0;
|
||||
}
|
||||
|
||||
if (c->last_sent_aggr_state == cmd_state) {
|
||||
mutex_unlock(&rpmh_clk_lock);
|
||||
return 0;
|
||||
cmd_state = min(cmd_state, BCM_TCS_CMD_VOTE_MASK);
|
||||
|
||||
if (c->last_sent_aggr_state != cmd_state) {
|
||||
cmd.addr = c->res_addr;
|
||||
cmd.data = BCM_TCS_CMD(1, enable, 0, cmd_state);
|
||||
|
||||
ret = clk_rpmh_send(c, RPMH_ACTIVE_ONLY_STATE, &cmd, enable);
|
||||
if (ret) {
|
||||
dev_err(c->dev, "set active state of %s failed: (%d)\n",
|
||||
c->res_name, ret);
|
||||
} else {
|
||||
c->last_sent_aggr_state = cmd_state;
|
||||
}
|
||||
}
|
||||
|
||||
cmd.addr = c->res_addr;
|
||||
cmd.data = BCM_TCS_CMD(1, enable, 0, cmd_state);
|
||||
|
||||
ret = clk_rpmh_send(c, RPMH_ACTIVE_ONLY_STATE, &cmd, enable);
|
||||
if (ret) {
|
||||
dev_err(c->dev, "set active state of %s failed: (%d)\n",
|
||||
c->res_name, ret);
|
||||
mutex_unlock(&rpmh_clk_lock);
|
||||
return ret;
|
||||
}
|
||||
|
||||
c->last_sent_aggr_state = cmd_state;
|
||||
|
||||
mutex_unlock(&rpmh_clk_lock);
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int clk_rpmh_bcm_prepare(struct clk_hw *hw)
|
||||
|
|
|
|||
|
|
@ -408,7 +408,7 @@ static struct rockchip_clk_branch rk3228_clk_branches[] __initdata = {
|
|||
RK2928_CLKSEL_CON(29), 0, 3, DFLAGS),
|
||||
DIV(0, "sclk_vop_pre", "sclk_vop_src", 0,
|
||||
RK2928_CLKSEL_CON(27), 8, 8, DFLAGS),
|
||||
MUX(DCLK_VOP, "dclk_vop", mux_dclk_vop_p, 0,
|
||||
MUX(DCLK_VOP, "dclk_vop", mux_dclk_vop_p, CLK_SET_RATE_PARENT | CLK_SET_RATE_NO_REPARENT,
|
||||
RK2928_CLKSEL_CON(27), 1, 1, MFLAGS),
|
||||
|
||||
FACTOR(0, "xin12m", "xin24m", 0, 1, 2),
|
||||
|
|
|
|||
|
|
@ -439,12 +439,13 @@ void __init rockchip_clk_register_branches(
|
|||
struct rockchip_clk_branch *list,
|
||||
unsigned int nr_clk)
|
||||
{
|
||||
struct clk *clk = NULL;
|
||||
struct clk *clk;
|
||||
unsigned int idx;
|
||||
unsigned long flags;
|
||||
|
||||
for (idx = 0; idx < nr_clk; idx++, list++) {
|
||||
flags = list->flags;
|
||||
clk = NULL;
|
||||
|
||||
/* catch simple muxes */
|
||||
switch (list->branch_type) {
|
||||
|
|
|
|||
|
|
@ -257,6 +257,7 @@ static int of_dra7_atl_clk_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
clk = of_clk_get_from_provider(&clkspec);
|
||||
of_node_put(clkspec.np);
|
||||
if (IS_ERR(clk)) {
|
||||
pr_err("%s: failed to get atl clock %d from provider\n",
|
||||
__func__, i);
|
||||
|
|
|
|||
|
|
@ -233,6 +233,7 @@ static int __init msm_dt_timer_init(struct device_node *np)
|
|||
}
|
||||
|
||||
if (of_property_read_u32(np, "clock-frequency", &freq)) {
|
||||
iounmap(cpu0_base);
|
||||
pr_err("Unknown frequency\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -243,7 +244,11 @@ static int __init msm_dt_timer_init(struct device_node *np)
|
|||
freq /= 4;
|
||||
writel_relaxed(DGT_CLK_CTL_DIV_4, source_base + DGT_CLK_CTL);
|
||||
|
||||
return msm_timer_init(freq, 32, irq, !!percpu_offset);
|
||||
ret = msm_timer_init(freq, 32, irq, !!percpu_offset);
|
||||
if (ret)
|
||||
iounmap(cpu0_base);
|
||||
|
||||
return ret;
|
||||
}
|
||||
TIMER_OF_DECLARE(kpss_timer, "qcom,kpss-timer", msm_dt_timer_init);
|
||||
TIMER_OF_DECLARE(scss_timer, "qcom,scss-timer", msm_dt_timer_init);
|
||||
|
|
|
|||
|
|
@ -24,12 +24,6 @@
|
|||
#define MSG_RING BIT(1)
|
||||
#define TAG_SZ 32
|
||||
|
||||
static inline struct tegra_bpmp *
|
||||
mbox_client_to_bpmp(struct mbox_client *client)
|
||||
{
|
||||
return container_of(client, struct tegra_bpmp, mbox.client);
|
||||
}
|
||||
|
||||
static inline const struct tegra_bpmp_ops *
|
||||
channel_to_ops(struct tegra_bpmp_channel *channel)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -404,6 +404,8 @@ static void __aspeed_gpio_set(struct gpio_chip *gc, unsigned int offset,
|
|||
gpio->dcache[GPIO_BANK(offset)] = reg;
|
||||
|
||||
iowrite32(reg, addr);
|
||||
/* Flush write */
|
||||
ioread32(addr);
|
||||
}
|
||||
|
||||
static void aspeed_gpio_set(struct gpio_chip *gc, unsigned int offset,
|
||||
|
|
@ -1157,7 +1159,7 @@ static int __init aspeed_gpio_probe(struct platform_device *pdev)
|
|||
if (!gpio_id)
|
||||
return -EINVAL;
|
||||
|
||||
gpio->clk = of_clk_get(pdev->dev.of_node, 0);
|
||||
gpio->clk = devm_clk_get_enabled(&pdev->dev, NULL);
|
||||
if (IS_ERR(gpio->clk)) {
|
||||
dev_warn(&pdev->dev,
|
||||
"Failed to get clock from devicetree, debouncing disabled\n");
|
||||
|
|
|
|||
|
|
@ -300,7 +300,7 @@ static int davinci_gpio_probe(struct platform_device *pdev)
|
|||
* serve as EDMA event triggers.
|
||||
*/
|
||||
|
||||
static void gpio_irq_disable(struct irq_data *d)
|
||||
static void gpio_irq_mask(struct irq_data *d)
|
||||
{
|
||||
struct davinci_gpio_regs __iomem *g = irq2regs(d);
|
||||
uintptr_t mask = (uintptr_t)irq_data_get_irq_handler_data(d);
|
||||
|
|
@ -309,7 +309,7 @@ static void gpio_irq_disable(struct irq_data *d)
|
|||
writel_relaxed(mask, &g->clr_rising);
|
||||
}
|
||||
|
||||
static void gpio_irq_enable(struct irq_data *d)
|
||||
static void gpio_irq_unmask(struct irq_data *d)
|
||||
{
|
||||
struct davinci_gpio_regs __iomem *g = irq2regs(d);
|
||||
uintptr_t mask = (uintptr_t)irq_data_get_irq_handler_data(d);
|
||||
|
|
@ -335,8 +335,8 @@ static int gpio_irq_type(struct irq_data *d, unsigned trigger)
|
|||
|
||||
static struct irq_chip gpio_irqchip = {
|
||||
.name = "GPIO",
|
||||
.irq_enable = gpio_irq_enable,
|
||||
.irq_disable = gpio_irq_disable,
|
||||
.irq_unmask = gpio_irq_unmask,
|
||||
.irq_mask = gpio_irq_mask,
|
||||
.irq_set_type = gpio_irq_type,
|
||||
.flags = IRQCHIP_SET_TYPE_MASKED | IRQCHIP_SKIP_SET_WAKE,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
#include <linux/module.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/nospec.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/device.h>
|
||||
|
|
@ -147,7 +148,7 @@ struct gpio_desc *gpiochip_get_desc(struct gpio_chip *chip,
|
|||
if (hwnum >= gdev->ngpio)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
return &gdev->descs[hwnum];
|
||||
return &gdev->descs[array_index_nospec(hwnum, gdev->ngpio)];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ static union acpi_object *amdgpu_atif_call(struct amdgpu_atif *atif,
|
|||
struct acpi_buffer *params)
|
||||
{
|
||||
acpi_status status;
|
||||
union acpi_object *obj;
|
||||
union acpi_object atif_arg_elements[2];
|
||||
struct acpi_object_list atif_arg;
|
||||
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
|
||||
|
|
@ -107,16 +108,24 @@ static union acpi_object *amdgpu_atif_call(struct amdgpu_atif *atif,
|
|||
|
||||
status = acpi_evaluate_object(atif->handle, NULL, &atif_arg,
|
||||
&buffer);
|
||||
obj = (union acpi_object *)buffer.pointer;
|
||||
|
||||
/* Fail only if calling the method fails and ATIF is supported */
|
||||
/* Fail if calling the method fails and ATIF is supported */
|
||||
if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
|
||||
DRM_DEBUG_DRIVER("failed to evaluate ATIF got %s\n",
|
||||
acpi_format_exception(status));
|
||||
kfree(buffer.pointer);
|
||||
kfree(obj);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return buffer.pointer;
|
||||
if (obj->type != ACPI_TYPE_BUFFER) {
|
||||
DRM_DEBUG_DRIVER("bad object returned from ATIF: %d\n",
|
||||
obj->type);
|
||||
kfree(obj);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2098,23 +2098,29 @@ amdgpu_atombios_encoder_get_lcd_info(struct amdgpu_encoder *encoder)
|
|||
fake_edid_record = (ATOM_FAKE_EDID_PATCH_RECORD *)record;
|
||||
if (fake_edid_record->ucFakeEDIDLength) {
|
||||
struct edid *edid;
|
||||
int edid_size =
|
||||
max((int)EDID_LENGTH, (int)fake_edid_record->ucFakeEDIDLength);
|
||||
edid = kmalloc(edid_size, GFP_KERNEL);
|
||||
if (edid) {
|
||||
memcpy((u8 *)edid, (u8 *)&fake_edid_record->ucFakeEDIDString[0],
|
||||
fake_edid_record->ucFakeEDIDLength);
|
||||
int edid_size;
|
||||
|
||||
if (fake_edid_record->ucFakeEDIDLength == 128)
|
||||
edid_size = fake_edid_record->ucFakeEDIDLength;
|
||||
else
|
||||
edid_size = fake_edid_record->ucFakeEDIDLength * 128;
|
||||
edid = kmemdup(&fake_edid_record->ucFakeEDIDString[0],
|
||||
edid_size, GFP_KERNEL);
|
||||
if (edid) {
|
||||
if (drm_edid_is_valid(edid)) {
|
||||
adev->mode_info.bios_hardcoded_edid = edid;
|
||||
adev->mode_info.bios_hardcoded_edid_size = edid_size;
|
||||
} else
|
||||
} else {
|
||||
kfree(edid);
|
||||
}
|
||||
}
|
||||
record += struct_size(fake_edid_record,
|
||||
ucFakeEDIDString,
|
||||
edid_size);
|
||||
} else {
|
||||
/* empty fake edid record must be 3 bytes long */
|
||||
record += sizeof(ATOM_FAKE_EDID_PATCH_RECORD) + 1;
|
||||
}
|
||||
record += fake_edid_record->ucFakeEDIDLength ?
|
||||
fake_edid_record->ucFakeEDIDLength + 2 :
|
||||
sizeof(ATOM_FAKE_EDID_PATCH_RECORD);
|
||||
break;
|
||||
case LCD_PANEL_RESOLUTION_RECORD_TYPE:
|
||||
panel_res_record = (ATOM_PANEL_RESOLUTION_PATCH_RECORD *)record;
|
||||
|
|
|
|||
|
|
@ -1542,6 +1542,8 @@ static bool are_stream_backends_same(
|
|||
bool dc_is_stream_unchanged(
|
||||
struct dc_stream_state *old_stream, struct dc_stream_state *stream)
|
||||
{
|
||||
if (!old_stream || !stream)
|
||||
return false;
|
||||
|
||||
if (!are_stream_backends_same(old_stream, stream))
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -551,6 +551,8 @@ bool cm_helper_translate_curve_to_degamma_hw_format(
|
|||
i += increment) {
|
||||
if (j == hw_points - 1)
|
||||
break;
|
||||
if (i >= TRANSFER_FUNC_POINTS)
|
||||
return false;
|
||||
rgb_resulted[j].red = output_tf->tf_pts.red[i];
|
||||
rgb_resulted[j].green = output_tf->tf_pts.green[i];
|
||||
rgb_resulted[j].blue = output_tf->tf_pts.blue[i];
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ static void calculate_ttu_cursor(struct display_mode_lib *mode_lib,
|
|||
|
||||
static unsigned int get_bytes_per_element(enum source_format_class source_format, bool is_chroma)
|
||||
{
|
||||
unsigned int ret_val = 0;
|
||||
unsigned int ret_val = 1;
|
||||
|
||||
if (source_format == dm_444_16) {
|
||||
if (!is_chroma)
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ static void calculate_ttu_cursor(
|
|||
|
||||
static unsigned int get_bytes_per_element(enum source_format_class source_format, bool is_chroma)
|
||||
{
|
||||
unsigned int ret_val = 0;
|
||||
unsigned int ret_val = 1;
|
||||
|
||||
if (source_format == dm_444_16) {
|
||||
if (!is_chroma)
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ static unsigned int calc_v_total_from_refresh(
|
|||
|
||||
v_total = div64_u64(div64_u64(((unsigned long long)(
|
||||
frame_duration_in_ns) * (stream->timing.pix_clk_100hz / 10)),
|
||||
stream->timing.h_total), 1000000);
|
||||
stream->timing.h_total) + 500000, 1000000);
|
||||
|
||||
/* v_total cannot be less than nominal */
|
||||
if (v_total < stream->timing.v_total) {
|
||||
|
|
|
|||
|
|
@ -4107,7 +4107,7 @@ typedef struct _ATOM_FAKE_EDID_PATCH_RECORD
|
|||
{
|
||||
UCHAR ucRecordType;
|
||||
UCHAR ucFakeEDIDLength; // = 128 means EDID length is 128 bytes, otherwise the EDID length = ucFakeEDIDLength*128
|
||||
UCHAR ucFakeEDIDString[1]; // This actually has ucFakeEdidLength elements.
|
||||
UCHAR ucFakeEDIDString[]; // This actually has ucFakeEdidLength elements.
|
||||
} ATOM_FAKE_EDID_PATCH_RECORD;
|
||||
|
||||
typedef struct _ATOM_PANEL_RESOLUTION_PATCH_RECORD
|
||||
|
|
|
|||
|
|
@ -148,6 +148,7 @@ static int komeda_crtc_normalize_zpos(struct drm_crtc *crtc,
|
|||
struct drm_plane *plane;
|
||||
struct list_head zorder_list;
|
||||
int order = 0, err;
|
||||
u32 slave_zpos = 0;
|
||||
|
||||
DRM_DEBUG_ATOMIC("[CRTC:%d:%s] calculating normalized zpos values\n",
|
||||
crtc->base.id, crtc->name);
|
||||
|
|
@ -187,10 +188,13 @@ static int komeda_crtc_normalize_zpos(struct drm_crtc *crtc,
|
|||
plane_st->zpos, plane_st->normalized_zpos);
|
||||
|
||||
/* calculate max slave zorder */
|
||||
if (has_bit(drm_plane_index(plane), kcrtc->slave_planes))
|
||||
if (has_bit(drm_plane_index(plane), kcrtc->slave_planes)) {
|
||||
slave_zpos = plane_st->normalized_zpos;
|
||||
if (to_kplane_st(plane_st)->layer_split)
|
||||
slave_zpos++;
|
||||
kcrtc_st->max_slave_zorder =
|
||||
max(plane_st->normalized_zpos,
|
||||
kcrtc_st->max_slave_zorder);
|
||||
max(slave_zpos, kcrtc_st->max_slave_zorder);
|
||||
}
|
||||
}
|
||||
|
||||
crtc_st->zpos_changed = true;
|
||||
|
|
|
|||
|
|
@ -582,7 +582,7 @@ static int drm_atomic_plane_set_property(struct drm_plane *plane,
|
|||
&state->fb_damage_clips,
|
||||
val,
|
||||
-1,
|
||||
sizeof(struct drm_rect),
|
||||
sizeof(struct drm_mode_rect),
|
||||
&replaced);
|
||||
return ret;
|
||||
} else if (plane->funcs->atomic_set_property) {
|
||||
|
|
|
|||
|
|
@ -727,6 +727,7 @@ out:
|
|||
connector_set = NULL;
|
||||
fb = NULL;
|
||||
mode = NULL;
|
||||
num_connectors = 0;
|
||||
|
||||
DRM_MODESET_LOCK_ALL_END(ctx, ret);
|
||||
mutex_unlock(&crtc->dev->mode_config.mutex);
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ mipi_dsi_device_register_full(struct mipi_dsi_host *host,
|
|||
return dsi;
|
||||
}
|
||||
|
||||
device_set_node(&dsi->dev, of_fwnode_handle(info->node));
|
||||
dsi->dev.of_node = info->node;
|
||||
dsi->channel = info->channel;
|
||||
strlcpy(dsi->name, info->type, sizeof(dsi->name));
|
||||
|
||||
|
|
|
|||
|
|
@ -59,8 +59,9 @@ void __drm_puts_coredump(struct drm_printer *p, const char *str)
|
|||
copy = iterator->remain;
|
||||
|
||||
/* Copy out the bit of the string that we need */
|
||||
memcpy(iterator->data,
|
||||
str + (iterator->start - iterator->offset), copy);
|
||||
if (iterator->data)
|
||||
memcpy(iterator->data,
|
||||
str + (iterator->start - iterator->offset), copy);
|
||||
|
||||
iterator->offset = iterator->start + copy;
|
||||
iterator->remain -= copy;
|
||||
|
|
@ -69,7 +70,8 @@ void __drm_puts_coredump(struct drm_printer *p, const char *str)
|
|||
|
||||
len = min_t(ssize_t, strlen(str), iterator->remain);
|
||||
|
||||
memcpy(iterator->data + pos, str, len);
|
||||
if (iterator->data)
|
||||
memcpy(iterator->data + pos, str, len);
|
||||
|
||||
iterator->offset += len;
|
||||
iterator->remain -= len;
|
||||
|
|
@ -99,8 +101,9 @@ void __drm_printfn_coredump(struct drm_printer *p, struct va_format *vaf)
|
|||
if ((iterator->offset >= iterator->start) && (len < iterator->remain)) {
|
||||
ssize_t pos = iterator->offset - iterator->start;
|
||||
|
||||
snprintf(((char *) iterator->data) + pos,
|
||||
iterator->remain, "%pV", vaf);
|
||||
if (iterator->data)
|
||||
snprintf(((char *) iterator->data) + pos,
|
||||
iterator->remain, "%pV", vaf);
|
||||
|
||||
iterator->offset += len;
|
||||
iterator->remain -= len;
|
||||
|
|
|
|||
|
|
@ -1169,7 +1169,7 @@ static int gsc_bind(struct device *dev, struct device *master, void *data)
|
|||
struct exynos_drm_ipp *ipp = &ctx->ipp;
|
||||
|
||||
ctx->drm_dev = drm_dev;
|
||||
ctx->drm_dev = drm_dev;
|
||||
ipp->drm_dev = drm_dev;
|
||||
exynos_drm_register_dma(drm_dev, dev, &ctx->dma_priv);
|
||||
|
||||
exynos_drm_ipp_register(dev, ipp, &ipp_funcs,
|
||||
|
|
|
|||
|
|
@ -134,9 +134,13 @@ static void a5xx_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit,
|
|||
OUT_PKT7(ring, CP_SET_PROTECTED_MODE, 1);
|
||||
OUT_RING(ring, 1);
|
||||
|
||||
/* Enable local preemption for finegrain preemption */
|
||||
/*
|
||||
* Disable local preemption by default because it requires
|
||||
* user-space to be aware of it and provide additional handling
|
||||
* to restore rendering state or do various flushes on switch.
|
||||
*/
|
||||
OUT_PKT7(ring, CP_PREEMPT_ENABLE_LOCAL, 1);
|
||||
OUT_RING(ring, 0x1);
|
||||
OUT_RING(ring, 0x0);
|
||||
|
||||
/* Allow CP_CONTEXT_SWITCH_YIELD packets in the IB2 */
|
||||
OUT_PKT7(ring, CP_YIELD_ENABLE, 1);
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ struct a5xx_gpu {
|
|||
uint64_t preempt_iova[MSM_GPU_MAX_RINGS];
|
||||
|
||||
atomic_t preempt_state;
|
||||
spinlock_t preempt_start_lock;
|
||||
struct timer_list preempt_timer;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -98,12 +98,19 @@ void a5xx_preempt_trigger(struct msm_gpu *gpu)
|
|||
if (gpu->nr_rings == 1)
|
||||
return;
|
||||
|
||||
/*
|
||||
* Serialize preemption start to ensure that we always make
|
||||
* decision on latest state. Otherwise we can get stuck in
|
||||
* lower priority or empty ring.
|
||||
*/
|
||||
spin_lock_irqsave(&a5xx_gpu->preempt_start_lock, flags);
|
||||
|
||||
/*
|
||||
* Try to start preemption by moving from NONE to START. If
|
||||
* unsuccessful, a preemption is already in flight
|
||||
*/
|
||||
if (!try_preempt_state(a5xx_gpu, PREEMPT_NONE, PREEMPT_START))
|
||||
return;
|
||||
goto out;
|
||||
|
||||
/* Get the next ring to preempt to */
|
||||
ring = get_next_ring(gpu);
|
||||
|
|
@ -128,9 +135,11 @@ void a5xx_preempt_trigger(struct msm_gpu *gpu)
|
|||
set_preempt_state(a5xx_gpu, PREEMPT_ABORT);
|
||||
update_wptr(gpu, a5xx_gpu->cur_ring);
|
||||
set_preempt_state(a5xx_gpu, PREEMPT_NONE);
|
||||
return;
|
||||
goto out;
|
||||
}
|
||||
|
||||
spin_unlock_irqrestore(&a5xx_gpu->preempt_start_lock, flags);
|
||||
|
||||
/* Make sure the wptr doesn't update while we're in motion */
|
||||
spin_lock_irqsave(&ring->lock, flags);
|
||||
a5xx_gpu->preempt[ring->id]->wptr = get_wptr(ring);
|
||||
|
|
@ -154,6 +163,10 @@ void a5xx_preempt_trigger(struct msm_gpu *gpu)
|
|||
|
||||
/* And actually start the preemption */
|
||||
gpu_write(gpu, REG_A5XX_CP_CONTEXT_SWITCH_CNTL, 1);
|
||||
return;
|
||||
|
||||
out:
|
||||
spin_unlock_irqrestore(&a5xx_gpu->preempt_start_lock, flags);
|
||||
}
|
||||
|
||||
void a5xx_preempt_irq(struct msm_gpu *gpu)
|
||||
|
|
@ -191,6 +204,12 @@ void a5xx_preempt_irq(struct msm_gpu *gpu)
|
|||
update_wptr(gpu, a5xx_gpu->cur_ring);
|
||||
|
||||
set_preempt_state(a5xx_gpu, PREEMPT_NONE);
|
||||
|
||||
/*
|
||||
* Try to trigger preemption again in case there was a submit or
|
||||
* retire during ring switch
|
||||
*/
|
||||
a5xx_preempt_trigger(gpu);
|
||||
}
|
||||
|
||||
void a5xx_preempt_hw_init(struct msm_gpu *gpu)
|
||||
|
|
@ -207,6 +226,8 @@ void a5xx_preempt_hw_init(struct msm_gpu *gpu)
|
|||
return;
|
||||
|
||||
for (i = 0; i < gpu->nr_rings; i++) {
|
||||
a5xx_gpu->preempt[i]->data = 0;
|
||||
a5xx_gpu->preempt[i]->info = 0;
|
||||
a5xx_gpu->preempt[i]->wptr = 0;
|
||||
a5xx_gpu->preempt[i]->rptr = 0;
|
||||
a5xx_gpu->preempt[i]->rbase = gpu->rb[i]->iova;
|
||||
|
|
@ -287,5 +308,6 @@ void a5xx_preempt_init(struct msm_gpu *gpu)
|
|||
}
|
||||
}
|
||||
|
||||
spin_lock_init(&a5xx_gpu->preempt_start_lock);
|
||||
timer_setup(&a5xx_gpu->preempt_timer, a5xx_preempt_timer, 0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -247,7 +247,7 @@ adreno_request_fw(struct adreno_gpu *adreno_gpu, const char *fwname)
|
|||
ret = request_firmware_direct(&fw, fwname, drm->dev);
|
||||
if (!ret) {
|
||||
DRM_DEV_INFO(drm->dev, "loaded %s from legacy location\n",
|
||||
newname);
|
||||
fwname);
|
||||
adreno_gpu->fwloc = FW_LOCATION_LEGACY;
|
||||
goto out;
|
||||
} else if (adreno_gpu->fwloc != FW_LOCATION_UNKNOWN) {
|
||||
|
|
|
|||
|
|
@ -358,7 +358,7 @@ void mdp5_smp_dump(struct mdp5_smp *smp, struct drm_printer *p)
|
|||
|
||||
drm_printf(p, "%s:%d\t%d\t%s\n",
|
||||
pipe2name(pipe), j, inuse,
|
||||
plane ? plane->name : NULL);
|
||||
plane ? plane->name : "(null)");
|
||||
|
||||
total += inuse;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -663,7 +663,7 @@ static u32 dsi_get_pclk_rate(struct msm_dsi_host *msm_host, bool is_dual_dsi)
|
|||
struct drm_display_mode *mode = msm_host->mode;
|
||||
u32 pclk_rate;
|
||||
|
||||
pclk_rate = mode->clock * 1000;
|
||||
pclk_rate = mode->clock * 1000u;
|
||||
|
||||
/*
|
||||
* For dual DSI mode, the current DRM mode has the complete width of the
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ static vm_fault_t nouveau_dmem_fault_copy_one(struct nouveau_drm *drm,
|
|||
if (!spage || !(args->src[0] & MIGRATE_PFN_MIGRATE))
|
||||
return 0;
|
||||
|
||||
dpage = alloc_page_vma(GFP_HIGHUSER, vmf->vma, vmf->address);
|
||||
dpage = alloc_page_vma(GFP_HIGHUSER | __GFP_ZERO, vmf->vma, vmf->address);
|
||||
if (!dpage)
|
||||
return VM_FAULT_SIGBUS;
|
||||
lock_page(dpage);
|
||||
|
|
|
|||
|
|
@ -580,6 +580,10 @@ static int omapdrm_init(struct omap_drm_private *priv, struct device *dev)
|
|||
soc = soc_device_match(omapdrm_soc_devices);
|
||||
priv->omaprev = soc ? (unsigned int)soc->data : 0;
|
||||
priv->wq = alloc_ordered_workqueue("omapdrm", 0);
|
||||
if (!priv->wq) {
|
||||
ret = -ENOMEM;
|
||||
goto err_alloc_workqueue;
|
||||
}
|
||||
|
||||
mutex_init(&priv->list_lock);
|
||||
INIT_LIST_HEAD(&priv->obj_list);
|
||||
|
|
@ -633,6 +637,7 @@ err_cleanup_modeset:
|
|||
err_gem_deinit:
|
||||
omap_gem_deinit(ddev);
|
||||
destroy_workqueue(priv->wq);
|
||||
err_alloc_workqueue:
|
||||
omap_disconnect_pipelines(ddev);
|
||||
omap_crtc_pre_uninit(priv);
|
||||
drm_dev_put(ddev);
|
||||
|
|
|
|||
|
|
@ -3615,7 +3615,7 @@ typedef struct _ATOM_FAKE_EDID_PATCH_RECORD
|
|||
{
|
||||
UCHAR ucRecordType;
|
||||
UCHAR ucFakeEDIDLength;
|
||||
UCHAR ucFakeEDIDString[1]; // This actually has ucFakeEdidLength elements.
|
||||
UCHAR ucFakeEDIDString[]; // This actually has ucFakeEdidLength elements.
|
||||
} ATOM_FAKE_EDID_PATCH_RECORD;
|
||||
|
||||
typedef struct _ATOM_PANEL_RESOLUTION_PATCH_RECORD
|
||||
|
|
|
|||
|
|
@ -396,7 +396,7 @@ static int evergreen_cs_track_validate_cb(struct radeon_cs_parser *p, unsigned i
|
|||
struct evergreen_cs_track *track = p->track;
|
||||
struct eg_surface surf;
|
||||
unsigned pitch, slice, mslice;
|
||||
unsigned long offset;
|
||||
u64 offset;
|
||||
int r;
|
||||
|
||||
mslice = G_028C6C_SLICE_MAX(track->cb_color_view[id]) + 1;
|
||||
|
|
@ -434,14 +434,14 @@ static int evergreen_cs_track_validate_cb(struct radeon_cs_parser *p, unsigned i
|
|||
return r;
|
||||
}
|
||||
|
||||
offset = track->cb_color_bo_offset[id] << 8;
|
||||
offset = (u64)track->cb_color_bo_offset[id] << 8;
|
||||
if (offset & (surf.base_align - 1)) {
|
||||
dev_warn(p->dev, "%s:%d cb[%d] bo base %ld not aligned with %ld\n",
|
||||
dev_warn(p->dev, "%s:%d cb[%d] bo base %llu not aligned with %ld\n",
|
||||
__func__, __LINE__, id, offset, surf.base_align);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
offset += surf.layer_size * mslice;
|
||||
offset += (u64)surf.layer_size * mslice;
|
||||
if (offset > radeon_bo_size(track->cb_color_bo[id])) {
|
||||
/* old ddx are broken they allocate bo with w*h*bpp but
|
||||
* program slice with ALIGN(h, 8), catch this and patch
|
||||
|
|
@ -449,14 +449,14 @@ static int evergreen_cs_track_validate_cb(struct radeon_cs_parser *p, unsigned i
|
|||
*/
|
||||
if (!surf.mode) {
|
||||
uint32_t *ib = p->ib.ptr;
|
||||
unsigned long tmp, nby, bsize, size, min = 0;
|
||||
u64 tmp, nby, bsize, size, min = 0;
|
||||
|
||||
/* find the height the ddx wants */
|
||||
if (surf.nby > 8) {
|
||||
min = surf.nby - 8;
|
||||
}
|
||||
bsize = radeon_bo_size(track->cb_color_bo[id]);
|
||||
tmp = track->cb_color_bo_offset[id] << 8;
|
||||
tmp = (u64)track->cb_color_bo_offset[id] << 8;
|
||||
for (nby = surf.nby; nby > min; nby--) {
|
||||
size = nby * surf.nbx * surf.bpe * surf.nsamples;
|
||||
if ((tmp + size * mslice) <= bsize) {
|
||||
|
|
@ -468,7 +468,7 @@ static int evergreen_cs_track_validate_cb(struct radeon_cs_parser *p, unsigned i
|
|||
slice = ((nby * surf.nbx) / 64) - 1;
|
||||
if (!evergreen_surface_check(p, &surf, "cb")) {
|
||||
/* check if this one works */
|
||||
tmp += surf.layer_size * mslice;
|
||||
tmp += (u64)surf.layer_size * mslice;
|
||||
if (tmp <= bsize) {
|
||||
ib[track->cb_color_slice_idx[id]] = slice;
|
||||
goto old_ddx_ok;
|
||||
|
|
@ -477,9 +477,9 @@ static int evergreen_cs_track_validate_cb(struct radeon_cs_parser *p, unsigned i
|
|||
}
|
||||
}
|
||||
dev_warn(p->dev, "%s:%d cb[%d] bo too small (layer size %d, "
|
||||
"offset %d, max layer %d, bo size %ld, slice %d)\n",
|
||||
"offset %llu, max layer %d, bo size %ld, slice %d)\n",
|
||||
__func__, __LINE__, id, surf.layer_size,
|
||||
track->cb_color_bo_offset[id] << 8, mslice,
|
||||
(u64)track->cb_color_bo_offset[id] << 8, mslice,
|
||||
radeon_bo_size(track->cb_color_bo[id]), slice);
|
||||
dev_warn(p->dev, "%s:%d problematic surf: (%d %d) (%d %d %d %d %d %d %d)\n",
|
||||
__func__, __LINE__, surf.nbx, surf.nby,
|
||||
|
|
@ -563,7 +563,7 @@ static int evergreen_cs_track_validate_stencil(struct radeon_cs_parser *p)
|
|||
struct evergreen_cs_track *track = p->track;
|
||||
struct eg_surface surf;
|
||||
unsigned pitch, slice, mslice;
|
||||
unsigned long offset;
|
||||
u64 offset;
|
||||
int r;
|
||||
|
||||
mslice = G_028008_SLICE_MAX(track->db_depth_view) + 1;
|
||||
|
|
@ -609,18 +609,18 @@ static int evergreen_cs_track_validate_stencil(struct radeon_cs_parser *p)
|
|||
return r;
|
||||
}
|
||||
|
||||
offset = track->db_s_read_offset << 8;
|
||||
offset = (u64)track->db_s_read_offset << 8;
|
||||
if (offset & (surf.base_align - 1)) {
|
||||
dev_warn(p->dev, "%s:%d stencil read bo base %ld not aligned with %ld\n",
|
||||
dev_warn(p->dev, "%s:%d stencil read bo base %llu not aligned with %ld\n",
|
||||
__func__, __LINE__, offset, surf.base_align);
|
||||
return -EINVAL;
|
||||
}
|
||||
offset += surf.layer_size * mslice;
|
||||
offset += (u64)surf.layer_size * mslice;
|
||||
if (offset > radeon_bo_size(track->db_s_read_bo)) {
|
||||
dev_warn(p->dev, "%s:%d stencil read bo too small (layer size %d, "
|
||||
"offset %ld, max layer %d, bo size %ld)\n",
|
||||
"offset %llu, max layer %d, bo size %ld)\n",
|
||||
__func__, __LINE__, surf.layer_size,
|
||||
(unsigned long)track->db_s_read_offset << 8, mslice,
|
||||
(u64)track->db_s_read_offset << 8, mslice,
|
||||
radeon_bo_size(track->db_s_read_bo));
|
||||
dev_warn(p->dev, "%s:%d stencil invalid (0x%08x 0x%08x 0x%08x 0x%08x)\n",
|
||||
__func__, __LINE__, track->db_depth_size,
|
||||
|
|
@ -628,18 +628,18 @@ static int evergreen_cs_track_validate_stencil(struct radeon_cs_parser *p)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
offset = track->db_s_write_offset << 8;
|
||||
offset = (u64)track->db_s_write_offset << 8;
|
||||
if (offset & (surf.base_align - 1)) {
|
||||
dev_warn(p->dev, "%s:%d stencil write bo base %ld not aligned with %ld\n",
|
||||
dev_warn(p->dev, "%s:%d stencil write bo base %llu not aligned with %ld\n",
|
||||
__func__, __LINE__, offset, surf.base_align);
|
||||
return -EINVAL;
|
||||
}
|
||||
offset += surf.layer_size * mslice;
|
||||
offset += (u64)surf.layer_size * mslice;
|
||||
if (offset > radeon_bo_size(track->db_s_write_bo)) {
|
||||
dev_warn(p->dev, "%s:%d stencil write bo too small (layer size %d, "
|
||||
"offset %ld, max layer %d, bo size %ld)\n",
|
||||
"offset %llu, max layer %d, bo size %ld)\n",
|
||||
__func__, __LINE__, surf.layer_size,
|
||||
(unsigned long)track->db_s_write_offset << 8, mslice,
|
||||
(u64)track->db_s_write_offset << 8, mslice,
|
||||
radeon_bo_size(track->db_s_write_bo));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -660,7 +660,7 @@ static int evergreen_cs_track_validate_depth(struct radeon_cs_parser *p)
|
|||
struct evergreen_cs_track *track = p->track;
|
||||
struct eg_surface surf;
|
||||
unsigned pitch, slice, mslice;
|
||||
unsigned long offset;
|
||||
u64 offset;
|
||||
int r;
|
||||
|
||||
mslice = G_028008_SLICE_MAX(track->db_depth_view) + 1;
|
||||
|
|
@ -707,34 +707,34 @@ static int evergreen_cs_track_validate_depth(struct radeon_cs_parser *p)
|
|||
return r;
|
||||
}
|
||||
|
||||
offset = track->db_z_read_offset << 8;
|
||||
offset = (u64)track->db_z_read_offset << 8;
|
||||
if (offset & (surf.base_align - 1)) {
|
||||
dev_warn(p->dev, "%s:%d stencil read bo base %ld not aligned with %ld\n",
|
||||
dev_warn(p->dev, "%s:%d stencil read bo base %llu not aligned with %ld\n",
|
||||
__func__, __LINE__, offset, surf.base_align);
|
||||
return -EINVAL;
|
||||
}
|
||||
offset += surf.layer_size * mslice;
|
||||
offset += (u64)surf.layer_size * mslice;
|
||||
if (offset > radeon_bo_size(track->db_z_read_bo)) {
|
||||
dev_warn(p->dev, "%s:%d depth read bo too small (layer size %d, "
|
||||
"offset %ld, max layer %d, bo size %ld)\n",
|
||||
"offset %llu, max layer %d, bo size %ld)\n",
|
||||
__func__, __LINE__, surf.layer_size,
|
||||
(unsigned long)track->db_z_read_offset << 8, mslice,
|
||||
(u64)track->db_z_read_offset << 8, mslice,
|
||||
radeon_bo_size(track->db_z_read_bo));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
offset = track->db_z_write_offset << 8;
|
||||
offset = (u64)track->db_z_write_offset << 8;
|
||||
if (offset & (surf.base_align - 1)) {
|
||||
dev_warn(p->dev, "%s:%d stencil write bo base %ld not aligned with %ld\n",
|
||||
dev_warn(p->dev, "%s:%d stencil write bo base %llu not aligned with %ld\n",
|
||||
__func__, __LINE__, offset, surf.base_align);
|
||||
return -EINVAL;
|
||||
}
|
||||
offset += surf.layer_size * mslice;
|
||||
offset += (u64)surf.layer_size * mslice;
|
||||
if (offset > radeon_bo_size(track->db_z_write_bo)) {
|
||||
dev_warn(p->dev, "%s:%d depth write bo too small (layer size %d, "
|
||||
"offset %ld, max layer %d, bo size %ld)\n",
|
||||
"offset %llu, max layer %d, bo size %ld)\n",
|
||||
__func__, __LINE__, surf.layer_size,
|
||||
(unsigned long)track->db_z_write_offset << 8, mslice,
|
||||
(u64)track->db_z_write_offset << 8, mslice,
|
||||
radeon_bo_size(track->db_z_write_bo));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1005,45 +1005,65 @@ static int r100_cp_init_microcode(struct radeon_device *rdev)
|
|||
|
||||
DRM_DEBUG_KMS("\n");
|
||||
|
||||
if ((rdev->family == CHIP_R100) || (rdev->family == CHIP_RV100) ||
|
||||
(rdev->family == CHIP_RV200) || (rdev->family == CHIP_RS100) ||
|
||||
(rdev->family == CHIP_RS200)) {
|
||||
switch (rdev->family) {
|
||||
case CHIP_R100:
|
||||
case CHIP_RV100:
|
||||
case CHIP_RV200:
|
||||
case CHIP_RS100:
|
||||
case CHIP_RS200:
|
||||
DRM_INFO("Loading R100 Microcode\n");
|
||||
fw_name = FIRMWARE_R100;
|
||||
} else if ((rdev->family == CHIP_R200) ||
|
||||
(rdev->family == CHIP_RV250) ||
|
||||
(rdev->family == CHIP_RV280) ||
|
||||
(rdev->family == CHIP_RS300)) {
|
||||
break;
|
||||
|
||||
case CHIP_R200:
|
||||
case CHIP_RV250:
|
||||
case CHIP_RV280:
|
||||
case CHIP_RS300:
|
||||
DRM_INFO("Loading R200 Microcode\n");
|
||||
fw_name = FIRMWARE_R200;
|
||||
} else if ((rdev->family == CHIP_R300) ||
|
||||
(rdev->family == CHIP_R350) ||
|
||||
(rdev->family == CHIP_RV350) ||
|
||||
(rdev->family == CHIP_RV380) ||
|
||||
(rdev->family == CHIP_RS400) ||
|
||||
(rdev->family == CHIP_RS480)) {
|
||||
break;
|
||||
|
||||
case CHIP_R300:
|
||||
case CHIP_R350:
|
||||
case CHIP_RV350:
|
||||
case CHIP_RV380:
|
||||
case CHIP_RS400:
|
||||
case CHIP_RS480:
|
||||
DRM_INFO("Loading R300 Microcode\n");
|
||||
fw_name = FIRMWARE_R300;
|
||||
} else if ((rdev->family == CHIP_R420) ||
|
||||
(rdev->family == CHIP_R423) ||
|
||||
(rdev->family == CHIP_RV410)) {
|
||||
break;
|
||||
|
||||
case CHIP_R420:
|
||||
case CHIP_R423:
|
||||
case CHIP_RV410:
|
||||
DRM_INFO("Loading R400 Microcode\n");
|
||||
fw_name = FIRMWARE_R420;
|
||||
} else if ((rdev->family == CHIP_RS690) ||
|
||||
(rdev->family == CHIP_RS740)) {
|
||||
break;
|
||||
|
||||
case CHIP_RS690:
|
||||
case CHIP_RS740:
|
||||
DRM_INFO("Loading RS690/RS740 Microcode\n");
|
||||
fw_name = FIRMWARE_RS690;
|
||||
} else if (rdev->family == CHIP_RS600) {
|
||||
break;
|
||||
|
||||
case CHIP_RS600:
|
||||
DRM_INFO("Loading RS600 Microcode\n");
|
||||
fw_name = FIRMWARE_RS600;
|
||||
} else if ((rdev->family == CHIP_RV515) ||
|
||||
(rdev->family == CHIP_R520) ||
|
||||
(rdev->family == CHIP_RV530) ||
|
||||
(rdev->family == CHIP_R580) ||
|
||||
(rdev->family == CHIP_RV560) ||
|
||||
(rdev->family == CHIP_RV570)) {
|
||||
break;
|
||||
|
||||
case CHIP_RV515:
|
||||
case CHIP_R520:
|
||||
case CHIP_RV530:
|
||||
case CHIP_R580:
|
||||
case CHIP_RV560:
|
||||
case CHIP_RV570:
|
||||
DRM_INFO("Loading R500 Microcode\n");
|
||||
fw_name = FIRMWARE_R520;
|
||||
break;
|
||||
|
||||
default:
|
||||
DRM_ERROR("Unsupported Radeon family %u\n", rdev->family);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
err = request_firmware(&rdev->me_fw, fw_name, rdev->dev);
|
||||
|
|
|
|||
|
|
@ -1730,23 +1730,29 @@ struct radeon_encoder_atom_dig *radeon_atombios_get_lvds_info(struct
|
|||
fake_edid_record = (ATOM_FAKE_EDID_PATCH_RECORD *)record;
|
||||
if (fake_edid_record->ucFakeEDIDLength) {
|
||||
struct edid *edid;
|
||||
int edid_size =
|
||||
max((int)EDID_LENGTH, (int)fake_edid_record->ucFakeEDIDLength);
|
||||
edid = kmalloc(edid_size, GFP_KERNEL);
|
||||
if (edid) {
|
||||
memcpy((u8 *)edid, (u8 *)&fake_edid_record->ucFakeEDIDString[0],
|
||||
fake_edid_record->ucFakeEDIDLength);
|
||||
int edid_size;
|
||||
|
||||
if (fake_edid_record->ucFakeEDIDLength == 128)
|
||||
edid_size = fake_edid_record->ucFakeEDIDLength;
|
||||
else
|
||||
edid_size = fake_edid_record->ucFakeEDIDLength * 128;
|
||||
edid = kmemdup(&fake_edid_record->ucFakeEDIDString[0],
|
||||
edid_size, GFP_KERNEL);
|
||||
if (edid) {
|
||||
if (drm_edid_is_valid(edid)) {
|
||||
rdev->mode_info.bios_hardcoded_edid = edid;
|
||||
rdev->mode_info.bios_hardcoded_edid_size = edid_size;
|
||||
} else
|
||||
} else {
|
||||
kfree(edid);
|
||||
}
|
||||
}
|
||||
record += struct_size(fake_edid_record,
|
||||
ucFakeEDIDString,
|
||||
edid_size);
|
||||
} else {
|
||||
/* empty fake edid record must be 3 bytes long */
|
||||
record += sizeof(ATOM_FAKE_EDID_PATCH_RECORD) + 1;
|
||||
}
|
||||
record += fake_edid_record->ucFakeEDIDLength ?
|
||||
fake_edid_record->ucFakeEDIDLength + 2 :
|
||||
sizeof(ATOM_FAKE_EDID_PATCH_RECORD);
|
||||
break;
|
||||
case LCD_PANEL_RESOLUTION_RECORD_TYPE:
|
||||
panel_res_record = (ATOM_PANEL_RESOLUTION_PATCH_RECORD *)record;
|
||||
|
|
|
|||
|
|
@ -390,6 +390,8 @@ static void dw_hdmi_rk3328_setup_hpd(struct dw_hdmi *dw_hdmi, void *data)
|
|||
HIWORD_UPDATE(RK3328_HDMI_SDAIN_MSK | RK3328_HDMI_SCLIN_MSK,
|
||||
RK3328_HDMI_SDAIN_MSK | RK3328_HDMI_SCLIN_MSK |
|
||||
RK3328_HDMI_HPD_IOE));
|
||||
|
||||
dw_hdmi_rk3328_read_hpd(dw_hdmi, data);
|
||||
}
|
||||
|
||||
static const struct dw_hdmi_phy_ops rk3228_hdmi_phy_ops = {
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue