Merge 5.10.241 into android12-5.10-lts
Changes in 5.10.241
phy: tegra: xusb: Fix unbalanced regulator disable in UTMI PHY mode
USB: serial: option: add Telit Cinterion FE910C04 (ECM) composition
USB: serial: option: add Foxconn T99W640
USB: serial: ftdi_sio: add support for NDI EMGUIDE GEMINI
usb: gadget: configfs: Fix OOB read on empty string write
i2c: stm32: fix the device used for the DMA map
thunderbolt: Fix bit masking in tb_dp_port_set_hops()
Input: xpad - set correct controller type for Acer NGR200
pch_uart: Fix dma_sync_sg_for_device() nents value
HID: core: ensure the allocated report buffer can contain the reserved report ID
HID: core: ensure __hid_request reserves the report ID as the first byte
HID: core: do not bypass hid_hw_raw_request
phonet/pep: Move call to pn_skb_get_dst_sockaddr() earlier in pep_sock_accept()
af_packet: fix the SO_SNDTIMEO constraint not effective on tpacked_snd()
af_packet: fix soft lockup issue caused by tpacket_snd()
dmaengine: nbpfaxi: Fix memory corruption in probe()
isofs: Verify inode mode when loading from disk
memstick: core: Zero initialize id_reg in h_memstick_read_dev_id()
mmc: bcm2835: Fix dma_unmap_sg() nents value
mmc: sdhci-pci: Quirk for broken command queuing on Intel GLK-based Positivo models
mmc: sdhci_am654: Workaround for Errata i2312
soc: aspeed: lpc-snoop: Cleanup resources in stack-order
soc: aspeed: lpc-snoop: Don't disable channels that aren't enabled
iio: adc: max1363: Fix MAX1363_4X_CHANS/MAX1363_8X_CHANS[]
iio: adc: max1363: Reorder mode_list[] entries
iio: adc: stm32-adc: Fix race in installing chained IRQ handler
comedi: pcl812: Fix bit shift out of bounds
comedi: aio_iiro_16: Fix bit shift out of bounds
comedi: das16m1: Fix bit shift out of bounds
comedi: das6402: Fix bit shift out of bounds
comedi: Fix some signed shift left operations
comedi: Fix use of uninitialized data in insn_rw_emulate_bits()
comedi: Fix initialization of data for instructions that write to subdevice
net: emaclite: Fix missing pointer increment in aligned_read()
net/sched: sch_qfq: Fix race condition on qfq_aggregate
rpl: Fix use-after-free in rpl_do_srh_inline().
hwmon: (corsair-cpro) Validate the size of the received input buffer
usb: net: sierra: check for no status endpoint
Bluetooth: Fix null-ptr-deref in l2cap_sock_resume_cb()
Bluetooth: SMP: If an unallowed command is received consider it a failure
Bluetooth: SMP: Fix using HCI_ERROR_REMOTE_USER_TERM on timeout
Bluetooth: L2CAP: Fix attempting to adjust outgoing MTU
net: vlan: fix VLAN 0 refcount imbalance of toggling filtering during runtime
net/sched: Return NULL when htb_lookup_leaf encounters an empty rbtree
usb: hub: fix detection of high tier USB3 devices behind suspended hubs
usb: hub: Fix flushing and scheduling of delayed work that tunes runtime pm
usb: hub: Fix flushing of delayed work used for post resume purposes
usb: musb: Add and use inline functions musb_{get,set}_state
usb: musb: fix gadget state on disconnect
usb: dwc3: qcom: Don't leave BCR asserted
ASoC: fsl_sai: Force a software reset when starting in consumer mode
mm/vmalloc: leave lazy MMU mode on PTE mapping error
virtio-net: ensure the received length does not exceed allocated size
xhci: Disable stream for xHC controller with XHCI_BROKEN_STREAMS
regulator: core: fix NULL dereference on unbind due to stale coupling data
RDMA/core: Rate limit GID cache warning messages
i40e: Add rx_missed_errors for buffer exhaustion
i40e: report VF tx_dropped with tx_errors instead of tx_discards
net: appletalk: fix kerneldoc warnings
net: appletalk: Fix use-after-free in AARP proxy probe
net/sched: sch_qfq: Avoid triggering might_sleep in atomic context in qfq_delete_class
net: hns3: refine the struct hane3_tc_info
net: hns3: fixed vf get max channels bug
i2c: qup: jump out of the loop in case of timeout
ALSA: hda/realtek - Add mute LED support for HP Pavilion 15-eg0xxx
e1000e: disregard NVM checksum on tgp when valid checksum bit is not set
e1000e: ignore uninitialized checksum word on tgp
gve: Fix stuck TX queue for DQ queue format
nilfs2: reject invalid file types when reading inodes
x86/bugs: Fix use of possibly uninit value in amd_check_tsa_microcode()
comedi: comedi_test: Fix possible deletion of uninitialized timers
ALSA: hda: Add missing NVIDIA HDA codec IDs
usb: chipidea: add USB PHY event
usb: phy: mxs: disconnect line when USB charger is attached
ethernet: intel: fix building with large NR_CPUS
ASoC: Intel: fix SND_SOC_SOF dependencies
fs_context: fix parameter name in infofc() macro
hfsplus: remove mutex_lock check in hfsplus_free_extents
ASoC: soc-dai: tidyup return value of snd_soc_xlate_tdm_slot_mask()
ASoC: ops: dynamically allocate struct snd_ctl_elem_value
ARM: dts: vfxxx: Correctly use two tuples for timer address
staging: fbtft: fix potential memory leak in fbtft_framebuffer_alloc()
vmci: Prevent the dispatching of uninitialized payloads
pps: fix poll support
Revert "vmci: Prevent the dispatching of uninitialized payloads"
usb: early: xhci-dbc: Fix early_ioremap leak
ARM: dts: imx6ul-kontron-bl-common: Fix RTS polarity for RS485 interface
arm64: dts: imx8mm-beacon: Fix HS400 USDHC clock speed
cpufreq: Initialize cpufreq-based frequency-invariance later
cpufreq: Init policy->rwsem before it may be possibly used
samples: mei: Fix building on musl libc
staging: nvec: Fix incorrect null termination of battery manufacturer
selftests/tracing: Fix false failure of subsystem event test
drm/rockchip: cleanup fb when drm_gem_fb_afbc_init failed
bpf, ktls: Fix data corruption when using bpf_msg_pop_data() in ktls
bpftool: Fix memory leak in dump_xx_nlmsg on realloc failure
caif: reduce stack size, again
wifi: rtl818x: Kill URBs before clearing tx status queue
wifi: iwlwifi: Fix memory leak in iwl_mvm_init()
iwlwifi: Add missing check for alloc_ordered_workqueue
wifi: ath11k: clear initialized flag for deinit-ed srng lists
tcp: fix tcp_ofo_queue() to avoid including too much DUP SACK range
m68k: Don't unregister boot console needlessly
drm/amd/pm/powerplay/hwmgr/smu_helper: fix order of mask and value
netfilter: nf_tables: adjust lockdep assertions handling
arch: powerpc: defconfig: Drop obsolete CONFIG_NET_CLS_TCINDEX
net/sched: Restrict conditions for adding duplicating netems to qdisc tree
net_sched: act_ctinfo: use atomic64_t for three counters
xen/gntdev: remove struct gntdev_copy_batch from stack
wifi: rtl8xxxu: Fix RX skb size for aggregation disabled
mwl8k: Add missing check after DMA map
wifi: mac80211: Check 802.11 encaps offloading in ieee80211_tx_h_select_key()
Reapply "wifi: mac80211: Update skb's control block key in ieee80211_tx_dequeue()"
wifi: brcmfmac: fix P2P discovery failure in P2P peer due to missing P2P IE
can: kvaser_pciefd: Store device channel index
can: kvaser_usb: Assign netdev.dev_port based on device channel index
netfilter: xt_nfacct: don't assume acct name is null-terminated
selftests: rtnetlink.sh: remove esp4_offload after test
vrf: Drop existing dst reference in vrf_ip6_input_dst
PCI: rockchip-host: Fix "Unexpected Completion" log message
crypto: marvell/cesa - Fix engine load inaccuracy
mtd: fix possible integer overflow in erase_xfer()
clk: davinci: Add NULL check in davinci_lpsc_clk_register()
power: supply: max14577: Handle NULL pdata when CONFIG_OF is not set
pinctrl: sunxi: Fix memory leak on krealloc failure
crypto: inside-secure - Fix `dma_unmap_sg()` nents value
crypto: ccp - Fix crash when rebind ccp device for ccp.ko
perf tests bp_account: Fix leaked file descriptor
clk: sunxi-ng: v3s: Fix de clock definition
scsi: ibmvscsi_tgt: Fix dma_unmap_sg() nents value
scsi: mvsas: Fix dma_unmap_sg() nents value
scsi: isci: Fix dma_unmap_sg() nents value
watchdog: ziirave_wdt: check record length in ziirave_firm_verify()
hwrng: mtk - handle devm_pm_runtime_enable errors
crypto: img-hash - Fix dma_unmap_sg() nents value
soundwire: stream: restore params when prepare ports fail
fs/orangefs: Allow 2 more characters in do_c_string()
dmaengine: mv_xor: Fix missing check after DMA map and missing unmap
dmaengine: nbpfaxi: Add missing check after DMA map
sh: Do not use hyphen in exported variable name
crypto: qat - fix seq_file position update in adf_ring_next()
fbdev: imxfb: Check fb_add_videomode to prevent null-ptr-deref
jfs: fix metapage reference count leak in dbAllocCtl
mtd: rawnand: atmel: Fix dma_mapping_error() address
mtd: rawnand: atmel: set pmecc data setup time
vhost-scsi: Fix log flooding with target does not exist errors
bpf: Check flow_dissector ctx accesses are aligned
apparmor: ensure WB_HISTORY_SIZE value is a power of 2
module: Restore the moduleparam prefix length check
rtc: ds1307: fix incorrect maximum clock rate handling
rtc: hym8563: fix incorrect maximum clock rate handling
rtc: pcf85063: fix incorrect maximum clock rate handling
rtc: pcf8563: fix incorrect maximum clock rate handling
rtc: rv3028: fix incorrect maximum clock rate handling
f2fs: doc: fix wrong quota mount option description
f2fs: fix to avoid UAF in f2fs_sync_inode_meta()
f2fs: fix to avoid panic in f2fs_evict_inode
f2fs: fix to avoid out-of-boundary access in devs.path
scsi: ufs: core: Use link recovery when h8 exit fails during runtime resume
kconfig: qconf: fix ConfigList::updateListAllforAll()
PCI: pnv_php: Clean up allocated IRQs on unplug
PCI: pnv_php: Work around switches with broken presence detection
powerpc/eeh: Export eeh_unfreeze_pe()
powerpc/eeh: Rely on dev->link_active_reporting
powerpc/eeh: Make EEH driver device hotplug safe
PCI: pnv_php: Fix surprise plug detection and recovery
pNFS/flexfiles: Avoid spurious layout returns in ff_layout_choose_ds_for_read
pNFS/flexfiles: don't attempt pnfs on fatal DS errors
NFS: Fix filehandle bounds checking in nfs_fh_to_dentry()
NFSv4.2: another fix for listxattr
mm: extract might_alloc() debug check
XArray: Add calls to might_alloc()
NFS: Fixup allocation flags for nfsiod's __GFP_NORETRY
netpoll: prevent hanging NAPI when netcons gets enabled
phy: mscc: Fix parsing of unicast frames
pptp: ensure minimal skb length in pptp_xmit()
ipv6: reject malicious packets in ipv6_gso_segment()
net: drop UFO packets in udp_rcv_segment()
benet: fix BUG when creating VFs
ALSA: hda/ca0132: Fix missing error handling in ca0132_alt_select_out()
smb: client: let recv_done() cleanup before notifying the callers.
pptp: fix pptp_xmit() error path
perf/core: Don't leak AUX buffer refcount on allocation failure
perf/core: Exit early on perf_mmap() fail
perf/core: Prevent VMA split of buffer mappings
net/packet: fix a race in packet_set_ring() and packet_notifier()
vsock: Do not allow binding to VMADDR_PORT_ANY
USB: serial: option: add Foxconn T99W709
MIPS: mm: tlb-r4k: Uniquify TLB entries on init
mm/hmm: move pmd_to_hmm_pfn_flags() to the respective #ifdeffery
usb: gadget : fix use-after-free in composite_dev_cleanup()
io_uring: don't use int for ABI
ALSA: usb-audio: Validate UAC3 power domain descriptors, too
ALSA: usb-audio: Validate UAC3 cluster segment descriptors
netlink: avoid infinite retry looping in netlink_unicast()
net: gianfar: fix device leak when querying time stamp info
net: dpaa: fix device leak when querying time stamp info
nfsd: handle get_client_locked() failure in nfsd4_setclientid_confirm()
NFSD: detect mismatch of file handle and delegation stateid in OPEN op
sunvdc: Balance device refcount in vdc_port_mpgroup_check
fs: Prevent file descriptor table allocations exceeding INT_MAX
Documentation: ACPI: Fix parent device references
ACPI: processor: perflib: Fix initial _PPC limit application
ACPI: processor: perflib: Move problematic pr->performance check
udp: also consider secpath when evaluating ipsec use for checksumming
netfilter: ctnetlink: fix refcount leak on table dump
sctp: linearize cloned gso packets in sctp_rcv
intel_idle: Allow loading ACPI tables for any family
cpuidle: governors: menu: Avoid using invalid recent intervals data
hfs: fix slab-out-of-bounds in hfs_bnode_read()
hfsplus: fix slab-out-of-bounds in hfsplus_bnode_read()
hfsplus: fix slab-out-of-bounds read in hfsplus_uni2asc()
hfsplus: don't use BUG_ON() in hfsplus_create_attributes_file()
arm64: Handle KCOV __init vs inline mismatches
udf: Verify partition map count
drbd: add missing kref_get in handle_write_conflicts
hfs: fix not erasing deleted b-tree node issue
better lockdep annotations for simple_recursive_removal()
ata: libata-sata: Disallow changing LPM state if not supported
securityfs: don't pin dentries twice, once is enough...
usb: xhci: print xhci->xhc_state when queue_command failed
cpufreq: CPPC: Mark driver with NEED_UPDATE_LIMITS flag
selftests/futex: Define SYS_futex on 32-bit architectures with 64-bit time_t
usb: typec: ucsi: psy: Set current max to 100mA for BC 1.2 and Default
usb: xhci: Avoid showing warnings for dying controller
usb: xhci: Set avg_trb_len = 8 for EP0 during Address Device Command
usb: xhci: Avoid showing errors during surprise removal
gpio: wcd934x: check the return value of regmap_update_bits()
cpufreq: Exit governor when failed to start old governor
ARM: rockchip: fix kernel hang during smp initialization
PM / devfreq: governor: Replace sscanf() with kstrtoul() in set_freq_store()
ASoC: soc-dapm: set bias_level if snd_soc_dapm_set_bias_level() was successed
gpio: tps65912: check the return value of regmap_update_bits()
ARM: tegra: Use I/O memcpy to write to IRAM
selftests: tracing: Use mutex_unlock for testing glob filter
PM: runtime: Clear power.needs_force_resume in pm_runtime_reinit()
thermal: sysfs: Return ENODATA instead of EAGAIN for reads
PM: sleep: console: Fix the black screen issue
ACPI: processor: fix acpi_object initialization
mmc: sdhci-msm: Ensure SD card power isn't ON when card removed
ACPI: APEI: GHES: add TAINT_MACHINE_CHECK on GHES panic path
reset: brcmstb: Enable reset drivers for ARCH_BCM2835
mmc: rtsx_usb_sdmmc: Fix error-path in sd_set_power_mode()
x86/bugs: Avoid warning when overriding return thunk
ASoC: hdac_hdmi: Rate limit logging on connection and disconnection
ALSA: intel8x0: Fix incorrect codec index usage in mixer for ICH4
ASoC: core: Check for rtd == NULL in snd_soc_remove_pcm_runtime()
usb: typec: intel_pmc_mux: Defer probe if SCU IPC isn't present
usb: core: usb_submit_urb: downgrade type check
pm: cpupower: Fix the snapshot-order of tsc,mperf, clock in mperf_stop()
platform/x86: thinkpad_acpi: Handle KCOV __init vs inline mismatches
platform/chrome: cros_ec_typec: Defer probe on missing EC parent
ALSA: hda/ca0132: Fix buffer overflow in add_tuning_control
ALSA: pcm: Rewrite recalculate_boundary() to avoid costly loop
ALSA: usb-audio: Avoid precedence issues in mixer_quirks macros
iio: adc: ad7768-1: Ensure SYNC_IN pulse minimum timing requirement
ASoC: codecs: rt5640: Retry DEVICE_ID verification
xen/netfront: Fix TX response spurious interrupts
ktest.pl: Prevent recursion of default variable options
wifi: cfg80211: reject HTC bit for management frames
s390/time: Use monotonic clock in get_cycles()
be2net: Use correct byte order and format string for TCP seq and ack_seq
et131x: Add missing check after DMA map
net: ag71xx: Add missing check after DMA map
rcu: Protect ->defer_qs_iw_pending from data race
wifi: cfg80211: Fix interface type validation
net: ipv4: fix incorrect MTU in broadcast routes
net: thunderx: Fix format-truncation warning in bgx_acpi_match_id()
wifi: iwlwifi: mvm: fix scan request validation
s390/stp: Remove udelay from stp_sync_clock()
(powerpc/512) Fix possible `dma_unmap_single()` on uninitialized pointer
net: fec: allow disable coalescing
drm/amd/display: Separate set_gsl from set_gsl_source_select
wifi: iwlwifi: dvm: fix potential overflow in rs_fill_link_cmd()
wifi: iwlwifi: fw: Fix possible memory leak in iwl_fw_dbg_collect
drm/amd/display: Fix 'failed to blank crtc!'
wifi: rtlwifi: fix possible skb memory leak in `_rtl_pci_rx_interrupt()`.
netmem: fix skb_frag_address_safe with unreadable skbs
wifi: iwlegacy: Check rate_idx range after addition
net: vlan: Replace BUG() with WARN_ON_ONCE() in vlan_dev_* stubs
gve: Return error for unknown admin queue command
net: dsa: b53: fix b53_imp_vlan_setup for BCM5325
net: dsa: b53: prevent GMII_PORT_OVERRIDE_CTRL access on BCM5325
net: dsa: b53: prevent SWITCH_CTRL access on BCM5325
wifi: rtlwifi: fix possible skb memory leak in _rtl_pci_init_one_rxdesc()
net: ncsi: Fix buffer overflow in fetching version id
drm/ttm: Should to return the evict error
uapi: in6: restore visibility of most IPv6 socket options
net: dsa: b53: fix IP_MULTICAST_CTRL on BCM5325
vhost: fail early when __vhost_add_used() fails
cifs: Fix calling CIFSFindFirst() for root path without msearch
ext4: do not BUG when INLINE_DATA_FL lacks system.data xattr
scsi: libiscsi: Initialize iscsi_conn->dd_data only if memory is allocated
fs/orangefs: use snprintf() instead of sprintf()
watchdog: dw_wdt: Fix default timeout
MIPS: vpe-mt: add missing prototypes for vpe_{alloc,start,stop,free}
scsi: bfa: Double-free fix
jfs: truncate good inode pages when hard link is 0
jfs: Regular file corruption check
jfs: upper bound check of tree index in dbAllocAG
MIPS: Don't crash in stack_top() for tasks without ABI or vDSO
leds: leds-lp50xx: Handle reg to get correct multi_index
RDMA: hfi1: fix possible divide-by-zero in find_hw_thread_mask()
RDMA/core: reduce stack using in nldev_stat_get_doit()
scsi: lpfc: Check for hdwq null ptr when cleaning up lpfc_vport structure
scsi: mpt3sas: Correctly handle ATA device errors
pinctrl: stm32: Manage irq affinity settings
media: tc358743: Check I2C succeeded during probe
media: tc358743: Return an appropriate colorspace from tc358743_set_fmt
media: tc358743: Increase FIFO trigger level to 374
media: usb: hdpvr: disable zero-length read messages
media: dvb-frontends: dib7090p: fix null-ptr-deref in dib7090p_rw_on_apb()
media: dvb-frontends: w7090p: fix null-ptr-deref in w7090p_tuner_write_serpar and w7090p_tuner_read_serpar
media: uvcvideo: Fix bandwidth issue for Alcor camera
md: dm-zoned-target: Initialize return variable r to avoid uninitialized use
i3c: add missing include to internal header
rtc: ds1307: handle oscillator stop flag (OSF) for ds1341
i3c: don't fail if GETHDRCAP is unsupported
dm-mpath: don't print the "loaded" message if registering fails
i2c: Force DLL0945 touchpad i2c freq to 100khz
kconfig: lxdialog: replace strcpy() with strncpy() in inputbox.c
kconfig: nconf: Ensure null termination where strncpy is used
scsi: Fix sas_user_scan() to handle wildcard and multi-channel scans
scsi: aacraid: Stop using PCI_IRQ_AFFINITY
ipmi: Use dev_warn_ratelimited() for incorrect message warnings
kconfig: gconf: avoid hardcoding model2 in on_treeview2_cursor_changed()
kconfig: gconf: fix potential memory leak in renderer_edited()
kconfig: lxdialog: fix 'space' to (de)select options
ipmi: Fix strcpy source and destination the same
net: phy: smsc: add proper reset flags for LAN8710A
block: avoid possible overflow for chunk_sectors check in blk_stack_limits()
pNFS: Fix stripe mapping in block/scsi layout
pNFS: Fix disk addr range check in block/scsi layout
pNFS: Handle RPC size limit for layoutcommits
pNFS: Fix uninited ptr deref in block/scsi layout
rtc: ds1307: remove clear of oscillator stop flag (OSF) in probe
scsi: lpfc: Remove redundant assignment to avoid memory leak
ASoC: soc-dai.c: add missing flag check at snd_soc_pcm_dai_probe()
ASoC: fsl_sai: replace regmap_write with regmap_update_bits
drm/amdgpu: fix incorrect vm flags to map bo
usb: core: config: Prevent OOB read in SS endpoint companion parsing
misc: rtsx: usb: Ensure mmc child device is active when card is present
usb: typec: ucsi: Update power_supply on power role change
comedi: fix race between polling and detaching
thunderbolt: Fix copy+paste error in match_service_id()
btrfs: fix log tree replay failure due to file with 0 links and extents
parisc: Makefile: fix a typo in palo.conf
mm/kmemleak: avoid soft lockup in __kmemleak_do_cleanup()
mm/kmemleak: avoid deadlock by moving pr_warn() outside kmemleak_lock
media: uvcvideo: Fix 1-byte out-of-bounds read in uvc_parse_format()
media: uvcvideo: Do not mark valid metadata as invalid
serial: 8250: fix panic due to PSLVERR
cpufreq: armada-8k: Fix off by one in armada_8k_cpufreq_free_table()
m68k: Fix lost column on framebuffer debug console
usb: atm: cxacru: Merge cxacru_upload_firmware() into cxacru_heavy_init()
usb: gadget: udc: renesas_usb3: fix device leak at unbind
usb: dwc3: meson-g12a: fix device leaks at unbind
bus: mhi: host: Fix endianness of BHI vector table
vt: keyboard: Don't process Unicode characters in K_OFF mode
vt: defkeymap: Map keycodes above 127 to K_HOLE
lib/crypto: mips/chacha: Fix clang build and remove unneeded byteswap
Revert "vgacon: Add check for vc_origin address range in vgacon_scroll()"
ext4: check fast symlink for ea_inode correctly
ext4: fix fsmap end of range reporting with bigalloc
ext4: fix reserved gdt blocks handling in fsmap
ata: libata-scsi: Fix ata_to_sense_error() status handling
zynq_fpga: use sgtable-based scatterlist wrappers
wifi: brcmsmac: Remove const from tbl_ptr parameter in wlc_lcnphy_common_read_table()
wifi: ath11k: fix source ring-buffer corruption
pwm: imx-tpm: Reset counter if CMOD is 0
hwmon: (gsc-hwmon) fix fan pwm setpoint show functions
mtd: rawnand: fsmc: Add missing check after DMA map
PCI: endpoint: Fix configfs group list head handling
PCI: endpoint: Fix configfs group removal on driver teardown
jbd2: prevent softlockup in jbd2_log_do_checkpoint()
soc/tegra: pmc: Ensure power-domains are in a known state
media: gspca: Add bounds checking to firmware parser
media: hi556: correct the test pattern configuration
media: imx: fix a potential memory leak in imx_media_csc_scaler_device_init()
media: usbtv: Lock resolution while streaming
media: rainshadow-cec: fix TOCTOU race condition in rain_interrupt()
media: ov2659: Fix memory leaks in ov2659_probe()
media: venus: Add a check for packet size after reading from shared memory
drm/amd: Restore cached power limit during resume
net, hsr: reject HSR frame if skb can't hold tag
sch_htb: make htb_qlen_notify() idempotent
sch_drr: make drr_qlen_notify() idempotent
sch_hfsc: make hfsc_qlen_notify() idempotent
sch_qfq: make qfq_qlen_notify() idempotent
codel: remove sch->q.qlen check before qdisc_tree_reduce_backlog()
sch_htb: make htb_deactivate() idempotent
memstick: Fix deadlock by moving removing flag earlier
mmc: sdhci-pci-gli: GL9763e: Rename the gli_set_gl9763e() for consistency
squashfs: fix memory leak in squashfs_fill_super
ALSA: hda/realtek: Add support for HP EliteBook x360 830 G6 and EliteBook 830 G6
drm/amd/display: Fix fractional fb divider in set_pixel_clock_v3
drm/amd/display: Fix DP audio DTO1 clock source on DCE 6.
drm/amd/display: Find first CRTC and its line time in dce110_fill_display_configs
drm/amd/display: Fill display clock and vblank time in dce110_fill_display_configs
selftests: mptcp: connect: also cover alt modes
fs/buffer: fix use-after-free when call bh_read() helper
move_mount: allow to add a mount into an existing group
use uniform permission checks for all mount propagation changes
fpga: zynq_fpga: Fix the wrong usage of dma_map_sgtable()
ftrace: Also allocate and copy hash for reading of filter files
iio: pressure: bmp280: Use IS_ERR() in bmp280_common_probe()
iio: proximity: isl29501: fix buffered read on big-endian systems
most: core: Drop device reference after usage in get_channel()
usb: quirks: Add DELAY_INIT quick for another SanDisk 3.2Gen1 Flash Drive
usb: renesas-xhci: Fix External ROM access timeouts
USB: storage: Add unusual-devs entry for Novatek NTK96550-based camera
usb: storage: realtek_cr: Use correct byte order for bcs->Residue
USB: storage: Ignore driver CD mode for Realtek multi-mode Wi-Fi dongles
usb: dwc3: Ignore late xferNotReady event to prevent halt timeout
kbuild: userprogs: use correct linker when mixing clang and GNU ld
f2fs: fix to do sanity check on ino and xnid
iio: hid-sensor-prox: Fix incorrect OFFSET calculation
x86/mce/amd: Add default names for MCA banks and blocks
usb: hub: avoid warm port reset during USB3 disconnect
usb: hub: Don't try to recover devices lost during warm reset.
smb: client: fix use-after-free in crypt_message when using async crypto
tracing: Add down_write(trace_event_sem) when adding trace event
pmdomain: governor: Consider CPU latency tolerance from pm_domain_cpu_gov
ice: Fix a null pointer dereference in ice_copy_and_init_pkg()
drm/sched: Remove optimization that causes hang when killing dependent jobs
mm/zsmalloc.c: convert to use kmem_cache_zalloc in cache_alloc_zspage()
mm/zsmalloc: do not pass __GFP_MOVABLE if CONFIG_COMPACTION=n
x86/fpu: Delay instruction pointer fixup until after warning
ALSA: scarlett2: Add retry on -EPROTO from scarlett2_usb_tx()
net: usbnet: Avoid potential RCU stall on LINK_CHANGE event
usb: typec: fusb302: cache PD RX state
PCI/ACPI: Fix runtime PM ref imbalance on Hot-Plug Capable ports
block: Make REQ_OP_ZONE_FINISH a write operation
hv_netvsc: Fix panic during namespace deletion with VF
USB: cdc-acm: do not log successful probe on later errors
cdc-acm: fix race between initial clearing halt and open
comedi: Fail COMEDI_INSNLIST ioctl if n_insns is too large
ptp: Fix possible memory leak in ptp_clock_register()
block: don't call rq_qos_ops->done_bio if the bio isn't tracked
btrfs: fix deadlock when cloning inline extents and using qgroups
ARM: 9448/1: Use an absolute path to unified.h in KBUILD_AFLAGS
dpaa2-mac: split up initializing the MAC object from connecting to it
dpaa2-mac: export MAC counters even when in TYPE_FIXED
dpaa2-eth: retry the probe when the MAC is not yet discovered on the bus
dpaa2-eth: Fix device reference count leak in MAC endpoint handling
mm: drop the assumption that VM_SHARED always implies writable
mm: update memfd seal write check to include F_SEAL_WRITE
mm: reinstate ability to map write-sealed memfd mappings read-only
selftests/memfd: add test for mapping write-sealed memfd read-only
dma-buf: insert memory barrier before updating num_fences
drm/amdgpu: handle the case of pci_channel_io_frozen only in amdgpu_pci_resume
RDMA/rxe: Return CQE error if invalid lkey was supplied
scsi: lpfc: Fix link down processing to address NULL pointer dereference
scsi: pm80xx: Fix memory leak during rmmod
NFS: Don't set NFS_INO_REVAL_PAGECACHE in the inode cache validity
NFSv4: Fix nfs4_bitmap_copy_adjust()
NFS: Create an nfs4_server_set_init_caps() function
NFS: Fix the setting of capabilities when automounting a new filesystem
net/sched: sch_ets: properly init all active DRR list handles
net_sched: sch_ets: implement lockless ets_dump()
net/sched: ets: use old 'nbands' while purging unused classes
mm/ptdump: take the memory hotplug lock inside ptdump_walk_pgd()
ata: Fix SATA_MOBILE_LPM_POLICY description in Kconfig
scsi: ufs: exynos: Fix programming of HCI_UTRL_NEXUS_TYPE
iio: adc: ad_sigma_delta: change to buffer predisable
soc: qcom: mdt_loader: Ensure we don't read past the ELF header
usb: musb: omap2430: fix device leak at unbind
btrfs: populate otime when logging an inode item
ACPI: processor: idle: Check acpi_fetch_acpi_dev() return value
minmax: add umin(a, b) and umax(a, b)
ext4: fix hole length calculation overflow in non-extent inodes
platform/chrome: cros_ec: Make cros_ec_unregister() return void
platform/chrome: cros_ec: Use per-device lockdep key
platform/chrome: cros_ec: remove unneeded label and if-condition
platform/chrome: cros_ec: Unregister notifier in cros_ec_unregister()
pwm: mediatek: Implement .apply() callback
pwm: mediatek: Handle hardware enable and clock enable separately
pwm: mediatek: Fix duty and period setting
locking/barriers, kcsan: Support generic instrumentation
asm-generic: Add memory barrier dma_mb()
wifi: ath11k: fix dest ring-buffer corruption when ring is full
media: v4l2-ctrls: always copy the controls on completion
media: v4l2-ctrls: Don't reset handler's error in v4l2_ctrl_handler_free()
media: venus: don't de-reference NULL pointers at IRQ time
media: venus: hfi: explicitly release IRQ during teardown
media: venus: Add support for SSR trigger using fault injection
media: venus: protect against spurious interrupts during probe
drm/amd/display: Don't overclock DCE 6 by 15%
drm/dp: Change AUX DPCD probe address from DPCD_REV to LANE0_1_STATUS
media: qcom: camss: cleanup media device allocated resource on error path
f2fs: fix to avoid out-of-boundary access in dnode page
media: venus: vdec: Clamp param smaller than 1fps and bigger than 240.
uio_hv_generic: Fix another memory leak in error handling paths
dm: rearrange core declarations for extended use from dm-zone.c
dm rq: don't queue request to blk-mq during DM suspend
usb: dwc3: Remove DWC3 locking during gadget suspend/resume
usb: dwc3: core: remove lock of otg mode during gadget suspend/resume to avoid deadlock
gpio: rcar: Use raw_spinlock to protect register access
selftests: mptcp: pm: check flush doesn't reset limits
net: usbnet: Fix the wrong netif_carrier_on() call
compiler: remove __ADDRESSABLE_ASM{_STR,}() again
usb: xhci: Fix slot_id resource race conflict
iio: imu: inv_icm42600: change invalid data error to -EBUSY
tracing: Remove unneeded goto out logic
tracing: Limit access to parser->buffer when trace_get_user failed
iio: light: as73211: Ensure buffer holes are zeroed
mm/page_alloc: detect allocation forbidden by cpuset and bail out early
cgroup/cpuset: Use static_branch_enable_cpuslocked() on cpusets_insane_config_key
RDMA/bnxt_re: Fix to initialize the PBL array
scsi: qla4xxx: Prevent a potential error pointer dereference
iommu/amd: Avoid stack buffer overflow from kernel cmdline
mlxsw: spectrum: Forward packets with an IPv4 link-local source IP
ALSA: usb-audio: Fix size validation in convert_chmap_v3()
ipv6: sr: validate HMAC algorithm ID in seg6_hmac_info_add
ixgbe: xsk: resolve the negative overflow of budget in ixgbe_xmit_zc
net/sched: Make cake_enqueue return NET_XMIT_CN when past buffer_limit
net/sched: Remove unnecessary WARNING condition for empty child qdisc in htb_activate
ALSA: usb-audio: Use correct sub-type for UAC3 feature unit validation
s390/hypfs: Avoid unnecessary ioctl registration in debugfs
s390/hypfs: Enable limited access during lockdown
netfilter: nft_reject: unify reject init and dump into nft_reject
netfilter: nft_reject_inet: allow to use reject from inet ingress
netfilter: nf_reject: don't leak dst refcount for loopback packets
alloc_fdtable(): change calling conventions.
Linux 5.10.241
Change-Id: Idccdcccd9b3f5b96e3ea9e5a692fb719ba0658ed
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -208,9 +208,9 @@ usrjquota=<file> Appoint specified file and type during mount, so that quota
|
||||
grpjquota=<file> information can be properly updated during recovery flow,
|
||||
prjjquota=<file> <quota file>: must be in root directory;
|
||||
jqfmt=<quota type> <quota type>: [vfsold,vfsv0,vfsv1].
|
||||
offusrjquota Turn off user journalled quota.
|
||||
offgrpjquota Turn off group journalled quota.
|
||||
offprjjquota Turn off project journalled quota.
|
||||
usrjquota= Turn off user journalled quota.
|
||||
grpjquota= Turn off group journalled quota.
|
||||
prjjquota= Turn off project journalled quota.
|
||||
quota Enable plain user disk quota accounting.
|
||||
noquota Disable all plain disk quota option.
|
||||
whint_mode=%s Control which write hints are passed down to block
|
||||
|
||||
@@ -14,7 +14,7 @@ Consider this topology::
|
||||
| | | 0x70 |--CH01--> i2c client B (0x50)
|
||||
+------+ +------+
|
||||
|
||||
which corresponds to the following ASL::
|
||||
which corresponds to the following ASL (in the scope of \_SB)::
|
||||
|
||||
Device (SMB1)
|
||||
{
|
||||
@@ -24,7 +24,7 @@ which corresponds to the following ASL::
|
||||
Name (_HID, ...)
|
||||
Name (_CRS, ResourceTemplate () {
|
||||
I2cSerialBus (0x70, ControllerInitiated, I2C_SPEED,
|
||||
AddressingMode7Bit, "^SMB1", 0x00,
|
||||
AddressingMode7Bit, "\\_SB.SMB1", 0x00,
|
||||
ResourceConsumer,,)
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ which corresponds to the following ASL::
|
||||
Name (_HID, ...)
|
||||
Name (_CRS, ResourceTemplate () {
|
||||
I2cSerialBus (0x50, ControllerInitiated, I2C_SPEED,
|
||||
AddressingMode7Bit, "^CH00", 0x00,
|
||||
AddressingMode7Bit, "\\_SB.SMB1.CH00", 0x00,
|
||||
ResourceConsumer,,)
|
||||
}
|
||||
}
|
||||
@@ -52,7 +52,7 @@ which corresponds to the following ASL::
|
||||
Name (_HID, ...)
|
||||
Name (_CRS, ResourceTemplate () {
|
||||
I2cSerialBus (0x50, ControllerInitiated, I2C_SPEED,
|
||||
AddressingMode7Bit, "^CH01", 0x00,
|
||||
AddressingMode7Bit, "\\_SB.SMB1.CH01", 0x00,
|
||||
ResourceConsumer,,)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1894,6 +1894,7 @@ There are some more advanced barrier functions:
|
||||
|
||||
(*) dma_wmb();
|
||||
(*) dma_rmb();
|
||||
(*) dma_mb();
|
||||
|
||||
These are for use with consistent memory to guarantee the ordering
|
||||
of writes or reads of shared memory accessible to both the CPU and a
|
||||
@@ -1925,11 +1926,11 @@ There are some more advanced barrier functions:
|
||||
The dma_rmb() allows us guarantee the device has released ownership
|
||||
before we read the data from the descriptor, and the dma_wmb() allows
|
||||
us to guarantee the data is written to the descriptor before the device
|
||||
can see it now has ownership. Note that, when using writel(), a prior
|
||||
wmb() is not needed to guarantee that the cache coherent memory writes
|
||||
have completed before writing to the MMIO region. The cheaper
|
||||
writel_relaxed() does not provide this guarantee and must not be used
|
||||
here.
|
||||
can see it now has ownership. The dma_mb() implies both a dma_rmb() and
|
||||
a dma_wmb(). Note that, when using writel(), a prior wmb() is not needed
|
||||
to guarantee that the cache coherent memory writes have completed before
|
||||
writing to the MMIO region. The cheaper writel_relaxed() does not provide
|
||||
this guarantee and must not be used here.
|
||||
|
||||
See the subsection "Kernel I/O barrier effects" for more information on
|
||||
relaxed I/O accessors and the Documentation/core-api/dma-api.rst file for
|
||||
|
||||
4
Makefile
4
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 10
|
||||
SUBLEVEL = 240
|
||||
SUBLEVEL = 241
|
||||
EXTRAVERSION =
|
||||
NAME = Dare mighty things
|
||||
|
||||
@@ -1102,7 +1102,7 @@ KBUILD_USERCFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CPPFLAGS) $(KBUILD
|
||||
KBUILD_USERLDFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS))
|
||||
|
||||
# userspace programs are linked via the compiler, use the correct linker
|
||||
ifeq ($(CONFIG_CC_IS_CLANG)$(CONFIG_LD_IS_LLD),yy)
|
||||
ifdef CONFIG_CC_IS_CLANG
|
||||
KBUILD_USERLDFLAGS += $(call cc-option, --ld-path=$(LD))
|
||||
endif
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ endif
|
||||
|
||||
# Need -Uarm for gcc < 3.x
|
||||
KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm
|
||||
KBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_ISA) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float
|
||||
KBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_ISA) $(arch-y) $(tune-y) -include $(srctree)/arch/arm/include/asm/unified.h -msoft-float
|
||||
|
||||
CHECKFLAGS += -D__arm__
|
||||
|
||||
|
||||
@@ -170,7 +170,6 @@
|
||||
pinctrl-0 = <&pinctrl_uart2>;
|
||||
linux,rs485-enabled-at-boot-time;
|
||||
rs485-rx-during-tx;
|
||||
rs485-rts-active-low;
|
||||
uart-has-rtscts;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -617,7 +617,7 @@
|
||||
|
||||
ftm: ftm@400b8000 {
|
||||
compatible = "fsl,ftm-timer";
|
||||
reg = <0x400b8000 0x1000 0x400b9000 0x1000>;
|
||||
reg = <0x400b8000 0x1000>, <0x400b9000 0x1000>;
|
||||
interrupts = <44 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clock-names = "ftm-evt", "ftm-src",
|
||||
"ftm-evt-counter-en", "ftm-src-counter-en";
|
||||
|
||||
@@ -279,11 +279,6 @@ static void __init rockchip_smp_prepare_cpus(unsigned int max_cpus)
|
||||
}
|
||||
|
||||
if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9) {
|
||||
if (rockchip_smp_prepare_sram(node)) {
|
||||
of_node_put(node);
|
||||
return;
|
||||
}
|
||||
|
||||
/* enable the SCU power domain */
|
||||
pmu_set_power_domain(PMU_PWRDN_SCU, true);
|
||||
|
||||
@@ -316,11 +311,19 @@ static void __init rockchip_smp_prepare_cpus(unsigned int max_cpus)
|
||||
asm ("mrc p15, 1, %0, c9, c0, 2\n" : "=r" (l2ctlr));
|
||||
ncores = ((l2ctlr >> 24) & 0x3) + 1;
|
||||
}
|
||||
of_node_put(node);
|
||||
|
||||
/* Make sure that all cores except the first are really off */
|
||||
for (i = 1; i < ncores; i++)
|
||||
pmu_set_power_domain(0 + i, false);
|
||||
|
||||
if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9) {
|
||||
if (rockchip_smp_prepare_sram(node)) {
|
||||
of_node_put(node);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
of_node_put(node);
|
||||
}
|
||||
|
||||
static void __init rk3036_smp_prepare_cpus(unsigned int max_cpus)
|
||||
|
||||
@@ -63,7 +63,7 @@ static void __init tegra_cpu_reset_handler_enable(void)
|
||||
BUG_ON(is_enabled);
|
||||
BUG_ON(tegra_cpu_reset_handler_size > TEGRA_IRAM_RESET_HANDLER_SIZE);
|
||||
|
||||
memcpy(iram_base, (void *)__tegra_cpu_reset_handler_start,
|
||||
memcpy_toio(iram_base, (void *)__tegra_cpu_reset_handler_start,
|
||||
tegra_cpu_reset_handler_size);
|
||||
|
||||
err = call_firmware_op(set_cpu_boot_addr, 0, reset_address);
|
||||
|
||||
@@ -246,6 +246,8 @@
|
||||
pinctrl-0 = <&pinctrl_usdhc3>;
|
||||
pinctrl-1 = <&pinctrl_usdhc3_100mhz>;
|
||||
pinctrl-2 = <&pinctrl_usdhc3_200mhz>;
|
||||
assigned-clocks = <&clk IMX8MM_CLK_USDHC3>;
|
||||
assigned-clock-rates = <400000000>;
|
||||
bus-width = <8>;
|
||||
non-removable;
|
||||
status = "okay";
|
||||
|
||||
@@ -128,7 +128,7 @@ acpi_set_mailbox_entry(int cpu, struct acpi_madt_generic_interrupt *processor)
|
||||
{}
|
||||
#endif
|
||||
|
||||
static inline const char *acpi_get_enable_method(int cpu)
|
||||
static __always_inline const char *acpi_get_enable_method(int cpu)
|
||||
{
|
||||
if (acpi_psci_present())
|
||||
return "psci";
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include <linux/debugfs.h>
|
||||
#include <linux/memory_hotplug.h>
|
||||
#include <linux/seq_file.h>
|
||||
|
||||
#include <asm/ptdump.h>
|
||||
@@ -9,9 +8,7 @@ static int ptdump_show(struct seq_file *m, void *v)
|
||||
{
|
||||
struct ptdump_info *info = m->private;
|
||||
|
||||
get_online_mems();
|
||||
ptdump_walk(m, info);
|
||||
put_online_mems();
|
||||
return 0;
|
||||
}
|
||||
DEFINE_SHOW_ATTRIBUTE(ptdump);
|
||||
|
||||
@@ -10,7 +10,7 @@ config BOOTPARAM_STRING
|
||||
|
||||
config EARLY_PRINTK
|
||||
bool "Early printk"
|
||||
depends on !(SUN3 || M68000 || COLDFIRE)
|
||||
depends on MMU_MOTOROLA
|
||||
help
|
||||
Write kernel log output directly to a serial port.
|
||||
Where implemented, output goes to the framebuffer as well.
|
||||
|
||||
@@ -16,25 +16,10 @@
|
||||
#include "../mvme147/mvme147.h"
|
||||
#include "../mvme16x/mvme16x.h"
|
||||
|
||||
asmlinkage void __init debug_cons_nputs(const char *s, unsigned n);
|
||||
|
||||
static void __ref debug_cons_write(struct console *c,
|
||||
const char *s, unsigned n)
|
||||
{
|
||||
#if !(defined(CONFIG_SUN3) || defined(CONFIG_M68000) || \
|
||||
defined(CONFIG_COLDFIRE))
|
||||
if (MACH_IS_MVME147)
|
||||
mvme147_scc_write(c, s, n);
|
||||
else if (MACH_IS_MVME16x)
|
||||
mvme16x_cons_write(c, s, n);
|
||||
else
|
||||
debug_cons_nputs(s, n);
|
||||
#endif
|
||||
}
|
||||
asmlinkage void __init debug_cons_nputs(struct console *c, const char *s, unsigned int n);
|
||||
|
||||
static struct console early_console_instance = {
|
||||
.name = "debug",
|
||||
.write = debug_cons_write,
|
||||
.flags = CON_PRINTBUFFER | CON_BOOT,
|
||||
.index = -1
|
||||
};
|
||||
@@ -44,6 +29,12 @@ static int __init setup_early_printk(char *buf)
|
||||
if (early_console || buf)
|
||||
return 0;
|
||||
|
||||
if (MACH_IS_MVME147)
|
||||
early_console_instance.write = mvme147_scc_write;
|
||||
else if (MACH_IS_MVME16x)
|
||||
early_console_instance.write = mvme16x_cons_write;
|
||||
else
|
||||
early_console_instance.write = debug_cons_nputs;
|
||||
early_console = &early_console_instance;
|
||||
register_console(early_console);
|
||||
|
||||
@@ -51,20 +42,15 @@ static int __init setup_early_printk(char *buf)
|
||||
}
|
||||
early_param("earlyprintk", setup_early_printk);
|
||||
|
||||
/*
|
||||
* debug_cons_nputs() defined in arch/m68k/kernel/head.S cannot be called
|
||||
* after init sections are discarded (for platforms that use it).
|
||||
*/
|
||||
#if !(defined(CONFIG_SUN3) || defined(CONFIG_M68000) || \
|
||||
defined(CONFIG_COLDFIRE))
|
||||
|
||||
static int __init unregister_early_console(void)
|
||||
{
|
||||
if (!early_console || MACH_IS_MVME16x)
|
||||
return 0;
|
||||
/*
|
||||
* debug_cons_nputs() defined in arch/m68k/kernel/head.S cannot be
|
||||
* called after init sections are discarded (for platforms that use it).
|
||||
*/
|
||||
if (early_console && early_console->write == debug_cons_nputs)
|
||||
return unregister_console(early_console);
|
||||
|
||||
return unregister_console(early_console);
|
||||
return 0;
|
||||
}
|
||||
late_initcall(unregister_early_console);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3242,8 +3242,8 @@ func_return putn
|
||||
* turns around and calls the internal routines. This routine
|
||||
* is used by the boot console.
|
||||
*
|
||||
* The calling parameters are:
|
||||
* void debug_cons_nputs(const char *str, unsigned length)
|
||||
* The function signature is -
|
||||
* void debug_cons_nputs(struct console *c, const char *s, unsigned int n)
|
||||
*
|
||||
* This routine does NOT understand variable arguments only
|
||||
* simple strings!
|
||||
@@ -3252,8 +3252,8 @@ ENTRY(debug_cons_nputs)
|
||||
moveml %d0/%d1/%a0,%sp@-
|
||||
movew %sr,%sp@-
|
||||
ori #0x0700,%sr
|
||||
movel %sp@(18),%a0 /* fetch parameter */
|
||||
movel %sp@(22),%d1 /* fetch parameter */
|
||||
movel %sp@(22),%a0 /* char *s */
|
||||
movel %sp@(26),%d1 /* unsigned int n */
|
||||
jra 2f
|
||||
1:
|
||||
#ifdef CONSOLE_DEBUG
|
||||
@@ -3379,6 +3379,7 @@ L(console_clear_loop):
|
||||
|
||||
movel %d4,%d1 /* screen height in pixels */
|
||||
divul %a0@(FONT_DESC_HEIGHT),%d1 /* d1 = max num rows */
|
||||
subql #1,%d1 /* row range is 0 to num - 1 */
|
||||
|
||||
movel %d0,%a2@(Lconsole_struct_num_columns)
|
||||
movel %d1,%a2@(Lconsole_struct_num_rows)
|
||||
@@ -3525,15 +3526,14 @@ func_start console_putc,%a0/%a1/%d0-%d7
|
||||
cmpib #10,%d7
|
||||
jne L(console_not_lf)
|
||||
movel %a0@(Lconsole_struct_cur_row),%d0
|
||||
addil #1,%d0
|
||||
movel %d0,%a0@(Lconsole_struct_cur_row)
|
||||
movel %a0@(Lconsole_struct_num_rows),%d1
|
||||
cmpl %d1,%d0
|
||||
jcs 1f
|
||||
subil #1,%d0
|
||||
movel %d0,%a0@(Lconsole_struct_cur_row)
|
||||
console_scroll
|
||||
jra L(console_exit)
|
||||
1:
|
||||
addql #1,%d0
|
||||
movel %d0,%a0@(Lconsole_struct_cur_row)
|
||||
jra L(console_exit)
|
||||
|
||||
L(console_not_lf):
|
||||
@@ -3560,12 +3560,6 @@ L(console_not_cr):
|
||||
*/
|
||||
L(console_not_home):
|
||||
movel %a0@(Lconsole_struct_cur_column),%d0
|
||||
addql #1,%a0@(Lconsole_struct_cur_column)
|
||||
movel %a0@(Lconsole_struct_num_columns),%d1
|
||||
cmpl %d1,%d0
|
||||
jcs 1f
|
||||
console_putc #'\n' /* recursion is OK! */
|
||||
1:
|
||||
movel %a0@(Lconsole_struct_cur_row),%d1
|
||||
|
||||
/*
|
||||
@@ -3612,6 +3606,23 @@ L(console_do_font_scanline):
|
||||
addq #1,%d1
|
||||
dbra %d7,L(console_read_char_scanline)
|
||||
|
||||
/*
|
||||
* Register usage in the code below:
|
||||
* a0 = pointer to console globals
|
||||
* d0 = cursor column
|
||||
* d1 = cursor column limit
|
||||
*/
|
||||
|
||||
lea %pc@(L(console_globals)),%a0
|
||||
|
||||
movel %a0@(Lconsole_struct_cur_column),%d0
|
||||
addql #1,%d0
|
||||
movel %d0,%a0@(Lconsole_struct_cur_column) /* Update cursor pos */
|
||||
movel %a0@(Lconsole_struct_num_columns),%d1
|
||||
cmpl %d1,%d0
|
||||
jcs L(console_exit)
|
||||
console_putc #'\n' /* Line wrap using tail recursion */
|
||||
|
||||
L(console_exit):
|
||||
func_return console_putc
|
||||
|
||||
|
||||
@@ -55,17 +55,13 @@
|
||||
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
#define MSB 0
|
||||
#define LSB 3
|
||||
#define ROTx rotl
|
||||
#define ROTR(n) rotr n, 24
|
||||
#define CPU_TO_LE32(n) \
|
||||
wsbh n; \
|
||||
wsbh n, n; \
|
||||
rotr n, 16;
|
||||
#else
|
||||
#define MSB 3
|
||||
#define LSB 0
|
||||
#define ROTx rotr
|
||||
#define CPU_TO_LE32(n)
|
||||
#define ROTR(n)
|
||||
#endif
|
||||
|
||||
#define FOR_EACH_WORD(x) \
|
||||
@@ -192,10 +188,10 @@ CONCAT3(.Lchacha_mips_xor_aligned_, PLUS_ONE(x), _b: ;) \
|
||||
xor X(W), X(B); \
|
||||
xor X(Y), X(C); \
|
||||
xor X(Z), X(D); \
|
||||
rotl X(V), S; \
|
||||
rotl X(W), S; \
|
||||
rotl X(Y), S; \
|
||||
rotl X(Z), S;
|
||||
rotr X(V), 32 - S; \
|
||||
rotr X(W), 32 - S; \
|
||||
rotr X(Y), 32 - S; \
|
||||
rotr X(Z), 32 - S;
|
||||
|
||||
.text
|
||||
.set reorder
|
||||
@@ -372,21 +368,19 @@ chacha_crypt_arch:
|
||||
/* First byte */
|
||||
lbu T1, 0(IN)
|
||||
addiu $at, BYTES, 1
|
||||
CPU_TO_LE32(SAVED_X)
|
||||
ROTR(SAVED_X)
|
||||
xor T1, SAVED_X
|
||||
sb T1, 0(OUT)
|
||||
beqz $at, .Lchacha_mips_xor_done
|
||||
/* Second byte */
|
||||
lbu T1, 1(IN)
|
||||
addiu $at, BYTES, 2
|
||||
ROTx SAVED_X, 8
|
||||
rotr SAVED_X, 8
|
||||
xor T1, SAVED_X
|
||||
sb T1, 1(OUT)
|
||||
beqz $at, .Lchacha_mips_xor_done
|
||||
/* Third byte */
|
||||
lbu T1, 2(IN)
|
||||
ROTx SAVED_X, 8
|
||||
rotr SAVED_X, 8
|
||||
xor T1, SAVED_X
|
||||
sb T1, 2(OUT)
|
||||
b .Lchacha_mips_xor_done
|
||||
|
||||
@@ -126,4 +126,12 @@ void cleanup_tc(struct tc *tc);
|
||||
|
||||
int __init vpe_module_init(void);
|
||||
void __exit vpe_module_exit(void);
|
||||
|
||||
#ifdef CONFIG_MIPS_VPE_LOADER_MT
|
||||
void *vpe_alloc(void);
|
||||
int vpe_start(void *vpe, unsigned long start);
|
||||
int vpe_stop(void *vpe);
|
||||
int vpe_free(void *vpe);
|
||||
#endif /* CONFIG_MIPS_VPE_LOADER_MT */
|
||||
|
||||
#endif /* _ASM_VPE_H */
|
||||
|
||||
@@ -675,18 +675,20 @@ unsigned long mips_stack_top(void)
|
||||
}
|
||||
|
||||
/* Space for the VDSO, data page & GIC user page */
|
||||
top -= PAGE_ALIGN(current->thread.abi->vdso->size);
|
||||
top -= PAGE_SIZE;
|
||||
top -= mips_gic_present() ? PAGE_SIZE : 0;
|
||||
if (current->thread.abi) {
|
||||
top -= PAGE_ALIGN(current->thread.abi->vdso->size);
|
||||
top -= PAGE_SIZE;
|
||||
top -= mips_gic_present() ? PAGE_SIZE : 0;
|
||||
|
||||
/* Space to randomize the VDSO base */
|
||||
if (current->flags & PF_RANDOMIZE)
|
||||
top -= VDSO_RANDOMIZE_SIZE;
|
||||
}
|
||||
|
||||
/* Space for cache colour alignment */
|
||||
if (cpu_has_dc_aliases)
|
||||
top -= shm_align_mask + 1;
|
||||
|
||||
/* Space to randomize the VDSO base */
|
||||
if (current->flags & PF_RANDOMIZE)
|
||||
top -= VDSO_RANDOMIZE_SIZE;
|
||||
|
||||
return top;
|
||||
}
|
||||
|
||||
|
||||
@@ -498,6 +498,60 @@ static int __init set_ntlb(char *str)
|
||||
|
||||
__setup("ntlb=", set_ntlb);
|
||||
|
||||
/* Initialise all TLB entries with unique values */
|
||||
static void r4k_tlb_uniquify(void)
|
||||
{
|
||||
int entry = num_wired_entries();
|
||||
|
||||
htw_stop();
|
||||
write_c0_entrylo0(0);
|
||||
write_c0_entrylo1(0);
|
||||
|
||||
while (entry < current_cpu_data.tlbsize) {
|
||||
unsigned long asid_mask = cpu_asid_mask(¤t_cpu_data);
|
||||
unsigned long asid = 0;
|
||||
int idx;
|
||||
|
||||
/* Skip wired MMID to make ginvt_mmid work */
|
||||
if (cpu_has_mmid)
|
||||
asid = MMID_KERNEL_WIRED + 1;
|
||||
|
||||
/* Check for match before using UNIQUE_ENTRYHI */
|
||||
do {
|
||||
if (cpu_has_mmid) {
|
||||
write_c0_memorymapid(asid);
|
||||
write_c0_entryhi(UNIQUE_ENTRYHI(entry));
|
||||
} else {
|
||||
write_c0_entryhi(UNIQUE_ENTRYHI(entry) | asid);
|
||||
}
|
||||
mtc0_tlbw_hazard();
|
||||
tlb_probe();
|
||||
tlb_probe_hazard();
|
||||
idx = read_c0_index();
|
||||
/* No match or match is on current entry */
|
||||
if (idx < 0 || idx == entry)
|
||||
break;
|
||||
/*
|
||||
* If we hit a match, we need to try again with
|
||||
* a different ASID.
|
||||
*/
|
||||
asid++;
|
||||
} while (asid < asid_mask);
|
||||
|
||||
if (idx >= 0 && idx != entry)
|
||||
panic("Unable to uniquify TLB entry %d", idx);
|
||||
|
||||
write_c0_index(entry);
|
||||
mtc0_tlbw_hazard();
|
||||
tlb_write_indexed();
|
||||
entry++;
|
||||
}
|
||||
|
||||
tlbw_use_hazard();
|
||||
htw_start();
|
||||
flush_micro_tlb();
|
||||
}
|
||||
|
||||
/*
|
||||
* Configure TLB (for init or after a CPU has been powered off).
|
||||
*/
|
||||
@@ -537,7 +591,7 @@ static void r4k_tlb_configure(void)
|
||||
temp_tlb_entry = current_cpu_data.tlbsize - 1;
|
||||
|
||||
/* From this point on the ARC firmware is dead. */
|
||||
local_flush_tlb_all();
|
||||
r4k_tlb_uniquify();
|
||||
|
||||
/* Did I tell you that ARC SUCKS? */
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ palo lifimage: vmlinuz
|
||||
fi
|
||||
@if test ! -f "$(PALOCONF)"; then \
|
||||
cp $(srctree)/arch/parisc/defpalo.conf $(objtree)/palo.conf; \
|
||||
echo 'A generic palo config file ($(objree)/palo.conf) has been created for you.'; \
|
||||
echo 'A generic palo config file ($(objtree)/palo.conf) has been created for you.'; \
|
||||
echo 'You should check it and re-run "make palo".'; \
|
||||
echo 'WARNING: the "lifimage" file is now placed in this directory by default!'; \
|
||||
false; \
|
||||
|
||||
@@ -265,7 +265,6 @@ CONFIG_NET_SCH_DSMARK=m
|
||||
CONFIG_NET_SCH_NETEM=m
|
||||
CONFIG_NET_SCH_INGRESS=m
|
||||
CONFIG_NET_CLS_BASIC=m
|
||||
CONFIG_NET_CLS_TCINDEX=m
|
||||
CONFIG_NET_CLS_ROUTE4=m
|
||||
CONFIG_NET_CLS_FW=m
|
||||
CONFIG_NET_CLS_U32=m
|
||||
|
||||
@@ -1140,6 +1140,7 @@ int eeh_unfreeze_pe(struct eeh_pe *pe)
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(eeh_unfreeze_pe);
|
||||
|
||||
|
||||
static struct pci_device_id eeh_reset_ids[] = {
|
||||
|
||||
@@ -258,13 +258,12 @@ static void eeh_pe_report_edev(struct eeh_dev *edev, eeh_report_fn fn,
|
||||
struct pci_driver *driver;
|
||||
enum pci_ers_result new_result;
|
||||
|
||||
pci_lock_rescan_remove();
|
||||
pdev = edev->pdev;
|
||||
if (pdev)
|
||||
get_device(&pdev->dev);
|
||||
pci_unlock_rescan_remove();
|
||||
if (!pdev) {
|
||||
eeh_edev_info(edev, "no device");
|
||||
*result = PCI_ERS_RESULT_DISCONNECT;
|
||||
return;
|
||||
}
|
||||
device_lock(&pdev->dev);
|
||||
@@ -305,8 +304,9 @@ static void eeh_pe_report(const char *name, struct eeh_pe *root,
|
||||
struct eeh_dev *edev, *tmp;
|
||||
|
||||
pr_info("EEH: Beginning: '%s'\n", name);
|
||||
eeh_for_each_pe(root, pe) eeh_pe_for_each_dev(pe, edev, tmp)
|
||||
eeh_pe_report_edev(edev, fn, result);
|
||||
eeh_for_each_pe(root, pe)
|
||||
eeh_pe_for_each_dev(pe, edev, tmp)
|
||||
eeh_pe_report_edev(edev, fn, result);
|
||||
if (result)
|
||||
pr_info("EEH: Finished:'%s' with aggregate recovery state:'%s'\n",
|
||||
name, pci_ers_result_name(*result));
|
||||
@@ -384,6 +384,8 @@ static void eeh_dev_restore_state(struct eeh_dev *edev, void *userdata)
|
||||
if (!edev)
|
||||
return;
|
||||
|
||||
pci_lock_rescan_remove();
|
||||
|
||||
/*
|
||||
* The content in the config space isn't saved because
|
||||
* the blocked config space on some adapters. We have
|
||||
@@ -394,14 +396,19 @@ static void eeh_dev_restore_state(struct eeh_dev *edev, void *userdata)
|
||||
if (list_is_last(&edev->entry, &edev->pe->edevs))
|
||||
eeh_pe_restore_bars(edev->pe);
|
||||
|
||||
pci_unlock_rescan_remove();
|
||||
return;
|
||||
}
|
||||
|
||||
pdev = eeh_dev_to_pci_dev(edev);
|
||||
if (!pdev)
|
||||
if (!pdev) {
|
||||
pci_unlock_rescan_remove();
|
||||
return;
|
||||
}
|
||||
|
||||
pci_restore_state(pdev);
|
||||
|
||||
pci_unlock_rescan_remove();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -648,9 +655,7 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus,
|
||||
if (any_passed || driver_eeh_aware || (pe->type & EEH_PE_VF)) {
|
||||
eeh_pe_dev_traverse(pe, eeh_rmv_device, rmv_data);
|
||||
} else {
|
||||
pci_lock_rescan_remove();
|
||||
pci_hp_remove_devices(bus);
|
||||
pci_unlock_rescan_remove();
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -666,8 +671,6 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus,
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
pci_lock_rescan_remove();
|
||||
|
||||
/* Restore PE */
|
||||
eeh_ops->configure_bridge(pe);
|
||||
eeh_pe_restore_bars(pe);
|
||||
@@ -675,7 +678,6 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus,
|
||||
/* Clear frozen state */
|
||||
rc = eeh_clear_pe_frozen_state(pe, false);
|
||||
if (rc) {
|
||||
pci_unlock_rescan_remove();
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -710,7 +712,6 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus,
|
||||
pe->tstamp = tstamp;
|
||||
pe->freeze_count = cnt;
|
||||
|
||||
pci_unlock_rescan_remove();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -844,10 +845,13 @@ void eeh_handle_normal_event(struct eeh_pe *pe)
|
||||
{LIST_HEAD_INIT(rmv_data.removed_vf_list), 0};
|
||||
int devices = 0;
|
||||
|
||||
pci_lock_rescan_remove();
|
||||
|
||||
bus = eeh_pe_bus_get(pe);
|
||||
if (!bus) {
|
||||
pr_err("%s: Cannot find PCI bus for PHB#%x-PE#%x\n",
|
||||
__func__, pe->phb->global_number, pe->addr);
|
||||
pci_unlock_rescan_remove();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1089,10 +1093,15 @@ void eeh_handle_normal_event(struct eeh_pe *pe)
|
||||
eeh_pe_state_clear(pe, EEH_PE_PRI_BUS, true);
|
||||
eeh_pe_dev_mode_mark(pe, EEH_DEV_REMOVED);
|
||||
|
||||
pci_lock_rescan_remove();
|
||||
pci_hp_remove_devices(bus);
|
||||
pci_unlock_rescan_remove();
|
||||
bus = eeh_pe_bus_get(pe);
|
||||
if (bus)
|
||||
pci_hp_remove_devices(bus);
|
||||
else
|
||||
pr_err("%s: PCI bus for PHB#%x-PE#%x disappeared\n",
|
||||
__func__, pe->phb->global_number, pe->addr);
|
||||
|
||||
/* The passed PE should no longer be used */
|
||||
pci_unlock_rescan_remove();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1109,6 +1118,8 @@ out:
|
||||
eeh_clear_slot_attention(edev->pdev);
|
||||
|
||||
eeh_pe_state_clear(pe, EEH_PE_RECOVERING, true);
|
||||
|
||||
pci_unlock_rescan_remove();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1127,6 +1138,7 @@ void eeh_handle_special_event(void)
|
||||
unsigned long flags;
|
||||
int rc;
|
||||
|
||||
pci_lock_rescan_remove();
|
||||
|
||||
do {
|
||||
rc = eeh_ops->next_error(&pe);
|
||||
@@ -1166,10 +1178,12 @@ void eeh_handle_special_event(void)
|
||||
|
||||
break;
|
||||
case EEH_NEXT_ERR_NONE:
|
||||
pci_unlock_rescan_remove();
|
||||
return;
|
||||
default:
|
||||
pr_warn("%s: Invalid value %d from next_error()\n",
|
||||
__func__, rc);
|
||||
pci_unlock_rescan_remove();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1181,7 +1195,9 @@ void eeh_handle_special_event(void)
|
||||
if (rc == EEH_NEXT_ERR_FROZEN_PE ||
|
||||
rc == EEH_NEXT_ERR_FENCED_PHB) {
|
||||
eeh_pe_state_mark(pe, EEH_PE_RECOVERING);
|
||||
pci_unlock_rescan_remove();
|
||||
eeh_handle_normal_event(pe);
|
||||
pci_lock_rescan_remove();
|
||||
} else {
|
||||
eeh_for_each_pe(pe, tmp_pe)
|
||||
eeh_pe_for_each_dev(tmp_pe, edev, tmp_edev)
|
||||
@@ -1194,7 +1210,6 @@ void eeh_handle_special_event(void)
|
||||
eeh_report_failure, NULL);
|
||||
eeh_set_channel_state(pe, pci_channel_io_perm_failure);
|
||||
|
||||
pci_lock_rescan_remove();
|
||||
list_for_each_entry(hose, &hose_list, list_node) {
|
||||
phb_pe = eeh_phb_pe_get(hose);
|
||||
if (!phb_pe ||
|
||||
@@ -1213,7 +1228,6 @@ void eeh_handle_special_event(void)
|
||||
}
|
||||
pci_hp_remove_devices(bus);
|
||||
}
|
||||
pci_unlock_rescan_remove();
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1223,4 +1237,6 @@ void eeh_handle_special_event(void)
|
||||
if (rc == EEH_NEXT_ERR_DEAD_IOC)
|
||||
break;
|
||||
} while (rc != EEH_NEXT_ERR_NONE);
|
||||
|
||||
pci_unlock_rescan_remove();
|
||||
}
|
||||
|
||||
@@ -670,11 +670,12 @@ static void eeh_bridge_check_link(struct eeh_dev *edev)
|
||||
eeh_ops->write_config(edev, cap + PCI_EXP_LNKCTL, 2, val);
|
||||
|
||||
/* Check link */
|
||||
eeh_ops->read_config(edev, cap + PCI_EXP_LNKCAP, 4, &val);
|
||||
if (!(val & PCI_EXP_LNKCAP_DLLLARC)) {
|
||||
eeh_edev_dbg(edev, "No link reporting capability (0x%08x) \n", val);
|
||||
msleep(1000);
|
||||
return;
|
||||
if (edev->pdev) {
|
||||
if (!edev->pdev->link_active_reporting) {
|
||||
eeh_edev_dbg(edev, "No link reporting capability\n");
|
||||
msleep(1000);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* Wait the link is up until timeout (5s) */
|
||||
|
||||
@@ -110,6 +110,9 @@ void pci_hp_add_devices(struct pci_bus *bus)
|
||||
struct pci_controller *phb;
|
||||
struct device_node *dn = pci_bus_to_OF_node(bus);
|
||||
|
||||
if (!dn)
|
||||
return;
|
||||
|
||||
phb = pci_bus_to_host(bus);
|
||||
|
||||
mode = PCI_PROBE_NORMAL;
|
||||
|
||||
@@ -240,10 +240,8 @@ static int mpc512x_lpbfifo_kick(void)
|
||||
dma_conf.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
|
||||
|
||||
/* Make DMA channel work with LPB FIFO data register */
|
||||
if (dma_dev->device_config(lpbfifo.chan, &dma_conf)) {
|
||||
ret = -EINVAL;
|
||||
goto err_dma_prep;
|
||||
}
|
||||
if (dma_dev->device_config(lpbfifo.chan, &dma_conf))
|
||||
return -EINVAL;
|
||||
|
||||
sg_init_table(&sg, 1);
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
* Author(s): Michael Holzheu <holzheu@linux.vnet.ibm.com>
|
||||
*/
|
||||
|
||||
#include <linux/security.h>
|
||||
#include <linux/slab.h>
|
||||
#include "hypfs.h"
|
||||
|
||||
@@ -64,24 +65,28 @@ static long dbfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
||||
long rc;
|
||||
|
||||
mutex_lock(&df->lock);
|
||||
if (df->unlocked_ioctl)
|
||||
rc = df->unlocked_ioctl(file, cmd, arg);
|
||||
else
|
||||
rc = -ENOTTY;
|
||||
rc = df->unlocked_ioctl(file, cmd, arg);
|
||||
mutex_unlock(&df->lock);
|
||||
return rc;
|
||||
}
|
||||
|
||||
static const struct file_operations dbfs_ops = {
|
||||
static const struct file_operations dbfs_ops_ioctl = {
|
||||
.read = dbfs_read,
|
||||
.llseek = no_llseek,
|
||||
.unlocked_ioctl = dbfs_ioctl,
|
||||
};
|
||||
|
||||
static const struct file_operations dbfs_ops = {
|
||||
.read = dbfs_read,
|
||||
};
|
||||
|
||||
void hypfs_dbfs_create_file(struct hypfs_dbfs_file *df)
|
||||
{
|
||||
df->dentry = debugfs_create_file(df->name, 0400, dbfs_dir, df,
|
||||
&dbfs_ops);
|
||||
const struct file_operations *fops = &dbfs_ops;
|
||||
|
||||
if (df->unlocked_ioctl && !security_locked_down(LOCKDOWN_DEBUGFS))
|
||||
fops = &dbfs_ops_ioctl;
|
||||
df->dentry = debugfs_create_file(df->name, 0400, dbfs_dir, df, fops);
|
||||
mutex_init(&df->lock);
|
||||
}
|
||||
|
||||
|
||||
@@ -167,13 +167,6 @@ static inline unsigned long long get_tod_clock_fast(void)
|
||||
return get_tod_clock();
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline cycles_t get_cycles(void)
|
||||
{
|
||||
return (cycles_t) get_tod_clock() >> 2;
|
||||
}
|
||||
#define get_cycles get_cycles
|
||||
|
||||
int get_phys_clock(unsigned long *clock);
|
||||
void init_cpu_timer(void);
|
||||
|
||||
@@ -196,6 +189,12 @@ static inline unsigned long long get_tod_clock_monotonic(void)
|
||||
return tod;
|
||||
}
|
||||
|
||||
static inline cycles_t get_cycles(void)
|
||||
{
|
||||
return (cycles_t)get_tod_clock_monotonic() >> 2;
|
||||
}
|
||||
#define get_cycles get_cycles
|
||||
|
||||
/**
|
||||
* tod_to_ns - convert a TOD format value to nanoseconds
|
||||
* @todval: to be converted TOD format value
|
||||
|
||||
@@ -587,7 +587,7 @@ static int stp_sync_clock(void *data)
|
||||
atomic_dec(&sync->cpus);
|
||||
/* Wait for in_sync to be set. */
|
||||
while (READ_ONCE(sync->in_sync) == 0)
|
||||
__udelay(1);
|
||||
;
|
||||
}
|
||||
if (sync->in_sync != 1)
|
||||
/* Didn't work. Clear per-cpu in sync bit again. */
|
||||
|
||||
@@ -218,11 +218,9 @@ static int ptdump_show(struct seq_file *m, void *v)
|
||||
.marker = address_markers,
|
||||
};
|
||||
|
||||
get_online_mems();
|
||||
mutex_lock(&cpa_mutex);
|
||||
ptdump_walk_pgd(&st.ptdump, &init_mm, NULL);
|
||||
mutex_unlock(&cpa_mutex);
|
||||
put_online_mems();
|
||||
return 0;
|
||||
}
|
||||
DEFINE_SHOW_ATTRIBUTE(ptdump);
|
||||
|
||||
@@ -103,16 +103,16 @@ UTS_MACHINE := sh
|
||||
LDFLAGS_vmlinux += -e _stext
|
||||
|
||||
ifdef CONFIG_CPU_LITTLE_ENDIAN
|
||||
ld-bfd := elf32-sh-linux
|
||||
LDFLAGS_vmlinux += --defsym jiffies=jiffies_64 --oformat $(ld-bfd)
|
||||
ld_bfd := elf32-sh-linux
|
||||
LDFLAGS_vmlinux += --defsym jiffies=jiffies_64 --oformat $(ld_bfd)
|
||||
KBUILD_LDFLAGS += -EL
|
||||
else
|
||||
ld-bfd := elf32-shbig-linux
|
||||
LDFLAGS_vmlinux += --defsym jiffies=jiffies_64+4 --oformat $(ld-bfd)
|
||||
ld_bfd := elf32-shbig-linux
|
||||
LDFLAGS_vmlinux += --defsym jiffies=jiffies_64+4 --oformat $(ld_bfd)
|
||||
KBUILD_LDFLAGS += -EB
|
||||
endif
|
||||
|
||||
export ld-bfd
|
||||
export ld_bfd
|
||||
|
||||
head-y := arch/sh/kernel/head_32.o
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ endif
|
||||
|
||||
ccflags-remove-$(CONFIG_MCOUNT) += -pg
|
||||
|
||||
LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext $(IMAGE_OFFSET) -e startup \
|
||||
LDFLAGS_vmlinux := --oformat $(ld_bfd) -Ttext $(IMAGE_OFFSET) -e startup \
|
||||
-T $(obj)/../../kernel/vmlinux.lds
|
||||
|
||||
#
|
||||
@@ -68,7 +68,7 @@ $(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y) FORCE
|
||||
|
||||
OBJCOPYFLAGS += -R .empty_zero_page
|
||||
|
||||
LDFLAGS_piggy.o := -r --format binary --oformat $(ld-bfd) -T
|
||||
LDFLAGS_piggy.o := -r --format binary --oformat $(ld_bfd) -T
|
||||
|
||||
$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix-y) FORCE
|
||||
$(call if_changed,ld)
|
||||
|
||||
@@ -13,7 +13,7 @@ mmcif-obj-$(CONFIG_CPU_SUBTYPE_SH7724) := $(obj)/mmcif-sh7724.o
|
||||
load-$(CONFIG_ROMIMAGE_MMCIF) := $(mmcif-load-y)
|
||||
obj-$(CONFIG_ROMIMAGE_MMCIF) := $(mmcif-obj-y)
|
||||
|
||||
LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext $(load-y) -e romstart \
|
||||
LDFLAGS_vmlinux := --oformat $(ld_bfd) -Ttext $(load-y) -e romstart \
|
||||
-T $(obj)/../../kernel/vmlinux.lds
|
||||
|
||||
$(obj)/vmlinux: $(obj)/head.o $(obj-y) $(obj)/piggy.o FORCE
|
||||
@@ -24,7 +24,7 @@ OBJCOPYFLAGS += -j .empty_zero_page
|
||||
$(obj)/zeropage.bin: vmlinux FORCE
|
||||
$(call if_changed,objcopy)
|
||||
|
||||
LDFLAGS_piggy.o := -r --format binary --oformat $(ld-bfd) -T
|
||||
LDFLAGS_piggy.o := -r --format binary --oformat $(ld_bfd) -T
|
||||
|
||||
$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/zeropage.bin arch/sh/boot/zImage FORCE
|
||||
$(call if_changed,ld)
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/stringify.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/pgtable.h>
|
||||
#include <linux/instrumentation.h>
|
||||
@@ -94,12 +95,13 @@ DECLARE_STATIC_CALL(xen_hypercall, xen_hypercall_func);
|
||||
#ifdef MODULE
|
||||
#define __ADDRESSABLE_xen_hypercall
|
||||
#else
|
||||
#define __ADDRESSABLE_xen_hypercall __ADDRESSABLE_ASM_STR(__SCK__xen_hypercall)
|
||||
#define __ADDRESSABLE_xen_hypercall \
|
||||
__stringify(.global STATIC_CALL_KEY(xen_hypercall);)
|
||||
#endif
|
||||
|
||||
#define __HYPERCALL \
|
||||
__ADDRESSABLE_xen_hypercall \
|
||||
"call __SCT__xen_hypercall"
|
||||
__stringify(call STATIC_CALL_TRAMP(xen_hypercall))
|
||||
|
||||
#define __HYPERCALL_ENTRY(x) "a" (x)
|
||||
|
||||
|
||||
@@ -599,6 +599,8 @@ static bool amd_check_tsa_microcode(void)
|
||||
p.model = c->x86_model;
|
||||
p.ext_model = c->x86_model >> 4;
|
||||
p.stepping = c->x86_stepping;
|
||||
/* reserved bits are expected to be 0 in test below */
|
||||
p.__reserved = 0;
|
||||
|
||||
if (c->x86 == 0x19) {
|
||||
switch (p.ucode_rev >> 8) {
|
||||
|
||||
@@ -67,10 +67,9 @@ void (*x86_return_thunk)(void) __ro_after_init = &__x86_return_thunk;
|
||||
|
||||
static void __init set_return_thunk(void *thunk)
|
||||
{
|
||||
if (x86_return_thunk != __x86_return_thunk)
|
||||
pr_warn("x86/bugs: return thunk changed\n");
|
||||
|
||||
x86_return_thunk = thunk;
|
||||
|
||||
pr_info("active return thunk: %ps\n", thunk);
|
||||
}
|
||||
|
||||
/* Update SPEC_CTRL MSR and its cached copy unconditionally */
|
||||
|
||||
@@ -1215,13 +1215,20 @@ static const char *get_name(unsigned int bank, struct threshold_block *b)
|
||||
}
|
||||
|
||||
bank_type = smca_get_bank_type(bank);
|
||||
if (bank_type >= N_SMCA_BANK_TYPES)
|
||||
return NULL;
|
||||
|
||||
if (b && bank_type == SMCA_UMC) {
|
||||
if (b->block < ARRAY_SIZE(smca_umc_block_names))
|
||||
return smca_umc_block_names[b->block];
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (b && b->block) {
|
||||
snprintf(buf_mcatype, MAX_MCATYPE_NAME_LEN, "th_block_%u", b->block);
|
||||
return buf_mcatype;
|
||||
}
|
||||
|
||||
if (bank_type >= N_SMCA_BANK_TYPES) {
|
||||
snprintf(buf_mcatype, MAX_MCATYPE_NAME_LEN, "th_bank_%u", bank);
|
||||
return buf_mcatype;
|
||||
}
|
||||
|
||||
if (smca_banks[bank].hwid->count == 1)
|
||||
|
||||
@@ -60,13 +60,12 @@ __visible bool ex_handler_fprestore(const struct exception_table_entry *fixup,
|
||||
unsigned long error_code,
|
||||
unsigned long fault_addr)
|
||||
{
|
||||
regs->ip = ex_fixup_addr(fixup);
|
||||
|
||||
WARN_ONCE(1, "Bad FPU state detected at %pB, reinitializing FPU registers.",
|
||||
(void *)instruction_pointer(regs));
|
||||
|
||||
__copy_kernel_to_fpregs(&init_fpstate, -1);
|
||||
return true;
|
||||
|
||||
return ex_handler_default(fixup, regs, trapnr, error_code, fault_addr);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ex_handler_fprestore);
|
||||
|
||||
|
||||
@@ -1432,7 +1432,7 @@ again:
|
||||
if (!bio_integrity_endio(bio))
|
||||
return;
|
||||
|
||||
if (bio->bi_disk)
|
||||
if (bio->bi_disk && bio_flagged(bio, BIO_TRACKED))
|
||||
rq_qos_done_bio(bio->bi_disk->queue, bio);
|
||||
|
||||
/*
|
||||
|
||||
@@ -582,7 +582,7 @@ int blk_stack_limits(struct queue_limits *t, struct queue_limits *b,
|
||||
}
|
||||
|
||||
/* chunk_sectors a multiple of the physical block size? */
|
||||
if ((t->chunk_sectors << 9) & (t->physical_block_size - 1)) {
|
||||
if (t->chunk_sectors % (t->physical_block_size >> SECTOR_SHIFT)) {
|
||||
t->chunk_sectors = 0;
|
||||
t->misaligned = 1;
|
||||
ret = -1;
|
||||
|
||||
@@ -228,7 +228,7 @@ static inline int acpi_processor_hotadd_init(struct acpi_processor *pr)
|
||||
|
||||
static int acpi_processor_get_info(struct acpi_device *device)
|
||||
{
|
||||
union acpi_object object = { 0 };
|
||||
union acpi_object object = { .processor = { 0 } };
|
||||
struct acpi_buffer buffer = { sizeof(union acpi_object), &object };
|
||||
struct acpi_processor *pr = acpi_driver_data(device);
|
||||
int device_declaration = 0;
|
||||
|
||||
@@ -860,6 +860,8 @@ static void __ghes_panic(struct ghes *ghes,
|
||||
|
||||
__ghes_print_estatus(KERN_EMERG, ghes->generic, estatus);
|
||||
|
||||
add_taint(TAINT_MACHINE_CHECK, LOCKDEP_STILL_OK);
|
||||
|
||||
ghes_clear_estatus(ghes, estatus, buf_paddr, fixmap_idx);
|
||||
|
||||
if (!panic_timeout)
|
||||
|
||||
@@ -1128,7 +1128,9 @@ static int acpi_processor_get_lpi_info(struct acpi_processor *pr)
|
||||
|
||||
status = acpi_get_parent(handle, &pr_ahandle);
|
||||
while (ACPI_SUCCESS(status)) {
|
||||
acpi_bus_get_device(pr_ahandle, &d);
|
||||
if (acpi_bus_get_device(pr_ahandle, &d))
|
||||
break;
|
||||
|
||||
handle = pr_ahandle;
|
||||
|
||||
if (strcmp(acpi_device_hid(d), ACPI_PROCESSOR_CONTAINER_HID))
|
||||
|
||||
@@ -176,6 +176,9 @@ void acpi_processor_ppc_init(struct cpufreq_policy *policy)
|
||||
{
|
||||
unsigned int cpu;
|
||||
|
||||
if (ignore_ppc == 1)
|
||||
return;
|
||||
|
||||
for_each_cpu(cpu, policy->related_cpus) {
|
||||
struct acpi_processor *pr = per_cpu(processors, cpu);
|
||||
int ret;
|
||||
@@ -196,6 +199,14 @@ void acpi_processor_ppc_init(struct cpufreq_policy *policy)
|
||||
if (ret < 0)
|
||||
pr_err("Failed to add freq constraint for CPU%d (%d)\n",
|
||||
cpu, ret);
|
||||
|
||||
if (!pr->performance)
|
||||
continue;
|
||||
|
||||
ret = acpi_processor_get_platform_limit(pr);
|
||||
if (ret)
|
||||
pr_err("Failed to update freq constraint for CPU%d (%d)\n",
|
||||
cpu, ret);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -117,22 +117,39 @@ config SATA_AHCI
|
||||
|
||||
config SATA_MOBILE_LPM_POLICY
|
||||
int "Default SATA Link Power Management policy for mobile chipsets"
|
||||
range 0 4
|
||||
range 0 5
|
||||
default 0
|
||||
depends on SATA_AHCI
|
||||
help
|
||||
Select the Default SATA Link Power Management (LPM) policy to use
|
||||
for mobile / laptop variants of chipsets / "South Bridges".
|
||||
|
||||
The value set has the following meanings:
|
||||
0 => Keep firmware settings
|
||||
1 => Maximum performance
|
||||
2 => Medium power
|
||||
3 => Medium power with Device Initiated PM enabled
|
||||
4 => Minimum power
|
||||
Each policy combines power saving states and features:
|
||||
- Partial: The Phy logic is powered but is in a reduced power
|
||||
state. The exit latency from this state is no longer than
|
||||
10us).
|
||||
- Slumber: The Phy logic is powered but is in an even lower power
|
||||
state. The exit latency from this state is potentially
|
||||
longer, but no longer than 10ms.
|
||||
- DevSleep: The Phy logic may be powered down. The exit latency from
|
||||
this state is no longer than 20 ms, unless otherwise
|
||||
specified by DETO in the device Identify Device Data log.
|
||||
- HIPM: Host Initiated Power Management (host automatically
|
||||
transitions to partial and slumber).
|
||||
- DIPM: Device Initiated Power Management (device automatically
|
||||
transitions to partial and slumber).
|
||||
|
||||
Note "Minimum power" is known to cause issues, including disk
|
||||
corruption, with some disks and should not be used.
|
||||
The possible values for the default SATA link power management
|
||||
policies are:
|
||||
0 => Keep firmware settings
|
||||
1 => No power savings (maximum performance)
|
||||
2 => HIPM (Partial)
|
||||
3 => HIPM (Partial) and DIPM (Partial and Slumber)
|
||||
4 => HIPM (Partial and DevSleep) and DIPM (Partial and Slumber)
|
||||
5 => HIPM (Slumber and DevSleep) and DIPM (Partial and Slumber)
|
||||
|
||||
Excluding the value 0, higher values represent policies with higher
|
||||
power savings.
|
||||
|
||||
config SATA_AHCI_PLATFORM
|
||||
tristate "Platform AHCI SATA support"
|
||||
|
||||
@@ -815,6 +815,11 @@ static ssize_t ata_scsi_lpm_store(struct device *device,
|
||||
|
||||
spin_lock_irqsave(ap->lock, flags);
|
||||
|
||||
if (ap->flags & ATA_FLAG_NO_LPM) {
|
||||
count = -EOPNOTSUPP;
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
ata_for_each_link(link, ap, EDGE) {
|
||||
ata_for_each_dev(dev, &ap->link, ENABLED) {
|
||||
if (dev->horkage & ATA_HORKAGE_NOLPM) {
|
||||
|
||||
@@ -766,18 +766,14 @@ static void ata_to_sense_error(unsigned id, u8 drv_stat, u8 drv_err, u8 *sk,
|
||||
{0xFF, 0xFF, 0xFF, 0xFF}, // END mark
|
||||
};
|
||||
static const unsigned char stat_table[][4] = {
|
||||
/* Must be first because BUSY means no other bits valid */
|
||||
{0x80, ABORTED_COMMAND, 0x47, 0x00},
|
||||
// Busy, fake parity for now
|
||||
{0x40, ILLEGAL_REQUEST, 0x21, 0x04},
|
||||
// Device ready, unaligned write command
|
||||
{0x20, HARDWARE_ERROR, 0x44, 0x00},
|
||||
// Device fault, internal target failure
|
||||
{0x08, ABORTED_COMMAND, 0x47, 0x00},
|
||||
// Timed out in xfer, fake parity for now
|
||||
{0x04, RECOVERED_ERROR, 0x11, 0x00},
|
||||
// Recovered ECC error Medium error, recovered
|
||||
{0xFF, 0xFF, 0xFF, 0xFF}, // END mark
|
||||
/* Busy: must be first because BUSY means no other bits valid */
|
||||
{ ATA_BUSY, ABORTED_COMMAND, 0x00, 0x00 },
|
||||
/* Device fault: INTERNAL TARGET FAILURE */
|
||||
{ ATA_DF, HARDWARE_ERROR, 0x44, 0x00 },
|
||||
/* Corrected data error */
|
||||
{ ATA_CORR, RECOVERED_ERROR, 0x00, 0x00 },
|
||||
|
||||
{ 0xFF, 0xFF, 0xFF, 0xFF }, /* END mark */
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <linux/pm_domain.h>
|
||||
#include <linux/pm_qos.h>
|
||||
#include <linux/hrtimer.h>
|
||||
#include <linux/cpu.h>
|
||||
#include <linux/cpuidle.h>
|
||||
#include <linux/cpumask.h>
|
||||
#include <linux/ktime.h>
|
||||
@@ -345,6 +346,8 @@ static bool cpu_power_down_ok(struct dev_pm_domain *pd)
|
||||
struct cpuidle_device *dev;
|
||||
ktime_t domain_wakeup, next_hrtimer;
|
||||
ktime_t now = ktime_get();
|
||||
struct device *cpu_dev;
|
||||
s64 cpu_constraint, global_constraint;
|
||||
s64 idle_duration_ns;
|
||||
int cpu, i;
|
||||
|
||||
@@ -355,6 +358,7 @@ static bool cpu_power_down_ok(struct dev_pm_domain *pd)
|
||||
if (!(genpd->flags & GENPD_FLAG_CPU_DOMAIN))
|
||||
return true;
|
||||
|
||||
global_constraint = cpu_latency_qos_limit();
|
||||
/*
|
||||
* Find the next wakeup for any of the online CPUs within the PM domain
|
||||
* and its subdomains. Note, we only need the genpd->cpus, as it already
|
||||
@@ -368,8 +372,16 @@ static bool cpu_power_down_ok(struct dev_pm_domain *pd)
|
||||
if (ktime_before(next_hrtimer, domain_wakeup))
|
||||
domain_wakeup = next_hrtimer;
|
||||
}
|
||||
|
||||
cpu_dev = get_cpu_device(cpu);
|
||||
if (cpu_dev) {
|
||||
cpu_constraint = dev_pm_qos_raw_resume_latency(cpu_dev);
|
||||
if (cpu_constraint < global_constraint)
|
||||
global_constraint = cpu_constraint;
|
||||
}
|
||||
}
|
||||
|
||||
global_constraint *= NSEC_PER_USEC;
|
||||
/* The minimum idle duration is from now - until the next wakeup. */
|
||||
idle_duration_ns = ktime_to_ns(ktime_sub(domain_wakeup, now));
|
||||
if (idle_duration_ns <= 0)
|
||||
@@ -382,8 +394,10 @@ static bool cpu_power_down_ok(struct dev_pm_domain *pd)
|
||||
*/
|
||||
i = genpd->state_idx;
|
||||
do {
|
||||
if (idle_duration_ns >= (genpd->states[i].residency_ns +
|
||||
genpd->states[i].power_off_latency_ns)) {
|
||||
if ((idle_duration_ns >= (genpd->states[i].residency_ns +
|
||||
genpd->states[i].power_off_latency_ns)) &&
|
||||
(global_constraint >= (genpd->states[i].power_on_latency_ns +
|
||||
genpd->states[i].power_off_latency_ns))) {
|
||||
genpd->state_idx = i;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1716,6 +1716,11 @@ void pm_runtime_reinit(struct device *dev)
|
||||
pm_runtime_put(dev->parent);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Clear power.needs_force_resume in case it has been set by
|
||||
* pm_runtime_force_suspend() invoked from a driver remove callback.
|
||||
*/
|
||||
dev->power.needs_force_resume = false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -2532,7 +2532,11 @@ static int handle_write_conflicts(struct drbd_device *device,
|
||||
peer_req->w.cb = superseded ? e_send_superseded :
|
||||
e_send_retry_write;
|
||||
list_add_tail(&peer_req->w.list, &device->done_ee);
|
||||
queue_work(connection->ack_sender, &peer_req->peer_device->send_acks_work);
|
||||
/* put is in drbd_send_acks_wf() */
|
||||
kref_get(&device->kref);
|
||||
if (!queue_work(connection->ack_sender,
|
||||
&peer_req->peer_device->send_acks_work))
|
||||
kref_put(&device->kref, drbd_destroy_device);
|
||||
|
||||
err = -ENOENT;
|
||||
goto out;
|
||||
|
||||
@@ -968,8 +968,10 @@ static bool vdc_port_mpgroup_check(struct vio_dev *vdev)
|
||||
dev = device_find_child(vdev->dev.parent, &port_data,
|
||||
vdc_device_probed);
|
||||
|
||||
if (dev)
|
||||
if (dev) {
|
||||
put_device(dev);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -30,8 +30,8 @@ void mhi_rddm_prepare(struct mhi_controller *mhi_cntrl,
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < img_info->entries - 1; i++, mhi_buf++, bhi_vec++) {
|
||||
bhi_vec->dma_addr = mhi_buf->dma_addr;
|
||||
bhi_vec->size = mhi_buf->len;
|
||||
bhi_vec->dma_addr = cpu_to_le64(mhi_buf->dma_addr);
|
||||
bhi_vec->size = cpu_to_le64(mhi_buf->len);
|
||||
}
|
||||
|
||||
dev_dbg(dev, "BHIe programming for RDDM\n");
|
||||
@@ -372,8 +372,8 @@ static void mhi_firmware_copy(struct mhi_controller *mhi_cntrl,
|
||||
while (remainder) {
|
||||
to_cpy = min(remainder, mhi_buf->len);
|
||||
memcpy(mhi_buf->buf, buf, to_cpy);
|
||||
bhi_vec->dma_addr = mhi_buf->dma_addr;
|
||||
bhi_vec->size = to_cpy;
|
||||
bhi_vec->dma_addr = cpu_to_le64(mhi_buf->dma_addr);
|
||||
bhi_vec->size = cpu_to_le64(to_cpy);
|
||||
|
||||
buf += to_cpy;
|
||||
remainder -= to_cpy;
|
||||
|
||||
@@ -263,8 +263,8 @@ struct mhi_tre {
|
||||
};
|
||||
|
||||
struct bhi_vec_entry {
|
||||
u64 dma_addr;
|
||||
u64 size;
|
||||
__le64 dma_addr;
|
||||
__le64 size;
|
||||
};
|
||||
|
||||
enum mhi_cmd_type {
|
||||
|
||||
@@ -142,7 +142,9 @@ static int mtk_rng_probe(struct platform_device *pdev)
|
||||
dev_set_drvdata(&pdev->dev, priv);
|
||||
pm_runtime_set_autosuspend_delay(&pdev->dev, RNG_AUTOSUSPEND_TIMEOUT);
|
||||
pm_runtime_use_autosuspend(&pdev->dev);
|
||||
devm_pm_runtime_enable(&pdev->dev);
|
||||
ret = devm_pm_runtime_enable(&pdev->dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
dev_info(&pdev->dev, "registered RNG driver\n");
|
||||
|
||||
|
||||
@@ -4307,10 +4307,10 @@ free_msg:
|
||||
* The NetFN and Command in the response is not even
|
||||
* marginally correct.
|
||||
*/
|
||||
dev_warn(intf->si_dev,
|
||||
"BMC returned incorrect response, expected netfn %x cmd %x, got netfn %x cmd %x\n",
|
||||
(msg->data[0] >> 2) | 1, msg->data[1],
|
||||
msg->rsp[0] >> 2, msg->rsp[1]);
|
||||
dev_warn_ratelimited(intf->si_dev,
|
||||
"BMC returned incorrect response, expected netfn %x cmd %x, got netfn %x cmd %x\n",
|
||||
(msg->data[0] >> 2) | 1, msg->data[1],
|
||||
msg->rsp[0] >> 2, msg->rsp[1]);
|
||||
|
||||
/* Generate an error response for the message. */
|
||||
msg->rsp[0] = msg->data[0] | (1 << 2);
|
||||
|
||||
@@ -1198,14 +1198,8 @@ static struct ipmi_smi_watcher smi_watcher = {
|
||||
.smi_gone = ipmi_smi_gone
|
||||
};
|
||||
|
||||
static int action_op(const char *inval, char *outval)
|
||||
static int action_op_set_val(const char *inval)
|
||||
{
|
||||
if (outval)
|
||||
strcpy(outval, action);
|
||||
|
||||
if (!inval)
|
||||
return 0;
|
||||
|
||||
if (strcmp(inval, "reset") == 0)
|
||||
action_val = WDOG_TIMEOUT_RESET;
|
||||
else if (strcmp(inval, "none") == 0)
|
||||
@@ -1216,18 +1210,26 @@ static int action_op(const char *inval, char *outval)
|
||||
action_val = WDOG_TIMEOUT_POWER_DOWN;
|
||||
else
|
||||
return -EINVAL;
|
||||
strcpy(action, inval);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int preaction_op(const char *inval, char *outval)
|
||||
static int action_op(const char *inval, char *outval)
|
||||
{
|
||||
int rv;
|
||||
|
||||
if (outval)
|
||||
strcpy(outval, preaction);
|
||||
strcpy(outval, action);
|
||||
|
||||
if (!inval)
|
||||
return 0;
|
||||
rv = action_op_set_val(inval);
|
||||
if (!rv)
|
||||
strcpy(action, inval);
|
||||
return rv;
|
||||
}
|
||||
|
||||
static int preaction_op_set_val(const char *inval)
|
||||
{
|
||||
if (strcmp(inval, "pre_none") == 0)
|
||||
preaction_val = WDOG_PRETIMEOUT_NONE;
|
||||
else if (strcmp(inval, "pre_smi") == 0)
|
||||
@@ -1240,18 +1242,26 @@ static int preaction_op(const char *inval, char *outval)
|
||||
preaction_val = WDOG_PRETIMEOUT_MSG_INT;
|
||||
else
|
||||
return -EINVAL;
|
||||
strcpy(preaction, inval);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int preop_op(const char *inval, char *outval)
|
||||
static int preaction_op(const char *inval, char *outval)
|
||||
{
|
||||
int rv;
|
||||
|
||||
if (outval)
|
||||
strcpy(outval, preop);
|
||||
strcpy(outval, preaction);
|
||||
|
||||
if (!inval)
|
||||
return 0;
|
||||
rv = preaction_op_set_val(inval);
|
||||
if (!rv)
|
||||
strcpy(preaction, inval);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int preop_op_set_val(const char *inval)
|
||||
{
|
||||
if (strcmp(inval, "preop_none") == 0)
|
||||
preop_val = WDOG_PREOP_NONE;
|
||||
else if (strcmp(inval, "preop_panic") == 0)
|
||||
@@ -1260,7 +1270,22 @@ static int preop_op(const char *inval, char *outval)
|
||||
preop_val = WDOG_PREOP_GIVE_DATA;
|
||||
else
|
||||
return -EINVAL;
|
||||
strcpy(preop, inval);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int preop_op(const char *inval, char *outval)
|
||||
{
|
||||
int rv;
|
||||
|
||||
if (outval)
|
||||
strcpy(outval, preop);
|
||||
|
||||
if (!inval)
|
||||
return 0;
|
||||
|
||||
rv = preop_op_set_val(inval);
|
||||
if (!rv)
|
||||
strcpy(preop, inval);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1297,18 +1322,18 @@ static int __init ipmi_wdog_init(void)
|
||||
{
|
||||
int rv;
|
||||
|
||||
if (action_op(action, NULL)) {
|
||||
if (action_op_set_val(action)) {
|
||||
action_op("reset", NULL);
|
||||
pr_info("Unknown action '%s', defaulting to reset\n", action);
|
||||
}
|
||||
|
||||
if (preaction_op(preaction, NULL)) {
|
||||
if (preaction_op_set_val(preaction)) {
|
||||
preaction_op("pre_none", NULL);
|
||||
pr_info("Unknown preaction '%s', defaulting to none\n",
|
||||
preaction);
|
||||
}
|
||||
|
||||
if (preop_op(preop, NULL)) {
|
||||
if (preop_op_set_val(preop)) {
|
||||
preop_op("preop_none", NULL);
|
||||
pr_info("Unknown preop '%s', defaulting to none\n", preop);
|
||||
}
|
||||
|
||||
@@ -278,6 +278,11 @@ davinci_lpsc_clk_register(struct device *dev, const char *name,
|
||||
|
||||
lpsc->pm_domain.name = devm_kasprintf(dev, GFP_KERNEL, "%s: %s",
|
||||
best_dev_name(dev), name);
|
||||
if (!lpsc->pm_domain.name) {
|
||||
clk_hw_unregister(&lpsc->hw);
|
||||
kfree(lpsc);
|
||||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
lpsc->pm_domain.attach_dev = davinci_psc_genpd_attach_dev;
|
||||
lpsc->pm_domain.detach_dev = davinci_psc_genpd_detach_dev;
|
||||
lpsc->pm_domain.flags = GENPD_FLAG_PM_CLK;
|
||||
|
||||
@@ -334,8 +334,7 @@ static SUNXI_CCU_GATE(dram_ohci_clk, "dram-ohci", "dram",
|
||||
|
||||
static const char * const de_parents[] = { "pll-video", "pll-periph0" };
|
||||
static SUNXI_CCU_M_WITH_MUX_GATE(de_clk, "de", de_parents,
|
||||
0x104, 0, 4, 24, 2, BIT(31),
|
||||
CLK_SET_RATE_PARENT);
|
||||
0x104, 0, 4, 24, 3, BIT(31), 0);
|
||||
|
||||
static const char * const tcon_parents[] = { "pll-video" };
|
||||
static SUNXI_CCU_M_WITH_MUX_GATE(tcon_clk, "tcon", tcon_parents,
|
||||
|
||||
@@ -96,7 +96,7 @@ static void armada_8k_cpufreq_free_table(struct freq_table *freq_tables)
|
||||
{
|
||||
int opps_index, nb_cpus = num_possible_cpus();
|
||||
|
||||
for (opps_index = 0 ; opps_index <= nb_cpus; opps_index++) {
|
||||
for (opps_index = 0 ; opps_index < nb_cpus; opps_index++) {
|
||||
int i;
|
||||
|
||||
/* If cpu_dev is NULL then we reached the end of the array */
|
||||
|
||||
@@ -396,7 +396,7 @@ static int cppc_cpufreq_set_boost(struct cpufreq_policy *policy, int state)
|
||||
}
|
||||
|
||||
static struct cpufreq_driver cppc_cpufreq_driver = {
|
||||
.flags = CPUFREQ_CONST_LOOPS,
|
||||
.flags = CPUFREQ_CONST_LOOPS | CPUFREQ_NEED_UPDATE_LIMITS,
|
||||
.verify = cppc_verify_policy,
|
||||
.target = cppc_cpufreq_set_target,
|
||||
.get = cppc_cpufreq_get_rate,
|
||||
|
||||
@@ -1242,6 +1242,8 @@ static struct cpufreq_policy *cpufreq_policy_alloc(unsigned int cpu)
|
||||
goto err_free_real_cpus;
|
||||
}
|
||||
|
||||
init_rwsem(&policy->rwsem);
|
||||
|
||||
freq_constraints_init(&policy->constraints);
|
||||
|
||||
policy->nb_min.notifier_call = cpufreq_notifier_min;
|
||||
@@ -1264,7 +1266,6 @@ static struct cpufreq_policy *cpufreq_policy_alloc(unsigned int cpu)
|
||||
}
|
||||
|
||||
INIT_LIST_HEAD(&policy->policy_list);
|
||||
init_rwsem(&policy->rwsem);
|
||||
spin_lock_init(&policy->transition_lock);
|
||||
init_waitqueue_head(&policy->transition_wait);
|
||||
INIT_WORK(&policy->update, handle_update);
|
||||
@@ -2564,10 +2565,12 @@ static int cpufreq_set_policy(struct cpufreq_policy *policy,
|
||||
pr_debug("starting governor %s failed\n", policy->governor->name);
|
||||
if (old_gov) {
|
||||
policy->governor = old_gov;
|
||||
if (cpufreq_init_governor(policy))
|
||||
if (cpufreq_init_governor(policy)) {
|
||||
policy->governor = NULL;
|
||||
else
|
||||
cpufreq_start_governor(policy);
|
||||
} else if (cpufreq_start_governor(policy)) {
|
||||
cpufreq_exit_governor(policy);
|
||||
policy->governor = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -2801,15 +2804,6 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)
|
||||
cpufreq_driver = driver_data;
|
||||
write_unlock_irqrestore(&cpufreq_driver_lock, flags);
|
||||
|
||||
/*
|
||||
* Mark support for the scheduler's frequency invariance engine for
|
||||
* drivers that implement target(), target_index() or fast_switch().
|
||||
*/
|
||||
if (!cpufreq_driver->setpolicy) {
|
||||
static_branch_enable_cpuslocked(&cpufreq_freq_invariance);
|
||||
pr_debug("supports frequency invariance");
|
||||
}
|
||||
|
||||
if (driver_data->setpolicy)
|
||||
driver_data->flags |= CPUFREQ_CONST_LOOPS;
|
||||
|
||||
@@ -2841,6 +2835,15 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)
|
||||
hp_online = ret;
|
||||
ret = 0;
|
||||
|
||||
/*
|
||||
* Mark support for the scheduler's frequency invariance engine for
|
||||
* drivers that implement target(), target_index() or fast_switch().
|
||||
*/
|
||||
if (!cpufreq_driver->setpolicy) {
|
||||
static_branch_enable_cpuslocked(&cpufreq_freq_invariance);
|
||||
pr_debug("supports frequency invariance");
|
||||
}
|
||||
|
||||
pr_debug("driver %s up and running\n", driver_data->name);
|
||||
goto out;
|
||||
|
||||
|
||||
@@ -158,6 +158,14 @@ static inline int performance_multiplier(unsigned long nr_iowaiters)
|
||||
|
||||
static DEFINE_PER_CPU(struct menu_device, menu_devices);
|
||||
|
||||
static void menu_update_intervals(struct menu_device *data, unsigned int interval_us)
|
||||
{
|
||||
/* Update the repeating-pattern data. */
|
||||
data->intervals[data->interval_ptr++] = interval_us;
|
||||
if (data->interval_ptr >= INTERVALS)
|
||||
data->interval_ptr = 0;
|
||||
}
|
||||
|
||||
static void menu_update(struct cpuidle_driver *drv, struct cpuidle_device *dev);
|
||||
|
||||
/*
|
||||
@@ -288,6 +296,14 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev,
|
||||
if (data->needs_update) {
|
||||
menu_update(drv, dev);
|
||||
data->needs_update = 0;
|
||||
} else if (!dev->last_residency_ns) {
|
||||
/*
|
||||
* This happens when the driver rejects the previously selected
|
||||
* idle state and returns an error, so update the recent
|
||||
* intervals table to prevent invalid information from being
|
||||
* used going forward.
|
||||
*/
|
||||
menu_update_intervals(data, UINT_MAX);
|
||||
}
|
||||
|
||||
/* determine the expected residency time, round up */
|
||||
@@ -537,10 +553,7 @@ static void menu_update(struct cpuidle_driver *drv, struct cpuidle_device *dev)
|
||||
|
||||
data->correction_factor[data->bucket] = new_factor;
|
||||
|
||||
/* update the repeating-pattern data */
|
||||
data->intervals[data->interval_ptr++] = ktime_to_us(measured_ns);
|
||||
if (data->interval_ptr >= INTERVALS)
|
||||
data->interval_ptr = 0;
|
||||
menu_update_intervals(data, ktime_to_us(measured_ns));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -319,5 +319,8 @@ void ccp5_debugfs_setup(struct ccp_device *ccp)
|
||||
|
||||
void ccp5_debugfs_destroy(void)
|
||||
{
|
||||
mutex_lock(&ccp_debugfs_lock);
|
||||
debugfs_remove_recursive(ccp_debugfs_dir);
|
||||
ccp_debugfs_dir = NULL;
|
||||
mutex_unlock(&ccp_debugfs_lock);
|
||||
}
|
||||
|
||||
@@ -435,7 +435,7 @@ static int img_hash_write_via_dma_stop(struct img_hash_dev *hdev)
|
||||
struct img_hash_request_ctx *ctx = ahash_request_ctx(hdev->req);
|
||||
|
||||
if (ctx->flags & DRIVER_FLAGS_SG)
|
||||
dma_unmap_sg(hdev->dev, ctx->sg, ctx->dma_ct, DMA_TO_DEVICE);
|
||||
dma_unmap_sg(hdev->dev, ctx->sg, 1, DMA_TO_DEVICE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -248,7 +248,9 @@ static int safexcel_handle_req_result(struct safexcel_crypto_priv *priv,
|
||||
safexcel_complete(priv, ring);
|
||||
|
||||
if (sreq->nents) {
|
||||
dma_unmap_sg(priv->dev, areq->src, sreq->nents, DMA_TO_DEVICE);
|
||||
dma_unmap_sg(priv->dev, areq->src,
|
||||
sg_nents_for_len(areq->src, areq->nbytes),
|
||||
DMA_TO_DEVICE);
|
||||
sreq->nents = 0;
|
||||
}
|
||||
|
||||
@@ -496,7 +498,9 @@ unmap_result:
|
||||
DMA_FROM_DEVICE);
|
||||
unmap_sg:
|
||||
if (req->nents) {
|
||||
dma_unmap_sg(priv->dev, areq->src, req->nents, DMA_TO_DEVICE);
|
||||
dma_unmap_sg(priv->dev, areq->src,
|
||||
sg_nents_for_len(areq->src, areq->nbytes),
|
||||
DMA_TO_DEVICE);
|
||||
req->nents = 0;
|
||||
}
|
||||
cdesc_rollback:
|
||||
|
||||
@@ -75,9 +75,12 @@ mv_cesa_skcipher_dma_cleanup(struct skcipher_request *req)
|
||||
static inline void mv_cesa_skcipher_cleanup(struct skcipher_request *req)
|
||||
{
|
||||
struct mv_cesa_skcipher_req *creq = skcipher_request_ctx(req);
|
||||
struct mv_cesa_engine *engine = creq->base.engine;
|
||||
|
||||
if (mv_cesa_req_get_type(&creq->base) == CESA_DMA_REQ)
|
||||
mv_cesa_skcipher_dma_cleanup(req);
|
||||
|
||||
atomic_sub(req->cryptlen, &engine->load);
|
||||
}
|
||||
|
||||
static void mv_cesa_skcipher_std_step(struct skcipher_request *req)
|
||||
@@ -205,7 +208,6 @@ mv_cesa_skcipher_complete(struct crypto_async_request *req)
|
||||
struct mv_cesa_engine *engine = creq->base.engine;
|
||||
unsigned int ivsize;
|
||||
|
||||
atomic_sub(skreq->cryptlen, &engine->load);
|
||||
ivsize = crypto_skcipher_ivsize(crypto_skcipher_reqtfm(skreq));
|
||||
|
||||
if (mv_cesa_req_get_type(&creq->base) == CESA_DMA_REQ) {
|
||||
|
||||
@@ -109,9 +109,12 @@ static inline void mv_cesa_ahash_dma_cleanup(struct ahash_request *req)
|
||||
static inline void mv_cesa_ahash_cleanup(struct ahash_request *req)
|
||||
{
|
||||
struct mv_cesa_ahash_req *creq = ahash_request_ctx(req);
|
||||
struct mv_cesa_engine *engine = creq->base.engine;
|
||||
|
||||
if (mv_cesa_req_get_type(&creq->base) == CESA_DMA_REQ)
|
||||
mv_cesa_ahash_dma_cleanup(req);
|
||||
|
||||
atomic_sub(req->nbytes, &engine->load);
|
||||
}
|
||||
|
||||
static void mv_cesa_ahash_last_cleanup(struct ahash_request *req)
|
||||
@@ -371,8 +374,6 @@ static void mv_cesa_ahash_complete(struct crypto_async_request *req)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
atomic_sub(ahashreq->nbytes, &engine->load);
|
||||
}
|
||||
|
||||
static void mv_cesa_ahash_prepare(struct crypto_async_request *req,
|
||||
|
||||
@@ -31,8 +31,10 @@ static void *adf_ring_next(struct seq_file *sfile, void *v, loff_t *pos)
|
||||
struct adf_etr_ring_data *ring = sfile->private;
|
||||
|
||||
if (*pos >= (ADF_SIZE_TO_RING_SIZE_IN_BYTES(ring->ring_size) /
|
||||
ADF_MSG_SIZE_TO_BYTES(ring->msg_size)))
|
||||
ADF_MSG_SIZE_TO_BYTES(ring->msg_size))) {
|
||||
(*pos)++;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return ring->base_addr +
|
||||
(ADF_MSG_SIZE_TO_BYTES(ring->msg_size) * (*pos)++);
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/devfreq.h>
|
||||
#include <linux/kstrtox.h>
|
||||
#include <linux/pm.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/module.h>
|
||||
@@ -39,10 +40,13 @@ static ssize_t store_freq(struct device *dev, struct device_attribute *attr,
|
||||
unsigned long wanted;
|
||||
int err = 0;
|
||||
|
||||
err = kstrtoul(buf, 0, &wanted);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
mutex_lock(&devfreq->lock);
|
||||
data = devfreq->data;
|
||||
|
||||
sscanf(buf, "%lu", &wanted);
|
||||
data->user_frequency = wanted;
|
||||
data->valid = true;
|
||||
err = update_devfreq(devfreq);
|
||||
|
||||
@@ -290,8 +290,9 @@ void dma_resv_add_shared_fence(struct dma_resv *obj, struct dma_fence *fence)
|
||||
|
||||
replace:
|
||||
RCU_INIT_POINTER(fobj->shared[i], fence);
|
||||
/* pointer update must be visible before we extend the shared_count */
|
||||
smp_store_mb(fobj->shared_count, count);
|
||||
/* fence update must be visible before we extend the shared_count */
|
||||
smp_wmb();
|
||||
fobj->shared_count = count;
|
||||
|
||||
write_seqcount_end(&obj->seq);
|
||||
dma_fence_put(old);
|
||||
|
||||
@@ -1061,8 +1061,16 @@ mv_xor_channel_add(struct mv_xor_device *xordev,
|
||||
*/
|
||||
mv_chan->dummy_src_addr = dma_map_single(dma_dev->dev,
|
||||
mv_chan->dummy_src, MV_XOR_MIN_BYTE_COUNT, DMA_FROM_DEVICE);
|
||||
if (dma_mapping_error(dma_dev->dev, mv_chan->dummy_src_addr))
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
mv_chan->dummy_dst_addr = dma_map_single(dma_dev->dev,
|
||||
mv_chan->dummy_dst, MV_XOR_MIN_BYTE_COUNT, DMA_TO_DEVICE);
|
||||
if (dma_mapping_error(dma_dev->dev, mv_chan->dummy_dst_addr)) {
|
||||
ret = -ENOMEM;
|
||||
goto err_unmap_src;
|
||||
}
|
||||
|
||||
|
||||
/* allocate coherent memory for hardware descriptors
|
||||
* note: writecombine gives slightly better performance, but
|
||||
@@ -1071,8 +1079,10 @@ mv_xor_channel_add(struct mv_xor_device *xordev,
|
||||
mv_chan->dma_desc_pool_virt =
|
||||
dma_alloc_wc(&pdev->dev, MV_XOR_POOL_SIZE, &mv_chan->dma_desc_pool,
|
||||
GFP_KERNEL);
|
||||
if (!mv_chan->dma_desc_pool_virt)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
if (!mv_chan->dma_desc_pool_virt) {
|
||||
ret = -ENOMEM;
|
||||
goto err_unmap_dst;
|
||||
}
|
||||
|
||||
/* discover transaction capabilites from the platform data */
|
||||
dma_dev->cap_mask = cap_mask;
|
||||
@@ -1155,6 +1165,13 @@ err_free_irq:
|
||||
err_free_dma:
|
||||
dma_free_coherent(&pdev->dev, MV_XOR_POOL_SIZE,
|
||||
mv_chan->dma_desc_pool_virt, mv_chan->dma_desc_pool);
|
||||
err_unmap_dst:
|
||||
dma_unmap_single(dma_dev->dev, mv_chan->dummy_dst_addr,
|
||||
MV_XOR_MIN_BYTE_COUNT, DMA_TO_DEVICE);
|
||||
err_unmap_src:
|
||||
dma_unmap_single(dma_dev->dev, mv_chan->dummy_src_addr,
|
||||
MV_XOR_MIN_BYTE_COUNT, DMA_FROM_DEVICE);
|
||||
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
|
||||
|
||||
@@ -712,6 +712,9 @@ static int nbpf_desc_page_alloc(struct nbpf_channel *chan)
|
||||
list_add_tail(&ldesc->node, &lhead);
|
||||
ldesc->hwdesc_dma_addr = dma_map_single(dchan->device->dev,
|
||||
hwdesc, sizeof(*hwdesc), DMA_TO_DEVICE);
|
||||
if (dma_mapping_error(dchan->device->dev,
|
||||
ldesc->hwdesc_dma_addr))
|
||||
goto unmap_error;
|
||||
|
||||
dev_dbg(dev, "%s(): mapped 0x%p to %pad\n", __func__,
|
||||
hwdesc, &ldesc->hwdesc_dma_addr);
|
||||
@@ -738,6 +741,16 @@ static int nbpf_desc_page_alloc(struct nbpf_channel *chan)
|
||||
spin_unlock_irq(&chan->lock);
|
||||
|
||||
return ARRAY_SIZE(dpage->desc);
|
||||
|
||||
unmap_error:
|
||||
while (i--) {
|
||||
ldesc--; hwdesc--;
|
||||
|
||||
dma_unmap_single(dchan->device->dev, ldesc->hwdesc_dma_addr,
|
||||
sizeof(hwdesc), DMA_TO_DEVICE);
|
||||
}
|
||||
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
static void nbpf_desc_put(struct nbpf_desc *desc)
|
||||
@@ -1356,7 +1369,7 @@ static int nbpf_probe(struct platform_device *pdev)
|
||||
if (irqs == 1) {
|
||||
eirq = irqbuf[0];
|
||||
|
||||
for (i = 0; i <= num_channels; i++)
|
||||
for (i = 0; i < num_channels; i++)
|
||||
nbpf->chan[i].irq = irqbuf[0];
|
||||
} else {
|
||||
eirq = platform_get_irq_byname(pdev, "error");
|
||||
@@ -1366,16 +1379,15 @@ static int nbpf_probe(struct platform_device *pdev)
|
||||
if (irqs == num_channels + 1) {
|
||||
struct nbpf_channel *chan;
|
||||
|
||||
for (i = 0, chan = nbpf->chan; i <= num_channels;
|
||||
for (i = 0, chan = nbpf->chan; i < num_channels;
|
||||
i++, chan++) {
|
||||
/* Skip the error IRQ */
|
||||
if (irqbuf[i] == eirq)
|
||||
i++;
|
||||
if (i >= ARRAY_SIZE(irqbuf))
|
||||
return -EINVAL;
|
||||
chan->irq = irqbuf[i];
|
||||
}
|
||||
|
||||
if (chan != nbpf->chan + num_channels)
|
||||
return -EINVAL;
|
||||
} else {
|
||||
/* 2 IRQs and more than one channel */
|
||||
if (irqbuf[0] == eirq)
|
||||
@@ -1383,7 +1395,7 @@ static int nbpf_probe(struct platform_device *pdev)
|
||||
else
|
||||
irq = irqbuf[0];
|
||||
|
||||
for (i = 0; i <= num_channels; i++)
|
||||
for (i = 0; i < num_channels; i++)
|
||||
nbpf->chan[i].irq = irq;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -405,12 +405,12 @@ static int zynq_fpga_ops_write(struct fpga_manager *mgr, struct sg_table *sgt)
|
||||
}
|
||||
}
|
||||
|
||||
priv->dma_nelms =
|
||||
dma_map_sg(mgr->dev.parent, sgt->sgl, sgt->nents, DMA_TO_DEVICE);
|
||||
if (priv->dma_nelms == 0) {
|
||||
err = dma_map_sgtable(mgr->dev.parent, sgt, DMA_TO_DEVICE, 0);
|
||||
if (err) {
|
||||
dev_err(&mgr->dev, "Unable to DMA map (TO_DEVICE)\n");
|
||||
return -ENOMEM;
|
||||
return err;
|
||||
}
|
||||
priv->dma_nelms = sgt->nents;
|
||||
|
||||
/* enable clock */
|
||||
err = clk_enable(priv->clk);
|
||||
@@ -478,7 +478,7 @@ out_clk:
|
||||
clk_disable(priv->clk);
|
||||
|
||||
out_free:
|
||||
dma_unmap_sg(mgr->dev.parent, sgt->sgl, sgt->nents, DMA_TO_DEVICE);
|
||||
dma_unmap_sgtable(mgr->dev.parent, sgt, DMA_TO_DEVICE, 0);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ struct gpio_rcar_bank_info {
|
||||
|
||||
struct gpio_rcar_priv {
|
||||
void __iomem *base;
|
||||
spinlock_t lock;
|
||||
raw_spinlock_t lock;
|
||||
struct device *dev;
|
||||
struct gpio_chip gpio_chip;
|
||||
struct irq_chip irq_chip;
|
||||
@@ -114,7 +114,7 @@ static void gpio_rcar_config_interrupt_input_mode(struct gpio_rcar_priv *p,
|
||||
* "Setting Level-Sensitive Interrupt Input Mode"
|
||||
*/
|
||||
|
||||
spin_lock_irqsave(&p->lock, flags);
|
||||
raw_spin_lock_irqsave(&p->lock, flags);
|
||||
|
||||
/* Configure positive or negative logic in POSNEG */
|
||||
gpio_rcar_modify_bit(p, POSNEG, hwirq, !active_high_rising_edge);
|
||||
@@ -133,7 +133,7 @@ static void gpio_rcar_config_interrupt_input_mode(struct gpio_rcar_priv *p,
|
||||
if (!level_trigger)
|
||||
gpio_rcar_write(p, INTCLR, BIT(hwirq));
|
||||
|
||||
spin_unlock_irqrestore(&p->lock, flags);
|
||||
raw_spin_unlock_irqrestore(&p->lock, flags);
|
||||
}
|
||||
|
||||
static int gpio_rcar_irq_set_type(struct irq_data *d, unsigned int type)
|
||||
@@ -226,7 +226,7 @@ static void gpio_rcar_config_general_input_output_mode(struct gpio_chip *chip,
|
||||
* "Setting General Input Mode"
|
||||
*/
|
||||
|
||||
spin_lock_irqsave(&p->lock, flags);
|
||||
raw_spin_lock_irqsave(&p->lock, flags);
|
||||
|
||||
/* Configure positive logic in POSNEG */
|
||||
gpio_rcar_modify_bit(p, POSNEG, gpio, false);
|
||||
@@ -241,7 +241,7 @@ static void gpio_rcar_config_general_input_output_mode(struct gpio_chip *chip,
|
||||
if (p->has_outdtsel && output)
|
||||
gpio_rcar_modify_bit(p, OUTDTSEL, gpio, false);
|
||||
|
||||
spin_unlock_irqrestore(&p->lock, flags);
|
||||
raw_spin_unlock_irqrestore(&p->lock, flags);
|
||||
}
|
||||
|
||||
static int gpio_rcar_request(struct gpio_chip *chip, unsigned offset)
|
||||
@@ -310,9 +310,9 @@ static void gpio_rcar_set(struct gpio_chip *chip, unsigned offset, int value)
|
||||
struct gpio_rcar_priv *p = gpiochip_get_data(chip);
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&p->lock, flags);
|
||||
raw_spin_lock_irqsave(&p->lock, flags);
|
||||
gpio_rcar_modify_bit(p, OUTDT, offset, value);
|
||||
spin_unlock_irqrestore(&p->lock, flags);
|
||||
raw_spin_unlock_irqrestore(&p->lock, flags);
|
||||
}
|
||||
|
||||
static void gpio_rcar_set_multiple(struct gpio_chip *chip, unsigned long *mask,
|
||||
@@ -329,12 +329,12 @@ static void gpio_rcar_set_multiple(struct gpio_chip *chip, unsigned long *mask,
|
||||
if (!bankmask)
|
||||
return;
|
||||
|
||||
spin_lock_irqsave(&p->lock, flags);
|
||||
raw_spin_lock_irqsave(&p->lock, flags);
|
||||
val = gpio_rcar_read(p, OUTDT);
|
||||
val &= ~bankmask;
|
||||
val |= (bankmask & bits[0]);
|
||||
gpio_rcar_write(p, OUTDT, val);
|
||||
spin_unlock_irqrestore(&p->lock, flags);
|
||||
raw_spin_unlock_irqrestore(&p->lock, flags);
|
||||
}
|
||||
|
||||
static int gpio_rcar_direction_output(struct gpio_chip *chip, unsigned offset,
|
||||
@@ -454,7 +454,7 @@ static int gpio_rcar_probe(struct platform_device *pdev)
|
||||
return -ENOMEM;
|
||||
|
||||
p->dev = dev;
|
||||
spin_lock_init(&p->lock);
|
||||
raw_spin_lock_init(&p->lock);
|
||||
|
||||
/* Get device configuration from DT node */
|
||||
ret = gpio_rcar_parse_dt(p, &npins);
|
||||
|
||||
@@ -49,10 +49,13 @@ static int tps65912_gpio_direction_output(struct gpio_chip *gc,
|
||||
unsigned offset, int value)
|
||||
{
|
||||
struct tps65912_gpio *gpio = gpiochip_get_data(gc);
|
||||
int ret;
|
||||
|
||||
/* Set the initial value */
|
||||
regmap_update_bits(gpio->tps->regmap, TPS65912_GPIO1 + offset,
|
||||
GPIO_SET_MASK, value ? GPIO_SET_MASK : 0);
|
||||
ret = regmap_update_bits(gpio->tps->regmap, TPS65912_GPIO1 + offset,
|
||||
GPIO_SET_MASK, value ? GPIO_SET_MASK : 0);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return regmap_update_bits(gpio->tps->regmap, TPS65912_GPIO1 + offset,
|
||||
GPIO_CFG_MASK, GPIO_CFG_MASK);
|
||||
|
||||
@@ -45,9 +45,12 @@ static int wcd_gpio_direction_output(struct gpio_chip *chip, unsigned int pin,
|
||||
int val)
|
||||
{
|
||||
struct wcd_gpio_data *data = gpiochip_get_data(chip);
|
||||
int ret;
|
||||
|
||||
regmap_update_bits(data->map, WCD_REG_DIR_CTL_OFFSET,
|
||||
WCD_PIN_MASK(pin), WCD_PIN_MASK(pin));
|
||||
ret = regmap_update_bits(data->map, WCD_REG_DIR_CTL_OFFSET,
|
||||
WCD_PIN_MASK(pin), WCD_PIN_MASK(pin));
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return regmap_update_bits(data->map, WCD_REG_VAL_CTL_OFFSET,
|
||||
WCD_PIN_MASK(pin),
|
||||
|
||||
@@ -997,6 +997,7 @@ struct amdgpu_device {
|
||||
|
||||
bool in_pci_err_recovery;
|
||||
struct pci_saved_state *pci_state;
|
||||
pci_channel_state_t pci_channel_state;
|
||||
};
|
||||
|
||||
static inline struct amdgpu_device *drm_to_adev(struct drm_device *ddev)
|
||||
|
||||
@@ -94,8 +94,8 @@ int amdgpu_map_static_csa(struct amdgpu_device *adev, struct amdgpu_vm *vm,
|
||||
}
|
||||
|
||||
r = amdgpu_vm_bo_map(adev, *bo_va, csa_addr, 0, size,
|
||||
AMDGPU_PTE_READABLE | AMDGPU_PTE_WRITEABLE |
|
||||
AMDGPU_PTE_EXECUTABLE);
|
||||
AMDGPU_VM_PAGE_READABLE | AMDGPU_VM_PAGE_WRITEABLE |
|
||||
AMDGPU_VM_PAGE_EXECUTABLE);
|
||||
|
||||
if (r) {
|
||||
DRM_ERROR("failed to do bo_map on static CSA, err=%d\n", r);
|
||||
|
||||
@@ -4944,6 +4944,8 @@ pci_ers_result_t amdgpu_pci_error_detected(struct pci_dev *pdev, pci_channel_sta
|
||||
return PCI_ERS_RESULT_DISCONNECT;
|
||||
}
|
||||
|
||||
adev->pci_channel_state = state;
|
||||
|
||||
switch (state) {
|
||||
case pci_channel_io_normal:
|
||||
return PCI_ERS_RESULT_CAN_RECOVER;
|
||||
@@ -5079,6 +5081,10 @@ void amdgpu_pci_resume(struct pci_dev *pdev)
|
||||
|
||||
DRM_INFO("PCI error: resume callback!!\n");
|
||||
|
||||
/* Only continue execution for the case of pci_channel_io_frozen */
|
||||
if (adev->pci_channel_state != pci_channel_io_frozen)
|
||||
return;
|
||||
|
||||
for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
|
||||
struct amdgpu_ring *ring = adev->rings[i];
|
||||
|
||||
|
||||
@@ -992,7 +992,7 @@ static enum bp_result set_pixel_clock_v3(
|
||||
allocation.sPCLKInput.usFbDiv =
|
||||
cpu_to_le16((uint16_t)bp_params->feedback_divider);
|
||||
allocation.sPCLKInput.ucFracFbDiv =
|
||||
(uint8_t)bp_params->fractional_feedback_divider;
|
||||
(uint8_t)(bp_params->fractional_feedback_divider / 100000);
|
||||
allocation.sPCLKInput.ucPostDiv =
|
||||
(uint8_t)bp_params->pixel_clock_post_divider;
|
||||
|
||||
|
||||
@@ -384,8 +384,6 @@ static void dce_pplib_apply_display_requirements(
|
||||
{
|
||||
struct dm_pp_display_configuration *pp_display_cfg = &context->pp_display_cfg;
|
||||
|
||||
pp_display_cfg->avail_mclk_switch_time_us = dce110_get_min_vblank_time_us(context);
|
||||
|
||||
dce110_fill_display_configs(context, pp_display_cfg);
|
||||
|
||||
if (memcmp(&dc->current_state->pp_display_cfg, pp_display_cfg, sizeof(*pp_display_cfg)) != 0)
|
||||
|
||||
@@ -120,9 +120,15 @@ void dce110_fill_display_configs(
|
||||
const struct dc_state *context,
|
||||
struct dm_pp_display_configuration *pp_display_cfg)
|
||||
{
|
||||
struct dc *dc = context->clk_mgr->ctx->dc;
|
||||
int j;
|
||||
int num_cfgs = 0;
|
||||
|
||||
pp_display_cfg->avail_mclk_switch_time_us = dce110_get_min_vblank_time_us(context);
|
||||
pp_display_cfg->disp_clk_khz = dc->clk_mgr->clks.dispclk_khz;
|
||||
pp_display_cfg->avail_mclk_switch_time_in_disp_active_us = 0;
|
||||
pp_display_cfg->crtc_index = dc->res_pool->res_cap->num_timing_generator;
|
||||
|
||||
for (j = 0; j < context->stream_count; j++) {
|
||||
int k;
|
||||
|
||||
@@ -164,6 +170,23 @@ void dce110_fill_display_configs(
|
||||
cfg->v_refresh /= stream->timing.h_total;
|
||||
cfg->v_refresh = (cfg->v_refresh + stream->timing.v_total / 2)
|
||||
/ stream->timing.v_total;
|
||||
|
||||
/* Find first CRTC index and calculate its line time.
|
||||
* This is necessary for DPM on SI GPUs.
|
||||
*/
|
||||
if (cfg->pipe_idx < pp_display_cfg->crtc_index) {
|
||||
const struct dc_crtc_timing *timing =
|
||||
&context->streams[0]->timing;
|
||||
|
||||
pp_display_cfg->crtc_index = cfg->pipe_idx;
|
||||
pp_display_cfg->line_time_in_us =
|
||||
timing->h_total * 10000 / timing->pix_clk_100hz;
|
||||
}
|
||||
}
|
||||
|
||||
if (!num_cfgs) {
|
||||
pp_display_cfg->crtc_index = 0;
|
||||
pp_display_cfg->line_time_in_us = 0;
|
||||
}
|
||||
|
||||
pp_display_cfg->display_count = num_cfgs;
|
||||
@@ -222,25 +245,8 @@ void dce11_pplib_apply_display_requirements(
|
||||
pp_display_cfg->min_engine_clock_deep_sleep_khz
|
||||
= context->bw_ctx.bw.dce.sclk_deep_sleep_khz;
|
||||
|
||||
pp_display_cfg->avail_mclk_switch_time_us =
|
||||
dce110_get_min_vblank_time_us(context);
|
||||
/* TODO: dce11.2*/
|
||||
pp_display_cfg->avail_mclk_switch_time_in_disp_active_us = 0;
|
||||
|
||||
pp_display_cfg->disp_clk_khz = dc->clk_mgr->clks.dispclk_khz;
|
||||
|
||||
dce110_fill_display_configs(context, pp_display_cfg);
|
||||
|
||||
/* TODO: is this still applicable?*/
|
||||
if (pp_display_cfg->display_count == 1) {
|
||||
const struct dc_crtc_timing *timing =
|
||||
&context->streams[0]->timing;
|
||||
|
||||
pp_display_cfg->crtc_index =
|
||||
pp_display_cfg->disp_configs[0].pipe_idx;
|
||||
pp_display_cfg->line_time_in_us = timing->h_total * 10000 / timing->pix_clk_100hz;
|
||||
}
|
||||
|
||||
if (memcmp(&dc->current_state->pp_display_cfg, pp_display_cfg, sizeof(*pp_display_cfg)) != 0)
|
||||
dm_pp_apply_display_requirements(dc->ctx, pp_display_cfg);
|
||||
}
|
||||
|
||||
@@ -83,22 +83,13 @@ static const struct state_dependent_clocks dce60_max_clks_by_state[] = {
|
||||
static int dce60_get_dp_ref_freq_khz(struct clk_mgr *clk_mgr_base)
|
||||
{
|
||||
struct clk_mgr_internal *clk_mgr = TO_CLK_MGR_INTERNAL(clk_mgr_base);
|
||||
int dprefclk_wdivider;
|
||||
int dp_ref_clk_khz;
|
||||
int target_div;
|
||||
struct dc_context *ctx = clk_mgr_base->ctx;
|
||||
int dp_ref_clk_khz = 0;
|
||||
|
||||
/* DCE6 has no DPREFCLK_CNTL to read DP Reference Clock source */
|
||||
|
||||
/* Read the mmDENTIST_DISPCLK_CNTL to get the currently
|
||||
* programmed DID DENTIST_DPREFCLK_WDIVIDER*/
|
||||
REG_GET(DENTIST_DISPCLK_CNTL, DENTIST_DPREFCLK_WDIVIDER, &dprefclk_wdivider);
|
||||
|
||||
/* Convert DENTIST_DPREFCLK_WDIVIDERto actual divider*/
|
||||
target_div = dentist_get_divider_from_did(dprefclk_wdivider);
|
||||
|
||||
/* Calculate the current DFS clock, in kHz.*/
|
||||
dp_ref_clk_khz = (DENTIST_DIVIDER_RANGE_SCALE_FACTOR
|
||||
* clk_mgr->base.dentist_vco_freq_khz) / target_div;
|
||||
if (ASIC_REV_IS_TAHITI_P(ctx->asic_id.hw_internal_rev))
|
||||
dp_ref_clk_khz = ctx->dc_bios->fw_info.default_display_engine_pll_frequency;
|
||||
else
|
||||
dp_ref_clk_khz = clk_mgr_base->clks.dispclk_khz;
|
||||
|
||||
return dce_adjust_dp_ref_freq_for_ss(clk_mgr, dp_ref_clk_khz);
|
||||
}
|
||||
@@ -109,8 +100,6 @@ static void dce60_pplib_apply_display_requirements(
|
||||
{
|
||||
struct dm_pp_display_configuration *pp_display_cfg = &context->pp_display_cfg;
|
||||
|
||||
pp_display_cfg->avail_mclk_switch_time_us = dce110_get_min_vblank_time_us(context);
|
||||
|
||||
dce110_fill_display_configs(context, pp_display_cfg);
|
||||
|
||||
if (memcmp(&dc->current_state->pp_display_cfg, pp_display_cfg, sizeof(*pp_display_cfg)) != 0)
|
||||
@@ -123,11 +112,9 @@ static void dce60_update_clocks(struct clk_mgr *clk_mgr_base,
|
||||
{
|
||||
struct clk_mgr_internal *clk_mgr_dce = TO_CLK_MGR_INTERNAL(clk_mgr_base);
|
||||
struct dm_pp_power_level_change_request level_change_req;
|
||||
int patched_disp_clk = context->bw_ctx.bw.dce.dispclk_khz;
|
||||
|
||||
/*TODO: W/A for dal3 linux, investigate why this works */
|
||||
if (!clk_mgr_dce->dfs_bypass_active)
|
||||
patched_disp_clk = patched_disp_clk * 115 / 100;
|
||||
const int max_disp_clk =
|
||||
clk_mgr_dce->max_clks_by_state[DM_PP_CLOCKS_STATE_PERFORMANCE].display_clk_khz;
|
||||
int patched_disp_clk = min(max_disp_clk, context->bw_ctx.bw.dce.dispclk_khz);
|
||||
|
||||
level_change_req.power_level = dce_get_required_clocks_state(clk_mgr_base, context);
|
||||
/* get max clock state from PPLIB */
|
||||
|
||||
@@ -159,14 +159,13 @@ static void dcn20_setup_gsl_group_as_lock(
|
||||
}
|
||||
|
||||
/* at this point we want to program whether it's to enable or disable */
|
||||
if (pipe_ctx->stream_res.tg->funcs->set_gsl != NULL &&
|
||||
pipe_ctx->stream_res.tg->funcs->set_gsl_source_select != NULL) {
|
||||
if (pipe_ctx->stream_res.tg->funcs->set_gsl != NULL) {
|
||||
pipe_ctx->stream_res.tg->funcs->set_gsl(
|
||||
pipe_ctx->stream_res.tg,
|
||||
&gsl);
|
||||
|
||||
pipe_ctx->stream_res.tg->funcs->set_gsl_source_select(
|
||||
pipe_ctx->stream_res.tg, group_idx, enable ? 4 : 0);
|
||||
if (pipe_ctx->stream_res.tg->funcs->set_gsl_source_select != NULL)
|
||||
pipe_ctx->stream_res.tg->funcs->set_gsl_source_select(
|
||||
pipe_ctx->stream_res.tg, group_idx, enable ? 4 : 0);
|
||||
} else
|
||||
BREAK_TO_DEBUGGER();
|
||||
}
|
||||
@@ -736,7 +735,7 @@ enum dc_status dcn20_enable_stream_timing(
|
||||
return DC_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
hws->funcs.wait_for_blank_complete(pipe_ctx->stream_res.opp);
|
||||
fsleep(stream->timing.v_total * (stream->timing.h_total * 10000u / stream->timing.pix_clk_100hz));
|
||||
|
||||
params.vertical_total_min = stream->adjust.v_total_min;
|
||||
params.vertical_total_max = stream->adjust.v_total_max;
|
||||
|
||||
@@ -149,7 +149,7 @@ int phm_wait_on_indirect_register(struct pp_hwmgr *hwmgr,
|
||||
}
|
||||
|
||||
cgs_write_register(hwmgr->device, indirect_port, index);
|
||||
return phm_wait_on_register(hwmgr, indirect_port + 1, mask, value);
|
||||
return phm_wait_on_register(hwmgr, indirect_port + 1, value, mask);
|
||||
}
|
||||
|
||||
int phm_wait_for_register_unequal(struct pp_hwmgr *hwmgr,
|
||||
|
||||
@@ -1332,6 +1332,12 @@ static int smu_resume(void *handle)
|
||||
|
||||
adev->pm.dpm_enabled = true;
|
||||
|
||||
if (smu->current_power_limit) {
|
||||
ret = smu_set_power_limit(smu, smu->current_power_limit);
|
||||
if (ret && ret != -EOPNOTSUPP)
|
||||
return ret;
|
||||
}
|
||||
|
||||
dev_info(adev->dev, "SMU is resumed successfully!\n");
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -299,7 +299,7 @@ ssize_t drm_dp_dpcd_read(struct drm_dp_aux *aux, unsigned int offset,
|
||||
* monitor doesn't power down exactly after the throw away read.
|
||||
*/
|
||||
if (!aux->is_remote) {
|
||||
ret = drm_dp_dpcd_access(aux, DP_AUX_NATIVE_READ, DP_DPCD_REV,
|
||||
ret = drm_dp_dpcd_access(aux, DP_AUX_NATIVE_READ, DP_LANE0_1_STATUS,
|
||||
buffer, 1);
|
||||
if (ret != 1)
|
||||
goto out;
|
||||
|
||||
@@ -81,16 +81,9 @@ rockchip_fb_create(struct drm_device *dev, struct drm_file *file,
|
||||
}
|
||||
|
||||
if (drm_is_afbc(mode_cmd->modifier[0])) {
|
||||
int ret, i;
|
||||
|
||||
ret = drm_gem_fb_afbc_init(dev, mode_cmd, afbc_fb);
|
||||
if (ret) {
|
||||
struct drm_gem_object **obj = afbc_fb->base.obj;
|
||||
|
||||
for (i = 0; i < info->num_planes; ++i)
|
||||
drm_gem_object_put(obj[i]);
|
||||
|
||||
kfree(afbc_fb);
|
||||
drm_framebuffer_put(&afbc_fb->base);
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -313,19 +313,6 @@ void drm_sched_entity_destroy(struct drm_sched_entity *entity)
|
||||
}
|
||||
EXPORT_SYMBOL(drm_sched_entity_destroy);
|
||||
|
||||
/**
|
||||
* drm_sched_entity_clear_dep - callback to clear the entities dependency
|
||||
*/
|
||||
static void drm_sched_entity_clear_dep(struct dma_fence *f,
|
||||
struct dma_fence_cb *cb)
|
||||
{
|
||||
struct drm_sched_entity *entity =
|
||||
container_of(cb, struct drm_sched_entity, cb);
|
||||
|
||||
entity->dependency = NULL;
|
||||
dma_fence_put(f);
|
||||
}
|
||||
|
||||
/**
|
||||
* drm_sched_entity_clear_dep - callback to clear the entities dependency and
|
||||
* wake up scheduler
|
||||
@@ -336,7 +323,8 @@ static void drm_sched_entity_wakeup(struct dma_fence *f,
|
||||
struct drm_sched_entity *entity =
|
||||
container_of(cb, struct drm_sched_entity, cb);
|
||||
|
||||
drm_sched_entity_clear_dep(f, cb);
|
||||
entity->dependency = NULL;
|
||||
dma_fence_put(f);
|
||||
drm_sched_wakeup(entity->rq->sched);
|
||||
}
|
||||
|
||||
@@ -392,13 +380,6 @@ static bool drm_sched_entity_add_dependency_cb(struct drm_sched_entity *entity)
|
||||
fence = dma_fence_get(&s_fence->scheduled);
|
||||
dma_fence_put(entity->dependency);
|
||||
entity->dependency = fence;
|
||||
if (!dma_fence_add_callback(fence, &entity->cb,
|
||||
drm_sched_entity_clear_dep))
|
||||
return true;
|
||||
|
||||
/* Ignore it when it is already scheduled */
|
||||
dma_fence_put(fence);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!dma_fence_add_callback(entity->dependency, &entity->cb,
|
||||
|
||||
@@ -113,6 +113,9 @@ int ttm_resource_manager_force_list_clean(struct ttm_bo_device *bdev,
|
||||
}
|
||||
spin_unlock(&glob->lru_lock);
|
||||
|
||||
if (ret && ret != -ENOENT)
|
||||
return ret;
|
||||
|
||||
spin_lock(&man->move_lock);
|
||||
fence = dma_fence_get(man->move);
|
||||
spin_unlock(&man->move_lock);
|
||||
|
||||
@@ -1656,9 +1656,12 @@ u8 *hid_alloc_report_buf(struct hid_report *report, gfp_t flags)
|
||||
/*
|
||||
* 7 extra bytes are necessary to achieve proper functionality
|
||||
* of implement() working on 8 byte chunks
|
||||
* 1 extra byte for the report ID if it is null (not used) so
|
||||
* we can reserve that extra byte in the first position of the buffer
|
||||
* when sending it to .raw_request()
|
||||
*/
|
||||
|
||||
u32 len = hid_report_len(report) + 7;
|
||||
u32 len = hid_report_len(report) + 7 + (report->id == 0);
|
||||
|
||||
return kzalloc(len, flags);
|
||||
}
|
||||
@@ -1721,7 +1724,7 @@ static struct hid_report *hid_get_report(struct hid_report_enum *report_enum,
|
||||
int __hid_request(struct hid_device *hid, struct hid_report *report,
|
||||
int reqtype)
|
||||
{
|
||||
char *buf;
|
||||
char *buf, *data_buf;
|
||||
int ret;
|
||||
u32 len;
|
||||
|
||||
@@ -1729,13 +1732,19 @@ int __hid_request(struct hid_device *hid, struct hid_report *report,
|
||||
if (!buf)
|
||||
return -ENOMEM;
|
||||
|
||||
data_buf = buf;
|
||||
len = hid_report_len(report);
|
||||
|
||||
if (reqtype == HID_REQ_SET_REPORT)
|
||||
hid_output_report(report, buf);
|
||||
if (report->id == 0) {
|
||||
/* reserve the first byte for the report ID */
|
||||
data_buf++;
|
||||
len++;
|
||||
}
|
||||
|
||||
ret = hid->ll_driver->raw_request(hid, report->id, buf, len,
|
||||
report->type, reqtype);
|
||||
if (reqtype == HID_REQ_SET_REPORT)
|
||||
hid_output_report(report, data_buf);
|
||||
|
||||
ret = hid_hw_raw_request(hid, report->id, buf, len, report->type, reqtype);
|
||||
if (ret < 0) {
|
||||
dbg_hid("unable to complete request: %d\n", ret);
|
||||
goto out;
|
||||
|
||||
@@ -84,6 +84,7 @@ struct ccp_device {
|
||||
struct mutex mutex; /* whenever buffer is used, lock before send_usb_cmd */
|
||||
u8 *cmd_buffer;
|
||||
u8 *buffer;
|
||||
int buffer_recv_size; /* number of received bytes in buffer */
|
||||
int target[6];
|
||||
DECLARE_BITMAP(temp_cnct, NUM_TEMP_SENSORS);
|
||||
DECLARE_BITMAP(fan_cnct, NUM_FANS);
|
||||
@@ -139,6 +140,9 @@ static int send_usb_cmd(struct ccp_device *ccp, u8 command, u8 byte1, u8 byte2,
|
||||
if (!t)
|
||||
return -ETIMEDOUT;
|
||||
|
||||
if (ccp->buffer_recv_size != IN_BUFFER_SIZE)
|
||||
return -EPROTO;
|
||||
|
||||
return ccp_get_errno(ccp);
|
||||
}
|
||||
|
||||
@@ -150,6 +154,7 @@ static int ccp_raw_event(struct hid_device *hdev, struct hid_report *report, u8
|
||||
spin_lock(&ccp->wait_input_report_lock);
|
||||
if (!completion_done(&ccp->wait_input_report)) {
|
||||
memcpy(ccp->buffer, data, min(IN_BUFFER_SIZE, size));
|
||||
ccp->buffer_recv_size = size;
|
||||
complete_all(&ccp->wait_input_report);
|
||||
}
|
||||
spin_unlock(&ccp->wait_input_report_lock);
|
||||
|
||||
@@ -65,7 +65,7 @@ static ssize_t pwm_auto_point_temp_show(struct device *dev,
|
||||
return ret;
|
||||
|
||||
ret = regs[0] | regs[1] << 8;
|
||||
return sprintf(buf, "%d\n", ret * 10);
|
||||
return sprintf(buf, "%d\n", ret * 100);
|
||||
}
|
||||
|
||||
static ssize_t pwm_auto_point_temp_store(struct device *dev,
|
||||
@@ -100,7 +100,7 @@ static ssize_t pwm_auto_point_pwm_show(struct device *dev,
|
||||
{
|
||||
struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
|
||||
|
||||
return sprintf(buf, "%d\n", 255 * (50 + (attr->index * 10)));
|
||||
return sprintf(buf, "%d\n", 255 * (50 + (attr->index * 10)) / 100);
|
||||
}
|
||||
|
||||
static SENSOR_DEVICE_ATTR_RO(pwm1_auto_point1_pwm, pwm_auto_point_pwm, 0);
|
||||
|
||||
@@ -452,8 +452,10 @@ static int qup_i2c_bus_active(struct qup_i2c_dev *qup, int len)
|
||||
if (!(status & I2C_STATUS_BUS_ACTIVE))
|
||||
break;
|
||||
|
||||
if (time_after(jiffies, timeout))
|
||||
if (time_after(jiffies, timeout)) {
|
||||
ret = -ETIMEDOUT;
|
||||
break;
|
||||
}
|
||||
|
||||
usleep_range(len, len * 2);
|
||||
}
|
||||
|
||||
@@ -102,7 +102,6 @@ int stm32_i2c_prep_dma_xfer(struct device *dev, struct stm32_i2c_dma *dma,
|
||||
void *dma_async_param)
|
||||
{
|
||||
struct dma_async_tx_descriptor *txdesc;
|
||||
struct device *chan_dev;
|
||||
int ret;
|
||||
|
||||
if (rd_wr) {
|
||||
@@ -116,11 +115,10 @@ int stm32_i2c_prep_dma_xfer(struct device *dev, struct stm32_i2c_dma *dma,
|
||||
}
|
||||
|
||||
dma->dma_len = len;
|
||||
chan_dev = dma->chan_using->device->dev;
|
||||
|
||||
dma->dma_buf = dma_map_single(chan_dev, buf, dma->dma_len,
|
||||
dma->dma_buf = dma_map_single(dev, buf, dma->dma_len,
|
||||
dma->dma_data_dir);
|
||||
if (dma_mapping_error(chan_dev, dma->dma_buf)) {
|
||||
if (dma_mapping_error(dev, dma->dma_buf)) {
|
||||
dev_err(dev, "DMA mapping failed\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -150,7 +148,7 @@ int stm32_i2c_prep_dma_xfer(struct device *dev, struct stm32_i2c_dma *dma,
|
||||
return 0;
|
||||
|
||||
err:
|
||||
dma_unmap_single(chan_dev, dma->dma_buf, dma->dma_len,
|
||||
dma_unmap_single(dev, dma->dma_buf, dma->dma_len,
|
||||
dma->dma_data_dir);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -700,10 +700,10 @@ static void stm32f7_i2c_dma_callback(void *arg)
|
||||
{
|
||||
struct stm32f7_i2c_dev *i2c_dev = (struct stm32f7_i2c_dev *)arg;
|
||||
struct stm32_i2c_dma *dma = i2c_dev->dma;
|
||||
struct device *dev = dma->chan_using->device->dev;
|
||||
|
||||
stm32f7_i2c_disable_dma_req(i2c_dev);
|
||||
dma_unmap_single(dev, dma->dma_buf, dma->dma_len, dma->dma_data_dir);
|
||||
dma_unmap_single(i2c_dev->dev, dma->dma_buf, dma->dma_len,
|
||||
dma->dma_data_dir);
|
||||
complete(&dma->dma_complete);
|
||||
}
|
||||
|
||||
|
||||
@@ -314,6 +314,7 @@ static const struct acpi_device_id i2c_acpi_force_100khz_device_ids[] = {
|
||||
* the device works without issues on Windows at what is expected to be
|
||||
* a 400KHz frequency. The root cause of the issue is not known.
|
||||
*/
|
||||
{ "DLL0945", 0 },
|
||||
{ "ELAN06FA", 0 },
|
||||
{}
|
||||
};
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#define I3C_INTERNALS_H
|
||||
|
||||
#include <linux/i3c/master.h>
|
||||
#include <linux/io.h>
|
||||
|
||||
extern struct bus_type i3c_bus_type;
|
||||
|
||||
|
||||
@@ -1265,7 +1265,7 @@ static int i3c_master_retrieve_dev_info(struct i3c_dev_desc *dev)
|
||||
|
||||
if (dev->info.bcr & I3C_BCR_HDR_CAP) {
|
||||
ret = i3c_master_gethdrcap_locked(master, &dev->info);
|
||||
if (ret)
|
||||
if (ret && ret != -ENOTSUPP)
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -1154,7 +1154,7 @@ static const struct x86_cpu_id intel_idle_ids[] __initconst = {
|
||||
};
|
||||
|
||||
static const struct x86_cpu_id intel_mwait_ids[] __initconst = {
|
||||
X86_MATCH_VENDOR_FAM_FEATURE(INTEL, 6, X86_FEATURE_MWAIT, NULL),
|
||||
X86_MATCH_VENDOR_FAM_FEATURE(INTEL, X86_FAMILY_ANY, X86_FEATURE_MWAIT, NULL),
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user