Merge android11-5.4.52 (c7725ae) into msm-5.4

* refs/heads/tmp-c7725ae:
  Linux 5.4.52
  s390/maccess: add no DAT mode to kernel_write
  s390: Change s390_kernel_write() return type to match memcpy()
  pwm: jz4740: Fix build failure
  perf scripts python: exported-sql-viewer.py: Fix unexpanded 'Find' result
  perf scripts python: exported-sql-viewer.py: Fix zero id in call tree 'Find' result
  perf scripts python: exported-sql-viewer.py: Fix zero id in call graph 'Find' result
  perf scripts python: export-to-postgresql.py: Fix struct.pack() int argument
  dm writecache: reject asynchronous pmem devices
  blk-mq: consider non-idle request as "inflight" in blk_mq_rq_inflight()
  s390/mm: fix huge pte soft dirty copying
  s390/setup: init jump labels before command line parsing
  ARC: elf: use right ELF_ARCH
  ARC: entry: fix potential EFA clobber when TIF_SYSCALL_TRACE
  mmc: meson-gx: limit segments to 1 when dram-access-quirk is needed
  dm: use noio when sending kobject event
  drm/amdgpu: don't do soft recovery if gpu_recovery=0
  drm/radeon: fix double free
  btrfs: fix double put of block group with nocow
  btrfs: fix fatal extent_buffer readahead vs releasepage race
  Revert "ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb"
  bpf: Check correct cred for CAP_SYSLOG in bpf_dump_raw_ok()
  kprobes: Do not expose probe addresses to non-CAP_SYSLOG
  module: Do not expose section addresses to non-CAP_SYSLOG
  module: Refactor section attr into bin attribute
  kallsyms: Refactor kallsyms_show_value() to take cred
  KVM: arm64: Fix kvm_reset_vcpu() return code being incorrect with SVE
  KVM: x86: Mark CR4.TSD as being possibly owned by the guest
  KVM: x86: Inject #GP if guest attempts to toggle CR4.LA57 in 64-bit mode
  KVM: x86: bit 8 of non-leaf PDPEs is not reserved
  KVM: arm64: Annotate hyp NMI-related functions as __always_inline
  KVM: arm64: Stop clobbering x0 for HVC_SOFT_RESTART
  KVM: arm64: Fix definition of PAGE_HYP_DEVICE
  ALSA: hda/realtek: Enable headset mic of Acer Veriton N4660G with ALC269VC
  ALSA: hda/realtek: Enable headset mic of Acer C20-820 with ALC269VC
  ALSA: hda/realtek - Enable audio jacks of Acer vCopperbox with ALC269VC
  ALSA: hda/realtek - Fix Lenovo Thinkpad X1 Carbon 7th quirk subdevice id
  ALSA: usb-audio: Add implicit feedback quirk for RTX6001
  ALSA: usb-audio: add quirk for MacroSilicon MS2109
  ALSA: hda - let hs_mic be picked ahead of hp_mic
  ALSA: opl3: fix infoleak in opl3
  IB/hfi1: Do not destroy link_wq when the device is shut down
  IB/hfi1: Do not destroy hfi1_wq when the device is shut down
  mlxsw: pci: Fix use-after-free in case of failed devlink reload
  mlxsw: spectrum_router: Remove inappropriate usage of WARN_ON()
  net: macb: fix call to pm_runtime in the suspend/resume functions
  net: macb: mark device wake capable when "magic-packet" property present
  net: macb: fix wakeup test in runtime suspend/resume routines
  bnxt_en: fix NULL dereference in case SR-IOV configuration fails
  net/mlx5e: Fix 50G per lane indication
  net/mlx5: Fix eeprom support for SFP module
  qed: Populate nvm-file attributes while reading nvm config partition.
  IB/mlx5: Fix 50G per lane indication
  cxgb4: fix all-mask IP address comparison
  nbd: Fix memory leak in nbd_add_socket
  arm64: kgdb: Fix single-step exception handling oops
  RDMA/siw: Fix reporting vendor_part_id
  ALSA: compress: fix partial_drain completion state
  net: hns3: fix use-after-free when doing self test
  net: hns3: add a missing uninit debugfs when unload driver
  smsc95xx: avoid memory leak in smsc95xx_bind
  smsc95xx: check return value of smsc95xx_reset
  perf intel-pt: Fix PEBS sample for XMM registers
  perf intel-pt: Fix recording PEBS-via-PT with registers
  perf report TUI: Fix segmentation fault in perf_evsel__hists_browse()
  netfilter: conntrack: refetch conntrack after nf_conntrack_update()
  net: dsa: microchip: set the correct number of ports
  IB/sa: Resolv use-after-free in ib_nl_make_request()
  net: cxgb4: fix return error value in t4_prep_fw
  net: mvneta: fix use of state->speed
  netfilter: ipset: call ip_set_free() instead of kfree()
  bpf, sockmap: RCU dereferenced psock may be used outside RCU block
  bpf, sockmap: RCU splat with redirect and strparser error or TLS
  drm/mediatek: Check plane visibility in atomic_update
  nl80211: don't return err unconditionally in nl80211_start_ap()
  gpio: pca953x: Fix GPIO resource leak on Intel Galileo Gen 2
  gpio: pca953x: Override IRQ for one of the expanders on Galileo Gen 2
  net: qrtr: Fix an out of bounds read qrtr_endpoint_post()
  sched/core: Check cpus_mask, not cpus_ptr in __set_cpus_allowed_ptr(), to fix mask corruption
  x86/entry: Increase entry_stack size to a full page
  nvme-rdma: assign completion vector correctly
  block: release bip in a right way in error path
  usb: dwc3: pci: Fix reference count leak in dwc3_pci_resume_work
  scsi: mptscsih: Fix read sense data size
  ARM: imx6: add missing put_device() call in imx6q_suspend_init()
  cifs: update ctime and mtime during truncate
  s390/kasan: fix early pgm check handler execution
  drm: panel-orientation-quirks: Use generic orientation-data for Acer S1003
  drm: panel-orientation-quirks: Add quirk for Asus T101HA panel
  iommu/vt-d: Don't apply gfx quirks to untrusted devices
  powerpc/kvm/book3s64: Fix kernel crash with nested kvm & DEBUG_VIRTUAL
  ibmvnic: continue to init in CRQ reset returns H_CLOSED
  i40e: protect ring accesses with READ- and WRITE_ONCE
  ixgbe: protect ring accesses with READ- and WRITE_ONCE
  net: ethernet: mvneta: Add 2500BaseX support for SoCs without comphy
  net: ethernet: mvneta: Fix Serdes configuration for SoCs without comphy
  spi: spidev: fix a potential use-after-free in spidev_release()
  spi: spidev: fix a race between spidev_release and spidev_remove
  ALSA: hda: Intel: add missing PCI IDs for ICL-H, TGL-H and EKL
  ASoC: SOF: Intel: add PCI ID for CometLake-S
  drm: mcde: Fix display initialization problem
  gpu: host1x: Detach driver on unregister
  drm/tegra: hub: Do not enable orphaned window group
  drm/ttm: Fix dma_fence refcnt leak when adding move fence
  ARM: dts: omap4-droid4: Fix spi configuration and increase rate
  perf/x86/rapl: Fix RAPL config variable bug
  perf/x86/rapl: Move RAPL support to common x86 code
  regmap: fix alignment issue
  spi: spi-fsl-dspi: Fix lockup if device is removed during SPI transfer
  spi: spi-fsl-dspi: Adding shutdown hook
  KVM: s390: reduce number of IO pins to 1
  ANDROID: ABI: add already existing symbols of ufs_* to unisoc
  ANDROID: ABI: add nf_* symbols to unisoc
  ANDROID: GKI: update abi xml file
  ANDROID: GKI: build in more Bluetooth drivers
  ANDROID: GKI: update abi xml file
  ANDROID: GKI: Enable CONFIG_BT_HIDP as it is needed by some platforms
  ANDROID: GKI: add CONFIG_BT to x86 gki_defconfig
  ANDROID: GKI: update abi definitions
  ANDROID: mm: add vendor padding for SPECULATIVE_PAGE_FAULTS
  ANDROID: GKI: enable usb storage drivers
  ANDROID: fscrypt: fix DUN contiguity with inline encryption + IV_INO_LBLK_32 policies
  ANDROID: GKI: set CONFIG_STATIC_USERMODEHELPER_PATH
  ANDROID: sound: usb: Add vendor's hooking interface
  UPSTREAM: slimbus: core: Set fwnode for a device when setting of_node
  ANDROID: f2fs: add back compress inode check
  ANDROID: abi: update abi dump for CONFIG_KPROBES
  ANDROID: gki_defconfig: Enable Kprobes
  ANDROID: Correct branch name after rename
  ANDROID: GKI: update ABI due to power supply changes
  UPSTREAM: power: supply: core: add POWER_SUPPLY_HEALTH_CALIBRATION_REQUIRED
  UPSTREAM: power: supply: core: add manufacture date properties
  UPSTREAM: power: supply: core: add capacity error margin property
  UPSTREAM: power: supply: core: Add type property to uevent env
  UPSTREAM: power: supply: core: Add a macro that maps enum properties to text values
  UPSTREAM: power: supply: core: Use designated initializer for property text arrays
  UPSTREAM: power: supply: core: Cleanup power supply sysfs attribute list
  UPSTREAM: power: supply: core: reduce power_supply_show_usb_type() parameters
  ANDROID: fix copyright notice
  ANDROID: add support for vendor hooks
  ANDROID: GKI: update abi definitions
  Linux 5.4.51
  efi: Make it possible to disable efivar_ssdt entirely
  dm zoned: assign max_io_len correctly
  x86/resctrl: Fix memory bandwidth counter width for AMD
  mm, compaction: make capture control handling safe wrt interrupts
  mm, compaction: fully assume capture is not NULL in compact_zone_order()
  irqchip/gic: Atomically update affinity
  dma-buf: Move dma_buf_release() from fops to dentry_ops
  drm/amdgpu/atomfirmware: fix vram_info fetching for renoir
  drm/amdgpu: use %u rather than %d for sclk/mclk
  drm/amd/display: Only revalidate bandwidth on medium and fast updates
  MIPS: Add missing EHB in mtc0 -> mfc0 sequence for DSPen
  MIPS: lantiq: xway: sysctrl: fix the GPHY clock alias names
  cifs: Fix the target file was deleted when rename failed.
  SMB3: Honor 'handletimeout' flag for multiuser mounts
  SMB3: Honor lease disabling for multiuser mounts
  SMB3: Honor persistent/resilient handle flags for multiuser mounts
  SMB3: Honor 'seal' flag for multiuser mounts
  Revert "ALSA: usb-audio: Improve frames size computation"
  nfsd: apply umask on fs without ACL support
  spi: spi-fsl-dspi: Fix external abort on interrupt in resume or exit paths
  i2c: mlxcpld: check correct size of maximum RECV_LEN packet
  i2c: algo-pca: Add 0x78 as SCL stuck low status for PCA9665
  samples/vfs: avoid warning in statx override
  nvme: fix a crash in nvme_mpath_add_disk
  nvme: fix identify error status silent ignore
  SMB3: Honor 'posix' flag for multiuser mounts
  virtio-blk: free vblk-vqs in error path of virtblk_probe()
  drm: sun4i: hdmi: Remove extra HPD polling
  nfsd: fix nfsdfs inode reference count leak
  nfsd4: fix nfsdfs reference count loop
  thermal/drivers/rcar_gen3: Fix undefined temperature if negative
  thermal/drivers/mediatek: Fix bank number settings on mt8183
  hwmon: (acpi_power_meter) Fix potential memory leak in acpi_power_meter_add()
  hwmon: (max6697) Make sure the OVERT mask is set correctly
  cxgb4: fix SGE queue dump destination buffer context
  cxgb4: use correct type for all-mask IP address comparison
  cxgb4: fix endian conversions for L4 ports in filters
  cxgb4: parse TC-U32 key values and masks natively
  cxgb4: use unaligned conversion for fetching timestamp
  RDMA/counter: Query a counter before release
  rxrpc: Fix afs large storage transmission performance drop
  drm/msm/dpu: fix error return code in dpu_encoder_init
  crypto: af_alg - fix use-after-free in af_alg_accept() due to bh_lock_sock()
  tpm: Fix TIS locality timeout problems
  selftests: tpm: Use /bin/sh instead of /bin/bash
  kgdb: Avoid suspicious RCU usage warning
  nvme-multipath: fix bogus request queue reference put
  nvme-multipath: fix deadlock due to head->lock
  nvme-multipath: fix deadlock between ana_work and scan_work
  nvme-multipath: set bdi capabilities once
  s390/debug: avoid kernel warning on too large number of pages
  tools lib traceevent: Handle __attribute__((user)) in field names
  tools lib traceevent: Add append() function helper for appending strings
  usb: usbtest: fix missing kfree(dev->buf) in usbtest_disconnect
  rxrpc: Fix race between incoming ACK parser and retransmitter
  mm/slub: fix stack overruns with SLUB_STATS
  mm/slub.c: fix corrupted freechain in deactivate_slab()
  sched/debug: Make sd->flags sysctl read-only
  usbnet: smsc95xx: Fix use-after-free after removal
  EDAC/amd64: Read back the scrub rate PCI register on F15h
  mm: fix swap cache node allocation mask
  io_uring: make sure async workqueue is canceled on exit
  ANDROID: update the ABI representation after ion sysfs changes
  ANDROID: add ion_stat tracepoint to common kernel
  ANDROID: staging: android: ion: Expose total heap and pool sizes via sysfs
  ANDROID: Update ABI representation for libabigail update
  ANDROID: Update the ABI representation
  ANDROID: GKI: Incremental fs: move MODULE_IMPORT_NS() line
  ANDROID: GKI: set vfs-only exports into their own namespace
  ANDROID: gki: build-in DMA_VIRTUAL_CHANNELS
  ANDROID: GKI: make VIDEOBUF2_DMA_CONTIG under GKI_HIDDEN_MEDIA_CONFIGS
  ANDROID: PM: sleep: export device_pm_callback_start/end trace event
  ANDROID: fix copyright notice
  ANDROID: GKI: add android_vendor.h
  ANDROID: GKI: enable CONFIG_V4L_PLATFORM_DRIVERS
  ANDROID: GKI: enable CONFIG_TYPEC_TCPM
  ANDROID: GKI: support CONFIG_INPUT_TOUCHSCREEN
  ANDROID: GKI: move abi files to android/
  ANDROID: GKI: drop unneeded "_whitelist" off of symbol filenames
  ANDROID: GKI: modules should not run programs
  UPSTREAM: net: bpf: Make bpf_ktime_get_ns() available to non GPL programs
  UPSTREAM: bpf: Add gso_size to __sk_buff
  UPSTREAM: usb: musb: mediatek: add reset FADDR to zero in reset interrupt handle
  ANDROID: ABI/Whitelist: update symbols of incrementalfs.ko and sprd_*.ko to unisoc whitelist
  ANDROID: GKI: update abi definition now that EHCI driver is built in
  ANDROID: GKI: support CONFIG_USB_EHCI_HCD_PLATFORM
  ANDROID: GKI: support CONFIG_USB_EHCI_HCD
  ANDROID: Update kabi for db845c (keeping up with ufs-qcom zig-zag)
  ANDROID: GKI: scripts: Makefile: update the lz4 command (#2)

Conflicts:
	android/abi_gki_aarch64_qcom
	drivers/dma-buf/dma-buf.c
	kernel/trace/power-traces.c

Change-Id: I9993aff20a659ab20af5f890f1f789cd4ef19246
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
This commit is contained in:
Blagovest Kolenichev 2020-07-27 01:03:51 -07:00
commit fac8c789d8
237 changed files with 15978 additions and 17444 deletions

View file

@ -74,6 +74,21 @@ Description:
Access: Read, Write
Valid values: 0 - 100 (percent)
What: /sys/class/power_supply/<supply_name>/capacity_error_margin
Date: April 2019
Contact: linux-pm@vger.kernel.org
Description:
Battery capacity measurement becomes unreliable without
recalibration. This values provides the maximum error
margin expected to exist by the fuel gauge in percent.
Values close to 0% will be returned after (re-)calibration
has happened. Over time the error margin will increase.
100% means, that the capacity related values are basically
completely useless.
Access: Read
Valid values: 0 - 100 (percent)
What: /sys/class/power_supply/<supply_name>/capacity_level
Date: June 2009
Contact: linux-pm@vger.kernel.org
@ -190,7 +205,8 @@ Description:
Valid values: "Unknown", "Good", "Overheat", "Dead",
"Over voltage", "Unspecified failure", "Cold",
"Watchdog timer expire", "Safety timer expire",
"Over current", "Warm", "Cool", "Hot"
"Over current", "Calibration required",
"Warm", "Cool", "Hot"
What: /sys/class/power_supply/<supply_name>/precharge_current
Date: June 2017
@ -665,3 +681,31 @@ Description:
Valid values:
- 1: enabled
- 0: disabled
What: /sys/class/power_supply/<supply_name>/manufacture_year
Date: January 2020
Contact: linux-pm@vger.kernel.org
Description:
Reports the year (following Gregorian calendar) when the device has been
manufactured.
Access: Read
Valid values: Reported as integer
What: /sys/class/power_supply/<supply_name>/manufacture_month
Date: January 2020
Contact: linux-pm@vger.kernel.org
Description:
Reports the month when the device has been manufactured.
Access: Read
Valid values: 1-12
What: /sys/class/power_supply/<supply_name>/manufacture_day
Date: January 2020
Contact: linux-pm@vger.kernel.org
Description:
Reports the day of month when the device has been manufactured.
Access: Read
Valid values: 1-31

View file

@ -0,0 +1,27 @@
What: /sys/kernel/ion
Date: Dec 2019
KernelVersion: 4.14.158
Contact: Suren Baghdasaryan <surenb@google.com>,
Sandeep Patil <sspatil@google.com>
Description:
The /sys/kernel/ion directory contains a snapshot of the
internal state of ION memory heaps and pools.
Users: kernel memory tuning tools
What: /sys/kernel/ion/total_heaps_kb
Date: Dec 2019
KernelVersion: 4.14.158
Contact: Suren Baghdasaryan <surenb@google.com>,
Sandeep Patil <sspatil@google.com>
Description:
The total_heaps_kb file is read-only and specifies how much
memory in Kb is allocated to ION heaps.
What: /sys/kernel/ion/total_pools_kb
Date: Dec 2019
KernelVersion: 4.14.158
Contact: Suren Baghdasaryan <surenb@google.com>,
Sandeep Patil <sspatil@google.com>
Description:
The total_pools_kb file is read-only and specifies how much
memory in Kb is allocated to ION pools.

View file

@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 5
PATCHLEVEL = 4
SUBLEVEL = 50
SUBLEVEL = 52
EXTRAVERSION =
NAME = Kleptomaniac Octopus

File diff suppressed because it is too large Load diff

View file

@ -12,6 +12,7 @@
bpf_trace_run4
bt_err
bt_info
cancel_delayed_work
cancel_delayed_work_sync
cancel_work_sync
__cfi_slowpath
@ -59,6 +60,7 @@
device_property_read_string
device_property_read_u32_array
device_register
device_release_driver
device_set_wakeup_capable
device_unregister
device_wakeup_enable
@ -155,8 +157,6 @@
gpiod_set_value_cansleep
handle_edge_irq
handle_level_irq
__hci_cmd_sync
hci_recv_frame
hdmi_audio_infoframe_init
hrtimer_init
hrtimer_start_range_ns
@ -463,43 +463,6 @@
spmi_register_write
spmi_register_zero_write
# required by btqca.ko
__hci_cmd_send
__hci_cmd_sync_ev
# required by hci_uart.ko
bit_wait_timeout
hci_alloc_dev
hci_free_dev
hci_recv_diag
hci_register_dev
hci_unregister_dev
jiffies_to_msecs
n_tty_ioctl_helper
out_of_line_wait_on_bit_timeout
__percpu_down_read
percpu_down_write
percpu_free_rwsem
__percpu_init_rwsem
__percpu_up_read
percpu_up_write
serdev_device_close
__serdev_device_driver_register
serdev_device_open
serdev_device_set_baudrate
serdev_device_set_flow_control
serdev_device_set_tiocm
serdev_device_wait_until_sent
serdev_device_write_buf
serdev_device_write_flush
tty_driver_flush_buffer
tty_ldisc_flush
tty_register_ldisc
tty_set_termios
tty_unregister_ldisc
tty_unthrottle
wake_up_bit
# required by clk-scmi.ko
clk_hw_set_rate_range
scmi_driver_register
@ -825,6 +788,7 @@
of_icc_get
of_property_read_string_helper
param_ops_charp
pm_runtime_get_if_in_use
put_pid
put_unused_fd
_raw_read_lock
@ -1049,6 +1013,26 @@
rtc_update_irq
rtc_valid_tm
# required by ufs-qcom.ko
print_hex_dump
ufshcd_dme_get_attr
ufshcd_dme_set_attr
ufshcd_dump_regs
ufshcd_get_local_unipro_ver
ufshcd_get_pwr_dev_param
ufshcd_hold
ufshcd_pltfrm_init
ufshcd_pltfrm_resume
ufshcd_pltfrm_runtime_idle
ufshcd_pltfrm_runtime_resume
ufshcd_pltfrm_runtime_suspend
ufshcd_pltfrm_shutdown
ufshcd_pltfrm_suspend
ufshcd_release
ufshcd_remove
ufshcd_uic_hibern8_enter
ufshcd_uic_hibern8_exit
# required by mdt_loader.ko
request_firmware_into_buf
@ -1139,23 +1123,6 @@
usb_gadget_unmap_request_by_dev
usb_get_maximum_speed
# required by ehci-hcd.ko
device_remove_file
ehci_cf_port_reset_rwsem
hrtimer_cancel
kstrtouint
ktime_get_with_offset
usb_for_each_dev
# required by ehci-pci.ko
pci_clear_mwi
pci_find_capability
usb_amd_hang_symptom_quirk
# required by ehci-platform.ko
device_pm_wait_for_dev
usb_of_get_companion_dev
# required by ohci-hcd.ko
flush_work
gen_pool_dma_alloc_align
@ -1169,7 +1136,6 @@
# required by xhci-hcd.ko
add_timer
cancel_delayed_work
mod_delayed_work_on
__num_online_cpus
param_ops_ullong
@ -1189,7 +1155,6 @@
wait_for_completion
# required by xhci-pci-renesas.ko
device_release_driver
pci_dev_get
pci_write_config_dword
request_firmware_nowait

View file

@ -186,11 +186,6 @@
get_random_bytes
gpiod_set_value_cansleep
gpio_to_desc
hci_alloc_dev
hci_free_dev
hci_recv_frame
hci_register_dev
hci_unregister_dev
hrtimer_cancel
hrtimer_init
hrtimer_start_range_ns
@ -505,40 +500,6 @@
sdio_release_irq
sdio_writeb
# required by hci_uart.ko
baswap
bit_wait_timeout
bt_warn
__hci_cmd_sync
n_tty_ioctl_helper
nvmem_cell_get
nvmem_cell_put
nvmem_cell_read
out_of_line_wait_on_bit_timeout
__percpu_down_read
percpu_down_write
percpu_free_rwsem
__percpu_init_rwsem
__percpu_up_read
percpu_up_write
serdev_device_close
__serdev_device_driver_register
serdev_device_get_tiocm
serdev_device_open
serdev_device_set_baudrate
serdev_device_set_flow_control
serdev_device_set_tiocm
serdev_device_write_buf
serdev_device_write_flush
tty_driver_flush_buffer
tty_ldisc_flush
tty_register_ldisc
tty_set_termios
tty_termios_encode_baud_rate
tty_unregister_ldisc
tty_unthrottle
wake_up_bit
# required by clk-hi655x.ko
devm_clk_hw_register
devm_of_clk_add_hw_provider
@ -1176,21 +1137,6 @@
usb_get_gadget_udc_name
use_mm
# required by ehci-hcd.ko
ehci_cf_port_reset_rwsem
usb_for_each_dev
# required by ehci-pci.ko
pci_clear_mwi
pci_find_capability
pci_read_config_dword
pci_write_config_byte
usb_amd_hang_symptom_quirk
# required by ehci-platform.ko
device_pm_wait_for_dev
usb_of_get_companion_dev
# required by ohci-hcd.ko
gen_pool_dma_alloc_align
gen_pool_dma_zalloc_align
@ -1273,90 +1219,6 @@
typec_unregister_partner
typec_unregister_port
# required by hidp.ko
hid_add_device
hid_allocate_device
hid_destroy_device
hid_ignore
hid_input_report
hid_parse_report
input_allocate_device
input_unregister_device
l2cap_conn_get
l2cap_conn_put
l2cap_is_socket
l2cap_register_user
l2cap_unregister_user
memscan
__module_put_and_exit
sockfd_lookup
sock_no_accept
sock_no_bind
sock_no_connect
sock_no_getname
sock_no_getsockopt
sock_no_listen
sock_no_recvmsg
sock_no_sendmsg
sock_no_setsockopt
sock_no_shutdown
# required by rfcomm.ko
add_wait_queue_exclusive
bt_accept_dequeue
bt_accept_enqueue
bt_accept_unlink
bt_sock_ioctl
bt_sock_poll
bt_sock_reclassify_lock
bt_sock_stream_recvmsg
bt_sock_wait_ready
bt_sock_wait_state
device_move
hci_conn_check_secure
hci_conn_security
hci_conn_switch_role
hci_get_route
hci_register_cb
hci_unregister_cb
kernel_accept
kernel_bind
kernel_connect
kernel_listen
lock_sock_nested
put_tty_driver
_raw_read_lock
_raw_read_unlock
_raw_write_lock
_raw_write_unlock
release_sock
security_sk_clone
sock_alloc_send_skb
sock_create_kern
sock_gettstamp
sock_release
__tty_alloc_driver
tty_flip_buffer_push
tty_insert_flip_string_fixed_flag
tty_kref_put
tty_port_close
tty_port_hangup
tty_port_init
tty_port_install
tty_port_open
tty_port_put
tty_port_register_device
tty_port_tty_get
tty_port_tty_hangup
tty_port_tty_wakeup
tty_register_driver
tty_set_operations
tty_std_termios
tty_unregister_device
tty_unregister_driver
tty_vhangup
tty_wakeup
# required by rfkill-gpio.ko
rfkill_alloc
rfkill_destroy

View file

@ -924,6 +924,7 @@
fwnode_property_read_string
fwnode_property_read_u16_array
fwnode_property_read_u32_array
fwnode_usb_role_switch_get
gcd
generic_delete_inode
generic_device_group
@ -1112,6 +1113,7 @@
input_unregister_device
input_unregister_handle
input_unregister_handler
int_to_scsilun
invalidate_mapping_pages
iomem_resource
iommu_alloc_resv_region
@ -1551,7 +1553,6 @@
of_usb_get_phy_mode
of_usb_host_tpl_support
oops_in_progress
open_exec
override_creds
panic
panic_notifier_list
@ -1957,11 +1958,14 @@
schedule_timeout
schedule_timeout_interruptible
schedule_timeout_uninterruptible
scmd_printk
scnprintf
scsi_add_host_with_dma
scsi_autopm_get_device
scsi_autopm_put_device
scsi_block_requests
scsi_block_when_processing_errors
scsi_change_queue_depth
scsi_command_size_tbl
scsi_device_get
scsi_device_put
@ -1974,6 +1978,7 @@
scsi_ioctl_block_when_processing_errors
scsi_is_host_device
scsi_normalize_sense
scsi_print_command
__scsi_print_sense
scsi_register_interface
scsi_remove_host
@ -1981,6 +1986,7 @@
scsi_report_device_reset
scsi_scan_host
scsi_sense_desc_find
scsi_unblock_requests
sdev_prefix_printk
__sdhci_add_host
sdhci_add_host
@ -2438,12 +2444,14 @@
usb_add_phy_dev
usb_alloc_coherent
usb_alloc_dev
usb_alloc_streams
usb_alloc_urb
usb_amd_dev_put
usb_amd_pt_check_port
usb_amd_quirk_pll_check
usb_amd_quirk_pll_disable
usb_amd_quirk_pll_enable
usb_anchor_urb
usb_asmedia_modifyflowcontrol
usb_assign_descriptors
usb_autopm_get_interface
@ -2482,6 +2490,7 @@
usb_find_common_endpoints
usb_free_all_descriptors
usb_free_coherent
usb_free_streams
usb_free_urb
usb_function_register
usb_function_unregister
@ -2522,6 +2531,7 @@
usb_hub_find_child
usb_ifnum_to_if
usb_interface_id
usb_kill_anchored_urbs
usb_kill_urb
usb_lock_device_for_reset
usb_match_one_id
@ -2537,6 +2547,9 @@
usb_remove_phy
usb_reset_device
usb_reset_endpoint
usb_role_switch_register
usb_role_switch_set_role
usb_role_switch_unregister
usb_root_hub_lost_power
usb_set_device_state
usb_set_interface
@ -2547,8 +2560,10 @@
usb_string
usb_string_id
usb_submit_urb
usb_unanchor_urb
usb_unlink_urb
usb_unregister_notify
usb_wait_anchor_empty_timeout
usb_wakeup_notification
__usecs_to_jiffies
usleep_range
@ -2593,7 +2608,10 @@
v4l2_type_names
vabits_actual
vb2_buffer_done
vb2_common_vm_ops
vb2_create_bufs
vb2_create_framevec
vb2_destroy_framevec
vb2_dqbuf
vb2_expbuf
vb2_fop_mmap
@ -2622,6 +2640,10 @@
vb2_reqbufs
vb2_streamoff
vb2_streamon
vchan_dma_desc_free_list
vchan_init
vchan_tx_desc_free
vchan_tx_submit
vfree
vfs_create2
vfs_fsync

View file

@ -134,6 +134,7 @@
devm_kmemdup
devm_mfd_add_devices
devm_nvmem_register
devm_of_platform_populate
devm_pinctrl_get
devm_pinctrl_put
devm_power_supply_register
@ -307,6 +308,7 @@
jiffies
jiffies_to_msecs
kernel_kobj
kasprintf
kernel_neon_begin
kernel_neon_end
__kfifo_alloc
@ -366,6 +368,12 @@
netif_carrier_on
netif_rx_ni
netif_tx_wake_queue
nf_conntrack_find_get
nf_ct_get_tuplepr
nf_ct_invert_tuple
nf_ct_l4proto_find
nf_register_net_hooks
nf_unregister_net_hooks
nr_cpu_ids
nvmem_cell_get
nvmem_cell_put
@ -378,6 +386,7 @@
of_device_get_match_data
of_device_is_available
of_device_is_compatible
of_dev_put
of_find_compatible_node
of_find_device_by_node
of_find_node_by_name
@ -601,18 +610,21 @@
strncpy
strncpy_from_user
strnlen
strnstr
strstr
__sw_hweight32
__sw_hweight64
sync_filesystem
syscon_regmap_lookup_by_phandle
syscon_regmap_lookup_by_phandle_args
sysfs_create_bin_file
sysfs_create_file_ns
sysfs_create_group
sysfs_create_groups
sysfs_create_link
__sysfs_match_string
sysfs_notify
sysfs_remove_bin_file
sysfs_remove_file_ns
sysfs_remove_group
sysfs_remove_groups
@ -2370,3 +2382,97 @@
# required by trusty-pm.ko
ktime_get_boot_fast_ns
unregister_syscore_ops
# required by incrementalfs.ko
bcmp
bin2hex
__break_lease
clear_inode
__close_fd
crc32_le
d_add
d_drop
deactivate_locked_super
dentry_open
dget_parent
d_instantiate
d_make_root
down_write
dput
fget
flush_dcache_page
fput
free_pages
fs_kobj
fsstack_copy_attr_all
generic_file_llseek
generic_file_mmap
generic_file_read_iter
generic_file_splice_read
generic_read_dir
generic_shutdown_super
get_zeroed_page
iget5_locked
ihold
inode_init_once
inode_init_owner
iput
iterate_dir
kernel_read
kernel_write
kern_path
kobject_create_and_add
kobject_put
lockref_get
lock_rename
lookup_one_len
LZ4_decompress_safe
match_int
match_token
mutex_is_locked
noop_llseek
notify_change
pagecache_get_page
path_get
path_put
__put_cred
__put_page
register_filesystem
set_anon_super
sget
simple_getattr
simple_setattr
simple_statfs
strndup_user
strsep
sync_filesystem
truncate_inode_pages
unlock_new_inode
unlock_page
unlock_rename
unregister_filesystem
up_write
user_path_at_empty
vfs_create
vfs_fallocate
vfs_getattr
vfs_getxattr
vfs_link
vfs_listxattr
vfs_mkdir
vfs_rename
vfs_rmdir
vfs_setxattr
vfs_unlink
# required by ufs-sprd.ko
ufshcd_dme_set_attr
ufshcd_get_local_unipro_ver
ufshcd_pltfrm_init
ufshcd_pltfrm_resume
ufshcd_pltfrm_runtime_idle
ufshcd_pltfrm_runtime_resume
ufshcd_pltfrm_runtime_suspend
ufshcd_pltfrm_shutdown
ufshcd_pltfrm_suspend
ufshcd_remove

View file

@ -19,7 +19,7 @@
#define R_ARC_32_PCREL 0x31
/*to set parameters in the core dumps */
#define ELF_ARCH EM_ARCOMPACT
#define ELF_ARCH EM_ARC_INUSE
#define ELF_CLASS ELFCLASS32
#ifdef CONFIG_CPU_BIG_ENDIAN

View file

@ -153,7 +153,6 @@ END(EV_Extension)
tracesys:
; save EFA in case tracer wants the PC of traced task
; using ERET won't work since next-PC has already committed
lr r12, [efa]
GET_CURR_TASK_FIELD_PTR TASK_THREAD, r11
st r12, [r11, THREAD_FAULT_ADDR] ; thread.fault_address
@ -196,15 +195,9 @@ tracesys_exit:
; Breakpoint TRAP
; ---------------------------------------------
trap_with_param:
; stop_pc info by gdb needs this info
lr r0, [efa]
mov r0, r12 ; EFA in case ptracer/gdb wants stop_pc
mov r1, sp
; Now that we have read EFA, it is safe to do "fake" rtie
; and get out of CPU exception mode
FAKE_RET_FROM_EXCPN
; Save callee regs in case gdb wants to have a look
; SP will grow up by size of CALLEE Reg-File
; NOTE: clobbers r12
@ -231,6 +224,10 @@ ENTRY(EV_Trap)
EXCEPTION_PROLOGUE
lr r12, [efa]
FAKE_RET_FROM_EXCPN
;============ TRAP 1 :breakpoints
; Check ECR for trap with arg (PROLOGUE ensures r10 has ECR)
bmsk.f 0, r10, 7
@ -238,9 +235,6 @@ ENTRY(EV_Trap)
;============ TRAP (no param): syscall top level
; First return from Exception to pure K mode (Exception/IRQs renabled)
FAKE_RET_FROM_EXCPN
; If syscall tracing ongoing, invoke pre-post-hooks
GET_CURR_THR_INFO_FLAGS r10
btst r10, TIF_SYSCALL_TRACE

View file

@ -13,8 +13,10 @@
#interrupt-cells = <2>;
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <3000000>;
spi-max-frequency = <9600000>;
spi-cs-high;
spi-cpol;
spi-cpha;
cpcap_adc: adc {
compatible = "motorola,mapphone-cpcap-adc";

View file

@ -493,14 +493,14 @@ static int __init imx6q_suspend_init(const struct imx6_pm_socdata *socdata)
if (!ocram_pool) {
pr_warn("%s: ocram pool unavailable!\n", __func__);
ret = -ENODEV;
goto put_node;
goto put_device;
}
ocram_base = gen_pool_alloc(ocram_pool, MX6Q_SUSPEND_OCRAM_SIZE);
if (!ocram_base) {
pr_warn("%s: unable to alloc ocram!\n", __func__);
ret = -ENOMEM;
goto put_node;
goto put_device;
}
ocram_pbase = gen_pool_virt_to_phys(ocram_pool, ocram_base);
@ -523,7 +523,7 @@ static int __init imx6q_suspend_init(const struct imx6_pm_socdata *socdata)
ret = imx6_pm_get_base(&pm_info->mmdc_base, socdata->mmdc_compat);
if (ret) {
pr_warn("%s: failed to get mmdc base %d!\n", __func__, ret);
goto put_node;
goto put_device;
}
ret = imx6_pm_get_base(&pm_info->src_base, socdata->src_compat);
@ -570,7 +570,7 @@ static int __init imx6q_suspend_init(const struct imx6_pm_socdata *socdata)
&imx6_suspend,
MX6Q_SUSPEND_OCRAM_SIZE - sizeof(*pm_info));
goto put_node;
goto put_device;
pl310_cache_map_failed:
iounmap(pm_info->gpc_base.vbase);
@ -580,6 +580,8 @@ iomuxc_map_failed:
iounmap(pm_info->src_base.vbase);
src_map_failed:
iounmap(pm_info->mmdc_base.vbase);
put_device:
put_device(&pdev->dev);
put_node:
of_node_put(node);

View file

@ -20,8 +20,6 @@ CONFIG_MFD_SPMI_PMIC=m
CONFIG_SPMI_MSM_PMIC_ARB=m
CONFIG_REGULATOR_QCOM_RPMH=m
CONFIG_REGULATOR_QCOM_SPMI=m
CONFIG_BT_HCIUART=m
CONFIG_BT_HCIUART_QCA=y
CONFIG_DRM_MSM=m
# CONFIG_DRM_MSM_DSI_28NM_PHY is not set
# CONFIG_DRM_MSM_DSI_20NM_PHY is not set

View file

@ -78,6 +78,7 @@ CONFIG_ARM_SCPI_PROTOCOL=y
CONFIG_ARM64_CRYPTO=y
CONFIG_CRYPTO_SHA2_ARM64_CE=y
CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
CONFIG_KPROBES=y
CONFIG_JUMP_LABEL=y
CONFIG_SHADOW_CALL_STACK=y
CONFIG_LTO_CLANG=y
@ -206,6 +207,13 @@ CONFIG_NET_EMATCH_U32=y
CONFIG_NET_CLS_ACT=y
CONFIG_BPF_JIT=y
CONFIG_BT=y
CONFIG_BT_RFCOMM=y
CONFIG_BT_RFCOMM_TTY=y
CONFIG_BT_HIDP=y
CONFIG_BT_HCIBTSDIO=y
CONFIG_BT_HCIUART=y
CONFIG_BT_HCIUART_LL=y
CONFIG_BT_HCIUART_QCA=y
CONFIG_CFG80211=y
# CONFIG_CFG80211_DEFAULT_PS is not set
# CONFIG_CFG80211_CRDA_SUPPORT is not set
@ -289,6 +297,7 @@ CONFIG_KEYBOARD_GPIO=y
# CONFIG_INPUT_MOUSE is not set
CONFIG_INPUT_JOYSTICK=y
CONFIG_JOYSTICK_XPAD=y
CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_INPUT_MISC=y
CONFIG_INPUT_UINPUT=y
# CONFIG_VT is not set
@ -331,6 +340,7 @@ CONFIG_REGULATOR=y
CONFIG_REGULATOR_FIXED_VOLTAGE=y
CONFIG_MEDIA_CAMERA_SUPPORT=y
CONFIG_MEDIA_CONTROLLER=y
CONFIG_V4L_PLATFORM_DRIVERS=y
# CONFIG_VGA_ARB is not set
CONFIG_DRM=y
# CONFIG_DRM_FBDEV_EMULATION is not set
@ -366,6 +376,10 @@ CONFIG_HID_WACOM=y
CONFIG_HID_WIIMOTE=y
CONFIG_USB_HIDDEV=y
CONFIG_USB_OTG=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_HCD_PLATFORM=y
CONFIG_USB_STORAGE=y
CONFIG_USB_UAS=y
CONFIG_USB_GADGET=y
CONFIG_USB_DUMMY_HCD=y
CONFIG_USB_CONFIGFS=y
@ -380,6 +394,7 @@ CONFIG_USB_CONFIGFS_F_AUDIO_SRC=y
CONFIG_USB_CONFIGFS_F_MIDI=y
CONFIG_USB_CONFIGFS_F_HID=y
CONFIG_TYPEC=y
CONFIG_TYPEC_TCPM=y
CONFIG_MMC=y
# CONFIG_PWRSEQ_EMMC is not set
# CONFIG_PWRSEQ_SIMPLE is not set
@ -419,6 +434,7 @@ CONFIG_RAS=y
CONFIG_ANDROID=y
CONFIG_ANDROID_BINDER_IPC=y
CONFIG_ANDROID_BINDERFS=y
CONFIG_ANDROID_VENDOR_HOOKS=y
CONFIG_LIBNVDIMM=y
# CONFIG_ND_BLK is not set
CONFIG_INTERCONNECT=y
@ -501,6 +517,7 @@ CONFIG_HARDENED_USERCOPY=y
# CONFIG_HARDENED_USERCOPY_FALLBACK is not set
CONFIG_FORTIFY_SOURCE=y
CONFIG_STATIC_USERMODEHELPER=y
CONFIG_STATIC_USERMODEHELPER_PATH=""
CONFIG_SECURITY_SELINUX=y
CONFIG_INIT_STACK_ALL=y
CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y

View file

@ -1,10 +1,4 @@
CONFIG_CPUFREQ_DT=m
CONFIG_BT_RFCOMM=m
CONFIG_BT_RFCOMM_TTY=y
CONFIG_BT_HIDP=m
CONFIG_BT_HCIBTSDIO=m
CONFIG_BT_HCIUART=m
CONFIG_BT_HCIUART_LL=y
CONFIG_RFKILL_GPIO=m
CONFIG_CONNECTOR=m
CONFIG_BLK_DEV_NVME=m

View file

@ -1,7 +1,7 @@
CONFIG_ARCH_QCOM=y
CONFIG_ARCH_HOLI=y
CONFIG_TRIM_UNUSED_KSYMS=y
CONFIG_UNUSED_KSYMS_WHITELIST="abi_gki_aarch64_qcom_whitelist abi_gki_aarch64_qcom_internal_whitelist"
CONFIG_UNUSED_KSYMS_WHITELIST="android/abi_gki_aarch64_qcom android/abi_gki_aarch64_qcom_internal"
CONFIG_UNUSED_KSYMS_WHITELIST_ONLY=y
CONFIG_PINCTRL_HOLI=m
CONFIG_HVC_DCC=y

View file

@ -2,7 +2,7 @@ CONFIG_ARCH_QCOM=y
CONFIG_ARCH_LAHAINA=y
CONFIG_ARCH_SHIMA=y
CONFIG_TRIM_UNUSED_KSYMS=y
CONFIG_UNUSED_KSYMS_WHITELIST="abi_gki_aarch64_qcom_whitelist abi_gki_aarch64_qcom_internal_whitelist"
CONFIG_UNUSED_KSYMS_WHITELIST="android/abi_gki_aarch64_qcom android/abi_gki_aarch64_qcom_internal"
CONFIG_UNUSED_KSYMS_WHITELIST_ONLY=y
CONFIG_REGULATOR_STUB=m
CONFIG_REGULATOR_PROXY_CONSUMER=m

View file

@ -109,7 +109,7 @@ static inline u32 gic_read_pmr(void)
return read_sysreg_s(SYS_ICC_PMR_EL1);
}
static inline void gic_write_pmr(u32 val)
static __always_inline void gic_write_pmr(u32 val)
{
write_sysreg_s(val, SYS_ICC_PMR_EL1);
}

View file

@ -601,7 +601,7 @@ static inline bool system_supports_generic_auth(void)
cpus_have_const_cap(ARM64_HAS_GENERIC_AUTH_IMP_DEF));
}
static inline bool system_uses_irq_prio_masking(void)
static __always_inline bool system_uses_irq_prio_masking(void)
{
return IS_ENABLED(CONFIG_ARM64_PSEUDO_NMI) &&
cpus_have_const_cap(ARM64_HAS_IRQ_PRIO_MASKING);

View file

@ -54,7 +54,7 @@
#define PAGE_HYP __pgprot(_HYP_PAGE_DEFAULT | PTE_HYP | PTE_HYP_XN)
#define PAGE_HYP_EXEC __pgprot(_HYP_PAGE_DEFAULT | PTE_HYP | PTE_RDONLY)
#define PAGE_HYP_RO __pgprot(_HYP_PAGE_DEFAULT | PTE_HYP | PTE_RDONLY | PTE_HYP_XN)
#define PAGE_HYP_DEVICE __pgprot(PROT_DEVICE_nGnRE | PTE_HYP)
#define PAGE_HYP_DEVICE __pgprot(_PROT_DEFAULT | PTE_ATTRINDX(MT_DEVICE_nGnRE) | PTE_HYP | PTE_HYP_XN)
#define PAGE_S2_MEMATTR(attr) \
({ \

View file

@ -252,7 +252,7 @@ static int kgdb_step_brk_fn(struct pt_regs *regs, unsigned int esr)
if (!kgdb_single_step)
return DBG_HOOK_ERROR;
kgdb_handle_exception(1, SIGTRAP, 0, regs);
kgdb_handle_exception(0, SIGTRAP, 0, regs);
return DBG_HOOK_HANDLED;
}
NOKPROBE_SYMBOL(kgdb_step_brk_fn);

View file

@ -136,11 +136,15 @@ ENTRY(__kvm_handle_stub_hvc)
1: cmp x0, #HVC_RESET_VECTORS
b.ne 1f
reset:
/*
* Reset kvm back to the hyp stub. Do not clobber x0-x4 in
* case we coming via HVC_SOFT_RESTART.
* Set the HVC_RESET_VECTORS return code before entering the common
* path so that we do not clobber x0-x2 in case we are coming via
* HVC_SOFT_RESTART.
*/
mov x0, xzr
reset:
/* Reset kvm back to the hyp stub. */
mrs x5, sctlr_el2
ldr x6, =SCTLR_ELx_FLAGS
bic x5, x5, x6 // Clear SCTL_M and etc
@ -151,7 +155,6 @@ reset:
/* Install stub vectors */
adr_l x5, __hyp_stub_vectors
msr vbar_el2, x5
mov x0, xzr
eret
1: /* Bad stub call */

View file

@ -258,7 +258,7 @@ static int kvm_vcpu_enable_ptrauth(struct kvm_vcpu *vcpu)
int kvm_reset_vcpu(struct kvm_vcpu *vcpu)
{
const struct kvm_regs *cpu_reset;
int ret = -EINVAL;
int ret;
bool loaded;
/* Reset PMU outside of the non-preemptible section */
@ -281,15 +281,19 @@ int kvm_reset_vcpu(struct kvm_vcpu *vcpu)
if (test_bit(KVM_ARM_VCPU_PTRAUTH_ADDRESS, vcpu->arch.features) ||
test_bit(KVM_ARM_VCPU_PTRAUTH_GENERIC, vcpu->arch.features)) {
if (kvm_vcpu_enable_ptrauth(vcpu))
if (kvm_vcpu_enable_ptrauth(vcpu)) {
ret = -EINVAL;
goto out;
}
}
switch (vcpu->arch.target) {
default:
if (test_bit(KVM_ARM_VCPU_EL1_32BIT, vcpu->arch.features)) {
if (!cpu_has_32bit_el1())
if (!cpu_has_32bit_el1()) {
ret = -EINVAL;
goto out;
}
cpu_reset = &default_regs_reset32;
} else {
cpu_reset = &default_regs_reset;

View file

@ -2126,6 +2126,7 @@ static void configure_status(void)
change_c0_status(ST0_CU|ST0_MX|ST0_RE|ST0_FR|ST0_BEV|ST0_TS|ST0_KX|ST0_SX|ST0_UX,
status_set);
back_to_back_c0_hazard();
}
unsigned int hwrena;

View file

@ -514,8 +514,8 @@ void __init ltq_soc_init(void)
clkdev_add_pmu("1e10b308.eth", NULL, 0, 0, PMU_SWITCH |
PMU_PPE_DP | PMU_PPE_TC);
clkdev_add_pmu("1da00000.usif", "NULL", 1, 0, PMU_USIF);
clkdev_add_pmu("1e108000.gswip", "gphy0", 0, 0, PMU_GPHY);
clkdev_add_pmu("1e108000.gswip", "gphy1", 0, 0, PMU_GPHY);
clkdev_add_pmu("1e108000.switch", "gphy0", 0, 0, PMU_GPHY);
clkdev_add_pmu("1e108000.switch", "gphy1", 0, 0, PMU_GPHY);
clkdev_add_pmu("1e103100.deu", NULL, 1, 0, PMU_DEU);
clkdev_add_pmu("1e116000.mei", "afe", 1, 2, PMU_ANALOG_DSL_AFE);
clkdev_add_pmu("1e116000.mei", "dfe", 1, 0, PMU_DFE);
@ -538,8 +538,8 @@ void __init ltq_soc_init(void)
PMU_SWITCH | PMU_PPE_DPLUS | PMU_PPE_DPLUM |
PMU_PPE_EMA | PMU_PPE_TC | PMU_PPE_SLL01 |
PMU_PPE_QSB | PMU_PPE_TOP);
clkdev_add_pmu("1e108000.gswip", "gphy0", 0, 0, PMU_GPHY);
clkdev_add_pmu("1e108000.gswip", "gphy1", 0, 0, PMU_GPHY);
clkdev_add_pmu("1e108000.switch", "gphy0", 0, 0, PMU_GPHY);
clkdev_add_pmu("1e108000.switch", "gphy1", 0, 0, PMU_GPHY);
clkdev_add_pmu("1e103000.sdio", NULL, 1, 0, PMU_SDIO);
clkdev_add_pmu("1e103100.deu", NULL, 1, 0, PMU_DEU);
clkdev_add_pmu("1e116000.mei", "dfe", 1, 0, PMU_DFE);

View file

@ -38,7 +38,8 @@ unsigned long __kvmhv_copy_tofrom_guest_radix(int lpid, int pid,
/* Can't access quadrants 1 or 2 in non-HV mode, call the HV to do it */
if (kvmhv_on_pseries())
return plpar_hcall_norets(H_COPY_TOFROM_GUEST, lpid, pid, eaddr,
__pa(to), __pa(from), n);
(to != NULL) ? __pa(to): 0,
(from != NULL) ? __pa(from): 0, n);
quadrant = 1;
if (!pid)

View file

@ -31,12 +31,12 @@
#define KVM_USER_MEM_SLOTS 32
/*
* These seem to be used for allocating ->chip in the routing table,
* which we don't use. 4096 is an out-of-thin-air value. If we need
* to look at ->chip later on, we'll need to revisit this.
* These seem to be used for allocating ->chip in the routing table, which we
* don't use. 1 is as small as we can get to reduce the needed memory. If we
* need to look at ->chip later on, we'll need to revisit this.
*/
#define KVM_NR_IRQCHIPS 1
#define KVM_IRQCHIP_NUM_PINS 4096
#define KVM_IRQCHIP_NUM_PINS 1
#define KVM_HALT_POLL_NS_DEFAULT 50000
/* s390-specific vcpu->requests bit members */

View file

@ -276,6 +276,6 @@ static inline unsigned long __must_check clear_user(void __user *to, unsigned lo
}
int copy_to_user_real(void __user *dest, void *src, unsigned long count);
void s390_kernel_write(void *dst, const void *src, size_t size);
void *s390_kernel_write(void *dst, const void *src, size_t size);
#endif /* __S390_UACCESS_H */

View file

@ -198,9 +198,10 @@ static debug_entry_t ***debug_areas_alloc(int pages_per_area, int nr_areas)
if (!areas)
goto fail_malloc_areas;
for (i = 0; i < nr_areas; i++) {
/* GFP_NOWARN to avoid user triggerable WARN, we handle fails */
areas[i] = kmalloc_array(pages_per_area,
sizeof(debug_entry_t *),
GFP_KERNEL);
GFP_KERNEL | __GFP_NOWARN);
if (!areas[i])
goto fail_malloc_areas2;
for (j = 0; j < pages_per_area; j++) {

View file

@ -169,6 +169,8 @@ static noinline __init void setup_lowcore_early(void)
psw_t psw;
psw.mask = PSW_MASK_BASE | PSW_DEFAULT_KEY | PSW_MASK_EA | PSW_MASK_BA;
if (IS_ENABLED(CONFIG_KASAN))
psw.mask |= PSW_MASK_DAT;
psw.addr = (unsigned long) s390_base_ext_handler;
S390_lowcore.external_new_psw = psw;
psw.addr = (unsigned long) s390_base_pgm_handler;

View file

@ -1120,6 +1120,7 @@ void __init setup_arch(char **cmdline_p)
if (IS_ENABLED(CONFIG_EXPOLINE_AUTO))
nospec_auto_detect();
jump_label_init();
parse_early_param();
#ifdef CONFIG_CRASH_DUMP
/* Deactivate elfcorehdr= kernel parameter */

View file

@ -117,7 +117,7 @@ static inline pte_t __rste_to_pte(unsigned long rste)
_PAGE_YOUNG);
#ifdef CONFIG_MEM_SOFT_DIRTY
pte_val(pte) |= move_set_bit(rste, _SEGMENT_ENTRY_SOFT_DIRTY,
_PAGE_DIRTY);
_PAGE_SOFT_DIRTY);
#endif
pte_val(pte) |= move_set_bit(rste, _SEGMENT_ENTRY_NOEXEC,
_PAGE_NOEXEC);

View file

@ -55,19 +55,26 @@ static notrace long s390_kernel_write_odd(void *dst, const void *src, size_t siz
*/
static DEFINE_SPINLOCK(s390_kernel_write_lock);
void notrace s390_kernel_write(void *dst, const void *src, size_t size)
notrace void *s390_kernel_write(void *dst, const void *src, size_t size)
{
void *tmp = dst;
unsigned long flags;
long copied;
spin_lock_irqsave(&s390_kernel_write_lock, flags);
while (size) {
copied = s390_kernel_write_odd(dst, src, size);
dst += copied;
src += copied;
size -= copied;
if (!(flags & PSW_MASK_DAT)) {
memcpy(dst, src, size);
} else {
while (size) {
copied = s390_kernel_write_odd(tmp, src, size);
tmp += copied;
src += copied;
size -= copied;
}
}
spin_unlock_irqrestore(&s390_kernel_write_lock, flags);
return dst;
}
static int __no_sanitize_address __memcpy_real(void *dest, void *src, size_t count)

View file

@ -56,6 +56,7 @@ CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
CONFIG_IA32_EMULATION=y
CONFIG_KPROBES=y
CONFIG_JUMP_LABEL=y
CONFIG_LTO_CLANG=y
CONFIG_CFI_CLANG=y
@ -181,6 +182,14 @@ CONFIG_NET_EMATCH=y
CONFIG_NET_EMATCH_U32=y
CONFIG_NET_CLS_ACT=y
CONFIG_BPF_JIT=y
CONFIG_BT=y
CONFIG_BT_RFCOMM=y
CONFIG_BT_RFCOMM_TTY=y
CONFIG_BT_HIDP=y
CONFIG_BT_HCIBTSDIO=y
CONFIG_BT_HCIUART=y
CONFIG_BT_HCIUART_LL=y
CONFIG_BT_HCIUART_QCA=y
CONFIG_CFG80211=y
# CONFIG_CFG80211_DEFAULT_PS is not set
# CONFIG_CFG80211_CRDA_SUPPORT is not set
@ -262,6 +271,7 @@ CONFIG_KEYBOARD_GPIO=y
# CONFIG_INPUT_MOUSE is not set
CONFIG_INPUT_JOYSTICK=y
CONFIG_JOYSTICK_XPAD=y
CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_INPUT_MISC=y
CONFIG_INPUT_UINPUT=y
# CONFIG_VT is not set
@ -289,6 +299,7 @@ CONFIG_MFD_SYSCON=y
CONFIG_REGULATOR=y
CONFIG_REGULATOR_FIXED_VOLTAGE=y
CONFIG_MEDIA_CAMERA_SUPPORT=y
CONFIG_V4L_PLATFORM_DRIVERS=y
CONFIG_DRM=y
# CONFIG_DRM_FBDEV_EMULATION is not set
CONFIG_BACKLIGHT_CLASS_DEVICE=y
@ -322,6 +333,10 @@ CONFIG_HID_STEAM=y
CONFIG_HID_WACOM=y
CONFIG_HID_WIIMOTE=y
CONFIG_USB_HIDDEV=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_HCD_PLATFORM=y
CONFIG_USB_STORAGE=y
CONFIG_USB_UAS=y
CONFIG_USB_GADGET=y
CONFIG_USB_DUMMY_HCD=y
CONFIG_USB_CONFIGFS=y
@ -357,6 +372,7 @@ CONFIG_RAS=y
CONFIG_ANDROID=y
CONFIG_ANDROID_BINDER_IPC=y
CONFIG_ANDROID_BINDERFS=y
CONFIG_ANDROID_VENDOR_HOOKS=y
CONFIG_LIBNVDIMM=y
# CONFIG_ND_BLK is not set
CONFIG_INTERCONNECT=y
@ -440,6 +456,7 @@ CONFIG_HARDENED_USERCOPY=y
# CONFIG_HARDENED_USERCOPY_FALLBACK is not set
CONFIG_FORTIFY_SOURCE=y
CONFIG_STATIC_USERMODEHELPER=y
CONFIG_STATIC_USERMODEHELPER_PATH=""
CONFIG_SECURITY_SELINUX=y
CONFIG_INIT_STACK_ALL=y
CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y

View file

@ -10,11 +10,11 @@ config PERF_EVENTS_INTEL_UNCORE
available on NehalemEX and more modern processors.
config PERF_EVENTS_INTEL_RAPL
tristate "Intel rapl performance events"
depends on PERF_EVENTS && CPU_SUP_INTEL && PCI
tristate "Intel/AMD rapl performance events"
depends on PERF_EVENTS && (CPU_SUP_INTEL || CPU_SUP_AMD) && PCI
default y
---help---
Include support for Intel rapl performance events for power
Include support for Intel and AMD rapl performance events for power
monitoring on modern processors.
config PERF_EVENTS_INTEL_CSTATE

View file

@ -1,5 +1,6 @@
# SPDX-License-Identifier: GPL-2.0-only
obj-y += core.o probe.o
obj-$(CONFIG_PERF_EVENTS_INTEL_RAPL) += rapl.o
obj-y += amd/
obj-$(CONFIG_X86_LOCAL_APIC) += msr.o
obj-$(CONFIG_CPU_SUP_INTEL) += intel/

View file

@ -2,8 +2,6 @@
obj-$(CONFIG_CPU_SUP_INTEL) += core.o bts.o
obj-$(CONFIG_CPU_SUP_INTEL) += ds.o knc.o
obj-$(CONFIG_CPU_SUP_INTEL) += lbr.o p4.o p6.o pt.o
obj-$(CONFIG_PERF_EVENTS_INTEL_RAPL) += intel-rapl-perf.o
intel-rapl-perf-objs := rapl.o
obj-$(CONFIG_PERF_EVENTS_INTEL_UNCORE) += intel-uncore.o
intel-uncore-objs := uncore.o uncore_nhmex.o uncore_snb.o uncore_snbep.o
obj-$(CONFIG_PERF_EVENTS_INTEL_CSTATE) += intel-cstate.o

View file

@ -1,11 +1,14 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Support Intel RAPL energy consumption counters
* Support Intel/AMD RAPL energy consumption counters
* Copyright (C) 2013 Google, Inc., Stephane Eranian
*
* Intel RAPL interface is specified in the IA-32 Manual Vol3b
* section 14.7.1 (September 2013)
*
* AMD RAPL interface for Fam17h is described in the public PPR:
* https://bugzilla.kernel.org/show_bug.cgi?id=206537
*
* RAPL provides more controls than just reporting energy consumption
* however here we only expose the 3 energy consumption free running
* counters (pp0, pkg, dram).
@ -58,8 +61,8 @@
#include <linux/nospec.h>
#include <asm/cpu_device_id.h>
#include <asm/intel-family.h>
#include "../perf_event.h"
#include "../probe.h"
#include "perf_event.h"
#include "probe.h"
MODULE_LICENSE("GPL");

View file

@ -335,7 +335,7 @@ struct x86_hw_tss {
#define INVALID_IO_BITMAP_OFFSET 0x8000
struct entry_stack {
unsigned long words[64];
char stack[PAGE_SIZE];
};
struct entry_stack_page {

View file

@ -260,6 +260,7 @@ static bool __get_mem_config_intel(struct rdt_resource *r)
r->num_closid = edx.split.cos_max + 1;
r->membw.max_delay = eax.split.max_delay + 1;
r->default_ctrl = MAX_MBA_BW;
r->membw.mbm_width = MBM_CNTR_WIDTH;
if (ecx & MBA_IS_LINEAR) {
r->membw.delay_linear = true;
r->membw.min_bw = MAX_MBA_BW - r->membw.max_delay;
@ -289,6 +290,7 @@ static bool __rdt_get_mem_config_amd(struct rdt_resource *r)
/* AMD does not use delay */
r->membw.delay_linear = false;
r->membw.mbm_width = MBM_CNTR_WIDTH_AMD;
r->membw.min_bw = 0;
r->membw.bw_gran = 1;
/* Max value is 2048, Data width should be 4 in decimal */

View file

@ -32,6 +32,7 @@
#define CQM_LIMBOCHECK_INTERVAL 1000
#define MBM_CNTR_WIDTH 24
#define MBM_CNTR_WIDTH_AMD 44
#define MBM_OVERFLOW_INTERVAL 1000
#define MAX_MBA_BW 100u
#define MBA_IS_LINEAR 0x4
@ -368,6 +369,7 @@ struct rdt_cache {
* @min_bw: Minimum memory bandwidth percentage user can request
* @bw_gran: Granularity at which the memory bandwidth is allocated
* @delay_linear: True if memory B/W delay is in linear scale
* @mbm_width: memory B/W monitor counter width
* @mba_sc: True if MBA software controller(mba_sc) is enabled
* @mb_map: Mapping of memory B/W percentage to memory B/W delay
*/
@ -376,6 +378,7 @@ struct rdt_membw {
u32 min_bw;
u32 bw_gran;
u32 delay_linear;
u32 mbm_width;
bool mba_sc;
u32 *mb_map;
};

View file

@ -216,8 +216,9 @@ void free_rmid(u32 rmid)
static u64 mbm_overflow_count(u64 prev_msr, u64 cur_msr)
{
u64 shift = 64 - MBM_CNTR_WIDTH, chunks;
u64 shift, chunks;
shift = 64 - rdt_resources_all[RDT_RESOURCE_MBA].membw.mbm_width;
chunks = (cur_msr << shift) - (prev_msr << shift);
return chunks >>= shift;
}

View file

@ -7,7 +7,7 @@
#define KVM_POSSIBLE_CR0_GUEST_BITS X86_CR0_TS
#define KVM_POSSIBLE_CR4_GUEST_BITS \
(X86_CR4_PVI | X86_CR4_DE | X86_CR4_PCE | X86_CR4_OSFXSR \
| X86_CR4_OSXMMEXCPT | X86_CR4_LA57 | X86_CR4_PGE)
| X86_CR4_OSXMMEXCPT | X86_CR4_LA57 | X86_CR4_PGE | X86_CR4_TSD)
#define BUILD_KVM_GPR_ACCESSORS(lname, uname) \
static __always_inline unsigned long kvm_##lname##_read(struct kvm_vcpu *vcpu)\

View file

@ -4580,7 +4580,7 @@ __reset_rsvds_bits_mask(struct kvm_vcpu *vcpu,
nonleaf_bit8_rsvd | rsvd_bits(7, 7) |
rsvd_bits(maxphyaddr, 51);
rsvd_check->rsvd_bits_mask[0][2] = exb_bit_rsvd |
nonleaf_bit8_rsvd | gbpages_bit_rsvd |
gbpages_bit_rsvd |
rsvd_bits(maxphyaddr, 51);
rsvd_check->rsvd_bits_mask[0][1] = exb_bit_rsvd |
rsvd_bits(maxphyaddr, 51);

View file

@ -3913,6 +3913,8 @@ void vmx_set_constant_host_state(struct vcpu_vmx *vmx)
void set_cr4_guest_host_mask(struct vcpu_vmx *vmx)
{
BUILD_BUG_ON(KVM_CR4_GUEST_OWNED_BITS & ~KVM_POSSIBLE_CR4_GUEST_BITS);
vmx->vcpu.arch.cr4_guest_owned_bits = KVM_CR4_GUEST_OWNED_BITS;
if (enable_ept)
vmx->vcpu.arch.cr4_guest_owned_bits |= X86_CR4_PGE;

View file

@ -980,6 +980,8 @@ int kvm_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4)
if (is_long_mode(vcpu)) {
if (!(cr4 & X86_CR4_PAE))
return 1;
if ((cr4 ^ old_cr4) & X86_CR4_LA57)
return 1;
} else if (is_paging(vcpu) && (cr4 & X86_CR4_PAE)
&& ((cr4 ^ old_cr4) & pdptr_bits)
&& !load_pdptrs(vcpu, vcpu->arch.walk_mmu,

View file

@ -24,6 +24,18 @@ void blk_flush_integrity(void)
flush_workqueue(kintegrityd_wq);
}
void __bio_integrity_free(struct bio_set *bs, struct bio_integrity_payload *bip)
{
if (bs && mempool_initialized(&bs->bio_integrity_pool)) {
if (bip->bip_vec)
bvec_free(&bs->bvec_integrity_pool, bip->bip_vec,
bip->bip_slab);
mempool_free(bip, &bs->bio_integrity_pool);
} else {
kfree(bip);
}
}
/**
* bio_integrity_alloc - Allocate integrity payload and attach it to bio
* @bio: bio to attach integrity metadata to
@ -75,7 +87,7 @@ struct bio_integrity_payload *bio_integrity_alloc(struct bio *bio,
return bip;
err:
mempool_free(bip, &bs->bio_integrity_pool);
__bio_integrity_free(bs, bip);
return ERR_PTR(-ENOMEM);
}
EXPORT_SYMBOL(bio_integrity_alloc);
@ -96,14 +108,7 @@ void bio_integrity_free(struct bio *bio)
kfree(page_address(bip->bip_vec->bv_page) +
bip->bip_vec->bv_offset);
if (bs && mempool_initialized(&bs->bio_integrity_pool)) {
bvec_free(&bs->bvec_integrity_pool, bip->bip_vec, bip->bip_slab);
mempool_free(bip, &bs->bio_integrity_pool);
} else {
kfree(bip);
}
__bio_integrity_free(bs, bip);
bio->bi_integrity = NULL;
bio->bi_opf &= ~REQ_INTEGRITY;
}

View file

@ -829,10 +829,10 @@ static bool blk_mq_rq_inflight(struct blk_mq_hw_ctx *hctx, struct request *rq,
void *priv, bool reserved)
{
/*
* If we find a request that is inflight and the queue matches,
* If we find a request that isn't idle and the queue matches,
* we know the queue is busy. Return false to stop the iteration.
*/
if (rq->state == MQ_RQ_IN_FLIGHT && rq->q == hctx->queue) {
if (blk_mq_request_started(rq) && rq->q == hctx->queue) {
bool *busy = priv;
*busy = true;

View file

@ -1,4 +1,4 @@
BRANCH=android-5.4-stable
BRANCH=android11-5.4
KERNEL_DIR=common
CC=clang

View file

@ -2,17 +2,17 @@
. ${ROOT_DIR}/common/build.config.aarch64
. ${ROOT_DIR}/common/build.config.gki
ABI_DEFINITION=abi_gki_aarch64.xml
KMI_WHITELIST=abi_gki_aarch64_whitelist
ABI_DEFINITION=android/abi_gki_aarch64.xml
KMI_WHITELIST=android/abi_gki_aarch64
ADDITIONAL_KMI_WHITELISTS="
abi_gki_aarch64_cuttlefish_whitelist
abi_gki_aarch64_db845c_whitelist
abi_gki_aarch64_exynos_whitelist
abi_gki_aarch64_goldfish_whitelist
abi_gki_aarch64_hikey960_whitelist
abi_gki_aarch64_qcom_whitelist
abi_gki_aarch64_sunxi_whitelist
abi_gki_aarch64_unisoc_whitelist
android/abi_gki_aarch64_cuttlefish
android/abi_gki_aarch64_db845c
android/abi_gki_aarch64_exynos
android/abi_gki_aarch64_goldfish
android/abi_gki_aarch64_hikey960
android/abi_gki_aarch64_qcom
android/abi_gki_aarch64_sunxi
android/abi_gki_aarch64_unisoc
"
TRIM_NONLISTED_KMI=1
KMI_WHITELIST_STRICT_MODE=1

View file

@ -128,21 +128,15 @@ EXPORT_SYMBOL_GPL(af_alg_release);
void af_alg_release_parent(struct sock *sk)
{
struct alg_sock *ask = alg_sk(sk);
unsigned int nokey = ask->nokey_refcnt;
bool last = nokey && !ask->refcnt;
unsigned int nokey = atomic_read(&ask->nokey_refcnt);
sk = ask->parent;
ask = alg_sk(sk);
local_bh_disable();
bh_lock_sock(sk);
ask->nokey_refcnt -= nokey;
if (!last)
last = !--ask->refcnt;
bh_unlock_sock(sk);
local_bh_enable();
if (nokey)
atomic_dec(&ask->nokey_refcnt);
if (last)
if (atomic_dec_and_test(&ask->refcnt))
sock_put(sk);
}
EXPORT_SYMBOL_GPL(af_alg_release_parent);
@ -187,7 +181,7 @@ static int alg_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
err = -EBUSY;
lock_sock(sk);
if (ask->refcnt | ask->nokey_refcnt)
if (atomic_read(&ask->refcnt))
goto unlock;
swap(ask->type, type);
@ -236,7 +230,7 @@ static int alg_setsockopt(struct socket *sock, int level, int optname,
int err = -EBUSY;
lock_sock(sk);
if (ask->refcnt)
if (atomic_read(&ask->refcnt) != atomic_read(&ask->nokey_refcnt))
goto unlock;
type = ask->type;
@ -301,12 +295,14 @@ int af_alg_accept(struct sock *sk, struct socket *newsock, bool kern)
if (err)
goto unlock;
if (nokey || !ask->refcnt++)
if (atomic_inc_return_relaxed(&ask->refcnt) == 1)
sock_hold(sk);
ask->nokey_refcnt += nokey;
if (nokey) {
atomic_inc(&ask->nokey_refcnt);
atomic_set(&alg_sk(sk2)->nokey_refcnt, 1);
}
alg_sk(sk2)->parent = sk;
alg_sk(sk2)->type = type;
alg_sk(sk2)->nokey_refcnt = nokey;
newsock->ops = type->ops;
newsock->state = SS_CONNECTED;

View file

@ -384,7 +384,7 @@ static int aead_check_key(struct socket *sock)
struct alg_sock *ask = alg_sk(sk);
lock_sock(sk);
if (ask->refcnt)
if (!atomic_read(&ask->nokey_refcnt))
goto unlock_child;
psk = ask->parent;
@ -396,11 +396,8 @@ static int aead_check_key(struct socket *sock)
if (crypto_aead_get_flags(tfm->aead) & CRYPTO_TFM_NEED_KEY)
goto unlock;
if (!pask->refcnt++)
sock_hold(psk);
ask->refcnt = 1;
sock_put(psk);
atomic_dec(&pask->nokey_refcnt);
atomic_set(&ask->nokey_refcnt, 0);
err = 0;

View file

@ -301,7 +301,7 @@ static int hash_check_key(struct socket *sock)
struct alg_sock *ask = alg_sk(sk);
lock_sock(sk);
if (ask->refcnt)
if (!atomic_read(&ask->nokey_refcnt))
goto unlock_child;
psk = ask->parent;
@ -313,11 +313,8 @@ static int hash_check_key(struct socket *sock)
if (crypto_ahash_get_flags(tfm) & CRYPTO_TFM_NEED_KEY)
goto unlock;
if (!pask->refcnt++)
sock_hold(psk);
ask->refcnt = 1;
sock_put(psk);
atomic_dec(&pask->nokey_refcnt);
atomic_set(&ask->nokey_refcnt, 0);
err = 0;

View file

@ -211,7 +211,7 @@ static int skcipher_check_key(struct socket *sock)
struct alg_sock *ask = alg_sk(sk);
lock_sock(sk);
if (ask->refcnt)
if (!atomic_read(&ask->nokey_refcnt))
goto unlock_child;
psk = ask->parent;
@ -223,11 +223,8 @@ static int skcipher_check_key(struct socket *sock)
if (crypto_skcipher_get_flags(tfm) & CRYPTO_TFM_NEED_KEY)
goto unlock;
if (!pask->refcnt++)
sock_hold(psk);
ask->refcnt = 1;
sock_put(psk);
atomic_dec(&pask->nokey_refcnt);
atomic_set(&ask->nokey_refcnt, 0);
err = 0;

View file

@ -54,6 +54,15 @@ config ANDROID_BINDER_IPC_SELFTEST
exhaustively with combinations of various buffer sizes and
alignments.
config ANDROID_VENDOR_HOOKS
bool "Android Vendor Hooks"
depends on TRACEPOINTS
---help---
Enable vendor hooks implemented as tracepoints
Allow vendor modules to attach to tracepoint "hooks" defined via
DECLARE_HOOK or DECLARE_RESTRICTED_HOOK.
endif # if ANDROID
endmenu

View file

@ -4,3 +4,4 @@ ccflags-y += -I$(src) # needed for trace events
obj-$(CONFIG_ANDROID_BINDERFS) += binderfs.o
obj-$(CONFIG_ANDROID_BINDER_IPC) += binder.o binder_alloc.o
obj-$(CONFIG_ANDROID_BINDER_IPC_SELFTEST) += binder_alloc_selftest.o
obj-$(CONFIG_ANDROID_VENDOR_HOOKS) += vendor_hooks.o

View file

@ -0,0 +1,16 @@
// SPDX-License-Identifier: GPL-2.0-only
/* vendor_hook.c
*
* Android Vendor Hook Support
*
* Copyright 2020 Google LLC
*/
#define CREATE_TRACE_POINTS
#include <trace/hooks/vendor_hooks.h>
/*
* Export tracepoints that act as a bare tracehook (ie: have no trace event
* associated with them) to allow external modules to probe them.
*/

View file

@ -17,6 +17,7 @@
#include <linux/delay.h>
#include <linux/log2.h>
#include <linux/hwspinlock.h>
#include <asm/unaligned.h>
#define CREATE_TRACE_POINTS
#include "trace.h"
@ -249,22 +250,20 @@ static void regmap_format_8(void *buf, unsigned int val, unsigned int shift)
static void regmap_format_16_be(void *buf, unsigned int val, unsigned int shift)
{
__be16 *b = buf;
b[0] = cpu_to_be16(val << shift);
put_unaligned_be16(val << shift, buf);
}
static void regmap_format_16_le(void *buf, unsigned int val, unsigned int shift)
{
__le16 *b = buf;
b[0] = cpu_to_le16(val << shift);
put_unaligned_le16(val << shift, buf);
}
static void regmap_format_16_native(void *buf, unsigned int val,
unsigned int shift)
{
*(u16 *)buf = val << shift;
u16 v = val << shift;
memcpy(buf, &v, sizeof(v));
}
static void regmap_format_24(void *buf, unsigned int val, unsigned int shift)
@ -280,43 +279,39 @@ static void regmap_format_24(void *buf, unsigned int val, unsigned int shift)
static void regmap_format_32_be(void *buf, unsigned int val, unsigned int shift)
{
__be32 *b = buf;
b[0] = cpu_to_be32(val << shift);
put_unaligned_be32(val << shift, buf);
}
static void regmap_format_32_le(void *buf, unsigned int val, unsigned int shift)
{
__le32 *b = buf;
b[0] = cpu_to_le32(val << shift);
put_unaligned_le32(val << shift, buf);
}
static void regmap_format_32_native(void *buf, unsigned int val,
unsigned int shift)
{
*(u32 *)buf = val << shift;
u32 v = val << shift;
memcpy(buf, &v, sizeof(v));
}
#ifdef CONFIG_64BIT
static void regmap_format_64_be(void *buf, unsigned int val, unsigned int shift)
{
__be64 *b = buf;
b[0] = cpu_to_be64((u64)val << shift);
put_unaligned_be64((u64) val << shift, buf);
}
static void regmap_format_64_le(void *buf, unsigned int val, unsigned int shift)
{
__le64 *b = buf;
b[0] = cpu_to_le64((u64)val << shift);
put_unaligned_le64((u64) val << shift, buf);
}
static void regmap_format_64_native(void *buf, unsigned int val,
unsigned int shift)
{
*(u64 *)buf = (u64)val << shift;
u64 v = (u64) val << shift;
memcpy(buf, &v, sizeof(v));
}
#endif
@ -333,35 +328,34 @@ static unsigned int regmap_parse_8(const void *buf)
static unsigned int regmap_parse_16_be(const void *buf)
{
const __be16 *b = buf;
return be16_to_cpu(b[0]);
return get_unaligned_be16(buf);
}
static unsigned int regmap_parse_16_le(const void *buf)
{
const __le16 *b = buf;
return le16_to_cpu(b[0]);
return get_unaligned_le16(buf);
}
static void regmap_parse_16_be_inplace(void *buf)
{
__be16 *b = buf;
u16 v = get_unaligned_be16(buf);
b[0] = be16_to_cpu(b[0]);
memcpy(buf, &v, sizeof(v));
}
static void regmap_parse_16_le_inplace(void *buf)
{
__le16 *b = buf;
u16 v = get_unaligned_le16(buf);
b[0] = le16_to_cpu(b[0]);
memcpy(buf, &v, sizeof(v));
}
static unsigned int regmap_parse_16_native(const void *buf)
{
return *(u16 *)buf;
u16 v;
memcpy(&v, buf, sizeof(v));
return v;
}
static unsigned int regmap_parse_24(const void *buf)
@ -376,69 +370,67 @@ static unsigned int regmap_parse_24(const void *buf)
static unsigned int regmap_parse_32_be(const void *buf)
{
const __be32 *b = buf;
return be32_to_cpu(b[0]);
return get_unaligned_be32(buf);
}
static unsigned int regmap_parse_32_le(const void *buf)
{
const __le32 *b = buf;
return le32_to_cpu(b[0]);
return get_unaligned_le32(buf);
}
static void regmap_parse_32_be_inplace(void *buf)
{
__be32 *b = buf;
u32 v = get_unaligned_be32(buf);
b[0] = be32_to_cpu(b[0]);
memcpy(buf, &v, sizeof(v));
}
static void regmap_parse_32_le_inplace(void *buf)
{
__le32 *b = buf;
u32 v = get_unaligned_le32(buf);
b[0] = le32_to_cpu(b[0]);
memcpy(buf, &v, sizeof(v));
}
static unsigned int regmap_parse_32_native(const void *buf)
{
return *(u32 *)buf;
u32 v;
memcpy(&v, buf, sizeof(v));
return v;
}
#ifdef CONFIG_64BIT
static unsigned int regmap_parse_64_be(const void *buf)
{
const __be64 *b = buf;
return be64_to_cpu(b[0]);
return get_unaligned_be64(buf);
}
static unsigned int regmap_parse_64_le(const void *buf)
{
const __le64 *b = buf;
return le64_to_cpu(b[0]);
return get_unaligned_le64(buf);
}
static void regmap_parse_64_be_inplace(void *buf)
{
__be64 *b = buf;
u64 v = get_unaligned_be64(buf);
b[0] = be64_to_cpu(b[0]);
memcpy(buf, &v, sizeof(v));
}
static void regmap_parse_64_le_inplace(void *buf)
{
__le64 *b = buf;
u64 v = get_unaligned_le64(buf);
b[0] = le64_to_cpu(b[0]);
memcpy(buf, &v, sizeof(v));
}
static unsigned int regmap_parse_64_native(const void *buf)
{
return *(u64 *)buf;
u64 v;
memcpy(&v, buf, sizeof(v));
return v;
}
#endif

View file

@ -1022,25 +1022,26 @@ static int nbd_add_socket(struct nbd_device *nbd, unsigned long arg,
test_bit(NBD_RT_BOUND, &config->runtime_flags))) {
dev_err(disk_to_dev(nbd->disk),
"Device being setup by another task");
sockfd_put(sock);
return -EBUSY;
err = -EBUSY;
goto put_socket;
}
nsock = kzalloc(sizeof(*nsock), GFP_KERNEL);
if (!nsock) {
err = -ENOMEM;
goto put_socket;
}
socks = krealloc(config->socks, (config->num_connections + 1) *
sizeof(struct nbd_sock *), GFP_KERNEL);
if (!socks) {
sockfd_put(sock);
return -ENOMEM;
kfree(nsock);
err = -ENOMEM;
goto put_socket;
}
config->socks = socks;
nsock = kzalloc(sizeof(struct nbd_sock), GFP_KERNEL);
if (!nsock) {
sockfd_put(sock);
return -ENOMEM;
}
nsock->fallback_index = -1;
nsock->dead = false;
mutex_init(&nsock->tx_lock);
@ -1052,6 +1053,10 @@ static int nbd_add_socket(struct nbd_device *nbd, unsigned long arg,
atomic_inc(&config->live_connections);
return 0;
put_socket:
sockfd_put(sock);
return err;
}
static int nbd_reconnect_socket(struct nbd_device *nbd, unsigned long arg)

View file

@ -992,6 +992,7 @@ out_put_disk:
put_disk(vblk->disk);
out_free_vq:
vdev->config->del_vqs(vdev);
kfree(vblk->vqs);
out_free_vblk:
kfree(vblk);
out_free_index:

View file

@ -189,15 +189,6 @@ ssize_t tpm_common_write(struct file *file, const char __user *buf,
goto out;
}
/* atomic tpm command send and result receive. We only hold the ops
* lock during this period so that the tpm can be unregistered even if
* the char dev is held open.
*/
if (tpm_try_get_ops(priv->chip)) {
ret = -EPIPE;
goto out;
}
priv->response_length = 0;
priv->response_read = false;
*off = 0;
@ -211,11 +202,19 @@ ssize_t tpm_common_write(struct file *file, const char __user *buf,
if (file->f_flags & O_NONBLOCK) {
priv->command_enqueued = true;
queue_work(tpm_dev_wq, &priv->async_work);
tpm_put_ops(priv->chip);
mutex_unlock(&priv->buffer_mutex);
return size;
}
/* atomic tpm command send and result receive. We only hold the ops
* lock during this period so that the tpm can be unregistered even if
* the char dev is held open.
*/
if (tpm_try_get_ops(priv->chip)) {
ret = -EPIPE;
goto out;
}
ret = tpm_dev_transmit(priv->chip, priv->space, priv->data_buffer,
sizeof(priv->data_buffer));
tpm_put_ops(priv->chip);

View file

@ -54,38 +54,12 @@ static char *dmabuffs_dname(struct dentry *dentry, char *buffer, int buflen)
dentry->d_name.name, ret > 0 ? name : "");
}
static const struct dentry_operations dma_buf_dentry_ops = {
.d_dname = dmabuffs_dname,
};
static struct vfsmount *dma_buf_mnt;
static int dma_buf_fs_init_context(struct fs_context *fc)
{
struct pseudo_fs_context *ctx;
ctx = init_pseudo(fc, DMA_BUF_MAGIC);
if (!ctx)
return -ENOMEM;
ctx->dops = &dma_buf_dentry_ops;
return 0;
}
static struct file_system_type dma_buf_fs_type = {
.name = "dmabuf",
.init_fs_context = dma_buf_fs_init_context,
.kill_sb = kill_anon_super,
};
static int dma_buf_release(struct inode *inode, struct file *file)
static void dma_buf_release(struct dentry *dentry)
{
struct msm_dma_buf *msm_dma_buf;
struct dma_buf *dmabuf;
if (!is_dma_buf_file(file))
return -EINVAL;
dmabuf = file->private_data;
dmabuf = dentry->d_fsdata;
msm_dma_buf = to_msm_dma_buf(dmabuf);
BUG_ON(dmabuf->vmapping_counter);
@ -113,9 +87,32 @@ static int dma_buf_release(struct inode *inode, struct file *file)
module_put(dmabuf->owner);
kfree(dmabuf->name);
kfree(msm_dma_buf);
}
static const struct dentry_operations dma_buf_dentry_ops = {
.d_dname = dmabuffs_dname,
.d_release = dma_buf_release,
};
static struct vfsmount *dma_buf_mnt;
static int dma_buf_fs_init_context(struct fs_context *fc)
{
struct pseudo_fs_context *ctx;
ctx = init_pseudo(fc, DMA_BUF_MAGIC);
if (!ctx)
return -ENOMEM;
ctx->dops = &dma_buf_dentry_ops;
return 0;
}
static struct file_system_type dma_buf_fs_type = {
.name = "dmabuf",
.init_fs_context = dma_buf_fs_init_context,
.kill_sb = kill_anon_super,
};
static int dma_buf_mmap_internal(struct file *file, struct vm_area_struct *vma)
{
struct dma_buf *dmabuf;
@ -415,7 +412,6 @@ static void dma_buf_show_fdinfo(struct seq_file *m, struct file *file)
}
static const struct file_operations dma_buf_fops = {
.release = dma_buf_release,
.mmap = dma_buf_mmap_internal,
.llseek = dma_buf_llseek,
.poll = dma_buf_poll,

View file

@ -265,6 +265,8 @@ static int get_scrub_rate(struct mem_ctl_info *mci)
if (pvt->model == 0x60)
amd64_read_pci_cfg(pvt->F2, F15H_M60H_SCRCTRL, &scrubval);
else
amd64_read_pci_cfg(pvt->F3, SCRCTRL, &scrubval);
break;
case 0x17:

View file

@ -219,3 +219,14 @@ config EFI_EARLYCON
depends on SERIAL_EARLYCON && !ARM && !IA64
select FONT_SUPPORT
select ARCH_USE_MEMREMAP_PROT
config EFI_CUSTOM_SSDT_OVERLAYS
bool "Load custom ACPI SSDT overlay from an EFI variable"
depends on EFI_VARS && ACPI
default ACPI_TABLE_UPGRADE
help
Allow loading of an ACPI SSDT overlay from an EFI variable specified
by a kernel command line option.
See Documentation/admin-guide/acpi/ssdt-overlays.rst for more
information.

View file

@ -217,7 +217,7 @@ static void generic_ops_unregister(void)
efivars_unregister(&generic_efivars);
}
#if IS_ENABLED(CONFIG_ACPI)
#ifdef CONFIG_EFI_CUSTOM_SSDT_OVERLAYS
#define EFIVAR_SSDT_NAME_MAX 16
static char efivar_ssdt[EFIVAR_SSDT_NAME_MAX] __initdata;
static int __init efivar_ssdt_setup(char *str)

View file

@ -107,6 +107,84 @@ static const struct i2c_device_id pca953x_id[] = {
};
MODULE_DEVICE_TABLE(i2c, pca953x_id);
#ifdef CONFIG_GPIO_PCA953X_IRQ
#include <linux/dmi.h>
#include <linux/gpio.h>
#include <linux/list.h>
static const struct dmi_system_id pca953x_dmi_acpi_irq_info[] = {
{
/*
* On Intel Galileo Gen 2 board the IRQ pin of one of
* the I²C GPIO expanders, which has GpioInt() resource,
* is provided as an absolute number instead of being
* relative. Since first controller (gpio-sch.c) and
* second (gpio-dwapb.c) are at the fixed bases, we may
* safely refer to the number in the global space to get
* an IRQ out of it.
*/
.matches = {
DMI_EXACT_MATCH(DMI_BOARD_NAME, "GalileoGen2"),
},
},
{}
};
#ifdef CONFIG_ACPI
static int pca953x_acpi_get_pin(struct acpi_resource *ares, void *data)
{
struct acpi_resource_gpio *agpio;
int *pin = data;
if (acpi_gpio_get_irq_resource(ares, &agpio))
*pin = agpio->pin_table[0];
return 1;
}
static int pca953x_acpi_find_pin(struct device *dev)
{
struct acpi_device *adev = ACPI_COMPANION(dev);
int pin = -ENOENT, ret;
LIST_HEAD(r);
ret = acpi_dev_get_resources(adev, &r, pca953x_acpi_get_pin, &pin);
acpi_dev_free_resource_list(&r);
if (ret < 0)
return ret;
return pin;
}
#else
static inline int pca953x_acpi_find_pin(struct device *dev) { return -ENXIO; }
#endif
static int pca953x_acpi_get_irq(struct device *dev)
{
int pin, ret;
pin = pca953x_acpi_find_pin(dev);
if (pin < 0)
return pin;
dev_info(dev, "Applying ACPI interrupt quirk (GPIO %d)\n", pin);
if (!gpio_is_valid(pin))
return -EINVAL;
ret = gpio_request(pin, "pca953x interrupt");
if (ret)
return ret;
ret = gpio_to_irq(pin);
/* When pin is used as an IRQ, no need to keep it requested */
gpio_free(pin);
return ret;
}
#endif
static const struct acpi_device_id pca953x_acpi_ids[] = {
{ "INT3491", 16 | PCA953X_TYPE | PCA_LATCH_INT, },
{ }
@ -772,6 +850,12 @@ static int pca953x_irq_setup(struct pca953x_chip *chip,
u8 reg_direction[MAX_BANK];
int ret, i;
if (dmi_first_match(pca953x_dmi_acpi_irq_info)) {
ret = pca953x_acpi_get_irq(&client->dev);
if (ret > 0)
client->irq = ret;
}
if (!client->irq)
return 0;

View file

@ -150,6 +150,7 @@ int amdgpu_atomfirmware_get_vram_width(struct amdgpu_device *adev)
(mode_info->atom_context->bios + data_offset);
switch (crev) {
case 11:
case 12:
mem_channel_number = igp_info->v11.umachannelnumber;
/* channel width is 64 */
return mem_channel_number * 64;

View file

@ -36,7 +36,8 @@ static void amdgpu_job_timedout(struct drm_sched_job *s_job)
memset(&ti, 0, sizeof(struct amdgpu_task_info));
if (amdgpu_ring_soft_recovery(ring, job->vmid, s_job->s_fence->parent)) {
if (amdgpu_gpu_recovery &&
amdgpu_ring_soft_recovery(ring, job->vmid, s_job->s_fence->parent)) {
DRM_ERROR("ring %s timeout, but soft recovered\n",
s_job->sched->name);
return;

View file

@ -2101,7 +2101,7 @@ static ssize_t amdgpu_hwmon_show_sclk(struct device *dev,
if (r)
return r;
return snprintf(buf, PAGE_SIZE, "%d\n", sclk * 10 * 1000);
return snprintf(buf, PAGE_SIZE, "%u\n", sclk * 10 * 1000);
}
static ssize_t amdgpu_hwmon_show_sclk_label(struct device *dev,
@ -2131,7 +2131,7 @@ static ssize_t amdgpu_hwmon_show_mclk(struct device *dev,
if (r)
return r;
return snprintf(buf, PAGE_SIZE, "%d\n", mclk * 10 * 1000);
return snprintf(buf, PAGE_SIZE, "%u\n", mclk * 10 * 1000);
}
static ssize_t amdgpu_hwmon_show_mclk_label(struct device *dev,

View file

@ -2226,10 +2226,12 @@ void dc_commit_updates_for_stream(struct dc *dc,
copy_stream_update_to_stream(dc, context, stream, stream_update);
if (!dc->res_pool->funcs->validate_bandwidth(dc, context, false)) {
DC_ERROR("Mode validation failed for stream update!\n");
dc_release_state(context);
return;
if (update_type > UPDATE_TYPE_FAST) {
if (!dc->res_pool->funcs->validate_bandwidth(dc, context, false)) {
DC_ERROR("Mode validation failed for stream update!\n");
dc_release_state(context);
return;
}
}
commit_planes_for_stream(

View file

@ -30,12 +30,6 @@ struct drm_dmi_panel_orientation_data {
int orientation;
};
static const struct drm_dmi_panel_orientation_data acer_s1003 = {
.width = 800,
.height = 1280,
.orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
};
static const struct drm_dmi_panel_orientation_data asus_t100ha = {
.width = 800,
.height = 1280,
@ -114,13 +108,19 @@ static const struct dmi_system_id orientation_data[] = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Acer"),
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "One S1003"),
},
.driver_data = (void *)&acer_s1003,
.driver_data = (void *)&lcd800x1280_rightside_up,
}, { /* Asus T100HA */
.matches = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T100HAN"),
},
.driver_data = (void *)&asus_t100ha,
}, { /* Asus T101HA */
.matches = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T101HA"),
},
.driver_data = (void *)&lcd800x1280_rightside_up,
}, { /* GPD MicroPC (generic strings, also match on bios date) */
.matches = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Default string"),

View file

@ -215,7 +215,6 @@ static int mcde_modeset_init(struct drm_device *drm)
drm_mode_config_reset(drm);
drm_kms_helper_poll_init(drm);
drm_fbdev_generic_setup(drm, 32);
return 0;
@ -282,6 +281,8 @@ static int mcde_drm_bind(struct device *dev)
if (ret < 0)
goto unbind;
drm_fbdev_generic_setup(drm, 32);
return 0;
unbind:

View file

@ -101,6 +101,16 @@ static int mtk_plane_atomic_check(struct drm_plane *plane,
true, true);
}
static void mtk_plane_atomic_disable(struct drm_plane *plane,
struct drm_plane_state *old_state)
{
struct mtk_plane_state *state = to_mtk_plane_state(plane->state);
state->pending.enable = false;
wmb(); /* Make sure the above parameter is set before update */
state->pending.dirty = true;
}
static void mtk_plane_atomic_update(struct drm_plane *plane,
struct drm_plane_state *old_state)
{
@ -115,6 +125,11 @@ static void mtk_plane_atomic_update(struct drm_plane *plane,
if (!crtc || WARN_ON(!fb))
return;
if (!plane->state->visible) {
mtk_plane_atomic_disable(plane, old_state);
return;
}
gem = fb->obj[0];
mtk_gem = to_mtk_gem_obj(gem);
addr = mtk_gem->dma_addr;
@ -136,16 +151,6 @@ static void mtk_plane_atomic_update(struct drm_plane *plane,
state->pending.dirty = true;
}
static void mtk_plane_atomic_disable(struct drm_plane *plane,
struct drm_plane_state *old_state)
{
struct mtk_plane_state *state = to_mtk_plane_state(plane->state);
state->pending.enable = false;
wmb(); /* Make sure the above parameter is set before update */
state->pending.dirty = true;
}
static const struct drm_plane_helper_funcs mtk_plane_helper_funcs = {
.prepare_fb = drm_gem_fb_prepare_fb,
.atomic_check = mtk_plane_atomic_check,

View file

@ -2232,7 +2232,7 @@ struct drm_encoder *dpu_encoder_init(struct drm_device *dev,
dpu_enc = devm_kzalloc(dev->dev, sizeof(*dpu_enc), GFP_KERNEL);
if (!dpu_enc)
return ERR_PTR(ENOMEM);
return ERR_PTR(-ENOMEM);
rc = drm_encoder_init(dev, &dpu_enc->base, &dpu_encoder_funcs,
drm_enc_mode, NULL);

View file

@ -5578,6 +5578,7 @@ static int ci_parse_power_table(struct radeon_device *rdev)
if (!rdev->pm.dpm.ps)
return -ENOMEM;
power_state_offset = (u8 *)state_array->states;
rdev->pm.dpm.num_ps = 0;
for (i = 0; i < state_array->ucNumEntries; i++) {
u8 *idx;
power_state = (union pplib_power_state *)power_state_offset;
@ -5587,10 +5588,8 @@ static int ci_parse_power_table(struct radeon_device *rdev)
if (!rdev->pm.power_state[i].clock_info)
return -EINVAL;
ps = kzalloc(sizeof(struct ci_ps), GFP_KERNEL);
if (ps == NULL) {
kfree(rdev->pm.dpm.ps);
if (ps == NULL)
return -ENOMEM;
}
rdev->pm.dpm.ps[i].ps_priv = ps;
ci_parse_pplib_non_clock_info(rdev, &rdev->pm.dpm.ps[i],
non_clock_info,
@ -5612,8 +5611,8 @@ static int ci_parse_power_table(struct radeon_device *rdev)
k++;
}
power_state_offset += 2 + power_state->v2.ucNumDPMLevels;
rdev->pm.dpm.num_ps = i + 1;
}
rdev->pm.dpm.num_ps = state_array->ucNumEntries;
/* fill in the vce power states */
for (i = 0; i < RADEON_MAX_VCE_LEVELS; i++) {

View file

@ -262,9 +262,8 @@ sun4i_hdmi_connector_detect(struct drm_connector *connector, bool force)
struct sun4i_hdmi *hdmi = drm_connector_to_sun4i_hdmi(connector);
unsigned long reg;
if (readl_poll_timeout(hdmi->base + SUN4I_HDMI_HPD_REG, reg,
reg & SUN4I_HDMI_HPD_HIGH,
0, 500000)) {
reg = readl(hdmi->base + SUN4I_HDMI_HPD_REG);
if (reg & SUN4I_HDMI_HPD_HIGH) {
cec_phys_addr_invalidate(hdmi->cec_adap);
return connector_status_disconnected;
}

View file

@ -141,7 +141,9 @@ int tegra_display_hub_prepare(struct tegra_display_hub *hub)
for (i = 0; i < hub->soc->num_wgrps; i++) {
struct tegra_windowgroup *wgrp = &hub->wgrps[i];
tegra_windowgroup_enable(wgrp);
/* Skip orphaned window group whose parent DC is disabled */
if (wgrp->parent)
tegra_windowgroup_enable(wgrp);
}
return 0;
@ -158,7 +160,9 @@ void tegra_display_hub_cleanup(struct tegra_display_hub *hub)
for (i = 0; i < hub->soc->num_wgrps; i++) {
struct tegra_windowgroup *wgrp = &hub->wgrps[i];
tegra_windowgroup_disable(wgrp);
/* Skip orphaned window group whose parent DC is disabled */
if (wgrp->parent)
tegra_windowgroup_disable(wgrp);
}
}

View file

@ -941,8 +941,10 @@ static int ttm_bo_add_move_fence(struct ttm_buffer_object *bo,
if (!fence)
return 0;
if (no_wait_gpu)
if (no_wait_gpu) {
dma_fence_put(fence);
return -EBUSY;
}
dma_resv_add_shared_fence(bo->base.resv, fence);

View file

@ -686,8 +686,17 @@ EXPORT_SYMBOL(host1x_driver_register_full);
*/
void host1x_driver_unregister(struct host1x_driver *driver)
{
struct host1x *host1x;
driver_unregister(&driver->driver);
mutex_lock(&devices_lock);
list_for_each_entry(host1x, &devices, list)
host1x_detach_driver(host1x, driver);
mutex_unlock(&devices_lock);
mutex_lock(&drivers_lock);
list_del_init(&driver->list);
mutex_unlock(&drivers_lock);

View file

@ -883,7 +883,7 @@ static int acpi_power_meter_add(struct acpi_device *device)
res = setup_attrs(resource);
if (res)
goto exit_free;
goto exit_free_capability;
resource->hwmon_dev = hwmon_device_register(&device->dev);
if (IS_ERR(resource->hwmon_dev)) {
@ -896,6 +896,8 @@ static int acpi_power_meter_add(struct acpi_device *device)
exit_remove:
remove_attrs(resource);
exit_free_capability:
free_capabilities(resource);
exit_free:
kfree(resource);
exit:

View file

@ -38,8 +38,9 @@ static const u8 MAX6697_REG_CRIT[] = {
* Map device tree / platform data register bit map to chip bit map.
* Applies to alert register and over-temperature register.
*/
#define MAX6697_MAP_BITS(reg) ((((reg) & 0x7e) >> 1) | \
#define MAX6697_ALERT_MAP_BITS(reg) ((((reg) & 0x7e) >> 1) | \
(((reg) & 0x01) << 6) | ((reg) & 0x80))
#define MAX6697_OVERT_MAP_BITS(reg) (((reg) >> 1) | (((reg) & 0x01) << 7))
#define MAX6697_REG_STAT(n) (0x44 + (n))
@ -562,12 +563,12 @@ static int max6697_init_chip(struct max6697_data *data,
return ret;
ret = i2c_smbus_write_byte_data(client, MAX6697_REG_ALERT_MASK,
MAX6697_MAP_BITS(pdata->alert_mask));
MAX6697_ALERT_MAP_BITS(pdata->alert_mask));
if (ret < 0)
return ret;
ret = i2c_smbus_write_byte_data(client, MAX6697_REG_OVERT_MASK,
MAX6697_MAP_BITS(pdata->over_temperature_mask));
MAX6697_OVERT_MAP_BITS(pdata->over_temperature_mask));
if (ret < 0)
return ret;

View file

@ -314,7 +314,8 @@ static int pca_xfer(struct i2c_adapter *i2c_adap,
DEB2("BUS ERROR - SDA Stuck low\n");
pca_reset(adap);
goto out;
case 0x90: /* Bus error - SCL stuck low */
case 0x78: /* Bus error - SCL stuck low (PCA9665) */
case 0x90: /* Bus error - SCL stuck low (PCA9564) */
DEB2("BUS ERROR - SCL Stuck low\n");
pca_reset(adap);
goto out;

View file

@ -337,9 +337,9 @@ static int mlxcpld_i2c_wait_for_tc(struct mlxcpld_i2c_priv *priv)
if (priv->smbus_block && (val & MLXCPLD_I2C_SMBUS_BLK_BIT)) {
mlxcpld_i2c_read_comm(priv, MLXCPLD_LPCI2C_NUM_DAT_REG,
&datalen, 1);
if (unlikely(datalen > (I2C_SMBUS_BLOCK_MAX + 1))) {
if (unlikely(datalen > I2C_SMBUS_BLOCK_MAX)) {
dev_err(priv->dev, "Incorrect smbus block read message len\n");
return -E2BIG;
return -EPROTO;
}
} else {
datalen = priv->xfer.data_len;

View file

@ -195,7 +195,7 @@ static int __rdma_counter_unbind_qp(struct ib_qp *qp)
return ret;
}
static void counter_history_stat_update(const struct rdma_counter *counter)
static void counter_history_stat_update(struct rdma_counter *counter)
{
struct ib_device *dev = counter->device;
struct rdma_port_counter *port_counter;
@ -205,6 +205,8 @@ static void counter_history_stat_update(const struct rdma_counter *counter)
if (!port_counter->hstats)
return;
rdma_counter_query_stats(counter);
for (i = 0; i < counter->stats->num_counters; i++)
port_counter->hstats->value[i] += counter->stats->value[i];
}

View file

@ -829,13 +829,20 @@ static int ib_nl_get_path_rec_attrs_len(ib_sa_comp_mask comp_mask)
return len;
}
static int ib_nl_send_msg(struct ib_sa_query *query, gfp_t gfp_mask)
static int ib_nl_make_request(struct ib_sa_query *query, gfp_t gfp_mask)
{
struct sk_buff *skb = NULL;
struct nlmsghdr *nlh;
void *data;
struct ib_sa_mad *mad;
int len;
unsigned long flags;
unsigned long delay;
gfp_t gfp_flag;
int ret;
INIT_LIST_HEAD(&query->list);
query->seq = (u32)atomic_inc_return(&ib_nl_sa_request_seq);
mad = query->mad_buf->mad;
len = ib_nl_get_path_rec_attrs_len(mad->sa_hdr.comp_mask);
@ -860,36 +867,25 @@ static int ib_nl_send_msg(struct ib_sa_query *query, gfp_t gfp_mask)
/* Repair the nlmsg header length */
nlmsg_end(skb, nlh);
return rdma_nl_multicast(&init_net, skb, RDMA_NL_GROUP_LS, gfp_mask);
}
gfp_flag = ((gfp_mask & GFP_ATOMIC) == GFP_ATOMIC) ? GFP_ATOMIC :
GFP_NOWAIT;
static int ib_nl_make_request(struct ib_sa_query *query, gfp_t gfp_mask)
{
unsigned long flags;
unsigned long delay;
int ret;
INIT_LIST_HEAD(&query->list);
query->seq = (u32)atomic_inc_return(&ib_nl_sa_request_seq);
/* Put the request on the list first.*/
spin_lock_irqsave(&ib_nl_request_lock, flags);
ret = rdma_nl_multicast(&init_net, skb, RDMA_NL_GROUP_LS, gfp_flag);
if (ret)
goto out;
/* Put the request on the list.*/
delay = msecs_to_jiffies(sa_local_svc_timeout_ms);
query->timeout = delay + jiffies;
list_add_tail(&query->list, &ib_nl_request_list);
/* Start the timeout if this is the only request */
if (ib_nl_request_list.next == &query->list)
queue_delayed_work(ib_nl_wq, &ib_nl_timed_work, delay);
spin_unlock_irqrestore(&ib_nl_request_lock, flags);
ret = ib_nl_send_msg(query, gfp_mask);
if (ret) {
ret = -EIO;
/* Remove the request */
spin_lock_irqsave(&ib_nl_request_lock, flags);
list_del(&query->list);
spin_unlock_irqrestore(&ib_nl_request_lock, flags);
}
out:
spin_unlock_irqrestore(&ib_nl_request_lock, flags);
return ret;
}

View file

@ -844,6 +844,29 @@ wq_error:
return -ENOMEM;
}
/**
* destroy_workqueues - destroy per port workqueues
* @dd: the hfi1_ib device
*/
static void destroy_workqueues(struct hfi1_devdata *dd)
{
int pidx;
struct hfi1_pportdata *ppd;
for (pidx = 0; pidx < dd->num_pports; ++pidx) {
ppd = dd->pport + pidx;
if (ppd->hfi1_wq) {
destroy_workqueue(ppd->hfi1_wq);
ppd->hfi1_wq = NULL;
}
if (ppd->link_wq) {
destroy_workqueue(ppd->link_wq);
ppd->link_wq = NULL;
}
}
}
/**
* enable_general_intr() - Enable the IRQs that will be handled by the
* general interrupt handler.
@ -1117,15 +1140,10 @@ static void shutdown_device(struct hfi1_devdata *dd)
* We can't count on interrupts since we are stopping.
*/
hfi1_quiet_serdes(ppd);
if (ppd->hfi1_wq) {
destroy_workqueue(ppd->hfi1_wq);
ppd->hfi1_wq = NULL;
}
if (ppd->link_wq) {
destroy_workqueue(ppd->link_wq);
ppd->link_wq = NULL;
}
if (ppd->hfi1_wq)
flush_workqueue(ppd->hfi1_wq);
if (ppd->link_wq)
flush_workqueue(ppd->link_wq);
}
sdma_exit(dd);
}
@ -1814,6 +1832,7 @@ static void remove_one(struct pci_dev *pdev)
* clear dma engines, etc.
*/
shutdown_device(dd);
destroy_workqueues(dd);
stop_timers(dd);

View file

@ -381,7 +381,10 @@ bool _hfi1_schedule_send(struct rvt_qp *qp)
struct hfi1_ibport *ibp =
to_iport(qp->ibqp.device, qp->port_num);
struct hfi1_pportdata *ppd = ppd_from_ibp(ibp);
struct hfi1_devdata *dd = dd_from_ibdev(qp->ibqp.device);
struct hfi1_devdata *dd = ppd->dd;
if (dd->flags & HFI1_SHUTDOWN)
return true;
return iowait_schedule(&priv->s_iowait, ppd->hfi1_wq,
priv->s_sde ?

View file

@ -5406,7 +5406,10 @@ static bool _hfi1_schedule_tid_send(struct rvt_qp *qp)
struct hfi1_ibport *ibp =
to_iport(qp->ibqp.device, qp->port_num);
struct hfi1_pportdata *ppd = ppd_from_ibp(ibp);
struct hfi1_devdata *dd = dd_from_ibdev(qp->ibqp.device);
struct hfi1_devdata *dd = ppd->dd;
if ((dd->flags & HFI1_SHUTDOWN))
return true;
return iowait_tid_schedule(&priv->s_iowait, ppd->hfi1_wq,
priv->s_sde ?

View file

@ -517,7 +517,7 @@ static int mlx5_query_port_roce(struct ib_device *device, u8 port_num,
mdev_port_num);
if (err)
goto out;
ext = MLX5_CAP_PCAM_FEATURE(dev->mdev, ptys_extended_ethernet);
ext = !!MLX5_GET_ETH_PROTO(ptys_reg, out, true, eth_proto_capability);
eth_prot_oper = MLX5_GET_ETH_PROTO(ptys_reg, out, ext, eth_proto_oper);
props->active_width = IB_WIDTH_4X;

View file

@ -66,12 +66,13 @@ static int siw_device_register(struct siw_device *sdev, const char *name)
static int dev_id = 1;
int rv;
sdev->vendor_part_id = dev_id++;
rv = ib_register_device(base_dev, name);
if (rv) {
pr_warn("siw: device registration error %d\n", rv);
return rv;
}
sdev->vendor_part_id = dev_id++;
siw_dbg(base_dev, "HWaddr=%pM\n", sdev->netdev->dev_addr);

View file

@ -5962,6 +5962,23 @@ static bool intel_iommu_is_attach_deferred(struct iommu_domain *domain,
return dev->archdata.iommu == DEFER_DEVICE_DOMAIN_INFO;
}
/*
* Check that the device does not live on an external facing PCI port that is
* marked as untrusted. Such devices should not be able to apply quirks and
* thus not be able to bypass the IOMMU restrictions.
*/
static bool risky_device(struct pci_dev *pdev)
{
if (pdev->untrusted) {
pci_info(pdev,
"Skipping IOMMU quirk for dev [%04X:%04X] on untrusted PCI link\n",
pdev->vendor, pdev->device);
pci_info(pdev, "Please check with your BIOS/Platform vendor about this\n");
return true;
}
return false;
}
const struct iommu_ops intel_iommu_ops = {
.capable = intel_iommu_capable,
.domain_alloc = intel_iommu_domain_alloc,
@ -5990,6 +6007,9 @@ const struct iommu_ops intel_iommu_ops = {
static void quirk_iommu_igfx(struct pci_dev *dev)
{
if (risky_device(dev))
return;
pci_info(dev, "Disabling IOMMU for graphics on this chipset\n");
dmar_map_gfx = 0;
}
@ -6031,6 +6051,9 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x163D, quirk_iommu_igfx);
static void quirk_iommu_rwbf(struct pci_dev *dev)
{
if (risky_device(dev))
return;
/*
* Mobile 4 Series Chipset neglects to set RWBF capability,
* but needs it. Same seems to hold for the desktop versions.
@ -6061,6 +6084,9 @@ static void quirk_calpella_no_shadow_gtt(struct pci_dev *dev)
{
unsigned short ggc;
if (risky_device(dev))
return;
if (pci_read_config_word(dev, GGC, &ggc))
return;
@ -6094,6 +6120,12 @@ static void __init check_tylersburg_isoch(void)
pdev = pci_get_device(PCI_VENDOR_ID_INTEL, 0x3a3e, NULL);
if (!pdev)
return;
if (risky_device(pdev)) {
pci_dev_put(pdev);
return;
}
pci_dev_put(pdev);
/* System Management Registers. Might be hidden, in which case
@ -6103,6 +6135,11 @@ static void __init check_tylersburg_isoch(void)
if (!pdev)
return;
if (risky_device(pdev)) {
pci_dev_put(pdev);
return;
}
if (pci_read_config_dword(pdev, 0x188, &vtisochctrl)) {
pci_dev_put(pdev);
return;

View file

@ -329,10 +329,8 @@ static int gic_irq_set_vcpu_affinity(struct irq_data *d, void *vcpu)
static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
bool force)
{
void __iomem *reg = gic_dist_base(d) + GIC_DIST_TARGET + (gic_irq(d) & ~3);
unsigned int cpu, shift = (gic_irq(d) % 4) * 8;
u32 val, mask, bit;
unsigned long flags;
void __iomem *reg = gic_dist_base(d) + GIC_DIST_TARGET + gic_irq(d);
unsigned int cpu;
if (!force)
cpu = cpumask_any_and(mask_val, cpu_online_mask);
@ -342,13 +340,7 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
if (cpu >= NR_GIC_CPU_IF || cpu >= nr_cpu_ids)
return -EINVAL;
gic_lock_irqsave(flags);
mask = 0xff << shift;
bit = gic_cpu_map[cpu] << shift;
val = readl_relaxed(reg) & ~mask;
writel_relaxed(val | bit, reg);
gic_unlock_irqrestore(flags);
writeb_relaxed(gic_cpu_map[cpu], reg);
irq_data_update_effective_affinity(d, cpumask_of(cpu));
return IRQ_SET_MASK_OK_DONE;

View file

@ -2104,6 +2104,12 @@ invalid_optional:
}
if (WC_MODE_PMEM(wc)) {
if (!dax_synchronous(wc->ssd_dev->dax_dev)) {
r = -EOPNOTSUPP;
ti->error = "Asynchronous persistent memory not supported as pmem cache";
goto bad;
}
r = persistent_memory_claim(wc);
if (r) {
ti->error = "Unable to map persistent memory for cache";

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