Merge tag 'ASB-2021-02-05_4.19-stable' of https://github.com/aosp-mirror/kernel_common into android12-base
https://source.android.com/security/bulletin/2021-02-01 CVE-2017-18509 CVE-2020-10767 * tag 'ASB-2021-02-05_4.19-stable' of https://github.com/aosp-mirror/kernel_common: ANDROID: GKI: fix up abi issues with 4.19.172 Linux 4.19.172 fs: fix lazytime expiration handling in __writeback_single_inode() writeback: Drop I_DIRTY_TIME_EXPIRE dm integrity: conditionally disable "recalculate" feature tools: Factor HOSTCC, HOSTLD, HOSTAR definitions tracing: Fix race in trace_open and buffer resize call HID: wacom: Correct NULL dereference on AES pen proximity futex: Handle faults correctly for PI futexes futex: Simplify fixup_pi_state_owner() futex: Use pi_state_update_owner() in put_pi_state() rtmutex: Remove unused argument from rt_mutex_proxy_unlock() futex: Provide and use pi_state_update_owner() futex: Replace pointless printk in fixup_owner() futex: Ensure the correct return value from futex_lock_pi() futex: Prevent exit livelock futex: Provide distinct return value when owner is exiting futex: Add mutex around futex exit futex: Provide state handling for exec() as well futex: Sanitize exit state handling futex: Mark the begin of futex exit explicitly futex: Set task::futex_state to DEAD right after handling futex exit futex: Split futex_mm_release() for exit/exec exit/exec: Seperate mm_release() futex: Replace PF_EXITPIDONE with a state futex: Move futex exit handling into futex code Revert "mm/slub: fix a memory leak in sysfs_slab_add()" gpio: mvebu: fix pwm .get_state period calculation FROMGIT: f2fs: flush data when enabling checkpoint back ANDROID: GKI: Added the get_task_pid function Linux 4.19.171 net: dsa: b53: fix an off by one in checking "vlan->vid" net: Disable NETIF_F_HW_TLS_RX when RXCSUM is disabled net: mscc: ocelot: allow offloading of bridge on top of LAG ipv6: set multicast flag on the multicast route net_sched: reject silly cell_log in qdisc_get_rtab() net_sched: avoid shift-out-of-bounds in tcindex_set_parms() ipv6: create multicast route with RTPROT_KERNEL udp: mask TOS bits in udp_v4_early_demux() kasan: fix incorrect arguments passing in kasan_add_zero_shadow kasan: fix unaligned address is unhandled in kasan_remove_zero_shadow skbuff: back tiny skbs with kmalloc() in __netdev_alloc_skb() too sh_eth: Fix power down vs. is_opened flag ordering sh: dma: fix kconfig dependency for G2_DMA netfilter: rpfilter: mask ecn bits before fib lookup driver core: Extend device_is_dependent() xhci: tegra: Delay for disabling LFPS detector xhci: make sure TRB is fully written before giving it to the controller usb: bdc: Make bdc pci driver depend on BROKEN usb: udc: core: Use lock when write to soft_connect usb: gadget: aspeed: fix stop dma register setting. USB: ehci: fix an interrupt calltrace error ehci: fix EHCI host controller initialization sequence serial: mvebu-uart: fix tx lost characters at power off stm class: Fix module init return on allocation failure intel_th: pci: Add Alder Lake-P support irqchip/mips-cpu: Set IPI domain parent chip iio: ad5504: Fix setting power-down state can: peak_usb: fix use after free bugs can: vxcan: vxcan_xmit: fix use after free bug can: dev: can_restart: fix use after free bug selftests: net: fib_tests: remove duplicate log test platform/x86: intel-vbtn: Drop HP Stream x360 Convertible PC 11 from allow-list i2c: octeon: check correct size of maximum RECV_LEN packet scsi: megaraid_sas: Fix MEGASAS_IOC_FIRMWARE regression drm/nouveau/kms/nv50-: fix case where notifier buffer is at offset 0 drm/nouveau/mmu: fix vram heap sizing drm/nouveau/i2c/gm200: increase width of aux semaphore owner fields drm/nouveau/privring: ack interrupts the same way as RM drm/nouveau/bios: fix issue shadowing expansion ROMs xen: Fix event channel callback via INTX/GSI clk: tegra30: Add hda clock default rates to clock driver HID: Ignore battery for Elan touchscreen on ASUS UX550 riscv: Fix kernel time_init() scsi: qedi: Correct max length of CHAP secret scsi: ufs: Correct the LUN used in eh_device_reset_handler() callback ASoC: Intel: haswell: Add missing pm_ops drm/atomic: put state on error path dm integrity: fix a crash if "recalculate" used without "internal_hash" dm: avoid filesystem lookup in dm_get_dev_t() mmc: sdhci-xenon: fix 1.8v regulator stabilization mmc: core: don't initialize block size from ext_csd if not present btrfs: fix lockdep splat in btrfs_recover_relocation ACPI: scan: Make acpi_bus_get_device() clear return pointer on error ALSA: hda/via: Add minimum mute flag ALSA: seq: oss: Fix missing error check in snd_seq_oss_synth_make_info() i2c: bpmp-tegra: Ignore unknown I2C_M flags Revert "ANDROID: Incremental fs: RCU locks instead of mutex for pending_reads." Revert "ANDROID: Incremental fs: Fix minor bugs" Revert "ANDROID: Incremental fs: dentry_revalidate should not return -EBADF." Revert "ANDROID: Incremental fs: Remove annoying pr_debugs" Revert "ANDROID: Incremental fs: Remove unnecessary dependencies" Revert "ANDROID: Incremental fs: Use R/W locks to read/write segment blockmap." Revert "ANDROID: Incremental fs: Stress tool" Revert "ANDROID: Incremental fs: Adding perf test" Revert "ANDROID: Incremental fs: Allow running a single test" Revert "ANDROID: Incremental fs: Fix incfs to work on virtio-9p" Revert "ANDROID: Incremental fs: Don't allow renaming .index directory." Revert "ANDROID: Incremental fs: Create mapped file" Revert "ANDROID: Incremental fs: Add UID to pending_read" Revert "ANDROID: Incremental fs: Separate pseudo-file code" Revert "ANDROID: Incremental fs: Add .blocks_written file" Revert "ANDROID: Incremental fs: Remove attributes from file" Revert "ANDROID: Incremental fs: Remove back links and crcs" Revert "ANDROID: Incremental fs: Remove block HASH flag" Revert "ANDROID: Incremental fs: Make compatible with existing files" Revert "ANDROID: Incremental fs: Add INCFS_IOC_GET_BLOCK_COUNT" Revert "ANDROID: Incremental fs: Add hash block counts to IOC_IOCTL_GET_BLOCK_COUNT" Revert "ANDROID: Incremental fs: Fix filled block count from get filled blocks" Revert "ANDROID: Incremental fs: Fix uninitialized variable" Revert "ANDROID: Incremental fs: Fix dangling else" Revert "ANDROID: Incremental fs: Add .incomplete folder" Revert "ANDROID: Incremental fs: Add per UID read timeouts" Revert "ANDROID: Incremental fs: Fix misuse of cpu_to_leXX and poll return" Revert "ANDROID: Incremental fs: Fix read_log_test which failed sporadically" Revert "ANDROID: Incremental fs: Initialize mount options correctly" Revert "ANDROID: Incremental fs: Small improvements" Revert "ANDROID: Incremental fs: Add zstd compression support" Revert "ANDROID: Incremental fs: Add zstd feature flag" Revert "ANDROID: Incremental fs: Add v2 feature flag" Revert "ANDROID: Incremental fs: Change per UID timeouts to microseconds" Revert "ANDROID: Incremental fs: Fix incfs_test use of atol, open" Revert "ANDROID: Incremental fs: Set credentials before reading/writing" ANDROID: GKI: Update ABI for clang bump ANDROID: clang: update to 12.0.1 Revert "ANDROID: enable LLVM_IAS=1 for clang's integrated assembler for x86_64" ANDROID: enable LLVM_IAS=1 for clang's integrated assembler for x86_64 Linux 4.19.170 spi: cadence: cache reference clock rate during probe net: ipv6: Validate GSO SKB before finish IPv6 processing net: skbuff: disambiguate argument and member for skb_list_walk_safe helper net: introduce skb_list_walk_safe for skb segment walking tipc: fix NULL deref in tipc_link_xmit() rxrpc: Fix handling of an unsupported token type in rxrpc_read() net: avoid 32 x truesize under-estimation for tiny skbs net: sit: unregister_netdevice on newlink's error path net: stmmac: Fixed mtu channged by cache aligned rxrpc: Call state should be read with READ_ONCE() under some circumstances net: dcb: Accept RTM_GETDCB messages carrying set-like DCB commands net: dcb: Validate netlink message in DCB handler esp: avoid unneeded kmap_atomic call rndis_host: set proper input size for OID_GEN_PHYSICAL_MEDIUM request net: mvpp2: Remove Pause and Asym_Pause support netxen_nic: fix MSI/MSI-x interrupts udp: Prevent reuseport_select_sock from reading uninitialized socks nfsd4: readdirplus shouldn't return parent of export crypto: x86/crc32c - fix building with clang ias dm integrity: fix flush with external metadata device compiler.h: Raise minimum version of GCC to 5.1 for arm64 usb: ohci: Make distrust_firmware param default to false ANDROID: GKI: Update the ABI xml and symbol list ANDROID: GKI: genirq: export `kstat_irqs_usr` for watchdog ANDROID: GKI: soc: qcom: export `irq_stack_ptr` ANDROID: ASoC: core: add locked version of soc_find_component ANDROID: dm-user: Fix the list walk-and-delete code Linux 4.19.169 kbuild: enforce -Werror=return-type netfilter: nf_nat: Fix memleak in nf_nat_init netfilter: conntrack: fix reading nf_conntrack_buckets ALSA: fireface: Fix integer overflow in transmit_midi_msg() ALSA: firewire-tascam: Fix integer overflow in midi_port_work() dm: eliminate potential source of excessive kernel log noise net: sunrpc: interpret the return value of kstrtou32 correctly mm, slub: consider rest of partial list if acquire_slab() fails RDMA/mlx5: Fix wrong free of blue flame register on error RDMA/usnic: Fix memleak in find_free_vf_and_create_qp_grp ext4: fix superblock checksum failure when setting password salt NFS: nfs_igrab_and_active must first reference the superblock NFS/pNFS: Fix a leak of the layout 'plh_outstanding' counter pNFS: Mark layout for return if return-on-close was not sent NFS4: Fix use-after-free in trace_event_raw_event_nfs4_set_lock ASoC: Intel: fix error code cnl_set_dsp_D0() ASoC: meson: axg-tdm-interface: fix loopback dump_common_audit_data(): fix racy accesses to ->d_name ima: Remove __init annotation from ima_pcrread() ARM: picoxcell: fix missing interrupt-parent properties drm/msm: Call msm_init_vram before binding the gpu ACPI: scan: add stub acpi_create_platform_device() for !CONFIG_ACPI net: ethernet: fs_enet: Add missing MODULE_LICENSE misdn: dsp: select CONFIG_BITREVERSE arch/arc: add copy_user_page() to <asm/page.h> to fix build error on ARC bfq: Fix computation of shallow depth ethernet: ucc_geth: fix definition and size of ucc_geth_tx_global_pram btrfs: fix transaction leak and crash after RO remount caused by qgroup rescan ARC: build: add boot_targets to PHONY ARC: build: add uImage.lzma to the top-level target ARC: build: remove non-existing bootpImage from KBUILD_IMAGE ext4: fix bug for rename with RENAME_WHITEOUT r8152: Add Lenovo Powered USB-C Travel Hub dm integrity: fix the maximum number of arguments dm snapshot: flush merged data before committing metadata mm/hugetlb: fix potential missing huge page size info ACPI: scan: Harden acpi_device_add() against device ID overflows MIPS: relocatable: fix possible boot hangup with KASLR enabled MIPS: boot: Fix unaligned access with CONFIG_MIPS_RAW_APPENDED_DTB tracing/kprobes: Do the notrace functions check without kprobes on ftrace x86/hyperv: check cpu mask after interrupt has been disabled ASoC: dapm: remove widget from dirty list on free Revert "BACKPORT: FROMGIT: mm: improve mprotect(R|W) efficiency on pages referenced once" Linux 4.19.168 regmap: debugfs: Fix a reversed if statement in regmap_debugfs_init() net: drop bogus skb with CHECKSUM_PARTIAL and offset beyond end of trimmed packet block: fix use-after-free in disk_part_iter_next KVM: arm64: Don't access PMCR_EL0 when no PMU is available wan: ds26522: select CONFIG_BITREVERSE regmap: debugfs: Fix a memory leak when calling regmap_attach_dev net/mlx5e: Fix two double free cases net/mlx5e: Fix memleak in mlx5e_create_l2_table_groups iommu/intel: Fix memleak in intel_irq_remapping_alloc lightnvm: select CONFIG_CRC32 block: rsxx: select CONFIG_CRC32 wil6210: select CONFIG_CRC32 dmaengine: xilinx_dma: fix mixed_enum_type coverity warning dmaengine: xilinx_dma: fix incompatible param warning in _child_probe() dmaengine: xilinx_dma: check dma_async_device_register return value dmaengine: mediatek: mtk-hsdma: Fix a resource leak in the error handling path of the probe function spi: stm32: FIFO threshold level - fix align packet size cpufreq: powernow-k8: pass policy rather than use cpufreq_cpu_get() i2c: sprd: use a specific timeout to avoid system hang up issue ARM: OMAP2+: omap_device: fix idling of devices during probe HID: wacom: Fix memory leakage caused by kfifo_alloc iio: imu: st_lsm6dsx: fix edge-trigger interrupts iio: imu: st_lsm6dsx: flip irq return logic spi: pxa2xx: Fix use-after-free on unbind drm/i915: Fix mismatch between misplaced vma check and vma insert vmlinux.lds.h: Add PGO and AutoFDO input sections x86/resctrl: Don't move a task to the same resource group x86/resctrl: Use an IPI instead of task_work_add() to update PQR_ASSOC MSR chtls: Fix chtls resources release sequence chtls: Added a check to avoid NULL pointer dereference chtls: Replace skb_dequeue with skb_peek chtls: Fix panic when route to peer not configured chtls: Remove invalid set_tcb call chtls: Fix hardware tid leak net: ipv6: fib: flush exceptions when purging route net: fix pmtu check in nopmtudisc mode net: ip: always refragment ip defragmented packets net/sonic: Fix some resource leaks in error handling paths net: vlan: avoid leaks on register_vlan_dev() failures net: stmmac: dwmac-sun8i: Balance internal PHY power net: stmmac: dwmac-sun8i: Balance internal PHY resource references net: hns3: fix the number of queues actually used by ARQ net: cdc_ncm: correct overhead in delayed_ndp_size BACKPORT: FROMGIT: mm: improve mprotect(R|W) efficiency on pages referenced once ANDROID: dm-user: fix typo in channel_free ANDROID: dm-user: Add some missing static Linux 4.19.167 scsi: target: Fix XCOPY NAA identifier lookup KVM: x86: fix shift out of bounds reported by UBSAN x86/mtrr: Correct the range check before performing MTRR type lookups netfilter: xt_RATEEST: reject non-null terminated string from userspace netfilter: ipset: fix shift-out-of-bounds in htable_bits() netfilter: x_tables: Update remaining dereference to RCU xen/pvh: correctly setup the PV EFI interface for dom0 Revert "device property: Keep secondary firmware node secondary by type" btrfs: send: fix wrong file path when there is an inode with a pending rmdir ALSA: hda/realtek - Fix speaker volume control on Lenovo C940 ALSA: hda/conexant: add a new hda codec CX11970 ALSA: hda/via: Fix runtime PM for Clevo W35xSS x86/mm: Fix leak of pmd ptlock USB: serial: keyspan_pda: remove unused variable usb: gadget: configfs: Fix use-after-free issue with udc_name usb: gadget: configfs: Preserve function ordering after bind failure usb: gadget: Fix spinlock lockup on usb_function_deactivate USB: gadget: legacy: fix return error code in acm_ms_bind() usb: gadget: u_ether: Fix MTU size mismatch with RX packet size usb: gadget: function: printer: Fix a memory leak for interface descriptor usb: gadget: f_uac2: reset wMaxPacketSize usb: gadget: select CONFIG_CRC32 ALSA: usb-audio: Fix UBSAN warnings for MIDI jacks USB: usblp: fix DMA to stack USB: yurex: fix control-URB timeout handling USB: serial: option: add Quectel EM160R-GL USB: serial: option: add LongSung M5710 module support USB: serial: iuu_phoenix: fix DMA from stack usb: uas: Add PNY USB Portable SSD to unusual_uas usb: usbip: vhci_hcd: protect shift size USB: xhci: fix U1/U2 handling for hardware with XHCI_INTEL_HOST quirk set usb: chipidea: ci_hdrc_imx: add missing put_device() call in usbmisc_get_init_data() usb: dwc3: ulpi: Use VStsDone to detect PHY regs access completion USB: cdc-wdm: Fix use after free in service_outstanding_interrupt(). USB: cdc-acm: blacklist another IR Droid device usb: gadget: enable super speed plus staging: mt7621-dma: Fix a resource leak in an error handling path crypto: ecdh - avoid buffer overflow in ecdh_set_secret() video: hyperv_fb: Fix the mmap() regression for v5.4.y and older Bluetooth: revert: hci_h5: close serdev device and free hu in h5_close net: systemport: set dev->max_mtu to UMAC_MAX_MTU_SIZE net-sysfs: take the rtnl lock when accessing xps_rxqs_map and num_tc net-sysfs: take the rtnl lock when storing xps_rxqs net: sched: prevent invalid Scell_log shift count vhost_net: fix ubuf refcount incorrectly when sendmsg fails r8169: work around power-saving bug on some chip versions net: usb: qmi_wwan: add Quectel EM160R-GL CDC-NCM: remove "connected" log message net: hdlc_ppp: Fix issues when mod_timer is called while timer is running erspan: fix version 1 check in gre_parse_header() net: hns: fix return value check in __lb_other_process() ipv4: Ignore ECN bits for fib lookups in fib_compute_spec_dst() tun: fix return value when the number of iovs exceeds MAX_SKB_FRAGS net: ethernet: ti: cpts: fix ethtool output when no ptp_clock registered net-sysfs: take the rtnl lock when accessing xps_cpus_map and num_tc net-sysfs: take the rtnl lock when storing xps_cpus net: ethernet: Fix memleak in ethoc_probe net/ncsi: Use real net-device for response handler virtio_net: Fix recursive call to cpus_read_lock() qede: fix offload for IPIP tunnel packets net: mvpp2: Fix GoP port 3 Networking Complex Control configurations atm: idt77252: call pci_disable_device() on error path ethernet: ucc_geth: set dev->max_mtu to 1518 ethernet: ucc_geth: fix use-after-free in ucc_geth_remove() net: mvpp2: prs: fix PPPoE with ipv6 packet parse net: mvpp2: Add TCAM entry to drop flow control pause frames i40e: Fix Error I40E_AQ_RC_EINVAL when removing VFs proc: fix lookup in /proc/net subdirectories after setns(2) proc: change ->nlink under proc_subdir_lock depmod: handle the case of /sbin/depmod without /sbin in PATH lib/genalloc: fix the overflow when size is too big scsi: scsi_transport_spi: Set RQF_PM for domain validation commands scsi: ide: Do not set the RQF_PREEMPT flag for sense requests scsi: ufs-pci: Ensure UFS device is in PowerDown mode for suspend-to-disk ->poweroff() scsi: ufs: Fix wrong print message in dev_err() workqueue: Kick a worker based on the actual activation of delayed works kbuild: don't hardcode depmod path ANDROID: enable LLVM_IAS=1 for clang's integrated assembler for aarch64 Revert "ANDROID: arm64: lse: fix LSE atomics with LTO" ANDROID: uapi: Add dm-user structure definition ANDROID: dm: dm-user: New target that proxies BIOs to userspace ANDROID: GKI: Enable XFRM_MIGRATE Linux 4.19.166 mwifiex: Fix possible buffer overflows in mwifiex_cmd_802_11_ad_hoc_start iio:magnetometer:mag3110: Fix alignment and data leak issues. iio:imu:bmi160: Fix alignment and data leak issues kdev_t: always inline major/minor helper functions dmaengine: at_hdmac: add missing kfree() call in at_dma_xlate() dmaengine: at_hdmac: add missing put_device() call in at_dma_xlate() dmaengine: at_hdmac: Substitute kzalloc with kmalloc Revert "mtd: spinand: Fix OOB read" Linux 4.19.165 dm verity: skip verity work if I/O error when system is shutting down ALSA: pcm: Clear the full allocated memory at hw_params module: delay kobject uevent until after module init call NFSv4: Fix a pNFS layout related use-after-free race when freeing the inode powerpc: sysdev: add missing iounmap() on error in mpic_msgr_probe() quota: Don't overflow quota file offsets module: set MODULE_STATE_GOING state when a module fails to load rtc: sun6i: Fix memleak in sun6i_rtc_clk_init fcntl: Fix potential deadlock in send_sig{io, urg}() ALSA: rawmidi: Access runtime->avail always in spinlock ALSA: seq: Use bool for snd_seq_queue internal flags media: gp8psk: initialize stats at power control logic misc: vmw_vmci: fix kernel info-leak by initializing dbells in vmci_ctx_get_chkpt_doorbells() reiserfs: add check for an invalid ih_entry_count Bluetooth: hci_h5: close serdev device and free hu in h5_close of: fix linker-section match-table corruption null_blk: Fix zone size initialization xen/gntdev.c: Mark pages as dirty powerpc/bitops: Fix possible undefined behaviour with fls() and fls64() KVM: x86: reinstate vendor-agnostic check on SPEC_CTRL cpuid bits KVM: SVM: relax conditions for allowing MSR_IA32_SPEC_CTRL accesses uapi: move constants from <linux/kernel.h> to <linux/const.h> ext4: don't remount read-only with errors=continue on reboot vfio/pci: Move dummy_resources_list init in vfio_pci_probe() ubifs: prevent creating duplicate encrypted filenames f2fs: prevent creating duplicate encrypted filenames ext4: prevent creating duplicate encrypted filenames fscrypt: add fscrypt_is_nokey_name() md/raid10: initialize r10_bio->read_slot before use. ANDROID: usb: f_accessory: Don't drop NULL reference in acc_disconnect() ANDROID: usb: f_accessory: Avoid bitfields for shared variables ANDROID: usb: f_accessory: Cancel any pending work before teardown ANDROID: usb: f_accessory: Don't corrupt global state on double registration ANDROID: usb: f_accessory: Fix teardown ordering in acc_release() ANDROID: usb: f_accessory: Add refcounting to global 'acc_dev' ANDROID: usb: f_accessory: Wrap '_acc_dev' in get()/put() accessors ANDROID: usb: f_accessory: Remove useless assignment ANDROID: usb: f_accessory: Remove useless non-debug prints ANDROID: usb: f_accessory: Remove stale comments ANDROID: USB: f_accessory: Check dev pointer before decoding ctrl request ANDROID: usb: gadget: f_accessory: fix CTS test stuck Change-Id: I0a8e8e2b9b66be8cc73bd1ad084264b522ac34a3 Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>
This commit is contained in:
commit
5d353c7fc5
@ -146,6 +146,13 @@ block_size:number
|
||||
Supported values are 512, 1024, 2048 and 4096 bytes. If not
|
||||
specified the default block size is 512 bytes.
|
||||
|
||||
legacy_recalculate
|
||||
Allow recalculating of volumes with HMAC keys. This is disabled by
|
||||
default for security reasons - an attacker could modify the volume,
|
||||
set recalc_sector to zero, and the kernel would not detect the
|
||||
modification.
|
||||
|
||||
|
||||
The journal mode (D/J), buffer_sectors, journal_watermark, commit_time can
|
||||
be changed when reloading the target (load an inactive table and swap the
|
||||
tables with suspend and resume). The other arguments should not be changed
|
||||
|
6
Makefile
6
Makefile
@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 19
|
||||
SUBLEVEL = 164
|
||||
SUBLEVEL = 172
|
||||
EXTRAVERSION =
|
||||
NAME = "People's Front"
|
||||
|
||||
@ -400,7 +400,7 @@ YACC = bison
|
||||
AWK = awk
|
||||
GENKSYMS = scripts/genksyms/genksyms
|
||||
INSTALLKERNEL := installkernel
|
||||
DEPMOD = /sbin/depmod
|
||||
DEPMOD = depmod
|
||||
PERL = perl
|
||||
PYTHON = python
|
||||
PYTHON2 = python2
|
||||
@ -438,7 +438,7 @@ KBUILD_AFLAGS := -D__ASSEMBLY__
|
||||
KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
|
||||
-fno-strict-aliasing -fno-common -fshort-wchar \
|
||||
-Werror-implicit-function-declaration \
|
||||
-Wno-format-security \
|
||||
-Werror=return-type -Wno-format-security \
|
||||
-std=gnu89
|
||||
KBUILD_CPPFLAGS := -D__KERNEL__
|
||||
KBUILD_AFLAGS_KERNEL :=
|
||||
|
@ -139,7 +139,9 @@
|
||||
kstrtoull
|
||||
__ll_sc_atomic64_fetch_andnot_release
|
||||
__ll_sc_atomic64_fetch_or_acquire
|
||||
__ll_sc_atomic_add
|
||||
__ll_sc_atomic_sub_return
|
||||
__ll_sc___cmpxchg_case_mb_4
|
||||
memcpy
|
||||
memset
|
||||
memzero_explicit
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -53,6 +53,7 @@
|
||||
__check_object_size
|
||||
__class_create
|
||||
class_destroy
|
||||
_cleanup_srcu_struct
|
||||
clk_disable
|
||||
clk_enable
|
||||
clk_fixed_factor_ops
|
||||
@ -366,6 +367,7 @@
|
||||
iomem_resource
|
||||
iommu_attach_device
|
||||
iommu_detach_device
|
||||
iommu_dma_enable_best_fit_algo
|
||||
iommu_domain_alloc
|
||||
iommu_domain_free
|
||||
iommu_domain_get_attr
|
||||
@ -400,6 +402,7 @@
|
||||
irq_set_affinity_notifier
|
||||
irq_set_chip_and_handler_name
|
||||
irq_set_chip_data
|
||||
irq_set_irqchip_state
|
||||
irq_set_irq_type
|
||||
irq_set_irq_wake
|
||||
irq_to_desc
|
||||
@ -907,6 +910,7 @@
|
||||
strpbrk
|
||||
strrchr
|
||||
strsep
|
||||
strstr
|
||||
__sw_hweight32
|
||||
__sw_hweight64
|
||||
__sw_hweight8
|
||||
@ -963,6 +967,7 @@
|
||||
trace_raw_output_prep
|
||||
trace_seq_printf
|
||||
try_module_get
|
||||
try_to_del_timer_sync
|
||||
tty_flip_buffer_push
|
||||
typec_register_partner
|
||||
typec_register_port
|
||||
@ -1052,9 +1057,6 @@
|
||||
try_wait_for_completion
|
||||
vfs_statx
|
||||
|
||||
# required by apr_dlkm.ko
|
||||
strstr
|
||||
|
||||
# required by arm-memlat-mon.ko
|
||||
perf_event_create_kernel_counter
|
||||
perf_event_enable
|
||||
@ -1147,7 +1149,6 @@
|
||||
led_trigger_unregister_simple
|
||||
|
||||
# required by cam_smmu_api.ko
|
||||
iommu_dma_enable_best_fit_algo
|
||||
iommu_dma_reserve_iova
|
||||
|
||||
# required by cam_utils.ko
|
||||
@ -1472,6 +1473,7 @@
|
||||
pci_release_region
|
||||
pci_request_region
|
||||
remove_wait_queue
|
||||
vmemdup_user
|
||||
vm_iomap_memory
|
||||
wait_woken
|
||||
woken_wake_function
|
||||
@ -1503,7 +1505,7 @@
|
||||
snd_soc_of_parse_card_name
|
||||
snd_soc_pm_ops
|
||||
snd_soc_unregister_card
|
||||
soc_find_component
|
||||
soc_find_component_locked
|
||||
|
||||
# required by mbhc_dlkm.ko
|
||||
snd_jack_set_key
|
||||
@ -1512,6 +1514,7 @@
|
||||
|
||||
# required by minidump_log.ko
|
||||
__bss_stop
|
||||
irq_stack_ptr
|
||||
log_buf_addr_get
|
||||
log_buf_len_get
|
||||
__per_cpu_end
|
||||
@ -1551,7 +1554,6 @@
|
||||
|
||||
# required by msm_adreno.ko
|
||||
bpf_trace_run10
|
||||
_cleanup_srcu_struct
|
||||
__clk_get_name
|
||||
devfreq_cooling_unregister
|
||||
device_show_int
|
||||
@ -1567,6 +1569,7 @@
|
||||
getboottime64
|
||||
get_random_u32
|
||||
get_task_mm
|
||||
get_task_pid
|
||||
get_unmapped_area
|
||||
get_user_pages
|
||||
idr_for_each
|
||||
@ -1588,6 +1591,7 @@
|
||||
security_mmap_addr
|
||||
set_page_dirty_lock
|
||||
sg_alloc_table_from_pages
|
||||
shmem_read_mapping_page_gfp
|
||||
sysfs_remove_files
|
||||
__tracepoint_gpu_mem_total
|
||||
unmapped_area_topdown
|
||||
@ -1963,9 +1967,6 @@
|
||||
crc8
|
||||
crc8_populate_msb
|
||||
|
||||
# required by pac193x.ko
|
||||
try_to_del_timer_sync
|
||||
|
||||
# required by peripheral-loader.ko
|
||||
__iowrite32_copy
|
||||
memblock_overlaps_memory
|
||||
@ -1987,6 +1988,8 @@
|
||||
irq_chip_set_wake_parent
|
||||
irq_create_fwspec_mapping
|
||||
irq_domain_free_irqs_top
|
||||
__irq_set_handler
|
||||
irq_set_handler_data
|
||||
of_irq_domain_map
|
||||
register_restart_handler
|
||||
unregister_restart_handler
|
||||
@ -2177,6 +2180,12 @@
|
||||
gen_pool_set_algo
|
||||
gen_pool_virt_to_phys
|
||||
|
||||
# required by ramdump.ko
|
||||
init_srcu_struct
|
||||
__srcu_read_lock
|
||||
__srcu_read_unlock
|
||||
synchronize_srcu
|
||||
|
||||
# required by regmap-spmi.ko
|
||||
spmi_ext_register_read
|
||||
spmi_ext_register_readl
|
||||
@ -2556,7 +2565,6 @@
|
||||
device_wakeup_disable
|
||||
extcon_get_edev_name
|
||||
extcon_get_property
|
||||
irq_set_irqchip_state
|
||||
pm_runtime_barrier
|
||||
regulator_register_notifier
|
||||
regulator_unregister_notifier
|
||||
@ -2599,6 +2607,10 @@
|
||||
disable_percpu_irq
|
||||
enable_percpu_irq
|
||||
free_percpu_irq
|
||||
irq_stat
|
||||
kstat
|
||||
kstat_irqs_usr
|
||||
nr_irqs
|
||||
panic_timeout
|
||||
__request_percpu_irq
|
||||
|
||||
@ -2722,7 +2734,7 @@
|
||||
|
||||
# preserved by --additions-only
|
||||
crc32_le
|
||||
get_next_event_cpu
|
||||
simple_strtoull
|
||||
soc_find_component
|
||||
vm_map_ram
|
||||
vm_unmap_ram
|
||||
|
@ -91,14 +91,9 @@ libs-y += arch/arc/lib/ $(LIBGCC)
|
||||
|
||||
boot := arch/arc/boot
|
||||
|
||||
#default target for make without any arguments.
|
||||
KBUILD_IMAGE := $(boot)/bootpImage
|
||||
|
||||
all: bootpImage
|
||||
bootpImage: vmlinux
|
||||
|
||||
boot_targets += uImage uImage.bin uImage.gz
|
||||
boot_targets := uImage uImage.bin uImage.gz uImage.lzma
|
||||
|
||||
PHONY += $(boot_targets)
|
||||
$(boot_targets): vmlinux
|
||||
$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
|
||||
|
||||
|
@ -13,6 +13,7 @@
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#define clear_page(paddr) memset((paddr), 0, PAGE_SIZE)
|
||||
#define copy_user_page(to, from, vaddr, pg) copy_page(to, from)
|
||||
#define copy_page(to, from) memcpy((to), (from), PAGE_SIZE)
|
||||
|
||||
struct vm_area_struct;
|
||||
|
@ -54,18 +54,21 @@
|
||||
emac: gem@30000 {
|
||||
compatible = "cadence,gem";
|
||||
reg = <0x30000 0x10000>;
|
||||
interrupt-parent = <&vic0>;
|
||||
interrupts = <31>;
|
||||
};
|
||||
|
||||
dmac1: dmac@40000 {
|
||||
compatible = "snps,dw-dmac";
|
||||
reg = <0x40000 0x10000>;
|
||||
interrupt-parent = <&vic0>;
|
||||
interrupts = <25>;
|
||||
};
|
||||
|
||||
dmac2: dmac@50000 {
|
||||
compatible = "snps,dw-dmac";
|
||||
reg = <0x50000 0x10000>;
|
||||
interrupt-parent = <&vic0>;
|
||||
interrupts = <26>;
|
||||
};
|
||||
|
||||
@ -243,6 +246,7 @@
|
||||
axi2pico@c0000000 {
|
||||
compatible = "picochip,axi2pico-pc3x2";
|
||||
reg = <0xc0000000 0x10000>;
|
||||
interrupt-parent = <&vic0>;
|
||||
interrupts = <13 14 15 16 17 18 19 20 21>;
|
||||
};
|
||||
};
|
||||
|
@ -239,10 +239,12 @@ static int _omap_device_notifier_call(struct notifier_block *nb,
|
||||
break;
|
||||
case BUS_NOTIFY_BIND_DRIVER:
|
||||
od = to_omap_device(pdev);
|
||||
if (od && (od->_state == OMAP_DEVICE_STATE_ENABLED) &&
|
||||
pm_runtime_status_suspended(dev)) {
|
||||
if (od) {
|
||||
od->_driver_status = BUS_NOTIFY_BIND_DRIVER;
|
||||
pm_runtime_set_active(dev);
|
||||
if (od->_state == OMAP_DEVICE_STATE_ENABLED &&
|
||||
pm_runtime_status_suspended(dev)) {
|
||||
pm_runtime_set_active(dev);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case BUS_NOTIFY_ADD_DEVICE:
|
||||
|
@ -405,7 +405,7 @@ static int __init xen_guest_init(void)
|
||||
}
|
||||
gnttab_init();
|
||||
if (!xen_initial_domain())
|
||||
xenbus_probe(NULL);
|
||||
xenbus_probe();
|
||||
|
||||
/*
|
||||
* Making sure board specific code will not set up ops for
|
||||
|
@ -101,6 +101,7 @@ CONFIG_PACKET=y
|
||||
CONFIG_UNIX=y
|
||||
CONFIG_XFRM_USER=y
|
||||
CONFIG_XFRM_INTERFACE=y
|
||||
CONFIG_XFRM_MIGRATE=y
|
||||
CONFIG_XFRM_STATISTICS=y
|
||||
CONFIG_NET_KEY=y
|
||||
CONFIG_XDP_SOCKETS=y
|
||||
|
@ -22,13 +22,6 @@
|
||||
|
||||
#else /* __ASSEMBLER__ */
|
||||
|
||||
#ifdef CONFIG_LTO_CLANG
|
||||
#define __LSE_PREAMBLE ".arch_extension lse\n"
|
||||
#else
|
||||
__asm__(".arch_extension lse");
|
||||
#define __LSE_PREAMBLE
|
||||
#endif
|
||||
|
||||
/* Move the ll/sc atomics out-of-line */
|
||||
#define __LL_SC_INLINE notrace
|
||||
#define __LL_SC_PREFIX(x) __ll_sc_##x
|
||||
|
@ -38,6 +38,7 @@ unsigned long irq_err_count;
|
||||
DEFINE_PER_CPU(struct nmi_ctx, nmi_contexts);
|
||||
|
||||
DEFINE_PER_CPU(unsigned long *, irq_stack_ptr);
|
||||
EXPORT_PER_CPU_SYMBOL_GPL(irq_stack_ptr);
|
||||
|
||||
int arch_show_interrupts(struct seq_file *p, int prec)
|
||||
{
|
||||
|
@ -619,6 +619,10 @@ static void reset_pmcr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *r)
|
||||
{
|
||||
u64 pmcr, val;
|
||||
|
||||
/* No PMU available, PMCR_EL0 may UNDEF... */
|
||||
if (!kvm_arm_support_pmu_v3())
|
||||
return;
|
||||
|
||||
pmcr = read_sysreg(pmcr_el0);
|
||||
/*
|
||||
* Writable bits of PMCR_EL0 (ARMV8_PMU_PMCR_MASK) are reset to UNKNOWN
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include <linux/libfdt.h>
|
||||
|
||||
#include <asm/addrspace.h>
|
||||
#include <asm/unaligned.h>
|
||||
|
||||
/*
|
||||
* These two variables specify the free mem region
|
||||
@ -117,7 +118,7 @@ void decompress_kernel(unsigned long boot_heap_start)
|
||||
dtb_size = fdt_totalsize((void *)&__appended_dtb);
|
||||
|
||||
/* last four bytes is always image size in little endian */
|
||||
image_size = le32_to_cpup((void *)&__image_end - 4);
|
||||
image_size = get_unaligned_le32((void *)&__image_end - 4);
|
||||
|
||||
/* copy dtb to where the booted kernel will expect it */
|
||||
memcpy((void *)VMLINUX_LOAD_ADDRESS_ULL + image_size,
|
||||
|
@ -187,8 +187,14 @@ static int __init relocate_exception_table(long offset)
|
||||
static inline __init unsigned long rotate_xor(unsigned long hash,
|
||||
const void *area, size_t size)
|
||||
{
|
||||
size_t i;
|
||||
unsigned long *ptr = (unsigned long *)area;
|
||||
const typeof(hash) *ptr = PTR_ALIGN(area, sizeof(hash));
|
||||
size_t diff, i;
|
||||
|
||||
diff = (void *)ptr - area;
|
||||
if (unlikely(size < diff + sizeof(hash)))
|
||||
return hash;
|
||||
|
||||
size = ALIGN_DOWN(size - diff, sizeof(hash));
|
||||
|
||||
for (i = 0; i < size / sizeof(hash); i++) {
|
||||
/* Rotate by odd number of bits and XOR. */
|
||||
|
@ -221,15 +221,34 @@ static __inline__ void __clear_bit_unlock(int nr, volatile unsigned long *addr)
|
||||
*/
|
||||
static __inline__ int fls(unsigned int x)
|
||||
{
|
||||
return 32 - __builtin_clz(x);
|
||||
int lz;
|
||||
|
||||
if (__builtin_constant_p(x))
|
||||
return x ? 32 - __builtin_clz(x) : 0;
|
||||
asm("cntlzw %0,%1" : "=r" (lz) : "r" (x));
|
||||
return 32 - lz;
|
||||
}
|
||||
|
||||
#include <asm-generic/bitops/builtin-__fls.h>
|
||||
|
||||
/*
|
||||
* 64-bit can do this using one cntlzd (count leading zeroes doubleword)
|
||||
* instruction; for 32-bit we use the generic version, which does two
|
||||
* 32-bit fls calls.
|
||||
*/
|
||||
#ifdef CONFIG_PPC64
|
||||
static __inline__ int fls64(__u64 x)
|
||||
{
|
||||
return 64 - __builtin_clzll(x);
|
||||
int lz;
|
||||
|
||||
if (__builtin_constant_p(x))
|
||||
return x ? 64 - __builtin_clzll(x) : 0;
|
||||
asm("cntlzd %0,%1" : "=r" (lz) : "r" (x));
|
||||
return 64 - lz;
|
||||
}
|
||||
#else
|
||||
#include <asm-generic/bitops/fls64.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PPC64
|
||||
unsigned int __arch_hweight8(unsigned int w);
|
||||
|
@ -196,7 +196,7 @@ static int mpic_msgr_probe(struct platform_device *dev)
|
||||
|
||||
/* IO map the message register block. */
|
||||
of_address_to_resource(np, 0, &rsrc);
|
||||
msgr_block_addr = ioremap(rsrc.start, resource_size(&rsrc));
|
||||
msgr_block_addr = devm_ioremap(&dev->dev, rsrc.start, resource_size(&rsrc));
|
||||
if (!msgr_block_addr) {
|
||||
dev_err(&dev->dev, "Failed to iomap MPIC message registers");
|
||||
return -EFAULT;
|
||||
|
@ -12,6 +12,7 @@
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include <linux/of_clk.h>
|
||||
#include <linux/clocksource.h>
|
||||
#include <linux/delay.h>
|
||||
#include <asm/sbi.h>
|
||||
@ -29,5 +30,7 @@ void __init time_init(void)
|
||||
riscv_timebase = prop;
|
||||
|
||||
lpj_fine = riscv_timebase / HZ;
|
||||
|
||||
of_clk_init(NULL);
|
||||
timer_probe();
|
||||
}
|
||||
|
@ -63,8 +63,7 @@ config PVR2_DMA
|
||||
|
||||
config G2_DMA
|
||||
tristate "G2 Bus DMA support"
|
||||
depends on SH_DREAMCAST
|
||||
select SH_DMA_API
|
||||
depends on SH_DREAMCAST && SH_DMA_API
|
||||
help
|
||||
This enables support for the DMA controller for the Dreamcast's
|
||||
G2 bus. Drivers that want this will generally enable this on
|
||||
|
@ -73,6 +73,7 @@ CONFIG_PACKET=y
|
||||
CONFIG_UNIX=y
|
||||
CONFIG_XFRM_USER=y
|
||||
CONFIG_XFRM_INTERFACE=y
|
||||
CONFIG_XFRM_MIGRATE=y
|
||||
CONFIG_XFRM_STATISTICS=y
|
||||
CONFIG_NET_KEY=y
|
||||
CONFIG_XDP_SOCKETS=y
|
||||
|
@ -170,7 +170,7 @@ continue_block:
|
||||
|
||||
## branch into array
|
||||
lea jump_table(%rip), bufp
|
||||
movzxw (bufp, %rax, 2), len
|
||||
movzwq (bufp, %rax, 2), len
|
||||
lea crc_array(%rip), bufp
|
||||
lea (bufp, len, 1), bufp
|
||||
JMP_NOSPEC bufp
|
||||
|
@ -66,11 +66,17 @@ static void hyperv_flush_tlb_others(const struct cpumask *cpus,
|
||||
if (!hv_hypercall_pg)
|
||||
goto do_native;
|
||||
|
||||
if (cpumask_empty(cpus))
|
||||
return;
|
||||
|
||||
local_irq_save(flags);
|
||||
|
||||
/*
|
||||
* Only check the mask _after_ interrupt has been disabled to avoid the
|
||||
* mask changing under our feet.
|
||||
*/
|
||||
if (cpumask_empty(cpus)) {
|
||||
local_irq_restore(flags);
|
||||
return;
|
||||
}
|
||||
|
||||
flush_pcpu = (struct hv_tlb_flush **)
|
||||
this_cpu_ptr(hyperv_pcpu_input_arg);
|
||||
|
||||
|
@ -533,85 +533,70 @@ static void rdtgroup_remove(struct rdtgroup *rdtgrp)
|
||||
kfree(rdtgrp);
|
||||
}
|
||||
|
||||
struct task_move_callback {
|
||||
struct callback_head work;
|
||||
struct rdtgroup *rdtgrp;
|
||||
};
|
||||
|
||||
static void move_myself(struct callback_head *head)
|
||||
static void _update_task_closid_rmid(void *task)
|
||||
{
|
||||
struct task_move_callback *callback;
|
||||
struct rdtgroup *rdtgrp;
|
||||
|
||||
callback = container_of(head, struct task_move_callback, work);
|
||||
rdtgrp = callback->rdtgrp;
|
||||
|
||||
/*
|
||||
* If resource group was deleted before this task work callback
|
||||
* was invoked, then assign the task to root group and free the
|
||||
* resource group.
|
||||
* If the task is still current on this CPU, update PQR_ASSOC MSR.
|
||||
* Otherwise, the MSR is updated when the task is scheduled in.
|
||||
*/
|
||||
if (atomic_dec_and_test(&rdtgrp->waitcount) &&
|
||||
(rdtgrp->flags & RDT_DELETED)) {
|
||||
current->closid = 0;
|
||||
current->rmid = 0;
|
||||
rdtgroup_remove(rdtgrp);
|
||||
}
|
||||
if (task == current)
|
||||
intel_rdt_sched_in();
|
||||
}
|
||||
|
||||
preempt_disable();
|
||||
/* update PQR_ASSOC MSR to make resource group go into effect */
|
||||
intel_rdt_sched_in();
|
||||
preempt_enable();
|
||||
|
||||
kfree(callback);
|
||||
static void update_task_closid_rmid(struct task_struct *t)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_SMP) && task_curr(t))
|
||||
smp_call_function_single(task_cpu(t), _update_task_closid_rmid, t, 1);
|
||||
else
|
||||
_update_task_closid_rmid(t);
|
||||
}
|
||||
|
||||
static int __rdtgroup_move_task(struct task_struct *tsk,
|
||||
struct rdtgroup *rdtgrp)
|
||||
{
|
||||
struct task_move_callback *callback;
|
||||
int ret;
|
||||
|
||||
callback = kzalloc(sizeof(*callback), GFP_KERNEL);
|
||||
if (!callback)
|
||||
return -ENOMEM;
|
||||
callback->work.func = move_myself;
|
||||
callback->rdtgrp = rdtgrp;
|
||||
/* If the task is already in rdtgrp, no need to move the task. */
|
||||
if ((rdtgrp->type == RDTCTRL_GROUP && tsk->closid == rdtgrp->closid &&
|
||||
tsk->rmid == rdtgrp->mon.rmid) ||
|
||||
(rdtgrp->type == RDTMON_GROUP && tsk->rmid == rdtgrp->mon.rmid &&
|
||||
tsk->closid == rdtgrp->mon.parent->closid))
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Take a refcount, so rdtgrp cannot be freed before the
|
||||
* callback has been invoked.
|
||||
* Set the task's closid/rmid before the PQR_ASSOC MSR can be
|
||||
* updated by them.
|
||||
*
|
||||
* For ctrl_mon groups, move both closid and rmid.
|
||||
* For monitor groups, can move the tasks only from
|
||||
* their parent CTRL group.
|
||||
*/
|
||||
atomic_inc(&rdtgrp->waitcount);
|
||||
ret = task_work_add(tsk, &callback->work, true);
|
||||
if (ret) {
|
||||
/*
|
||||
* Task is exiting. Drop the refcount and free the callback.
|
||||
* No need to check the refcount as the group cannot be
|
||||
* deleted before the write function unlocks rdtgroup_mutex.
|
||||
*/
|
||||
atomic_dec(&rdtgrp->waitcount);
|
||||
kfree(callback);
|
||||
rdt_last_cmd_puts("task exited\n");
|
||||
} else {
|
||||
/*
|
||||
* For ctrl_mon groups move both closid and rmid.
|
||||
* For monitor groups, can move the tasks only from
|
||||
* their parent CTRL group.
|
||||
*/
|
||||
if (rdtgrp->type == RDTCTRL_GROUP) {
|
||||
tsk->closid = rdtgrp->closid;
|
||||
|
||||
if (rdtgrp->type == RDTCTRL_GROUP) {
|
||||
tsk->closid = rdtgrp->closid;
|
||||
tsk->rmid = rdtgrp->mon.rmid;
|
||||
} else if (rdtgrp->type == RDTMON_GROUP) {
|
||||
if (rdtgrp->mon.parent->closid == tsk->closid) {
|
||||
tsk->rmid = rdtgrp->mon.rmid;
|
||||
} else if (rdtgrp->type == RDTMON_GROUP) {
|
||||
if (rdtgrp->mon.parent->closid == tsk->closid) {
|
||||
tsk->rmid = rdtgrp->mon.rmid;
|
||||
} else {
|
||||
rdt_last_cmd_puts("Can't move task to different control group\n");
|
||||
ret = -EINVAL;
|
||||
}
|
||||
} else {
|
||||
rdt_last_cmd_puts("Can't move task to different control group\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
|
||||
/*
|
||||
* Ensure the task's closid and rmid are written before determining if
|
||||
* the task is current that will decide if it will be interrupted.
|
||||
*/
|
||||
barrier();
|
||||
|
||||
/*
|
||||
* By now, the task's closid and rmid are set. If the task is current
|
||||
* on a CPU, the PQR_ASSOC MSR needs to be updated to make the resource
|
||||
* group go into effect. If the task is not current, the MSR will be
|
||||
* updated when the task is scheduled in.
|
||||
*/
|
||||
update_task_closid_rmid(tsk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -166,9 +166,6 @@ static u8 mtrr_type_lookup_variable(u64 start, u64 end, u64 *partial_end,
|
||||
*repeat = 0;
|
||||
*uniform = 1;
|
||||
|
||||
/* Make end inclusive instead of exclusive */
|
||||
end--;
|
||||
|
||||
prev_match = MTRR_TYPE_INVALID;
|
||||
for (i = 0; i < num_var_ranges; ++i) {
|
||||
unsigned short start_state, end_state, inclusive;
|
||||
@ -260,6 +257,9 @@ u8 mtrr_type_lookup(u64 start, u64 end, u8 *uniform)
|
||||
int repeat;
|
||||
u64 partial_end;
|
||||
|
||||
/* Make end inclusive instead of exclusive */
|
||||
end--;
|
||||
|
||||
if (!mtrr_state_set)
|
||||
return MTRR_TYPE_INVALID;
|
||||
|
||||
|
@ -154,6 +154,20 @@ static inline int guest_cpuid_stepping(struct kvm_vcpu *vcpu)
|
||||
return x86_stepping(best->eax);
|
||||
}
|
||||
|
||||
static inline bool guest_has_spec_ctrl_msr(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
return (guest_cpuid_has(vcpu, X86_FEATURE_SPEC_CTRL) ||
|
||||
guest_cpuid_has(vcpu, X86_FEATURE_AMD_STIBP) ||
|
||||
guest_cpuid_has(vcpu, X86_FEATURE_AMD_IBRS) ||
|
||||
guest_cpuid_has(vcpu, X86_FEATURE_AMD_SSBD));
|
||||
}
|
||||
|
||||
static inline bool guest_has_pred_cmd_msr(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
return (guest_cpuid_has(vcpu, X86_FEATURE_SPEC_CTRL) ||
|
||||
guest_cpuid_has(vcpu, X86_FEATURE_AMD_IBPB));
|
||||
}
|
||||
|
||||
static inline bool supports_cpuid_fault(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
return vcpu->arch.msr_platform_info & MSR_PLATFORM_INFO_CPUID_FAULT;
|
||||
|
@ -53,7 +53,7 @@ static inline u64 rsvd_bits(int s, int e)
|
||||
if (e < s)
|
||||
return 0;
|
||||
|
||||
return ((1ULL << (e - s + 1)) - 1) << s;
|
||||
return ((2ULL << (e - s)) - 1) << s;
|
||||
}
|
||||
|
||||
void kvm_mmu_set_mmio_spte_mask(u64 mmio_mask, u64 mmio_value);
|
||||
|
@ -4209,8 +4209,7 @@ static int svm_get_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
|
||||
break;
|
||||
case MSR_IA32_SPEC_CTRL:
|
||||
if (!msr_info->host_initiated &&
|
||||
!guest_cpuid_has(vcpu, X86_FEATURE_AMD_IBRS) &&
|
||||
!guest_cpuid_has(vcpu, X86_FEATURE_AMD_SSBD))
|
||||
!guest_has_spec_ctrl_msr(vcpu))
|
||||
return 1;
|
||||
|
||||
msr_info->data = svm->spec_ctrl;
|
||||
@ -4312,8 +4311,7 @@ static int svm_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr)
|
||||
break;
|
||||
case MSR_IA32_SPEC_CTRL:
|
||||
if (!msr->host_initiated &&
|
||||
!guest_cpuid_has(vcpu, X86_FEATURE_AMD_IBRS) &&
|
||||
!guest_cpuid_has(vcpu, X86_FEATURE_AMD_SSBD))
|
||||
!guest_has_spec_ctrl_msr(vcpu))
|
||||
return 1;
|
||||
|
||||
/* The STIBP bit doesn't fault even if it's not advertised */
|
||||
@ -4340,12 +4338,11 @@ static int svm_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr)
|
||||
break;
|
||||
case MSR_IA32_PRED_CMD:
|
||||
if (!msr->host_initiated &&
|
||||
!guest_cpuid_has(vcpu, X86_FEATURE_AMD_IBPB))
|
||||
!guest_has_pred_cmd_msr(vcpu))
|
||||
return 1;
|
||||
|
||||
if (data & ~PRED_CMD_IBPB)
|
||||
return 1;
|
||||
|
||||
if (!data)
|
||||
break;
|
||||
|
||||
|
@ -4066,7 +4066,7 @@ static int vmx_get_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
|
||||
return kvm_get_msr_common(vcpu, msr_info);
|
||||
case MSR_IA32_SPEC_CTRL:
|
||||
if (!msr_info->host_initiated &&
|
||||
!guest_cpuid_has(vcpu, X86_FEATURE_SPEC_CTRL))
|
||||
!guest_has_spec_ctrl_msr(vcpu))
|
||||
return 1;
|
||||
|
||||
msr_info->data = to_vmx(vcpu)->spec_ctrl;
|
||||
@ -4180,7 +4180,7 @@ static int vmx_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
|
||||
break;
|
||||
case MSR_IA32_SPEC_CTRL:
|
||||
if (!msr_info->host_initiated &&
|
||||
!guest_cpuid_has(vcpu, X86_FEATURE_SPEC_CTRL))
|
||||
!guest_has_spec_ctrl_msr(vcpu))
|
||||
return 1;
|
||||
|
||||
/* The STIBP bit doesn't fault even if it's not advertised */
|
||||
@ -4210,7 +4210,7 @@ static int vmx_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
|
||||
break;
|
||||
case MSR_IA32_PRED_CMD:
|
||||
if (!msr_info->host_initiated &&
|
||||
!guest_cpuid_has(vcpu, X86_FEATURE_SPEC_CTRL))
|
||||
!guest_has_pred_cmd_msr(vcpu))
|
||||
return 1;
|
||||
|
||||
if (data & ~PRED_CMD_IBPB)
|
||||
|
@ -838,6 +838,8 @@ int pud_free_pmd_page(pud_t *pud, unsigned long addr)
|
||||
}
|
||||
|
||||
free_page((unsigned long)pmd_sv);
|
||||
|
||||
pgtable_pmd_page_dtor(virt_to_page(pmd));
|
||||
free_page((unsigned long)pmd);
|
||||
|
||||
return 1;
|
||||
|
@ -172,7 +172,7 @@ static enum efi_secureboot_mode xen_efi_get_secureboot(void)
|
||||
return efi_secureboot_mode_unknown;
|
||||
}
|
||||
|
||||
void __init xen_efi_init(void)
|
||||
void __init xen_efi_init(struct boot_params *boot_params)
|
||||
{
|
||||
efi_system_table_t *efi_systab_xen;
|
||||
|
||||
@ -181,12 +181,12 @@ void __init xen_efi_init(void)
|
||||
if (efi_systab_xen == NULL)
|
||||
return;
|
||||
|
||||
strncpy((char *)&boot_params.efi_info.efi_loader_signature, "Xen",
|
||||
sizeof(boot_params.efi_info.efi_loader_signature));
|
||||
boot_params.efi_info.efi_systab = (__u32)__pa(efi_systab_xen);
|
||||
boot_params.efi_info.efi_systab_hi = (__u32)(__pa(efi_systab_xen) >> 32);
|
||||
strncpy((char *)&boot_params->efi_info.efi_loader_signature, "Xen",
|
||||
sizeof(boot_params->efi_info.efi_loader_signature));
|
||||
boot_params->efi_info.efi_systab = (__u32)__pa(efi_systab_xen);
|
||||
boot_params->efi_info.efi_systab_hi = (__u32)(__pa(efi_systab_xen) >> 32);
|
||||
|
||||
boot_params.secure_boot = xen_efi_get_secureboot();
|
||||
boot_params->secure_boot = xen_efi_get_secureboot();
|
||||
|
||||
set_bit(EFI_BOOT, &efi.flags);
|
||||
set_bit(EFI_PARAVIRT, &efi.flags);
|
||||
|
@ -1409,7 +1409,7 @@ asmlinkage __visible void __init xen_start_kernel(void)
|
||||
/* We need this for printk timestamps */
|
||||
xen_setup_runstate_info(0);
|
||||
|
||||
xen_efi_init();
|
||||
xen_efi_init(&boot_params);
|
||||
|
||||
/* Start the world */
|
||||
#ifdef CONFIG_X86_32
|
||||
|
@ -14,6 +14,8 @@
|
||||
#include <xen/interface/memory.h>
|
||||
#include <xen/interface/hvm/start_info.h>
|
||||
|
||||
#include "xen-ops.h"
|
||||
|
||||
/*
|
||||
* PVH variables.
|
||||
*
|
||||
@ -79,6 +81,8 @@ static void __init init_pvh_bootparams(void)
|
||||
pvh_bootparams.hdr.type_of_loader = (9 << 4) | 0; /* Xen loader */
|
||||
|
||||
x86_init.acpi.get_root_pointer = pvh_get_root_pointer;
|
||||
|
||||
xen_efi_init(&pvh_bootparams);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -122,9 +122,9 @@ static inline void __init xen_init_vga(const struct dom0_vga_console_info *info,
|
||||
void __init xen_init_apic(void);
|
||||
|
||||
#ifdef CONFIG_XEN_EFI
|
||||
extern void xen_efi_init(void);
|
||||
extern void xen_efi_init(struct boot_params *boot_params);
|
||||
#else
|
||||
static inline void __init xen_efi_init(void)
|
||||
static inline void __init xen_efi_init(struct boot_params *boot_params)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
@ -5276,13 +5276,13 @@ static unsigned int bfq_update_depths(struct bfq_data *bfqd,
|
||||
* limit 'something'.
|
||||
*/
|
||||
/* no more than 50% of tags for async I/O */
|
||||
bfqd->word_depths[0][0] = max((1U << bt->sb.shift) >> 1, 1U);
|
||||
bfqd->word_depths[0][0] = max(bt->sb.depth >> 1, 1U);
|
||||
/*
|
||||
* no more than 75% of tags for sync writes (25% extra tags
|
||||
* w.r.t. async I/O, to prevent async I/O from starving sync
|
||||
* writes)
|
||||
*/
|
||||
bfqd->word_depths[0][1] = max(((1U << bt->sb.shift) * 3) >> 2, 1U);
|
||||
bfqd->word_depths[0][1] = max((bt->sb.depth * 3) >> 2, 1U);
|
||||
|
||||
/*
|
||||
* In-word depths in case some bfq_queue is being weight-
|
||||
@ -5292,9 +5292,9 @@ static unsigned int bfq_update_depths(struct bfq_data *bfqd,
|
||||
* shortage.
|
||||
*/
|
||||
/* no more than ~18% of tags for async I/O */
|
||||
bfqd->word_depths[1][0] = max(((1U << bt->sb.shift) * 3) >> 4, 1U);
|
||||
bfqd->word_depths[1][0] = max((bt->sb.depth * 3) >> 4, 1U);
|
||||
/* no more than ~37% of tags for sync writes (~20% extra tags) */
|
||||
bfqd->word_depths[1][1] = max(((1U << bt->sb.shift) * 6) >> 4, 1U);
|
||||
bfqd->word_depths[1][1] = max((bt->sb.depth * 6) >> 4, 1U);
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
for (j = 0; j < 2; j++)
|
||||
|
@ -208,14 +208,17 @@ struct hd_struct *disk_part_iter_next(struct disk_part_iter *piter)
|
||||
part = rcu_dereference(ptbl->part[piter->idx]);
|
||||
if (!part)
|
||||
continue;
|
||||
get_device(part_to_dev(part));
|
||||
piter->part = part;
|
||||
if (!part_nr_sects_read(part) &&
|
||||
!(piter->flags & DISK_PITER_INCL_EMPTY) &&
|
||||
!(piter->flags & DISK_PITER_INCL_EMPTY_PART0 &&
|
||||
piter->idx == 0))
|
||||
piter->idx == 0)) {
|
||||
put_device(part_to_dev(part));
|
||||
piter->part = NULL;
|
||||
continue;
|
||||
}
|
||||
|
||||
get_device(part_to_dev(part));
|
||||
piter->part = part;
|
||||
piter->idx += inc;
|
||||
break;
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
ARCH=arm64
|
||||
|
||||
LLVM_IAS=1
|
||||
CROSS_COMPILE=aarch64-linux-gnu-
|
||||
CROSS_COMPILE_COMPAT=arm-linux-gnueabi-
|
||||
LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN=prebuilts/gas/linux-x86
|
||||
|
@ -3,7 +3,7 @@ KMI_GENERATION=0
|
||||
|
||||
LLVM=1
|
||||
DEPMOD=depmod
|
||||
CLANG_PREBUILT_BIN=prebuilts-master/clang/host/linux-x86/clang-r399163b/bin
|
||||
CLANG_PREBUILT_BIN=prebuilts-master/clang/host/linux-x86/clang-r407598/bin
|
||||
BUILDTOOLS_PREBUILT_BIN=build/build-tools/path/linux-x86
|
||||
|
||||
EXTRA_CMDS=''
|
||||
|
@ -43,7 +43,8 @@ static int ecdh_set_secret(struct crypto_kpp *tfm, const void *buf,
|
||||
struct ecdh params;
|
||||
unsigned int ndigits;
|
||||
|
||||
if (crypto_ecdh_decode_key(buf, len, ¶ms) < 0)
|
||||
if (crypto_ecdh_decode_key(buf, len, ¶ms) < 0 ||
|
||||
params.key_size > sizeof(ctx->private_key))
|
||||
return -EINVAL;
|
||||
|
||||
ndigits = ecdh_supported_curve(params.curve_id);
|
||||
|
@ -98,7 +98,7 @@ void acpi_scan_table_handler(u32 event, void *table, void *context);
|
||||
extern struct list_head acpi_bus_id_list;
|
||||
|
||||
struct acpi_device_bus_id {
|
||||
char bus_id[15];
|
||||
const char *bus_id;
|
||||
unsigned int instance_no;
|
||||
struct list_head node;
|
||||
};
|
||||
|
@ -486,6 +486,7 @@ static void acpi_device_del(struct acpi_device *device)
|
||||
acpi_device_bus_id->instance_no--;
|
||||
else {
|
||||
list_del(&acpi_device_bus_id->node);
|
||||
kfree_const(acpi_device_bus_id->bus_id);
|
||||
kfree(acpi_device_bus_id);
|
||||
}
|
||||
break;
|
||||
@ -585,6 +586,8 @@ static int acpi_get_device_data(acpi_handle handle, struct acpi_device **device,
|
||||
if (!device)
|
||||
return -EINVAL;
|
||||
|
||||
*device = NULL;
|
||||
|
||||
status = acpi_get_data_full(handle, acpi_scan_drop_device,
|
||||
(void **)device, callback);
|
||||
if (ACPI_FAILURE(status) || !*device) {
|
||||
@ -674,7 +677,14 @@ int acpi_device_add(struct acpi_device *device,
|
||||
}
|
||||
if (!found) {
|
||||
acpi_device_bus_id = new_bus_id;
|
||||
strcpy(acpi_device_bus_id->bus_id, acpi_device_hid(device));
|
||||
acpi_device_bus_id->bus_id =
|
||||
kstrdup_const(acpi_device_hid(device), GFP_KERNEL);
|
||||
if (!acpi_device_bus_id->bus_id) {
|
||||
pr_err(PREFIX "Memory allocation error for bus id\n");
|
||||
result = -ENOMEM;
|
||||
goto err_free_new_bus_id;
|
||||
}
|
||||
|
||||
acpi_device_bus_id->instance_no = 0;
|
||||
list_add_tail(&acpi_device_bus_id->node, &acpi_bus_id_list);
|
||||
}
|
||||
@ -709,6 +719,11 @@ int acpi_device_add(struct acpi_device *device,
|
||||
if (device->parent)
|
||||
list_del(&device->node);
|
||||
list_del(&device->wakeup_list);
|
||||
|
||||
err_free_new_bus_id:
|
||||
if (!found)
|
||||
kfree(new_bus_id);
|
||||
|
||||
mutex_unlock(&acpi_device_lock);
|
||||
|
||||
err_detach:
|
||||
|
@ -3607,7 +3607,7 @@ static int idt77252_init_one(struct pci_dev *pcidev,
|
||||
|
||||
if ((err = dma_set_mask_and_coherent(&pcidev->dev, DMA_BIT_MASK(32)))) {
|
||||
printk("idt77252: can't enable DMA for PCI device at %s\n", pci_name(pcidev));
|
||||
return err;
|
||||
goto err_out_disable_pdev;
|
||||
}
|
||||
|
||||
card = kzalloc(sizeof(struct idt77252_dev), GFP_KERNEL);
|
||||
|
@ -100,6 +100,16 @@ void device_links_read_unlock(int not_used)
|
||||
}
|
||||
#endif /* !CONFIG_SRCU */
|
||||
|
||||
static bool device_is_ancestor(struct device *dev, struct device *target)
|
||||
{
|
||||
while (target->parent) {
|
||||
target = target->parent;
|
||||
if (dev == target)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* device_is_dependent - Check if one device depends on another one
|
||||
* @dev: Device to check dependencies for.
|
||||
@ -113,7 +123,12 @@ static int device_is_dependent(struct device *dev, void *target)
|
||||
struct device_link *link;
|
||||
int ret;
|
||||
|
||||
if (dev == target)
|
||||
/*
|
||||
* The "ancestors" check is needed to catch the case when the target
|
||||
* device has not been completely initialized yet and it is still
|
||||
* missing from the list of children of its parent device.
|
||||
*/
|
||||
if (dev == target || device_is_ancestor(dev, target))
|
||||
return 1;
|
||||
|
||||
ret = device_for_each_child(dev, target, device_is_dependent);
|
||||
@ -3818,7 +3833,7 @@ void set_primary_fwnode(struct device *dev, struct fwnode_handle *fwnode)
|
||||
if (fwnode_is_primary(fn)) {
|
||||
dev->fwnode = fn->secondary;
|
||||
if (!(parent && fn == parent->fwnode))
|
||||
fn->secondary = ERR_PTR(-ENODEV);
|
||||
fn->secondary = NULL;
|
||||
} else {
|
||||
dev->fwnode = NULL;
|
||||
}
|
||||
|
@ -642,8 +642,12 @@ void regmap_debugfs_init(struct regmap *map, const char *name)
|
||||
devname = dev_name(map->dev);
|
||||
|
||||
if (name) {
|
||||
map->debugfs_name = kasprintf(GFP_KERNEL, "%s-%s",
|
||||
if (!map->debugfs_name) {
|
||||
map->debugfs_name = kasprintf(GFP_KERNEL, "%s-%s",
|
||||
devname, name);
|
||||
if (!map->debugfs_name)
|
||||
return;
|
||||
}
|
||||
name = map->debugfs_name;
|
||||
} else {
|
||||
name = devname;
|
||||
@ -651,9 +655,10 @@ void regmap_debugfs_init(struct regmap *map, const char *name)
|
||||
|
||||
if (!strcmp(name, "dummy")) {
|
||||
kfree(map->debugfs_name);
|
||||
|
||||
map->debugfs_name = kasprintf(GFP_KERNEL, "dummy%d",
|
||||
dummy_index);
|
||||
if (!map->debugfs_name)
|
||||
return;
|
||||
name = map->debugfs_name;
|
||||
dummy_index++;
|
||||
}
|
||||
|
@ -474,6 +474,7 @@ config BLK_DEV_RBD
|
||||
config BLK_DEV_RSXX
|
||||
tristate "IBM Flash Adapter 900GB Full Height PCIe Device Driver"
|
||||
depends on PCI
|
||||
select CRC32
|
||||
help
|
||||
Device driver for IBM's high speed PCIe SSD
|
||||
storage device: Flash Adapter 900GB Full Height.
|
||||
|
@ -1,9 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/sizes.h>
|
||||
#include "null_blk.h"
|
||||
|
||||
/* zone_size in MBs to sectors. */
|
||||
#define ZONE_SIZE_SHIFT 11
|
||||
#define MB_TO_SECTS(mb) (((sector_t)mb * SZ_1M) >> SECTOR_SHIFT)
|
||||
|
||||
static inline unsigned int null_zone_no(struct nullb_device *dev, sector_t sect)
|
||||
{
|
||||
@ -12,7 +12,7 @@ static inline unsigned int null_zone_no(struct nullb_device *dev, sector_t sect)
|
||||
|
||||
int null_zone_init(struct nullb_device *dev)
|
||||
{
|
||||
sector_t dev_size = (sector_t)dev->size * 1024 * 1024;
|
||||
sector_t dev_capacity_sects;
|
||||
sector_t sector = 0;
|
||||
unsigned int i;
|
||||
|
||||
@ -25,9 +25,12 @@ int null_zone_init(struct nullb_device *dev)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
dev->zone_size_sects = dev->zone_size << ZONE_SIZE_SHIFT;
|
||||
dev->nr_zones = dev_size >>
|
||||
(SECTOR_SHIFT + ilog2(dev->zone_size_sects));
|
||||
dev_capacity_sects = MB_TO_SECTS(dev->size);
|
||||
dev->zone_size_sects = MB_TO_SECTS(dev->zone_size);
|
||||
dev->nr_zones = dev_capacity_sects >> ilog2(dev->zone_size_sects);
|
||||
if (dev_capacity_sects & (dev->zone_size_sects - 1))
|
||||
dev->nr_zones++;
|
||||
|
||||
dev->zones = kvmalloc_array(dev->nr_zones, sizeof(struct blk_zone),
|
||||
GFP_KERNEL | __GFP_ZERO);
|
||||
if (!dev->zones)
|
||||
@ -37,7 +40,10 @@ int null_zone_init(struct nullb_device *dev)
|
||||
struct blk_zone *zone = &dev->zones[i];
|
||||
|
||||
zone->start = zone->wp = sector;
|
||||
zone->len = dev->zone_size_sects;
|
||||
if (zone->start + dev->zone_size_sects > dev_capacity_sects)
|
||||
zone->len = dev_capacity_sects - zone->start;
|
||||
else
|
||||
zone->len = dev->zone_size_sects;
|
||||
zone->type = BLK_ZONE_TYPE_SEQWRITE_REQ;
|
||||
zone->cond = BLK_ZONE_COND_EMPTY;
|
||||
|
||||
|
@ -1274,6 +1274,8 @@ static struct tegra_clk_init_table init_table[] __initdata = {
|
||||
{ TEGRA30_CLK_I2S3_SYNC, TEGRA30_CLK_CLK_MAX, 24000000, 0 },
|
||||
{ TEGRA30_CLK_I2S4_SYNC, TEGRA30_CLK_CLK_MAX, 24000000, 0 },
|
||||
{ TEGRA30_CLK_VIMCLK_SYNC, TEGRA30_CLK_CLK_MAX, 24000000, 0 },
|
||||
{ TEGRA30_CLK_HDA, TEGRA30_CLK_PLL_P, 102000000, 0 },
|
||||
{ TEGRA30_CLK_HDA2CODEC_2X, TEGRA30_CLK_PLL_P, 48000000, 0 },
|
||||
/* must be the last entry */
|
||||
{ TEGRA30_CLK_CLK_MAX, TEGRA30_CLK_CLK_MAX, 0, 0 },
|
||||
};
|
||||
|
@ -881,9 +881,9 @@ static int get_transition_latency(struct powernow_k8_data *data)
|
||||
|
||||
/* Take a frequency, and issue the fid/vid transition command */
|
||||
static int transition_frequency_fidvid(struct powernow_k8_data *data,
|
||||
unsigned int index)
|
||||
unsigned int index,
|
||||
struct cpufreq_policy *policy)
|
||||
{
|
||||
struct cpufreq_policy *policy;
|
||||
u32 fid = 0;
|
||||
u32 vid = 0;
|
||||
int res;
|
||||
@ -915,9 +915,6 @@ static int transition_frequency_fidvid(struct powernow_k8_data *data,
|
||||
freqs.old = find_khz_freq_from_fid(data->currfid);
|
||||
freqs.new = find_khz_freq_from_fid(fid);
|
||||
|
||||
policy = cpufreq_cpu_get(smp_processor_id());
|
||||
cpufreq_cpu_put(policy);
|
||||
|
||||
cpufreq_freq_transition_begin(policy, &freqs);
|
||||
res = transition_fid_vid(data, fid, vid);
|
||||
cpufreq_freq_transition_end(policy, &freqs, res);
|
||||
@ -972,7 +969,7 @@ static long powernowk8_target_fn(void *arg)
|
||||
|
||||
powernow_k8_acpi_pst_values(data, newstate);
|
||||
|
||||
ret = transition_frequency_fidvid(data, newstate);
|
||||
ret = transition_frequency_fidvid(data, newstate, pol);
|
||||
|
||||
if (ret) {
|
||||
pr_err("transition frequency failed\n");
|
||||
|
@ -581,7 +581,7 @@ static void chtls_reset_synq(struct listen_ctx *listen_ctx)
|
||||
|
||||
while (!skb_queue_empty(&listen_ctx->synq)) {
|
||||
struct chtls_sock *csk =
|
||||
container_of((struct synq *)__skb_dequeue
|
||||
container_of((struct synq *)skb_peek
|
||||
(&listen_ctx->synq), struct chtls_sock, synq);
|
||||
struct sock *child = csk->sk;
|
||||
|
||||
@ -1024,6 +1024,7 @@ static struct sock *chtls_recv_sock(struct sock *lsk,
|
||||
const struct cpl_pass_accept_req *req,
|
||||
struct chtls_dev *cdev)
|
||||
{
|
||||
struct adapter *adap = pci_get_drvdata(cdev->pdev);
|
||||
const struct tcphdr *tcph;
|
||||
struct inet_sock *newinet;
|
||||
const struct iphdr *iph;
|
||||
@ -1033,9 +1034,10 @@ static struct sock *chtls_recv_sock(struct sock *lsk,
|
||||
struct neighbour *n;
|
||||
struct tcp_sock *tp;
|
||||
struct sock *newsk;
|
||||
bool found = false;
|
||||
u16 port_id;
|
||||
int rxq_idx;
|
||||
int step;
|
||||
int step, i;
|
||||
|
||||
iph = (const struct iphdr *)network_hdr;
|
||||
newsk = tcp_create_openreq_child(lsk, oreq, cdev->askb);
|
||||
@ -1048,7 +1050,7 @@ static struct sock *chtls_recv_sock(struct sock *lsk,
|
||||
|
||||
tcph = (struct tcphdr *)(iph + 1);
|
||||
n = dst_neigh_lookup(dst, &iph->saddr);
|
||||
if (!n)
|
||||
if (!n || !n->dev)
|
||||
goto free_sk;
|
||||
|
||||
ndev = n->dev;
|
||||
@ -1057,6 +1059,13 @@ static struct sock *chtls_recv_sock(struct sock *lsk,
|
||||
if (is_vlan_dev(ndev))
|
||||
ndev = vlan_dev_real_dev(ndev);
|
||||
|
||||
for_each_port(adap, i)
|
||||
if (cdev->ports[i] == ndev)
|
||||
found = true;
|
||||
|
||||
if (!found)
|
||||
goto free_dst;
|
||||
|
||||
port_id = cxgb4_port_idx(ndev);
|
||||
|
||||
csk = chtls_sock_create(cdev);
|
||||
@ -1108,6 +1117,7 @@ static struct sock *chtls_recv_sock(struct sock *lsk,
|
||||
free_csk:
|
||||
chtls_sock_release(&csk->kref);
|
||||
free_dst:
|
||||
neigh_release(n);
|
||||
dst_release(dst);
|
||||
free_sk:
|
||||
inet_csk_prepare_forced_close(newsk);
|
||||
@ -1422,6 +1432,11 @@ static int chtls_pass_establish(struct chtls_dev *cdev, struct sk_buff *skb)
|
||||
sk_wake_async(sk, 0, POLL_OUT);
|
||||
|
||||
data = lookup_stid(cdev->tids, stid);
|
||||
if (!data) {
|
||||
/* listening server close */
|
||||
kfree_skb(skb);
|
||||
goto unlock;
|
||||
}
|
||||
lsk = ((struct listen_ctx *)data)->lsk;
|
||||
|
||||
bh_lock_sock(lsk);
|
||||
@ -1807,39 +1822,6 @@ static void send_defer_abort_rpl(struct chtls_dev *cdev, struct sk_buff *skb)
|
||||
kfree_skb(skb);
|
||||
}
|
||||
|
||||
static void send_abort_rpl(struct sock *sk, struct sk_buff *skb,
|
||||
struct chtls_dev *cdev, int status, int queue)
|
||||
{
|
||||
struct cpl_abort_req_rss *req = cplhdr(skb);
|
||||
struct sk_buff *reply_skb;
|
||||
struct chtls_sock *csk;
|
||||
|
||||
csk = rcu_dereference_sk_user_data(sk);
|
||||
|
||||
reply_skb = alloc_skb(sizeof(struct cpl_abort_rpl),
|
||||
GFP_KERNEL);
|
||||
|
||||
if (!reply_skb) {
|
||||
req->status = (queue << 1);
|
||||
send_defer_abort_rpl(cdev, skb);
|
||||
return;
|
||||
}
|
||||
|
||||
set_abort_rpl_wr(reply_skb, GET_TID(req), status);
|
||||
kfree_skb(skb);
|
||||
|
||||
set_wr_txq(reply_skb, CPL_PRIORITY_DATA, queue);
|
||||
if (csk_conn_inline(csk)) {
|
||||
struct l2t_entry *e = csk->l2t_entry;
|
||||
|
||||
if (e && sk->sk_state != TCP_SYN_RECV) {
|
||||
cxgb4_l2t_send(csk->egress_dev, reply_skb, e);
|
||||
return;
|
||||
}
|
||||
}
|
||||
cxgb4_ofld_send(cdev->lldi->ports[0], reply_skb);
|
||||
}
|
||||
|
||||
/*
|
||||
* Add an skb to the deferred skb queue for processing from process context.
|
||||
*/
|
||||
@ -1902,9 +1884,9 @@ static void bl_abort_syn_rcv(struct sock *lsk, struct sk_buff *skb)
|
||||
queue = csk->txq_idx;
|
||||
|
||||
skb->sk = NULL;
|
||||
chtls_send_abort_rpl(child, skb, BLOG_SKB_CB(skb)->cdev,
|
||||
CPL_ABORT_NO_RST, queue);
|
||||
do_abort_syn_rcv(child, lsk);
|
||||
send_abort_rpl(child, skb, BLOG_SKB_CB(skb)->cdev,
|
||||
CPL_ABORT_NO_RST, queue);
|
||||
}
|
||||
|
||||
static int abort_syn_rcv(struct sock *sk, struct sk_buff *skb)
|
||||
@ -1934,8 +1916,8 @@ static int abort_syn_rcv(struct sock *sk, struct sk_buff *skb)
|
||||
if (!sock_owned_by_user(psk)) {
|
||||
int queue = csk->txq_idx;
|
||||
|
||||
chtls_send_abort_rpl(sk, skb, cdev, CPL_ABORT_NO_RST, queue);
|
||||
do_abort_syn_rcv(sk, psk);
|
||||
send_abort_rpl(sk, skb, cdev, CPL_ABORT_NO_RST, queue);
|
||||
} else {
|
||||
skb->sk = sk;
|
||||
BLOG_SKB_CB(skb)->backlog_rcv = bl_abort_syn_rcv;
|
||||
@ -1953,9 +1935,6 @@ static void chtls_abort_req_rss(struct sock *sk, struct sk_buff *skb)
|
||||
int queue = csk->txq_idx;
|
||||
|
||||
if (is_neg_adv(req->status)) {
|
||||
if (sk->sk_state == TCP_SYN_RECV)
|
||||
chtls_set_tcb_tflag(sk, 0, 0);
|
||||
|
||||
kfree_skb(skb);
|
||||
return;
|
||||
}
|
||||
@ -1981,12 +1960,11 @@ static void chtls_abort_req_rss(struct sock *sk, struct sk_buff *skb)
|
||||
|
||||
if (sk->sk_state == TCP_SYN_RECV && !abort_syn_rcv(sk, skb))
|
||||
return;
|
||||
|
||||
chtls_release_resources(sk);
|
||||
chtls_conn_done(sk);
|
||||
}
|
||||
|
||||
chtls_send_abort_rpl(sk, skb, csk->cdev, rst_status, queue);
|
||||
chtls_release_resources(sk);
|
||||
chtls_conn_done(sk);
|
||||
}
|
||||
|
||||
static void chtls_abort_rpl_rss(struct sock *sk, struct sk_buff *skb)
|
||||
|
@ -1683,9 +1683,11 @@ static struct dma_chan *at_dma_xlate(struct of_phandle_args *dma_spec,
|
||||
dma_cap_zero(mask);
|
||||
dma_cap_set(DMA_SLAVE, mask);
|
||||
|
||||
atslave = kzalloc(sizeof(*atslave), GFP_KERNEL);
|
||||
if (!atslave)
|
||||
atslave = kmalloc(sizeof(*atslave), GFP_KERNEL);
|
||||
if (!atslave) {
|
||||
put_device(&dmac_pdev->dev);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
atslave->cfg = ATC_DST_H2SEL_HW | ATC_SRC_H2SEL_HW;
|
||||
/*
|
||||
@ -1714,8 +1716,11 @@ static struct dma_chan *at_dma_xlate(struct of_phandle_args *dma_spec,
|
||||
atslave->dma_dev = &dmac_pdev->dev;
|
||||
|
||||
chan = dma_request_channel(mask, at_dma_filter, atslave);
|
||||
if (!chan)
|
||||
if (!chan) {
|
||||
put_device(&dmac_pdev->dev);
|
||||
kfree(atslave);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
atchan = to_at_dma_chan(chan);
|
||||
atchan->per_if = dma_spec->args[0] & 0xff;
|
||||
|
@ -1007,6 +1007,7 @@ static int mtk_hsdma_probe(struct platform_device *pdev)
|
||||
return 0;
|
||||
|
||||
err_free:
|
||||
mtk_hsdma_hw_deinit(hsdma);
|
||||
of_dma_controller_free(pdev->dev.of_node);
|
||||
err_unregister:
|
||||
dma_async_device_unregister(dd);
|
||||
|
@ -2426,7 +2426,7 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_device *xdev,
|
||||
has_dre = false;
|
||||
|
||||
if (!has_dre)
|
||||
xdev->common.copy_align = fls(width - 1);
|
||||
xdev->common.copy_align = (enum dmaengine_alignment)fls(width - 1);
|
||||
|
||||
if (of_device_is_compatible(node, "xlnx,axi-vdma-mm2s-channel") ||
|
||||
of_device_is_compatible(node, "xlnx,axi-dma-mm2s-channel") ||
|
||||
@ -2529,7 +2529,8 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_device *xdev,
|
||||
static int xilinx_dma_child_probe(struct xilinx_dma_device *xdev,
|
||||
struct device_node *node)
|
||||
{
|
||||
int ret, i, nr_channels = 1;
|
||||
int ret, i;
|
||||
u32 nr_channels = 1;
|
||||
|
||||
ret = of_property_read_u32(node, "dma-channels", &nr_channels);
|
||||
if ((ret < 0) && xdev->mcdma)
|
||||
@ -2713,7 +2714,11 @@ static int xilinx_dma_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
/* Register the DMA engine with the core */
|
||||
dma_async_device_register(&xdev->common);
|
||||
err = dma_async_device_register(&xdev->common);
|
||||
if (err) {
|
||||
dev_err(xdev->dev, "failed to register the dma device\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
err = of_dma_controller_register(node, of_dma_xilinx_xlate,
|
||||
xdev);
|
||||
|
@ -650,9 +650,8 @@ static void mvebu_pwm_get_state(struct pwm_chip *chip,
|
||||
|
||||
spin_lock_irqsave(&mvpwm->lock, flags);
|
||||
|
||||
val = (unsigned long long)
|
||||
readl_relaxed(mvebu_pwmreg_blink_on_duration(mvpwm));
|
||||
val *= NSEC_PER_SEC;
|
||||
u = readl_relaxed(mvebu_pwmreg_blink_on_duration(mvpwm));
|
||||
val = (unsigned long long) u * NSEC_PER_SEC;
|
||||
do_div(val, mvpwm->clk_rate);
|
||||
if (val > UINT_MAX)
|
||||
state->duty_cycle = UINT_MAX;
|
||||
@ -661,21 +660,17 @@ static void mvebu_pwm_get_state(struct pwm_chip *chip,
|
||||
else
|
||||
state->duty_cycle = 1;
|
||||
|
||||
val = (unsigned long long)
|
||||
readl_relaxed(mvebu_pwmreg_blink_off_duration(mvpwm));
|
||||
val = (unsigned long long) u; /* on duration */
|
||||
/* period = on + off duration */
|
||||
val += readl_relaxed(mvebu_pwmreg_blink_off_duration(mvpwm));
|
||||
val *= NSEC_PER_SEC;
|
||||
do_div(val, mvpwm->clk_rate);
|
||||
if (val < state->duty_cycle) {
|
||||
if (val > UINT_MAX)
|
||||
state->period = UINT_MAX;
|
||||
else if (val)
|
||||
state->period = val;
|
||||
else
|
||||
state->period = 1;
|
||||
} else {
|
||||
val -= state->duty_cycle;
|
||||
if (val > UINT_MAX)
|
||||
state->period = UINT_MAX;
|
||||
else if (val)
|
||||
state->period = val;
|
||||
else
|
||||
state->period = 1;
|
||||
}
|
||||
|
||||
regmap_read(mvchip->regs, GPIO_BLINK_EN_OFF + mvchip->offset, &u);
|
||||
if (u)
|
||||
|
@ -2920,7 +2920,7 @@ int drm_atomic_helper_set_config(struct drm_mode_set *set,
|
||||
|
||||
ret = handle_conflicting_encoders(state, true);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto fail;
|
||||
|
||||
ret = drm_atomic_commit(state);
|
||||
|
||||
|
@ -380,7 +380,7 @@ eb_vma_misplaced(const struct drm_i915_gem_exec_object2 *entry,
|
||||
return true;
|
||||
|
||||
if (!(flags & EXEC_OBJECT_SUPPORTS_48B_ADDRESS) &&
|
||||
(vma->node.start + vma->node.size - 1) >> 32)
|
||||
(vma->node.start + vma->node.size + 4095) >> 32)
|
||||
return true;
|
||||
|
||||
if (flags & __EXEC_OBJECT_NEEDS_MAP &&
|
||||
|
@ -485,15 +485,15 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv)
|
||||
|
||||
drm_mode_config_init(ddev);
|
||||
|
||||
ret = msm_init_vram(ddev);
|
||||
if (ret)
|
||||
goto err_destroy_mdss;
|
||||
|
||||
/* Bind all our sub-components: */
|
||||
ret = component_bind_all(dev, ddev);
|
||||
if (ret)
|
||||
goto err_destroy_mdss;
|
||||
|
||||
ret = msm_init_vram(ddev);
|
||||
if (ret)
|
||||
goto err_msm_uninit;
|
||||
|
||||
if (!dev->dma_parms) {
|
||||
dev->dma_parms = devm_kzalloc(dev, sizeof(*dev->dma_parms),
|
||||
GFP_KERNEL);
|
||||
|
@ -131,7 +131,7 @@ nv50_dmac_destroy(struct nv50_dmac *dmac)
|
||||
|
||||
int
|
||||
nv50_dmac_create(struct nvif_device *device, struct nvif_object *disp,
|
||||
const s32 *oclass, u8 head, void *data, u32 size, u64 syncbuf,
|
||||
const s32 *oclass, u8 head, void *data, u32 size, s64 syncbuf,
|
||||
struct nv50_dmac *dmac)
|
||||
{
|
||||
struct nouveau_cli *cli = (void *)device->object.client;
|
||||
@ -166,7 +166,7 @@ nv50_dmac_create(struct nvif_device *device, struct nvif_object *disp,
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (!syncbuf)
|
||||
if (syncbuf < 0)
|
||||
return 0;
|
||||
|
||||
ret = nvif_object_init(&dmac->base.user, 0xf0000000, NV_DMA_IN_MEMORY,
|
||||
|
@ -68,7 +68,7 @@ struct nv50_dmac {
|
||||
|
||||
int nv50_dmac_create(struct nvif_device *device, struct nvif_object *disp,
|
||||
const s32 *oclass, u8 head, void *data, u32 size,
|
||||
u64 syncbuf, struct nv50_dmac *dmac);
|
||||
s64 syncbuf, struct nv50_dmac *dmac);
|
||||
void nv50_dmac_destroy(struct nv50_dmac *);
|
||||
|
||||
u32 *evo_wait(struct nv50_dmac *, int nr);
|
||||
|
@ -68,7 +68,7 @@ wimmc37b_init_(const struct nv50_wimm_func *func, struct nouveau_drm *drm,
|
||||
int ret;
|
||||
|
||||
ret = nv50_dmac_create(&drm->client.device, &disp->disp->object,
|
||||
&oclass, 0, &args, sizeof(args), 0,
|
||||
&oclass, 0, &args, sizeof(args), -1,
|
||||
&wndw->wimm);
|
||||
if (ret) {
|
||||
NV_ERROR(drm, "wimm%04x allocation failed: %d\n", oclass, ret);
|
||||
|
@ -75,7 +75,7 @@ shadow_image(struct nvkm_bios *bios, int idx, u32 offset, struct shadow *mthd)
|
||||
nvkm_debug(subdev, "%08x: type %02x, %d bytes\n",
|
||||
image.base, image.type, image.size);
|
||||
|
||||
if (!shadow_fetch(bios, mthd, image.size)) {
|
||||
if (!shadow_fetch(bios, mthd, image.base + image.size)) {
|
||||
nvkm_debug(subdev, "%08x: fetch failed\n", image.base);
|
||||
return 0;
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ static void
|
||||
gm200_i2c_aux_fini(struct gm200_i2c_aux *aux)
|
||||
{
|
||||
struct nvkm_device *device = aux->base.pad->i2c->subdev.device;
|
||||
nvkm_mask(device, 0x00d954 + (aux->ch * 0x50), 0x00310000, 0x00000000);
|
||||
nvkm_mask(device, 0x00d954 + (aux->ch * 0x50), 0x00710000, 0x00000000);
|
||||
}
|
||||
|
||||
static int
|
||||
@ -54,10 +54,10 @@ gm200_i2c_aux_init(struct gm200_i2c_aux *aux)
|
||||
AUX_ERR(&aux->base, "begin idle timeout %08x", ctrl);
|
||||
return -EBUSY;
|
||||
}
|
||||
} while (ctrl & 0x03010000);
|
||||
} while (ctrl & 0x07010000);
|
||||
|
||||
/* set some magic, and wait up to 1ms for it to appear */
|
||||
nvkm_mask(device, 0x00d954 + (aux->ch * 0x50), 0x00300000, ureq);
|
||||
nvkm_mask(device, 0x00d954 + (aux->ch * 0x50), 0x00700000, ureq);
|
||||
timeout = 1000;
|
||||
do {
|
||||
ctrl = nvkm_rd32(device, 0x00d954 + (aux->ch * 0x50));
|
||||
@ -67,7 +67,7 @@ gm200_i2c_aux_init(struct gm200_i2c_aux *aux)
|
||||
gm200_i2c_aux_fini(aux);
|
||||
return -EBUSY;
|
||||
}
|
||||
} while ((ctrl & 0x03000000) != urep);
|
||||
} while ((ctrl & 0x07000000) != urep);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -22,6 +22,7 @@
|
||||
* Authors: Ben Skeggs
|
||||
*/
|
||||
#include "priv.h"
|
||||
#include <subdev/timer.h>
|
||||
|
||||
static void
|
||||
gf100_ibus_intr_hub(struct nvkm_subdev *ibus, int i)
|
||||
@ -31,7 +32,6 @@ gf100_ibus_intr_hub(struct nvkm_subdev *ibus, int i)
|
||||
u32 data = nvkm_rd32(device, 0x122124 + (i * 0x0400));
|
||||
u32 stat = nvkm_rd32(device, 0x122128 + (i * 0x0400));
|
||||
nvkm_debug(ibus, "HUB%d: %06x %08x (%08x)\n", i, addr, data, stat);
|
||||
nvkm_mask(device, 0x122128 + (i * 0x0400), 0x00000200, 0x00000000);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -42,7 +42,6 @@ gf100_ibus_intr_rop(struct nvkm_subdev *ibus, int i)
|
||||
u32 data = nvkm_rd32(device, 0x124124 + (i * 0x0400));
|
||||
u32 stat = nvkm_rd32(device, 0x124128 + (i * 0x0400));
|
||||
nvkm_debug(ibus, "ROP%d: %06x %08x (%08x)\n", i, addr, data, stat);
|
||||
nvkm_mask(device, 0x124128 + (i * 0x0400), 0x00000200, 0x00000000);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -53,7 +52,6 @@ gf100_ibus_intr_gpc(struct nvkm_subdev *ibus, int i)
|
||||
u32 data = nvkm_rd32(device, 0x128124 + (i * 0x0400));
|
||||
u32 stat = nvkm_rd32(device, 0x128128 + (i * 0x0400));
|
||||
nvkm_debug(ibus, "GPC%d: %06x %08x (%08x)\n", i, addr, data, stat);
|
||||
nvkm_mask(device, 0x128128 + (i * 0x0400), 0x00000200, 0x00000000);
|
||||
}
|
||||
|
||||
void
|
||||
@ -90,6 +88,12 @@ gf100_ibus_intr(struct nvkm_subdev *ibus)
|
||||
intr1 &= ~stat;
|
||||
}
|
||||
}
|
||||
|
||||
nvkm_mask(device, 0x121c4c, 0x0000003f, 0x00000002);
|
||||
nvkm_msec(device, 2000,
|
||||
if (!(nvkm_rd32(device, 0x121c4c) & 0x0000003f))
|
||||
break;
|
||||
);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -22,6 +22,7 @@
|
||||
* Authors: Ben Skeggs
|
||||
*/
|
||||
#include "priv.h"
|
||||
#include <subdev/timer.h>
|
||||
|
||||
static void
|
||||
gk104_ibus_intr_hub(struct nvkm_subdev *ibus, int i)
|
||||
@ -31,7 +32,6 @@ gk104_ibus_intr_hub(struct nvkm_subdev *ibus, int i)
|
||||
u32 data = nvkm_rd32(device, 0x122124 + (i * 0x0800));
|
||||
u32 stat = nvkm_rd32(device, 0x122128 + (i * 0x0800));
|
||||
nvkm_debug(ibus, "HUB%d: %06x %08x (%08x)\n", i, addr, data, stat);
|
||||
nvkm_mask(device, 0x122128 + (i * 0x0800), 0x00000200, 0x00000000);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -42,7 +42,6 @@ gk104_ibus_intr_rop(struct nvkm_subdev *ibus, int i)
|
||||
u32 data = nvkm_rd32(device, 0x124124 + (i * 0x0800));
|
||||
u32 stat = nvkm_rd32(device, 0x124128 + (i * 0x0800));
|
||||
nvkm_debug(ibus, "ROP%d: %06x %08x (%08x)\n", i, addr, data, stat);
|
||||
nvkm_mask(device, 0x124128 + (i * 0x0800), 0x00000200, 0x00000000);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -53,7 +52,6 @@ gk104_ibus_intr_gpc(struct nvkm_subdev *ibus, int i)
|
||||
u32 data = nvkm_rd32(device, 0x128124 + (i * 0x0800));
|
||||
u32 stat = nvkm_rd32(device, 0x128128 + (i * 0x0800));
|
||||
nvkm_debug(ibus, "GPC%d: %06x %08x (%08x)\n", i, addr, data, stat);
|
||||
nvkm_mask(device, 0x128128 + (i * 0x0800), 0x00000200, 0x00000000);
|
||||
}
|
||||
|
||||
void
|
||||
@ -90,6 +88,12 @@ gk104_ibus_intr(struct nvkm_subdev *ibus)
|
||||
intr1 &= ~stat;
|
||||
}
|
||||
}
|
||||
|
||||
nvkm_mask(device, 0x12004c, 0x0000003f, 0x00000002);
|
||||
nvkm_msec(device, 2000,
|
||||
if (!(nvkm_rd32(device, 0x12004c) & 0x0000003f))
|
||||
break;
|
||||
);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -316,9 +316,9 @@ nvkm_mmu_vram(struct nvkm_mmu *mmu)
|
||||
{
|
||||
struct nvkm_device *device = mmu->subdev.device;
|
||||
struct nvkm_mm *mm = &device->fb->ram->vram;
|
||||
const u32 sizeN = nvkm_mm_heap_size(mm, NVKM_RAM_MM_NORMAL);
|
||||
const u32 sizeU = nvkm_mm_heap_size(mm, NVKM_RAM_MM_NOMAP);
|
||||
const u32 sizeM = nvkm_mm_heap_size(mm, NVKM_RAM_MM_MIXED);
|
||||
const u64 sizeN = nvkm_mm_heap_size(mm, NVKM_RAM_MM_NORMAL);
|
||||
const u64 sizeU = nvkm_mm_heap_size(mm, NVKM_RAM_MM_NOMAP);
|
||||
const u64 sizeM = nvkm_mm_heap_size(mm, NVKM_RAM_MM_MIXED);
|
||||
u8 type = NVKM_MEM_KIND * !!mmu->func->kind;
|
||||
u8 heap = NVKM_MEM_VRAM;
|
||||
int heapM, heapN, heapU;
|
||||
|
@ -386,6 +386,7 @@
|
||||
#define USB_DEVICE_ID_TOSHIBA_CLICK_L9W 0x0401
|
||||
#define USB_DEVICE_ID_HP_X2 0x074d
|
||||
#define USB_DEVICE_ID_HP_X2_10_COVER 0x0755
|
||||
#define USB_DEVICE_ID_ASUS_UX550_TOUCHSCREEN 0x2706
|
||||
|
||||
#define USB_VENDOR_ID_ELECOM 0x056e
|
||||
#define USB_DEVICE_ID_ELECOM_BM084 0x0061
|
||||
|
@ -334,6 +334,8 @@ static const struct hid_device_id hid_battery_quirks[] = {
|
||||
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH,
|
||||
USB_DEVICE_ID_LOGITECH_DINOVO_EDGE_KBD),
|
||||
HID_BATTERY_QUIRK_IGNORE },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ASUS_UX550_TOUCHSCREEN),
|
||||
HID_BATTERY_QUIRK_IGNORE },
|
||||
{}
|
||||
};
|
||||
|
||||
|
@ -150,9 +150,9 @@ static int wacom_wac_pen_serial_enforce(struct hid_device *hdev,
|
||||
}
|
||||
|
||||
if (flush)
|
||||
wacom_wac_queue_flush(hdev, &wacom_wac->pen_fifo);
|
||||
wacom_wac_queue_flush(hdev, wacom_wac->pen_fifo);
|
||||
else if (insert)
|
||||
wacom_wac_queue_insert(hdev, &wacom_wac->pen_fifo,
|
||||
wacom_wac_queue_insert(hdev, wacom_wac->pen_fifo,
|
||||
raw_data, report_size);
|
||||
|
||||
return insert && !flush;
|
||||
@ -1241,6 +1241,38 @@ static int wacom_devm_sysfs_create_group(struct wacom *wacom,
|
||||
group);
|
||||
}
|
||||
|
||||
static void wacom_devm_kfifo_release(struct device *dev, void *res)
|
||||
{
|
||||
struct kfifo_rec_ptr_2 *devres = res;
|
||||
|
||||
kfifo_free(devres);
|
||||
}
|
||||
|
||||
static int wacom_devm_kfifo_alloc(struct wacom *wacom)
|
||||
{
|
||||
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
|
||||
struct kfifo_rec_ptr_2 *pen_fifo;
|
||||
int error;
|
||||
|
||||
pen_fifo = devres_alloc(wacom_devm_kfifo_release,
|
||||
sizeof(struct kfifo_rec_ptr_2),
|
||||
GFP_KERNEL);
|
||||
|
||||
if (!pen_fifo)
|
||||
return -ENOMEM;
|
||||
|
||||
error = kfifo_alloc(pen_fifo, WACOM_PKGLEN_MAX, GFP_KERNEL);
|
||||
if (error) {
|
||||
devres_free(pen_fifo);
|
||||
return error;
|
||||
}
|
||||
|
||||
devres_add(&wacom->hdev->dev, pen_fifo);
|
||||
wacom_wac->pen_fifo = pen_fifo;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
enum led_brightness wacom_leds_brightness_get(struct wacom_led *led)
|
||||
{
|
||||
struct wacom *wacom = led->wacom;
|
||||
@ -2697,7 +2729,7 @@ static int wacom_probe(struct hid_device *hdev,
|
||||
goto fail;
|
||||
}
|
||||
|
||||
error = kfifo_alloc(&wacom_wac->pen_fifo, WACOM_PKGLEN_MAX, GFP_KERNEL);
|
||||
error = wacom_devm_kfifo_alloc(wacom);
|
||||
if (error)
|
||||
goto fail;
|
||||
|
||||
@ -2764,8 +2796,6 @@ static void wacom_remove(struct hid_device *hdev)
|
||||
if (wacom->wacom_wac.features.type != REMOTE)
|
||||
wacom_release_resources(wacom);
|
||||
|
||||
kfifo_free(&wacom_wac->pen_fifo);
|
||||
|
||||
hid_set_drvdata(hdev, NULL);
|
||||
}
|
||||
|
||||
|
@ -344,7 +344,7 @@ struct wacom_wac {
|
||||
struct input_dev *pen_input;
|
||||
struct input_dev *touch_input;
|
||||
struct input_dev *pad_input;
|
||||
struct kfifo_rec_ptr_2 pen_fifo;
|
||||
struct kfifo_rec_ptr_2 *pen_fifo;
|
||||
int pid;
|
||||
int num_contacts_left;
|
||||
u8 bt_features;
|
||||
|
@ -230,6 +230,11 @@ static const struct pci_device_id intel_th_pci_id_table[] = {
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4b26),
|
||||
.driver_data = (kernel_ulong_t)&intel_th_2x,
|
||||
},
|
||||
{
|
||||
/* Alder Lake-P */
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x51a6),
|
||||
.driver_data = (kernel_ulong_t)&intel_th_2x,
|
||||
},
|
||||
{
|
||||
/* Emmitsburg PCH */
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x1bcc),
|
||||
|
@ -64,7 +64,7 @@ static void stm_heartbeat_unlink(struct stm_source_data *data)
|
||||
|
||||
static int stm_heartbeat_init(void)
|
||||
{
|
||||
int i, ret = -ENOMEM;
|
||||
int i, ret;
|
||||
|
||||
if (nr_devs < 0 || nr_devs > STM_HEARTBEAT_MAX)
|
||||
return -EINVAL;
|
||||
@ -72,8 +72,10 @@ static int stm_heartbeat_init(void)
|
||||
for (i = 0; i < nr_devs; i++) {
|
||||
stm_heartbeat[i].data.name =
|
||||
kasprintf(GFP_KERNEL, "heartbeat.%d", i);
|
||||
if (!stm_heartbeat[i].data.name)
|
||||
if (!stm_heartbeat[i].data.name) {
|
||||
ret = -ENOMEM;
|
||||
goto fail_unregister;
|
||||
}
|
||||
|
||||
stm_heartbeat[i].data.nr_chans = 1;
|
||||
stm_heartbeat[i].data.link = stm_heartbeat_link;
|
||||
|
@ -347,7 +347,7 @@ static int octeon_i2c_read(struct octeon_i2c *i2c, int target,
|
||||
if (result)
|
||||
return result;
|
||||
if (recv_len && i == 0) {
|
||||
if (data[i] > I2C_SMBUS_BLOCK_MAX + 1)
|
||||
if (data[i] > I2C_SMBUS_BLOCK_MAX)
|
||||
return -EPROTO;
|
||||
length += data[i];
|
||||
}
|
||||
|
@ -71,6 +71,8 @@
|
||||
|
||||
/* timeout (ms) for pm runtime autosuspend */
|
||||
#define SPRD_I2C_PM_TIMEOUT 1000
|
||||
/* timeout (ms) for transfer message */
|
||||
#define I2C_XFER_TIMEOUT 1000
|
||||
|
||||
/* SPRD i2c data structure */
|
||||
struct sprd_i2c {
|
||||
@ -244,6 +246,7 @@ static int sprd_i2c_handle_msg(struct i2c_adapter *i2c_adap,
|
||||
struct i2c_msg *msg, bool is_last_msg)
|
||||
{
|
||||
struct sprd_i2c *i2c_dev = i2c_adap->algo_data;
|
||||
unsigned long time_left;
|
||||
|
||||
i2c_dev->msg = msg;
|
||||
i2c_dev->buf = msg->buf;
|
||||
@ -273,7 +276,10 @@ static int sprd_i2c_handle_msg(struct i2c_adapter *i2c_adap,
|
||||
|
||||
sprd_i2c_opt_start(i2c_dev);
|
||||
|
||||
wait_for_completion(&i2c_dev->complete);
|
||||
time_left = wait_for_completion_timeout(&i2c_dev->complete,
|
||||
msecs_to_jiffies(I2C_XFER_TIMEOUT));
|
||||
if (!time_left)
|
||||
return -ETIMEDOUT;
|
||||
|
||||
return i2c_dev->err;
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ static int tegra_bpmp_xlate_flags(u16 flags, u16 *out)
|
||||
flags &= ~I2C_M_RECV_LEN;
|
||||
}
|
||||
|
||||
return (flags != 0) ? -EINVAL : 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -213,7 +213,6 @@ void ide_prep_sense(ide_drive_t *drive, struct request *rq)
|
||||
sense_rq->rq_disk = rq->rq_disk;
|
||||
sense_rq->cmd_flags = REQ_OP_DRV_IN;
|
||||
ide_req(sense_rq)->type = ATA_PRIV_SENSE;
|
||||
sense_rq->rq_flags |= RQF_PREEMPT;
|
||||
|
||||
req->cmd[0] = GPCMD_REQUEST_SENSE;
|
||||
req->cmd[4] = cmd_len;
|
||||
|
@ -527,11 +527,6 @@ repeat:
|
||||
* above to return us whatever is in the queue. Since we call
|
||||
* ide_do_request() ourselves, we end up taking requests while
|
||||
* the queue is blocked...
|
||||
*
|
||||
* We let requests forced at head of queue with ide-preempt
|
||||
* though. I hope that doesn't happen too much, hopefully not
|
||||
* unless the subdriver triggers such a thing in its own PM
|
||||
* state machine.
|
||||
*/
|
||||
if ((drive->dev_flags & IDE_DFLAG_BLOCKED) &&
|
||||
ata_pm_request(rq) == 0 &&
|
||||
|
@ -189,9 +189,9 @@ static ssize_t ad5504_write_dac_powerdown(struct iio_dev *indio_dev,
|
||||
return ret;
|
||||
|
||||
if (pwr_down)
|
||||
st->pwr_down_mask |= (1 << chan->channel);
|
||||
else
|
||||
st->pwr_down_mask &= ~(1 << chan->channel);
|
||||
else
|
||||
st->pwr_down_mask |= (1 << chan->channel);
|
||||
|
||||
ret = ad5504_spi_write(st, AD5504_ADDR_CTRL,
|
||||
AD5504_DAC_PWRDWN_MODE(st->pwr_down_mode) |
|
||||
|
@ -110,6 +110,13 @@ enum bmi160_sensor_type {
|
||||
|
||||
struct bmi160_data {
|
||||
struct regmap *regmap;
|
||||
/*
|
||||
* Ensure natural alignment for timestamp if present.
|
||||
* Max length needed: 2 * 3 channels + 4 bytes padding + 8 byte ts.
|
||||
* If fewer channels are enabled, less space may be needed, as
|
||||
* long as the timestamp is still aligned to 8 bytes.
|
||||
*/
|
||||
__le16 buf[12] __aligned(8);
|
||||
};
|
||||
|
||||
const struct regmap_config bmi160_regmap_config = {
|
||||
@ -385,8 +392,6 @@ static irqreturn_t bmi160_trigger_handler(int irq, void *p)
|
||||
struct iio_poll_func *pf = p;
|
||||
struct iio_dev *indio_dev = pf->indio_dev;
|
||||
struct bmi160_data *data = iio_priv(indio_dev);
|
||||
__le16 buf[12];
|
||||
/* 2 sens x 3 axis x __le16 + 2 x __le16 pad + 4 x __le16 tstamp */
|
||||
int i, ret, j = 0, base = BMI160_REG_DATA_MAGN_XOUT_L;
|
||||
__le16 sample;
|
||||
|
||||
@ -396,10 +401,10 @@ static irqreturn_t bmi160_trigger_handler(int irq, void *p)
|
||||
&sample, sizeof(sample));
|
||||
if (ret < 0)
|
||||
goto done;
|
||||
buf[j++] = sample;
|
||||
data->buf[j++] = sample;
|
||||
}
|
||||
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, buf,
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, data->buf,
|
||||
iio_get_time_ns(indio_dev));
|
||||
done:
|
||||
iio_trigger_notify_done(indio_dev->trig);
|
||||
|
@ -475,13 +475,29 @@ static irqreturn_t st_lsm6dsx_handler_irq(int irq, void *private)
|
||||
static irqreturn_t st_lsm6dsx_handler_thread(int irq, void *private)
|
||||
{
|
||||
struct st_lsm6dsx_hw *hw = private;
|
||||
int count;
|
||||
int fifo_len = 0, len;
|
||||
|
||||
mutex_lock(&hw->fifo_lock);
|
||||
count = st_lsm6dsx_read_fifo(hw);
|
||||
mutex_unlock(&hw->fifo_lock);
|
||||
/*
|
||||
* If we are using edge IRQs, new samples can arrive while
|
||||
* processing current interrupt since there are no hw
|
||||
* guarantees the irq line stays "low" long enough to properly
|
||||
* detect the new interrupt. In this case the new sample will
|
||||
* be missed.
|
||||
* Polling FIFO status register allow us to read new
|
||||
* samples even if the interrupt arrives while processing
|
||||
* previous data and the timeslot where the line is "low" is
|
||||
* too short to be properly detected.
|
||||
*/
|
||||
do {
|
||||
mutex_lock(&hw->fifo_lock);
|
||||
len = st_lsm6dsx_read_fifo(hw);
|
||||
mutex_unlock(&hw->fifo_lock);
|
||||
|
||||
return !count ? IRQ_NONE : IRQ_HANDLED;
|
||||
if (len > 0)
|
||||
fifo_len += len;
|
||||
} while (len > 0);
|
||||
|
||||
return fifo_len ? IRQ_HANDLED : IRQ_NONE;
|
||||
}
|
||||
|
||||
static int st_lsm6dsx_buffer_preenable(struct iio_dev *iio_dev)
|
||||
|
@ -56,6 +56,12 @@ struct mag3110_data {
|
||||
struct mutex lock;
|
||||
u8 ctrl_reg1;
|
||||
int sleep_val;
|
||||
/* Ensure natural alignment of timestamp */
|
||||
struct {
|
||||
__be16 channels[3];
|
||||
u8 temperature;
|
||||
s64 ts __aligned(8);
|
||||
} scan;
|
||||
};
|
||||
|
||||
static int mag3110_request(struct mag3110_data *data)
|
||||
@ -387,10 +393,9 @@ static irqreturn_t mag3110_trigger_handler(int irq, void *p)
|
||||
struct iio_poll_func *pf = p;
|
||||
struct iio_dev *indio_dev = pf->indio_dev;
|
||||
struct mag3110_data *data = iio_priv(indio_dev);
|
||||
u8 buffer[16]; /* 3 16-bit channels + 1 byte temp + padding + ts */
|
||||
int ret;
|
||||
|
||||
ret = mag3110_read(data, (__be16 *) buffer);
|
||||
ret = mag3110_read(data, data->scan.channels);
|
||||
if (ret < 0)
|
||||
goto done;
|
||||
|
||||
@ -399,10 +404,10 @@ static irqreturn_t mag3110_trigger_handler(int irq, void *p)
|
||||
MAG3110_DIE_TEMP);
|
||||
if (ret < 0)
|
||||
goto done;
|
||||
buffer[6] = ret;
|
||||
data->scan.temperature = ret;
|
||||
}
|
||||
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, buffer,
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, &data->scan,
|
||||
iio_get_time_ns(indio_dev));
|
||||
|
||||
done:
|
||||
|
@ -6094,7 +6094,7 @@ int mlx5_ib_stage_bfrag_init(struct mlx5_ib_dev *dev)
|
||||
|
||||
err = mlx5_alloc_bfreg(dev->mdev, &dev->fp_bfreg, false, true);
|
||||
if (err)
|
||||
mlx5_free_bfreg(dev->mdev, &dev->fp_bfreg);
|
||||
mlx5_free_bfreg(dev->mdev, &dev->bfreg);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
@ -212,6 +212,7 @@ find_free_vf_and_create_qp_grp(struct usnic_ib_dev *us_ibdev,
|
||||
|
||||
}
|
||||
usnic_uiom_free_dev_list(dev_list);
|
||||
dev_list = NULL;
|
||||
}
|
||||
|
||||
/* Try to find resources on an unused vf */
|
||||
@ -236,6 +237,8 @@ find_free_vf_and_create_qp_grp(struct usnic_ib_dev *us_ibdev,
|
||||
qp_grp_check:
|
||||
if (IS_ERR_OR_NULL(qp_grp)) {
|
||||
usnic_err("Failed to allocate qp_grp\n");
|
||||
if (usnic_ib_share_vf)
|
||||
usnic_uiom_free_dev_list(dev_list);
|
||||
return ERR_PTR(qp_grp ? PTR_ERR(qp_grp) : -ENOMEM);
|
||||
}
|
||||
return qp_grp;
|
||||
|
@ -1373,6 +1373,8 @@ static int intel_irq_remapping_alloc(struct irq_domain *domain,
|
||||
irq_data = irq_domain_get_irq_data(domain, virq + i);
|
||||
irq_cfg = irqd_cfg(irq_data);
|
||||
if (!irq_data || !irq_cfg) {
|
||||
if (!i)
|
||||
kfree(data);
|
||||
ret = -EINVAL;
|
||||
goto out_free_data;
|
||||
}
|
||||
|
@ -201,6 +201,13 @@ static int mips_cpu_ipi_alloc(struct irq_domain *domain, unsigned int virq,
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = irq_domain_set_hwirq_and_chip(domain->parent, virq + i, hwirq,
|
||||
&mips_mt_cpu_irq_controller,
|
||||
NULL);
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = irq_set_irq_type(virq + i, IRQ_TYPE_LEVEL_HIGH);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
@ -12,6 +12,7 @@ if MISDN != n
|
||||
config MISDN_DSP
|
||||
tristate "Digital Audio Processing of transparent data"
|
||||
depends on MISDN
|
||||
select BITREVERSE
|
||||
help
|
||||
Enable support for digital audio processing capability.
|
||||
|
||||
|
@ -19,6 +19,7 @@ if NVM
|
||||
|
||||
config NVM_PBLK
|
||||
tristate "Physical Block Device Open-Channel SSD target"
|
||||
select CRC32
|
||||
help
|
||||
Allows an open-channel SSD to be exposed as a block device to the
|
||||
host. The target assumes the device exposes raw flash and must be
|
||||
|
@ -655,4 +655,18 @@ config DM_BOW
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
config DM_USER
|
||||
tristate "Block device in userspace"
|
||||
depends on BLK_DEV_DM
|
||||
default y
|
||||
help
|
||||
This device-mapper target allows a userspace daemon to provide the
|
||||
contents of a block device. See
|
||||
<file:Documentation/block/dm-user.rst> for more information.
|
||||
|
||||
To compile this code as a module, choose M here: the module will be
|
||||
called dm-user.
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
endif # MD
|
||||
|
@ -70,6 +70,7 @@ obj-$(CONFIG_DM_INTEGRITY) += dm-integrity.o
|
||||
obj-$(CONFIG_DM_ZONED) += dm-zoned.o
|
||||
obj-$(CONFIG_DM_WRITECACHE) += dm-writecache.o
|
||||
obj-$(CONFIG_DM_BOW) += dm-bow.o
|
||||
obj-$(CONFIG_DM_USER) += dm-user.o
|
||||
|
||||
ifeq ($(CONFIG_DM_UEVENT),y)
|
||||
dm-mod-objs += dm-uevent.o
|
||||
|
@ -1450,6 +1450,12 @@ sector_t dm_bufio_get_device_size(struct dm_bufio_client *c)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(dm_bufio_get_device_size);
|
||||
|
||||
struct dm_io_client *dm_bufio_get_dm_io_client(struct dm_bufio_client *c)
|
||||
{
|
||||
return c->dm_io;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(dm_bufio_get_dm_io_client);
|
||||
|
||||
sector_t dm_bufio_get_block_number(struct dm_buffer *b)
|
||||
{
|
||||
return b->block;
|
||||
|
@ -240,6 +240,7 @@ struct dm_integrity_c {
|
||||
|
||||
bool journal_uptodate;
|
||||
bool just_formatted;
|
||||
bool legacy_recalculate;
|
||||
|
||||
struct alg_spec internal_hash_alg;
|
||||
struct alg_spec journal_crypt_alg;
|
||||
@ -345,6 +346,14 @@ static int dm_integrity_failed(struct dm_integrity_c *ic)
|
||||
return READ_ONCE(ic->failed);
|
||||
}
|
||||
|
||||
static bool dm_integrity_disable_recalculate(struct dm_integrity_c *ic)
|
||||
{
|
||||
if ((ic->internal_hash_alg.key || ic->journal_mac_alg.key) &&
|
||||
!ic->legacy_recalculate)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
static commit_id_t dm_integrity_commit_id(struct dm_integrity_c *ic, unsigned i,
|
||||
unsigned j, unsigned char seq)
|
||||
{
|
||||
@ -1158,12 +1167,52 @@ static int dm_integrity_rw_tag(struct dm_integrity_c *ic, unsigned char *tag, se
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void dm_integrity_flush_buffers(struct dm_integrity_c *ic)
|
||||
struct flush_request {
|
||||
struct dm_io_request io_req;
|
||||
struct dm_io_region io_reg;
|
||||
struct dm_integrity_c *ic;
|
||||
struct completion comp;
|
||||
};
|
||||
|
||||
static void flush_notify(unsigned long error, void *fr_)
|
||||
{
|
||||
struct flush_request *fr = fr_;
|
||||
if (unlikely(error != 0))
|
||||
dm_integrity_io_error(fr->ic, "flusing disk cache", -EIO);
|
||||
complete(&fr->comp);
|
||||
}
|
||||
|
||||
static void dm_integrity_flush_buffers(struct dm_integrity_c *ic, bool flush_data)
|
||||
{
|
||||
int r;
|
||||
|
||||
struct flush_request fr;
|
||||
|
||||
if (!ic->meta_dev)
|
||||
flush_data = false;
|
||||
if (flush_data) {
|
||||
fr.io_req.bi_op = REQ_OP_WRITE,
|
||||
fr.io_req.bi_op_flags = REQ_PREFLUSH | REQ_SYNC,
|
||||
fr.io_req.mem.type = DM_IO_KMEM,
|
||||
fr.io_req.mem.ptr.addr = NULL,
|
||||
fr.io_req.notify.fn = flush_notify,
|
||||
fr.io_req.notify.context = &fr;
|
||||
fr.io_req.client = dm_bufio_get_dm_io_client(ic->bufio),
|
||||
fr.io_reg.bdev = ic->dev->bdev,
|
||||
fr.io_reg.sector = 0,
|
||||
fr.io_reg.count = 0,
|
||||
fr.ic = ic;
|
||||
init_completion(&fr.comp);
|
||||
r = dm_io(&fr.io_req, 1, &fr.io_reg, NULL);
|
||||
BUG_ON(r);
|
||||
}
|
||||
|
||||
r = dm_bufio_write_dirty_buffers(ic->bufio);
|
||||
if (unlikely(r))
|
||||
dm_integrity_io_error(ic, "writing tags", r);
|
||||
|
||||
if (flush_data)
|
||||
wait_for_completion(&fr.comp);
|
||||
}
|
||||
|
||||
static void sleep_on_endio_wait(struct dm_integrity_c *ic)
|
||||
@ -1857,7 +1906,7 @@ static void integrity_commit(struct work_struct *w)
|
||||
flushes = bio_list_get(&ic->flush_bio_list);
|
||||
if (unlikely(ic->mode != 'J')) {
|
||||
spin_unlock_irq(&ic->endio_wait.lock);
|
||||
dm_integrity_flush_buffers(ic);
|
||||
dm_integrity_flush_buffers(ic, true);
|
||||
goto release_flush_bios;
|
||||
}
|
||||
|
||||
@ -2068,7 +2117,7 @@ skip_io:
|
||||
complete_journal_op(&comp);
|
||||
wait_for_completion_io(&comp.comp);
|
||||
|
||||
dm_integrity_flush_buffers(ic);
|
||||
dm_integrity_flush_buffers(ic, true);
|
||||
}
|
||||
|
||||
static void integrity_writer(struct work_struct *w)
|
||||
@ -2110,7 +2159,7 @@ static void recalc_write_super(struct dm_integrity_c *ic)
|
||||
{
|
||||
int r;
|
||||
|
||||
dm_integrity_flush_buffers(ic);
|
||||
dm_integrity_flush_buffers(ic, false);
|
||||
if (dm_integrity_failed(ic))
|
||||
return;
|
||||
|
||||
@ -2420,7 +2469,7 @@ static void dm_integrity_postsuspend(struct dm_target *ti)
|
||||
if (ic->meta_dev)
|
||||
queue_work(ic->writer_wq, &ic->writer_work);
|
||||
drain_workqueue(ic->writer_wq);
|
||||
dm_integrity_flush_buffers(ic);
|
||||
dm_integrity_flush_buffers(ic, true);
|
||||
}
|
||||
|
||||
BUG_ON(!RB_EMPTY_ROOT(&ic->in_progress));
|
||||
@ -2474,6 +2523,7 @@ static void dm_integrity_status(struct dm_target *ti, status_type_t type,
|
||||
arg_count += !!ic->internal_hash_alg.alg_string;
|
||||
arg_count += !!ic->journal_crypt_alg.alg_string;
|
||||
arg_count += !!ic->journal_mac_alg.alg_string;
|
||||
arg_count += ic->legacy_recalculate;
|
||||
DMEMIT("%s %llu %u %c %u", ic->dev->name, (unsigned long long)ic->start,
|
||||
ic->tag_size, ic->mode, arg_count);
|
||||
if (ic->meta_dev)
|
||||
@ -2487,6 +2537,8 @@ static void dm_integrity_status(struct dm_target *ti, status_type_t type,
|
||||
DMEMIT(" buffer_sectors:%u", 1U << ic->log2_buffer_sectors);
|
||||
DMEMIT(" journal_watermark:%u", (unsigned)watermark_percentage);
|
||||
DMEMIT(" commit_time:%u", ic->autocommit_msec);
|
||||
if (ic->legacy_recalculate)
|
||||
DMEMIT(" legacy_recalculate");
|
||||
|
||||
#define EMIT_ALG(a, n) \
|
||||
do { \
|
||||
@ -3089,7 +3141,7 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned argc, char **argv)
|
||||
unsigned extra_args;
|
||||
struct dm_arg_set as;
|
||||
static const struct dm_arg _args[] = {
|
||||
{0, 9, "Invalid number of feature args"},
|
||||
{0, 12, "Invalid number of feature args"},
|
||||
};
|
||||
unsigned journal_sectors, interleave_sectors, buffer_sectors, journal_watermark, sync_msec;
|
||||
bool recalculate;
|
||||
@ -3219,6 +3271,8 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned argc, char **argv)
|
||||
goto bad;
|
||||
} else if (!strcmp(opt_string, "recalculate")) {
|
||||
recalculate = true;
|
||||
} else if (!strcmp(opt_string, "legacy_recalculate")) {
|
||||
ic->legacy_recalculate = true;
|
||||
} else {
|
||||
r = -EINVAL;
|
||||
ti->error = "Invalid argument";
|
||||
@ -3486,6 +3540,20 @@ try_smaller_buffer:
|
||||
r = -ENOMEM;
|
||||
goto bad;
|
||||
}
|
||||
} else {
|
||||
if (ic->sb->flags & cpu_to_le32(SB_FLAG_RECALCULATING)) {
|
||||
ti->error = "Recalculate can only be specified with internal_hash";
|
||||
r = -EINVAL;
|
||||
goto bad;
|
||||
}
|
||||
}
|
||||
|
||||
if (ic->sb->flags & cpu_to_le32(SB_FLAG_RECALCULATING) &&
|
||||
le64_to_cpu(ic->sb->recalc_sector) < ic->provided_data_sectors &&
|
||||
dm_integrity_disable_recalculate(ic)) {
|
||||
ti->error = "Recalculating with HMAC is disabled for security reasons - if you really need it, use the argument \"legacy_recalculate\"";
|
||||
r = -EOPNOTSUPP;
|
||||
goto bad;
|
||||
}
|
||||
|
||||
ic->bufio = dm_bufio_client_create(ic->meta_dev ? ic->meta_dev->bdev : ic->dev->bdev,
|
||||
|
@ -137,6 +137,11 @@ struct dm_snapshot {
|
||||
* for them to be committed.
|
||||
*/
|
||||
struct bio_list bios_queued_during_merge;
|
||||
|
||||
/*
|
||||
* Flush data after merge.
|
||||
*/
|
||||
struct bio flush_bio;
|
||||
};
|
||||
|
||||
/*
|
||||
@ -1061,6 +1066,17 @@ shut:
|
||||
|
||||
static void error_bios(struct bio *bio);
|
||||
|
||||
static int flush_data(struct dm_snapshot *s)
|
||||
{
|
||||
struct bio *flush_bio = &s->flush_bio;
|
||||
|
||||
bio_reset(flush_bio);
|
||||
bio_set_dev(flush_bio, s->origin->bdev);
|
||||
flush_bio->bi_opf = REQ_OP_WRITE | REQ_PREFLUSH;
|
||||
|
||||
return submit_bio_wait(flush_bio);
|
||||
}
|
||||
|
||||
static void merge_callback(int read_err, unsigned long write_err, void *context)
|
||||
{
|
||||
struct dm_snapshot *s = context;
|
||||
@ -1074,6 +1090,11 @@ static void merge_callback(int read_err, unsigned long write_err, void *context)
|
||||
goto shut;
|
||||
}
|
||||
|
||||
if (flush_data(s) < 0) {
|
||||
DMERR("Flush after merge failed: shutting down merge");
|
||||
goto shut;
|
||||
}
|
||||
|
||||
if (s->store->type->commit_merge(s->store,
|
||||
s->num_merging_chunks) < 0) {
|
||||
DMERR("Write error in exception store: shutting down merge");
|
||||
@ -1198,6 +1219,7 @@ static int snapshot_ctr(struct dm_target *ti, unsigned int argc, char **argv)
|
||||
s->first_merging_chunk = 0;
|
||||
s->num_merging_chunks = 0;
|
||||
bio_list_init(&s->bios_queued_during_merge);
|
||||
bio_init(&s->flush_bio, NULL, 0);
|
||||
|
||||
/* Allocate hash table for COW data */
|
||||
if (init_hash_tables(s)) {
|
||||
@ -1391,6 +1413,8 @@ static void snapshot_dtr(struct dm_target *ti)
|
||||
|
||||
mutex_destroy(&s->lock);
|
||||
|
||||
bio_uninit(&s->flush_bio);
|
||||
|
||||
dm_put_device(ti, s->cow);
|
||||
|
||||
dm_put_device(ti, s->origin);
|
||||
|
@ -434,14 +434,23 @@ int dm_get_device(struct dm_target *ti, const char *path, fmode_t mode,
|
||||
{
|
||||
int r;
|
||||
dev_t dev;
|
||||
unsigned int major, minor;
|
||||
char dummy;
|
||||
struct dm_dev_internal *dd;
|
||||
struct dm_table *t = ti->table;
|
||||
|
||||
BUG_ON(!t);
|
||||
|
||||
dev = dm_get_dev_t(path);
|
||||
if (!dev)
|
||||
return -ENODEV;
|
||||
if (sscanf(path, "%u:%u%c", &major, &minor, &dummy) == 2) {
|
||||
/* Extract the major/minor numbers */
|
||||
dev = MKDEV(major, minor);
|
||||
if (MAJOR(dev) != major || MINOR(dev) != minor)
|
||||
return -EOVERFLOW;
|
||||
} else {
|
||||
dev = dm_get_dev_t(path);
|
||||
if (!dev)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
dd = find_device(&t->devices, dev);
|
||||
if (!dd) {
|
||||
|
1141
drivers/md/dm-user.c
Normal file
1141
drivers/md/dm-user.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -62,14 +62,6 @@ struct dm_verity_prefetch_work {
|
||||
struct buffer_aux {
|
||||
int hash_verified;
|
||||
};
|
||||
/*
|
||||
* While system shutdown, skip verity work for I/O error.
|
||||
*/
|
||||
static inline bool verity_is_system_shutting_down(void)
|
||||
{
|
||||
return system_state == SYSTEM_HALT || system_state == SYSTEM_POWER_OFF
|
||||
|| system_state == SYSTEM_RESTART;
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize struct buffer_aux for a freshly created buffer.
|
||||
@ -545,6 +537,15 @@ static int verity_verify_io(struct dm_verity_io *io)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Skip verity work in response to I/O error when system is shutting down.
|
||||
*/
|
||||
static inline bool verity_is_system_shutting_down(void)
|
||||
{
|
||||
return system_state == SYSTEM_HALT || system_state == SYSTEM_POWER_OFF
|
||||
|| system_state == SYSTEM_RESTART;
|
||||
}
|
||||
|
||||
/*
|
||||
* End one "io" structure with a given error.
|
||||
*/
|
||||
|
@ -517,7 +517,7 @@ static int dm_blk_ioctl(struct block_device *bdev, fmode_t mode,
|
||||
* subset of the parent bdev; require extra privileges.
|
||||
*/
|
||||
if (!capable(CAP_SYS_RAWIO)) {
|
||||
DMWARN_LIMIT(
|
||||
DMDEBUG_LIMIT(
|
||||
"%s: sending ioctl %x to DM device without required privilege.",
|
||||
current->comm, cmd);
|
||||
r = -ENOIOCTLCMD;
|
||||
|
@ -1138,7 +1138,7 @@ static void raid10_read_request(struct mddev *mddev, struct bio *bio,
|
||||
struct md_rdev *err_rdev = NULL;
|
||||
gfp_t gfp = GFP_NOIO;
|
||||
|
||||
if (r10_bio->devs[slot].rdev) {
|
||||
if (slot >= 0 && r10_bio->devs[slot].rdev) {
|
||||
/*
|
||||
* This is an error retry, but we cannot
|
||||
* safely dereference the rdev in the r10_bio,
|
||||
@ -1547,6 +1547,7 @@ static void __make_request(struct mddev *mddev, struct bio *bio, int sectors)
|
||||
r10_bio->mddev = mddev;
|
||||
r10_bio->sector = bio->bi_iter.bi_sector;
|
||||
r10_bio->state = 0;
|
||||
r10_bio->read_slot = -1;
|
||||
memset(r10_bio->devs, 0, sizeof(r10_bio->devs[0]) * conf->copies);
|
||||
|
||||
if (bio_data_dir(bio) == READ)
|
||||
|
@ -185,7 +185,7 @@ out_rel_fw:
|
||||
|
||||
static int gp8psk_power_ctrl(struct dvb_usb_device *d, int onoff)
|
||||
{
|
||||
u8 status, buf;
|
||||
u8 status = 0, buf;
|
||||
int gp_product_id = le16_to_cpu(d->udev->descriptor.idProduct);
|
||||
|
||||
if (onoff) {
|
||||
|
@ -751,7 +751,7 @@ static int vmci_ctx_get_chkpt_doorbells(struct vmci_ctx *context,
|
||||
return VMCI_ERROR_MORE_DATA;
|
||||
}
|
||||
|
||||
dbells = kmalloc(data_size, GFP_ATOMIC);
|
||||
dbells = kzalloc(data_size, GFP_ATOMIC);
|
||||
if (!dbells)
|
||||
return VMCI_ERROR_NO_MEM;
|
||||
|
||||
|
@ -383,8 +383,10 @@ static void mmc_setup_queue(struct mmc_queue *mq, struct mmc_card *card)
|
||||
if (host->ops->init)
|
||||
host->ops->init(host);
|
||||
|
||||
if (mmc_card_mmc(card))
|
||||
if (mmc_card_mmc(card) && card->ext_csd.data_sector_size) {
|
||||
block_size = card->ext_csd.data_sector_size;
|
||||
WARN_ON(block_size != 512 && block_size != 4096);
|
||||
}
|
||||
|
||||
blk_queue_logical_block_size(mq->queue, block_size);
|
||||
blk_queue_max_segment_size(mq->queue,
|
||||
|
@ -170,7 +170,12 @@ static void xenon_reset_exit(struct sdhci_host *host,
|
||||
/* Disable tuning request and auto-retuning again */
|
||||
xenon_retune_setup(host);
|
||||
|
||||
xenon_set_acg(host, true);
|
||||
/*
|
||||
* The ACG should be turned off at the early init time, in order
|
||||
* to solve a possible issues with the 1.8V regulator stabilization.
|
||||
* The feature is enabled in later stage.
|
||||
*/
|
||||
xenon_set_acg(host, false);
|
||||
|
||||
xenon_set_sdclk_off_idle(host, sdhc_id, false);
|
||||
|
||||
|
@ -378,10 +378,6 @@ static int spinand_write_to_cache_op(struct spinand_device *spinand,
|
||||
}
|
||||
}
|
||||
|
||||
if (req->ooblen)
|
||||
memcpy(req->oobbuf.in, spinand->oobbuf + req->ooboffs,
|
||||
req->ooblen);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user