Merge tag 'android12-5.10.214_r00' into android12-5.10

This catches the android12-5.10 branch up to the 5.10.214 LTS release.
Included in here are the following commits:

* ca0eb54113 ANDROID: cpufreq: brcmstb-avs-cpufreq: fix build error
* 8215d23ef6 Revert "remoteproc: Add new get_loaded_rsc_table() to rproc_ops"
* 453106487d Revert "remoteproc: stm32: Move resource table setup to rproc_ops"
* 14fe873d43 Revert "remoteproc: stm32: Fix incorrect type assignment returned by stm32_rproc_get_loaded_rsc_tablef"
* 7cb2a3c384 Revert "remoteproc: stm32: fix phys_addr_t format string"
* a626900b07 Revert "remoteproc: stm32: use correct format strings on 64-bit"
* b05356dd8a Revert "remoteproc: stm32: Fix incorrect type in assignment for va"
* f21d21f05e Revert "block: add a new set_read_only method"
* 560f181cad Revert "md: implement ->set_read_only to hook into BLKROSET processing"
* 2c7d369ecc Revert "md: Don't clear MD_CLOSING when the raid is about to stop"
* e2ddf25269 Revert "bpf: Defer the free of inner map when necessary"
* 38a24db1c2 Revert "net: ip_tunnel: make sure to pull inner header in ip_tunnel_rcv()"
*   dd27b89022 Merge 5.10.214 into android12-5.10-lts
|\
| * dfa3825910 Linux 5.10.214
| * 5148026b65 remoteproc: stm32: fix phys_addr_t format string
| * a943eb8283 regmap: Add missing map->bus check
| * bcfcdf1969 spi: spi-mt65xx: Fix NULL pointer access in interrupt handler
| * 6c46d680e4 bpf: report RCU QS in cpumap kthread
| * aad6bb260b rcu: add a helper to report consolidated flavor QS
| * fcf32a5bfc netfilter: nf_tables: do not compare internal table flags on updates
| * 096245bb7f ARM: dts: sun8i-h2-plus-bananapi-m2-zero: add regulator nodes vcc-dram and vcc1v2
| * f205ed8d9e scsi: fc: Update formal FPIN descriptor definitions
| * b36b83297f netfilter: nft_set_pipapo: release elements in clone only from destroy path
| * 766c2627ac octeontx2-af: Use separate handlers for interrupts
| * 8eebff95ce net/bnx2x: Prevent access to a freed page in page_pool
| * f6c6ca618e hsr: Handle failures in module init
| * 1e1e4316fc rds: introduce acquire/release ordering in acquire/release_in_xmit()
| * f87884e0df wireguard: receive: annotate data-race around receiving_counter.counter
| * d0ab075e34 net: dsa: mt7530: prevent possible incorrect XTAL frequency selection
| * 68e8412031 packet: annotate data-races around ignore_outgoing
| * 7fb2d4d6bb hsr: Fix uninit-value access in hsr_get_node()
| * cdff6144b0 soc: fsl: dpio: fix kcalloc() argument order
| * 76d1394d9b s390/vtime: fix average steal time calculation
| * ce061bf4ef octeontx2-af: Use matching wake_up API variant in CGX command interface
| * 2ddc931ccc io_uring: don't save/restore iowait state
| * ed71e73693 usb: gadget: net2272: Use irqflags in the call to net2272_probe_fin
| * 745c27184b staging: greybus: fix get_channel_from_mode() failure path
| * a4d503856a serial: 8250_exar: Don't remove GPIO device on suspend
| * 864f17c134 rtc: mt6397: select IRQ_DOMAIN instead of depending on it
| * 87ddba29e7 kconfig: fix infinite loop when expanding a macro at the end of file
| * 1639e9c7a3 tty: serial: samsung: fix tx_empty() to return TIOCSER_TEMT
| * 1eb9ab1f9f serial: max310x: fix syntax error in IRQ error message
| * 6199e1942e tty: vt: fix 20 vs 0x20 typo in EScsiignore
| * 40260d0649 remoteproc: stm32: Fix incorrect type assignment returned by stm32_rproc_get_loaded_rsc_tablef
| * 0dd5b63ae2 remoteproc: stm32: Fix incorrect type in assignment for va
| * f0b0a4de78 remoteproc: stm32: use correct format strings on 64-bit
| * 9d057eacf8 remoteproc: stm32: Move resource table setup to rproc_ops
| * 7b95472049 remoteproc: Add new get_loaded_rsc_table() to rproc_ops
| * 1d7e9bc40a remoteproc: stm32: Constify st_rproc_ops
| * b94f434fe9 afs: Revert "afs: Hide silly-rename files from userspace"
| * b8c52f7d08 NFS: Fix an off by one in root_nfs_cat()
| * 32903ecf21 watchdog: stm32_iwdg: initialize default timeout
| * 916ee6deae NFSv4.2: fix listxattr maximum XDR buffer size
| * 4403438eac NFSv4.2: fix nfs4_listxattr kernel BUG at mm/usercopy.c:102
| * 84ec5c0a7f net: sunrpc: Fix an off by one in rpc_sockaddr2uaddr()
| * a2b74f35ee scsi: bfa: Fix function pointer type mismatch for hcb_qe->cbfn
| * 11adfabee1 RDMA/device: Fix a race between mad_client and cm_client init
| * 3ac85382bc scsi: csiostor: Avoid function pointer casts
| * 6370d070e2 f2fs: compress: fix to check unreleased compressed cluster
| * bdd895e019 RDMA/srpt: Do not register event handler until srpt device is fully setup
| * 5cd466673b ALSA: usb-audio: Stop parsing channels bits when all channels are found.
| * 4266f6e726 ALSA: hda/realtek: fix ALC285 issues on HP Envy x360 laptops
| * 239174535d clk: Fix clk_core_get NULL dereference
| * e55a601463 sparc32: Fix section mismatch in leon_pci_grpci
| * 6ec49d0790 backlight: lp8788: Fully initialize backlight_properties during probe
| * ad70a7888e backlight: lm3639: Fully initialize backlight_properties during probe
| * f3bd1e36f0 backlight: da9052: Fully initialize backlight_properties during probe
| * f58ce2bed9 backlight: lm3630a: Don't set bl->props.brightness in get_brightness
| * fc43d668c9 backlight: lm3630a: Initialize backlight_properties on init
| * 97b397aa3f leds: sgm3140: Add missing timer cleanup and flash gpio control
| * b9040d5746 leds: aw2013: Unlock mutex before destroying it
| * 72f9bf6ddb powerpc/embedded6xx: Fix no previous prototype for avr_uart_send() etc.
| * cfb3a57e7b drm/msm/dpu: add division of drm_display_mode's hskew parameter
| * fd639cb8fa powerpc/hv-gpci: Fix the H_GET_PERF_COUNTER_INFO hcall return value checks
| * 4688be96d2 drm/mediatek: Fix a null pointer crash in mtk_drm_crtc_finish_page_flip
| * 6c5a15622e media: mediatek: vcodec: avoid -Wcast-function-type-strict warning
| * 910363473e media: ttpci: fix two memleaks in budget_av_attach
| * b49fe84c6c media: go7007: fix a memleak in go7007_load_encoder
| * fb07104a02 media: dvb-frontends: avoid stack overflow warnings with clang
| * ab896d93fd media: pvrusb2: fix uaf in pvr2_context_set_notify
| * 1c5620f99a drm/amdgpu: Fix missing break in ATOM_ARG_IMM Case of atom_get_src_int()
| * 24d71c7e46 ASoC: meson: axg-tdm-interface: add frame rate constraint
| * 4bc8e7f3a1 ASoC: meson: axg-tdm-interface: fix mclk setup without mclk-fs
| * fe9796edda mtd: rawnand: lpc32xx_mlc: fix irq handler prototype
| * 2c8a6d2bef mtd: maps: physmap-core: fix flash size larger than 32-bit
| * 858839c64b drm/tidss: Fix initial plane zpos values
| * 9e42bebd4b crypto: arm/sha - fix function cast warnings
| * 9883ac6894 mfd: altera-sysmgr: Call of_node_put() only when of_parse_phandle() takes a ref
| * df6924449f mfd: syscon: Call of_node_put() only when of_parse_phandle() takes a ref
| * bd5f2747e3 drm/tegra: put drm_gem_object ref on error in tegra_fb_create
| * 2d476959f2 clk: hisilicon: hi3519: Release the correct number of gates in hi3519_clk_unregister()
| * 7057b8fa76 PCI: Mark 3ware-9650SE Root Port Extended Tags as broken
| * 792e642859 drm/mediatek: dsi: Fix DSI RGB666 formats and definitions
| * 85e2d91660 clk: qcom: dispcc-sdm845: Adjust internal GDSC wait times
| * 0680a58e2d media: pvrusb2: fix pvr2_stream_callback casts
| * 964f45a784 media: pvrusb2: remove redundant NULL check
| * 1f8d45cd0e media: go7007: add check of return value of go7007_read_addr()
| * 5d9fe604bf media: imx: csc/scaler: fix v4l2_ctrl_handler memory leak
| * c753ca1e5a media: sun8i-di: Fix chroma difference threshold
| * 6b5791c540 media: sun8i-di: Fix power on/off sequences
| * d2f806664c media: sun8i-di: Fix coefficient writes
| * 47588154b1 ASoC: meson: t9015: fix function pointer type mismatch
| * 3df9cd610b ASoC: meson: aiu: fix function pointer type mismatch
| * ac85b84241 ASoC: meson: Use dev_err_probe() helper
| * bae8577ea7 perf stat: Avoid metric-only segv
| * eca94a4b07 ALSA: seq: fix function cast warnings
| * 33a44d8759 drm/radeon/ni: Fix wrong firmware size logging in ni_init_microcode()
| * 89526d7728 perf thread_map: Free strlist on normal path in thread_map__new_by_tid_str()
| * 8a01335aed crypto: xilinx - call finalize with bh disabled
| * 38e61b7511 PCI: switchtec: Fix an error handling path in switchtec_pci_probe()
| * ca1cd5605a quota: Fix rcu annotations of inode dquot pointers
| * 61380537aa quota: Fix potential NULL pointer dereference
| * 00684e9328 quota: simplify drop_dquot_ref()
| * 2e005642a6 clk: qcom: reset: Ensure write completion on reset de/assertion
| * b30800467c clk: qcom: reset: Commonize the de/assert functions
| * 160095aada pinctrl: mediatek: Drop bogus slew rate register range for MT8192
| * 096237039d media: edia: dvbdev: fix a use-after-free
| * afd2a82fe3 media: v4l2-mem2mem: fix a memleak in v4l2_m2m_register_entity
| * 94303a06e1 media: v4l2-tpg: fix some memleaks in tpg_alloc
| * 19cb33fa22 media: em28xx: annotate unchecked call to media_device_register()
| * 892d955f8e perf evsel: Fix duplicate initialization of data->id in evsel__parse_sample()
| * 330caa061a drm/amd/display: Fix potential NULL pointer dereferences in 'dcn10_set_output_transfer_func()'
| * ff28893c96 drm/amd/display: Fix a potential buffer overflow in 'dp_dsc_clock_en_read()'
| * 53dea95c23 HID: lenovo: Add middleclick_workaround sysfs knob for cptkbd
| * 7007354d0c perf record: Fix possible incorrect free in record__switch_output()
| * ed2be47b8d PCI/DPC: Print all TLP Prefixes, not just the first
| * 610f20e5cf media: tc358743: register v4l2 async device only after successful setup
| * 2c58c4dda2 dmaengine: tegra210-adma: Update dependency to ARCH_TEGRA
| * f2e80ac934 drm/lima: fix a memleak in lima_heap_alloc
| * e0d4850ecd drm/rockchip: lvds: do not print scary message when probing defer
| * 375a60fce4 drm/rockchip: lvds: do not overwrite error code
| * 2cb881069e drm: Don't treat 0 as -1 in drm_fixp2int_ceil
| * fbb37b3977 drm/rockchip: inno_hdmi: Fix video timing
| * b7a82cfb85 drm/tegra: output: Fix missing i2c_put_adapter() in the error handling paths of tegra_output_probe()
| * f95401a509 drm/tegra: dsi: Fix missing pm_runtime_disable() in the error handling path of tegra_dsi_probe()
| * 317155c5fa drm/tegra: dsi: Fix some error handling paths in tegra_dsi_probe()
| * 0e8c9283e5 drm/tegra: dsi: Make use of the helper function dev_err_probe()
| * 92003981a6 drm/tegra: dsi: Add missing check for of_find_device_by_node
| * f89bd27709 dm: call the resume method on internal suspend
| * 94a6a9cfbf dm raid: fix false positive for requeue needed during reshape
| * 928705e341 nfp: flower: handle acti_netdevs allocation failure
| * e9b72f729d net/x25: fix incorrect parameter validation in the x25_getsockopt() function
| * 3627f21b9e net: kcm: fix incorrect parameter validation in the kcm_getsockopt) function
| * 03c74f548f udp: fix incorrect parameter validation in the udp_lib_getsockopt() function
| * b42e564358 l2tp: fix incorrect parameter validation in the pppol2tp_getsockopt() function
| * 5a98fa3332 ipmr: fix incorrect parameter validation in the ip_mroute_getsockopt() function
| * 8693e3cf0c bpf: net: Change do_ip_getsockopt() to take the sockptr_t argument
| * 415edd2d66 net/ipv4/ipv6: Replace one-element arraya with flexible-array members
| * 7394669d59 net/ipv4: Revert use of struct_size() helper
| * 1ebd0d898f net/ipv4: Replace one-element array with flexible-array member
| * c805987631 tcp: fix incorrect parameter validation in the do_tcp_getsockopt() function
| * 1f6244e995 OPP: debugfs: Fix warning around icc_get_name()
| * 6cf2e53315 net: phy: dp83822: Fix RGMII TX delay configuration
| * c44a5aa4be net: phy: DP83822: enable rgmii mode if phy_interface_is_rgmii
| * a352d039ff net: hns3: fix port duplex configure error in IMP reset
| * 06dd21045a net: phy: fix phy_get_internal_delay accessing an empty array
| * 77fd5294ea net: ip_tunnel: make sure to pull inner header in ip_tunnel_rcv()
| * edcec23634 ipv6: fib6_rules: flush route cache when rule is changed
| * 15641007df bpf: Fix stackmap overflow check on 32-bit arches
| * 64f00b4df0 bpf: Fix hashtab overflow check on 32-bit arches
| * 225da02acd bpf: Fix DEVMAP_HASH overflow check on 32-bit arches
| * 70294d8bc3 bpf: Eliminate rlimit-based memory accounting for devmap maps
| * 6b4a39acaf sr9800: Add check for usbnet_get_endpoints
| * d47e6c1932 Bluetooth: hci_core: Fix possible buffer overflow
| * 69d9425b88 Bluetooth: Remove superfluous call to hci_conn_check_pending()
| * cbe742db8b igb: Fix missing time sync events
| * 02cba67662 igb: move PEROUT and EXTTS isr logic to separate functions
| * f873b85ec7 iommu/vt-d: Don't issue ATS Invalidation request when device is disconnected
| * f858c084eb PCI: Make pci_dev_is_disconnected() helper public for other drivers
| * 722c24cddc wifi: rtw88: 8821c: Fix false alarm count
| * c55cc63638 mmc: wmt-sdmmc: remove an incorrect release_mem_region() call in the .remove function
| * bb336cd8d5 SUNRPC: fix some memleaks in gssx_dec_option_array
| * a4e7ff1a74 x86, relocs: Ignore relocations in .notes section
| * 47a429a524 ACPI: scan: Fix device check notification handling
| * 5f99b46dce arm64: dts: marvell: reorder crypto interrupts on Armada SoCs
| * 46792f9ba3 ARM: dts: imx6dl-yapp4: Move the internal switch PHYs under the switch node
| * 2d1e515789 ARM: dts: imx6dl-yapp4: Fix typo in the QCA switch register address
| * 23d0549448 ARM: dts: imx6dl-yapp4: Move phy reset into switch node
| * 229563e216 ARM: dts: arm: realview: Fix development chip ROM compatible value
| * 2478026f94 net: ena: Remove ena_select_queue
| * 98d186a142 wifi: brcmsmac: avoid function pointer casts
| * fb7601ebf6 iommu/amd: Mark interrupt as managed
| * be8c53390a bus: tegra-aconnect: Update dependency to ARCH_TEGRA
| * c2a30c81bf ACPI: processor_idle: Fix memory leak in acpi_processor_power_exit()
| * 5956f4203b wifi: wilc1000: prevent use-after-free on vif when cleaning up all interfaces
| * 115252fc61 wireless: Remove redundant 'flush_workqueue()' calls
| * 23278c845a bpf: Mark bpf_spin_{lock,unlock}() helpers with notrace correctly
| * c5f2076aaa bpf: Factor out bpf_spin_lock into helpers.
| * dfd8a62a10 arm64: dts: mediatek: mt7622: add missing "device_type" to memory nodes
| * f0dd27314c wifi: libertas: fix some memleaks in lbs_allocate_cmd_buffer()
| * 7d4b47f20f net: blackhole_dev: fix build warning for ethh set but not used
| * 918d7f0d3e wifi: iwlwifi: fix EWRD table validity check
| * fabe2db7de wifi: iwlwifi: dbg-tlv: ensure NUL termination
| * 1bc5461a21 wifi: ath9k: delay all of ath9k_wmi_event_tasklet() until init is complete
| * bdaf08b472 af_unix: Annotate data-race of gc_in_progress in wait_for_unix_gc().
| * 1524f46376 bpftool: Silence build warning about calloc()
| * 926d95eb39 inet_diag: annotate data-races around inet_diag_table[]
| * 784412247e sock_diag: annotate data-races around sock_diag_handlers[family]
| * 9127599c07 cpufreq: brcmstb-avs-cpufreq: add check for cpufreq_cpu_get's return value
| * 11824d6a8a wifi: mwifiex: debugfs: Drop unnecessary error check for debugfs_create_dir()
| * 5aa586bf80 wifi: wilc1000: fix multi-vif management when deleting a vif
| * dddedfa3b2 wifi: rtl8xxxu: add cancel_work_sync() for c2hcmd_work
| * b4bbf38c35 wifi: wilc1000: fix RCU usage in connect path
| * fd86efb897 wifi: wilc1000: fix declarations ordering
| * caa839d40e wifi: b43: Disable QoS for bcm4331
| * 39c915a323 wifi: b43: Stop correct queue in DMA worker when QoS is disabled
| * 871788995c wifi: b43: Stop/wake correct queue in PIO Tx path when QoS is disabled
| * 49f067726a wifi: b43: Stop/wake correct queue in DMA Tx path when QoS is disabled
| * e1dc7aa814 wifi: ath10k: fix NULL pointer dereference in ath10k_wmi_tlv_op_pull_mgmt_tx_compl_ev()
| * c6fd906c3c timekeeping: Fix cross-timestamp interpolation for non-x86
| * 763a009228 timekeeping: Fix cross-timestamp interpolation corner case decision
| * fe90806209 timekeeping: Fix cross-timestamp interpolation on counter wrap
| * faf0b4c5e0 aoe: fix the potential use-after-free problem in aoecmd_cfg_pkts
| * bb567cb5cd md: Don't clear MD_CLOSING when the raid is about to stop
| * ab25f7cd49 md: implement ->set_read_only to hook into BLKROSET processing
| * 2a0f8202f7 block: add a new set_read_only method
| * a0bccba5f5 fs/select: rework stack allocation hack for clang
| * 4af837db0f nbd: null check for nla_nest_start
| * cde76b3af2 do_sys_name_to_handle(): use kzalloc() to fix kernel-infoleak
| * cc6ddd6fa9 x86/paravirt: Fix build due to __text_gen_insn() backport
| * 0344b12a97 ASoC: wm8962: Fix up incorrect error message in wm8962_set_fll
| * cd72f7de5b ASoC: wm8962: Enable both SPKOUTR_ENA and SPKOUTL_ENA in mono mode
| * 423d747fa3 ASoC: wm8962: Enable oscillator if selecting WM8962_FLL_OSC
| * 442864752b Input: gpio_keys_polled - suppress deferred probe error for gpio
| * 020601445f ASoC: Intel: bytcr_rt5640: Add an extra entry for the Chuwi Vi8 tablet
| * 713eaf5c51 firewire: core: use long bus reset on gap count error
| * 81d7d920a2 Bluetooth: rfcomm: Fix null-ptr-deref in rfcomm_check_security
| * ba3a55d118 scsi: mpt3sas: Prevent sending diag_reset when the controller is ready
| * e30b8525e1 dm-verity, dm-crypt: align "struct bvec_iter" correctly
| * 87221877ed block: sed-opal: handle empty atoms when parsing response
| * d2e2cb5258 parisc/ftrace: add missing CONFIG_DYNAMIC_FTRACE check
| * 3e0f73be40 net/iucv: fix the allocation size of iucv_path_table array
| * 6e4694e65b x86/mm: Disallow vsyscall page read for copy_from_kernel_nofault()
| * aa64355c45 x86/mm: Move is_vsyscall_vaddr() into asm/vsyscall.h
| * 434a709df1 RDMA/mlx5: Relax DEVX access upon modify commands
| * d27c48dc30 RDMA/mlx5: Fix fortify source warning while accessing Eth segment
| * 0f9fa4e6b2 gen_compile_commands: fix invalid escape sequence warning
| * a8fee6674b HID: multitouch: Add required quirk for Synaptics 0xcddc device
| * df14e946ea MIPS: Clear Cause.BD in instruction_pointer_set
| * eb279074ba x86/xen: Add some null pointer checking to smp.c
| * eddf7e95b8 ASoC: rt5645: Make LattePanda board DMI match more precise
| * 8e2113f61d selftests: tls: use exact comparison in recv_partial
| * 90c445799f bpf: Defer the free of inner map when necessary
| * 93c37f1c63 rcu-tasks: Provide rcu_trace_implies_rcu_gp()
| * a6771f343a io_uring: drop any code related to SCM_RIGHTS
| * 875f5fed30 io_uring/unix: drop usage of io_uring socket
* | 4a3d04deae Revert "regmap: allow to define reg_update_bits for no bus configuration"
* | d499d2888d Revert "regmap: Add bulk read/write callbacks into regmap_config"
* | 2f6cd4ffaf Revert "serial: max310x: make accessing revision id interface-agnostic"
* | 505653748e Revert "serial: max310x: implement I2C support"
* | d845bebb84 Revert "serial: max310x: fix IO data corruption in batched operations"
* | bbcfe35f4e Revert "geneve: make sure to pull inner header in geneve_rx()"
* | 578a3af78b Merge 5.10.213 into android12-5.10-lts
|\|
| * d35f38551c Linux 5.10.213
| * 738845b022 serial: max310x: fix IO data corruption in batched operations
| * 85d7947871 serial: max310x: implement I2C support
| * 8082cc992d serial: max310x: make accessing revision id interface-agnostic
| * f36ef837a7 regmap: Add bulk read/write callbacks into regmap_config
| * 915848be2f regmap: allow to define reg_update_bits for no bus configuration
| * 82a62478b9 Drivers: hv: vmbus: Drop error message when 'No request id available'
| * 74d83d0fe0 serial: max310x: Unprepare and disable clock in error path
| * f610023e67 getrusage: use sig->stats_lock rather than lock_task_sighand()
| * 9ca9786820 getrusage: use __for_each_thread()
| * 21677f35e1 getrusage: move thread_group_cputime_adjusted() outside of lock_task_sighand()
| * 811415fe76 getrusage: add the "signal_struct *sig" local variable
| * 14136bed41 mm: hugetlb pages should not be reserved by shmat() if SHM_NORESERVE
| * 05edf43452 mm/hugetlb: change hugetlb_reserve_pages() to type bool
| * 5b10a88f64 hv_netvsc: Register VF in netvsc_probe if NET_DEVICE_REGISTER missed
| * 8f41b33d24 hv_netvsc: use netif_is_bond_master() instead of open code
| * 0d54d2240d hv_netvsc: Make netvsc/VF binding check both MAC and serial number
| * 3cfee5668b hv_netvsc: Process NETDEV_GOING_DOWN on VF hot remove
| * 0db98ee09b hv_netvsc: Wait for completion on request SWITCH_DATA_PATH
| * cdba035680 hv_netvsc: Use vmbus_requestor to generate transaction IDs for VMBus hardening
| * 2ce3663500 Drivers: hv: vmbus: Add vmbus_requestor data structure for VMBus hardening
| * 58bf67d524 ext4: convert to exclusive lock while inserting delalloc extents
| * 5b69dabd7e ext4: refactor ext4_da_map_blocks()
| * b3bca5e8c7 ext4: make ext4_es_insert_extent() return void
| * c09ffff246 lsm: fix default return value of the socket_getpeersec_*() hooks
| * ea6e87db90 lsm: make security_socket_getpeersec_stream() sockptr_t safe
| * a9482f3b48 bpf: net: Change sk_getsockopt() to take the sockptr_t argument
| * be155e9466 net: Change sock_getsockopt() to take the sk ptr instead of the sock ptr
| * 518ec3da99 serial: max310x: prevent infinite while() loop in port startup
| * fe0d16b3a3 serial: max310x: use a separate regmap for each port
| * c1ecaadbcd serial: max310x: use regmap methods for SPI batch operations
| * 32e32ab1da serial: max310x: Make use of device properties
| * c7e9e6d5ee serial: max310x: fail probe if clock crystal is unstable
| * c2b9cbf09e serial: max310x: Try to get crystal clock rate from property
| * 569154b29a serial: max310x: Use devm_clk_get_optional() to get the input clock
| * 696e4112e5 xhci: handle isoc Babble and Buffer Overrun events properly
| * fe2322caa0 xhci: process isoc TD properly when there was a transaction error mid TD.
| * fa5aaf31e5 xhci: prevent double-fetch of transfer and transfer event TRBs
| * 89ed7ebae4 xhci: remove extra loop in interrupt context
| * 9c398afd49 um: allow not setting extra rpaths in the linux binary
| * c9c3cc6a13 selftests: mm: fix map_hugetlb failure on 64K page size systems
| * 1dee72c021 selftests/mm: switch to bash from sh
| * bbf950a6e9 netrom: Fix data-races around sysctl_net_busy_read
| * cfe0f73fb3 netrom: Fix a data-race around sysctl_netrom_link_fails_count
| * b7d33e083f netrom: Fix a data-race around sysctl_netrom_routing_control
| * 01d4e3afe2 netrom: Fix a data-race around sysctl_netrom_transport_no_activity_timeout
| * 652b0b3581 netrom: Fix a data-race around sysctl_netrom_transport_requested_window_size
| * f3315a6eda netrom: Fix a data-race around sysctl_netrom_transport_busy_delay
| * 34c84e0036 netrom: Fix a data-race around sysctl_netrom_transport_acknowledge_delay
| * 34a164d244 netrom: Fix a data-race around sysctl_netrom_transport_maximum_tries
| * 291d36d772 netrom: Fix a data-race around sysctl_netrom_transport_timeout
| * d1261bde59 netrom: Fix data-races around sysctl_netrom_network_ttl_initialiser
| * 18c95d11c3 netrom: Fix a data-race around sysctl_netrom_obsolescence_count_initialiser
| * e041df5dc9 netrom: Fix a data-race around sysctl_netrom_default_path_quality
| * ccd1108b16 netfilter: nf_conntrack_h323: Add protection for bmp length out of range
| * 2b4e7cb7d5 netfilter: nft_ct: fix l3num expectations with inet pseudo family
| * 9dfc15a10d net/rds: fix WARNING in rds_conn_connect_if_down
| * 5f4e51abfb cpumap: Zero-initialise xdp_rxq_info struct before running XDP program
| * 79ce2e54cc net/ipv6: avoid possible UAF in ip6_route_mpath_notify()
| * 37fe99016b net: ice: Fix potential NULL pointer dereference in ice_bridge_setlink()
| * c713790069 geneve: make sure to pull inner header in geneve_rx()
| * fdb63c179f tracing/net_sched: Fix tracepoints that save qdisc_dev() as a string
| * 71e21eb1f8 i40e: disable NAPI right after disabling irqs when handling xsk_pool
| * ad91d5d1b6 ixgbe: {dis, en}able irqs in ixgbe_txrx_ring_{dis, en}able
| * 336261af04 net: lan78xx: fix runtime PM count underflow on link stop
| * 11a3c9f489 lan78xx: Fix race conditions in suspend/resume handling
| * 69215f8eda lan78xx: Fix partial packet errors on suspend/resume
| * e5d7f43c4c lan78xx: Add missing return code checks
| * 061336268e lan78xx: Fix white space and style issues
| * 0224cbc53b mmc: mmci: stm32: fix DMA API overlapping mappings warning
| * abda366ece mmc: mmci: stm32: use a buffer for unaligned DMA requests
* | 52795b4903 Merge 5.10.212 into android12-5.10-lts
|\|
| * 7cfcd0ed92 Linux 5.10.212
| * f74362a004 mptcp: fix double-free on socket dismantle
| * 30d84d87c3 mtd: spinand: gigadevice: fix Quad IO for GD5F1GQ5UExxG
| * 1805131d8f gpio: fix resource unwinding order in error path
| * 51f7044d10 gpiolib: Fix the error path order in gpiochip_add_data_with_key()
| * 947baae185 gpio: 74x164: Enable output pins after registers are reset
| * 80d8522999 fs,hugetlb: fix NULL pointer dereference in hugetlbs_fill_super
| * 43eccc5823 cachefiles: fix memory leak in cachefiles_add_cache()
| * 2871728127 ext4: avoid bb_free and bb_fragments inconsistency in mb_free_blocks()
| * 70e5b01353 mptcp: fix possible deadlock in subflow diag
| * 36103f8cb9 x86/cpu/intel: Detect TME keyid bits before setting MTRR mask registers
| * 7a7cb5266b pmdomain: qcom: rpmhpd: Fix enabled_corner aggregation
| * 36b02df0a6 mmc: sdhci-xenon: fix PHY init clock stability
| * d3c703c22b mmc: sdhci-xenon: add timeout for PHY init complete
| * 3fd14520dd mmc: core: Fix eMMC initialization with 1-bit bus connection
| * 9579a21e99 dmaengine: fsl-qdma: init irq after reg initialization
| * bb3a06e9b9 dmaengine: fsl-qdma: fix SoC may hang on 16 byte unaligned read
| * 2886fe308a btrfs: dev-replace: properly validate device names
| * 99eb215968 wifi: nl80211: reject iftype change with mesh ID change
| * e668b92a3a gtp: fix use-after-free and null-ptr-deref in gtp_newlink()
| * a23ac1788e tomoyo: fix UAF write bug in tomoyo_write_control()
| * 8af1c121b0 riscv: Sparse-Memory/vmemmap out-of-bounds fix
| * 96370ba395 afs: Fix endless loop in directory parsing
| * 14aacfcd73 ALSA: Drop leftover snd-rtctimer stuff from Makefile
| * d7acc4a569 power: supply: bq27xxx-i2c: Do not free non existing IRQ
| * 537e3f49db efi/capsule-loader: fix incorrect allocation size
| * 882a51a10e rtnetlink: fix error logic of IFLA_BRIDGE_FLAGS writing back
| * 80fabcd5d1 netfilter: nf_tables: allow NFPROTO_INET in nft_(match/target)_validate()
| * e24acaefdd Bluetooth: Enforce validation on max value of connection interval
| * df193568d6 Bluetooth: hci_event: Fix handling of HCI_EV_IO_CAPA_REQUEST
| * 0309b68aea Bluetooth: hci_event: Fix wrongly recorded wakeup BD_ADDR
| * 6dd0a9dfa9 Bluetooth: Avoid potential use-after-free in hci_error_reset
| * 6782a54e1a net: usb: dm9601: fix wrong return value in dm9601_mdio_read
| * c1c7396b57 lan78xx: enable auto speed configuration for LAN7850 if no EEPROM is detected
| * 810fa7d5e5 ipv6: fix potential "struct net" leak in inet6_rtm_getaddr()
| * 906986fed8 tun: Fix xdp_rxq_info's queue_index when detaching
| * 2e95350fe9 net: ip_tunnel: prevent perpetual headroom growth
| * f19d1f98e6 netlink: Fix kernel-infoleak-after-free in __skb_datagram_iter
| * acd9f6d481 mtd: spinand: gigadevice: Fix the get ecc status issue
| * 8e3a867593 mtd: spinand: gigadevice: Support GD5F1GQ5UExxG
| * 37077ed16c crypto: virtio/akcipher - Fix stack overflow on memcpy
| * bf85def4b6 platform/x86: touchscreen_dmi: Allow partial (prefix) matches for ACPI names
* | 67b086c845 Revert "mptcp: fix lockless access in subflow ULP diag"
* | 92a0d7e20f Revert "net: dev: Convert sa_data to flexible array in struct sockaddr"
* | bb807b14f3 Revert "arp: Prevent overflow in arp_req_get()."
* | 888e5e5b56 Revert "usb: roles: fix NULL pointer issue when put module's reference"
* | 72f354f396 Revert "usb: roles: don't get/set_role() when usb_role_switch is unregistered"
* | e92b643b4b Merge 5.10.211 into android12-5.10-lts
|/
* 9985c44f23 Linux 5.10.211
* 94ebf71bdd ext4: regenerate buddy after block freeing failed if under fc replay
* dbc9b22d0e arp: Prevent overflow in arp_req_get().
* ea1cd64d59 fs/aio: Restrict kiocb_set_cancel_fn() to I/O submitted via libaio
* bff0a0658e block: ataflop: more blk-mq refactoring fixes
* b49b022f7d drm/amd/display: Fix memory leak in dm_sw_fini()
* c6551ff227 drm/syncobj: call drm_syncobj_fence_add_wait when WAIT_AVAILABLE flag is set
* 144ec5e1ce drm/syncobj: make lockdep complain on WAIT_FOR_SUBMIT v3
* 31ea574aec netfilter: nf_tables: set dormant flag on hook register failure
* 31e10d6cb0 tls: stop recv() if initial process_rx_list gave us non-DATA
* 7c54eaa3b0 tls: rx: drop pointless else after goto
* 4820e84e28 tls: rx: jump to a more appropriate label
* 5d4e4eff79 s390: use the correct count for __iowrite64_copy()
* f6ce90567e net: dev: Convert sa_data to flexible array in struct sockaddr
* c1b447a21a packet: move from strlcpy with unused retval to strscpy
* 65c38f23d1 ipv6: sr: fix possible use-after-free and null-ptr-deref
* d9b5e2b7a8 afs: Increase buffer size in afs_update_volume_status()
* 2f56d71262 ipv6: properly combine dev_base_seq and ipv6.dev_addr_genid
* dcc1375d41 ipv4: properly combine dev_base_seq and ipv4.dev_addr_genid
* fc30793e06 nouveau: fix function cast warnings
* 49ef33a90e scsi: jazz_esp: Only build if SCSI core is builtin
* b42b801aba bpf, scripts: Correct GPL license name
* a2d1e1f8f0 RDMA/srpt: fix function pointer cast warnings
* 905de68fcd arm64: dts: rockchip: set num-cs property for spi on px30
* 5639414a52 RDMA/qedr: Fix qedr_create_user_qp error flow
* 5a5c039dac RDMA/srpt: Support specifying the srpt_service_guid parameter
* 179bb08834 RDMA/bnxt_re: Return error for SRQ resize
* 3fa240bb6b IB/hfi1: Fix a memleak in init_credit_return
* 8affdbb3e2 mptcp: fix lockless access in subflow ULP diag
* eb3693454b usb: roles: don't get/set_role() when usb_role_switch is unregistered
* e279bf8e51 usb: roles: fix NULL pointer issue when put module's reference
* 57ca0e16f3 usb: gadget: ncm: Avoid dropping datagrams of properly parsed NTBs
* 1e204a8e9e usb: cdns3: fix memory double free when handle zero packet
* b40328eea9 usb: cdns3: fixed memory use after free at cdns3_gadget_ep_disable()
* 1dfe6393d1 x86/alternative: Make custom return thunk unconditional
* dd1a169b44 Revert "x86/alternative: Make custom return thunk unconditional"
* e8e9d1f6cf x86/returnthunk: Allow different return thunks
* 4eb421fa71 x86/ftrace: Use alternative RET encoding
* b253061d4b x86/ibt,paravirt: Use text_gen_insn() for paravirt_patch()
* e752912ce1 x86/text-patching: Make text_gen_insn() play nice with ANNOTATE_NOENDBR
* c13d426040 Revert "x86/ftrace: Use alternative RET encoding"
* 70d92abbe2 ARM: ep93xx: Add terminator to gpiod_lookup_table
* dcb4d14268 l2tp: pass correct message length to ip6_append_data
* 03366ad111 PCI/MSI: Prevent MSI hardware interrupt number truncation
* 2e534fd15e gtp: fix use-after-free and null-ptr-deref in gtp_genl_dump_pdp()
* 6e5069b40f KVM: arm64: vgic-its: Test for valid IRQ in its_sync_lpi_pending_table()
* 615af9cb3e KVM: arm64: vgic-its: Test for valid IRQ in MOVALL handler
* 3c652f6fa1 dm-crypt: don't modify the data when using authenticated encryption
* f6a765a61e s390/cio: fix invalid -EBUSY on ccw_device_start
* 3f38d22e64 IB/hfi1: Fix sdma.h tx->num_descs off-by-one error
* a0180e940c erofs: fix lz4 inplace decompression
* 841b9f6f68 x86: drop bogus "cc" clobber from __try_cmpxchg_user_asm()
* 6360869cc4 jbd2: Fix wrongly judgement for buffer head removing while doing checkpoint
* 69389d82ab jbd2: recheck chechpointing non-dirty buffer
* cb1609ef8a jbd2: remove redundant buffer io error checks
* 52b9609b89 iwlwifi: mvm: write queue_sync_state only for sync
* f5e6da2ca1 iwlwifi: mvm: do more useful queue sync accounting
* 87b7d049ce platform/x86: intel-vbtn: Support for tablet mode on HP Pavilion 13 x360 PC
* 6c367739cd lan743x: fix for potential NULL pointer dereference with bare card
* a1ccc4f441 btrfs: do not pin logs too early during renames
* 16b70511bd btrfs: unify lookup return value when dir entry is missing
* fccb8a6109 btrfs: introduce btrfs_lookup_match_dir
* aaf2d6b7ec btrfs: tree-checker: check for overlapping extent items
* b8034ca2fd task_stack, x86/cea: Force-inline stack helpers
* 68ffe3ec19 ASoC: Intel: bytcr_rt5651: Drop reference count of ACPI device after use
* edeef1b4fb ASoC: Intel: boards: get codec device with ACPI instead of bus search
* 151b360f47 ASoC: Intel: boards: harden codec property handling
* 877037eff7 mtd: spinand: macronix: Add support for MX35LFxGE4AD
* b6c4a44e89 cifs: add a warning when the in-flight count goes negative
* e410dfaaac powerpc/watchpoints: Annotate atomic context in more places
* 2641aa3f56 powerpc/watchpoint: Workaround P10 DD1 issue with VSX-32 byte instructions
* d021ba1142 block: ataflop: fix breakage introduced at blk-mq refactoring
* 1dd3dc3892 seccomp: Invalidate seccomp mode to catch death failures
* 7ab8a3bac5 x86/uaccess: Implement macros for CMPXCHG on user addresses
* 13f6937f53 hsr: Avoid double remove of a node.
* b2e72d88c3 hvc/xen: prevent concurrent accesses to the shared ring
* 86ba65e535 media: av7110: prevent underflow in write_ts_to_decoder()
* d6e60c53d2 ASoC: fsl_micfil: register platform component before registering cpu dai
* de899edac7 ARM: dts: imx: Set default tuning step for imx6sx usdhc
* 51582123dd irqchip/mips-gic: Don't touch vl_map if a local interrupt is not routable
* ef6128a1ba ARM: dts: BCM53573: Drop nonexistent "default-off" LED trigger
* a4c0234b16 pmdomain: renesas: r8a77980-sysc: CR7 must be always on
* 5fe446b245 virtio-blk: Ensure no requests in virtqueues before deleting vqs.
* 92a1090b47 firewire: core: send bus reset promptly on gap count error
* 6a375022b0 scsi: lpfc: Use unsigned type for num_sge
* 7fb1979274 hwmon: (coretemp) Enlarge per package core count limit
* 988ae00e69 efi: Don't add memblocks for soft-reserved memory
* 4fff3d735b efi: runtime: Fix potential overflow of soft-reserved region size
* 865f99f641 Input: i8042 - add Fujitsu Lifebook U728 to i8042 quirk table
* 30a8784572 ext4: correct the hole length returned by ext4_map_blocks()
* a72037da4a nvmet-fc: abort command when there is no binding
* a0fa157bd4 nvmet-fc: release reference on target port
* 5da866be3d nvmet-fcloop: swap the list_add_tail arguments
* 4f2c95015e nvme-fc: do not wait in vain when unloading module
* f82ed69f6a netfilter: conntrack: check SCTP_CID_SHUTDOWN_ACK for vtag setting in sctp_new
* da47fc8d30 spi: sh-msiof: avoid integer overflow in constants
* 0a840d7984 ASoC: sunxi: sun4i-spdif: Add support for Allwinner H616
* 5b33bbeefb nvmet-tcp: fix nvme tcp ida memory leak
* d21c122de3 regulator: pwm-regulator: Add validity checks in continuous .get_voltage
* c432094aa7 dmaengine: ti: edma: Add some null pointer checks to the edma_probe
* ffeb72a80a ext4: avoid allocating blocks from corrupted group in ext4_mb_find_by_goal()
* 927794a021 ext4: avoid allocating blocks from corrupted group in ext4_mb_try_best_found()
* 2b39c1a0a8 ahci: add 43-bit DMA address quirk for ASMedia ASM1061 controllers
* 15bb22da0f ahci: asm1166: correct count of reported ports
* e94da8aca2 spi: hisi-sfc-v3xx: Return IRQ_NONE if no interrupts were detected
* cd36da760b fbdev: sis: Error out if pixclock equals zero
* 512ee6d604 fbdev: savage: Error out if pixclock equals zero
* 5ffab99e07 wifi: mac80211: fix race condition on enabling fast-xmit
* 7e71fbc68d wifi: cfg80211: fix missing interfaces when dumping
* 17c976fe2c dmaengine: fsl-qdma: increase size of 'irq_name'
* d94a80da90 dmaengine: shdma: increase size of 'dev_id'
* 168ed59170 scsi: target: core: Add TMF to tmr_list handling
* e4bc311745 sched/rt: Disallow writing invalid values to sched_rt_period_us
* 13c6bce76d sched/rt: Fix sysctl_sched_rr_timeslice intial value
* b1ba065137 zonefs: Improve error handling
* 19087d70e9 userfaultfd: fix mmap_changing checking in mfill_atomic_hugetlb
* 18d88bf9c2 sched/rt: sysctl_sched_rr_timeslice show default timeslice after reset
* 94b064984a smb: client: fix parsing of SMB3.1.1 POSIX create context
* 13fb0fc491 smb: client: fix potential OOBs in smb2_parse_contexts()
* b03c8099a7 smb: client: fix OOB in receive_encrypted_standard()
* 3fa31e7a9d net/sched: Retire dsmark qdisc
* 71925d6863 net/sched: Retire ATM qdisc
* 56a6720d9b net/sched: Retire CBQ qdisc

Change-Id: Ifcdb2a0a24ed57b62d73c24ab1e6d8918b9c4068
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman 2024-06-28 16:12:15 +00:00
commit b07354bd32
425 changed files with 4995 additions and 5865 deletions

View File

@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 5
PATCHLEVEL = 10
SUBLEVEL = 210
SUBLEVEL = 214
EXTRAVERSION =
NAME = Dare mighty things

View File

@ -435,7 +435,7 @@ pb1176_serial3: serial@1010f000 {
/* Direct-mapped development chip ROM */
pb1176_rom@10200000 {
compatible = "direct-mapped";
compatible = "mtd-rom";
reg = <0x10200000 0x4000>;
bank-width = <1>;
};

View File

@ -26,7 +26,6 @@ leds {
wlan {
label = "bcm53xx:blue:wlan";
gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>;
linux,default-trigger = "default-off";
};
system {

View File

@ -26,7 +26,6 @@ leds {
5ghz {
label = "bcm53xx:blue:5ghz";
gpios = <&chipcommon 11 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "default-off";
};
system {
@ -42,7 +41,6 @@ pcie0_leds {
2ghz {
label = "bcm53xx:blue:2ghz";
gpios = <&pcie0_chipcommon 3 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "default-off";
};
};

View File

@ -103,8 +103,6 @@ &fec {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enet>;
phy-mode = "rgmii-id";
phy-reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
phy-reset-duration = <20>;
phy-supply = <&sw2_reg>;
status = "okay";
@ -117,17 +115,10 @@ mdio {
#address-cells = <1>;
#size-cells = <0>;
phy_port2: phy@1 {
reg = <1>;
};
phy_port3: phy@2 {
reg = <2>;
};
switch@10 {
compatible = "qca,qca8334";
reg = <10>;
reg = <0x10>;
reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
switch_ports: ports {
#address-cells = <1>;
@ -148,15 +139,30 @@ fixed-link {
eth2: port@2 {
reg = <2>;
label = "eth2";
phy-mode = "internal";
phy-handle = <&phy_port2>;
};
eth1: port@3 {
reg = <3>;
label = "eth1";
phy-mode = "internal";
phy-handle = <&phy_port3>;
};
};
mdio {
#address-cells = <1>;
#size-cells = <0>;
phy_port2: ethernet-phy@1 {
reg = <1>;
};
phy_port3: ethernet-phy@2 {
reg = <2>;
};
};
};
};
};

View File

@ -981,6 +981,8 @@ usdhc1: mmc@2190000 {
<&clks IMX6SX_CLK_USDHC1>;
clock-names = "ipg", "ahb", "per";
bus-width = <4>;
fsl,tuning-start-tap = <20>;
fsl,tuning-step= <2>;
status = "disabled";
};
@ -993,6 +995,8 @@ usdhc2: mmc@2194000 {
<&clks IMX6SX_CLK_USDHC2>;
clock-names = "ipg", "ahb", "per";
bus-width = <4>;
fsl,tuning-start-tap = <20>;
fsl,tuning-step= <2>;
status = "disabled";
};
@ -1005,6 +1009,8 @@ usdhc3: mmc@2198000 {
<&clks IMX6SX_CLK_USDHC3>;
clock-names = "ipg", "ahb", "per";
bus-width = <4>;
fsl,tuning-start-tap = <20>;
fsl,tuning-step= <2>;
status = "disabled";
};

View File

@ -62,6 +62,30 @@ reg_vdd_cpux: vdd-cpux-regulator {
states = <1100000 0>, <1300000 1>;
};
reg_vcc_dram: vcc-dram {
compatible = "regulator-fixed";
regulator-name = "vcc-dram";
regulator-min-microvolt = <1500000>;
regulator-max-microvolt = <1500000>;
regulator-always-on;
regulator-boot-on;
enable-active-high;
gpio = <&r_pio 0 9 GPIO_ACTIVE_HIGH>; /* PL9 */
vin-supply = <&reg_vcc5v0>;
};
reg_vcc1v2: vcc1v2 {
compatible = "regulator-fixed";
regulator-name = "vcc1v2";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-always-on;
regulator-boot-on;
enable-active-high;
gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
vin-supply = <&reg_vcc5v0>;
};
wifi_pwrseq: wifi_pwrseq {
compatible = "mmc-pwrseq-simple";
reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */

View File

@ -24,8 +24,8 @@
#include "sha256_glue.h"
asmlinkage void sha256_block_data_order(u32 *digest, const void *data,
unsigned int num_blks);
asmlinkage void sha256_block_data_order(struct sha256_state *state,
const u8 *data, int num_blks);
int crypto_sha256_arm_update(struct shash_desc *desc, const u8 *data,
unsigned int len)
@ -33,23 +33,20 @@ int crypto_sha256_arm_update(struct shash_desc *desc, const u8 *data,
/* make sure casting to sha256_block_fn() is safe */
BUILD_BUG_ON(offsetof(struct sha256_state, state) != 0);
return sha256_base_do_update(desc, data, len,
(sha256_block_fn *)sha256_block_data_order);
return sha256_base_do_update(desc, data, len, sha256_block_data_order);
}
EXPORT_SYMBOL(crypto_sha256_arm_update);
static int crypto_sha256_arm_final(struct shash_desc *desc, u8 *out)
{
sha256_base_do_finalize(desc,
(sha256_block_fn *)sha256_block_data_order);
sha256_base_do_finalize(desc, sha256_block_data_order);
return sha256_base_finish(desc, out);
}
int crypto_sha256_arm_finup(struct shash_desc *desc, const u8 *data,
unsigned int len, u8 *out)
{
sha256_base_do_update(desc, data, len,
(sha256_block_fn *)sha256_block_data_order);
sha256_base_do_update(desc, data, len, sha256_block_data_order);
return crypto_sha256_arm_final(desc, out);
}
EXPORT_SYMBOL(crypto_sha256_arm_finup);

View File

@ -25,27 +25,25 @@ MODULE_ALIAS_CRYPTO("sha512");
MODULE_ALIAS_CRYPTO("sha384-arm");
MODULE_ALIAS_CRYPTO("sha512-arm");
asmlinkage void sha512_block_data_order(u64 *state, u8 const *src, int blocks);
asmlinkage void sha512_block_data_order(struct sha512_state *state,
u8 const *src, int blocks);
int sha512_arm_update(struct shash_desc *desc, const u8 *data,
unsigned int len)
{
return sha512_base_do_update(desc, data, len,
(sha512_block_fn *)sha512_block_data_order);
return sha512_base_do_update(desc, data, len, sha512_block_data_order);
}
static int sha512_arm_final(struct shash_desc *desc, u8 *out)
{
sha512_base_do_finalize(desc,
(sha512_block_fn *)sha512_block_data_order);
sha512_base_do_finalize(desc, sha512_block_data_order);
return sha512_base_finish(desc, out);
}
int sha512_arm_finup(struct shash_desc *desc, const u8 *data,
unsigned int len, u8 *out)
{
sha512_base_do_update(desc, data, len,
(sha512_block_fn *)sha512_block_data_order);
sha512_base_do_update(desc, data, len, sha512_block_data_order);
return sha512_arm_final(desc, out);
}

View File

@ -337,6 +337,7 @@ static struct gpiod_lookup_table ep93xx_i2c_gpiod_table = {
GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
GPIO_LOOKUP_IDX("G", 0, NULL, 1,
GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
{ }
},
};

View File

@ -414,14 +414,14 @@ xor11 {
crypto: crypto@90000 {
compatible = "inside-secure,safexcel-eip97ies";
reg = <0x90000 0x20000>;
interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>,
interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "mem", "ring0", "ring1",
"ring2", "ring3", "eip";
<GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "ring0", "ring1", "ring2",
"ring3", "eip", "mem";
clocks = <&nb_periph_clk 15>;
};

View File

@ -477,14 +477,14 @@ CP11X_LABEL(sdhci0): sdhci@780000 {
CP11X_LABEL(crypto): crypto@800000 {
compatible = "inside-secure,safexcel-eip197b";
reg = <0x800000 0x200000>;
interrupts = <87 IRQ_TYPE_LEVEL_HIGH>,
<88 IRQ_TYPE_LEVEL_HIGH>,
interrupts = <88 IRQ_TYPE_LEVEL_HIGH>,
<89 IRQ_TYPE_LEVEL_HIGH>,
<90 IRQ_TYPE_LEVEL_HIGH>,
<91 IRQ_TYPE_LEVEL_HIGH>,
<92 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "mem", "ring0", "ring1",
"ring2", "ring3", "eip";
<92 IRQ_TYPE_LEVEL_HIGH>,
<87 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "ring0", "ring1", "ring2", "ring3",
"eip", "mem";
clock-names = "core", "reg";
clocks = <&CP11X_LABEL(clk) 1 26>,
<&CP11X_LABEL(clk) 1 17>;

View File

@ -71,6 +71,7 @@ red {
memory@40000000 {
reg = <0 0x40000000 0 0x40000000>;
device_type = "memory";
};
reg_1p8v: regulator-1p8v {

View File

@ -57,6 +57,7 @@ wps {
memory@40000000 {
reg = <0 0x40000000 0 0x20000000>;
device_type = "memory";
};
reg_1p8v: regulator-1p8v {

View File

@ -577,6 +577,7 @@ spi0: spi@ff1d0000 {
clock-names = "spiclk", "apb_pclk";
dmas = <&dmac 12>, <&dmac 13>;
dma-names = "tx", "rx";
num-cs = <2>;
pinctrl-names = "default";
pinctrl-0 = <&spi0_clk &spi0_csn &spi0_miso &spi0_mosi>;
#address-cells = <1>;
@ -592,6 +593,7 @@ spi1: spi@ff1d8000 {
clock-names = "spiclk", "apb_pclk";
dmas = <&dmac 14>, <&dmac 15>;
dma-names = "tx", "rx";
num-cs = <2>;
pinctrl-names = "default";
pinctrl-0 = <&spi1_clk &spi1_csn0 &spi1_csn1 &spi1_miso &spi1_mosi>;
#address-cells = <1>;

View File

@ -462,6 +462,9 @@ static int its_sync_lpi_pending_table(struct kvm_vcpu *vcpu)
}
irq = vgic_get_irq(vcpu->kvm, NULL, intids[i]);
if (!irq)
continue;
raw_spin_lock_irqsave(&irq->irq_lock, flags);
irq->pending_latch = pendmask & (1U << bit_nr);
vgic_queue_irq_unlock(vcpu->kvm, irq, flags);
@ -1374,6 +1377,8 @@ static int vgic_its_cmd_handle_movall(struct kvm *kvm, struct vgic_its *its,
for (i = 0; i < irq_count; i++) {
irq = vgic_get_irq(kvm, NULL, intids[i]);
if (!irq)
continue;
update_affinity(irq, vcpu2);

View File

@ -60,6 +60,7 @@ static inline void instruction_pointer_set(struct pt_regs *regs,
unsigned long val)
{
regs->cp0_epc = val;
regs->cp0_cause &= ~CAUSEF_BD;
}
/* Query offset/name of register from its name/offset */

View File

@ -81,7 +81,7 @@ void notrace __hot ftrace_function_trampoline(unsigned long parent,
#endif
}
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
#if defined(CONFIG_DYNAMIC_FTRACE) && defined(CONFIG_FUNCTION_GRAPH_TRACER)
int ftrace_enable_ftrace_graph_caller(void)
{
return 0;

View File

@ -504,6 +504,11 @@ static bool is_larx_stcx_instr(int type)
return type == LARX || type == STCX;
}
static bool is_octword_vsx_instr(int type, int size)
{
return ((type == LOAD_VSX || type == STORE_VSX) && size == 32);
}
/*
* We've failed in reliably handling the hw-breakpoint. Unregister
* it and throw a warning message to let the user know about it.
@ -554,6 +559,63 @@ static bool stepping_handler(struct pt_regs *regs, struct perf_event **bp,
return true;
}
static void handle_p10dd1_spurious_exception(struct arch_hw_breakpoint **info,
int *hit, unsigned long ea)
{
int i;
unsigned long hw_end_addr;
/*
* Handle spurious exception only when any bp_per_reg is set.
* Otherwise this might be created by xmon and not actually a
* spurious exception.
*/
for (i = 0; i < nr_wp_slots(); i++) {
if (!info[i])
continue;
hw_end_addr = ALIGN(info[i]->address + info[i]->len, HW_BREAKPOINT_SIZE);
/*
* Ending address of DAWR range is less than starting
* address of op.
*/
if ((hw_end_addr - 1) >= ea)
continue;
/*
* Those addresses need to be in the same or in two
* consecutive 512B blocks;
*/
if (((hw_end_addr - 1) >> 10) != (ea >> 10))
continue;
/*
* 'op address + 64B' generates an address that has a
* carry into bit 52 (crosses 2K boundary).
*/
if ((ea & 0x800) == ((ea + 64) & 0x800))
continue;
break;
}
if (i == nr_wp_slots())
return;
for (i = 0; i < nr_wp_slots(); i++) {
if (info[i]) {
hit[i] = 1;
info[i]->type |= HW_BRK_TYPE_EXTRANEOUS_IRQ;
}
}
}
/*
* Handle a DABR or DAWR exception.
*
* Called in atomic context.
*/
int hw_breakpoint_handler(struct die_args *args)
{
bool err = false;
@ -612,8 +674,14 @@ int hw_breakpoint_handler(struct die_args *args)
goto reset;
if (!nr_hit) {
rc = NOTIFY_DONE;
goto out;
/* Workaround for Power10 DD1 */
if (!IS_ENABLED(CONFIG_PPC_8xx) && mfspr(SPRN_PVR) == 0x800100 &&
is_octword_vsx_instr(type, size)) {
handle_p10dd1_spurious_exception(info, hit, ea);
} else {
rc = NOTIFY_DONE;
goto out;
}
}
/*
@ -674,6 +742,8 @@ NOKPROBE_SYMBOL(hw_breakpoint_handler);
/*
* Handle single-step exceptions following a DABR hit.
*
* Called in atomic context.
*/
static int single_step_dabr_instruction(struct die_args *args)
{
@ -731,6 +801,8 @@ NOKPROBE_SYMBOL(single_step_dabr_instruction);
/*
* Handle debug exception notifications.
*
* Called in atomic context.
*/
int hw_breakpoint_exceptions_notify(
struct notifier_block *unused, unsigned long val, void *data)

View File

@ -164,6 +164,20 @@ static unsigned long single_gpci_request(u32 req, u32 starting_index,
ret = plpar_hcall_norets(H_GET_PERF_COUNTER_INFO,
virt_to_phys(arg), HGPCI_REQ_BUFFER_SIZE);
/*
* ret value as 'H_PARAMETER' with detail_rc as 'GEN_BUF_TOO_SMALL',
* specifies that the current buffer size cannot accommodate
* all the information and a partial buffer returned.
* Since in this function we are only accessing data for a given starting index,
* we don't need to accommodate whole data and can get required count by
* accessing first entry data.
* Hence hcall fails only incase the ret value is other than H_SUCCESS or
* H_PARAMETER with detail_rc value as GEN_BUF_TOO_SMALL(0x1B).
*/
if (ret == H_PARAMETER && be32_to_cpu(arg->params.detail_rc) == 0x1B)
ret = 0;
if (ret) {
pr_devel("hcall failed: 0x%lx\n", ret);
goto out;
@ -228,6 +242,7 @@ static int h_gpci_event_init(struct perf_event *event)
{
u64 count;
u8 length;
unsigned long ret;
/* Not our event */
if (event->attr.type != event->pmu->type)
@ -258,13 +273,23 @@ static int h_gpci_event_init(struct perf_event *event)
}
/* check if the request works... */
if (single_gpci_request(event_get_request(event),
ret = single_gpci_request(event_get_request(event),
event_get_starting_index(event),
event_get_secondary_index(event),
event_get_counter_info_version(event),
event_get_offset(event),
length,
&count)) {
&count);
/*
* ret value as H_AUTHORITY implies that partition is not permitted to retrieve
* performance information, and required to set
* "Enable Performance Information Collection" option.
*/
if (ret == H_AUTHORITY)
return -EPERM;
if (ret) {
pr_devel("gpci hcall failed\n");
return -EINVAL;
}

View File

@ -97,9 +97,6 @@ static void __init linkstation_init_IRQ(void)
mpic_init(mpic);
}
extern void avr_uart_configure(void);
extern void avr_uart_send(const char);
static void __noreturn linkstation_restart(char *cmd)
{
local_irq_disable();

View File

@ -156,4 +156,7 @@ int mpc10x_disable_store_gathering(struct pci_controller *hose);
/* For MPC107 boards that use the built-in openpic */
void mpc10x_set_openpic(void);
void avr_uart_configure(void);
void avr_uart_send(const char c);
#endif /* __PPC_KERNEL_MPC10X_H */

View File

@ -44,7 +44,7 @@
* Define vmemmap for pfn_to_page & page_to_pfn calls. Needed if kernel
* is configured with CONFIG_SPARSEMEM_VMEMMAP enabled.
*/
#define vmemmap ((struct page *)VMEMMAP_START)
#define vmemmap ((struct page *)VMEMMAP_START - (phys_ram_base >> PAGE_SHIFT))
#define PCI_IO_SIZE SZ_16M
#define PCI_IO_END VMEMMAP_START

View File

@ -214,13 +214,13 @@ void vtime_flush(struct task_struct *tsk)
virt_timer_expire();
steal = S390_lowcore.steal_timer;
avg_steal = S390_lowcore.avg_steal_timer / 2;
avg_steal = S390_lowcore.avg_steal_timer;
if ((s64) steal > 0) {
S390_lowcore.steal_timer = 0;
account_steal_time(cputime_to_nsecs(steal));
avg_steal += steal;
}
S390_lowcore.avg_steal_timer = avg_steal;
S390_lowcore.avg_steal_timer = avg_steal / 2;
}
/*

View File

@ -225,7 +225,7 @@ resource_size_t pcibios_align_resource(void *data, const struct resource *res,
/* combine single writes by using store-block insn */
void __iowrite64_copy(void __iomem *to, const void *from, size_t count)
{
zpci_memcpy_toio(to, from, count);
zpci_memcpy_toio(to, from, count * 8);
}
static void __iomem *__ioremap(phys_addr_t addr, size_t size, pgprot_t prot)

View File

@ -696,7 +696,7 @@ static int grpci1_of_probe(struct platform_device *ofdev)
return err;
}
static const struct of_device_id grpci1_of_match[] __initconst = {
static const struct of_device_id grpci1_of_match[] = {
{
.name = "GAISLER_PCIFBRG",
},

View File

@ -887,7 +887,7 @@ static int grpci2_of_probe(struct platform_device *ofdev)
return err;
}
static const struct of_device_id grpci2_of_match[] __initconst = {
static const struct of_device_id grpci2_of_match[] = {
{
.name = "GAISLER_GRPCI2",
},

View File

@ -92,6 +92,19 @@ config LD_SCRIPT_DYN
depends on !LD_SCRIPT_STATIC
select MODULE_REL_CRCS if MODVERSIONS
config LD_SCRIPT_DYN_RPATH
bool "set rpath in the binary" if EXPERT
default y
depends on LD_SCRIPT_DYN
help
Add /lib (and /lib64 for 64-bit) to the linux binary's rpath
explicitly.
You may need to turn this off if compiling for nix systems
that have their libraries in random /nix directories and
might otherwise unexpected use libraries from /lib or /lib64
instead of the desired ones.
config HOSTFS
tristate "Host filesystem"
help

View File

@ -118,7 +118,8 @@ archprepare:
$(Q)$(MAKE) $(build)=$(HOST_DIR)/um include/generated/user_constants.h
LINK-$(CONFIG_LD_SCRIPT_STATIC) += -static
LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib $(call cc-option, -no-pie)
LINK-$(CONFIG_LD_SCRIPT_DYN) += $(call cc-option, -no-pie)
LINK-$(CONFIG_LD_SCRIPT_DYN_RPATH) += -Wl,-rpath,/lib
CFLAGS_NO_HARDENING := $(call cc-option, -fno-PIC,) $(call cc-option, -fno-pic,) \
-fno-stack-protector $(call cc-option, -fno-stack-protector-all)

View File

@ -44,7 +44,7 @@ ELF_FORMAT := elf64-x86-64
# Not on all 64-bit distros /lib is a symlink to /lib64. PLD is an example.
LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib64
LINK-$(CONFIG_LD_SCRIPT_DYN_RPATH) += -Wl,-rpath,/lib64
LINK-y += -m64
endif

View File

@ -143,7 +143,7 @@ extern void cea_set_pte(void *cea_vaddr, phys_addr_t pa, pgprot_t flags);
extern struct cpu_entry_area *get_cpu_entry_area(int cpu);
static inline struct entry_stack *cpu_entry_stack(int cpu)
static __always_inline struct entry_stack *cpu_entry_stack(int cpu)
{
return &get_cpu_entry_area(cpu)->entry_stack_page.stack;
}

View File

@ -207,6 +207,8 @@ extern void srso_alias_untrain_ret(void);
extern void entry_untrain_ret(void);
extern void entry_ibpb(void);
extern void (*x86_return_thunk)(void);
#ifdef CONFIG_RETPOLINE
typedef u8 retpoline_thunk_t[RETPOLINE_THUNK_SIZE];

View File

@ -95,25 +95,41 @@ union text_poke_insn {
} __attribute__((packed));
};
static __always_inline
void __text_gen_insn(void *buf, u8 opcode, const void *addr, const void *dest, int size)
{
union text_poke_insn *insn = buf;
BUG_ON(size < text_opcode_size(opcode));
/*
* Hide the addresses to avoid the compiler folding in constants when
* referencing code, these can mess up annotations like
* ANNOTATE_NOENDBR.
*/
OPTIMIZER_HIDE_VAR(insn);
OPTIMIZER_HIDE_VAR(addr);
OPTIMIZER_HIDE_VAR(dest);
insn->opcode = opcode;
if (size > 1) {
insn->disp = (long)dest - (long)(addr + size);
if (size == 2) {
/*
* Ensure that for JMP8 the displacement
* actually fits the signed byte.
*/
BUG_ON((insn->disp >> 31) != (insn->disp >> 7));
}
}
}
static __always_inline
void *text_gen_insn(u8 opcode, const void *addr, const void *dest)
{
static union text_poke_insn insn; /* per instance */
int size = text_opcode_size(opcode);
insn.opcode = opcode;
if (size > 1) {
insn.disp = (long)dest - (long)(addr + size);
if (size == 2) {
/*
* Ensure that for JMP9 the displacement
* actually fits the signed byte.
*/
BUG_ON((insn.disp >> 31) != (insn.disp >> 7));
}
}
__text_gen_insn(&insn, opcode, addr, dest, text_opcode_size(opcode));
return &insn.text;
}

View File

@ -414,6 +414,103 @@ do { \
#endif // CONFIG_CC_ASM_GOTO_OUTPUT
#ifdef CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT
#define __try_cmpxchg_user_asm(itype, ltype, _ptr, _pold, _new, label) ({ \
bool success; \
__typeof__(_ptr) _old = (__typeof__(_ptr))(_pold); \
__typeof__(*(_ptr)) __old = *_old; \
__typeof__(*(_ptr)) __new = (_new); \
asm_volatile_goto("\n" \
"1: " LOCK_PREFIX "cmpxchg"itype" %[new], %[ptr]\n"\
_ASM_EXTABLE_UA(1b, %l[label]) \
: CC_OUT(z) (success), \
[ptr] "+m" (*_ptr), \
[old] "+a" (__old) \
: [new] ltype (__new) \
: "memory" \
: label); \
if (unlikely(!success)) \
*_old = __old; \
likely(success); })
#ifdef CONFIG_X86_32
#define __try_cmpxchg64_user_asm(_ptr, _pold, _new, label) ({ \
bool success; \
__typeof__(_ptr) _old = (__typeof__(_ptr))(_pold); \
__typeof__(*(_ptr)) __old = *_old; \
__typeof__(*(_ptr)) __new = (_new); \
asm_volatile_goto("\n" \
"1: " LOCK_PREFIX "cmpxchg8b %[ptr]\n" \
_ASM_EXTABLE_UA(1b, %l[label]) \
: CC_OUT(z) (success), \
"+A" (__old), \
[ptr] "+m" (*_ptr) \
: "b" ((u32)__new), \
"c" ((u32)((u64)__new >> 32)) \
: "memory" \
: label); \
if (unlikely(!success)) \
*_old = __old; \
likely(success); })
#endif // CONFIG_X86_32
#else // !CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT
#define __try_cmpxchg_user_asm(itype, ltype, _ptr, _pold, _new, label) ({ \
int __err = 0; \
bool success; \
__typeof__(_ptr) _old = (__typeof__(_ptr))(_pold); \
__typeof__(*(_ptr)) __old = *_old; \
__typeof__(*(_ptr)) __new = (_new); \
asm volatile("\n" \
"1: " LOCK_PREFIX "cmpxchg"itype" %[new], %[ptr]\n"\
CC_SET(z) \
"2:\n" \
_ASM_EXTABLE_TYPE_REG(1b, 2b, EX_TYPE_EFAULT_REG, \
%[errout]) \
: CC_OUT(z) (success), \
[errout] "+r" (__err), \
[ptr] "+m" (*_ptr), \
[old] "+a" (__old) \
: [new] ltype (__new) \
: "memory"); \
if (unlikely(__err)) \
goto label; \
if (unlikely(!success)) \
*_old = __old; \
likely(success); })
#ifdef CONFIG_X86_32
/*
* Unlike the normal CMPXCHG, hardcode ECX for both success/fail and error.
* There are only six GPRs available and four (EAX, EBX, ECX, and EDX) are
* hardcoded by CMPXCHG8B, leaving only ESI and EDI. If the compiler uses
* both ESI and EDI for the memory operand, compilation will fail if the error
* is an input+output as there will be no register available for input.
*/
#define __try_cmpxchg64_user_asm(_ptr, _pold, _new, label) ({ \
int __result; \
__typeof__(_ptr) _old = (__typeof__(_ptr))(_pold); \
__typeof__(*(_ptr)) __old = *_old; \
__typeof__(*(_ptr)) __new = (_new); \
asm volatile("\n" \
"1: " LOCK_PREFIX "cmpxchg8b %[ptr]\n" \
"mov $0, %%ecx\n\t" \
"setz %%cl\n" \
"2:\n" \
_ASM_EXTABLE_TYPE_REG(1b, 2b, EX_TYPE_EFAULT_REG, %%ecx) \
: [result]"=c" (__result), \
"+A" (__old), \
[ptr] "+m" (*_ptr) \
: "b" ((u32)__new), \
"c" ((u32)((u64)__new >> 32)) \
: "memory", "cc"); \
if (unlikely(__result < 0)) \
goto label; \
if (unlikely(!__result)) \
*_old = __old; \
likely(__result); })
#endif // CONFIG_X86_32
#endif // CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT
/* FIXME: this hack is definitely wrong -AK */
struct __large_struct { unsigned long buf[100]; };
#define __m(x) (*(struct __large_struct __user *)(x))
@ -506,6 +603,51 @@ do { \
} while (0)
#endif // CONFIG_CC_HAS_ASM_GOTO_OUTPUT
extern void __try_cmpxchg_user_wrong_size(void);
#ifndef CONFIG_X86_32
#define __try_cmpxchg64_user_asm(_ptr, _oldp, _nval, _label) \
__try_cmpxchg_user_asm("q", "r", (_ptr), (_oldp), (_nval), _label)
#endif
/*
* Force the pointer to u<size> to match the size expected by the asm helper.
* clang/LLVM compiles all cases and only discards the unused paths after
* processing errors, which breaks i386 if the pointer is an 8-byte value.
*/
#define unsafe_try_cmpxchg_user(_ptr, _oldp, _nval, _label) ({ \
bool __ret; \
__chk_user_ptr(_ptr); \
switch (sizeof(*(_ptr))) { \
case 1: __ret = __try_cmpxchg_user_asm("b", "q", \
(__force u8 *)(_ptr), (_oldp), \
(_nval), _label); \
break; \
case 2: __ret = __try_cmpxchg_user_asm("w", "r", \
(__force u16 *)(_ptr), (_oldp), \
(_nval), _label); \
break; \
case 4: __ret = __try_cmpxchg_user_asm("l", "r", \
(__force u32 *)(_ptr), (_oldp), \
(_nval), _label); \
break; \
case 8: __ret = __try_cmpxchg64_user_asm((__force u64 *)(_ptr), (_oldp),\
(_nval), _label); \
break; \
default: __try_cmpxchg_user_wrong_size(); \
} \
__ret; })
/* "Returns" 0 on success, 1 on failure, -EFAULT if the access faults. */
#define __try_cmpxchg_user(_ptr, _oldp, _nval, _label) ({ \
int __ret = -EFAULT; \
__uaccess_begin_nospec(); \
__ret = !unsafe_try_cmpxchg_user(_ptr, _oldp, _nval, _label); \
_label: \
__uaccess_end(); \
__ret; \
})
/*
* We want the unsafe accessors to always be inlined and use
* the error labels - thus the macro games.

View File

@ -4,6 +4,7 @@
#include <linux/seqlock.h>
#include <uapi/asm/vsyscall.h>
#include <asm/page_types.h>
#ifdef CONFIG_X86_VSYSCALL_EMULATION
extern void map_vsyscall(void);
@ -24,4 +25,13 @@ static inline bool emulate_vsyscall(unsigned long error_code,
}
#endif
/*
* The (legacy) vsyscall page is the long page in the kernel portion
* of the address space that has user-accessible permissions.
*/
static inline bool is_vsyscall_vaddr(unsigned long vaddr)
{
return unlikely((vaddr & PAGE_MASK) == VSYSCALL_ADDR);
}
#endif /* _ASM_X86_VSYSCALL_H */

View File

@ -676,6 +676,7 @@ void __init_or_module noinline apply_retpolines(s32 *start, s32 *end)
}
#ifdef CONFIG_RETHUNK
/*
* Rewrite the compiler generated return thunk tail-calls.
*
@ -691,14 +692,18 @@ static int patch_return(void *addr, struct insn *insn, u8 *bytes)
{
int i = 0;
if (cpu_feature_enabled(X86_FEATURE_RETHUNK))
return -1;
if (cpu_feature_enabled(X86_FEATURE_RETHUNK)) {
if (x86_return_thunk == __x86_return_thunk)
return -1;
bytes[i++] = RET_INSN_OPCODE;
i = JMP32_INSN_SIZE;
__text_gen_insn(bytes, JMP32_INSN_OPCODE, addr, x86_return_thunk, i);
} else {
bytes[i++] = RET_INSN_OPCODE;
}
for (; i < insn->length;)
bytes[i++] = INT3_INSN_OPCODE;
return i;
}

View File

@ -178,6 +178,90 @@ static bool bad_spectre_microcode(struct cpuinfo_x86 *c)
return false;
}
#define MSR_IA32_TME_ACTIVATE 0x982
/* Helpers to access TME_ACTIVATE MSR */
#define TME_ACTIVATE_LOCKED(x) (x & 0x1)
#define TME_ACTIVATE_ENABLED(x) (x & 0x2)
#define TME_ACTIVATE_POLICY(x) ((x >> 4) & 0xf) /* Bits 7:4 */
#define TME_ACTIVATE_POLICY_AES_XTS_128 0
#define TME_ACTIVATE_KEYID_BITS(x) ((x >> 32) & 0xf) /* Bits 35:32 */
#define TME_ACTIVATE_CRYPTO_ALGS(x) ((x >> 48) & 0xffff) /* Bits 63:48 */
#define TME_ACTIVATE_CRYPTO_AES_XTS_128 1
/* Values for mktme_status (SW only construct) */
#define MKTME_ENABLED 0
#define MKTME_DISABLED 1
#define MKTME_UNINITIALIZED 2
static int mktme_status = MKTME_UNINITIALIZED;
static void detect_tme_early(struct cpuinfo_x86 *c)
{
u64 tme_activate, tme_policy, tme_crypto_algs;
int keyid_bits = 0, nr_keyids = 0;
static u64 tme_activate_cpu0 = 0;
rdmsrl(MSR_IA32_TME_ACTIVATE, tme_activate);
if (mktme_status != MKTME_UNINITIALIZED) {
if (tme_activate != tme_activate_cpu0) {
/* Broken BIOS? */
pr_err_once("x86/tme: configuration is inconsistent between CPUs\n");
pr_err_once("x86/tme: MKTME is not usable\n");
mktme_status = MKTME_DISABLED;
/* Proceed. We may need to exclude bits from x86_phys_bits. */
}
} else {
tme_activate_cpu0 = tme_activate;
}
if (!TME_ACTIVATE_LOCKED(tme_activate) || !TME_ACTIVATE_ENABLED(tme_activate)) {
pr_info_once("x86/tme: not enabled by BIOS\n");
mktme_status = MKTME_DISABLED;
return;
}
if (mktme_status != MKTME_UNINITIALIZED)
goto detect_keyid_bits;
pr_info("x86/tme: enabled by BIOS\n");
tme_policy = TME_ACTIVATE_POLICY(tme_activate);
if (tme_policy != TME_ACTIVATE_POLICY_AES_XTS_128)
pr_warn("x86/tme: Unknown policy is active: %#llx\n", tme_policy);
tme_crypto_algs = TME_ACTIVATE_CRYPTO_ALGS(tme_activate);
if (!(tme_crypto_algs & TME_ACTIVATE_CRYPTO_AES_XTS_128)) {
pr_err("x86/mktme: No known encryption algorithm is supported: %#llx\n",
tme_crypto_algs);
mktme_status = MKTME_DISABLED;
}
detect_keyid_bits:
keyid_bits = TME_ACTIVATE_KEYID_BITS(tme_activate);
nr_keyids = (1UL << keyid_bits) - 1;
if (nr_keyids) {
pr_info_once("x86/mktme: enabled by BIOS\n");
pr_info_once("x86/mktme: %d KeyIDs available\n", nr_keyids);
} else {
pr_info_once("x86/mktme: disabled by BIOS\n");
}
if (mktme_status == MKTME_UNINITIALIZED) {
/* MKTME is usable */
mktme_status = MKTME_ENABLED;
}
/*
* KeyID bits effectively lower the number of physical address
* bits. Update cpuinfo_x86::x86_phys_bits accordingly.
*/
c->x86_phys_bits -= keyid_bits;
}
static void early_init_intel(struct cpuinfo_x86 *c)
{
u64 misc_enable;
@ -329,6 +413,13 @@ static void early_init_intel(struct cpuinfo_x86 *c)
*/
if (detect_extended_topology_early(c) < 0)
detect_ht_early(c);
/*
* Adjust the number of physical bits early because it affects the
* valid bits of the MTRR mask registers.
*/
if (cpu_has(c, X86_FEATURE_TME))
detect_tme_early(c);
}
static void bsp_init_intel(struct cpuinfo_x86 *c)
@ -489,90 +580,6 @@ static void srat_detect_node(struct cpuinfo_x86 *c)
#endif
}
#define MSR_IA32_TME_ACTIVATE 0x982
/* Helpers to access TME_ACTIVATE MSR */
#define TME_ACTIVATE_LOCKED(x) (x & 0x1)
#define TME_ACTIVATE_ENABLED(x) (x & 0x2)
#define TME_ACTIVATE_POLICY(x) ((x >> 4) & 0xf) /* Bits 7:4 */
#define TME_ACTIVATE_POLICY_AES_XTS_128 0
#define TME_ACTIVATE_KEYID_BITS(x) ((x >> 32) & 0xf) /* Bits 35:32 */
#define TME_ACTIVATE_CRYPTO_ALGS(x) ((x >> 48) & 0xffff) /* Bits 63:48 */
#define TME_ACTIVATE_CRYPTO_AES_XTS_128 1
/* Values for mktme_status (SW only construct) */
#define MKTME_ENABLED 0
#define MKTME_DISABLED 1
#define MKTME_UNINITIALIZED 2
static int mktme_status = MKTME_UNINITIALIZED;
static void detect_tme(struct cpuinfo_x86 *c)
{
u64 tme_activate, tme_policy, tme_crypto_algs;
int keyid_bits = 0, nr_keyids = 0;
static u64 tme_activate_cpu0 = 0;
rdmsrl(MSR_IA32_TME_ACTIVATE, tme_activate);
if (mktme_status != MKTME_UNINITIALIZED) {
if (tme_activate != tme_activate_cpu0) {
/* Broken BIOS? */
pr_err_once("x86/tme: configuration is inconsistent between CPUs\n");
pr_err_once("x86/tme: MKTME is not usable\n");
mktme_status = MKTME_DISABLED;
/* Proceed. We may need to exclude bits from x86_phys_bits. */
}
} else {
tme_activate_cpu0 = tme_activate;
}
if (!TME_ACTIVATE_LOCKED(tme_activate) || !TME_ACTIVATE_ENABLED(tme_activate)) {
pr_info_once("x86/tme: not enabled by BIOS\n");
mktme_status = MKTME_DISABLED;
return;
}
if (mktme_status != MKTME_UNINITIALIZED)
goto detect_keyid_bits;
pr_info("x86/tme: enabled by BIOS\n");
tme_policy = TME_ACTIVATE_POLICY(tme_activate);
if (tme_policy != TME_ACTIVATE_POLICY_AES_XTS_128)
pr_warn("x86/tme: Unknown policy is active: %#llx\n", tme_policy);
tme_crypto_algs = TME_ACTIVATE_CRYPTO_ALGS(tme_activate);
if (!(tme_crypto_algs & TME_ACTIVATE_CRYPTO_AES_XTS_128)) {
pr_err("x86/mktme: No known encryption algorithm is supported: %#llx\n",
tme_crypto_algs);
mktme_status = MKTME_DISABLED;
}
detect_keyid_bits:
keyid_bits = TME_ACTIVATE_KEYID_BITS(tme_activate);
nr_keyids = (1UL << keyid_bits) - 1;
if (nr_keyids) {
pr_info_once("x86/mktme: enabled by BIOS\n");
pr_info_once("x86/mktme: %d KeyIDs available\n", nr_keyids);
} else {
pr_info_once("x86/mktme: disabled by BIOS\n");
}
if (mktme_status == MKTME_UNINITIALIZED) {
/* MKTME is usable */
mktme_status = MKTME_ENABLED;
}
/*
* KeyID bits effectively lower the number of physical address
* bits. Update cpuinfo_x86::x86_phys_bits accordingly.
*/
c->x86_phys_bits -= keyid_bits;
}
static void init_cpuid_fault(struct cpuinfo_x86 *c)
{
u64 msr;
@ -708,9 +715,6 @@ static void init_intel(struct cpuinfo_x86 *c)
init_ia32_feat_ctl(c);
if (cpu_has(c, X86_FEATURE_TME))
detect_tme(c);
init_intel_misc_features(c);
if (tsx_ctrl_state == TSX_CTRL_ENABLE)

View File

@ -367,10 +367,8 @@ create_trampoline(struct ftrace_ops *ops, unsigned int *tramp_size)
goto fail;
ip = trampoline + size;
/* The trampoline ends with ret(q) */
if (cpu_feature_enabled(X86_FEATURE_RETHUNK))
memcpy(ip, text_gen_insn(JMP32_INSN_OPCODE, ip, &__x86_return_thunk), JMP32_INSN_SIZE);
__text_gen_insn(ip, JMP32_INSN_OPCODE, ip, x86_return_thunk, JMP32_INSN_SIZE);
else
memcpy(ip, retq, sizeof(retq));

View File

@ -31,6 +31,7 @@
#include <asm/special_insns.h>
#include <asm/tlb.h>
#include <asm/io_bitmap.h>
#include <asm/text-patching.h>
/*
* nop stub, which must not clobber anything *including the stack* to
@ -55,28 +56,16 @@ void __init default_banner(void)
static const unsigned char ud2a[] = { 0x0f, 0x0b };
struct branch {
unsigned char opcode;
u32 delta;
unsigned char opcode;
u32 delta;
} __attribute__((packed));
static unsigned paravirt_patch_call(void *insn_buff, const void *target,
unsigned long addr, unsigned len)
{
const int call_len = 5;
struct branch *b = insn_buff;
unsigned long delta = (unsigned long)target - (addr+call_len);
if (len < call_len) {
pr_warn("paravirt: Failed to patch indirect CALL at %ps\n", (void *)addr);
/* Kernel might not be viable if patching fails, bail out: */
BUG_ON(1);
}
b->opcode = 0xe8; /* call */
b->delta = delta;
BUILD_BUG_ON(sizeof(*b) != call_len);
return call_len;
__text_gen_insn(insn_buff, CALL_INSN_OPCODE,
(void *)addr, target, CALL_INSN_SIZE);
return CALL_INSN_SIZE;
}
#ifdef CONFIG_PARAVIRT_XXL

View File

@ -41,7 +41,7 @@ static void __ref __static_call_transform(void *insn, enum insn_type type,
case RET:
if (cpu_feature_enabled(X86_FEATURE_RETHUNK))
code = text_gen_insn(JMP32_INSN_OPCODE, insn, &__x86_return_thunk);
code = text_gen_insn(JMP32_INSN_OPCODE, insn, x86_return_thunk);
else
code = &retinsn;
break;

View File

@ -787,15 +787,6 @@ show_signal_msg(struct pt_regs *regs, unsigned long error_code,
show_opcodes(regs, loglvl);
}
/*
* The (legacy) vsyscall page is the long page in the kernel portion
* of the address space that has user-accessible permissions.
*/
static bool is_vsyscall_vaddr(unsigned long vaddr)
{
return unlikely((vaddr & PAGE_MASK) == VSYSCALL_ADDR);
}
static void
__bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code,
unsigned long address, u32 pkey, int si_code)

View File

@ -3,6 +3,8 @@
#include <linux/uaccess.h>
#include <linux/kernel.h>
#include <asm/vsyscall.h>
#ifdef CONFIG_X86_64
bool copy_from_kernel_nofault_allowed(const void *unsafe_src, size_t size)
{
@ -15,6 +17,14 @@ bool copy_from_kernel_nofault_allowed(const void *unsafe_src, size_t size)
if (vaddr < TASK_SIZE_MAX + PAGE_SIZE)
return false;
/*
* Reading from the vsyscall page may cause an unhandled fault in
* certain cases. Though it is at an address above TASK_SIZE_MAX, it is
* usually considered as a user space address.
*/
if (is_vsyscall_vaddr(vaddr))
return false;
/*
* Allow everything during early boot before 'x86_virt_bits'
* is initialized. Needed for instruction decoding in early

View File

@ -405,7 +405,7 @@ static void emit_return(u8 **pprog, u8 *ip)
int cnt = 0;
if (cpu_feature_enabled(X86_FEATURE_RETHUNK)) {
emit_jump(&prog, &__x86_return_thunk, ip);
emit_jump(&prog, x86_return_thunk, ip);
} else {
EMIT1(0xC3); /* ret */
if (IS_ENABLED(CONFIG_SLS))

View File

@ -597,6 +597,14 @@ static void print_absolute_relocs(void)
if (!(sec_applies->shdr.sh_flags & SHF_ALLOC)) {
continue;
}
/*
* Do not perform relocations in .notes section; any
* values there are meant for pre-boot consumption (e.g.
* startup_xen).
*/
if (sec_applies->shdr.sh_type == SHT_NOTE) {
continue;
}
sh_symtab = sec_symtab->symtab;
sym_strtab = sec_symtab->link->strtab;
for (j = 0; j < sec->shdr.sh_size/sizeof(Elf_Rel); j++) {

View File

@ -65,6 +65,8 @@ int xen_smp_intr_init(unsigned int cpu)
char *resched_name, *callfunc_name, *debug_name;
resched_name = kasprintf(GFP_KERNEL, "resched%d", cpu);
if (!resched_name)
goto fail_mem;
per_cpu(xen_resched_irq, cpu).name = resched_name;
rc = bind_ipi_to_irqhandler(XEN_RESCHEDULE_VECTOR,
cpu,
@ -77,6 +79,8 @@ int xen_smp_intr_init(unsigned int cpu)
per_cpu(xen_resched_irq, cpu).irq = rc;
callfunc_name = kasprintf(GFP_KERNEL, "callfunc%d", cpu);
if (!callfunc_name)
goto fail_mem;
per_cpu(xen_callfunc_irq, cpu).name = callfunc_name;
rc = bind_ipi_to_irqhandler(XEN_CALL_FUNCTION_VECTOR,
cpu,
@ -90,6 +94,9 @@ int xen_smp_intr_init(unsigned int cpu)
if (!xen_fifo_events) {
debug_name = kasprintf(GFP_KERNEL, "debug%d", cpu);
if (!debug_name)
goto fail_mem;
per_cpu(xen_debug_irq, cpu).name = debug_name;
rc = bind_virq_to_irqhandler(VIRQ_DEBUG, cpu,
xen_debug_interrupt,
@ -101,6 +108,9 @@ int xen_smp_intr_init(unsigned int cpu)
}
callfunc_name = kasprintf(GFP_KERNEL, "callfuncsingle%d", cpu);
if (!callfunc_name)
goto fail_mem;
per_cpu(xen_callfuncsingle_irq, cpu).name = callfunc_name;
rc = bind_ipi_to_irqhandler(XEN_CALL_FUNCTION_SINGLE_VECTOR,
cpu,
@ -114,6 +124,8 @@ int xen_smp_intr_init(unsigned int cpu)
return 0;
fail_mem:
rc = -ENOMEM;
fail:
xen_smp_intr_free(cpu);
return rc;

View File

@ -66,6 +66,7 @@ enum opal_response_token {
#define SHORT_ATOM_BYTE 0xBF
#define MEDIUM_ATOM_BYTE 0xDF
#define LONG_ATOM_BYTE 0xE3
#define EMPTY_ATOM_BYTE 0xFF
#define OPAL_INVAL_PARAM 12
#define OPAL_MANUFACTURED_INACTIVE 0x08

View File

@ -895,16 +895,20 @@ static int response_parse(const u8 *buf, size_t length,
token_length = response_parse_medium(iter, pos);
else if (pos[0] <= LONG_ATOM_BYTE) /* long atom */
token_length = response_parse_long(iter, pos);
else if (pos[0] == EMPTY_ATOM_BYTE) /* empty atom */
token_length = 1;
else /* TOKEN */
token_length = response_parse_token(iter, pos);
if (token_length < 0)
return token_length;
if (pos[0] != EMPTY_ATOM_BYTE)
num_entries++;
pos += token_length;
total -= token_length;
iter++;
num_entries++;
}
resp->num = num_entries;

View File

@ -1427,6 +1427,8 @@ int acpi_processor_power_exit(struct acpi_processor *pr)
acpi_processor_registered--;
if (acpi_processor_registered == 0)
cpuidle_unregister_driver(&acpi_idle_driver);
kfree(dev);
}
pr->flags.power_setup_done = 0;

View File

@ -321,18 +321,14 @@ static int acpi_scan_device_check(struct acpi_device *adev)
* again).
*/
if (adev->handler) {
dev_warn(&adev->dev, "Already enumerated\n");
return -EALREADY;
dev_dbg(&adev->dev, "Already enumerated\n");
return 0;
}
error = acpi_bus_scan(adev->handle);
if (error) {
dev_warn(&adev->dev, "Namespace scan failure\n");
return error;
}
if (!adev->handler) {
dev_warn(&adev->dev, "Enumeration failure\n");
error = -ENODEV;
}
} else {
error = acpi_scan_device_not_present(adev);
}

View File

@ -49,6 +49,7 @@ enum {
enum board_ids {
/* board IDs by feature in alphabetical order */
board_ahci,
board_ahci_43bit_dma,
board_ahci_ign_iferr,
board_ahci_low_power,
board_ahci_no_debounce_delay,
@ -129,6 +130,13 @@ static const struct ata_port_info ahci_port_info[] = {
.udma_mask = ATA_UDMA6,
.port_ops = &ahci_ops,
},
[board_ahci_43bit_dma] = {
AHCI_HFLAGS (AHCI_HFLAG_43BIT_ONLY),
.flags = AHCI_FLAG_COMMON,
.pio_mask = ATA_PIO4,
.udma_mask = ATA_UDMA6,
.port_ops = &ahci_ops,
},
[board_ahci_ign_iferr] = {
AHCI_HFLAGS (AHCI_HFLAG_IGN_IRQ_IF_ERR),
.flags = AHCI_FLAG_COMMON,
@ -594,11 +602,11 @@ static const struct pci_device_id ahci_pci_tbl[] = {
{ PCI_VDEVICE(PROMISE, 0x3f20), board_ahci }, /* PDC42819 */
{ PCI_VDEVICE(PROMISE, 0x3781), board_ahci }, /* FastTrak TX8660 ahci-mode */
/* Asmedia */
/* ASMedia */
{ PCI_VDEVICE(ASMEDIA, 0x0601), board_ahci }, /* ASM1060 */
{ PCI_VDEVICE(ASMEDIA, 0x0602), board_ahci }, /* ASM1060 */
{ PCI_VDEVICE(ASMEDIA, 0x0611), board_ahci }, /* ASM1061 */
{ PCI_VDEVICE(ASMEDIA, 0x0612), board_ahci }, /* ASM1062 */
{ PCI_VDEVICE(ASMEDIA, 0x0611), board_ahci_43bit_dma }, /* ASM1061 */
{ PCI_VDEVICE(ASMEDIA, 0x0612), board_ahci_43bit_dma }, /* ASM1061/1062 */
{ PCI_VDEVICE(ASMEDIA, 0x0621), board_ahci }, /* ASM1061R */
{ PCI_VDEVICE(ASMEDIA, 0x0622), board_ahci }, /* ASM1062R */
@ -654,6 +662,11 @@ MODULE_PARM_DESC(mobile_lpm_policy, "Default LPM policy for mobile chipsets");
static void ahci_pci_save_initial_config(struct pci_dev *pdev,
struct ahci_host_priv *hpriv)
{
if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && pdev->device == 0x1166) {
dev_info(&pdev->dev, "ASM1166 has only six ports\n");
hpriv->saved_port_map = 0x3f;
}
if (pdev->vendor == PCI_VENDOR_ID_JMICRON && pdev->device == 0x2361) {
dev_info(&pdev->dev, "JMB361 has only one port\n");
hpriv->force_port_map = 1;
@ -946,11 +959,20 @@ static int ahci_pci_device_resume(struct device *dev)
#endif /* CONFIG_PM */
static int ahci_configure_dma_masks(struct pci_dev *pdev, int using_dac)
static int ahci_configure_dma_masks(struct pci_dev *pdev,
struct ahci_host_priv *hpriv)
{
const int dma_bits = using_dac ? 64 : 32;
int dma_bits;
int rc;
if (hpriv->cap & HOST_CAP_64) {
dma_bits = 64;
if (hpriv->flags & AHCI_HFLAG_43BIT_ONLY)
dma_bits = 43;
} else {
dma_bits = 32;
}
/*
* If the device fixup already set the dma_mask to some non-standard
* value, don't extend it here. This happens on STA2X11, for example.
@ -1928,7 +1950,7 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
ahci_gtf_filter_workaround(host);
/* initialize adapter */
rc = ahci_configure_dma_masks(pdev, hpriv->cap & HOST_CAP_64);
rc = ahci_configure_dma_masks(pdev, hpriv);
if (rc)
return rc;

View File

@ -244,6 +244,7 @@ enum {
AHCI_HFLAG_IGN_NOTSUPP_POWER_ON = BIT(27), /* ignore -EOPNOTSUPP
from phy_power_on() */
AHCI_HFLAG_NO_SXS = BIT(28), /* SXS not supported */
AHCI_HFLAG_43BIT_ONLY = BIT(29), /* 43bit DMA addr limit */
/* ap->flags bits */

View File

@ -420,13 +420,16 @@ aoecmd_cfg_pkts(ushort aoemajor, unsigned char aoeminor, struct sk_buff_head *qu
rcu_read_lock();
for_each_netdev_rcu(&init_net, ifp) {
dev_hold(ifp);
if (!is_aoe_netif(ifp))
goto cont;
if (!is_aoe_netif(ifp)) {
dev_put(ifp);
continue;
}
skb = new_skb(sizeof *h + sizeof *ch);
if (skb == NULL) {
printk(KERN_INFO "aoe: skb alloc failure\n");
goto cont;
dev_put(ifp);
continue;
}
skb_put(skb, sizeof *h + sizeof *ch);
skb->dev = ifp;
@ -441,9 +444,6 @@ aoecmd_cfg_pkts(ushort aoemajor, unsigned char aoeminor, struct sk_buff_head *qu
h->major = cpu_to_be16(aoemajor);
h->minor = aoeminor;
h->cmd = AOECMD_CFG;
cont:
dev_put(ifp);
}
rcu_read_unlock();
}

View File

@ -64,6 +64,7 @@ tx(int id) __must_hold(&txlock)
pr_warn("aoe: packet could not be sent on %s. %s\n",
ifp ? ifp->name : "netif",
"consider increasing tx_queue_len");
dev_put(ifp);
spin_lock_irq(&txlock);
}
return 0;

View File

@ -456,10 +456,20 @@ static DEFINE_TIMER(fd_timer, check_change);
static void fd_end_request_cur(blk_status_t err)
{
DPRINT(("fd_end_request_cur(), bytes %d of %d\n",
blk_rq_cur_bytes(fd_request),
blk_rq_bytes(fd_request)));
if (!blk_update_request(fd_request, err,
blk_rq_cur_bytes(fd_request))) {
DPRINT(("calling __blk_mq_end_request()\n"));
__blk_mq_end_request(fd_request, err);
fd_request = NULL;
} else {
/* requeue rest of request */
DPRINT(("calling blk_mq_requeue_request()\n"));
blk_mq_requeue_request(fd_request, true);
fd_request = NULL;
}
}
@ -653,9 +663,6 @@ static inline void copy_buffer(void *from, void *to)
*p2++ = *p1++;
}
/* General Interrupt Handling */
static void (*FloppyIRQHandler)( int status ) = NULL;
@ -700,12 +707,21 @@ static void fd_error( void )
if (fd_request->error_count >= MAX_ERRORS) {
printk(KERN_ERR "fd%d: too many errors.\n", SelectedDrive );
fd_end_request_cur(BLK_STS_IOERR);
finish_fdc();
return;
}
else if (fd_request->error_count == RECALIBRATE_ERRORS) {
printk(KERN_WARNING "fd%d: recalibrating\n", SelectedDrive );
if (SelectedDrive != -1)
SUD.track = -1;
}
/* need to re-run request to recalibrate */
atari_disable_irq( IRQ_MFP_FDC );
setup_req_params( SelectedDrive );
do_fd_action( SelectedDrive );
atari_enable_irq( IRQ_MFP_FDC );
}
@ -740,6 +756,7 @@ static int do_format(int drive, int type, struct atari_format_descr *desc)
if (type) {
if (--type >= NUM_DISK_MINORS ||
minor2disktype[type].drive_types > DriveType) {
finish_fdc();
ret = -EINVAL;
goto out;
}
@ -748,6 +765,7 @@ static int do_format(int drive, int type, struct atari_format_descr *desc)
}
if (!UDT || desc->track >= UDT->blocks/UDT->spt/2 || desc->head >= 2) {
finish_fdc();
ret = -EINVAL;
goto out;
}
@ -788,6 +806,7 @@ static int do_format(int drive, int type, struct atari_format_descr *desc)
wait_for_completion(&format_wait);
finish_fdc();
ret = FormatError ? -EIO : 0;
out:
blk_mq_unquiesce_queue(q);
@ -822,6 +841,7 @@ static void do_fd_action( int drive )
else {
/* all sectors finished */
fd_end_request_cur(BLK_STS_OK);
finish_fdc();
return;
}
}
@ -1226,6 +1246,7 @@ static void fd_rwsec_done1(int status)
else {
/* all sectors finished */
fd_end_request_cur(BLK_STS_OK);
finish_fdc();
}
return;
@ -1347,7 +1368,7 @@ static void fd_times_out(struct timer_list *unused)
static void finish_fdc( void )
{
if (!NeedSeek) {
if (!NeedSeek || !stdma_is_locked_by(floppy_irq)) {
finish_fdc_done( 0 );
}
else {
@ -1382,7 +1403,8 @@ static void finish_fdc_done( int dummy )
start_motor_off_timer();
local_irq_save(flags);
stdma_release();
if (stdma_is_locked_by(floppy_irq))
stdma_release();
local_irq_restore(flags);
DPRINT(("finish_fdc() finished\n"));
@ -1472,15 +1494,6 @@ static void setup_req_params( int drive )
ReqTrack, ReqSector, (unsigned long)ReqData ));
}
static void ataflop_commit_rqs(struct blk_mq_hw_ctx *hctx)
{
spin_lock_irq(&ataflop_lock);
atari_disable_irq(IRQ_MFP_FDC);
finish_fdc();
atari_enable_irq(IRQ_MFP_FDC);
spin_unlock_irq(&ataflop_lock);
}
static blk_status_t ataflop_queue_rq(struct blk_mq_hw_ctx *hctx,
const struct blk_mq_queue_data *bd)
{
@ -1488,6 +1501,10 @@ static blk_status_t ataflop_queue_rq(struct blk_mq_hw_ctx *hctx,
int drive = floppy - unit;
int type = floppy->type;
DPRINT(("Queue request: drive %d type %d sectors %d of %d last %d\n",
drive, type, blk_rq_cur_sectors(bd->rq),
blk_rq_sectors(bd->rq), bd->last));
spin_lock_irq(&ataflop_lock);
if (fd_request) {
spin_unlock_irq(&ataflop_lock);
@ -1508,6 +1525,7 @@ static blk_status_t ataflop_queue_rq(struct blk_mq_hw_ctx *hctx,
/* drive not connected */
printk(KERN_ERR "Unknown Device: fd%d\n", drive );
fd_end_request_cur(BLK_STS_IOERR);
stdma_release();
goto out;
}
@ -1524,11 +1542,13 @@ static blk_status_t ataflop_queue_rq(struct blk_mq_hw_ctx *hctx,
if (--type >= NUM_DISK_MINORS) {
printk(KERN_WARNING "fd%d: invalid disk format", drive );
fd_end_request_cur(BLK_STS_IOERR);
stdma_release();
goto out;
}
if (minor2disktype[type].drive_types > DriveType) {
printk(KERN_WARNING "fd%d: unsupported disk format", drive );
fd_end_request_cur(BLK_STS_IOERR);
stdma_release();
goto out;
}
type = minor2disktype[type].index;
@ -1547,8 +1567,6 @@ static blk_status_t ataflop_queue_rq(struct blk_mq_hw_ctx *hctx,
setup_req_params( drive );
do_fd_action( drive );
if (bd->last)
finish_fdc();
atari_enable_irq( IRQ_MFP_FDC );
out:
@ -1631,6 +1649,7 @@ static int fd_locked_ioctl(struct block_device *bdev, fmode_t mode,
/* what if type > 0 here? Overwrite specified entry ? */
if (type) {
/* refuse to re-set a predefined type for now */
finish_fdc();
return -EINVAL;
}
@ -1698,8 +1717,10 @@ static int fd_locked_ioctl(struct block_device *bdev, fmode_t mode,
/* sanity check */
if (setprm.track != dtp->blocks/dtp->spt/2 ||
setprm.head != 2)
setprm.head != 2) {
finish_fdc();
return -EINVAL;
}
UDT = dtp;
set_capacity(floppy->disk, UDT->blocks);
@ -1959,7 +1980,6 @@ static const struct block_device_operations floppy_fops = {
static const struct blk_mq_ops ataflop_mq_ops = {
.queue_rq = ataflop_queue_rq,
.commit_rqs = ataflop_commit_rqs,
};
static struct kobject *floppy_find(dev_t dev, int *part, void *data)

View File

@ -2339,6 +2339,12 @@ static int nbd_genl_status(struct sk_buff *skb, struct genl_info *info)
}
dev_list = nla_nest_start_noflag(reply, NBD_ATTR_DEVICE_LIST);
if (!dev_list) {
nlmsg_free(reply);
ret = -EMSGSIZE;
goto out;
}
if (index == -1) {
ret = idr_for_each(&nbd_index_idr, &status_cb, reply);
if (ret) {

View File

@ -956,14 +956,15 @@ static int virtblk_freeze(struct virtio_device *vdev)
{
struct virtio_blk *vblk = vdev->priv;
/* Ensure no requests in virtqueues before deleting vqs. */
blk_mq_freeze_queue(vblk->disk->queue);
/* Ensure we don't receive any more interrupts */
vdev->config->reset(vdev);
/* Make sure no work handler is accessing the device. */
flush_work(&vblk->config_work);
blk_mq_quiesce_queue(vblk->disk->queue);
vdev->config->del_vqs(vdev);
kfree(vblk->vqs);
@ -981,7 +982,7 @@ static int virtblk_restore(struct virtio_device *vdev)
virtio_device_ready(vdev);
blk_mq_unquiesce_queue(vblk->disk->queue);
blk_mq_unfreeze_queue(vblk->disk->queue);
return 0;
}
#endif

View File

@ -176,11 +176,12 @@ config SUNXI_RSB
config TEGRA_ACONNECT
tristate "Tegra ACONNECT Bus Driver"
depends on ARCH_TEGRA_210_SOC
depends on ARCH_TEGRA
depends on OF && PM
help
Driver for the Tegra ACONNECT bus which is used to interface with
the devices inside the Audio Processing Engine (APE) for Tegra210.
the devices inside the Audio Processing Engine (APE) for
Tegra210 and later.
config TEGRA_GMI
tristate "Tegra Generic Memory Interface bus driver"

View File

@ -427,6 +427,9 @@ static struct clk_core *clk_core_get(struct clk_core *core, u8 p_index)
if (IS_ERR(hw))
return ERR_CAST(hw);
if (!hw)
return NULL;
return hw->core;
}

View File

@ -130,7 +130,7 @@ static void hi3519_clk_unregister(struct platform_device *pdev)
of_clk_del_provider(pdev->dev.of_node);
hisi_clk_unregister_gate(hi3519_gate_clks,
ARRAY_SIZE(hi3519_mux_clks),
ARRAY_SIZE(hi3519_gate_clks),
crg->clk_data);
hisi_clk_unregister_mux(hi3519_mux_clks,
ARRAY_SIZE(hi3519_mux_clks),

View File

@ -769,6 +769,8 @@ static struct clk_branch disp_cc_mdss_vsync_clk = {
static struct gdsc mdss_gdsc = {
.gdscr = 0x3000,
.en_few_wait_val = 0x6,
.en_rest_wait_val = 0x5,
.pd = {
.name = "mdss_gdsc",
},

View File

@ -22,8 +22,8 @@ static int qcom_reset(struct reset_controller_dev *rcdev, unsigned long id)
return 0;
}
static int
qcom_reset_assert(struct reset_controller_dev *rcdev, unsigned long id)
static int qcom_reset_set_assert(struct reset_controller_dev *rcdev,
unsigned long id, bool assert)
{
struct qcom_reset_controller *rst;
const struct qcom_reset_map *map;
@ -33,21 +33,22 @@ qcom_reset_assert(struct reset_controller_dev *rcdev, unsigned long id)
map = &rst->reset_map[id];
mask = map->bitmask ? map->bitmask : BIT(map->bit);
return regmap_update_bits(rst->regmap, map->reg, mask, mask);
regmap_update_bits(rst->regmap, map->reg, mask, assert ? mask : 0);
/* Read back the register to ensure write completion, ignore the value */
regmap_read(rst->regmap, map->reg, &mask);
return 0;
}
static int
qcom_reset_deassert(struct reset_controller_dev *rcdev, unsigned long id)
static int qcom_reset_assert(struct reset_controller_dev *rcdev, unsigned long id)
{
struct qcom_reset_controller *rst;
const struct qcom_reset_map *map;
u32 mask;
return qcom_reset_set_assert(rcdev, id, true);
}
rst = to_qcom_reset_controller(rcdev);
map = &rst->reset_map[id];
mask = map->bitmask ? map->bitmask : BIT(map->bit);
return regmap_update_bits(rst->regmap, map->reg, mask, 0);
static int qcom_reset_deassert(struct reset_controller_dev *rcdev, unsigned long id)
{
return qcom_reset_set_assert(rcdev, id, false);
}
const struct reset_control_ops qcom_reset_ops = {

View File

@ -481,7 +481,11 @@ static bool brcm_avs_is_firmware_loaded(struct private_data *priv)
static unsigned int brcm_avs_cpufreq_get(unsigned int cpu)
{
struct cpufreq_policy *policy = cpufreq_cpu_get(cpu);
struct private_data *priv = policy->driver_data;
struct private_data *priv;
if (!policy)
return 0;
priv = policy->driver_data;
cpufreq_cpu_put(policy);

View File

@ -101,7 +101,8 @@ static void virtio_crypto_dataq_akcipher_callback(struct virtio_crypto_request *
}
static int virtio_crypto_alg_akcipher_init_session(struct virtio_crypto_akcipher_ctx *ctx,
struct virtio_crypto_ctrl_header *header, void *para,
struct virtio_crypto_ctrl_header *header,
struct virtio_crypto_akcipher_session_para *para,
const uint8_t *key, unsigned int keylen)
{
struct scatterlist outhdr_sg, key_sg, inhdr_sg, *sgs[3];
@ -125,7 +126,7 @@ static int virtio_crypto_alg_akcipher_init_session(struct virtio_crypto_akcipher
ctrl = &vc_ctrl_req->ctrl;
memcpy(&ctrl->header, header, sizeof(ctrl->header));
memcpy(&ctrl->u, para, sizeof(ctrl->u));
memcpy(&ctrl->u.akcipher_create_session.para, para, sizeof(*para));
input = &vc_ctrl_req->input;
input->status = cpu_to_le32(VIRTIO_CRYPTO_ERR);

View File

@ -231,7 +231,10 @@ static int zynqmp_handle_aes_req(struct crypto_engine *engine,
err = zynqmp_aes_aead_cipher(areq);
}
local_bh_disable();
crypto_finalize_aead_request(engine, areq, err);
local_bh_enable();
return 0;
}

View File

@ -614,16 +614,16 @@ config TEGRA20_APB_DMA
config TEGRA210_ADMA
tristate "NVIDIA Tegra210 ADMA support"
depends on (ARCH_TEGRA_210_SOC || COMPILE_TEST)
depends on (ARCH_TEGRA || COMPILE_TEST)
select DMA_ENGINE
select DMA_VIRTUAL_CHANNELS
help
Support for the NVIDIA Tegra210 ADMA controller driver. The
DMA controller has multiple DMA channels and is used to service
various audio clients in the Tegra210 audio processing engine
(APE). This DMA controller transfers data from memory to
peripheral and vice versa. It does not support memory to
memory data transfer.
Support for the NVIDIA Tegra210/Tegra186/Tegra194/Tegra234 ADMA
controller driver. The DMA controller has multiple DMA channels
and is used to service various audio clients in the Tegra210
audio processing engine (APE). This DMA controller transfers
data from memory to peripheral and vice versa. It does not
support memory to memory data transfer.
config TIMB_DMA
tristate "Timberdale FPGA DMA support"

View File

@ -109,6 +109,7 @@
#define FSL_QDMA_CMD_WTHROTL_OFFSET 20
#define FSL_QDMA_CMD_DSEN_OFFSET 19
#define FSL_QDMA_CMD_LWC_OFFSET 16
#define FSL_QDMA_CMD_PF BIT(17)
/* Field definition for Descriptor status */
#define QDMA_CCDF_STATUS_RTE BIT(5)
@ -384,7 +385,8 @@ static void fsl_qdma_comp_fill_memcpy(struct fsl_qdma_comp *fsl_comp,
qdma_csgf_set_f(csgf_dest, len);
/* Descriptor Buffer */
cmd = cpu_to_le32(FSL_QDMA_CMD_RWTTYPE <<
FSL_QDMA_CMD_RWTTYPE_OFFSET);
FSL_QDMA_CMD_RWTTYPE_OFFSET) |
FSL_QDMA_CMD_PF;
sdf->data = QDMA_SDDF_CMD(cmd);
cmd = cpu_to_le32(FSL_QDMA_CMD_RWTTYPE <<
@ -805,7 +807,7 @@ fsl_qdma_irq_init(struct platform_device *pdev,
int i;
int cpu;
int ret;
char irq_name[20];
char irq_name[32];
fsl_qdma->error_irq =
platform_get_irq_byname(pdev, "qdma-error");
@ -1201,10 +1203,6 @@ static int fsl_qdma_probe(struct platform_device *pdev)
if (!fsl_qdma->queue)
return -ENOMEM;
ret = fsl_qdma_irq_init(pdev, fsl_qdma);
if (ret)
return ret;
fsl_qdma->irq_base = platform_get_irq_byname(pdev, "qdma-queue0");
if (fsl_qdma->irq_base < 0)
return fsl_qdma->irq_base;
@ -1243,19 +1241,22 @@ static int fsl_qdma_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, fsl_qdma);
ret = dma_async_device_register(&fsl_qdma->dma_dev);
if (ret) {
dev_err(&pdev->dev,
"Can't register NXP Layerscape qDMA engine.\n");
return ret;
}
ret = fsl_qdma_reg_init(fsl_qdma);
if (ret) {
dev_err(&pdev->dev, "Can't Initialize the qDMA engine.\n");
return ret;
}
ret = fsl_qdma_irq_init(pdev, fsl_qdma);
if (ret)
return ret;
ret = dma_async_device_register(&fsl_qdma->dma_dev);
if (ret) {
dev_err(&pdev->dev, "Can't register NXP Layerscape qDMA engine.\n");
return ret;
}
return 0;
}

View File

@ -25,7 +25,7 @@ struct sh_dmae_chan {
const struct sh_dmae_slave_config *config; /* Slave DMA configuration */
int xmit_shift; /* log_2(bytes_per_xfer) */
void __iomem *base;
char dev_id[16]; /* unique name per DMAC of channel */
char dev_id[32]; /* unique name per DMAC of channel */
int pm_error;
dma_addr_t slave_addr;
};

View File

@ -2462,6 +2462,11 @@ static int edma_probe(struct platform_device *pdev)
if (irq > 0) {
irq_name = devm_kasprintf(dev, GFP_KERNEL, "%s_ccint",
dev_name(dev));
if (!irq_name) {
ret = -ENOMEM;
goto err_disable_pm;
}
ret = devm_request_irq(dev, irq, dma_irq_handler, 0, irq_name,
ecc);
if (ret) {
@ -2478,6 +2483,11 @@ static int edma_probe(struct platform_device *pdev)
if (irq > 0) {
irq_name = devm_kasprintf(dev, GFP_KERNEL, "%s_ccerrint",
dev_name(dev));
if (!irq_name) {
ret = -ENOMEM;
goto err_disable_pm;
}
ret = devm_request_irq(dev, irq, dma_ccerr_handler, 0, irq_name,
ecc);
if (ret) {

View File

@ -429,7 +429,23 @@ static void bm_work(struct work_struct *work)
*/
card->bm_generation = generation;
if (root_device == NULL) {
if (card->gap_count == 0) {
/*
* If self IDs have inconsistent gap counts, do a
* bus reset ASAP. The config rom read might never
* complete, so don't wait for it. However, still
* send a PHY configuration packet prior to the
* bus reset. The PHY configuration packet might
* fail, but 1394-2008 8.4.5.2 explicitly permits
* it in this case, so it should be safe to try.
*/
new_root_id = local_id;
/*
* We must always send a bus reset if the gap count
* is inconsistent, so bypass the 5-reset limit.
*/
card->bm_retries = 0;
} else if (root_device == NULL) {
/*
* Either link_on is false, or we failed to read the
* config rom. In either case, pick another root.
@ -484,7 +500,19 @@ static void bm_work(struct work_struct *work)
fw_notice(card, "phy config: new root=%x, gap_count=%d\n",
new_root_id, gap_count);
fw_send_phy_config(card, new_root_id, generation, gap_count);
reset_bus(card, true);
/*
* Where possible, use a short bus reset to minimize
* disruption to isochronous transfers. But in the event
* of a gap count inconsistency, use a long bus reset.
*
* As noted in 1394a 8.4.6.2, nodes on a mixed 1394/1394a bus
* may set different gap counts after a bus reset. On a mixed
* 1394/1394a bus, a short bus reset can get doubled. Some
* nodes may treat the double reset as one bus reset and others
* may treat it as two, causing a gap count inconsistency
* again. Using a long bus reset prevents this.
*/
reset_bus(card, card->gap_count != 0);
/* Will allocate broadcast channel after the reset. */
goto out;
}

View File

@ -107,7 +107,7 @@ static int __init arm_enable_runtime_services(void)
efi_memory_desc_t *md;
for_each_efi_memory_desc(md) {
int md_size = md->num_pages << EFI_PAGE_SHIFT;
u64 md_size = md->num_pages << EFI_PAGE_SHIFT;
struct resource *res;
if (!(md->attribute & EFI_MEMORY_SP))

View File

@ -292,7 +292,7 @@ static int efi_capsule_open(struct inode *inode, struct file *file)
return -ENOMEM;
}
cap_info->phys = kzalloc(sizeof(void *), GFP_KERNEL);
cap_info->phys = kzalloc(sizeof(phys_addr_t), GFP_KERNEL);
if (!cap_info->phys) {
kfree(cap_info->pages);
kfree(cap_info);

View File

@ -141,15 +141,6 @@ static __init int is_usable_memory(efi_memory_desc_t *md)
case EFI_BOOT_SERVICES_DATA:
case EFI_CONVENTIONAL_MEMORY:
case EFI_PERSISTENT_MEMORY:
/*
* Special purpose memory is 'soft reserved', which means it
* is set aside initially, but can be hotplugged back in or
* be assigned to the dax driver after boot.
*/
if (efi_soft_reserve_enabled() &&
(md->attribute & EFI_MEMORY_SP))
return false;
/*
* According to the spec, these regions are no longer reserved
* after calling ExitBootServices(). However, we can only use
@ -194,6 +185,16 @@ static __init void reserve_regions(void)
size = npages << PAGE_SHIFT;
if (is_memory(md)) {
/*
* Special purpose memory is 'soft reserved', which
* means it is set aside initially. Don't add a memblock
* for it now so that it can be hotplugged back in or
* be assigned to the dax driver after boot.
*/
if (efi_soft_reserve_enabled() &&
(md->attribute & EFI_MEMORY_SP))
continue;
early_init_dt_add_memory_arch(paddr, size);
if (!is_usable_memory(md))

View File

@ -85,7 +85,7 @@ static int __init riscv_enable_runtime_services(void)
efi_memory_desc_t *md;
for_each_efi_memory_desc(md) {
int md_size = md->num_pages << EFI_PAGE_SHIFT;
u64 md_size = md->num_pages << EFI_PAGE_SHIFT;
struct resource *res;
if (!(md->attribute & EFI_MEMORY_SP))

View File

@ -127,8 +127,6 @@ static int gen_74x164_probe(struct spi_device *spi)
if (IS_ERR(chip->gpiod_oe))
return PTR_ERR(chip->gpiod_oe);
gpiod_set_value_cansleep(chip->gpiod_oe, 1);
spi_set_drvdata(spi, chip);
chip->gpio_chip.label = spi->modalias;
@ -153,6 +151,8 @@ static int gen_74x164_probe(struct spi_device *spi)
goto exit_destroy;
}
gpiod_set_value_cansleep(chip->gpiod_oe, 1);
ret = gpiochip_add_data(&chip->gpio_chip, chip);
if (!ret)
return 0;

View File

@ -733,11 +733,11 @@ int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data,
ret = gpiochip_irqchip_init_valid_mask(gc);
if (ret)
goto err_remove_acpi_chip;
goto err_free_hogs;
ret = gpiochip_irqchip_init_hw(gc);
if (ret)
goto err_remove_acpi_chip;
goto err_remove_irqchip_mask;
ret = gpiochip_add_irqchip(gc, lock_key, request_key);
if (ret)
@ -762,13 +762,13 @@ int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data,
gpiochip_irqchip_remove(gc);
err_remove_irqchip_mask:
gpiochip_irqchip_free_valid_mask(gc);
err_remove_acpi_chip:
acpi_gpiochip_remove(gc);
err_remove_of_chip:
err_free_hogs:
gpiochip_free_hogs(gc);
acpi_gpiochip_remove(gc);
gpiochip_remove_pin_ranges(gc);
err_remove_of_chip:
of_gpiochip_remove(gc);
err_free_gpiochip_mask:
gpiochip_remove_pin_ranges(gc);
gpiochip_free_valid_mask(gc);
err_remove_from_list:
spin_lock_irqsave(&gpio_lock, flags);

View File

@ -310,7 +310,7 @@ static uint32_t atom_get_src_int(atom_exec_context *ctx, uint8_t attr,
DEBUG("IMM 0x%02X\n", val);
return val;
}
return 0;
break;
case ATOM_ARG_PLL:
idx = U8(*ptr);
(*ptr)++;

View File

@ -1456,6 +1456,7 @@ static int dm_sw_fini(void *handle)
if (adev->dm.dmub_srv) {
dmub_srv_destroy(adev->dm.dmub_srv);
kfree(adev->dm.dmub_srv);
adev->dm.dmub_srv = NULL;
}

View File

@ -1179,7 +1179,7 @@ static ssize_t dp_dsc_clock_en_read(struct file *f, char __user *buf,
const uint32_t rd_buf_size = 10;
struct pipe_ctx *pipe_ctx;
ssize_t result = 0;
int i, r, str_len = 30;
int i, r, str_len = 10;
rd_buf = kcalloc(rd_buf_size, sizeof(char), GFP_KERNEL);

View File

@ -1669,6 +1669,9 @@ bool dcn10_set_output_transfer_func(struct dc *dc, struct pipe_ctx *pipe_ctx,
{
struct dpp *dpp = pipe_ctx->plane_res.dpp;
if (!stream)
return false;
if (dpp == NULL)
return false;
@ -1691,8 +1694,8 @@ bool dcn10_set_output_transfer_func(struct dc *dc, struct pipe_ctx *pipe_ctx,
} else
dpp->funcs->dpp_program_regamma_pwl(dpp, NULL, OPP_REGAMMA_BYPASS);
if (stream != NULL && stream->ctx != NULL &&
stream->out_transfer_func != NULL) {
if (stream->ctx &&
stream->out_transfer_func) {
log_tf(stream->ctx,
stream->out_transfer_func,
dpp->regamma_params.hw_points_num);

View File

@ -387,6 +387,15 @@ int drm_syncobj_find_fence(struct drm_file *file_private,
if (!syncobj)
return -ENOENT;
/* Waiting for userspace with locks help is illegal cause that can
* trivial deadlock with page faults for example. Make lockdep complain
* about it early on.
*/
if (flags & DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT) {
might_sleep();
lockdep_assert_none_held_once();
}
*fence = drm_syncobj_fence_get(syncobj);
if (*fence) {
@ -951,6 +960,10 @@ static signed long drm_syncobj_array_wait_timeout(struct drm_syncobj **syncobjs,
uint64_t *points;
uint32_t signaled_count, i;
if (flags & (DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT |
DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE))
lockdep_assert_none_held_once();
points = kmalloc_array(count, sizeof(*points), GFP_KERNEL);
if (points == NULL)
return -ENOMEM;
@ -1017,7 +1030,8 @@ static signed long drm_syncobj_array_wait_timeout(struct drm_syncobj **syncobjs,
* fallthough and try a 0 timeout wait!
*/
if (flags & DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT) {
if (flags & (DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT |
DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE)) {
for (i = 0; i < count; ++i)
drm_syncobj_fence_add_wait(syncobjs[i], &entries[i]);
}

View File

@ -74,29 +74,34 @@ int lima_heap_alloc(struct lima_bo *bo, struct lima_vm *vm)
} else {
bo->base.sgt = kmalloc(sizeof(*bo->base.sgt), GFP_KERNEL);
if (!bo->base.sgt) {
sg_free_table(&sgt);
return -ENOMEM;
ret = -ENOMEM;
goto err_out0;
}
}
ret = dma_map_sgtable(dev, &sgt, DMA_BIDIRECTIONAL, 0);
if (ret) {
sg_free_table(&sgt);
kfree(bo->base.sgt);
bo->base.sgt = NULL;
return ret;
}
if (ret)
goto err_out1;
*bo->base.sgt = sgt;
if (vm) {
ret = lima_vm_map_bo(vm, bo, old_size >> PAGE_SHIFT);
if (ret)
return ret;
goto err_out2;
}
bo->heap_size = new_size;
return 0;
err_out2:
dma_unmap_sgtable(dev, &sgt, DMA_BIDIRECTIONAL, 0);
err_out1:
kfree(bo->base.sgt);
bo->base.sgt = NULL;
err_out0:
sg_free_table(&sgt);
return ret;
}
int lima_gem_create_handle(struct drm_device *dev, struct drm_file *file,

View File

@ -84,11 +84,13 @@ static void mtk_drm_crtc_finish_page_flip(struct mtk_drm_crtc *mtk_crtc)
struct drm_crtc *crtc = &mtk_crtc->base;
unsigned long flags;
spin_lock_irqsave(&crtc->dev->event_lock, flags);
drm_crtc_send_vblank_event(crtc, mtk_crtc->event);
drm_crtc_vblank_put(crtc);
mtk_crtc->event = NULL;
spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
if (mtk_crtc->event) {
spin_lock_irqsave(&crtc->dev->event_lock, flags);
drm_crtc_send_vblank_event(crtc, mtk_crtc->event);
drm_crtc_vblank_put(crtc);
mtk_crtc->event = NULL;
spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
}
}
static void mtk_drm_finish_page_flip(struct mtk_drm_crtc *mtk_crtc)

View File

@ -68,8 +68,8 @@
#define DSI_PS_WC 0x3fff
#define DSI_PS_SEL (3 << 16)
#define PACKED_PS_16BIT_RGB565 (0 << 16)
#define LOOSELY_PS_18BIT_RGB666 (1 << 16)
#define PACKED_PS_18BIT_RGB666 (2 << 16)
#define PACKED_PS_18BIT_RGB666 (1 << 16)
#define LOOSELY_PS_24BIT_RGB666 (2 << 16)
#define PACKED_PS_24BIT_RGB888 (3 << 16)
#define DSI_VSA_NL 0x20
@ -365,10 +365,10 @@ static void mtk_dsi_ps_control_vact(struct mtk_dsi *dsi)
ps_bpp_mode |= PACKED_PS_24BIT_RGB888;
break;
case MIPI_DSI_FMT_RGB666:
ps_bpp_mode |= PACKED_PS_18BIT_RGB666;
ps_bpp_mode |= LOOSELY_PS_24BIT_RGB666;
break;
case MIPI_DSI_FMT_RGB666_PACKED:
ps_bpp_mode |= LOOSELY_PS_18BIT_RGB666;
ps_bpp_mode |= PACKED_PS_18BIT_RGB666;
break;
case MIPI_DSI_FMT_RGB565:
ps_bpp_mode |= PACKED_PS_16BIT_RGB565;
@ -419,7 +419,7 @@ static void mtk_dsi_ps_control(struct mtk_dsi *dsi)
dsi_tmp_buf_bpp = 3;
break;
case MIPI_DSI_FMT_RGB666:
tmp_reg = LOOSELY_PS_18BIT_RGB666;
tmp_reg = LOOSELY_PS_24BIT_RGB666;
dsi_tmp_buf_bpp = 3;
break;
case MIPI_DSI_FMT_RGB666_PACKED:

View File

@ -265,12 +265,14 @@ static void dpu_encoder_phys_vid_setup_timing_engine(
mode.htotal >>= 1;
mode.hsync_start >>= 1;
mode.hsync_end >>= 1;
mode.hskew >>= 1;
DPU_DEBUG_VIDENC(phys_enc,
"split_role %d, halve horizontal %d %d %d %d\n",
"split_role %d, halve horizontal %d %d %d %d %d\n",
phys_enc->split_role,
mode.hdisplay, mode.htotal,
mode.hsync_start, mode.hsync_end);
mode.hsync_start, mode.hsync_end,
mode.hskew);
}
drm_mode_to_intf_timing_params(phys_enc, &mode, &timing_params);

View File

@ -154,11 +154,17 @@ shadow_fw_init(struct nvkm_bios *bios, const char *name)
return (void *)fw;
}
static void
shadow_fw_release(void *fw)
{
release_firmware(fw);
}
static const struct nvbios_source
shadow_fw = {
.name = "firmware",
.init = shadow_fw_init,
.fini = (void(*)(void *))release_firmware,
.fini = shadow_fw_release,
.read = shadow_fw_read,
.rw = false,
};

View File

@ -826,7 +826,7 @@ int ni_init_microcode(struct radeon_device *rdev)
err = 0;
} else if (rdev->smc_fw->size != smc_req_size) {
pr_err("ni_mc: Bogus length %zu in firmware \"%s\"\n",
rdev->mc_fw->size, fw_name);
rdev->smc_fw->size, fw_name);
err = -EINVAL;
}
}

View File

@ -402,7 +402,7 @@ static int inno_hdmi_config_video_timing(struct inno_hdmi *hdmi,
hdmi_writeb(hdmi, HDMI_VIDEO_EXT_HBLANK_L, value & 0xFF);
hdmi_writeb(hdmi, HDMI_VIDEO_EXT_HBLANK_H, (value >> 8) & 0xFF);
value = mode->hsync_start - mode->hdisplay;
value = mode->htotal - mode->hsync_start;
hdmi_writeb(hdmi, HDMI_VIDEO_EXT_HDELAY_L, value & 0xFF);
hdmi_writeb(hdmi, HDMI_VIDEO_EXT_HDELAY_H, (value >> 8) & 0xFF);
@ -417,7 +417,7 @@ static int inno_hdmi_config_video_timing(struct inno_hdmi *hdmi,
value = mode->vtotal - mode->vdisplay;
hdmi_writeb(hdmi, HDMI_VIDEO_EXT_VBLANK, value & 0xFF);
value = mode->vsync_start - mode->vdisplay;
value = mode->vtotal - mode->vsync_start;
hdmi_writeb(hdmi, HDMI_VIDEO_EXT_VDELAY, value & 0xFF);
value = mode->vsync_end - mode->vsync_start;

View File

@ -572,8 +572,7 @@ static int rockchip_lvds_bind(struct device *dev, struct device *master,
ret = -EINVAL;
goto err_put_port;
} else if (ret) {
DRM_DEV_ERROR(dev, "failed to find panel and bridge node\n");
ret = -EPROBE_DEFER;
dev_err_probe(dev, ret, "failed to find panel and bridge node\n");
goto err_put_port;
}
if (lvds->panel)

View File

@ -1534,9 +1534,11 @@ static int tegra_dsi_ganged_probe(struct tegra_dsi *dsi)
np = of_parse_phandle(dsi->dev->of_node, "nvidia,ganged-mode", 0);
if (np) {
struct platform_device *gangster = of_find_device_by_node(np);
of_node_put(np);
if (!gangster)
return -EPROBE_DEFER;
dsi->slave = platform_get_drvdata(gangster);
of_node_put(np);
if (!dsi->slave) {
put_device(&gangster->dev);
@ -1584,48 +1586,58 @@ static int tegra_dsi_probe(struct platform_device *pdev)
if (!pdev->dev.pm_domain) {
dsi->rst = devm_reset_control_get(&pdev->dev, "dsi");
if (IS_ERR(dsi->rst))
return PTR_ERR(dsi->rst);
if (IS_ERR(dsi->rst)) {
err = PTR_ERR(dsi->rst);
goto remove;
}
}
dsi->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(dsi->clk)) {
dev_err(&pdev->dev, "cannot get DSI clock\n");
return PTR_ERR(dsi->clk);
err = dev_err_probe(&pdev->dev, PTR_ERR(dsi->clk),
"cannot get DSI clock\n");
goto remove;
}
dsi->clk_lp = devm_clk_get(&pdev->dev, "lp");
if (IS_ERR(dsi->clk_lp)) {
dev_err(&pdev->dev, "cannot get low-power clock\n");
return PTR_ERR(dsi->clk_lp);
err = dev_err_probe(&pdev->dev, PTR_ERR(dsi->clk_lp),
"cannot get low-power clock\n");
goto remove;
}
dsi->clk_parent = devm_clk_get(&pdev->dev, "parent");
if (IS_ERR(dsi->clk_parent)) {
dev_err(&pdev->dev, "cannot get parent clock\n");
return PTR_ERR(dsi->clk_parent);
err = dev_err_probe(&pdev->dev, PTR_ERR(dsi->clk_parent),
"cannot get parent clock\n");
goto remove;
}
dsi->vdd = devm_regulator_get(&pdev->dev, "avdd-dsi-csi");
if (IS_ERR(dsi->vdd)) {
dev_err(&pdev->dev, "cannot get VDD supply\n");
return PTR_ERR(dsi->vdd);
err = dev_err_probe(&pdev->dev, PTR_ERR(dsi->vdd),
"cannot get VDD supply\n");
goto remove;
}
err = tegra_dsi_setup_clocks(dsi);
if (err < 0) {
dev_err(&pdev->dev, "cannot setup clocks\n");
return err;
goto remove;
}
regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
dsi->regs = devm_ioremap_resource(&pdev->dev, regs);
if (IS_ERR(dsi->regs))
return PTR_ERR(dsi->regs);
if (IS_ERR(dsi->regs)) {
err = PTR_ERR(dsi->regs);
goto remove;
}
dsi->mipi = tegra_mipi_request(&pdev->dev, pdev->dev.of_node);
if (IS_ERR(dsi->mipi))
return PTR_ERR(dsi->mipi);
if (IS_ERR(dsi->mipi)) {
err = PTR_ERR(dsi->mipi);
goto remove;
}
dsi->host.ops = &tegra_dsi_host_ops;
dsi->host.dev = &pdev->dev;
@ -1653,9 +1665,12 @@ static int tegra_dsi_probe(struct platform_device *pdev)
return 0;
unregister:
pm_runtime_disable(&pdev->dev);
mipi_dsi_host_unregister(&dsi->host);
mipi_free:
tegra_mipi_free(dsi->mipi);
remove:
tegra_output_remove(&dsi->output);
return err;
}

View File

@ -155,6 +155,7 @@ struct drm_framebuffer *tegra_fb_create(struct drm_device *drm,
if (gem->size < size) {
err = -EINVAL;
drm_gem_object_put(gem);
goto unreference;
}

View File

@ -139,8 +139,10 @@ int tegra_output_probe(struct tegra_output *output)
GPIOD_IN,
"HDMI hotplug detect");
if (IS_ERR(output->hpd_gpio)) {
if (PTR_ERR(output->hpd_gpio) != -ENOENT)
return PTR_ERR(output->hpd_gpio);
if (PTR_ERR(output->hpd_gpio) != -ENOENT) {
err = PTR_ERR(output->hpd_gpio);
goto put_i2c;
}
output->hpd_gpio = NULL;
}
@ -149,7 +151,7 @@ int tegra_output_probe(struct tegra_output *output)
err = gpiod_to_irq(output->hpd_gpio);
if (err < 0) {
dev_err(output->dev, "gpiod_to_irq(): %d\n", err);
return err;
goto put_i2c;
}
output->hpd_irq = err;
@ -162,7 +164,7 @@ int tegra_output_probe(struct tegra_output *output)
if (err < 0) {
dev_err(output->dev, "failed to request IRQ#%u: %d\n",
output->hpd_irq, err);
return err;
goto put_i2c;
}
output->connector.polled = DRM_CONNECTOR_POLL_HPD;
@ -176,6 +178,12 @@ int tegra_output_probe(struct tegra_output *output)
}
return 0;
put_i2c:
if (output->ddc)
i2c_put_adapter(output->ddc);
return err;
}
void tegra_output_remove(struct tegra_output *output)

View File

@ -202,7 +202,7 @@ struct tidss_plane *tidss_plane_create(struct tidss_device *tidss,
drm_plane_helper_add(&tplane->plane, &tidss_plane_helper_funcs);
drm_plane_create_zpos_property(&tplane->plane, hw_plane_id, 0,
drm_plane_create_zpos_property(&tplane->plane, tidss->num_planes, 0,
num_planes - 1);
ret = drm_plane_create_color_properties(&tplane->plane,

View File

@ -53,10 +53,10 @@ struct lenovo_drvdata {
/* 0: Up
* 1: Down (undecided)
* 2: Scrolling
* 3: Patched firmware, disable workaround
*/
u8 middlebutton_state;
bool fn_lock;
bool middleclick_workaround_cptkbd;
};
#define map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, EV_KEY, (c))
@ -418,6 +418,36 @@ static ssize_t attr_sensitivity_store_cptkbd(struct device *dev,
return count;
}
static ssize_t attr_middleclick_workaround_show_cptkbd(struct device *dev,
struct device_attribute *attr,
char *buf)
{
struct hid_device *hdev = to_hid_device(dev);
struct lenovo_drvdata *cptkbd_data = hid_get_drvdata(hdev);
return snprintf(buf, PAGE_SIZE, "%u\n",
cptkbd_data->middleclick_workaround_cptkbd);
}
static ssize_t attr_middleclick_workaround_store_cptkbd(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t count)
{
struct hid_device *hdev = to_hid_device(dev);
struct lenovo_drvdata *cptkbd_data = hid_get_drvdata(hdev);
int value;
if (kstrtoint(buf, 10, &value))
return -EINVAL;
if (value < 0 || value > 1)
return -EINVAL;
cptkbd_data->middleclick_workaround_cptkbd = !!value;
return count;
}
static struct device_attribute dev_attr_fn_lock =
__ATTR(fn_lock, S_IWUSR | S_IRUGO,
@ -429,10 +459,16 @@ static struct device_attribute dev_attr_sensitivity_cptkbd =
attr_sensitivity_show_cptkbd,
attr_sensitivity_store_cptkbd);
static struct device_attribute dev_attr_middleclick_workaround_cptkbd =
__ATTR(middleclick_workaround, S_IWUSR | S_IRUGO,
attr_middleclick_workaround_show_cptkbd,
attr_middleclick_workaround_store_cptkbd);
static struct attribute *lenovo_attributes_cptkbd[] = {
&dev_attr_fn_lock.attr,
&dev_attr_sensitivity_cptkbd.attr,
&dev_attr_middleclick_workaround_cptkbd.attr,
NULL
};
@ -483,23 +519,7 @@ static int lenovo_event_cptkbd(struct hid_device *hdev,
{
struct lenovo_drvdata *cptkbd_data = hid_get_drvdata(hdev);
if (cptkbd_data->middlebutton_state != 3) {
/* REL_X and REL_Y events during middle button pressed
* are only possible on patched, bug-free firmware
* so set middlebutton_state to 3
* to never apply workaround anymore
*/
if (hdev->product == USB_DEVICE_ID_LENOVO_CUSBKBD &&
cptkbd_data->middlebutton_state == 1 &&
usage->type == EV_REL &&
(usage->code == REL_X || usage->code == REL_Y)) {
cptkbd_data->middlebutton_state = 3;
/* send middle button press which was hold before */
input_event(field->hidinput->input,
EV_KEY, BTN_MIDDLE, 1);
input_sync(field->hidinput->input);
}
if (cptkbd_data->middleclick_workaround_cptkbd) {
/* "wheel" scroll events */
if (usage->type == EV_REL && (usage->code == REL_WHEEL ||
usage->code == REL_HWHEEL)) {
@ -976,6 +996,7 @@ static int lenovo_probe_cptkbd(struct hid_device *hdev)
cptkbd_data->middlebutton_state = 0;
cptkbd_data->fn_lock = true;
cptkbd_data->sensitivity = 0x05;
cptkbd_data->middleclick_workaround_cptkbd = true;
lenovo_features_set_cptkbd(hdev);
ret = sysfs_create_group(&hdev->dev.kobj, &lenovo_attr_group_cptkbd);

View File

@ -2067,6 +2067,10 @@ static const struct hid_device_id mt_devices[] = {
HID_DEVICE(BUS_I2C, HID_GROUP_MULTITOUCH_WIN_8,
USB_VENDOR_ID_SYNAPTICS, 0xcd7e) },
{ .driver_data = MT_CLS_WIN_8_FORCE_MULTI_INPUT,
HID_DEVICE(BUS_I2C, HID_GROUP_MULTITOUCH_WIN_8,
USB_VENDOR_ID_SYNAPTICS, 0xcddc) },
{ .driver_data = MT_CLS_WIN_8_FORCE_MULTI_INPUT,
HID_DEVICE(BUS_I2C, HID_GROUP_MULTITOUCH_WIN_8,
USB_VENDOR_ID_SYNAPTICS, 0xce08) },

View File

@ -503,6 +503,70 @@ int vmbus_establish_gpadl(struct vmbus_channel *channel, void *kbuffer,
}
EXPORT_SYMBOL_GPL(vmbus_establish_gpadl);
/**
* request_arr_init - Allocates memory for the requestor array. Each slot
* keeps track of the next available slot in the array. Initially, each
* slot points to the next one (as in a Linked List). The last slot
* does not point to anything, so its value is U64_MAX by default.
* @size The size of the array
*/
static u64 *request_arr_init(u32 size)
{
int i;
u64 *req_arr;
req_arr = kcalloc(size, sizeof(u64), GFP_KERNEL);
if (!req_arr)
return NULL;
for (i = 0; i < size - 1; i++)
req_arr[i] = i + 1;
/* Last slot (no more available slots) */
req_arr[i] = U64_MAX;
return req_arr;
}
/*
* vmbus_alloc_requestor - Initializes @rqstor's fields.
* Index 0 is the first free slot
* @size: Size of the requestor array
*/
static int vmbus_alloc_requestor(struct vmbus_requestor *rqstor, u32 size)
{
u64 *rqst_arr;
unsigned long *bitmap;
rqst_arr = request_arr_init(size);
if (!rqst_arr)
return -ENOMEM;
bitmap = bitmap_zalloc(size, GFP_KERNEL);
if (!bitmap) {
kfree(rqst_arr);
return -ENOMEM;
}
rqstor->req_arr = rqst_arr;
rqstor->req_bitmap = bitmap;
rqstor->size = size;
rqstor->next_request_id = 0;
spin_lock_init(&rqstor->req_lock);
return 0;
}
/*
* vmbus_free_requestor - Frees memory allocated for @rqstor
* @rqstor: Pointer to the requestor struct
*/
static void vmbus_free_requestor(struct vmbus_requestor *rqstor)
{
kfree(rqstor->req_arr);
bitmap_free(rqstor->req_bitmap);
}
static int __vmbus_open(struct vmbus_channel *newchannel,
void *userdata, u32 userdatalen,
void (*onchannelcallback)(void *context), void *context)
@ -523,6 +587,12 @@ static int __vmbus_open(struct vmbus_channel *newchannel,
if (newchannel->state != CHANNEL_OPEN_STATE)
return -EINVAL;
/* Create and init requestor */
if (newchannel->rqstor_size) {
if (vmbus_alloc_requestor(&newchannel->requestor, newchannel->rqstor_size))
return -ENOMEM;
}
newchannel->state = CHANNEL_OPENING_STATE;
newchannel->onchannel_callback = onchannelcallback;
newchannel->channel_callback_context = context;
@ -626,6 +696,7 @@ static int __vmbus_open(struct vmbus_channel *newchannel,
error_clean_ring:
hv_ringbuffer_cleanup(&newchannel->outbound);
hv_ringbuffer_cleanup(&newchannel->inbound);
vmbus_free_requestor(&newchannel->requestor);
newchannel->state = CHANNEL_OPEN_STATE;
return err;
}
@ -808,6 +879,9 @@ static int vmbus_close_internal(struct vmbus_channel *channel)
channel->ringbuffer_gpadlhandle = 0;
}
if (!ret)
vmbus_free_requestor(&channel->requestor);
return ret;
}
@ -888,7 +962,7 @@ int vmbus_sendpacket(struct vmbus_channel *channel, void *buffer,
/* in 8-bytes granularity */
desc.offset8 = sizeof(struct vmpacket_descriptor) >> 3;
desc.len8 = (u16)(packetlen_aligned >> 3);
desc.trans_id = requestid;
desc.trans_id = VMBUS_RQST_ERROR; /* will be updated in hv_ringbuffer_write() */
bufferlist[0].iov_base = &desc;
bufferlist[0].iov_len = sizeof(struct vmpacket_descriptor);
@ -897,7 +971,7 @@ int vmbus_sendpacket(struct vmbus_channel *channel, void *buffer,
bufferlist[2].iov_base = &aligned_data;
bufferlist[2].iov_len = (packetlen_aligned - packetlen);
return hv_ringbuffer_write(channel, bufferlist, num_vecs);
return hv_ringbuffer_write(channel, bufferlist, num_vecs, requestid);
}
EXPORT_SYMBOL(vmbus_sendpacket);
@ -939,7 +1013,7 @@ int vmbus_sendpacket_pagebuffer(struct vmbus_channel *channel,
desc.flags = VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED;
desc.dataoffset8 = descsize >> 3; /* in 8-bytes granularity */
desc.length8 = (u16)(packetlen_aligned >> 3);
desc.transactionid = requestid;
desc.transactionid = VMBUS_RQST_ERROR; /* will be updated in hv_ringbuffer_write() */
desc.reserved = 0;
desc.rangecount = pagecount;
@ -956,7 +1030,7 @@ int vmbus_sendpacket_pagebuffer(struct vmbus_channel *channel,
bufferlist[2].iov_base = &aligned_data;
bufferlist[2].iov_len = (packetlen_aligned - packetlen);
return hv_ringbuffer_write(channel, bufferlist, 3);
return hv_ringbuffer_write(channel, bufferlist, 3, requestid);
}
EXPORT_SYMBOL_GPL(vmbus_sendpacket_pagebuffer);
@ -983,7 +1057,7 @@ int vmbus_sendpacket_mpb_desc(struct vmbus_channel *channel,
desc->flags = VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED;
desc->dataoffset8 = desc_size >> 3; /* in 8-bytes granularity */
desc->length8 = (u16)(packetlen_aligned >> 3);
desc->transactionid = requestid;
desc->transactionid = VMBUS_RQST_ERROR; /* will be updated in hv_ringbuffer_write() */
desc->reserved = 0;
desc->rangecount = 1;
@ -994,7 +1068,7 @@ int vmbus_sendpacket_mpb_desc(struct vmbus_channel *channel,
bufferlist[2].iov_base = &aligned_data;
bufferlist[2].iov_len = (packetlen_aligned - packetlen);
return hv_ringbuffer_write(channel, bufferlist, 3);
return hv_ringbuffer_write(channel, bufferlist, 3, requestid);
}
EXPORT_SYMBOL_GPL(vmbus_sendpacket_mpb_desc);
@ -1042,3 +1116,91 @@ int vmbus_recvpacket_raw(struct vmbus_channel *channel, void *buffer,
buffer_actual_len, requestid, true);
}
EXPORT_SYMBOL_GPL(vmbus_recvpacket_raw);
/*
* vmbus_next_request_id - Returns a new request id. It is also
* the index at which the guest memory address is stored.
* Uses a spin lock to avoid race conditions.
* @rqstor: Pointer to the requestor struct
* @rqst_add: Guest memory address to be stored in the array
*/
u64 vmbus_next_request_id(struct vmbus_requestor *rqstor, u64 rqst_addr)
{
unsigned long flags;
u64 current_id;
const struct vmbus_channel *channel =
container_of(rqstor, const struct vmbus_channel, requestor);
/* Check rqstor has been initialized */
if (!channel->rqstor_size)
return VMBUS_NO_RQSTOR;
spin_lock_irqsave(&rqstor->req_lock, flags);
current_id = rqstor->next_request_id;
/* Requestor array is full */
if (current_id >= rqstor->size) {
spin_unlock_irqrestore(&rqstor->req_lock, flags);
return VMBUS_RQST_ERROR;
}
rqstor->next_request_id = rqstor->req_arr[current_id];
rqstor->req_arr[current_id] = rqst_addr;
/* The already held spin lock provides atomicity */
bitmap_set(rqstor->req_bitmap, current_id, 1);
spin_unlock_irqrestore(&rqstor->req_lock, flags);
/*
* Cannot return an ID of 0, which is reserved for an unsolicited
* message from Hyper-V.
*/
return current_id + 1;
}
EXPORT_SYMBOL_GPL(vmbus_next_request_id);
/*
* vmbus_request_addr - Returns the memory address stored at @trans_id
* in @rqstor. Uses a spin lock to avoid race conditions.
* @rqstor: Pointer to the requestor struct
* @trans_id: Request id sent back from Hyper-V. Becomes the requestor's
* next request id.
*/
u64 vmbus_request_addr(struct vmbus_requestor *rqstor, u64 trans_id)
{
unsigned long flags;
u64 req_addr;
const struct vmbus_channel *channel =
container_of(rqstor, const struct vmbus_channel, requestor);
/* Check rqstor has been initialized */
if (!channel->rqstor_size)
return VMBUS_NO_RQSTOR;
/* Hyper-V can send an unsolicited message with ID of 0 */
if (!trans_id)
return trans_id;
spin_lock_irqsave(&rqstor->req_lock, flags);
/* Data corresponding to trans_id is stored at trans_id - 1 */
trans_id--;
/* Invalid trans_id */
if (trans_id >= rqstor->size || !test_bit(trans_id, rqstor->req_bitmap)) {
spin_unlock_irqrestore(&rqstor->req_lock, flags);
return VMBUS_RQST_ERROR;
}
req_addr = rqstor->req_arr[trans_id];
rqstor->req_arr[trans_id] = rqstor->next_request_id;
rqstor->next_request_id = trans_id;
/* The already held spin lock provides atomicity */
bitmap_clear(rqstor->req_bitmap, trans_id, 1);
spin_unlock_irqrestore(&rqstor->req_lock, flags);
return req_addr;
}
EXPORT_SYMBOL_GPL(vmbus_request_addr);

View File

@ -180,7 +180,8 @@ int hv_ringbuffer_init(struct hv_ring_buffer_info *ring_info,
void hv_ringbuffer_cleanup(struct hv_ring_buffer_info *ring_info);
int hv_ringbuffer_write(struct vmbus_channel *channel,
const struct kvec *kv_list, u32 kv_count);
const struct kvec *kv_list, u32 kv_count,
u64 requestid);
int hv_ringbuffer_read(struct vmbus_channel *channel,
void *buffer, u32 buflen, u32 *buffer_actual_len,

View File

@ -261,7 +261,8 @@ EXPORT_SYMBOL_GPL(hv_ringbuffer_spinlock_busy);
/* Write to the ring buffer. */
int hv_ringbuffer_write(struct vmbus_channel *channel,
const struct kvec *kv_list, u32 kv_count)
const struct kvec *kv_list, u32 kv_count,
u64 requestid)
{
int i;
u32 bytes_avail_towrite;
@ -271,6 +272,8 @@ int hv_ringbuffer_write(struct vmbus_channel *channel,
u64 prev_indices;
unsigned long flags;
struct hv_ring_buffer_info *outring_info = &channel->outbound;
struct vmpacket_descriptor *desc = kv_list[0].iov_base;
u64 rqst_id = VMBUS_NO_RQSTOR;
if (channel->rescind)
return -ENODEV;
@ -313,6 +316,22 @@ int hv_ringbuffer_write(struct vmbus_channel *channel,
kv_list[i].iov_len);
}
/*
* Allocate the request ID after the data has been copied into the
* ring buffer. Once this request ID is allocated, the completion
* path could find the data and free it.
*/
if (desc->flags == VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED) {
rqst_id = vmbus_next_request_id(&channel->requestor, requestid);
if (rqst_id == VMBUS_RQST_ERROR) {
spin_unlock_irqrestore(&outring_info->ring_lock, flags);
return -EAGAIN;
}
}
desc = hv_get_ring_buffer(outring_info) + old_write;
desc->trans_id = (rqst_id == VMBUS_NO_RQSTOR) ? requestid : rqst_id;
/* Set previous packet start */
prev_indices = hv_get_ring_bufferindices(outring_info);
@ -332,8 +351,13 @@ int hv_ringbuffer_write(struct vmbus_channel *channel,
hv_signal_on_write(old_write, channel);
if (channel->rescind)
if (channel->rescind) {
if (rqst_id != VMBUS_NO_RQSTOR) {
/* Reclaim request ID to avoid leak of IDs */
vmbus_request_addr(&channel->requestor, rqst_id);
}
return -ENODEV;
}
return 0;
}

View File

@ -40,7 +40,7 @@ MODULE_PARM_DESC(tjmax, "TjMax value in degrees Celsius");
#define PKG_SYSFS_ATTR_NO 1 /* Sysfs attribute for package temp */
#define BASE_SYSFS_ATTR_NO 2 /* Sysfs Base attr no for coretemp */
#define NUM_REAL_CORES 128 /* Number of Real cores per cpu */
#define NUM_REAL_CORES 512 /* Number of Real cores per cpu */
#define CORETEMP_NAME_LENGTH 28 /* String Length of attrs */
#define MAX_CORE_ATTRS 4 /* Maximum no of basic attrs */
#define TOTAL_ATTRS (MAX_CORE_ATTRS + 1)

View File

@ -1686,7 +1686,7 @@ static int assign_client_id(struct ib_client *client)
{
int ret;
down_write(&clients_rwsem);
lockdep_assert_held(&clients_rwsem);
/*
* The add/remove callbacks must be called in FIFO/LIFO order. To
* achieve this we assign client_ids so they are sorted in
@ -1695,14 +1695,11 @@ static int assign_client_id(struct ib_client *client)
client->client_id = highest_client_id;
ret = xa_insert(&clients, client->client_id, client, GFP_KERNEL);
if (ret)
goto out;
return ret;
highest_client_id++;
xa_set_mark(&clients, client->client_id, CLIENT_REGISTERED);
out:
up_write(&clients_rwsem);
return ret;
return 0;
}
static void remove_client_id(struct ib_client *client)
@ -1732,25 +1729,35 @@ int ib_register_client(struct ib_client *client)
{
struct ib_device *device;
unsigned long index;
bool need_unreg = false;
int ret;
refcount_set(&client->uses, 1);
init_completion(&client->uses_zero);
/*
* The devices_rwsem is held in write mode to ensure that a racing
* ib_register_device() sees a consisent view of clients and devices.
*/
down_write(&devices_rwsem);
down_write(&clients_rwsem);
ret = assign_client_id(client);
if (ret)
return ret;
goto out;
down_read(&devices_rwsem);
need_unreg = true;
xa_for_each_marked (&devices, index, device, DEVICE_REGISTERED) {
ret = add_client_context(device, client);
if (ret) {
up_read(&devices_rwsem);
ib_unregister_client(client);
return ret;
}
if (ret)
goto out;
}
up_read(&devices_rwsem);
return 0;
ret = 0;
out:
up_write(&clients_rwsem);
up_write(&devices_rwsem);
if (need_unreg && ret)
ib_unregister_client(client);
return ret;
}
EXPORT_SYMBOL(ib_register_client);

View File

@ -1711,7 +1711,7 @@ int bnxt_re_modify_srq(struct ib_srq *ib_srq, struct ib_srq_attr *srq_attr,
switch (srq_attr_mask) {
case IB_SRQ_MAX_WR:
/* SRQ resize is not supported */
break;
return -EINVAL;
case IB_SRQ_LIMIT:
/* Change the SRQ threshold */
if (srq_attr->srq_limit > srq->qplib_srq.max_wqe)
@ -1726,13 +1726,12 @@ int bnxt_re_modify_srq(struct ib_srq *ib_srq, struct ib_srq_attr *srq_attr,
/* On success, update the shadow */
srq->srq_limit = srq_attr->srq_limit;
/* No need to Build and send response back to udata */
break;
return 0;
default:
ibdev_err(&rdev->ibdev,
"Unsupported srq_attr_mask 0x%x", srq_attr_mask);
return -EINVAL;
}
return 0;
}
int bnxt_re_query_srq(struct ib_srq *ib_srq, struct ib_srq_attr *srq_attr)

Some files were not shown because too many files have changed in this diff Show More