Merge android11-5.4.278(7453ecf) into msm-5.4
* remotes/origin/tmp-7453ecf:
UPSTREAM: usb: gadget: configfs: Prevent OOB read/write in usb_string_copy()
ANDROID: 16K: Don't set padding vm_flags on 32-bit archs
ANDROID: GKI: refresh ABI to include kimage_vaddr
BACKPORT: arm64: move kimage_vaddr to .rodata
BACKPORT: arm64: kernel: Convert to modern annotations for assembly data
ANDROID: fix kernelci build breaks due to hid/uhid cyclic dependency
UPSTREAM: af_unix: Fix garbage collector racing against connect()
Revert "drm/panel: simple: Add missing Innolux G121X1-L03 format, flags, connector"
Linux 5.4.278
nfs: fix undefined behavior in nfs_block_bits()
s390/ap: Fix crash in AP internal function modify_bitmap()
ext4: fix mb_cache_entry's e_refcnt leak in ext4_xattr_block_cache_find()
sparc: move struct termio to asm/termios.h
xsk: validate user input for XDP_{UMEM|COMPLETION}_FILL_RING
net: fix __dst_negative_advice() race
kdb: Use format-specifiers rather than memset() for padding in kdb_read()
kdb: Merge identical case statements in kdb_read()
kdb: Fix console handling when editing and tab-completing commands
kdb: Use format-strings rather than '\0' injection in kdb_read()
kdb: Fix buffer overflow during tab-complete
sparc64: Fix number of online CPUs
intel_th: pci: Add Meteor Lake-S CPU support
net/9p: fix uninit-value in p9_client_rpc()
net/ipv6: Fix route deleting failure when metric equals 0
crypto: qat - Fix ADF_DEV_RESET_SYNC memory leak
crypto: ecrdsa - Fix module auto-load on add_key
KVM: arm64: Allow AArch32 PSTATE.M to be restored as System mode
fbdev: savage: Handle err return when savagefb_check_var failed
media: v4l2-core: hold videodev_lock until dev reg, finishes
media: mxl5xx: Move xpt structures off stack
media: mc: mark the media devnode as registered from the, start
arm64: dts: hi3798cv200: fix the size of GICR
wifi: rtl8xxxu: Fix the TX power of RTL8192CU, RTL8723AU
md/raid5: fix deadlock that raid5d() wait for itself to clear MD_SB_CHANGE_PENDING
arm64: tegra: Correct Tegra132 I2C alias
ACPI: resource: Do IRQ override on TongFang GXxHRXx and GMxHGxx
ata: pata_legacy: make legacy_exit() work again
drm/amdgpu: add error handle to avoid out-of-bounds
media: lgdt3306a: Add a check against null-pointer-def
f2fs: fix to do sanity check on i_xattr_nid in sanity_check_inode()
x86/mm: Remove broken vsyscall emulation code from the page fault code
vxlan: Fix regression when dropping packets due to invalid src addresses
nilfs2: fix use-after-free of timer for log writer thread
afs: Don't cross .backup mountpoint from backup volume
io_uring: fail NOP if non-zero op flags is passed in
mmc: core: Do not force a retune before RPMB switch
binder: fix max_thread type inconsistency
SUNRPC: Fix loop termination condition in gss_free_in_token_pages()
genirq/cpuhotplug, x86/vector: Prevent vector leak during CPU offline
ALSA: timer: Set lower bound of start tick time
ipvlan: Dont Use skb->sk in ipvlan_process_v{4,6}_outbound
spi: stm32: Don't warn about spurious interrupts
kconfig: fix comparison to constant symbols, 'm', 'n'
netfilter: tproxy: bail out if IP has been disabled on the device
net:fec: Add fec_enet_deinit()
net: usb: smsc95xx: fix changing LED_SEL bit value updated from EEPROM
smsc95xx: use usbnet->driver_priv
smsc95xx: remove redundant function arguments
enic: Validate length of nl attributes in enic_set_vf_port
dma-buf/sw-sync: don't enable IRQ from sync_print_obj()
net/mlx5e: Use rx_missed_errors instead of rx_dropped for reporting buffer exhaustion
nvmet: fix ns enable/disable possible hang
spi: Don't mark message DMA mapped when no transfer in it is
netfilter: nfnetlink_queue: acquire rcu_read_lock() in instance_destroy_rcu()
nfc: nci: Fix handling of zero-length payload packets in nci_rx_work()
nfc: nci: Fix kcov check in nci_rx_work()
net: fec: avoid lock evasion when reading pps_enable
virtio: delete vq in vp_find_vqs_msix() when request_irq() fails
arm64: asm-bug: Add .align 2 to the end of __BUG_ENTRY
openvswitch: Set the skbuff pkt_type for proper pmtud support.
tcp: Fix shift-out-of-bounds in dctcp_update_alpha().
params: lift param_set_uint_minmax to common code
ipv6: sr: fix memleak in seg6_hmac_init_algo
sunrpc: fix NFSACL RPC retry on soft mount
nfc: nci: Fix uninit-value in nci_rx_work
x86/kconfig: Select ARCH_WANT_FRAME_POINTERS again when UNWINDER_FRAME_POINTER=y
null_blk: Fix the WARNING: modpost: missing MODULE_DESCRIPTION()
media: cec: cec-api: add locking in cec_release()
media: cec: cec-adap: always cancel work in cec_transmit_msg_fh
um: Fix the -Wmissing-prototypes warning for __switch_mm
powerpc/pseries: Add failure related checks for h_get_mpp and h_get_ppp
scsi: qla2xxx: Replace all non-returning strlcpy() with strscpy()
media: stk1160: fix bounds checking in stk1160_copy_video()
um: Add winch to winch_handlers before registering winch IRQ
um: Fix return value in ubd_init()
drm/msm/dpu: Always flush the slave INTF on the CTL
Input: pm8xxx-vibrator - correct VIB_MAX_LEVELS calculation
Input: ims-pcu - fix printf string overflow
libsubcmd: Fix parse-options memory leak
serial: sh-sci: protect invalidating RXDMA on shutdown
f2fs: fix to release node block count in error path of f2fs_new_node_page()
extcon: max8997: select IRQ_DOMAIN instead of depending on it
ppdev: Add an error check in register_device
ppdev: Remove usage of the deprecated ida_simple_xx() API
stm class: Fix a double free in stm_register_device()
usb: gadget: u_audio: Clear uac pointer when freed.
microblaze: Remove early printk call from cpuinfo-static.c
microblaze: Remove gcc flag for non existing early_printk.c file
iio: pressure: dps310: support negative temperature values
greybus: arche-ctrl: move device table to its right location
serial: max3100: Fix bitwise types
serial: max3100: Update uart_driver_registered on driver removal
serial: max3100: Lock port->lock when calling uart_handle_cts_change()
firmware: dmi-id: add a release callback function
dmaengine: idma64: Add check for dma_set_max_seg_size
soundwire: cadence: fix invalid PDI offset
soundwire: cadence_master: improve PDI allocation
soundwire: intel: don't filter out PDI0/1
soundwire: cadence/intel: simplify PDI/port mapping
greybus: lights: check return of get_channel_from_mode
sched/fair: Allow disabling sched_balance_newidle with sched_relax_domain_level
sched/topology: Don't set SD_BALANCE_WAKE on cpuset domain relax
af_packet: do not call packet_read_pending() from tpacket_destruct_skb()
netrom: fix possible dead-lock in nr_rt_ioctl()
RDMA/IPoIB: Fix format truncation compilation errors
selftests/kcmp: remove unused open mode
selftests/kcmp: Make the test output consistent and clear
SUNRPC: Fix gss_free_in_token_pages()
sunrpc: removed redundant procp check
ext4: avoid excessive credit estimate in ext4_tmpfile()
x86/insn: Fix PUSH instruction in x86 instruction decoder opcode map
RDMA/hns: Use complete parentheses in macros
drm/panel: simple: Add missing Innolux G121X1-L03 format, flags, connector
ASoC: tracing: Export SND_SOC_DAPM_DIR_OUT to its value
drm/arm/malidp: fix a possible null pointer dereference
fbdev: sh7760fb: allow modular build
platform/x86: wmi: Make two functions static
media: radio-shark2: Avoid led_names truncations
media: ngene: Add dvb_ca_en50221_init return value check
fbdev: sisfb: hide unused variables
powerpc/fsl-soc: hide unused const variable
drm/mediatek: Add 0 size check to mtk_drm_gem_obj
fbdev: shmobile: fix snprintf truncation
mtd: rawnand: hynix: fixed typo
drm/amd/display: Fix potential index out of bounds in color transformation function
ipv6: sr: fix invalid unregister error path
ipv6: sr: fix incorrect unregister order
ipv6: sr: add missing seg6_local_exit
net: openvswitch: fix overwriting ct original tuple for ICMPv6
net: usb: smsc95xx: stop lying about skb->truesize
af_unix: Fix data races in unix_release_sock/unix_stream_sendmsg
net: ethernet: cortina: Locking fixes
m68k: mac: Fix reboot hang on Mac IIci
m68k: Fix spinlock race in kernel thread creation
net: usb: sr9700: stop lying about skb->truesize
usb: aqc111: stop lying about skb->truesize
wifi: mwl8k: initialize cmd->addr[] properly
scsi: qedf: Ensure the copied buf is NUL terminated
scsi: bfa: Ensure the copied buf is NUL terminated
HID: intel-ish-hid: ipc: Add check for pci_alloc_irq_vectors
Revert "sh: Handle calling csum_partial with misaligned data"
sh: kprobes: Merge arch_copy_kprobe() into arch_prepare_kprobe()
wifi: ar5523: enable proper endpoint verification
wifi: carl9170: add a proper sanity check for endpoints
macintosh/via-macii: Fix "BUG: sleeping function called from invalid context"
tcp: avoid premature drops in tcp_add_backlog()
tcp: fix a signed-integer-overflow bug in tcp_add_backlog()
tcp: minor optimization in tcp_add_backlog()
wifi: ath10k: populate board data for WCN3990
wifi: ath10k: Fix an error code problem in ath10k_dbg_sta_write_peer_debug_trigger()
x86/purgatory: Switch to the position-independent small code model
scsi: hpsa: Fix allocation size for Scsi_Host private data
scsi: libsas: Fix the failure of adding phy with zero-address to port
cpufreq: exit() callback is optional
cpufreq: Rearrange locking in cpufreq_remove_dev()
cpufreq: Split cpufreq_offline()
cpufreq: Reorganize checks in cpufreq_offline()
ACPI: disable -Wstringop-truncation
irqchip/alpine-msi: Fix off-by-one in allocation error path
scsi: ufs: core: Perform read back after disabling UIC_COMMAND_COMPL
scsi: ufs: core: Perform read back after disabling interrupts
scsi: ufs: cdns-pltfrm: Perform read back after writing HCLKDIV
scsi: ufs: qcom: Perform read back after writing reset bit
qed: avoid truncating work queue length
x86/boot: Ignore relocations in .notes sections in walk_relocs() too
wifi: ath10k: poll service ready message before failing
md: fix resync softlockup when bitmap size is less than array size
null_blk: Fix missing mutex_destroy() at module removal
jffs2: prevent xattr node from overflowing the eraseblock
s390/cio: fix tracepoint subchannel type field
crypto: ccp - drop platform ifdef checks
parisc: add missing export of __cmpxchg_u8()
nilfs2: fix out-of-range warning
ecryptfs: Fix buffer size for tag 66 packet
firmware: raspberrypi: Use correct device for DMA mappings
crypto: bcm - Fix pointer arithmetic
openpromfs: finish conversion to the new mount API
nvme: find numa distance only if controller has valid numa id
drm/amdkfd: Flush the process wq before creating a kfd_process
ASoC: da7219-aad: fix usage of device_get_named_child_node()
ASoC: dt-bindings: rt5645: add cbj sleeve gpio property
ASoC: rt5645: Fix the electric noise due to the CBJ contacts floating
drm/amd/display: Set color_mgmt_changed to true on unsuspend
net: usb: qmi_wwan: add Telit FN920C04 compositions
wifi: cfg80211: fix the order of arguments for trace events of the tx_rx_evt class
nilfs2: fix potential hang in nilfs_detach_log_writer()
nilfs2: fix unexpected freezing of nilfs_segctor_sync()
net: smc91x: Fix m68k kernel compilation for ColdFire CPU
ring-buffer: Fix a race between readers and resize checks
speakup: Fix sizeof() vs ARRAY_SIZE() bug
tty: n_gsm: fix possible out-of-bounds in gsm0_receive()
x86/tsc: Trust initial offset in architectural TSC-adjust MSRs
Linux 5.4.277
docs: kernel_include.py: Cope with docutils 0.21
serial: kgdboc: Fix NMI-safety problems from keyboard reset code
usb: typec: ucsi: displayport: Fix potential deadlock
drm/amdgpu: Fix possible NULL dereference in amdgpu_ras_query_error_status_helper()
btrfs: add missing mutex_unlock in btrfs_relocate_sys_chunks()
arm64: dts: qcom: Fix 'interrupt-map' parent address cells
firmware: arm_scmi: Harden accesses to the reset domains
smb: client: fix potential OOBs in smb2_parse_contexts()
net: bcmgenet: synchronize UMAC_CMD access
net: bcmgenet: synchronize use of bcmgenet_set_rx_mode()
net: bcmgenet: synchronize EXT_RGMII_OOB_CTRL access
net: bcmgenet: keep MAC in reset until PHY is up
Revert "net: bcmgenet: use RGMII loopback for MAC reset"
Revert "selftests: mm: fix map_hugetlb failure on 64K page size systems"
ext4: fix bug_on in __es_tree_search
pinctrl: core: handle radix_tree_insert() errors in pinctrl_register_one_pin()
Linux 5.4.276
pinctrl: mediatek: paris: Fix PIN_CONFIG_INPUT_SCHMITT_ENABLE readback
pinctrl: mediatek: remove set but not used variable 'e'
pinctrl: mediatek: Fix some off by one bugs
pinctrl: mediatek: Fix fallback behavior for bias_set_combo
regulator: core: fix debugfs creation regression
net: fix out-of-bounds access in ops_init
drm/vmwgfx: Fix invalid reads in fence signaled events
dyndbg: fix old BUG_ON in >control parser
tipc: fix UAF in error path
usb: gadget: f_fs: Fix a race condition when processing setup packets.
usb: gadget: composite: fix OS descriptors w_value logic
firewire: nosy: ensure user_length is taken into account when fetching packet contents
net: qede: use return from qede_parse_flow_attr() for flower
net: qede: sanitize 'rc' in qede_add_tc_flower_fltr()
ipv6: fib6_rules: avoid possible NULL dereference in fib6_rule_action()
net: bridge: fix corrupted ethernet header on multicast-to-unicast
phonet: fix rtm_phonet_notify() skb allocation
rtnetlink: Correct nested IFLA_VF_VLAN_LIST attribute validation
Bluetooth: l2cap: fix null-ptr-deref in l2cap_chan_timeout
Bluetooth: Fix use-after-free bugs caused by sco_sock_timeout
tcp: Use refcount_inc_not_zero() in tcp_twsk_unique().
tcp: defer shutdown(SEND_SHUTDOWN) for TCP_SYN_RECV sockets
xfrm: Preserve vlan tags for transport mode software GRO
pinctrl: mediatek: Fix fallback call path
net:usb:qmi_wwan: support Rolling modules
fs/9p: drop inodes immediately on non-.L too
clk: Don't hold prepare_lock when calling kref_put()
gpio: crystalcove: Use -ENOTSUPP consistently
gpio: wcove: Use -ENOTSUPP consistently
9p: explicitly deny setlease attempts
fs/9p: translate O_TRUNC into OTRUNC
fs/9p: only translate RWX permissions for plain 9P2000
selftests: timers: Fix valid-adjtimex signed left-shift undefined behavior
MIPS: scall: Save thread_info.syscall unconditionally on entry
gpu: host1x: Do not setup DMA for virtual devices
scsi: target: Fix SELinux error when systemd-modules loads the target module
btrfs: always clear PERTRANS metadata during commit
btrfs: make btrfs_clear_delalloc_extent() free delalloc reserve
tools/power turbostat: Fix Bzy_MHz documentation typo
tools/power turbostat: Fix added raw MSR output
firewire: ohci: mask bus reset interrupts between ISR and bottom half
ata: sata_gemini: Check clk_enable() result
net: bcmgenet: Reset RBUF on first open
ALSA: line6: Zero-initialize message buffers
scsi: bnx2fc: Remove spin_lock_bh while releasing resources after upload
net: mark racy access on sk->sk_rcvbuf
wifi: cfg80211: fix rdev_dump_mpp() arguments order
wifi: mac80211: fix ieee80211_bss_*_flags kernel-doc
gfs2: Fix invalid metadata access in punch_hole
scsi: lpfc: Update lpfc_ramp_down_queue_handler() logic
clk: sunxi-ng: h6: Reparent CPUX during PLL CPUX rate change
tipc: fix a possible memleak in tipc_buf_append
net: bridge: fix multicast-to-unicast with fraglist GSO
net: dsa: mv88e6xxx: Fix number of databases for 88E6141 / 88E6341
net: dsa: mv88e6xxx: Add number of MACs in the ATU
net: qede: use return from qede_parse_flow_attr() for flow_spec
net l2tp: drop flow hash on forward
nsh: Restore skb->{protocol,data,mac_header} for outer header in nsh_gso_segment().
bna: ensure the copied buf is NUL terminated
s390/mm: Fix clearing storage keys for huge pages
s390/mm: Fix storage key clearing for guest huge pages
pinctrl: devicetree: fix refcount leak in pinctrl_dt_to_map()
power: rt9455: hide unused rt9455_boost_voltage_values
nfs: Handle error of rpc_proc_register() in nfs_net_init().
nfs: make the rpc_stat per net namespace
nfs: expose /proc/net/sunrpc/nfs in net namespaces
sunrpc: add a struct rpc_stats arg to rpc_create_args
pinctrl: mediatek: paris: Rework support for PIN_CONFIG_{INPUT,OUTPUT}_ENABLE
pinctrl: mediatek: paris: Rework mtk_pinconf_{get,set} switch/case logic
pinctrl: mediatek: paris: Fix PIN_CONFIG_BIAS_* readback
pinctrl: mediatek: remove shadow variable declaration
pinctrl: mediatek: Backward compatible to previous Mediatek's bias-pull usage
pinctrl: mediatek: Refine mtk_pinconf_get()
pinctrl: mediatek: Refine mtk_pinconf_get() and mtk_pinconf_set()
pinctrl: mediatek: Supporting driving setting without mapping current to register value
pinctrl: mediatek: Check gpio pin number and use binary search in mtk_hw_pin_field_lookup()
pinctrl: core: delete incorrect free in pinctrl_enable()
wifi: nl80211: don't free NULL coalescing rule
dmaengine: Revert "dmaengine: pl330: issue_pending waits until WFP state"
dmaengine: pl330: issue_pending waits until WFP state
Revert "clk: Get runtime PM before walking tree during disable_unused"
Linux 5.4.275
serial: core: fix kernel-doc for uart_port_unlock_irqrestore()
udp: preserve the connected status if only UDP cmsg
dm: limit the number of targets and parameter size area
bounds: Use the right number of bits for power-of-two CONFIG_NR_CPUS
HID: i2c-hid: remove I2C_HID_READ_PENDING flag to prevent lock-up
i2c: smbus: fix NULL function pointer dereference
idma64: Don't try to serve interrupts when device is powered off
dmaengine: owl: fix register access functions
tcp: Fix NEW_SYN_RECV handling in inet_twsk_purge()
tcp: Clean up kernel listener's reqsk in inet_twsk_purge()
mtd: diskonchip: work around ubsan link failure
stackdepot: respect __GFP_NOLOCKDEP allocation flag
net: b44: set pause params only when interface is up
ethernet: Add helper for assigning packet type when dest address does not match device address
irqchip/gic-v3-its: Prevent double free on error
drm/amdgpu: Fix leak when GPU memory allocation fails
arm64: dts: rockchip: enable internal pull-up for Q7_THRM# on RK3399 Puma
btrfs: fix information leak in btrfs_ioctl_logical_to_ino()
Bluetooth: btusb: Add Realtek RTL8852BE support ID 0x0bda:0x4853
Bluetooth: Fix type of len in {l2cap,sco}_sock_getsockopt_old()
tracing: Increase PERF_MAX_TRACE_SIZE to handle Sentinel1 and docker together
tracing: Show size of requested perf buffer
net/mlx5e: Fix a race in command alloc flow
Revert "crypto: api - Disallow identical driver names"
drm/amdgpu: validate the parameters of bo mapping operations more clearly
amdgpu: validate offset_in_bo of drm_amdgpu_gem_va
drm/amdgpu: restrict bo mapping within gpu address limits
serial: mxs-auart: add spinlock around changing cts state
serial: core: Provide port lock wrappers
af_unix: Suppress false-positive lockdep splat for spin_lock() in __unix_gc().
iavf: Fix TC config comparison with existing adapter TC config
i40e: Do not use WQ_MEM_RECLAIM flag for workqueue
mlxsw: spectrum_acl_tcam: Fix memory leak when canceling rehash work
mlxsw: spectrum_acl_tcam: Fix incorrect list API usage
mlxsw: spectrum_acl_tcam: Fix warning during rehash
mlxsw: spectrum_acl_tcam: Fix memory leak during rehash
mlxsw: spectrum_acl_tcam: Rate limit error message
mlxsw: spectrum_acl_tcam: Fix possible use-after-free during rehash
mlxsw: spectrum_acl_tcam: Fix possible use-after-free during activity update
mlxsw: spectrum_acl_tcam: Fix race during rehash delayed work
net: openvswitch: Fix Use-After-Free in ovs_ct_exit
ipvs: Fix checksumming on GSO of SCTP packets
net: gtp: Fix Use-After-Free in gtp_dellink
net: usb: ax88179_178a: stop lying about skb->truesize
NFC: trf7970a: disable all regulators on removal
mlxsw: core: Unregister EMAD trap using FORWARD action
vxlan: drop packets from invalid src-address
ARC: [plat-hsdk]: Remove misplaced interrupt-cells property
arm64: dts: mediatek: mt2712: fix validation errors
arm64: dts: mt2712: add ethernet device node
arm64: dts: mediatek: mt7622: drop "reset-names" from thermal block
arm64: dts: mediatek: mt7622: fix ethernet controller "compatible"
arm64: dts: mediatek: mt7622: fix IR nodename
arm64: dts: rockchip: enable internal pull-up on PCIE_WAKE# for RK3399 Puma
arm64: dts: rockchip: fix alphabetical ordering RK3399 puma
KVM: async_pf: Cleanup kvm_setup_async_pf()
nilfs2: fix OOB in nilfs_set_de_type
nouveau: fix instmem race condition around ptr stores
fs: sysfs: Fix reference leak in sysfs_break_active_protection()
speakup: Avoid crash on very long word
usb: Disable USB3 LPM at shutdown
usb: dwc2: host: Fix dereference issue in DDMA completion flow.
Revert "usb: cdc-wdm: close race between read and workqueue"
USB: serial: option: add Telit FN920C04 rmnet compositions
USB: serial: option: add Rolling RW101-GL and RW135-GL support
USB: serial: option: support Quectel EM060K sub-models
USB: serial: option: add Lonsung U8300/U9300 product
USB: serial: option: add support for Fibocom FM650/FG650
USB: serial: option: add Fibocom FM135-GL variants
serial/pmac_zilog: Remove flawed mitigation for rx irq flood
comedi: vmk80xx: fix incomplete endpoint checking
binder: check offset alignment in binder_get_object()
x86/cpufeatures: Fix dependencies for GFNI, VAES, and VPCLMULQDQ
clk: Get runtime PM before walking tree during disable_unused
clk: Initialize struct clk_core kref earlier
clk: Print an info line before disabling unused clocks
clk: remove extra empty line
clk: Mark 'all_lists' as const
clk: Remove prepare_lock hold assertion in __clk_release()
drm: nv04: Fix out of bounds access
RDMA/mlx5: Fix port number for counter query in multi-port configuration
RDMA/rxe: Fix the problem "mutex_destroy missing"
tun: limit printing rate when illegal packet received by tun dev
netfilter: nf_tables: Fix potential data-race in __nft_expr_type_get()
Revert "tracing/trigger: Fix to return error if failed to alloc snapshot"
kprobes: Fix possible use-after-free issue on kprobe registration
selftests/ftrace: Limit length in subsystem-enable tests
btrfs: record delayed inode root in transaction
x86/apic: Force native_apic_mem_read() to use the MOV instruction
selftests: timers: Fix abs() warning in posix_timers test
vhost: Add smp_rmb() in vhost_vq_avail_empty()
drm/client: Fully protect modes[] with dev->mode_config.mutex
btrfs: qgroup: correctly model root qgroup rsv in convert
net: ena: Fix potential sign extension issue
af_unix: Fix garbage collector racing against connect()
af_unix: Do not use atomic ops for unix_sk(sk)->inflight.
net/mlx5: Properly link new fs rules into the tree
ipv6: fix race condition between ipv6_get_ifaddr and ipv6_del_addr
ipv4/route: avoid unused-but-set-variable warning
ipv6: fib: hide unused 'pn' variable
geneve: fix header validation in geneve[6]_xmit_skb
u64_stats: fix u64_stats_init() for lockdep when used repeatedly in one file
net: openvswitch: fix unwanted error log on timeout policy probing
nouveau: fix function cast warning
Bluetooth: Fix memory leak in hci_req_sync_complete()
batman-adv: Avoid infinite loop trying to resize local TT
Change-Id: I36df890fc0cf15277cf5d6be8f56774233fb4431
Signed-off-by: kamasali Satyanarayan <quic_kamasali@quicinc.com>
This commit is contained in:
commit
e88bb9b374
358 changed files with 127185 additions and 123420 deletions
|
|
@ -94,7 +94,6 @@ class KernelInclude(Include):
|
|||
# HINT: this is the only line I had to change / commented out:
|
||||
#path = utils.relative_path(None, path)
|
||||
|
||||
path = nodes.reprunicode(path)
|
||||
encoding = self.options.get(
|
||||
'encoding', self.state.document.settings.input_encoding)
|
||||
e_handler=self.state.document.settings.input_encoding_error_handler
|
||||
|
|
|
|||
2
Makefile
2
Makefile
|
|
@ -1,7 +1,7 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 4
|
||||
SUBLEVEL = 274
|
||||
SUBLEVEL = 278
|
||||
EXTRAVERSION =
|
||||
NAME = Kleptomaniac Octopus
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
LTS_5.4.274_564901bd7f5d
|
||||
LTS_5.4.278_7453ecf4d1fe
|
||||
|
|
|
|||
156642
android/abi_gki_aarch64.xml
156642
android/abi_gki_aarch64.xml
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -205,7 +205,6 @@
|
|||
};
|
||||
|
||||
gmac: ethernet@8000 {
|
||||
#interrupt-cells = <1>;
|
||||
compatible = "snps,dwmac";
|
||||
reg = <0x8000 0x2000>;
|
||||
interrupts = <10>;
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@
|
|||
gic: interrupt-controller@f1001000 {
|
||||
compatible = "arm,gic-400";
|
||||
reg = <0x0 0xf1001000 0x0 0x1000>, /* GICD */
|
||||
<0x0 0xf1002000 0x0 0x100>; /* GICC */
|
||||
<0x0 0xf1002000 0x0 0x2000>; /* GICC */
|
||||
#address-cells = <0>;
|
||||
#interrupt-cells = <3>;
|
||||
interrupt-controller;
|
||||
|
|
|
|||
|
|
@ -105,15 +105,89 @@
|
|||
proc-supply = <&cpus_fixed_vproc1>;
|
||||
};
|
||||
|
||||
ð {
|
||||
phy-mode ="rgmii-rxid";
|
||||
phy-handle = <ðernet_phy0>;
|
||||
mediatek,tx-delay-ps = <1530>;
|
||||
snps,reset-gpio = <&pio 87 GPIO_ACTIVE_LOW>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <ð_default>;
|
||||
pinctrl-1 = <ð_sleep>;
|
||||
status = "okay";
|
||||
|
||||
mdio {
|
||||
compatible = "snps,dwmac-mdio";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
ethernet_phy0: ethernet-phy@5 {
|
||||
compatible = "ethernet-phy-id0243.0d90";
|
||||
reg = <0x5>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pio {
|
||||
usb0_id_pins_float: usb0_iddig {
|
||||
eth_default: eth-default-pins {
|
||||
tx_pins {
|
||||
pinmux = <MT2712_PIN_71_GBE_TXD3__FUNC_GBE_TXD3>,
|
||||
<MT2712_PIN_72_GBE_TXD2__FUNC_GBE_TXD2>,
|
||||
<MT2712_PIN_73_GBE_TXD1__FUNC_GBE_TXD1>,
|
||||
<MT2712_PIN_74_GBE_TXD0__FUNC_GBE_TXD0>,
|
||||
<MT2712_PIN_75_GBE_TXC__FUNC_GBE_TXC>,
|
||||
<MT2712_PIN_76_GBE_TXEN__FUNC_GBE_TXEN>;
|
||||
drive-strength = <MTK_DRIVE_8mA>;
|
||||
};
|
||||
rx_pins {
|
||||
pinmux = <MT2712_PIN_78_GBE_RXD3__FUNC_GBE_RXD3>,
|
||||
<MT2712_PIN_79_GBE_RXD2__FUNC_GBE_RXD2>,
|
||||
<MT2712_PIN_80_GBE_RXD1__FUNC_GBE_RXD1>,
|
||||
<MT2712_PIN_81_GBE_RXD0__FUNC_GBE_RXD0>,
|
||||
<MT2712_PIN_82_GBE_RXDV__FUNC_GBE_RXDV>,
|
||||
<MT2712_PIN_84_GBE_RXC__FUNC_GBE_RXC>;
|
||||
input-enable;
|
||||
};
|
||||
mdio_pins {
|
||||
pinmux = <MT2712_PIN_85_GBE_MDC__FUNC_GBE_MDC>,
|
||||
<MT2712_PIN_86_GBE_MDIO__FUNC_GBE_MDIO>;
|
||||
drive-strength = <MTK_DRIVE_8mA>;
|
||||
input-enable;
|
||||
};
|
||||
};
|
||||
|
||||
eth_sleep: eth-sleep-pins {
|
||||
tx_pins {
|
||||
pinmux = <MT2712_PIN_71_GBE_TXD3__FUNC_GPIO71>,
|
||||
<MT2712_PIN_72_GBE_TXD2__FUNC_GPIO72>,
|
||||
<MT2712_PIN_73_GBE_TXD1__FUNC_GPIO73>,
|
||||
<MT2712_PIN_74_GBE_TXD0__FUNC_GPIO74>,
|
||||
<MT2712_PIN_75_GBE_TXC__FUNC_GPIO75>,
|
||||
<MT2712_PIN_76_GBE_TXEN__FUNC_GPIO76>;
|
||||
};
|
||||
rx_pins {
|
||||
pinmux = <MT2712_PIN_78_GBE_RXD3__FUNC_GPIO78>,
|
||||
<MT2712_PIN_79_GBE_RXD2__FUNC_GPIO79>,
|
||||
<MT2712_PIN_80_GBE_RXD1__FUNC_GPIO80>,
|
||||
<MT2712_PIN_81_GBE_RXD0__FUNC_GPIO81>,
|
||||
<MT2712_PIN_82_GBE_RXDV__FUNC_GPIO82>,
|
||||
<MT2712_PIN_84_GBE_RXC__FUNC_GPIO84>;
|
||||
input-disable;
|
||||
};
|
||||
mdio_pins {
|
||||
pinmux = <MT2712_PIN_85_GBE_MDC__FUNC_GPIO85>,
|
||||
<MT2712_PIN_86_GBE_MDIO__FUNC_GPIO86>;
|
||||
input-disable;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
usb0_id_pins_float: usb0-iddig-pins {
|
||||
pins_iddig {
|
||||
pinmux = <MT2712_PIN_12_IDDIG_P0__FUNC_IDDIG_A>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
usb1_id_pins_float: usb1_iddig {
|
||||
usb1_id_pins_float: usb1-iddig-pins {
|
||||
pins_iddig {
|
||||
pinmux = <MT2712_PIN_14_IDDIG_P1__FUNC_IDDIG_B>;
|
||||
bias-pull-up;
|
||||
|
|
|
|||
|
|
@ -249,10 +249,11 @@
|
|||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
infracfg: syscon@10001000 {
|
||||
infracfg: clock-controller@10001000 {
|
||||
compatible = "mediatek,mt2712-infracfg", "syscon";
|
||||
reg = <0 0x10001000 0 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
#reset-cells = <1>;
|
||||
};
|
||||
|
||||
pericfg: syscon@10003000 {
|
||||
|
|
@ -632,6 +633,71 @@
|
|||
status = "disabled";
|
||||
};
|
||||
|
||||
stmmac_axi_setup: stmmac-axi-config {
|
||||
snps,wr_osr_lmt = <0x7>;
|
||||
snps,rd_osr_lmt = <0x7>;
|
||||
snps,blen = <0 0 0 0 16 8 4>;
|
||||
};
|
||||
|
||||
mtl_rx_setup: rx-queues-config {
|
||||
snps,rx-queues-to-use = <1>;
|
||||
snps,rx-sched-sp;
|
||||
queue0 {
|
||||
snps,dcb-algorithm;
|
||||
snps,map-to-dma-channel = <0x0>;
|
||||
snps,priority = <0x0>;
|
||||
};
|
||||
};
|
||||
|
||||
mtl_tx_setup: tx-queues-config {
|
||||
snps,tx-queues-to-use = <3>;
|
||||
snps,tx-sched-wrr;
|
||||
queue0 {
|
||||
snps,weight = <0x10>;
|
||||
snps,dcb-algorithm;
|
||||
snps,priority = <0x0>;
|
||||
};
|
||||
queue1 {
|
||||
snps,weight = <0x11>;
|
||||
snps,dcb-algorithm;
|
||||
snps,priority = <0x1>;
|
||||
};
|
||||
queue2 {
|
||||
snps,weight = <0x12>;
|
||||
snps,dcb-algorithm;
|
||||
snps,priority = <0x2>;
|
||||
};
|
||||
};
|
||||
|
||||
eth: ethernet@1101c000 {
|
||||
compatible = "mediatek,mt2712-gmac";
|
||||
reg = <0 0x1101c000 0 0x1300>;
|
||||
interrupts = <GIC_SPI 237 IRQ_TYPE_LEVEL_LOW>;
|
||||
interrupt-names = "macirq";
|
||||
mac-address = [00 55 7b b5 7d f7];
|
||||
clock-names = "axi",
|
||||
"apb",
|
||||
"mac_main",
|
||||
"ptp_ref";
|
||||
clocks = <&pericfg CLK_PERI_GMAC>,
|
||||
<&pericfg CLK_PERI_GMAC_PCLK>,
|
||||
<&topckgen CLK_TOP_ETHER_125M_SEL>,
|
||||
<&topckgen CLK_TOP_ETHER_50M_SEL>;
|
||||
assigned-clocks = <&topckgen CLK_TOP_ETHER_125M_SEL>,
|
||||
<&topckgen CLK_TOP_ETHER_50M_SEL>;
|
||||
assigned-clock-parents = <&topckgen CLK_TOP_ETHERPLL_125M>,
|
||||
<&topckgen CLK_TOP_APLL1_D3>;
|
||||
power-domains = <&scpsys MT2712_POWER_DOMAIN_AUDIO>;
|
||||
mediatek,pericfg = <&pericfg>;
|
||||
snps,axi-config = <&stmmac_axi_setup>;
|
||||
snps,mtl-rx-config = <&mtl_rx_setup>;
|
||||
snps,mtl-tx-config = <&mtl_tx_setup>;
|
||||
snps,txpbl = <1>;
|
||||
snps,rxpbl = <1>;
|
||||
clk_csr = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
mmc0: mmc@11230000 {
|
||||
compatible = "mediatek,mt2712-mmc";
|
||||
reg = <0 0x11230000 0 0x1000>;
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@
|
|||
clock-names = "hif_sel";
|
||||
};
|
||||
|
||||
cir: cir@10009000 {
|
||||
cir: ir-receiver@10009000 {
|
||||
compatible = "mediatek,mt7622-cir";
|
||||
reg = <0 0x10009000 0 0x1000>;
|
||||
interrupts = <GIC_SPI 175 IRQ_TYPE_LEVEL_LOW>;
|
||||
|
|
@ -507,7 +507,6 @@
|
|||
<&pericfg CLK_PERI_AUXADC_PD>;
|
||||
clock-names = "therm", "auxadc";
|
||||
resets = <&pericfg MT7622_PERI_THERM_SW_RST>;
|
||||
reset-names = "therm";
|
||||
mediatek,auxadc = <&auxadc>;
|
||||
mediatek,apmixedsys = <&apmixedsys>;
|
||||
nvmem-cells = <&thermal_calibration>;
|
||||
|
|
@ -901,9 +900,7 @@
|
|||
};
|
||||
|
||||
eth: ethernet@1b100000 {
|
||||
compatible = "mediatek,mt7622-eth",
|
||||
"mediatek,mt2701-eth",
|
||||
"syscon";
|
||||
compatible = "mediatek,mt7622-eth";
|
||||
reg = <0 0x1b100000 0 0x20000>;
|
||||
interrupts = <GIC_SPI 223 IRQ_TYPE_LEVEL_LOW>,
|
||||
<GIC_SPI 224 IRQ_TYPE_LEVEL_LOW>,
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@
|
|||
compatible = "nvidia,norrin", "nvidia,tegra132", "nvidia,tegra124";
|
||||
|
||||
aliases {
|
||||
rtc0 = "/i2c@7000d000/as3722@40";
|
||||
rtc1 = "/rtc@7000e000";
|
||||
rtc0 = &as3722;
|
||||
rtc1 = &tegra_rtc;
|
||||
serial0 = &uarta;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -569,7 +569,7 @@
|
|||
status = "disabled";
|
||||
};
|
||||
|
||||
rtc@7000e000 {
|
||||
tegra_rtc: rtc@7000e000 {
|
||||
compatible = "nvidia,tegra124-rtc", "nvidia,tegra20-rtc";
|
||||
reg = <0x0 0x7000e000 0x0 0x100>;
|
||||
interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
|
|
|||
|
|
@ -872,10 +872,10 @@
|
|||
interrupts = <GIC_SPI 405 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "msi";
|
||||
interrupt-map-mask = <0 0 0 0x7>;
|
||||
interrupt-map = <0 0 0 1 &intc 0 135 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<0 0 0 2 &intc 0 136 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<0 0 0 3 &intc 0 138 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<0 0 0 4 &intc 0 139 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-map = <0 0 0 1 &intc 0 0 135 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<0 0 0 2 &intc 0 0 136 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<0 0 0 3 &intc 0 0 138 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<0 0 0 4 &intc 0 0 139 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
clocks = <&gcc GCC_PCIE_0_PIPE_CLK>,
|
||||
<&gcc GCC_PCIE_0_MSTR_AXI_CLK>,
|
||||
|
|
|
|||
|
|
@ -425,16 +425,22 @@
|
|||
gpio1830-supply = <&vcc_1v8>;
|
||||
};
|
||||
|
||||
&pmu_io_domains {
|
||||
status = "okay";
|
||||
pmu1830-supply = <&vcc_1v8>;
|
||||
};
|
||||
|
||||
&pwm2 {
|
||||
status = "okay";
|
||||
&pcie_clkreqn_cpm {
|
||||
rockchip,pins =
|
||||
<2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&q7_thermal_pin>;
|
||||
|
||||
gpios {
|
||||
q7_thermal_pin: q7-thermal-pin {
|
||||
rockchip,pins =
|
||||
<0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
};
|
||||
|
||||
i2c8 {
|
||||
i2c8_xfer_a: i2c8-xfer {
|
||||
rockchip,pins =
|
||||
|
|
@ -465,6 +471,15 @@
|
|||
};
|
||||
};
|
||||
|
||||
&pmu_io_domains {
|
||||
status = "okay";
|
||||
pmu1830-supply = <&vcc_1v8>;
|
||||
};
|
||||
|
||||
&pwm2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdhci {
|
||||
/*
|
||||
* Signal integrity isn't great at 200MHz but 100MHz has proven stable
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
14470: .long 14471f - 14470b; \
|
||||
_BUGVERBOSE_LOCATION(__FILE__, __LINE__) \
|
||||
.short flags; \
|
||||
.align 2; \
|
||||
.popsection; \
|
||||
14471:
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -470,16 +470,19 @@ __primary_switched:
|
|||
b start_kernel
|
||||
ENDPROC(__primary_switched)
|
||||
|
||||
.pushsection ".rodata", "a"
|
||||
SYM_DATA_START(kimage_vaddr)
|
||||
.quad _text - TEXT_OFFSET
|
||||
SYM_DATA_END(kimage_vaddr)
|
||||
EXPORT_SYMBOL(kimage_vaddr)
|
||||
.popsection
|
||||
|
||||
/*
|
||||
* end early head section, begin head code that is also used for
|
||||
* hotplug and needs to have the same protections as the text region
|
||||
*/
|
||||
.section ".idmap.text","awx"
|
||||
|
||||
ENTRY(kimage_vaddr)
|
||||
.quad _text - TEXT_OFFSET
|
||||
EXPORT_SYMBOL(kimage_vaddr)
|
||||
|
||||
/*
|
||||
* If we're fortunate enough to boot at EL2, ensure that the world is
|
||||
* sane before dropping to EL1.
|
||||
|
|
@ -679,15 +682,17 @@ ENDPROC(set_cpu_boot_mode_flag)
|
|||
* This is not in .bss, because we set it sufficiently early that the boot-time
|
||||
* zeroing of .bss would clobber it.
|
||||
*/
|
||||
ENTRY(__boot_cpu_mode)
|
||||
SYM_DATA_START(__boot_cpu_mode)
|
||||
.long BOOT_CPU_MODE_EL2
|
||||
.long BOOT_CPU_MODE_EL1
|
||||
SYM_DATA_END(__boot_cpu_mode)
|
||||
/*
|
||||
* The booting CPU updates the failed status @__early_cpu_boot_status,
|
||||
* with MMU turned off.
|
||||
*/
|
||||
ENTRY(__early_cpu_boot_status)
|
||||
SYM_DATA_START(__early_cpu_boot_status)
|
||||
.quad 0
|
||||
SYM_DATA_END(__early_cpu_boot_status)
|
||||
|
||||
.popsection
|
||||
|
||||
|
|
|
|||
|
|
@ -186,6 +186,7 @@ static int set_core_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg)
|
|||
case PSR_AA32_MODE_SVC:
|
||||
case PSR_AA32_MODE_ABT:
|
||||
case PSR_AA32_MODE_UND:
|
||||
case PSR_AA32_MODE_SYS:
|
||||
if (!vcpu_el1_is_32bit(vcpu))
|
||||
return -EINVAL;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -425,7 +425,9 @@ resume:
|
|||
movec %a0,%dfc
|
||||
|
||||
/* restore status register */
|
||||
movew %a1@(TASK_THREAD+THREAD_SR),%sr
|
||||
movew %a1@(TASK_THREAD+THREAD_SR),%d0
|
||||
oriw #0x0700,%d0
|
||||
movew %d0,%sr
|
||||
|
||||
rts
|
||||
|
||||
|
|
|
|||
|
|
@ -452,30 +452,18 @@ void mac_poweroff(void)
|
|||
|
||||
void mac_reset(void)
|
||||
{
|
||||
if (macintosh_config->adb_type == MAC_ADB_II &&
|
||||
macintosh_config->ident != MAC_MODEL_SE30) {
|
||||
/* need ROMBASE in booter */
|
||||
/* indeed, plus need to MAP THE ROM !! */
|
||||
|
||||
if (mac_bi_data.rombase == 0)
|
||||
mac_bi_data.rombase = 0x40800000;
|
||||
|
||||
/* works on some */
|
||||
rom_reset = (void *) (mac_bi_data.rombase + 0xa);
|
||||
|
||||
local_irq_disable();
|
||||
rom_reset();
|
||||
#ifdef CONFIG_ADB_CUDA
|
||||
} else if (macintosh_config->adb_type == MAC_ADB_EGRET ||
|
||||
macintosh_config->adb_type == MAC_ADB_CUDA) {
|
||||
if (macintosh_config->adb_type == MAC_ADB_EGRET ||
|
||||
macintosh_config->adb_type == MAC_ADB_CUDA) {
|
||||
cuda_restart();
|
||||
} else
|
||||
#endif
|
||||
#ifdef CONFIG_ADB_PMU
|
||||
} else if (macintosh_config->adb_type == MAC_ADB_PB2) {
|
||||
if (macintosh_config->adb_type == MAC_ADB_PB2) {
|
||||
pmu_restart();
|
||||
} else
|
||||
#endif
|
||||
} else if (CPU_IS_030) {
|
||||
|
||||
if (CPU_IS_030) {
|
||||
/* 030-specific reset routine. The idea is general, but the
|
||||
* specific registers to reset are '030-specific. Until I
|
||||
* have a non-030 machine, I can't test anything else.
|
||||
|
|
@ -523,6 +511,18 @@ void mac_reset(void)
|
|||
"jmp %/a0@\n\t" /* jump to the reset vector */
|
||||
".chip 68k"
|
||||
: : "r" (offset), "a" (rombase) : "a0");
|
||||
} else {
|
||||
/* need ROMBASE in booter */
|
||||
/* indeed, plus need to MAP THE ROM !! */
|
||||
|
||||
if (mac_bi_data.rombase == 0)
|
||||
mac_bi_data.rombase = 0x40800000;
|
||||
|
||||
/* works on some */
|
||||
rom_reset = (void *)(mac_bi_data.rombase + 0xa);
|
||||
|
||||
local_irq_disable();
|
||||
rom_reset();
|
||||
}
|
||||
|
||||
/* should never get here */
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ ifdef CONFIG_FUNCTION_TRACER
|
|||
# Do not trace early boot code and low level code
|
||||
CFLAGS_REMOVE_timer.o = -pg
|
||||
CFLAGS_REMOVE_intc.o = -pg
|
||||
CFLAGS_REMOVE_early_printk.o = -pg
|
||||
CFLAGS_REMOVE_ftrace.o = -pg
|
||||
CFLAGS_REMOVE_process.o = -pg
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ static const char family_string[] = CONFIG_XILINX_MICROBLAZE0_FAMILY;
|
|||
static const char cpu_ver_string[] = CONFIG_XILINX_MICROBLAZE0_HW_VER;
|
||||
|
||||
#define err_printk(x) \
|
||||
early_printk("ERROR: Microblaze " x "-different for kernel and DTS\n");
|
||||
pr_err("ERROR: Microblaze " x "-different for kernel and DTS\n");
|
||||
|
||||
void __init set_cpuinfo_static(struct cpuinfo *ci, struct device_node *cpu)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ static inline long regs_return_value(struct pt_regs *regs)
|
|||
#define instruction_pointer(regs) ((regs)->cp0_epc)
|
||||
#define profile_pc(regs) instruction_pointer(regs)
|
||||
|
||||
extern asmlinkage long syscall_trace_enter(struct pt_regs *regs, long syscall);
|
||||
extern asmlinkage long syscall_trace_enter(struct pt_regs *regs);
|
||||
extern asmlinkage void syscall_trace_leave(struct pt_regs *regs);
|
||||
|
||||
extern void die(const char *, struct pt_regs *) __noreturn;
|
||||
|
|
|
|||
|
|
@ -100,6 +100,7 @@ void output_thread_info_defines(void)
|
|||
OFFSET(TI_PRE_COUNT, thread_info, preempt_count);
|
||||
OFFSET(TI_ADDR_LIMIT, thread_info, addr_limit);
|
||||
OFFSET(TI_REGS, thread_info, regs);
|
||||
OFFSET(TI_SYSCALL, thread_info, syscall);
|
||||
DEFINE(_THREAD_SIZE, THREAD_SIZE);
|
||||
DEFINE(_THREAD_MASK, THREAD_MASK);
|
||||
DEFINE(_IRQ_STACK_SIZE, IRQ_STACK_SIZE);
|
||||
|
|
|
|||
|
|
@ -1399,16 +1399,13 @@ long arch_ptrace(struct task_struct *child, long request,
|
|||
* Notification of system call entry/exit
|
||||
* - triggered by current->work.syscall_trace
|
||||
*/
|
||||
asmlinkage long syscall_trace_enter(struct pt_regs *regs, long syscall)
|
||||
asmlinkage long syscall_trace_enter(struct pt_regs *regs)
|
||||
{
|
||||
user_exit();
|
||||
|
||||
current_thread_info()->syscall = syscall;
|
||||
|
||||
if (test_thread_flag(TIF_SYSCALL_TRACE)) {
|
||||
if (tracehook_report_syscall_entry(regs))
|
||||
return -1;
|
||||
syscall = current_thread_info()->syscall;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SECCOMP
|
||||
|
|
@ -1417,7 +1414,7 @@ asmlinkage long syscall_trace_enter(struct pt_regs *regs, long syscall)
|
|||
struct seccomp_data sd;
|
||||
unsigned long args[6];
|
||||
|
||||
sd.nr = syscall;
|
||||
sd.nr = current_thread_info()->syscall;
|
||||
sd.arch = syscall_get_arch(current);
|
||||
syscall_get_arguments(current, regs, args);
|
||||
for (i = 0; i < 6; i++)
|
||||
|
|
@ -1427,23 +1424,23 @@ asmlinkage long syscall_trace_enter(struct pt_regs *regs, long syscall)
|
|||
ret = __secure_computing(&sd);
|
||||
if (ret == -1)
|
||||
return ret;
|
||||
syscall = current_thread_info()->syscall;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
|
||||
trace_sys_enter(regs, regs->regs[2]);
|
||||
|
||||
audit_syscall_entry(syscall, regs->regs[4], regs->regs[5],
|
||||
audit_syscall_entry(current_thread_info()->syscall,
|
||||
regs->regs[4], regs->regs[5],
|
||||
regs->regs[6], regs->regs[7]);
|
||||
|
||||
/*
|
||||
* Negative syscall numbers are mistaken for rejected syscalls, but
|
||||
* won't have had the return value set appropriately, so we do so now.
|
||||
*/
|
||||
if (syscall < 0)
|
||||
if (current_thread_info()->syscall < 0)
|
||||
syscall_set_return_value(current, regs, -ENOSYS, 0);
|
||||
return syscall;
|
||||
return current_thread_info()->syscall;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -80,6 +80,18 @@ loads_done:
|
|||
PTR load_a7, bad_stack_a7
|
||||
.previous
|
||||
|
||||
/*
|
||||
* syscall number is in v0 unless we called syscall(__NR_###)
|
||||
* where the real syscall number is in a0
|
||||
*/
|
||||
subu t2, v0, __NR_O32_Linux
|
||||
bnez t2, 1f /* __NR_syscall at offset 0 */
|
||||
LONG_S a0, TI_SYSCALL($28) # Save a0 as syscall number
|
||||
b 2f
|
||||
1:
|
||||
LONG_S v0, TI_SYSCALL($28) # Save v0 as syscall number
|
||||
2:
|
||||
|
||||
lw t0, TI_FLAGS($28) # syscall tracing enabled?
|
||||
li t1, _TIF_WORK_SYSCALL_ENTRY
|
||||
and t0, t1
|
||||
|
|
@ -117,16 +129,7 @@ syscall_trace_entry:
|
|||
SAVE_STATIC
|
||||
move a0, sp
|
||||
|
||||
/*
|
||||
* syscall number is in v0 unless we called syscall(__NR_###)
|
||||
* where the real syscall number is in a0
|
||||
*/
|
||||
move a1, v0
|
||||
subu t2, v0, __NR_O32_Linux
|
||||
bnez t2, 1f /* __NR_syscall at offset 0 */
|
||||
lw a1, PT_R4(sp)
|
||||
|
||||
1: jal syscall_trace_enter
|
||||
jal syscall_trace_enter
|
||||
|
||||
bltz v0, 1f # seccomp failed? Skip syscall
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,8 @@ NESTED(handle_sysn32, PT_SIZE, sp)
|
|||
|
||||
sd a3, PT_R26(sp) # save a3 for syscall restarting
|
||||
|
||||
LONG_S v0, TI_SYSCALL($28) # Store syscall number
|
||||
|
||||
li t1, _TIF_WORK_SYSCALL_ENTRY
|
||||
LONG_L t0, TI_FLAGS($28) # syscall tracing enabled?
|
||||
and t0, t1, t0
|
||||
|
|
@ -72,7 +74,6 @@ syscall_common:
|
|||
n32_syscall_trace_entry:
|
||||
SAVE_STATIC
|
||||
move a0, sp
|
||||
move a1, v0
|
||||
jal syscall_trace_enter
|
||||
|
||||
bltz v0, 1f # seccomp failed? Skip syscall
|
||||
|
|
|
|||
|
|
@ -47,6 +47,8 @@ NESTED(handle_sys64, PT_SIZE, sp)
|
|||
|
||||
sd a3, PT_R26(sp) # save a3 for syscall restarting
|
||||
|
||||
LONG_S v0, TI_SYSCALL($28) # Store syscall number
|
||||
|
||||
li t1, _TIF_WORK_SYSCALL_ENTRY
|
||||
LONG_L t0, TI_FLAGS($28) # syscall tracing enabled?
|
||||
and t0, t1, t0
|
||||
|
|
@ -83,7 +85,6 @@ n64_syscall_exit:
|
|||
syscall_trace_entry:
|
||||
SAVE_STATIC
|
||||
move a0, sp
|
||||
move a1, v0
|
||||
jal syscall_trace_enter
|
||||
|
||||
bltz v0, 1f # seccomp failed? Skip syscall
|
||||
|
|
|
|||
|
|
@ -79,6 +79,22 @@ loads_done:
|
|||
PTR load_a7, bad_stack_a7
|
||||
.previous
|
||||
|
||||
/*
|
||||
* absolute syscall number is in v0 unless we called syscall(__NR_###)
|
||||
* where the real syscall number is in a0
|
||||
* note: NR_syscall is the first O32 syscall but the macro is
|
||||
* only defined when compiling with -mabi=32 (CONFIG_32BIT)
|
||||
* therefore __NR_O32_Linux is used (4000)
|
||||
*/
|
||||
|
||||
subu t2, v0, __NR_O32_Linux
|
||||
bnez t2, 1f /* __NR_syscall at offset 0 */
|
||||
LONG_S a0, TI_SYSCALL($28) # Save a0 as syscall number
|
||||
b 2f
|
||||
1:
|
||||
LONG_S v0, TI_SYSCALL($28) # Save v0 as syscall number
|
||||
2:
|
||||
|
||||
li t1, _TIF_WORK_SYSCALL_ENTRY
|
||||
LONG_L t0, TI_FLAGS($28) # syscall tracing enabled?
|
||||
and t0, t1, t0
|
||||
|
|
@ -113,22 +129,7 @@ trace_a_syscall:
|
|||
sd a7, PT_R11(sp) # For indirect syscalls
|
||||
|
||||
move a0, sp
|
||||
/*
|
||||
* absolute syscall number is in v0 unless we called syscall(__NR_###)
|
||||
* where the real syscall number is in a0
|
||||
* note: NR_syscall is the first O32 syscall but the macro is
|
||||
* only defined when compiling with -mabi=32 (CONFIG_32BIT)
|
||||
* therefore __NR_O32_Linux is used (4000)
|
||||
*/
|
||||
.set push
|
||||
.set reorder
|
||||
subu t1, v0, __NR_O32_Linux
|
||||
move a1, v0
|
||||
bnez t1, 1f /* __NR_syscall at offset 0 */
|
||||
ld a1, PT_R4(sp) /* Arg1 for __NR_syscall case */
|
||||
.set pop
|
||||
|
||||
1: jal syscall_trace_enter
|
||||
jal syscall_trace_enter
|
||||
|
||||
bltz v0, 1f # seccomp failed? Skip syscall
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ EXPORT_SYMBOL(memset);
|
|||
#include <linux/atomic.h>
|
||||
EXPORT_SYMBOL(__xchg8);
|
||||
EXPORT_SYMBOL(__xchg32);
|
||||
EXPORT_SYMBOL(__cmpxchg_u8);
|
||||
EXPORT_SYMBOL(__cmpxchg_u32);
|
||||
EXPORT_SYMBOL(__cmpxchg_u64);
|
||||
#ifdef CONFIG_SMP
|
||||
|
|
|
|||
|
|
@ -444,7 +444,7 @@ struct hvcall_mpp_data {
|
|||
unsigned long backing_mem;
|
||||
};
|
||||
|
||||
int h_get_mpp(struct hvcall_mpp_data *);
|
||||
long h_get_mpp(struct hvcall_mpp_data *mpp_data);
|
||||
|
||||
struct hvcall_mpp_x_data {
|
||||
unsigned long coalesced_bytes;
|
||||
|
|
|
|||
|
|
@ -1871,10 +1871,10 @@ out:
|
|||
* h_get_mpp
|
||||
* H_GET_MPP hcall returns info in 7 parms
|
||||
*/
|
||||
int h_get_mpp(struct hvcall_mpp_data *mpp_data)
|
||||
long h_get_mpp(struct hvcall_mpp_data *mpp_data)
|
||||
{
|
||||
int rc;
|
||||
unsigned long retbuf[PLPAR_HCALL9_BUFSIZE];
|
||||
unsigned long retbuf[PLPAR_HCALL9_BUFSIZE] = {0};
|
||||
long rc;
|
||||
|
||||
rc = plpar_hcall9(H_GET_MPP, retbuf);
|
||||
|
||||
|
|
|
|||
|
|
@ -112,8 +112,8 @@ struct hvcall_ppp_data {
|
|||
*/
|
||||
static unsigned int h_get_ppp(struct hvcall_ppp_data *ppp_data)
|
||||
{
|
||||
unsigned long rc;
|
||||
unsigned long retbuf[PLPAR_HCALL9_BUFSIZE];
|
||||
unsigned long retbuf[PLPAR_HCALL9_BUFSIZE] = {0};
|
||||
long rc;
|
||||
|
||||
rc = plpar_hcall9(H_GET_PPP, retbuf);
|
||||
|
||||
|
|
@ -159,7 +159,7 @@ static void parse_ppp_data(struct seq_file *m)
|
|||
struct hvcall_ppp_data ppp_data;
|
||||
struct device_node *root;
|
||||
const __be32 *perf_level;
|
||||
int rc;
|
||||
long rc;
|
||||
|
||||
rc = h_get_ppp(&ppp_data);
|
||||
if (rc)
|
||||
|
|
|
|||
|
|
@ -573,10 +573,12 @@ static const struct fsl_msi_feature ipic_msi_feature = {
|
|||
.msiir_offset = 0x38,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_EPAPR_PARAVIRT
|
||||
static const struct fsl_msi_feature vmpic_msi_feature = {
|
||||
.fsl_pic_ip = FSL_PIC_IP_VMPIC,
|
||||
.msiir_offset = 0,
|
||||
};
|
||||
#endif
|
||||
|
||||
static const struct of_device_id fsl_of_msi_ids[] = {
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2610,7 +2610,7 @@ static int __s390_enable_skey_hugetlb(pte_t *pte, unsigned long addr,
|
|||
return 0;
|
||||
|
||||
start = pmd_val(*pmd) & HPAGE_MASK;
|
||||
end = start + HPAGE_SIZE - 1;
|
||||
end = start + HPAGE_SIZE;
|
||||
__storage_key_init_range(start, end);
|
||||
set_bit(PG_arch_1, &page->flags);
|
||||
cond_resched();
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ static void clear_huge_pte_skeys(struct mm_struct *mm, unsigned long rste)
|
|||
}
|
||||
|
||||
if (!test_and_set_bit(PG_arch_1, &page->flags))
|
||||
__storage_key_init_range(paddr, paddr + size - 1);
|
||||
__storage_key_init_range(paddr, paddr + size);
|
||||
}
|
||||
|
||||
void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
|
||||
|
|
|
|||
|
|
@ -44,17 +44,12 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p)
|
|||
if (OPCODE_RTE(opcode))
|
||||
return -EFAULT; /* Bad breakpoint */
|
||||
|
||||
memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t));
|
||||
p->opcode = opcode;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __kprobes arch_copy_kprobe(struct kprobe *p)
|
||||
{
|
||||
memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t));
|
||||
p->opcode = *p->addr;
|
||||
}
|
||||
|
||||
void __kprobes arch_arm_kprobe(struct kprobe *p)
|
||||
{
|
||||
*p->addr = BREAKPOINT_INSTRUCTION;
|
||||
|
|
|
|||
|
|
@ -33,7 +33,8 @@
|
|||
*/
|
||||
|
||||
/*
|
||||
* asmlinkage __wsum csum_partial(const void *buf, int len, __wsum sum);
|
||||
* unsigned int csum_partial(const unsigned char *buf, int len,
|
||||
* unsigned int sum);
|
||||
*/
|
||||
|
||||
.text
|
||||
|
|
@ -45,31 +46,11 @@ ENTRY(csum_partial)
|
|||
* Fortunately, it is easy to convert 2-byte alignment to 4-byte
|
||||
* alignment for the unrolled loop.
|
||||
*/
|
||||
mov r5, r1
|
||||
mov r4, r0
|
||||
tst #3, r0 ! Check alignment.
|
||||
bt/s 2f ! Jump if alignment is ok.
|
||||
mov r4, r7 ! Keep a copy to check for alignment
|
||||
tst #2, r0 ! Check alignment.
|
||||
bt 2f ! Jump if alignment is ok.
|
||||
!
|
||||
tst #1, r0 ! Check alignment.
|
||||
bt 21f ! Jump if alignment is boundary of 2bytes.
|
||||
|
||||
! buf is odd
|
||||
tst r5, r5
|
||||
add #-1, r5
|
||||
bt 9f
|
||||
mov.b @r4+, r0
|
||||
extu.b r0, r0
|
||||
addc r0, r6 ! t=0 from previous tst
|
||||
mov r6, r0
|
||||
shll8 r6
|
||||
shlr16 r0
|
||||
shlr8 r0
|
||||
or r0, r6
|
||||
mov r4, r0
|
||||
tst #2, r0
|
||||
bt 2f
|
||||
21:
|
||||
! buf is 2 byte aligned (len could be 0)
|
||||
add #-2, r5 ! Alignment uses up two bytes.
|
||||
cmp/pz r5 !
|
||||
bt/s 1f ! Jump if we had at least two bytes.
|
||||
|
|
@ -77,17 +58,16 @@ ENTRY(csum_partial)
|
|||
bra 6f
|
||||
add #2, r5 ! r5 was < 2. Deal with it.
|
||||
1:
|
||||
mov r5, r1 ! Save new len for later use.
|
||||
mov.w @r4+, r0
|
||||
extu.w r0, r0
|
||||
addc r0, r6
|
||||
bf 2f
|
||||
add #1, r6
|
||||
2:
|
||||
! buf is 4 byte aligned (len could be 0)
|
||||
mov r5, r1
|
||||
mov #-5, r0
|
||||
shld r0, r1
|
||||
tst r1, r1
|
||||
shld r0, r5
|
||||
tst r5, r5
|
||||
bt/s 4f ! if it's =0, go to 4f
|
||||
clrt
|
||||
.align 2
|
||||
|
|
@ -109,31 +89,30 @@ ENTRY(csum_partial)
|
|||
addc r0, r6
|
||||
addc r2, r6
|
||||
movt r0
|
||||
dt r1
|
||||
dt r5
|
||||
bf/s 3b
|
||||
cmp/eq #1, r0
|
||||
! here, we know r1==0
|
||||
addc r1, r6 ! add carry to r6
|
||||
! here, we know r5==0
|
||||
addc r5, r6 ! add carry to r6
|
||||
4:
|
||||
mov r5, r0
|
||||
mov r1, r0
|
||||
and #0x1c, r0
|
||||
tst r0, r0
|
||||
bt 6f
|
||||
! 4 bytes or more remaining
|
||||
mov r0, r1
|
||||
shlr2 r1
|
||||
bt/s 6f
|
||||
mov r0, r5
|
||||
shlr2 r5
|
||||
mov #0, r2
|
||||
5:
|
||||
addc r2, r6
|
||||
mov.l @r4+, r2
|
||||
movt r0
|
||||
dt r1
|
||||
dt r5
|
||||
bf/s 5b
|
||||
cmp/eq #1, r0
|
||||
addc r2, r6
|
||||
addc r1, r6 ! r1==0 here, so it means add carry-bit
|
||||
addc r5, r6 ! r5==0 here, so it means add carry-bit
|
||||
6:
|
||||
! 3 bytes or less remaining
|
||||
mov r1, r5
|
||||
mov #3, r0
|
||||
and r0, r5
|
||||
tst r5, r5
|
||||
|
|
@ -159,16 +138,6 @@ ENTRY(csum_partial)
|
|||
mov #0, r0
|
||||
addc r0, r6
|
||||
9:
|
||||
! Check if the buffer was misaligned, if so realign sum
|
||||
mov r7, r0
|
||||
tst #1, r0
|
||||
bt 10f
|
||||
mov r6, r0
|
||||
shll8 r6
|
||||
shlr16 r0
|
||||
shlr8 r0
|
||||
or r0, r6
|
||||
10:
|
||||
rts
|
||||
mov r6, r0
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,6 @@ void arch_send_call_function_ipi_mask(const struct cpumask *mask);
|
|||
int hard_smp_processor_id(void);
|
||||
#define raw_smp_processor_id() (current_thread_info()->cpu)
|
||||
|
||||
void smp_fill_in_cpu_possible_map(void);
|
||||
void smp_fill_in_sib_core_maps(void);
|
||||
void cpu_play_dead(void);
|
||||
|
||||
|
|
@ -77,7 +76,6 @@ void __cpu_die(unsigned int cpu);
|
|||
#define smp_fill_in_sib_core_maps() do { } while (0)
|
||||
#define smp_fetch_global_regs() do { } while (0)
|
||||
#define smp_fetch_global_pmu() do { } while (0)
|
||||
#define smp_fill_in_cpu_possible_map() do { } while (0)
|
||||
#define smp_init_cpu_poke() do { } while (0)
|
||||
#define scheduler_poke() do { } while (0)
|
||||
|
||||
|
|
|
|||
|
|
@ -13,16 +13,6 @@ typedef unsigned int tcflag_t;
|
|||
typedef unsigned long tcflag_t;
|
||||
#endif
|
||||
|
||||
#define NCC 8
|
||||
struct termio {
|
||||
unsigned short c_iflag; /* input mode flags */
|
||||
unsigned short c_oflag; /* output mode flags */
|
||||
unsigned short c_cflag; /* control mode flags */
|
||||
unsigned short c_lflag; /* local mode flags */
|
||||
unsigned char c_line; /* line discipline */
|
||||
unsigned char c_cc[NCC]; /* control characters */
|
||||
};
|
||||
|
||||
#define NCCS 17
|
||||
struct termios {
|
||||
tcflag_t c_iflag; /* input mode flags */
|
||||
|
|
|
|||
|
|
@ -40,5 +40,14 @@ struct winsize {
|
|||
unsigned short ws_ypixel;
|
||||
};
|
||||
|
||||
#define NCC 8
|
||||
struct termio {
|
||||
unsigned short c_iflag; /* input mode flags */
|
||||
unsigned short c_oflag; /* output mode flags */
|
||||
unsigned short c_cflag; /* control mode flags */
|
||||
unsigned short c_lflag; /* local mode flags */
|
||||
unsigned char c_line; /* line discipline */
|
||||
unsigned char c_cc[NCC]; /* control characters */
|
||||
};
|
||||
|
||||
#endif /* _UAPI_SPARC_TERMIOS_H */
|
||||
|
|
|
|||
|
|
@ -483,7 +483,9 @@ static void *record_one_cpu(struct device_node *dp, int cpuid, int arg)
|
|||
ncpus_probed++;
|
||||
#ifdef CONFIG_SMP
|
||||
set_cpu_present(cpuid, true);
|
||||
set_cpu_possible(cpuid, true);
|
||||
|
||||
if (num_possible_cpus() < nr_cpu_ids)
|
||||
set_cpu_possible(cpuid, true);
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -695,7 +695,6 @@ void __init setup_arch(char **cmdline_p)
|
|||
|
||||
paging_init();
|
||||
init_sparc64_elf_hwcap();
|
||||
smp_fill_in_cpu_possible_map();
|
||||
/*
|
||||
* Once the OF device tree and MDESC have been setup and nr_cpus has
|
||||
* been parsed, we know the list of possible cpus. Therefore we can
|
||||
|
|
|
|||
|
|
@ -1213,20 +1213,6 @@ void __init smp_setup_processor_id(void)
|
|||
xcall_deliver_impl = hypervisor_xcall_deliver;
|
||||
}
|
||||
|
||||
void __init smp_fill_in_cpu_possible_map(void)
|
||||
{
|
||||
int possible_cpus = num_possible_cpus();
|
||||
int i;
|
||||
|
||||
if (possible_cpus > nr_cpu_ids)
|
||||
possible_cpus = nr_cpu_ids;
|
||||
|
||||
for (i = 0; i < possible_cpus; i++)
|
||||
set_cpu_possible(i, true);
|
||||
for (; i < NR_CPUS; i++)
|
||||
set_cpu_possible(i, false);
|
||||
}
|
||||
|
||||
void smp_fill_in_sib_core_maps(void)
|
||||
{
|
||||
unsigned int i;
|
||||
|
|
|
|||
|
|
@ -673,24 +673,26 @@ void register_winch_irq(int fd, int tty_fd, int pid, struct tty_port *port,
|
|||
goto cleanup;
|
||||
}
|
||||
|
||||
*winch = ((struct winch) { .list = LIST_HEAD_INIT(winch->list),
|
||||
.fd = fd,
|
||||
*winch = ((struct winch) { .fd = fd,
|
||||
.tty_fd = tty_fd,
|
||||
.pid = pid,
|
||||
.port = port,
|
||||
.stack = stack });
|
||||
|
||||
spin_lock(&winch_handler_lock);
|
||||
list_add(&winch->list, &winch_handlers);
|
||||
spin_unlock(&winch_handler_lock);
|
||||
|
||||
if (um_request_irq(WINCH_IRQ, fd, IRQ_READ, winch_interrupt,
|
||||
IRQF_SHARED, "winch", winch) < 0) {
|
||||
printk(KERN_ERR "register_winch_irq - failed to register "
|
||||
"IRQ\n");
|
||||
spin_lock(&winch_handler_lock);
|
||||
list_del(&winch->list);
|
||||
spin_unlock(&winch_handler_lock);
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
spin_lock(&winch_handler_lock);
|
||||
list_add(&winch->list, &winch_handlers);
|
||||
spin_unlock(&winch_handler_lock);
|
||||
|
||||
return;
|
||||
|
||||
out_free:
|
||||
|
|
|
|||
|
|
@ -1157,7 +1157,7 @@ static int __init ubd_init(void)
|
|||
|
||||
if (irq_req_buffer == NULL) {
|
||||
printk(KERN_ERR "Failed to initialize ubd buffering\n");
|
||||
return -1;
|
||||
return -ENOMEM;
|
||||
}
|
||||
io_req_buffer = kmalloc_array(UBD_REQ_BUFFER_SIZE,
|
||||
sizeof(struct io_thread_req *),
|
||||
|
|
@ -1168,7 +1168,7 @@ static int __init ubd_init(void)
|
|||
|
||||
if (io_req_buffer == NULL) {
|
||||
printk(KERN_ERR "Failed to initialize ubd buffering\n");
|
||||
return -1;
|
||||
return -ENOMEM;
|
||||
}
|
||||
platform_driver_register(&ubd_driver);
|
||||
mutex_lock(&ubd_lock);
|
||||
|
|
|
|||
|
|
@ -15,8 +15,6 @@ typedef struct mm_context {
|
|||
struct page *stub_pages[2];
|
||||
} mm_context_t;
|
||||
|
||||
extern void __switch_mm(struct mm_id * mm_idp);
|
||||
|
||||
/* Avoid tangled inclusion with asm/ldt.h */
|
||||
extern long init_new_ldt(struct mm_context *to_mm, struct mm_context *from_mm);
|
||||
extern void free_ldt(struct mm_context *mm);
|
||||
|
|
|
|||
|
|
@ -14,4 +14,6 @@ struct mm_id {
|
|||
unsigned long stack;
|
||||
};
|
||||
|
||||
void __switch_mm(struct mm_id *mm_idp);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -307,6 +307,7 @@ config UNWINDER_ORC
|
|||
|
||||
config UNWINDER_FRAME_POINTER
|
||||
bool "Frame pointer unwinder"
|
||||
select ARCH_WANT_FRAME_POINTERS
|
||||
select FRAME_POINTER
|
||||
---help---
|
||||
This option enables the frame pointer unwinder for unwinding kernel
|
||||
|
|
@ -334,7 +335,3 @@ config UNWINDER_GUESS
|
|||
overhead.
|
||||
|
||||
endchoice
|
||||
|
||||
config FRAME_POINTER
|
||||
depends on !UNWINDER_ORC && !UNWINDER_GUESS
|
||||
bool
|
||||
|
|
|
|||
|
|
@ -98,11 +98,6 @@ static int addr_to_vsyscall_nr(unsigned long addr)
|
|||
|
||||
static bool write_ok_or_segv(unsigned long ptr, size_t size)
|
||||
{
|
||||
/*
|
||||
* XXX: if access_ok, get_user, and put_user handled
|
||||
* sig_on_uaccess_err, this could go away.
|
||||
*/
|
||||
|
||||
if (!access_ok((void __user *)ptr, size)) {
|
||||
struct thread_struct *thread = ¤t->thread;
|
||||
|
||||
|
|
@ -120,10 +115,8 @@ static bool write_ok_or_segv(unsigned long ptr, size_t size)
|
|||
bool emulate_vsyscall(unsigned long error_code,
|
||||
struct pt_regs *regs, unsigned long address)
|
||||
{
|
||||
struct task_struct *tsk;
|
||||
unsigned long caller;
|
||||
int vsyscall_nr, syscall_nr, tmp;
|
||||
int prev_sig_on_uaccess_err;
|
||||
long ret;
|
||||
unsigned long orig_dx;
|
||||
|
||||
|
|
@ -172,8 +165,6 @@ bool emulate_vsyscall(unsigned long error_code,
|
|||
goto sigsegv;
|
||||
}
|
||||
|
||||
tsk = current;
|
||||
|
||||
/*
|
||||
* Check for access_ok violations and find the syscall nr.
|
||||
*
|
||||
|
|
@ -233,12 +224,8 @@ bool emulate_vsyscall(unsigned long error_code,
|
|||
goto do_ret; /* skip requested */
|
||||
|
||||
/*
|
||||
* With a real vsyscall, page faults cause SIGSEGV. We want to
|
||||
* preserve that behavior to make writing exploits harder.
|
||||
* With a real vsyscall, page faults cause SIGSEGV.
|
||||
*/
|
||||
prev_sig_on_uaccess_err = current->thread.sig_on_uaccess_err;
|
||||
current->thread.sig_on_uaccess_err = 1;
|
||||
|
||||
ret = -EFAULT;
|
||||
switch (vsyscall_nr) {
|
||||
case 0:
|
||||
|
|
@ -261,23 +248,12 @@ bool emulate_vsyscall(unsigned long error_code,
|
|||
break;
|
||||
}
|
||||
|
||||
current->thread.sig_on_uaccess_err = prev_sig_on_uaccess_err;
|
||||
|
||||
check_fault:
|
||||
if (ret == -EFAULT) {
|
||||
/* Bad news -- userspace fed a bad pointer to a vsyscall. */
|
||||
warn_bad_vsyscall(KERN_INFO, regs,
|
||||
"vsyscall fault (exploit attempt?)");
|
||||
|
||||
/*
|
||||
* If we failed to generate a signal for any reason,
|
||||
* generate one here. (This should be impossible.)
|
||||
*/
|
||||
if (WARN_ON_ONCE(!sigismember(&tsk->pending.signal, SIGBUS) &&
|
||||
!sigismember(&tsk->pending.signal, SIGSEGV)))
|
||||
goto sigsegv;
|
||||
|
||||
return true; /* Don't emulate the ret. */
|
||||
goto sigsegv;
|
||||
}
|
||||
|
||||
regs->ax = ret;
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
#include <asm/mpspec.h>
|
||||
#include <asm/msr.h>
|
||||
#include <asm/hardirq.h>
|
||||
#include <asm/io.h>
|
||||
|
||||
#define ARCH_APICTIMER_STOPS_ON_C3 1
|
||||
|
||||
|
|
@ -111,7 +112,7 @@ static inline void native_apic_mem_write(u32 reg, u32 v)
|
|||
|
||||
static inline u32 native_apic_mem_read(u32 reg)
|
||||
{
|
||||
return *((volatile u32 *)(APIC_BASE + reg));
|
||||
return readl((void __iomem *)(APIC_BASE + reg));
|
||||
}
|
||||
|
||||
extern void native_apic_wait_icr_idle(void);
|
||||
|
|
|
|||
|
|
@ -488,7 +488,6 @@ struct thread_struct {
|
|||
|
||||
mm_segment_t addr_limit;
|
||||
|
||||
unsigned int sig_on_uaccess_err:1;
|
||||
unsigned int uaccess_err:1; /* uaccess failed */
|
||||
|
||||
/* Floating point and extended processor state */
|
||||
|
|
|
|||
|
|
@ -913,7 +913,8 @@ static void __send_cleanup_vector(struct apic_chip_data *apicd)
|
|||
hlist_add_head(&apicd->clist, per_cpu_ptr(&cleanup_list, cpu));
|
||||
apic->send_IPI(cpu, IRQ_MOVE_CLEANUP_VECTOR);
|
||||
} else {
|
||||
apicd->prev_vector = 0;
|
||||
pr_warn("IRQ %u schedule cleanup for offline CPU %u\n", apicd->irq, cpu);
|
||||
free_moved_vector(apicd);
|
||||
}
|
||||
raw_spin_unlock(&vector_lock);
|
||||
}
|
||||
|
|
@ -949,6 +950,7 @@ void irq_complete_move(struct irq_cfg *cfg)
|
|||
*/
|
||||
void irq_force_complete_move(struct irq_desc *desc)
|
||||
{
|
||||
unsigned int cpu = smp_processor_id();
|
||||
struct apic_chip_data *apicd;
|
||||
struct irq_data *irqd;
|
||||
unsigned int vector;
|
||||
|
|
@ -973,10 +975,11 @@ void irq_force_complete_move(struct irq_desc *desc)
|
|||
goto unlock;
|
||||
|
||||
/*
|
||||
* If prev_vector is empty, no action required.
|
||||
* If prev_vector is empty or the descriptor is neither currently
|
||||
* nor previously on the outgoing CPU no action required.
|
||||
*/
|
||||
vector = apicd->prev_vector;
|
||||
if (!vector)
|
||||
if (!vector || (apicd->cpu != cpu && apicd->prev_cpu != cpu))
|
||||
goto unlock;
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -44,7 +44,10 @@ static const struct cpuid_dep cpuid_deps[] = {
|
|||
{ X86_FEATURE_F16C, X86_FEATURE_XMM2, },
|
||||
{ X86_FEATURE_AES, X86_FEATURE_XMM2 },
|
||||
{ X86_FEATURE_SHA_NI, X86_FEATURE_XMM2 },
|
||||
{ X86_FEATURE_GFNI, X86_FEATURE_XMM2 },
|
||||
{ X86_FEATURE_FMA, X86_FEATURE_AVX },
|
||||
{ X86_FEATURE_VAES, X86_FEATURE_AVX },
|
||||
{ X86_FEATURE_VPCLMULQDQ, X86_FEATURE_AVX },
|
||||
{ X86_FEATURE_AVX2, X86_FEATURE_AVX, },
|
||||
{ X86_FEATURE_AVX512F, X86_FEATURE_AVX, },
|
||||
{ X86_FEATURE_AVX512IFMA, X86_FEATURE_AVX512F },
|
||||
|
|
@ -56,9 +59,6 @@ static const struct cpuid_dep cpuid_deps[] = {
|
|||
{ X86_FEATURE_AVX512VL, X86_FEATURE_AVX512F },
|
||||
{ X86_FEATURE_AVX512VBMI, X86_FEATURE_AVX512F },
|
||||
{ X86_FEATURE_AVX512_VBMI2, X86_FEATURE_AVX512VL },
|
||||
{ X86_FEATURE_GFNI, X86_FEATURE_AVX512VL },
|
||||
{ X86_FEATURE_VAES, X86_FEATURE_AVX512VL },
|
||||
{ X86_FEATURE_VPCLMULQDQ, X86_FEATURE_AVX512VL },
|
||||
{ X86_FEATURE_AVX512_VNNI, X86_FEATURE_AVX512VL },
|
||||
{ X86_FEATURE_AVX512_BITALG, X86_FEATURE_AVX512VL },
|
||||
{ X86_FEATURE_AVX512_4VNNIW, X86_FEATURE_AVX512F },
|
||||
|
|
|
|||
|
|
@ -192,11 +192,9 @@ bool tsc_store_and_check_tsc_adjust(bool bootcpu)
|
|||
cur->warned = false;
|
||||
|
||||
/*
|
||||
* If a non-zero TSC value for socket 0 may be valid then the default
|
||||
* adjusted value cannot assumed to be zero either.
|
||||
* The default adjust value cannot be assumed to be zero on any socket.
|
||||
*/
|
||||
if (tsc_async_resets)
|
||||
cur->adjusted = bootval;
|
||||
cur->adjusted = bootval;
|
||||
|
||||
/*
|
||||
* Check whether this CPU is the first in a package to come up. In
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ AVXcode:
|
|||
65: SEG=GS (Prefix)
|
||||
66: Operand-Size (Prefix)
|
||||
67: Address-Size (Prefix)
|
||||
68: PUSH Iz (d64)
|
||||
68: PUSH Iz
|
||||
69: IMUL Gv,Ev,Iz
|
||||
6a: PUSH Ib (d64)
|
||||
6b: IMUL Gv,Ev,Ib
|
||||
|
|
|
|||
|
|
@ -743,33 +743,8 @@ no_context(struct pt_regs *regs, unsigned long error_code,
|
|||
}
|
||||
|
||||
/* Are we prepared to handle this kernel fault? */
|
||||
if (fixup_exception(regs, X86_TRAP_PF, error_code, address)) {
|
||||
/*
|
||||
* Any interrupt that takes a fault gets the fixup. This makes
|
||||
* the below recursive fault logic only apply to a faults from
|
||||
* task context.
|
||||
*/
|
||||
if (in_interrupt())
|
||||
return;
|
||||
|
||||
/*
|
||||
* Per the above we're !in_interrupt(), aka. task context.
|
||||
*
|
||||
* In this case we need to make sure we're not recursively
|
||||
* faulting through the emulate_vsyscall() logic.
|
||||
*/
|
||||
if (current->thread.sig_on_uaccess_err && signal) {
|
||||
set_signal_archinfo(address, error_code);
|
||||
|
||||
/* XXX: hwpoison faults will set the wrong code. */
|
||||
force_sig_fault(signal, si_code, (void __user *)address);
|
||||
}
|
||||
|
||||
/*
|
||||
* Barring that, we can do the fixup and be happy.
|
||||
*/
|
||||
if (fixup_exception(regs, X86_TRAP_PF, error_code, address))
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_VMAP_STACK
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -32,7 +32,8 @@ KCOV_INSTRUMENT := n
|
|||
# make up the standalone purgatory.ro
|
||||
|
||||
PURGATORY_CFLAGS_REMOVE := -mcmodel=kernel
|
||||
PURGATORY_CFLAGS := -mcmodel=large -ffreestanding -fno-zero-initialized-in-bss -g0
|
||||
PURGATORY_CFLAGS := -mcmodel=small -ffreestanding -fno-zero-initialized-in-bss -g0
|
||||
PURGATORY_CFLAGS += -fpic -fvisibility=hidden
|
||||
PURGATORY_CFLAGS += $(DISABLE_STACKLEAK_PLUGIN) -DDISABLE_BRANCH_PROFILING
|
||||
|
||||
# Default KBUILD_CFLAGS can have -pg option set when FTRACE is enabled. That
|
||||
|
|
|
|||
|
|
@ -690,6 +690,15 @@ static void walk_relocs(int (*process)(struct section *sec, Elf_Rel *rel,
|
|||
if (!(sec_applies->shdr.sh_flags & SHF_ALLOC)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* Do not perform relocations in .notes sections; any
|
||||
* values there are meant for pre-boot consumption (e.g.
|
||||
* startup_xen).
|
||||
*/
|
||||
if (sec_applies->shdr.sh_type == SHT_NOTE)
|
||||
continue;
|
||||
|
||||
sh_symtab = sec_symtab->symtab;
|
||||
sym_strtab = sec_symtab->link->strtab;
|
||||
for (j = 0; j < sec->shdr.sh_size/sizeof(Elf_Rel); j++) {
|
||||
|
|
|
|||
|
|
@ -217,7 +217,6 @@ static struct crypto_larval *__crypto_register_alg(struct crypto_alg *alg)
|
|||
}
|
||||
|
||||
if (!strcmp(q->cra_driver_name, alg->cra_name) ||
|
||||
!strcmp(q->cra_driver_name, alg->cra_driver_name) ||
|
||||
!strcmp(q->cra_name, alg->cra_driver_name))
|
||||
goto err;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -293,4 +293,5 @@ module_exit(ecrdsa_mod_fini);
|
|||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Vitaly Chikunov <vt@altlinux.org>");
|
||||
MODULE_DESCRIPTION("EC-RDSA generic algorithm");
|
||||
MODULE_ALIAS_CRYPTO("ecrdsa");
|
||||
MODULE_ALIAS_CRYPTO("ecrdsa-generic");
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
ccflags-y := -D_LINUX -DBUILDING_ACPICA
|
||||
ccflags-$(CONFIG_ACPI_DEBUG) += -DACPI_DEBUG_OUTPUT
|
||||
CFLAGS_tbfind.o += $(call cc-disable-warning, stringop-truncation)
|
||||
|
||||
# use acpi.o to put all files here into acpi.o modparam namespace
|
||||
obj-y += acpi.o
|
||||
|
|
|
|||
|
|
@ -475,6 +475,18 @@ static const struct dmi_system_id asus_laptop[] = {
|
|||
DMI_MATCH(DMI_BOARD_NAME, "B2502CBA"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* TongFang GXxHRXx/TUXEDO InfinityBook Pro Gen9 AMD */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "GXxHRXx"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* TongFang GMxHGxx/TUXEDO Stellaris Slim Gen1 AMD */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "GMxHGxx"),
|
||||
},
|
||||
},
|
||||
{ }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -5330,7 +5330,7 @@ static long binder_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
|||
goto err;
|
||||
break;
|
||||
case BINDER_SET_MAX_THREADS: {
|
||||
int max_threads;
|
||||
u32 max_threads;
|
||||
|
||||
if (copy_from_user(&max_threads, ubuf,
|
||||
sizeof(max_threads))) {
|
||||
|
|
|
|||
|
|
@ -114,8 +114,6 @@ static int legacy_port[NR_HOST] = { 0x1f0, 0x170, 0x1e8, 0x168, 0x1e0, 0x160 };
|
|||
static struct legacy_probe probe_list[NR_HOST];
|
||||
static struct legacy_data legacy_data[NR_HOST];
|
||||
static struct ata_host *legacy_host[NR_HOST];
|
||||
static int nr_legacy_host;
|
||||
|
||||
|
||||
static int probe_all; /* Set to check all ISA port ranges */
|
||||
static int ht6560a; /* HT 6560A on primary 1, second 2, both 3 */
|
||||
|
|
@ -1239,9 +1237,11 @@ static __exit void legacy_exit(void)
|
|||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < nr_legacy_host; i++) {
|
||||
for (i = 0; i < NR_HOST; i++) {
|
||||
struct legacy_data *ld = &legacy_data[i];
|
||||
ata_host_detach(legacy_host[i]);
|
||||
|
||||
if (legacy_host[i])
|
||||
ata_host_detach(legacy_host[i]);
|
||||
platform_device_unregister(ld->platform_dev);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -201,7 +201,10 @@ int gemini_sata_start_bridge(struct sata_gemini *sg, unsigned int bridge)
|
|||
pclk = sg->sata0_pclk;
|
||||
else
|
||||
pclk = sg->sata1_pclk;
|
||||
clk_enable(pclk);
|
||||
ret = clk_enable(pclk);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
msleep(10);
|
||||
|
||||
/* Do not keep clocking a bridge that is not online */
|
||||
|
|
|
|||
|
|
@ -1891,10 +1891,13 @@ static void __exit null_exit(void)
|
|||
|
||||
if (g_queue_mode == NULL_Q_MQ && shared_tags)
|
||||
blk_mq_free_tag_set(&tag_set);
|
||||
|
||||
mutex_destroy(&lock);
|
||||
}
|
||||
|
||||
module_init(null_init);
|
||||
module_exit(null_exit);
|
||||
|
||||
MODULE_AUTHOR("Jens Axboe <axboe@kernel.dk>");
|
||||
MODULE_DESCRIPTION("multi queue aware block test driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
|
|
|||
|
|
@ -360,6 +360,8 @@ static const struct usb_device_id blacklist_table[] = {
|
|||
/* Realtek 8852BE Bluetooth devices */
|
||||
{ USB_DEVICE(0x0cb8, 0xc559), .driver_info = BTUSB_REALTEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x0bda, 0x4853), .driver_info = BTUSB_REALTEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x0bda, 0x887b), .driver_info = BTUSB_REALTEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x0bda, 0xb85b), .driver_info = BTUSB_REALTEK |
|
||||
|
|
|
|||
|
|
@ -296,28 +296,35 @@ static int register_device(int minor, struct pp_struct *pp)
|
|||
if (!port) {
|
||||
pr_warn("%s: no associated port!\n", name);
|
||||
rc = -ENXIO;
|
||||
goto err;
|
||||
goto err_free_name;
|
||||
}
|
||||
|
||||
index = ida_alloc(&ida_index, GFP_KERNEL);
|
||||
if (index < 0) {
|
||||
pr_warn("%s: failed to get index!\n", name);
|
||||
rc = index;
|
||||
goto err_put_port;
|
||||
}
|
||||
|
||||
index = ida_simple_get(&ida_index, 0, 0, GFP_KERNEL);
|
||||
memset(&ppdev_cb, 0, sizeof(ppdev_cb));
|
||||
ppdev_cb.irq_func = pp_irq;
|
||||
ppdev_cb.flags = (pp->flags & PP_EXCL) ? PARPORT_FLAG_EXCL : 0;
|
||||
ppdev_cb.private = pp;
|
||||
pdev = parport_register_dev_model(port, name, &ppdev_cb, index);
|
||||
parport_put_port(port);
|
||||
|
||||
if (!pdev) {
|
||||
pr_warn("%s: failed to register device!\n", name);
|
||||
rc = -ENXIO;
|
||||
ida_simple_remove(&ida_index, index);
|
||||
goto err;
|
||||
ida_free(&ida_index, index);
|
||||
goto err_put_port;
|
||||
}
|
||||
|
||||
pp->pdev = pdev;
|
||||
pp->index = index;
|
||||
dev_dbg(&pdev->dev, "registered pardevice\n");
|
||||
err:
|
||||
err_put_port:
|
||||
parport_put_port(port);
|
||||
err_free_name:
|
||||
kfree(name);
|
||||
return rc;
|
||||
}
|
||||
|
|
@ -762,7 +769,7 @@ static int pp_release(struct inode *inode, struct file *file)
|
|||
|
||||
if (pp->pdev) {
|
||||
parport_unregister_device(pp->pdev);
|
||||
ida_simple_remove(&ida_index, pp->index);
|
||||
ida_free(&ida_index, pp->index);
|
||||
pp->pdev = NULL;
|
||||
pr_debug(CHRDEV "%x: unregistered pardevice\n", minor);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ static HLIST_HEAD(clk_root_list);
|
|||
static HLIST_HEAD(clk_orphan_list);
|
||||
static LIST_HEAD(clk_notifier_list);
|
||||
|
||||
static struct hlist_head *all_lists[] = {
|
||||
static const struct hlist_head *all_lists[] = {
|
||||
&clk_root_list,
|
||||
&clk_orphan_list,
|
||||
NULL,
|
||||
|
|
@ -1325,6 +1325,8 @@ static int clk_disable_unused(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
pr_info("clk: Disabling unused clocks\n");
|
||||
|
||||
clk_prepare_lock();
|
||||
|
||||
hlist_for_each_entry(core, &clk_root_list, child_node)
|
||||
|
|
@ -3825,8 +3827,6 @@ static int __clk_core_init(struct clk_core *core)
|
|||
|
||||
clk_core_hold_state(core);
|
||||
clk_core_reparent_orphans_nolock();
|
||||
|
||||
kref_init(&core->ref);
|
||||
out:
|
||||
clk_pm_runtime_put(core);
|
||||
unlock:
|
||||
|
|
@ -4036,6 +4036,16 @@ static void clk_core_free_parent_map(struct clk_core *core)
|
|||
kfree(core->parents);
|
||||
}
|
||||
|
||||
/* Free memory allocated for a struct clk_core */
|
||||
static void __clk_release(struct kref *ref)
|
||||
{
|
||||
struct clk_core *core = container_of(ref, struct clk_core, ref);
|
||||
|
||||
clk_core_free_parent_map(core);
|
||||
kfree_const(core->name);
|
||||
kfree(core);
|
||||
}
|
||||
|
||||
static struct clk *
|
||||
__clk_register(struct device *dev, struct device_node *np, struct clk_hw *hw)
|
||||
{
|
||||
|
|
@ -4056,6 +4066,8 @@ __clk_register(struct device *dev, struct device_node *np, struct clk_hw *hw)
|
|||
goto fail_out;
|
||||
}
|
||||
|
||||
kref_init(&core->ref);
|
||||
|
||||
core->name = kstrdup_const(init->name, GFP_KERNEL);
|
||||
if (!core->name) {
|
||||
ret = -ENOMEM;
|
||||
|
|
@ -4110,12 +4122,10 @@ __clk_register(struct device *dev, struct device_node *np, struct clk_hw *hw)
|
|||
hw->clk = NULL;
|
||||
|
||||
fail_create_clk:
|
||||
clk_core_free_parent_map(core);
|
||||
fail_parents:
|
||||
fail_ops:
|
||||
kfree_const(core->name);
|
||||
fail_name:
|
||||
kfree(core);
|
||||
kref_put(&core->ref, __clk_release);
|
||||
fail_out:
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
|
|
@ -4195,18 +4205,6 @@ int of_clk_hw_register(struct device_node *node, struct clk_hw *hw)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(of_clk_hw_register);
|
||||
|
||||
/* Free memory allocated for a clock. */
|
||||
static void __clk_release(struct kref *ref)
|
||||
{
|
||||
struct clk_core *core = container_of(ref, struct clk_core, ref);
|
||||
|
||||
lockdep_assert_held(&prepare_lock);
|
||||
|
||||
clk_core_free_parent_map(core);
|
||||
kfree_const(core->name);
|
||||
kfree(core);
|
||||
}
|
||||
|
||||
/*
|
||||
* Empty clk_ops for unregistered clocks. These are used temporarily
|
||||
* after clk_unregister() was called on a clock and until last clock
|
||||
|
|
@ -4259,7 +4257,7 @@ static void clk_core_evict_parent_cache_subtree(struct clk_core *root,
|
|||
/* Remove this clk from all parent caches */
|
||||
static void clk_core_evict_parent_cache(struct clk_core *core)
|
||||
{
|
||||
struct hlist_head **lists;
|
||||
const struct hlist_head **lists;
|
||||
struct clk_core *root;
|
||||
|
||||
lockdep_assert_held(&prepare_lock);
|
||||
|
|
@ -4288,7 +4286,8 @@ void clk_unregister(struct clk *clk)
|
|||
if (clk->core->ops == &clk_nodrv_ops) {
|
||||
pr_err("%s: unregistered clock: %s\n", __func__,
|
||||
clk->core->name);
|
||||
goto unlock;
|
||||
clk_prepare_unlock();
|
||||
return;
|
||||
}
|
||||
/*
|
||||
* Assign empty clock ops for consumers that might still hold
|
||||
|
|
@ -4319,11 +4318,10 @@ void clk_unregister(struct clk *clk)
|
|||
if (clk->core->protect_count)
|
||||
pr_warn("%s: unregistering protected clock: %s\n",
|
||||
__func__, clk->core->name);
|
||||
clk_prepare_unlock();
|
||||
|
||||
kref_put(&clk->core->ref, __clk_release);
|
||||
free_clk(clk);
|
||||
unlock:
|
||||
clk_prepare_unlock();
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(clk_unregister);
|
||||
|
||||
|
|
@ -4485,13 +4483,11 @@ void __clk_put(struct clk *clk)
|
|||
clk->max_rate < clk->core->req_rate)
|
||||
clk_core_set_rate_nolock(clk->core, clk->core->req_rate);
|
||||
|
||||
owner = clk->core->owner;
|
||||
kref_put(&clk->core->ref, __clk_release);
|
||||
|
||||
clk_prepare_unlock();
|
||||
|
||||
owner = clk->core->owner;
|
||||
kref_put(&clk->core->ref, __clk_release);
|
||||
module_put(owner);
|
||||
|
||||
free_clk(clk);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1172,12 +1172,19 @@ static const u32 usb2_clk_regs[] = {
|
|||
SUN50I_H6_USB3_CLK_REG,
|
||||
};
|
||||
|
||||
static struct ccu_mux_nb sun50i_h6_cpu_nb = {
|
||||
.common = &cpux_clk.common,
|
||||
.cm = &cpux_clk.mux,
|
||||
.delay_us = 1,
|
||||
.bypass_index = 0, /* index of 24 MHz oscillator */
|
||||
};
|
||||
|
||||
static int sun50i_h6_ccu_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct resource *res;
|
||||
void __iomem *reg;
|
||||
int i, ret;
|
||||
u32 val;
|
||||
int i;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
reg = devm_ioremap_resource(&pdev->dev, res);
|
||||
|
|
@ -1231,7 +1238,15 @@ static int sun50i_h6_ccu_probe(struct platform_device *pdev)
|
|||
val |= BIT(24);
|
||||
writel(val, reg + SUN50I_H6_HDMI_CEC_CLK_REG);
|
||||
|
||||
return sunxi_ccu_probe(pdev->dev.of_node, reg, &sun50i_h6_ccu_desc);
|
||||
ret = sunxi_ccu_probe(pdev->dev.of_node, reg, &sun50i_h6_ccu_desc);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* Reparent CPU during PLL CPUX rate changes */
|
||||
ccu_mux_notifier_register(pll_cpux_clk.common.hw.clk,
|
||||
&sun50i_h6_cpu_nb);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id sun50i_h6_ccu_ids[] = {
|
||||
|
|
|
|||
|
|
@ -1590,47 +1590,36 @@ static int cpufreq_add_dev(struct device *dev, struct subsys_interface *sif)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int cpufreq_offline(unsigned int cpu)
|
||||
static void __cpufreq_offline(unsigned int cpu, struct cpufreq_policy *policy)
|
||||
{
|
||||
struct cpufreq_policy *policy;
|
||||
int ret;
|
||||
|
||||
pr_debug("%s: unregistering CPU %u\n", __func__, cpu);
|
||||
|
||||
policy = cpufreq_cpu_get_raw(cpu);
|
||||
if (!policy) {
|
||||
pr_debug("%s: No cpu_data found\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
down_write(&policy->rwsem);
|
||||
if (has_target())
|
||||
cpufreq_stop_governor(policy);
|
||||
|
||||
cpumask_clear_cpu(cpu, policy->cpus);
|
||||
|
||||
if (policy_is_inactive(policy)) {
|
||||
if (has_target())
|
||||
strncpy(policy->last_governor, policy->governor->name,
|
||||
CPUFREQ_NAME_LEN);
|
||||
else
|
||||
policy->last_policy = policy->policy;
|
||||
} else if (cpu == policy->cpu) {
|
||||
/* Nominate new CPU */
|
||||
policy->cpu = cpumask_any(policy->cpus);
|
||||
}
|
||||
|
||||
/* Start governor again for active policy */
|
||||
if (!policy_is_inactive(policy)) {
|
||||
/* Nominate a new CPU if necessary. */
|
||||
if (cpu == policy->cpu)
|
||||
policy->cpu = cpumask_any(policy->cpus);
|
||||
|
||||
/* Start the governor again for the active policy. */
|
||||
if (has_target()) {
|
||||
ret = cpufreq_start_governor(policy);
|
||||
if (ret)
|
||||
pr_err("%s: Failed to start governor\n", __func__);
|
||||
}
|
||||
|
||||
goto unlock;
|
||||
return;
|
||||
}
|
||||
|
||||
if (has_target())
|
||||
strncpy(policy->last_governor, policy->governor->name,
|
||||
CPUFREQ_NAME_LEN);
|
||||
else
|
||||
policy->last_policy = policy->policy;
|
||||
|
||||
if (cpufreq_thermal_control_enabled(cpufreq_driver)) {
|
||||
cpufreq_cooling_unregister(policy->cdev);
|
||||
policy->cdev = NULL;
|
||||
|
|
@ -1648,12 +1637,31 @@ static int cpufreq_offline(unsigned int cpu)
|
|||
*/
|
||||
if (cpufreq_driver->offline) {
|
||||
cpufreq_driver->offline(policy);
|
||||
} else if (cpufreq_driver->exit) {
|
||||
cpufreq_driver->exit(policy);
|
||||
policy->freq_table = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
unlock:
|
||||
if (cpufreq_driver->exit)
|
||||
cpufreq_driver->exit(policy);
|
||||
|
||||
policy->freq_table = NULL;
|
||||
}
|
||||
|
||||
static int cpufreq_offline(unsigned int cpu)
|
||||
{
|
||||
struct cpufreq_policy *policy;
|
||||
|
||||
pr_debug("%s: unregistering CPU %u\n", __func__, cpu);
|
||||
|
||||
policy = cpufreq_cpu_get_raw(cpu);
|
||||
if (!policy) {
|
||||
pr_debug("%s: No cpu_data found\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
down_write(&policy->rwsem);
|
||||
|
||||
__cpufreq_offline(cpu, policy);
|
||||
|
||||
up_write(&policy->rwsem);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1671,19 +1679,26 @@ static void cpufreq_remove_dev(struct device *dev, struct subsys_interface *sif)
|
|||
if (!policy)
|
||||
return;
|
||||
|
||||
down_write(&policy->rwsem);
|
||||
|
||||
if (cpu_online(cpu))
|
||||
cpufreq_offline(cpu);
|
||||
__cpufreq_offline(cpu, policy);
|
||||
|
||||
cpumask_clear_cpu(cpu, policy->real_cpus);
|
||||
remove_cpu_dev_symlink(policy, dev);
|
||||
|
||||
if (cpumask_empty(policy->real_cpus)) {
|
||||
/* We did light-weight exit earlier, do full tear down now */
|
||||
if (cpufreq_driver->offline)
|
||||
cpufreq_driver->exit(policy);
|
||||
|
||||
cpufreq_policy_free(policy);
|
||||
if (!cpumask_empty(policy->real_cpus)) {
|
||||
up_write(&policy->rwsem);
|
||||
return;
|
||||
}
|
||||
|
||||
/* We did light-weight exit earlier, do full tear down now */
|
||||
if (cpufreq_driver->offline && cpufreq_driver->exit)
|
||||
cpufreq_driver->exit(policy);
|
||||
|
||||
up_write(&policy->rwsem);
|
||||
|
||||
cpufreq_policy_free(policy);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -495,7 +495,7 @@ static void spu2_dump_omd(u8 *omd, u16 hash_key_len, u16 ciph_key_len,
|
|||
if (hash_iv_len) {
|
||||
packet_log(" Hash IV Length %u bytes\n", hash_iv_len);
|
||||
packet_dump(" hash IV: ", ptr, hash_iv_len);
|
||||
ptr += ciph_key_len;
|
||||
ptr += hash_iv_len;
|
||||
}
|
||||
|
||||
if (ciph_iv_len) {
|
||||
|
|
|
|||
|
|
@ -39,44 +39,38 @@ static const struct sp_dev_vdata dev_vdata[] = {
|
|||
},
|
||||
};
|
||||
|
||||
#ifdef CONFIG_ACPI
|
||||
static const struct acpi_device_id sp_acpi_match[] = {
|
||||
{ "AMDI0C00", (kernel_ulong_t)&dev_vdata[0] },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(acpi, sp_acpi_match);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
static const struct of_device_id sp_of_match[] = {
|
||||
{ .compatible = "amd,ccp-seattle-v1a",
|
||||
.data = (const void *)&dev_vdata[0] },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, sp_of_match);
|
||||
#endif
|
||||
|
||||
static struct sp_dev_vdata *sp_get_of_version(struct platform_device *pdev)
|
||||
{
|
||||
#ifdef CONFIG_OF
|
||||
const struct of_device_id *match;
|
||||
|
||||
match = of_match_node(sp_of_match, pdev->dev.of_node);
|
||||
if (match && match->data)
|
||||
return (struct sp_dev_vdata *)match->data;
|
||||
#endif
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static struct sp_dev_vdata *sp_get_acpi_version(struct platform_device *pdev)
|
||||
{
|
||||
#ifdef CONFIG_ACPI
|
||||
const struct acpi_device_id *match;
|
||||
|
||||
match = acpi_match_device(sp_acpi_match, &pdev->dev);
|
||||
if (match && match->driver_data)
|
||||
return (struct sp_dev_vdata *)match->driver_data;
|
||||
#endif
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -222,12 +216,8 @@ static int sp_platform_resume(struct platform_device *pdev)
|
|||
static struct platform_driver sp_platform_driver = {
|
||||
.driver = {
|
||||
.name = "ccp",
|
||||
#ifdef CONFIG_ACPI
|
||||
.acpi_match_table = sp_acpi_match,
|
||||
#endif
|
||||
#ifdef CONFIG_OF
|
||||
.of_match_table = sp_of_match,
|
||||
#endif
|
||||
},
|
||||
.probe = sp_platform_probe,
|
||||
.remove = sp_platform_remove,
|
||||
|
|
|
|||
|
|
@ -139,8 +139,7 @@ static void adf_device_reset_worker(struct work_struct *work)
|
|||
if (adf_dev_init(accel_dev) || adf_dev_start(accel_dev)) {
|
||||
/* The device hanged and we can't restart it so stop here */
|
||||
dev_err(&GET_DEV(accel_dev), "Restart device failed\n");
|
||||
if (reset_data->mode == ADF_DEV_RESET_ASYNC ||
|
||||
completion_done(&reset_data->compl))
|
||||
if (reset_data->mode == ADF_DEV_RESET_ASYNC)
|
||||
kfree(reset_data);
|
||||
WARN(1, "QAT: device restart failed. Device is unusable\n");
|
||||
return;
|
||||
|
|
@ -148,16 +147,8 @@ static void adf_device_reset_worker(struct work_struct *work)
|
|||
adf_dev_restarted_notify(accel_dev);
|
||||
clear_bit(ADF_STATUS_RESTARTING, &accel_dev->status);
|
||||
|
||||
/*
|
||||
* The dev is back alive. Notify the caller if in sync mode
|
||||
*
|
||||
* If device restart will take a more time than expected,
|
||||
* the schedule_reset() function can timeout and exit. This can be
|
||||
* detected by calling the completion_done() function. In this case
|
||||
* the reset_data structure needs to be freed here.
|
||||
*/
|
||||
if (reset_data->mode == ADF_DEV_RESET_ASYNC ||
|
||||
completion_done(&reset_data->compl))
|
||||
/* The dev is back alive. Notify the caller if in sync mode */
|
||||
if (reset_data->mode == ADF_DEV_RESET_ASYNC)
|
||||
kfree(reset_data);
|
||||
else
|
||||
complete(&reset_data->compl);
|
||||
|
|
@ -192,10 +183,10 @@ static int adf_dev_aer_schedule_reset(struct adf_accel_dev *accel_dev,
|
|||
if (!timeout) {
|
||||
dev_err(&GET_DEV(accel_dev),
|
||||
"Reset device timeout expired\n");
|
||||
cancel_work_sync(&reset_data->reset_work);
|
||||
ret = -EFAULT;
|
||||
} else {
|
||||
kfree(reset_data);
|
||||
}
|
||||
kfree(reset_data);
|
||||
return ret;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -110,12 +110,12 @@ static void sync_print_obj(struct seq_file *s, struct sync_timeline *obj)
|
|||
|
||||
seq_printf(s, "%s: %d\n", obj->name, obj->value);
|
||||
|
||||
spin_lock_irq(&obj->lock);
|
||||
spin_lock(&obj->lock); /* Caller already disabled IRQ. */
|
||||
list_for_each(pos, &obj->pt_list) {
|
||||
struct sync_pt *pt = container_of(pos, struct sync_pt, link);
|
||||
sync_print_fence(s, &pt->base, false);
|
||||
}
|
||||
spin_unlock_irq(&obj->lock);
|
||||
spin_unlock(&obj->lock);
|
||||
}
|
||||
|
||||
static void sync_print_sync_file(struct seq_file *s,
|
||||
|
|
|
|||
|
|
@ -167,6 +167,10 @@ static irqreturn_t idma64_irq(int irq, void *dev)
|
|||
u32 status_err;
|
||||
unsigned short i;
|
||||
|
||||
/* Since IRQ may be shared, check if DMA controller is powered on */
|
||||
if (status == GENMASK(31, 0))
|
||||
return IRQ_NONE;
|
||||
|
||||
dev_vdbg(idma64->dma.dev, "%s: status=%#x\n", __func__, status);
|
||||
|
||||
/* Check if we have any interrupt from the DMA controller */
|
||||
|
|
@ -590,7 +594,9 @@ static int idma64_probe(struct idma64_chip *chip)
|
|||
|
||||
idma64->dma.dev = chip->sysdev;
|
||||
|
||||
dma_set_max_seg_size(idma64->dma.dev, IDMA64C_CTLH_BLOCK_TS_MASK);
|
||||
ret = dma_set_max_seg_size(idma64->dma.dev, IDMA64C_CTLH_BLOCK_TS_MASK);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = dma_async_device_register(&idma64->dma);
|
||||
if (ret)
|
||||
|
|
|
|||
|
|
@ -238,7 +238,7 @@ static void pchan_update(struct owl_dma_pchan *pchan, u32 reg,
|
|||
else
|
||||
regval &= ~val;
|
||||
|
||||
writel(val, pchan->base + reg);
|
||||
writel(regval, pchan->base + reg);
|
||||
}
|
||||
|
||||
static void pchan_writel(struct owl_dma_pchan *pchan, u32 reg, u32 data)
|
||||
|
|
@ -262,7 +262,7 @@ static void dma_update(struct owl_dma *od, u32 reg, u32 val, bool state)
|
|||
else
|
||||
regval &= ~val;
|
||||
|
||||
writel(val, od->base + reg);
|
||||
writel(regval, od->base + reg);
|
||||
}
|
||||
|
||||
static void dma_writel(struct owl_dma *od, u32 reg, u32 data)
|
||||
|
|
|
|||
|
|
@ -121,7 +121,8 @@ config EXTCON_MAX77843
|
|||
|
||||
config EXTCON_MAX8997
|
||||
tristate "Maxim MAX8997 EXTCON Support"
|
||||
depends on MFD_MAX8997 && IRQ_DOMAIN
|
||||
depends on MFD_MAX8997
|
||||
select IRQ_DOMAIN
|
||||
help
|
||||
If you say yes here you get support for the MUIC device of
|
||||
Maxim MAX8997 PMIC. The MAX8997 MUIC is a USB port accessory
|
||||
|
|
|
|||
|
|
@ -148,10 +148,12 @@ packet_buffer_get(struct client *client, char __user *data, size_t user_length)
|
|||
if (atomic_read(&buffer->size) == 0)
|
||||
return -ENODEV;
|
||||
|
||||
/* FIXME: Check length <= user_length. */
|
||||
length = buffer->head->length;
|
||||
|
||||
if (length > user_length)
|
||||
return 0;
|
||||
|
||||
end = buffer->data + buffer->capacity;
|
||||
length = buffer->head->length;
|
||||
|
||||
if (&buffer->head->data[length] < end) {
|
||||
if (copy_to_user(data, buffer->head->data, length))
|
||||
|
|
|
|||
|
|
@ -2053,6 +2053,8 @@ static void bus_reset_work(struct work_struct *work)
|
|||
|
||||
ohci->generation = generation;
|
||||
reg_write(ohci, OHCI1394_IntEventClear, OHCI1394_busReset);
|
||||
if (param_debug & OHCI_PARAM_DEBUG_BUSRESETS)
|
||||
reg_write(ohci, OHCI1394_IntMaskSet, OHCI1394_busReset);
|
||||
|
||||
if (ohci->quirks & QUIRK_RESET_PACKET)
|
||||
ohci->request_generation = generation;
|
||||
|
|
@ -2119,12 +2121,14 @@ static irqreturn_t irq_handler(int irq, void *data)
|
|||
return IRQ_NONE;
|
||||
|
||||
/*
|
||||
* busReset and postedWriteErr must not be cleared yet
|
||||
* busReset and postedWriteErr events must not be cleared yet
|
||||
* (OHCI 1.1 clauses 7.2.3.2 and 13.2.8.1)
|
||||
*/
|
||||
reg_write(ohci, OHCI1394_IntEventClear,
|
||||
event & ~(OHCI1394_busReset | OHCI1394_postedWriteErr));
|
||||
log_irqs(ohci, event);
|
||||
if (event & OHCI1394_busReset)
|
||||
reg_write(ohci, OHCI1394_IntMaskClear, OHCI1394_busReset);
|
||||
|
||||
if (event & OHCI1394_selfIDComplete)
|
||||
queue_work(selfid_workqueue, &ohci->bus_reset_work);
|
||||
|
|
|
|||
|
|
@ -135,8 +135,12 @@ static int scmi_domain_reset(const struct scmi_handle *handle, u32 domain,
|
|||
struct scmi_xfer *t;
|
||||
struct scmi_msg_reset_domain_reset *dom;
|
||||
struct scmi_reset_info *pi = handle->reset_priv;
|
||||
struct reset_dom_info *rdom = pi->dom_info + domain;
|
||||
struct reset_dom_info *rdom;
|
||||
|
||||
if (domain >= pi->num_domains)
|
||||
return -EINVAL;
|
||||
|
||||
rdom = pi->dom_info + domain;
|
||||
if (rdom->async_reset)
|
||||
flags |= ASYNCHRONOUS_RESET;
|
||||
|
||||
|
|
|
|||
|
|
@ -160,9 +160,14 @@ static int dmi_dev_uevent(struct device *dev, struct kobj_uevent_env *env)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void dmi_dev_release(struct device *dev)
|
||||
{
|
||||
kfree(dev);
|
||||
}
|
||||
|
||||
static struct class dmi_class = {
|
||||
.name = "dmi",
|
||||
.dev_release = (void(*)(struct device *)) kfree,
|
||||
.dev_release = dmi_dev_release,
|
||||
.dev_uevent = dmi_dev_uevent,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
#include <linux/dma-mapping.h>
|
||||
#include <linux/kref.h>
|
||||
#include <linux/mailbox_client.h>
|
||||
#include <linux/mailbox_controller.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
|
@ -96,8 +97,8 @@ int rpi_firmware_property_list(struct rpi_firmware *fw,
|
|||
if (size & 3)
|
||||
return -EINVAL;
|
||||
|
||||
buf = dma_alloc_coherent(fw->cl.dev, PAGE_ALIGN(size), &bus_addr,
|
||||
GFP_ATOMIC);
|
||||
buf = dma_alloc_coherent(fw->chan->mbox->dev, PAGE_ALIGN(size),
|
||||
&bus_addr, GFP_ATOMIC);
|
||||
if (!buf)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
@ -125,7 +126,7 @@ int rpi_firmware_property_list(struct rpi_firmware *fw,
|
|||
ret = -EINVAL;
|
||||
}
|
||||
|
||||
dma_free_coherent(fw->cl.dev, PAGE_ALIGN(size), buf, bus_addr);
|
||||
dma_free_coherent(fw->chan->mbox->dev, PAGE_ALIGN(size), buf, bus_addr);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ static inline int to_reg(int gpio, enum ctrl_register reg_type)
|
|||
case 0x5e:
|
||||
return GPIOPANELCTL;
|
||||
default:
|
||||
return -EOPNOTSUPP;
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ static inline int to_reg(int gpio, enum ctrl_register reg_type)
|
|||
unsigned int reg;
|
||||
|
||||
if (gpio >= WCOVE_GPIO_NUM)
|
||||
return -EOPNOTSUPP;
|
||||
return -ENOTSUPP;
|
||||
|
||||
if (reg_type == CTRL_IN)
|
||||
reg = GPIO_IN_CTRL_BASE + gpio;
|
||||
|
|
|
|||
|
|
@ -1204,6 +1204,7 @@ allocate_init_user_pages_failed:
|
|||
err_bo_create:
|
||||
unreserve_mem_limit(adev, size, alloc_domain, !!sg);
|
||||
err_reserve_limit:
|
||||
amdgpu_sync_free(&(*mem)->sync);
|
||||
mutex_destroy(&(*mem)->lock);
|
||||
kfree(*mem);
|
||||
err:
|
||||
|
|
|
|||
|
|
@ -594,6 +594,9 @@ int amdgpu_ras_error_query(struct amdgpu_device *adev,
|
|||
if (!obj)
|
||||
return -EINVAL;
|
||||
|
||||
if (!info || info->head.block == AMDGPU_RAS_BLOCK_COUNT)
|
||||
return -EINVAL;
|
||||
|
||||
switch (info->head.block) {
|
||||
case AMDGPU_RAS_BLOCK__UMC:
|
||||
if (adev->umc.funcs->query_ras_error_count)
|
||||
|
|
|
|||
|
|
@ -2095,6 +2095,37 @@ static void amdgpu_vm_bo_insert_map(struct amdgpu_device *adev,
|
|||
trace_amdgpu_vm_bo_map(bo_va, mapping);
|
||||
}
|
||||
|
||||
/* Validate operation parameters to prevent potential abuse */
|
||||
static int amdgpu_vm_verify_parameters(struct amdgpu_device *adev,
|
||||
struct amdgpu_bo *bo,
|
||||
uint64_t saddr,
|
||||
uint64_t offset,
|
||||
uint64_t size)
|
||||
{
|
||||
uint64_t tmp, lpfn;
|
||||
|
||||
if (saddr & AMDGPU_GPU_PAGE_MASK
|
||||
|| offset & AMDGPU_GPU_PAGE_MASK
|
||||
|| size & AMDGPU_GPU_PAGE_MASK)
|
||||
return -EINVAL;
|
||||
|
||||
if (check_add_overflow(saddr, size, &tmp)
|
||||
|| check_add_overflow(offset, size, &tmp)
|
||||
|| size == 0 /* which also leads to end < begin */)
|
||||
return -EINVAL;
|
||||
|
||||
/* make sure object fit at this offset */
|
||||
if (bo && offset + size > amdgpu_bo_size(bo))
|
||||
return -EINVAL;
|
||||
|
||||
/* Ensure last pfn not exceed max_pfn */
|
||||
lpfn = (saddr + size - 1) >> AMDGPU_GPU_PAGE_SHIFT;
|
||||
if (lpfn >= adev->vm_manager.max_pfn)
|
||||
return -EINVAL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* amdgpu_vm_bo_map - map bo inside a vm
|
||||
*
|
||||
|
|
@ -2121,20 +2152,14 @@ int amdgpu_vm_bo_map(struct amdgpu_device *adev,
|
|||
struct amdgpu_bo *bo = bo_va->base.bo;
|
||||
struct amdgpu_vm *vm = bo_va->base.vm;
|
||||
uint64_t eaddr;
|
||||
int r;
|
||||
|
||||
/* validate the parameters */
|
||||
if (saddr & ~PAGE_MASK || offset & ~PAGE_MASK ||
|
||||
size == 0 || size & ~PAGE_MASK)
|
||||
return -EINVAL;
|
||||
|
||||
/* make sure object fit at this offset */
|
||||
eaddr = saddr + size - 1;
|
||||
if (saddr >= eaddr ||
|
||||
(bo && offset + size > amdgpu_bo_size(bo)))
|
||||
return -EINVAL;
|
||||
r = amdgpu_vm_verify_parameters(adev, bo, saddr, offset, size);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
saddr /= AMDGPU_GPU_PAGE_SIZE;
|
||||
eaddr /= AMDGPU_GPU_PAGE_SIZE;
|
||||
eaddr = saddr + (size - 1) / AMDGPU_GPU_PAGE_SIZE;
|
||||
|
||||
tmp = amdgpu_vm_it_iter_first(&vm->va, saddr, eaddr);
|
||||
if (tmp) {
|
||||
|
|
@ -2187,16 +2212,9 @@ int amdgpu_vm_bo_replace_map(struct amdgpu_device *adev,
|
|||
uint64_t eaddr;
|
||||
int r;
|
||||
|
||||
/* validate the parameters */
|
||||
if (saddr & ~PAGE_MASK || offset & ~PAGE_MASK ||
|
||||
size == 0 || size & ~PAGE_MASK)
|
||||
return -EINVAL;
|
||||
|
||||
/* make sure object fit at this offset */
|
||||
eaddr = saddr + size - 1;
|
||||
if (saddr >= eaddr ||
|
||||
(bo && offset + size > amdgpu_bo_size(bo)))
|
||||
return -EINVAL;
|
||||
r = amdgpu_vm_verify_parameters(adev, bo, saddr, offset, size);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
/* Allocate all the needed memory */
|
||||
mapping = kmalloc(sizeof(*mapping), GFP_KERNEL);
|
||||
|
|
@ -2210,7 +2228,7 @@ int amdgpu_vm_bo_replace_map(struct amdgpu_device *adev,
|
|||
}
|
||||
|
||||
saddr /= AMDGPU_GPU_PAGE_SIZE;
|
||||
eaddr /= AMDGPU_GPU_PAGE_SIZE;
|
||||
eaddr = saddr + (size - 1) / AMDGPU_GPU_PAGE_SIZE;
|
||||
|
||||
mapping->start = saddr;
|
||||
mapping->last = eaddr;
|
||||
|
|
@ -2297,10 +2315,14 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev,
|
|||
struct amdgpu_bo_va_mapping *before, *after, *tmp, *next;
|
||||
LIST_HEAD(removed);
|
||||
uint64_t eaddr;
|
||||
int r;
|
||||
|
||||
r = amdgpu_vm_verify_parameters(adev, NULL, saddr, 0, size);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
eaddr = saddr + size - 1;
|
||||
saddr /= AMDGPU_GPU_PAGE_SIZE;
|
||||
eaddr /= AMDGPU_GPU_PAGE_SIZE;
|
||||
eaddr = saddr + (size - 1) / AMDGPU_GPU_PAGE_SIZE;
|
||||
|
||||
/* Allocate all the needed memory */
|
||||
before = kzalloc(sizeof(*before), GFP_KERNEL);
|
||||
|
|
|
|||
|
|
@ -2007,6 +2007,9 @@ static int sdma_v4_0_process_trap_irq(struct amdgpu_device *adev,
|
|||
|
||||
DRM_DEBUG("IH: SDMA trap\n");
|
||||
instance = sdma_v4_0_irq_id_to_seq(entry->client_id);
|
||||
if (instance < 0)
|
||||
return instance;
|
||||
|
||||
switch (entry->ring_id) {
|
||||
case 0:
|
||||
amdgpu_fence_process(&adev->sdma.instance[instance].ring);
|
||||
|
|
|
|||
|
|
@ -289,6 +289,14 @@ struct kfd_process *kfd_create_process(struct file *filep)
|
|||
if (process) {
|
||||
pr_debug("Process already found\n");
|
||||
} else {
|
||||
/* If the process just called exec(3), it is possible that the
|
||||
* cleanup of the kfd_process (following the release of the mm
|
||||
* of the old process image) is still in the cleanup work queue.
|
||||
* Make sure to drain any job before trying to recreate any
|
||||
* resource for this process.
|
||||
*/
|
||||
flush_workqueue(kfd_process_wq);
|
||||
|
||||
process = create_process(thread);
|
||||
if (IS_ERR(process))
|
||||
goto out;
|
||||
|
|
|
|||
|
|
@ -1251,6 +1251,7 @@ static int dm_resume(void *handle)
|
|||
dc_stream_release(dm_new_crtc_state->stream);
|
||||
dm_new_crtc_state->stream = NULL;
|
||||
}
|
||||
dm_new_crtc_state->base.color_mgmt_changed = true;
|
||||
}
|
||||
|
||||
for_each_new_plane_in_state(dm->cached_state, plane, new_plane_state, i) {
|
||||
|
|
|
|||
|
|
@ -380,6 +380,11 @@ bool cm_helper_translate_curve_to_hw_format(
|
|||
i += increment) {
|
||||
if (j == hw_points - 1)
|
||||
break;
|
||||
if (i >= TRANSFER_FUNC_POINTS) {
|
||||
DC_LOG_ERROR("Index out of bounds: i=%d, TRANSFER_FUNC_POINTS=%d\n",
|
||||
i, TRANSFER_FUNC_POINTS);
|
||||
return false;
|
||||
}
|
||||
rgb_resulted[j].red = output_tf->tf_pts.red[i];
|
||||
rgb_resulted[j].green = output_tf->tf_pts.green[i];
|
||||
rgb_resulted[j].blue = output_tf->tf_pts.blue[i];
|
||||
|
|
|
|||
|
|
@ -70,7 +70,10 @@ static void malidp_mw_connector_reset(struct drm_connector *connector)
|
|||
__drm_atomic_helper_connector_destroy_state(connector->state);
|
||||
|
||||
kfree(connector->state);
|
||||
__drm_atomic_helper_connector_reset(connector, &mw_state->base);
|
||||
connector->state = NULL;
|
||||
|
||||
if (mw_state)
|
||||
__drm_atomic_helper_connector_reset(connector, &mw_state->base);
|
||||
}
|
||||
|
||||
static enum drm_connector_status
|
||||
|
|
|
|||
|
|
@ -700,6 +700,7 @@ int drm_client_modeset_probe(struct drm_client_dev *client, unsigned int width,
|
|||
unsigned int total_modes_count = 0;
|
||||
struct drm_client_offset *offsets;
|
||||
unsigned int connector_count = 0;
|
||||
/* points to modes protected by mode_config.mutex */
|
||||
struct drm_display_mode **modes;
|
||||
struct drm_crtc **crtcs;
|
||||
int i, ret = 0;
|
||||
|
|
@ -768,7 +769,6 @@ int drm_client_modeset_probe(struct drm_client_dev *client, unsigned int width,
|
|||
drm_client_pick_crtcs(client, connectors, connector_count,
|
||||
crtcs, modes, 0, width, height);
|
||||
}
|
||||
mutex_unlock(&dev->mode_config.mutex);
|
||||
|
||||
drm_client_modeset_release(client);
|
||||
|
||||
|
|
@ -798,6 +798,7 @@ int drm_client_modeset_probe(struct drm_client_dev *client, unsigned int width,
|
|||
modeset->y = offset->y;
|
||||
}
|
||||
}
|
||||
mutex_unlock(&dev->mode_config.mutex);
|
||||
|
||||
mutex_unlock(&client->modeset_mutex);
|
||||
out:
|
||||
|
|
|
|||
|
|
@ -21,6 +21,9 @@ static struct mtk_drm_gem_obj *mtk_drm_gem_init(struct drm_device *dev,
|
|||
|
||||
size = round_up(size, PAGE_SIZE);
|
||||
|
||||
if (size == 0)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
mtk_gem_obj = kzalloc(sizeof(*mtk_gem_obj), GFP_KERNEL);
|
||||
if (!mtk_gem_obj)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
|
|
|||
|
|
@ -479,9 +479,6 @@ static void dpu_encoder_phys_cmd_enable_helper(
|
|||
|
||||
_dpu_encoder_phys_cmd_pingpong_config(phys_enc);
|
||||
|
||||
if (!dpu_encoder_phys_cmd_is_master(phys_enc))
|
||||
return;
|
||||
|
||||
ctl = phys_enc->hw_ctl;
|
||||
ctl->ops.get_bitmask_intf(ctl, &flush_mask, phys_enc->intf_idx);
|
||||
ctl->ops.update_pending_flush(ctl, flush_mask);
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
|
||||
#include "nouveau_drv.h"
|
||||
#include "nouveau_bios.h"
|
||||
#include "nouveau_reg.h"
|
||||
#include "dispnv04/hw.h"
|
||||
#include "nouveau_encoder.h"
|
||||
|
|
@ -1672,7 +1673,7 @@ apply_dcb_encoder_quirks(struct drm_device *dev, int idx, u32 *conn, u32 *conf)
|
|||
*/
|
||||
if (nv_match_device(dev, 0x0201, 0x1462, 0x8851)) {
|
||||
if (*conn == 0xf2005014 && *conf == 0xffffffff) {
|
||||
fabricate_dcb_output(dcb, DCB_OUTPUT_TMDS, 1, 1, 1);
|
||||
fabricate_dcb_output(dcb, DCB_OUTPUT_TMDS, 1, 1, DCB_OUTPUT_B);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -1758,26 +1759,26 @@ fabricate_dcb_encoder_table(struct drm_device *dev, struct nvbios *bios)
|
|||
#ifdef __powerpc__
|
||||
/* Apple iMac G4 NV17 */
|
||||
if (of_machine_is_compatible("PowerMac4,5")) {
|
||||
fabricate_dcb_output(dcb, DCB_OUTPUT_TMDS, 0, all_heads, 1);
|
||||
fabricate_dcb_output(dcb, DCB_OUTPUT_ANALOG, 1, all_heads, 2);
|
||||
fabricate_dcb_output(dcb, DCB_OUTPUT_TMDS, 0, all_heads, DCB_OUTPUT_B);
|
||||
fabricate_dcb_output(dcb, DCB_OUTPUT_ANALOG, 1, all_heads, DCB_OUTPUT_C);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Make up some sane defaults */
|
||||
fabricate_dcb_output(dcb, DCB_OUTPUT_ANALOG,
|
||||
bios->legacy.i2c_indices.crt, 1, 1);
|
||||
bios->legacy.i2c_indices.crt, 1, DCB_OUTPUT_B);
|
||||
|
||||
if (nv04_tv_identify(dev, bios->legacy.i2c_indices.tv) >= 0)
|
||||
fabricate_dcb_output(dcb, DCB_OUTPUT_TV,
|
||||
bios->legacy.i2c_indices.tv,
|
||||
all_heads, 0);
|
||||
all_heads, DCB_OUTPUT_A);
|
||||
|
||||
else if (bios->tmds.output0_script_ptr ||
|
||||
bios->tmds.output1_script_ptr)
|
||||
fabricate_dcb_output(dcb, DCB_OUTPUT_TMDS,
|
||||
bios->legacy.i2c_indices.panel,
|
||||
all_heads, 1);
|
||||
all_heads, DCB_OUTPUT_B);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
|||
|
|
@ -66,11 +66,16 @@ of_init(struct nvkm_bios *bios, const char *name)
|
|||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
static void of_fini(void *p)
|
||||
{
|
||||
kfree(p);
|
||||
}
|
||||
|
||||
const struct nvbios_source
|
||||
nvbios_of = {
|
||||
.name = "OpenFirmware",
|
||||
.init = of_init,
|
||||
.fini = (void(*)(void *))kfree,
|
||||
.fini = of_fini,
|
||||
.read = of_read,
|
||||
.size = of_size,
|
||||
.rw = false,
|
||||
|
|
|
|||
|
|
@ -221,8 +221,11 @@ nv50_instobj_acquire(struct nvkm_memory *memory)
|
|||
void __iomem *map = NULL;
|
||||
|
||||
/* Already mapped? */
|
||||
if (refcount_inc_not_zero(&iobj->maps))
|
||||
if (refcount_inc_not_zero(&iobj->maps)) {
|
||||
/* read barrier match the wmb on refcount set */
|
||||
smp_rmb();
|
||||
return iobj->map;
|
||||
}
|
||||
|
||||
/* Take the lock, and re-check that another thread hasn't
|
||||
* already mapped the object in the meantime.
|
||||
|
|
@ -249,6 +252,8 @@ nv50_instobj_acquire(struct nvkm_memory *memory)
|
|||
iobj->base.memory.ptrs = &nv50_instobj_fast;
|
||||
else
|
||||
iobj->base.memory.ptrs = &nv50_instobj_slow;
|
||||
/* barrier to ensure the ptrs are written before refcount is set */
|
||||
smp_wmb();
|
||||
refcount_set(&iobj->maps, 1);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1066,7 +1066,7 @@ static int vmw_event_fence_action_create(struct drm_file *file_priv,
|
|||
}
|
||||
|
||||
event->event.base.type = DRM_VMW_EVENT_FENCE_SIGNALED;
|
||||
event->event.base.length = sizeof(*event);
|
||||
event->event.base.length = sizeof(event->event);
|
||||
event->event.user_data = user_data;
|
||||
|
||||
ret = drm_event_reserve_init(dev, file_priv, &event->base, &event->event.base);
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue