Merge tag 'ASB-2022-11-01_4.19-stable' of https://android.googlesource.com/kernel/common into android13-4.19-kona

https://source.android.com/docs/security/bulletin/2022-11-01

* tag 'ASB-2022-11-01_4.19-stable' of https://android.googlesource.com/kernel/common:
  Linux 4.19.264
  can: rcar_canfd: rcar_canfd_handle_global_receive(): fix IRQ storm on global FIFO receive
  net/mlx5e: Do not increment ESN when updating IPsec ESN state
  net: ehea: fix possible memory leak in ehea_register_port()
  openvswitch: switch from WARN to pr_warn
  ALSA: aoa: Fix I2S device accounting
  ALSA: aoa: i2sbus: fix possible memory leak in i2sbus_add_dev()
  PM: domains: Fix handling of unavailable/disabled idle states
  net: ksz884x: fix missing pci_disable_device() on error in pcidev_init()
  i40e: Fix flow-type by setting GL_HASH_INSET registers
  i40e: Fix VF hang when reset is triggered on another VF
  i40e: Fix ethtool rx-flow-hash setting for X722
  media: videodev2.h: V4L2_DV_BT_BLANKING_HEIGHT should check 'interlaced'
  media: v4l2-dv-timings: add sanity checks for blanking values
  media: vivid: dev->bitmap_cap wasn't freed in all cases
  media: vivid: s_fbuf: add more sanity checks
  PM: hibernate: Allow hybrid sleep to work with s2idle
  can: mscan: mpc5xxx: mpc5xxx_can_probe(): add missing put_clock() in error path
  tcp: fix indefinite deferral of RTO with SACK reneging
  net: lantiq_etop: don't free skb when returning NETDEV_TX_BUSY
  net: fix UAF issue in nfqnl_nf_hook_drop() when ops_init() failed
  kcm: annotate data-races around kcm->rx_wait
  kcm: annotate data-races around kcm->rx_psock
  amd-xgbe: add the bit rate quirk for Molex cables
  amd-xgbe: fix the SFP compliance codes check for DAC cables
  x86/unwind/orc: Fix unreliable stack dump with gcov
  net: netsec: fix error handling in netsec_register_mdio()
  tipc: fix a null-ptr-deref in tipc_topsrv_accept
  ALSA: ac97: fix possible memory leak in snd_ac97_dev_register()
  arc: iounmap() arg is volatile
  drm/msm: Fix return type of mdp4_lvds_connector_mode_valid
  net: ieee802154: fix error return code in dgram_bind()
  mm,hugetlb: take hugetlb_lock before decrementing h->resv_huge_pages
  xen/gntdev: Prevent leaking grants
  Xen/gntdev: don't ignore kernel unmapping error
  s390/futex: add missing EX_TABLE entry to __futex_atomic_op()
  perf auxtrace: Fix address filter symbol name match for modules
  kernfs: fix use-after-free in __kernfs_remove
  mmc: core: Fix kernel panic when remove non-standard SDIO card
  drm/msm/hdmi: fix memory corruption with too many bridges
  drm/msm/dsi: fix memory corruption with too many bridges
  mac802154: Fix LQI recording
  fbdev: smscufx: Fix several use-after-free bugs
  iio: light: tsl2583: Fix module unloading
  tools: iio: iio_utils: fix digit calculation
  xhci: Remove device endpoints from bandwidth list when freeing the device
  usb: xhci: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite being a V0.96 controller
  usb: bdc: change state when port disconnected
  usb: dwc3: gadget: Don't set IMI for no_interrupt
  usb: dwc3: gadget: Stop processing more requests on IMI
  USB: add RESET_RESUME quirk for NVIDIA Jetson devices in RCM
  ALSA: au88x0: use explicitly signed char
  ALSA: Use del_timer_sync() before freeing timer
  can: kvaser_usb: Fix possible completions during init_completion
  mm: /proc/pid/smaps_rollup: fix no vma's null-deref
  hv_netvsc: Fix race between VF offering and VF association message from host
  Makefile.debug: re-enable debug info for .S files
  ACPI: video: Force backlight native for more TongFang devices
  media: v4l2-mem2mem: Apply DST_QUEUE_OFF_BASE on MMAP buffers across ioctls
  iommu/vt-d: Clean up si_domain in the init_dmars() error path
  net: hns: fix possible memory leak in hnae_ae_register()
  net: sched: cake: fix null pointer access issue when cake_init() fails
  net/atm: fix proc_mpc_write incorrect return value
  HID: magicmouse: Do not set BTN_MOUSE on double report
  tipc: fix an information leak in tipc_topsrv_kern_subscr
  tipc: Fix recognition of trial period
  ACPI: extlog: Handle multiple records
  btrfs: fix processing of delayed tree block refs during backref walking
  btrfs: fix processing of delayed data refs during backref walking
  r8152: add PID for the Lenovo OneLink+ Dock
  arm64: errata: Remove AES hwcap for COMPAT tasks
  media: venus: dec: Handle the case where find_format fails
  KVM: arm64: vgic: Fix exit condition in scan_its_table()
  ata: ahci: Match EM_MAX_SLOTS with SATA_PMP_MAX_PORTS
  ata: ahci-imx: Fix MODULE_ALIAS
  hwmon/coretemp: Handle large core ID value
  x86/microcode/AMD: Apply the patch early on every logical thread
  ocfs2: fix BUG when iput after ocfs2_mknod fails
  ocfs2: clear dinode links count in case of error
  UPSTREAM: once: fix section mismatch on clang builds
  Revert "serial: 8250: Fix restoring termios speed after suspend"
  UPSTREAM: ARM: 8788/1: ftrace: remove old mcount support
  Linux 4.19.263
  once: fix section mismatch on clang builds
  Linux 4.19.262
  gcov: support GCC 12.1 and newer compilers
  thermal: intel_powerclamp: Use first online CPU as control_cpu
  inet: fully convert sk->sk_rx_dst to RCU rules
  efi: libstub: drop pointless get_memory_map() call
  md: Replace snprintf with scnprintf
  ext4: continue to expand file system when the target size doesn't reach
  net/ieee802154: don't warn zero-sized raw_sendmsg()
  net: ieee802154: return -EINVAL for unknown addr type
  perf intel-pt: Fix segfault in intel_pt_print_info() with uClibc
  clk: bcm2835: Make peripheral PLLC critical
  usb: idmouse: fix an uninit-value in idmouse_open
  nvme: copy firmware_rev on each init
  Revert "usb: storage: Add quirk for Samsung Fit flash"
  usb: musb: Fix musb_gadget.c rxstate overflow bug
  usb: host: xhci: Fix potential memory leak in xhci_alloc_stream_info()
  md/raid5: Wait for MD_SB_CHANGE_PENDING in raid5d
  HID: roccat: Fix use-after-free in roccat_read()
  ata: libahci_platform: Sanity check the DT child nodes number
  staging: vt6655: fix potential memory leak
  power: supply: adp5061: fix out-of-bounds read in adp5061_get_chg_type()
  nbd: Fix hung when signal interrupts nbd_start_device_ioctl()
  scsi: 3w-9xxx: Avoid disabling device if failing to enable it
  media: cx88: Fix a null-ptr-deref bug in buffer_prepare()
  ARM: dts: imx6sx: add missing properties for sram
  ARM: dts: imx6sll: add missing properties for sram
  ARM: dts: imx6sl: add missing properties for sram
  ARM: dts: imx6qp: add missing properties for sram
  ARM: dts: imx6dl: add missing properties for sram
  ARM: dts: imx6q: add missing properties for sram
  ARM: dts: imx7d-sdb: config the max pressure for tsc2046
  drm/amdgpu: fix initial connector audio value
  platform/x86: msi-laptop: Change DMI match / alias strings to fix module autoloading
  drm: panel-orientation-quirks: Add quirk for Anbernic Win600
  drm/vc4: vec: Fix timings for VEC modes
  drm/amd/display: fix overflow on MIN_I64 definition
  drm: Prevent drm_copy_field() to attempt copying a NULL pointer
  drm: Use size_t type for len variable in drm_copy_field()
  r8152: Rate limit overflow messages
  Bluetooth: L2CAP: Fix user-after-free
  net: If sock is dead don't access sock's sk_wq in sk_stream_wait_memory
  wifi: rt2x00: correctly set BBP register 86 for MT7620
  wifi: rt2x00: set SoC wmac clock register
  wifi: rt2x00: set correct TX_SW_CFG1 MAC register for MT7620
  wifi: rt2x00: don't run Rt5592 IQ calibration on MT7620
  can: bcm: check the result of can_send() in bcm_can_tx()
  Bluetooth: hci_sysfs: Fix attempting to call device_add multiple times
  Bluetooth: L2CAP: initialize delayed works at l2cap_chan_create()
  wifi: brcmfmac: fix use-after-free bug in brcmf_netdev_start_xmit()
  xfrm: Update ipcomp_scratches with NULL when freed
  wifi: ath9k: avoid uninit memory read in ath9k_htc_rx_msg()
  tcp: annotate data-race around tcp_md5sig_pool_populated
  openvswitch: Fix overreporting of drops in dropwatch
  openvswitch: Fix double reporting of drops in dropwatch
  wifi: brcmfmac: fix invalid address access when enabling SCAN log level
  NFSD: Return nfserr_serverfault if splice_ok but buf->pages have data
  thermal: intel_powerclamp: Use get_cpu() instead of smp_processor_id() to avoid crash
  powercap: intel_rapl: fix UBSAN shift-out-of-bounds issue
  MIPS: BCM47XX: Cast memcmp() of function to (void *)
  ACPI: video: Add Toshiba Satellite/Portege Z830 quirk
  f2fs: fix race condition on setting FI_NO_EXTENT flag
  crypto: cavium - prevent integer overflow loading firmware
  iommu/iova: Fix module config properly
  iommu/omap: Fix buffer overflow in debugfs
  powerpc: Fix SPE Power ISA properties for e500v1 platforms
  powerpc/64s: Fix GENERIC_CPU build flags for PPC970 / G5
  x86/hyperv: Fix 'struct hv_enlightened_vmcs' definition
  powerpc/powernv: add missing of_node_put() in opal_export_attrs()
  powerpc/pci_dn: Add missing of_node_put()
  powerpc/sysdev/fsl_msi: Add missing of_node_put()
  powerpc/math_emu/efp: Include module.h
  mailbox: bcm-ferxrm-mailbox: Fix error check for dma_map_sg
  clk: ti: dra7-atl: Fix reference leak in of_dra7_atl_clk_probe
  clk: bcm2835: fix bcm2835_clock_rate_from_divisor declaration
  spmi: pmic-arb: correct duplicate APID to PPID mapping logic
  dmaengine: ioat: stop mod_timer from resurrecting deleted timer in __cleanup()
  mfd: sm501: Add check for platform_driver_register()
  mfd: lp8788: Fix an error handling path in lp8788_irq_init() and lp8788_irq_init()
  mfd: lp8788: Fix an error handling path in lp8788_probe()
  mfd: fsl-imx25: Fix an error handling path in mx25_tsadc_setup_irq()
  mfd: intel_soc_pmic: Fix an error handling path in intel_soc_pmic_i2c_probe()
  fsi: core: Check error number after calling ida_simple_get
  serial: 8250: Fix restoring termios speed after suspend
  firmware: google: Test spinlock on panic path to avoid lockups
  staging: vt6655: fix some erroneous memory clean-up loops
  phy: qualcomm: call clk_disable_unprepare in the error handling
  drivers: serial: jsm: fix some leaks in probe
  usb: gadget: function: fix dangling pnp_string in f_printer.c
  xhci: Don't show warning for reinit on known broken suspend
  md/raid5: Ensure stripe_fill happens on non-read IO with journal
  ata: fix ata_id_has_dipm()
  ata: fix ata_id_has_ncq_autosense()
  ata: fix ata_id_has_devslp()
  ata: fix ata_id_sense_reporting_enabled() and ata_id_has_sense_reporting()
  mtd: devices: docg3: check the return value of devm_ioremap() in the probe
  dyndbg: let query-modname override actual module name
  dyndbg: fix module.dyndbg handling
  RDMA/rxe: Fix the error caused by qp->sk
  RDMA/rxe: Fix "kernel NULL pointer dereference" error
  media: xilinx: vipp: Fix refcount leak in xvip_graph_dma_init
  tty: xilinx_uartps: Fix the ignore_status
  media: exynos4-is: fimc-is: Add of_node_put() when breaking out of loop
  HSI: omap_ssi_port: Fix dma_map_sg error check
  HSI: omap_ssi: Fix refcount leak in ssi_probe
  clk: tegra20: Fix refcount leak in tegra20_clock_init
  clk: tegra: Fix refcount leak in tegra114_clock_init
  clk: tegra: Fix refcount leak in tegra210_clock_init
  clk: berlin: Add of_node_put() for of_get_parent()
  clk: oxnas: Hold reference returned by of_get_parent()
  iio: ABI: Fix wrong format of differential capacitance channel ABI.
  iio: inkern: only release the device node when done with it
  iio: adc: at91-sama5d2_adc: check return status for pressure and touch
  iio: adc: at91-sama5d2_adc: fix AT91_SAMA5D2_MR_TRACKTIM_MAX
  ARM: dts: exynos: fix polarity of VBUS GPIO of Origen
  ARM: Drop CMDLINE_* dependency on ATAGS
  ARM: dts: exynos: correct s5k6a3 reset polarity on Midas family
  ARM: dts: kirkwood: lsxl: remove first ethernet port
  ARM: dts: kirkwood: lsxl: fix serial line
  ARM: dts: turris-omnia: Fix mpp26 pin name and comment
  soc: qcom: smem_state: Add refcounting for the 'state->of_node'
  soc: qcom: smsm: Fix refcount leak bugs in qcom_smsm_probe()
  memory: of: Fix refcount leak bug in of_get_ddr_timings()
  ASoC: wm5102: Fix PM disable depth imbalance in wm5102_probe
  ASoC: wm5110: Fix PM disable depth imbalance in wm5110_probe
  ASoC: wm8997: Fix PM disable depth imbalance in wm8997_probe
  mmc: wmt-sdmmc: Fix an error handling path in wmt_mci_probe()
  ALSA: dmaengine: increment buffer pointer atomically
  drm/msm/dpu: index dpu_kms->hw_vbif using vbif_idx
  ASoC: eureka-tlv320: Hold reference returned from of_find_xxx API
  mmc: au1xmmc: Fix an error handling path in au1xmmc_probe()
  drm/bridge: megachips: Fix a null pointer dereference bug
  platform/x86: msi-laptop: Fix resource cleanup
  platform/x86: msi-laptop: Fix old-ec check for backlight registering
  platform/chrome: fix double-free in chromeos_laptop_prepare()
  drm/mipi-dsi: Detach devices when removing the host
  drm: bridge: adv7511: fix CEC power down control register offset
  net: mvpp2: fix mvpp2 debugfs leak
  once: add DO_ONCE_SLOW() for sleepable contexts
  bnx2x: fix potential memory leak in bnx2x_tpa_stop()
  net: rds: don't hold sock lock when cancelling work from rds_tcp_reset_callbacks()
  tcp: fix tcp_cwnd_validate() to not forget is_cwnd_limited
  sctp: handle the error returned from sctp_auth_asoc_init_active_key
  mISDN: fix use-after-free bugs in l1oip timer handlers
  vhost/vsock: Use kvmalloc/kvfree for larger packets.
  spi: s3c64xx: Fix large transfers with DMA
  netfilter: nft_fib: Fix for rpath check with VRF devices
  spi/omap100k:Fix PM disable depth imbalance in omap1_spi100k_probe
  bpf: Ensure correct locking around vulnerable function find_vpid()
  net: fs_enet: Fix wrong check in do_pd_setup
  wifi: rtl8xxxu: gen2: Fix mistake in path B IQ calibration
  bpf: btf: fix truncated last_member_type_id in btf_struct_resolve
  wifi: rtl8xxxu: Fix skb misuse in TX queue selection
  spi: qup: add missing clk_disable_unprepare on error in spi_qup_pm_resume_runtime()
  spi: qup: add missing clk_disable_unprepare on error in spi_qup_resume()
  wifi: rtl8xxxu: tighten bounds checking in rtl8xxxu_read_efuse()
  spi: mt7621: Fix an error message in mt7621_spi_probe()
  bpftool: Fix a wrong type cast in btf_dumper_int
  wifi: mac80211: allow bw change during channel switch in mesh
  wifi: ath10k: add peer map clean up for peer delete in ath10k_sta_state()
  sh: machvec: Use char[] for section boundaries
  selinux: use "grep -E" instead of "egrep"
  KVM: nVMX: Unconditionally purge queued/injected events on nested "exit"
  KVM: x86/emulator: Fix handing of POP SS to correctly set interruptibility
  ring-buffer: Fix race between reset page and reading page
  ring-buffer: Check pending waiters when doing wake ups as well
  ring-buffer: Allow splice to read previous partially read pages
  ftrace: Properly unset FTRACE_HASH_FL_MOD
  livepatch: fix race between fork and KLP transition
  ext4: place buffer head allocation before handle start
  ext4: make ext4_lazyinit_thread freezable
  ext4: fix null-ptr-deref in ext4_write_info
  ext4: avoid crash when inline data creation follows DIO write
  nilfs2: fix use-after-free bug of struct nilfs_root
  riscv: fix build with binutils 2.38
  btrfs: fix race between quota enable and quota rescan ioctl
  fbdev: smscufx: Fix use-after-free in ufx_ops_open()
  PCI: Sanitise firmware BAR assignments behind a PCI-PCI bridge
  UM: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK
  riscv: Allow PROT_WRITE-only mmap()
  parisc: fbdev/stifb: Align graphics memory size to 4MB
  Revert "fs: check FMODE_LSEEK to control internal pipe splicing"
  regulator: qcom_rpm: Fix circular deferral regression
  quota: Check next/prev free block number after reading from quota file
  HID: multitouch: Add memory barriers
  fs: dlm: handle -EBUSY first in lock arg validation
  fs: dlm: fix race between test_bit() and queue_work()
  can: kvaser_usb_leaf: Fix CAN state after restart
  can: kvaser_usb_leaf: Fix TX queue out of sync after restart
  can: kvaser_usb_leaf: Fix overread with an invalid command
  can: kvaser_usb: Fix use of uninitialized completion
  usb: add quirks for Lenovo OneLink+ Dock
  iio: dac: ad5593r: Fix i2c read protocol requirements
  mtd: rawnand: atmel: Unmap streaming DMA mappings
  ALSA: hda/realtek: remove ALC289_FIXUP_DUAL_SPK for Dell 5530
  ALSA: usb-audio: Fix NULL dererence at error path
  ALSA: usb-audio: Fix potential memory leaks
  ALSA: rawmidi: Drop register_mutex in snd_rawmidi_free()
  ALSA: oss: Fix potential deadlock at unregistration
  Input: xpad - fix wireless 360 controller breaking after suspend
  Input: xpad - add supported devices as contributed on github
  wifi: mac80211_hwsim: avoid mac80211 warning on bad rate
  random: use expired timer rather than wq for mixing fast pool
  random: avoid reading two cache lines on irq randomness
  random: restore O_NONBLOCK support
  USB: serial: qcserial: add new usb-id for Dell branded EM7455
  scsi: stex: Properly zero out the passthrough command structure
  ALSA: hda: Fix position reporting on Poulsbo
  random: clamp credited irq bits to maximum mixed
  ceph: don't truncate file in atomic_open
  nilfs2: replace WARN_ONs by nilfs_error for checkpoint acquisition failure
  nilfs2: fix leak of nilfs_root in case of writer thread creation failure
  nilfs2: fix NULL pointer dereference at nilfs_bmap_lookup_at_level()
  rpmsg: qcom: glink: replace strncpy() with strscpy_pad()
  mmc: core: Terminate infinite loop in SD-UHS voltage switch
  mmc: core: Replace with already defined values for readability
  USB: serial: ftdi_sio: fix 300 bps rate for SIO
  usb: mon: make mmapped memory read only
  um: Cleanup compiler warning in arch/x86/um/tls_32.c
  um: Cleanup syscall_handler_t cast in syscalls_32.h
  net/ieee802154: fix uninit value bug in dgram_sendmsg
  scsi: qedf: Fix a UAF bug in __qedf_probe()
  ARM: dts: fix Moxa SDIO 'compatible', remove 'sdhci' misnomer
  dmaengine: xilinx_dma: Report error in case of dma_set_mask_and_coherent API failure
  dmaengine: xilinx_dma: cleanup for fetching xlnx,num-fstores property
  firmware: arm_scmi: Add SCMI PM driver remove routine
  fs: fix UAF/GPF bug in nilfs_mdt_destroy
  ARM: fix function graph tracer and unwinder dependencies
  docs: update mediator information in CoC docs
  Makefile.extrawarn: Move -Wcast-function-type-strict to W=1
  BACKPORT: arm64: compat: vdso: Use legacy syscalls as fallback
  ANDROID: Drop explicit 'CONFIG_INIT_STACK_ALL_ZERO=y' from gki_defconfig
  UPSTREAM: hardening: Remove Clang's enable flag for -ftrivial-auto-var-init=zero
  UPSTREAM: hardening: Avoid harmless Clang option under CONFIG_INIT_STACK_ALL_ZERO
  UPSTREAM: hardening: Clarify Kconfig text for auto-var-init
  ANDROID: Fix kenelci build-break for !CONFIG_PERF_EVENTS
  UPSTREAM: f2fs: guarantee to write dirty data when enabling checkpoint back

 Conflicts:
	arch/arm64/include/asm/cpucaps.h
	arch/arm64/kernel/cpu_errata.c
	drivers/rpmsg/qcom_glink_native.c
	scripts/Makefile.extrawarn

Change-Id: I88d2e91d5148d4d7ccd442213795c7544ecd8b0b
This commit is contained in:
Michael Bestas 2022-11-24 03:35:09 +02:00
commit 8a4226a21a
No known key found for this signature in database
GPG key ID: CC95044519BE6669
302 changed files with 2226 additions and 987 deletions

View file

@ -135,7 +135,7 @@ Description:
Raw capacitance measurement from channel Y. Units after Raw capacitance measurement from channel Y. Units after
application of scale and offset are nanofarads. application of scale and offset are nanofarads.
What: /sys/.../iio:deviceX/in_capacitanceY-in_capacitanceZ_raw What: /sys/.../iio:deviceX/in_capacitanceY-capacitanceZ_raw
KernelVersion: 3.2 KernelVersion: 3.2
Contact: linux-iio@vger.kernel.org Contact: linux-iio@vger.kernel.org
Description: Description:

View file

@ -55,7 +55,9 @@ stable kernels.
| ARM | Cortex-A57 | #832075 | ARM64_ERRATUM_832075 | | ARM | Cortex-A57 | #832075 | ARM64_ERRATUM_832075 |
| ARM | Cortex-A57 | #852523 | N/A | | ARM | Cortex-A57 | #852523 | N/A |
| ARM | Cortex-A57 | #834220 | ARM64_ERRATUM_834220 | | ARM | Cortex-A57 | #834220 | ARM64_ERRATUM_834220 |
| ARM | Cortex-A57 | #1742098 | ARM64_ERRATUM_1742098 |
| ARM | Cortex-A72 | #853709 | N/A | | ARM | Cortex-A72 | #853709 | N/A |
| ARM | Cortex-A72 | #1655431 | ARM64_ERRATUM_1742098 |
| ARM | Cortex-A73 | #858921 | ARM64_ERRATUM_858921 | | ARM | Cortex-A73 | #858921 | ARM64_ERRATUM_858921 |
| ARM | Cortex-A55 | #1024718 | ARM64_ERRATUM_1024718 | | ARM | Cortex-A55 | #1024718 | ARM64_ERRATUM_1024718 |
| ARM | Cortex-A76 | #1463225 | ARM64_ERRATUM_1463225 | | ARM | Cortex-A76 | #1463225 | ARM64_ERRATUM_1463225 |

View file

@ -51,7 +51,7 @@ the Technical Advisory Board (TAB) or other maintainers if you're
uncertain how to handle situations that come up. It will not be uncertain how to handle situations that come up. It will not be
considered a violation report unless you want it to be. If you are considered a violation report unless you want it to be. If you are
uncertain about approaching the TAB or any other maintainers, please uncertain about approaching the TAB or any other maintainers, please
reach out to our conflict mediator, Mishi Choudhary <mishi@linux.com>. reach out to our conflict mediator, Joanna Lee <joanna.lee@gesmer.com>.
In the end, "be kind to each other" is really what the end goal is for In the end, "be kind to each other" is really what the end goal is for
everybody. We know everyone is human and we all fail at times, but the everybody. We know everyone is human and we all fail at times, but the

View file

@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
VERSION = 4 VERSION = 4
PATCHLEVEL = 19 PATCHLEVEL = 19
SUBLEVEL = 261 SUBLEVEL = 264
EXTRAVERSION = EXTRAVERSION =
NAME = "People's Front" NAME = "People's Front"
@ -783,12 +783,12 @@ endif
# Initialize all stack variables with a zero value. # Initialize all stack variables with a zero value.
ifdef CONFIG_INIT_STACK_ALL_ZERO ifdef CONFIG_INIT_STACK_ALL_ZERO
# Future support for zero initialization is still being debated, see
# https://bugs.llvm.org/show_bug.cgi?id=45497. These flags are subject to being
# renamed or dropped.
KBUILD_CFLAGS += -ftrivial-auto-var-init=zero KBUILD_CFLAGS += -ftrivial-auto-var-init=zero
ifdef CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO_ENABLER
# https://github.com/llvm/llvm-project/issues/44842
KBUILD_CFLAGS += -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang KBUILD_CFLAGS += -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang
endif endif
endif
KBUILD_CFLAGS += $(call cc-option, -fno-var-tracking-assignments) KBUILD_CFLAGS += $(call cc-option, -fno-var-tracking-assignments)
@ -800,7 +800,9 @@ KBUILD_CFLAGS += $(call cc-option, -gsplit-dwarf, -g)
else else
KBUILD_CFLAGS += -g KBUILD_CFLAGS += -g
endif endif
ifneq ($(LLVM_IAS),1) ifeq ($(LLVM_IAS),1)
KBUILD_AFLAGS += -g
else
KBUILD_AFLAGS += -Wa,-gdwarf-2 KBUILD_AFLAGS += -Wa,-gdwarf-2
endif endif
endif endif

View file

@ -35,7 +35,7 @@ static inline void ioport_unmap(void __iomem *addr)
{ {
} }
extern void iounmap(const void __iomem *addr); extern void iounmap(const volatile void __iomem *addr);
#define ioremap_nocache(phy, sz) ioremap(phy, sz) #define ioremap_nocache(phy, sz) ioremap(phy, sz)
#define ioremap_wc(phy, sz) ioremap(phy, sz) #define ioremap_wc(phy, sz) ioremap(phy, sz)

View file

@ -95,7 +95,7 @@ void __iomem *ioremap_prot(phys_addr_t paddr, unsigned long size,
EXPORT_SYMBOL(ioremap_prot); EXPORT_SYMBOL(ioremap_prot);
void iounmap(const void __iomem *addr) void iounmap(const volatile void __iomem *addr)
{ {
/* weird double cast to handle phys_addr_t > 32 bits */ /* weird double cast to handle phys_addr_t > 32 bits */
if (arc_uncached_addr_space((phys_addr_t)(u32)addr)) if (arc_uncached_addr_space((phys_addr_t)(u32)addr))

View file

@ -69,7 +69,7 @@ config ARM
select HAVE_EFFICIENT_UNALIGNED_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && MMU select HAVE_EFFICIENT_UNALIGNED_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && MMU
select HAVE_EXIT_THREAD select HAVE_EXIT_THREAD
select HAVE_FTRACE_MCOUNT_RECORD if (!XIP_KERNEL) select HAVE_FTRACE_MCOUNT_RECORD if (!XIP_KERNEL)
select HAVE_FUNCTION_GRAPH_TRACER if (!THUMB2_KERNEL) select HAVE_FUNCTION_GRAPH_TRACER if (!THUMB2_KERNEL && !CC_IS_CLANG)
select HAVE_FUNCTION_TRACER if (!XIP_KERNEL) && (CC_IS_GCC || CLANG_VERSION >= 100000) select HAVE_FUNCTION_TRACER if (!XIP_KERNEL) && (CC_IS_GCC || CLANG_VERSION >= 100000)
select HAVE_FUTEX_CMPXCHG if FUTEX select HAVE_FUTEX_CMPXCHG if FUTEX
select HAVE_GCC_PLUGINS select HAVE_GCC_PLUGINS
@ -2017,7 +2017,6 @@ config CMDLINE
choice choice
prompt "Kernel command line type" if CMDLINE != "" prompt "Kernel command line type" if CMDLINE != ""
default CMDLINE_FROM_BOOTLOADER default CMDLINE_FROM_BOOTLOADER
depends on ATAGS
config CMDLINE_FROM_BOOTLOADER config CMDLINE_FROM_BOOTLOADER
bool "Use bootloader kernel arguments if available" bool "Use bootloader kernel arguments if available"

View file

@ -70,11 +70,6 @@ config ARM_UNWIND
the performance is not affected. Currently, this feature the performance is not affected. Currently, this feature
only works with EABI compilers. If unsure say Y. only works with EABI compilers. If unsure say Y.
config OLD_MCOUNT
bool
depends on FUNCTION_TRACER && FRAME_POINTER
default y
config DEBUG_USER config DEBUG_USER
bool "Verbose user fault messages" bool "Verbose user fault messages"
help help

View file

@ -307,7 +307,7 @@
marvell,function = "spi0"; marvell,function = "spi0";
}; };
spi0cs1_pins: spi0cs1-pins { spi0cs2_pins: spi0cs2-pins {
marvell,pins = "mpp26"; marvell,pins = "mpp26";
marvell,function = "spi0"; marvell,function = "spi0";
}; };
@ -342,7 +342,7 @@
}; };
}; };
/* MISO, MOSI, SCLK and CS1 are routed to pin header CN11 */ /* MISO, MOSI, SCLK and CS2 are routed to pin header CN11 */
}; };
&uart0 { &uart0 {

View file

@ -525,7 +525,7 @@
clocks = <&camera 1>; clocks = <&camera 1>;
clock-names = "extclk"; clock-names = "extclk";
samsung,camclk-out = <1>; samsung,camclk-out = <1>;
gpios = <&gpm1 6 GPIO_ACTIVE_HIGH>; gpios = <&gpm1 6 GPIO_ACTIVE_LOW>;
port { port {
is_s5k6a3_ep: endpoint { is_s5k6a3_ep: endpoint {

View file

@ -87,7 +87,7 @@
}; };
&ehci { &ehci {
samsung,vbus-gpio = <&gpx3 5 1>; samsung,vbus-gpio = <&gpx3 5 GPIO_ACTIVE_HIGH>;
status = "okay"; status = "okay";
port@1 { port@1 {

View file

@ -81,6 +81,9 @@
ocram: sram@900000 { ocram: sram@900000 {
compatible = "mmio-sram"; compatible = "mmio-sram";
reg = <0x00900000 0x20000>; reg = <0x00900000 0x20000>;
ranges = <0 0x00900000 0x20000>;
#address-cells = <1>;
#size-cells = <1>;
clocks = <&clks IMX6QDL_CLK_OCRAM>; clocks = <&clks IMX6QDL_CLK_OCRAM>;
}; };

View file

@ -158,6 +158,9 @@
ocram: sram@900000 { ocram: sram@900000 {
compatible = "mmio-sram"; compatible = "mmio-sram";
reg = <0x00900000 0x40000>; reg = <0x00900000 0x40000>;
ranges = <0 0x00900000 0x40000>;
#address-cells = <1>;
#size-cells = <1>;
clocks = <&clks IMX6QDL_CLK_OCRAM>; clocks = <&clks IMX6QDL_CLK_OCRAM>;
}; };

View file

@ -9,12 +9,18 @@
ocram2: sram@940000 { ocram2: sram@940000 {
compatible = "mmio-sram"; compatible = "mmio-sram";
reg = <0x00940000 0x20000>; reg = <0x00940000 0x20000>;
ranges = <0 0x00940000 0x20000>;
#address-cells = <1>;
#size-cells = <1>;
clocks = <&clks IMX6QDL_CLK_OCRAM>; clocks = <&clks IMX6QDL_CLK_OCRAM>;
}; };
ocram3: sram@960000 { ocram3: sram@960000 {
compatible = "mmio-sram"; compatible = "mmio-sram";
reg = <0x00960000 0x20000>; reg = <0x00960000 0x20000>;
ranges = <0 0x00960000 0x20000>;
#address-cells = <1>;
#size-cells = <1>;
clocks = <&clks IMX6QDL_CLK_OCRAM>; clocks = <&clks IMX6QDL_CLK_OCRAM>;
}; };

View file

@ -118,6 +118,9 @@
ocram: sram@900000 { ocram: sram@900000 {
compatible = "mmio-sram"; compatible = "mmio-sram";
reg = <0x00900000 0x20000>; reg = <0x00900000 0x20000>;
ranges = <0 0x00900000 0x20000>;
#address-cells = <1>;
#size-cells = <1>;
clocks = <&clks IMX6SL_CLK_OCRAM>; clocks = <&clks IMX6SL_CLK_OCRAM>;
}; };

View file

@ -131,6 +131,9 @@
ocram: sram@900000 { ocram: sram@900000 {
compatible = "mmio-sram"; compatible = "mmio-sram";
reg = <0x00900000 0x20000>; reg = <0x00900000 0x20000>;
ranges = <0 0x00900000 0x20000>;
#address-cells = <1>;
#size-cells = <1>;
}; };
L2: l2-cache@a02000 { L2: l2-cache@a02000 {

View file

@ -167,12 +167,18 @@
ocram_s: sram@8f8000 { ocram_s: sram@8f8000 {
compatible = "mmio-sram"; compatible = "mmio-sram";
reg = <0x008f8000 0x4000>; reg = <0x008f8000 0x4000>;
ranges = <0 0x008f8000 0x4000>;
#address-cells = <1>;
#size-cells = <1>;
clocks = <&clks IMX6SX_CLK_OCRAM_S>; clocks = <&clks IMX6SX_CLK_OCRAM_S>;
}; };
ocram: sram@900000 { ocram: sram@900000 {
compatible = "mmio-sram"; compatible = "mmio-sram";
reg = <0x00900000 0x20000>; reg = <0x00900000 0x20000>;
ranges = <0 0x00900000 0x20000>;
#address-cells = <1>;
#size-cells = <1>;
clocks = <&clks IMX6SX_CLK_OCRAM>; clocks = <&clks IMX6SX_CLK_OCRAM>;
}; };

View file

@ -163,12 +163,7 @@
interrupt-parent = <&gpio2>; interrupt-parent = <&gpio2>;
interrupts = <29 0>; interrupts = <29 0>;
pendown-gpio = <&gpio2 29 GPIO_ACTIVE_HIGH>; pendown-gpio = <&gpio2 29 GPIO_ACTIVE_HIGH>;
ti,x-min = /bits/ 16 <0>; touchscreen-max-pressure = <255>;
ti,x-max = /bits/ 16 <0>;
ti,y-min = /bits/ 16 <0>;
ti,y-max = /bits/ 16 <0>;
ti,pressure-max = /bits/ 16 <0>;
ti,x-plate-ohms = /bits/ 16 <400>;
wakeup-source; wakeup-source;
}; };
}; };

View file

@ -10,6 +10,11 @@
ocp@f1000000 { ocp@f1000000 {
pinctrl: pin-controller@10000 { pinctrl: pin-controller@10000 {
/* Non-default UART pins */
pmx_uart0: pmx-uart0 {
marvell,pins = "mpp4", "mpp5";
};
pmx_power_hdd: pmx-power-hdd { pmx_power_hdd: pmx-power-hdd {
marvell,pins = "mpp10"; marvell,pins = "mpp10";
marvell,function = "gpo"; marvell,function = "gpo";
@ -213,22 +218,11 @@
&mdio { &mdio {
status = "okay"; status = "okay";
ethphy0: ethernet-phy@0 {
reg = <0>;
};
ethphy1: ethernet-phy@8 { ethphy1: ethernet-phy@8 {
reg = <8>; reg = <8>;
}; };
}; };
&eth0 {
status = "okay";
ethernet0-port@0 {
phy-handle = <&ethphy0>;
};
};
&eth1 { &eth1 {
status = "okay"; status = "okay";
ethernet1-port@0 { ethernet1-port@0 {

View file

@ -80,7 +80,7 @@
clocks = <&ref12>; clocks = <&ref12>;
}; };
&sdhci { &mmc {
status = "okay"; status = "okay";
}; };

View file

@ -93,8 +93,8 @@
clock-names = "PCLK"; clock-names = "PCLK";
}; };
sdhci: sdhci@98e00000 { mmc: mmc@98e00000 {
compatible = "moxa,moxart-sdhci"; compatible = "moxa,moxart-mmc";
reg = <0x98e00000 0x5C>; reg = <0x98e00000 0x5C>;
interrupts = <5 IRQ_TYPE_LEVEL_HIGH>; interrupts = <5 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk_apb>; clocks = <&clk_apb>;

View file

@ -16,9 +16,6 @@ extern void __gnu_mcount_nc(void);
#ifdef CONFIG_DYNAMIC_FTRACE #ifdef CONFIG_DYNAMIC_FTRACE
struct dyn_arch_ftrace { struct dyn_arch_ftrace {
#ifdef CONFIG_OLD_MCOUNT
bool old_mcount;
#endif
#ifdef CONFIG_ARM_MODULE_PLTS #ifdef CONFIG_ARM_MODULE_PLTS
struct module *mod; struct module *mod;
#endif #endif

View file

@ -167,9 +167,6 @@ EXPORT_SYMBOL(_find_next_bit_be);
#endif #endif
#ifdef CONFIG_FUNCTION_TRACER #ifdef CONFIG_FUNCTION_TRACER
#ifdef CONFIG_OLD_MCOUNT
EXPORT_SYMBOL(mcount);
#endif
EXPORT_SYMBOL(__gnu_mcount_nc); EXPORT_SYMBOL(__gnu_mcount_nc);
#endif #endif

View file

@ -15,23 +15,8 @@
* start of every function. In mcount, apart from the function's address (in * start of every function. In mcount, apart from the function's address (in
* lr), we need to get hold of the function's caller's address. * lr), we need to get hold of the function's caller's address.
* *
* Older GCCs (pre-4.4) inserted a call to a routine called mcount like this: * Newer GCCs (4.4+) solve this problem by using a version of mcount with call
* * sites like:
* bl mcount
*
* These versions have the limitation that in order for the mcount routine to
* be able to determine the function's caller's address, an APCS-style frame
* pointer (which is set up with something like the code below) is required.
*
* mov ip, sp
* push {fp, ip, lr, pc}
* sub fp, ip, #4
*
* With EABI, these frame pointers are not available unless -mapcs-frame is
* specified, and if building as Thumb-2, not even then.
*
* Newer GCCs (4.4+) solve this problem by introducing a new version of mcount,
* with call sites like:
* *
* push {lr} * push {lr}
* bl __gnu_mcount_nc * bl __gnu_mcount_nc
@ -46,17 +31,10 @@
* allows it to be clobbered in subroutines and doesn't use it to hold * allows it to be clobbered in subroutines and doesn't use it to hold
* parameters.) * parameters.)
* *
* When using dynamic ftrace, we patch out the mcount call by a "mov r0, r0" * When using dynamic ftrace, we patch out the mcount call by a "pop {lr}"
* for the mcount case, and a "pop {lr}" for the __gnu_mcount_nc case (see * instead of the __gnu_mcount_nc call (see arch/arm/kernel/ftrace.c).
* arch/arm/kernel/ftrace.c).
*/ */
#ifndef CONFIG_OLD_MCOUNT
#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4))
#error Ftrace requires CONFIG_FRAME_POINTER=y with GCC older than 4.4.0.
#endif
#endif
.macro mcount_adjust_addr rd, rn .macro mcount_adjust_addr rd, rn
bic \rd, \rn, #1 @ clear the Thumb bit if present bic \rd, \rn, #1 @ clear the Thumb bit if present
sub \rd, \rd, #MCOUNT_INSN_SIZE sub \rd, \rd, #MCOUNT_INSN_SIZE
@ -209,51 +187,6 @@ ftrace_graph_call\suffix:
mcount_exit mcount_exit
.endm .endm
#ifdef CONFIG_OLD_MCOUNT
/*
* mcount
*/
.macro mcount_enter
stmdb sp!, {r0-r3, lr}
.endm
.macro mcount_get_lr reg
ldr \reg, [fp, #-4]
.endm
.macro mcount_exit
ldr lr, [fp, #-4]
ldmia sp!, {r0-r3, pc}
.endm
ENTRY(mcount)
#ifdef CONFIG_DYNAMIC_FTRACE
stmdb sp!, {lr}
ldr lr, [fp, #-4]
ldmia sp!, {pc}
#else
__mcount _old
#endif
ENDPROC(mcount)
#ifdef CONFIG_DYNAMIC_FTRACE
ENTRY(ftrace_caller_old)
__ftrace_caller _old
ENDPROC(ftrace_caller_old)
#endif
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
ENTRY(ftrace_graph_caller_old)
__ftrace_graph_caller
ENDPROC(ftrace_graph_caller_old)
#endif
.purgem mcount_enter
.purgem mcount_get_lr
.purgem mcount_exit
#endif
/* /*
* __gnu_mcount_nc * __gnu_mcount_nc
*/ */

View file

@ -47,30 +47,6 @@ void arch_ftrace_update_code(int command)
stop_machine(__ftrace_modify_code, &command, NULL); stop_machine(__ftrace_modify_code, &command, NULL);
} }
#ifdef CONFIG_OLD_MCOUNT
#define OLD_MCOUNT_ADDR ((unsigned long) mcount)
#define OLD_FTRACE_ADDR ((unsigned long) ftrace_caller_old)
#define OLD_NOP 0xe1a00000 /* mov r0, r0 */
static unsigned long ftrace_nop_replace(struct dyn_ftrace *rec)
{
return rec->arch.old_mcount ? OLD_NOP : NOP;
}
static unsigned long adjust_address(struct dyn_ftrace *rec, unsigned long addr)
{
if (!rec->arch.old_mcount)
return addr;
if (addr == MCOUNT_ADDR)
addr = OLD_MCOUNT_ADDR;
else if (addr == FTRACE_ADDR)
addr = OLD_FTRACE_ADDR;
return addr;
}
#else
static unsigned long ftrace_nop_replace(struct dyn_ftrace *rec) static unsigned long ftrace_nop_replace(struct dyn_ftrace *rec)
{ {
return NOP; return NOP;
@ -80,7 +56,6 @@ static unsigned long adjust_address(struct dyn_ftrace *rec, unsigned long addr)
{ {
return addr; return addr;
} }
#endif
int ftrace_arch_code_modify_prepare(void) int ftrace_arch_code_modify_prepare(void)
{ {
@ -151,15 +126,6 @@ int ftrace_update_ftrace_func(ftrace_func_t func)
} }
#endif #endif
#ifdef CONFIG_OLD_MCOUNT
if (!ret) {
pc = (unsigned long)&ftrace_call_old;
new = ftrace_call_replace(pc, (unsigned long)func, true);
ret = ftrace_modify_code(pc, 0, new, false);
}
#endif
return ret; return ret;
} }
@ -233,16 +199,6 @@ int ftrace_make_nop(struct module *mod,
new = ftrace_nop_replace(rec); new = ftrace_nop_replace(rec);
ret = ftrace_modify_code(ip, old, new, true); ret = ftrace_modify_code(ip, old, new, true);
#ifdef CONFIG_OLD_MCOUNT
if (ret == -EINVAL && addr == MCOUNT_ADDR) {
rec->arch.old_mcount = true;
old = ftrace_call_replace(ip, adjust_address(rec, addr), true);
new = ftrace_nop_replace(rec);
ret = ftrace_modify_code(ip, old, new, true);
}
#endif
return ret; return ret;
} }
@ -305,13 +261,6 @@ static int ftrace_modify_graph_caller(bool enable)
#endif #endif
#ifdef CONFIG_OLD_MCOUNT
if (!ret)
ret = __ftrace_modify_caller(&ftrace_graph_call_old,
ftrace_graph_caller_old,
enable);
#endif
return ret; return ret;
} }

View file

@ -563,6 +563,22 @@ config ARM64_ERRATUM_1542419
If unsure, say Y. If unsure, say Y.
config ARM64_ERRATUM_1742098
bool "Cortex-A57/A72: 1742098: ELR recorded incorrectly on interrupt taken between cryptographic instructions in a sequence"
depends on COMPAT
default y
help
This option removes the AES hwcap for aarch32 user-space to
workaround erratum 1742098 on Cortex-A57 and Cortex-A72.
Affected parts may corrupt the AES state if an interrupt is
taken between a pair of AES instructions. These instructions
are only present if the cryptography extensions are present.
All software should have a fallback implementation for CPUs
that don't implement the cryptography extensions.
If unsure, say Y.
config CAVIUM_ERRATUM_22375 config CAVIUM_ERRATUM_22375
bool "Cavium erratum 22375, 24313" bool "Cavium erratum 22375, 24313"
default y default y

View file

@ -34,8 +34,8 @@ Example:
Use specific request line passing from dma Use specific request line passing from dma
For example, MMC request line is 5 For example, MMC request line is 5
sdhci: sdhci@98e00000 { mmc: mmc@98e00000 {
compatible = "moxa,moxart-sdhci"; compatible = "moxa,moxart-mmc";
reg = <0x98e00000 0x5C>; reg = <0x98e00000 0x5C>;
interrupts = <5 0>; interrupts = <5 0>;
clocks = <&clk_apb>; clocks = <&clk_apb>;

View file

@ -495,7 +495,6 @@ CONFIG_HARDENED_USERCOPY=y
CONFIG_STATIC_USERMODEHELPER=y CONFIG_STATIC_USERMODEHELPER=y
CONFIG_STATIC_USERMODEHELPER_PATH="" CONFIG_STATIC_USERMODEHELPER_PATH=""
CONFIG_SECURITY_SELINUX=y CONFIG_SECURITY_SELINUX=y
CONFIG_INIT_STACK_ALL_ZERO=y
CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y
CONFIG_CRYPTO_ADIANTUM=y CONFIG_CRYPTO_ADIANTUM=y
CONFIG_CRYPTO_BLAKE2B=y CONFIG_CRYPTO_BLAKE2B=y

View file

@ -57,8 +57,9 @@
#define ARM64_WORKAROUND_1542418 36 #define ARM64_WORKAROUND_1542418 36
#define ARM64_WORKAROUND_1542419 37 #define ARM64_WORKAROUND_1542419 37
#define ARM64_SPECTRE_BHB 38 #define ARM64_SPECTRE_BHB 38
#define ARM64_WORKAROUND_1742098 39
/* kabi: reserve 39 - 62 for future cpu capabilities */ /* kabi: reserve 40 - 62 for future cpu capabilities */
#define ARM64_NCAPS 62 #define ARM64_NCAPS 62
#endif /* __ASM_CPUCAPS_H */ #endif /* __ASM_CPUCAPS_H */

View file

@ -20,6 +20,8 @@
#define BUILD_VDSO32 1 #define BUILD_VDSO32 1
#define VDSO_HAS_32BIT_FALLBACK 1
static __always_inline static __always_inline
int gettimeofday_fallback(struct __kernel_old_timeval *_tv, int gettimeofday_fallback(struct __kernel_old_timeval *_tv,
struct timezone *_tz) struct timezone *_tz)
@ -55,6 +57,23 @@ long clock_gettime_fallback(clockid_t _clkid, struct __kernel_timespec *_ts)
return ret; return ret;
} }
static __always_inline
long clock_gettime32_fallback(clockid_t _clkid, struct old_timespec32 *_ts)
{
register struct old_timespec32 *ts asm("r1") = _ts;
register clockid_t clkid asm("r0") = _clkid;
register long ret asm ("r0");
register long nr asm("r7") = __NR_compat_clock_gettime;
asm volatile(
" swi #0\n"
: "=r" (ret)
: "r" (clkid), "r" (ts), "r" (nr)
: "memory");
return ret;
}
static __always_inline static __always_inline
int clock_getres_fallback(clockid_t _clkid, struct __kernel_timespec *_ts) int clock_getres_fallback(clockid_t _clkid, struct __kernel_timespec *_ts)
{ {
@ -72,6 +91,27 @@ int clock_getres_fallback(clockid_t _clkid, struct __kernel_timespec *_ts)
return ret; return ret;
} }
static __always_inline
int clock_getres32_fallback(clockid_t _clkid, struct old_timespec32 *_ts)
{
register struct old_timespec32 *ts asm("r1") = _ts;
register clockid_t clkid asm("r0") = _clkid;
register long ret asm ("r0");
register long nr asm("r7") = __NR_compat_clock_getres;
/* The checks below are required for ABI consistency with arm */
if ((_clkid >= MAX_CLOCKS) && (_ts == NULL))
return -EINVAL;
asm volatile(
" swi #0\n"
: "=r" (ret)
: "r" (clkid), "r" (ts), "r" (nr)
: "memory");
return ret;
}
static __always_inline u64 __arch_get_hw_counter(s32 clock_mode) static __always_inline u64 __arch_get_hw_counter(s32 clock_mode)
{ {
u64 res; u64 res;

View file

@ -732,6 +732,14 @@ static const struct midr_range arm64_workaround_845719_cpus[] = {
#endif #endif
#ifdef CONFIG_ARM64_ERRATUM_1742098
static struct midr_range broken_aarch32_aes[] = {
MIDR_RANGE(MIDR_CORTEX_A57, 0, 1, 0xf, 0xf),
MIDR_ALL_VERSIONS(MIDR_CORTEX_A72),
{},
};
#endif
const struct arm64_cpu_capabilities arm64_errata[] = { const struct arm64_cpu_capabilities arm64_errata[] = {
#if defined(CONFIG_ARM64_ERRATUM_826319) || \ #if defined(CONFIG_ARM64_ERRATUM_826319) || \
defined(CONFIG_ARM64_ERRATUM_827319) || \ defined(CONFIG_ARM64_ERRATUM_827319) || \
@ -945,6 +953,14 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
.matches = has_neoverse_n1_erratum_1542419, .matches = has_neoverse_n1_erratum_1542419,
.cpu_enable = cpu_enable_trap_ctr_access, .cpu_enable = cpu_enable_trap_ctr_access,
}, },
#endif
#ifdef CONFIG_ARM64_ERRATUM_1742098
{
.desc = "ARM erratum 1742098",
.capability = ARM64_WORKAROUND_1742098,
CAP_MIDR_RANGE_LIST(broken_aarch32_aes),
.type = ARM64_CPUCAP_LOCAL_CPU_ERRATUM,
},
#endif #endif
{ {
} }

View file

@ -31,6 +31,7 @@
#include <asm/cpufeature.h> #include <asm/cpufeature.h>
#include <asm/cpu_ops.h> #include <asm/cpu_ops.h>
#include <asm/fpsimd.h> #include <asm/fpsimd.h>
#include <asm/hwcap.h>
#include <asm/mmu_context.h> #include <asm/mmu_context.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/sysreg.h> #include <asm/sysreg.h>
@ -1156,6 +1157,14 @@ static void cpu_enable_ssbs(const struct arm64_cpu_capabilities *__unused)
} }
#endif /* CONFIG_ARM64_SSBD */ #endif /* CONFIG_ARM64_SSBD */
static void elf_hwcap_fixup(void)
{
#ifdef CONFIG_ARM64_ERRATUM_1742098
if (cpus_have_const_cap(ARM64_WORKAROUND_1742098))
compat_elf_hwcap2 &= ~COMPAT_HWCAP2_AES;
#endif /* ARM64_ERRATUM_1742098 */
}
static const struct arm64_cpu_capabilities arm64_features[] = { static const struct arm64_cpu_capabilities arm64_features[] = {
{ {
.desc = "GIC system register CPU interface", .desc = "GIC system register CPU interface",
@ -1804,8 +1813,10 @@ void __init setup_cpu_features(void)
mark_const_caps_ready(); mark_const_caps_ready();
setup_elf_hwcaps(arm64_elf_hwcaps); setup_elf_hwcaps(arm64_elf_hwcaps);
if (system_supports_32bit_el0()) if (system_supports_32bit_el0()) {
setup_elf_hwcaps(compat_elf_hwcaps); setup_elf_hwcaps(compat_elf_hwcaps);
elf_hwcap_fixup();
}
if (system_uses_ttbr0_pan()) if (system_uses_ttbr0_pan())
pr_info("emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching\n"); pr_info("emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching\n");

View file

@ -85,7 +85,7 @@ static __init void prom_init_mem(void)
pr_debug("Assume 128MB RAM\n"); pr_debug("Assume 128MB RAM\n");
break; break;
} }
if (!memcmp(prom_init, prom_init + mem, 32)) if (!memcmp((void *)prom_init, (void *)prom_init + mem, 32))
break; break;
} }
lowmem = mem; lowmem = mem;
@ -162,7 +162,7 @@ void __init bcm47xx_prom_highmem_init(void)
off = EXTVBASE + __pa(off); off = EXTVBASE + __pa(off);
for (extmem = 128 << 20; extmem < 512 << 20; extmem <<= 1) { for (extmem = 128 << 20; extmem < 512 << 20; extmem <<= 1) {
if (!memcmp(prom_init, (void *)(off + extmem), 16)) if (!memcmp((void *)prom_init, (void *)(off + extmem), 16))
break; break;
} }
extmem -= lowmem; extmem -= lowmem;

View file

@ -165,7 +165,7 @@ CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=power8
CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power9,-mtune=power8) CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power9,-mtune=power8)
else else
CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power7,$(call cc-option,-mtune=power5)) CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power7,$(call cc-option,-mtune=power5))
CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mcpu=power5,-mcpu=power4) CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=power4
endif endif
else ifdef CONFIG_PPC_BOOK3E_64 else ifdef CONFIG_PPC_BOOK3E_64
CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=powerpc64 CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=powerpc64

View file

@ -0,0 +1,51 @@
/*
* e500v1 Power ISA Device Tree Source (include)
*
* Copyright 2012 Freescale Semiconductor Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of Freescale Semiconductor nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* ALTERNATIVELY, this software may be distributed under the terms of the
* GNU General Public License ("GPL") as published by the Free Software
* Foundation, either version 2 of that License or (at your option) any
* later version.
*
* THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/ {
cpus {
power-isa-version = "2.03";
power-isa-b; // Base
power-isa-e; // Embedded
power-isa-atb; // Alternate Time Base
power-isa-cs; // Cache Specification
power-isa-e.le; // Embedded.Little-Endian
power-isa-e.pm; // Embedded.Performance Monitor
power-isa-ecl; // Embedded Cache Locking
power-isa-mmc; // Memory Coherence
power-isa-sp; // Signal Processing Engine
power-isa-sp.fs; // SPE.Embedded Float Scalar Single
power-isa-sp.fv; // SPE.Embedded Float Vector
mmu-type = "power-embedded";
};
};

View file

@ -11,7 +11,7 @@
/dts-v1/; /dts-v1/;
/include/ "e500v2_power_isa.dtsi" /include/ "e500v1_power_isa.dtsi"
/ { / {
model = "MPC8540ADS"; model = "MPC8540ADS";

View file

@ -11,7 +11,7 @@
/dts-v1/; /dts-v1/;
/include/ "e500v2_power_isa.dtsi" /include/ "e500v1_power_isa.dtsi"
/ { / {
model = "MPC8541CDS"; model = "MPC8541CDS";

View file

@ -11,7 +11,7 @@
/dts-v1/; /dts-v1/;
/include/ "e500v2_power_isa.dtsi" /include/ "e500v1_power_isa.dtsi"
/ { / {
model = "MPC8555CDS"; model = "MPC8555CDS";

View file

@ -11,7 +11,7 @@
/dts-v1/; /dts-v1/;
/include/ "e500v2_power_isa.dtsi" /include/ "e500v1_power_isa.dtsi"
/ { / {
model = "MPC8560ADS"; model = "MPC8560ADS";

View file

@ -338,6 +338,7 @@ struct pci_dn *pci_add_device_node_info(struct pci_controller *hose,
INIT_LIST_HEAD(&pdn->list); INIT_LIST_HEAD(&pdn->list);
parent = of_get_parent(dn); parent = of_get_parent(dn);
pdn->parent = parent ? PCI_DN(parent) : NULL; pdn->parent = parent ? PCI_DN(parent) : NULL;
of_node_put(parent);
if (pdn->parent) if (pdn->parent)
list_add_tail(&pdn->list, &pdn->parent->child_list); list_add_tail(&pdn->list, &pdn->parent->child_list);

View file

@ -21,6 +21,7 @@
#include <linux/types.h> #include <linux/types.h>
#include <linux/prctl.h> #include <linux/prctl.h>
#include <linux/module.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include <asm/reg.h> #include <asm/reg.h>

View file

@ -740,6 +740,7 @@ static void opal_export_attrs(void)
kobj = kobject_create_and_add("exports", opal_kobj); kobj = kobject_create_and_add("exports", opal_kobj);
if (!kobj) { if (!kobj) {
pr_warn("kobject_create_and_add() of exports failed\n"); pr_warn("kobject_create_and_add() of exports failed\n");
of_node_put(np);
return; return;
} }

View file

@ -216,8 +216,10 @@ static int fsl_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
dev_err(&pdev->dev, dev_err(&pdev->dev,
"node %pOF has an invalid fsl,msi phandle %u\n", "node %pOF has an invalid fsl,msi phandle %u\n",
hose->dn, np->phandle); hose->dn, np->phandle);
of_node_put(np);
return -EINVAL; return -EINVAL;
} }
of_node_put(np);
} }
for_each_pci_msi_entry(entry, pdev) { for_each_pci_msi_entry(entry, pdev) {

View file

@ -49,9 +49,16 @@ ifeq ($(CONFIG_RISCV_ISA_C),y)
KBUILD_ARCH_C = c KBUILD_ARCH_C = c
endif endif
KBUILD_AFLAGS += -march=$(KBUILD_MARCH)$(KBUILD_ARCH_A)fd$(KBUILD_ARCH_C) # Newer binutils versions default to ISA spec version 20191213 which moves some
# instructions from the I extension to the Zicsr and Zifencei extensions.
toolchain-need-zicsr-zifencei := $(call cc-option-yn, -march=$(riscv-march-y)_zicsr_zifencei)
ifeq ($(toolchain-need-zicsr-zifencei),y)
KBUILD_ARCH_ZISCR_ZIFENCEI = _zicsr_zifencei
endif
KBUILD_CFLAGS += -march=$(KBUILD_MARCH)$(KBUILD_ARCH_A)$(KBUILD_ARCH_C) KBUILD_AFLAGS += -march=$(KBUILD_MARCH)$(KBUILD_ARCH_A)fd$(KBUILD_ARCH_C)$(KBUILD_ARCH_ZISCR_ZIFENCEI)
KBUILD_CFLAGS += -march=$(KBUILD_MARCH)$(KBUILD_ARCH_A)$(KBUILD_ARCH_C)$(KBUILD_ARCH_ZISCR_ZIFENCEI)
KBUILD_CFLAGS += -mno-save-restore KBUILD_CFLAGS += -mno-save-restore
KBUILD_CFLAGS += -DCONFIG_PAGE_OFFSET=$(CONFIG_PAGE_OFFSET) KBUILD_CFLAGS += -DCONFIG_PAGE_OFFSET=$(CONFIG_PAGE_OFFSET)

View file

@ -26,9 +26,6 @@ static long riscv_sys_mmap(unsigned long addr, unsigned long len,
if (unlikely(offset & (~PAGE_MASK >> page_shift_offset))) if (unlikely(offset & (~PAGE_MASK >> page_shift_offset)))
return -EINVAL; return -EINVAL;
if (unlikely((prot & PROT_WRITE) && !(prot & PROT_READ)))
return -EINVAL;
return ksys_mmap_pgoff(addr, len, prot, flags, fd, return ksys_mmap_pgoff(addr, len, prot, flags, fd,
offset >> (PAGE_SHIFT - page_shift_offset)); offset >> (PAGE_SHIFT - page_shift_offset));
} }

View file

@ -16,7 +16,8 @@
"3: jl 1b\n" \ "3: jl 1b\n" \
" lhi %0,0\n" \ " lhi %0,0\n" \
"4: sacf 768\n" \ "4: sacf 768\n" \
EX_TABLE(0b,4b) EX_TABLE(2b,4b) EX_TABLE(3b,4b) \ EX_TABLE(0b,4b) EX_TABLE(1b,4b) \
EX_TABLE(2b,4b) EX_TABLE(3b,4b) \
: "=d" (ret), "=&d" (oldval), "=&d" (newval), \ : "=d" (ret), "=&d" (oldval), "=&d" (newval), \
"=m" (*uaddr) \ "=m" (*uaddr) \
: "0" (-EFAULT), "d" (oparg), "a" (uaddr), \ : "0" (-EFAULT), "d" (oparg), "a" (uaddr), \

View file

@ -4,7 +4,7 @@
#include <asm-generic/sections.h> #include <asm-generic/sections.h>
extern long __machvec_start, __machvec_end; extern char __machvec_start[], __machvec_end[];
extern char __uncached_start, __uncached_end; extern char __uncached_start, __uncached_end;
extern char __start_eh_frame[], __stop_eh_frame[]; extern char __start_eh_frame[], __stop_eh_frame[];

View file

@ -22,8 +22,8 @@
#define MV_NAME_SIZE 32 #define MV_NAME_SIZE 32
#define for_each_mv(mv) \ #define for_each_mv(mv) \
for ((mv) = (struct sh_machine_vector *)&__machvec_start; \ for ((mv) = (struct sh_machine_vector *)__machvec_start; \
(mv) && (unsigned long)(mv) < (unsigned long)&__machvec_end; \ (mv) && (unsigned long)(mv) < (unsigned long)__machvec_end; \
(mv)++) (mv)++)
static struct sh_machine_vector * __init get_mv_byname(const char *name) static struct sh_machine_vector * __init get_mv_byname(const char *name)
@ -89,8 +89,8 @@ void __init sh_mv_setup(void)
if (!machvec_selected) { if (!machvec_selected) {
unsigned long machvec_size; unsigned long machvec_size;
machvec_size = ((unsigned long)&__machvec_end - machvec_size = ((unsigned long)__machvec_end -
(unsigned long)&__machvec_start); (unsigned long)__machvec_start);
/* /*
* Sanity check for machvec section alignment. Ensure * Sanity check for machvec section alignment. Ensure
@ -104,7 +104,7 @@ void __init sh_mv_setup(void)
* vector (usually the only one) from .machvec.init. * vector (usually the only one) from .machvec.init.
*/ */
if (machvec_size >= sizeof(struct sh_machine_vector)) if (machvec_size >= sizeof(struct sh_machine_vector))
sh_mv = *(struct sh_machine_vector *)&__machvec_start; sh_mv = *(struct sh_machine_vector *)__machvec_start;
} }
printk(KERN_NOTICE "Booting machvec: %s\n", get_system_type()); printk(KERN_NOTICE "Booting machvec: %s\n", get_system_type());

View file

@ -77,7 +77,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
static void *c_start(struct seq_file *m, loff_t *pos) static void *c_start(struct seq_file *m, loff_t *pos)
{ {
return *pos < NR_CPUS ? cpu_data + *pos : NULL; return *pos < nr_cpu_ids ? cpu_data + *pos : NULL;
} }
static void *c_next(struct seq_file *m, void *v, loff_t *pos) static void *c_next(struct seq_file *m, void *v, loff_t *pos)

View file

@ -430,7 +430,6 @@ CONFIG_HARDENED_USERCOPY=y
CONFIG_STATIC_USERMODEHELPER=y CONFIG_STATIC_USERMODEHELPER=y
CONFIG_STATIC_USERMODEHELPER_PATH="" CONFIG_STATIC_USERMODEHELPER_PATH=""
CONFIG_SECURITY_SELINUX=y CONFIG_SECURITY_SELINUX=y
CONFIG_INIT_STACK_ALL_ZERO=y
CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y
CONFIG_CRYPTO_ADIANTUM=y CONFIG_CRYPTO_ADIANTUM=y
CONFIG_CRYPTO_BLAKE2B=y CONFIG_CRYPTO_BLAKE2B=y

View file

@ -682,7 +682,7 @@ struct hv_enlightened_vmcs {
u64 guest_rip; u64 guest_rip;
u32 hv_clean_fields; u32 hv_clean_fields;
u32 hv_padding_32; u32 padding32_1;
u32 hv_synthetic_controls; u32 hv_synthetic_controls;
struct { struct {
u32 nested_flush_hypercall:1; u32 nested_flush_hypercall:1;
@ -690,7 +690,7 @@ struct hv_enlightened_vmcs {
u32 reserved:30; u32 reserved:30;
} hv_enlightenments_control; } hv_enlightenments_control;
u32 hv_vp_id; u32 hv_vp_id;
u32 padding32_2;
u64 hv_vm_id; u64 hv_vm_id;
u64 partition_assist_page; u64 partition_assist_page;
u64 padding64_4[4]; u64 padding64_4[4];

View file

@ -222,7 +222,13 @@ apply_microcode_early_amd(u32 cpuid_1_eax, void *ucode, size_t size, bool save_p
return ret; return ret;
native_rdmsr(MSR_AMD64_PATCH_LEVEL, rev, dummy); native_rdmsr(MSR_AMD64_PATCH_LEVEL, rev, dummy);
if (rev >= mc->hdr.patch_id)
/*
* Allow application of the same revision to pick up SMT-specific
* changes even if the revision of the other SMT thread is already
* up-to-date.
*/
if (rev > mc->hdr.patch_id)
return ret; return ret;
if (!__apply_microcode_amd(mc)) { if (!__apply_microcode_amd(mc)) {
@ -304,8 +310,12 @@ void load_ucode_amd_ap(unsigned int cpuid_1_eax)
native_rdmsr(MSR_AMD64_PATCH_LEVEL, rev, dummy); native_rdmsr(MSR_AMD64_PATCH_LEVEL, rev, dummy);
/* Check whether we have saved a new patch already: */ /*
if (*new_rev && rev < mc->hdr.patch_id) { * Check whether a new patch has been saved already. Also, allow application of
* the same revision in order to pick up SMT-thread-specific configuration even
* if the sibling SMT thread already has an up-to-date revision.
*/
if (*new_rev && rev <= mc->hdr.patch_id) {
if (!__apply_microcode_amd(mc)) { if (!__apply_microcode_amd(mc)) {
*new_rev = mc->hdr.patch_id; *new_rev = mc->hdr.patch_id;
return; return;

View file

@ -668,7 +668,7 @@ void __unwind_start(struct unwind_state *state, struct task_struct *task,
/* Otherwise, skip ahead to the user-specified starting frame: */ /* Otherwise, skip ahead to the user-specified starting frame: */
while (!unwind_done(state) && while (!unwind_done(state) &&
(!on_stack(&state->stack_info, first_frame, sizeof(long)) || (!on_stack(&state->stack_info, first_frame, sizeof(long)) ||
state->sp < (unsigned long)first_frame)) state->sp <= (unsigned long)first_frame))
unwind_next_frame(state); unwind_next_frame(state);
return; return;

View file

@ -1975,7 +1975,7 @@ static int em_pop_sreg(struct x86_emulate_ctxt *ctxt)
if (rc != X86EMUL_CONTINUE) if (rc != X86EMUL_CONTINUE)
return rc; return rc;
if (ctxt->modrm_reg == VCPU_SREG_SS) if (seg == VCPU_SREG_SS)
ctxt->interruptibility = KVM_X86_SHADOW_INT_MOV_SS; ctxt->interruptibility = KVM_X86_SHADOW_INT_MOV_SS;
if (ctxt->op_bytes > 2) if (ctxt->op_bytes > 2)
rsp_increment(ctxt, ctxt->op_bytes - 2); rsp_increment(ctxt, ctxt->op_bytes - 2);

View file

@ -13276,14 +13276,6 @@ static void prepare_vmcs12(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12,
*/ */
vmcs12_save_pending_event(vcpu, vmcs12); vmcs12_save_pending_event(vcpu, vmcs12);
} }
/*
* Drop what we picked up for L2 via vmx_complete_interrupts. It is
* preserved above and would only end up incorrectly in L1.
*/
vcpu->arch.nmi_injected = false;
kvm_clear_exception_queue(vcpu);
kvm_clear_interrupt_queue(vcpu);
} }
/* /*
@ -13617,6 +13609,17 @@ static void nested_vmx_vmexit(struct kvm_vcpu *vcpu, u32 exit_reason,
nested_vmx_abort(vcpu, VMX_ABORT_SAVE_GUEST_MSR_FAIL); nested_vmx_abort(vcpu, VMX_ABORT_SAVE_GUEST_MSR_FAIL);
} }
/*
* Drop events/exceptions that were queued for re-injection to L2
* (picked up via vmx_complete_interrupts()), as well as exceptions
* that were pending for L2. Note, this must NOT be hoisted above
* prepare_vmcs12(), events/exceptions queued for re-injection need to
* be captured in vmcs12 (see vmcs12_save_pending_event()).
*/
vcpu->arch.nmi_injected = false;
kvm_clear_exception_queue(vcpu);
kvm_clear_interrupt_queue(vcpu);
vmx_switch_vmcs(vcpu, &vmx->vmcs01); vmx_switch_vmcs(vcpu, &vmx->vmcs01);
vm_entry_controls_reset_shadow(vmx); vm_entry_controls_reset_shadow(vmx);
vm_exit_controls_reset_shadow(vmx); vm_exit_controls_reset_shadow(vmx);

View file

@ -6,10 +6,9 @@
#include <asm/unistd.h> #include <asm/unistd.h>
#include <sysdep/ptrace.h> #include <sysdep/ptrace.h>
typedef long syscall_handler_t(struct pt_regs); typedef long syscall_handler_t(struct syscall_args);
extern syscall_handler_t *sys_call_table[]; extern syscall_handler_t *sys_call_table[];
#define EXECUTE_SYSCALL(syscall, regs) \ #define EXECUTE_SYSCALL(syscall, regs) \
((long (*)(struct syscall_args)) \ ((*sys_call_table[syscall]))(SYSCALL_ARGS(&regs->regs))
(*sys_call_table[syscall]))(SYSCALL_ARGS(&regs->regs))

View file

@ -65,9 +65,6 @@ static int get_free_idx(struct task_struct* task)
struct thread_struct *t = &task->thread; struct thread_struct *t = &task->thread;
int idx; int idx;
if (!t->arch.tls_array)
return GDT_ENTRY_TLS_MIN;
for (idx = 0; idx < GDT_ENTRY_TLS_ENTRIES; idx++) for (idx = 0; idx < GDT_ENTRY_TLS_ENTRIES; idx++)
if (!t->arch.tls_array[idx].present) if (!t->arch.tls_array[idx].present)
return idx + GDT_ENTRY_TLS_MIN; return idx + GDT_ENTRY_TLS_MIN;
@ -242,9 +239,6 @@ static int get_tls_entry(struct task_struct *task, struct user_desc *info,
{ {
struct thread_struct *t = &task->thread; struct thread_struct *t = &task->thread;
if (!t->arch.tls_array)
goto clear;
if (idx < GDT_ENTRY_TLS_MIN || idx > GDT_ENTRY_TLS_MAX) if (idx < GDT_ENTRY_TLS_MIN || idx > GDT_ENTRY_TLS_MAX)
return -EINVAL; return -EINVAL;

View file

@ -13,6 +13,7 @@
#include <linux/ratelimit.h> #include <linux/ratelimit.h>
#include <linux/edac.h> #include <linux/edac.h>
#include <linux/ras.h> #include <linux/ras.h>
#include <acpi/ghes.h>
#include <asm/cpu.h> #include <asm/cpu.h>
#include <asm/mce.h> #include <asm/mce.h>
@ -141,8 +142,8 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,
int cpu = mce->extcpu; int cpu = mce->extcpu;
struct acpi_hest_generic_status *estatus, *tmp; struct acpi_hest_generic_status *estatus, *tmp;
struct acpi_hest_generic_data *gdata; struct acpi_hest_generic_data *gdata;
const guid_t *fru_id = &guid_null; const guid_t *fru_id;
char *fru_text = ""; char *fru_text;
guid_t *sec_type; guid_t *sec_type;
static u32 err_seq; static u32 err_seq;
@ -163,18 +164,24 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,
/* log event via trace */ /* log event via trace */
err_seq++; err_seq++;
gdata = (struct acpi_hest_generic_data *)(tmp + 1); apei_estatus_for_each_section(tmp, gdata) {
if (gdata->validation_bits & CPER_SEC_VALID_FRU_ID) if (gdata->validation_bits & CPER_SEC_VALID_FRU_ID)
fru_id = (guid_t *)gdata->fru_id; fru_id = (guid_t *)gdata->fru_id;
else
fru_id = &guid_null;
if (gdata->validation_bits & CPER_SEC_VALID_FRU_TEXT) if (gdata->validation_bits & CPER_SEC_VALID_FRU_TEXT)
fru_text = gdata->fru_text; fru_text = gdata->fru_text;
else
fru_text = "";
sec_type = (guid_t *)gdata->section_type; sec_type = (guid_t *)gdata->section_type;
if (guid_equal(sec_type, &CPER_SEC_PLATFORM_MEM)) { if (guid_equal(sec_type, &CPER_SEC_PLATFORM_MEM)) {
struct cper_sec_mem_err *mem = (void *)(gdata + 1); struct cper_sec_mem_err *mem = (void *)(gdata + 1);
if (gdata->error_data_length >= sizeof(*mem)) if (gdata->error_data_length >= sizeof(*mem))
trace_extlog_mem_event(mem, err_seq, fru_id, fru_text, trace_extlog_mem_event(mem, err_seq, fru_id, fru_text,
(u8)gdata->error_severity); (u8)gdata->error_severity);
} }
}
out: out:
return NOTIFY_STOP; return NOTIFY_STOP;

View file

@ -511,6 +511,22 @@ static const struct dmi_system_id video_dmi_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "SATELLITE R830"), DMI_MATCH(DMI_PRODUCT_NAME, "SATELLITE R830"),
}, },
}, },
{
.callback = video_disable_backlight_sysfs_if,
.ident = "Toshiba Satellite Z830",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
DMI_MATCH(DMI_PRODUCT_NAME, "SATELLITE Z830"),
},
},
{
.callback = video_disable_backlight_sysfs_if,
.ident = "Toshiba Portege Z830",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
DMI_MATCH(DMI_PRODUCT_NAME, "PORTEGE Z830"),
},
},
/* /*
* Some machine's _DOD IDs don't have bit 31(Device ID Scheme) set * Some machine's _DOD IDs don't have bit 31(Device ID Scheme) set
* but the IDs actually follow the Device ID Scheme. * but the IDs actually follow the Device ID Scheme.

View file

@ -447,6 +447,70 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
DMI_MATCH(DMI_BOARD_NAME, "PF5LUXG"), DMI_MATCH(DMI_BOARD_NAME, "PF5LUXG"),
}, },
}, },
/*
* More Tongfang devices with the same issue as the Clevo NL5xRU and
* NL5xNU/TUXEDO Aura 15 Gen1 and Gen2. See the description above.
*/
{
.callback = video_detect_force_native,
.ident = "TongFang GKxNRxx",
.matches = {
DMI_MATCH(DMI_BOARD_NAME, "GKxNRxx"),
},
},
{
.callback = video_detect_force_native,
.ident = "TongFang GKxNRxx",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"),
DMI_MATCH(DMI_BOARD_NAME, "POLARIS1501A1650TI"),
},
},
{
.callback = video_detect_force_native,
.ident = "TongFang GKxNRxx",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"),
DMI_MATCH(DMI_BOARD_NAME, "POLARIS1501A2060"),
},
},
{
.callback = video_detect_force_native,
.ident = "TongFang GKxNRxx",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"),
DMI_MATCH(DMI_BOARD_NAME, "POLARIS1701A1650TI"),
},
},
{
.callback = video_detect_force_native,
.ident = "TongFang GKxNRxx",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"),
DMI_MATCH(DMI_BOARD_NAME, "POLARIS1701A2060"),
},
},
{
.callback = video_detect_force_native,
.ident = "TongFang GMxNGxx",
.matches = {
DMI_MATCH(DMI_BOARD_NAME, "GMxNGxx"),
},
},
{
.callback = video_detect_force_native,
.ident = "TongFang GMxZGxx",
.matches = {
DMI_MATCH(DMI_BOARD_NAME, "GMxZGxx"),
},
},
{
.callback = video_detect_force_native,
.ident = "TongFang GMxRGxx",
.matches = {
DMI_MATCH(DMI_BOARD_NAME, "GMxRGxx"),
},
},
/* /*
* Desktops which falsely report a backlight and which our heuristics * Desktops which falsely report a backlight and which our heuristics
* for this do not catch. * for this do not catch.

View file

@ -265,7 +265,7 @@ enum {
PCS_7 = 0x94, /* 7+ port PCS (Denverton) */ PCS_7 = 0x94, /* 7+ port PCS (Denverton) */
/* em constants */ /* em constants */
EM_MAX_SLOTS = 8, EM_MAX_SLOTS = SATA_PMP_MAX_PORTS,
EM_MAX_RETRY = 5, EM_MAX_RETRY = 5,
/* em_ctl bits */ /* em_ctl bits */

View file

@ -1250,4 +1250,4 @@ module_platform_driver(imx_ahci_driver);
MODULE_DESCRIPTION("Freescale i.MX AHCI SATA platform driver"); MODULE_DESCRIPTION("Freescale i.MX AHCI SATA platform driver");
MODULE_AUTHOR("Richard Zhu <Hong-Xing.Zhu@freescale.com>"); MODULE_AUTHOR("Richard Zhu <Hong-Xing.Zhu@freescale.com>");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_ALIAS("ahci:imx"); MODULE_ALIAS("platform:" DRV_NAME);

View file

@ -421,14 +421,24 @@ struct ahci_host_priv *ahci_platform_get_resources(struct platform_device *pdev,
} }
} }
hpriv->nports = child_nodes = of_get_child_count(dev->of_node); /*
* Too many sub-nodes most likely means having something wrong with
* the firmware.
*/
child_nodes = of_get_child_count(dev->of_node);
if (child_nodes > AHCI_MAX_PORTS) {
rc = -EINVAL;
goto err_out;
}
/* /*
* If no sub-node was found, we still need to set nports to * If no sub-node was found, we still need to set nports to
* one in order to be able to use the * one in order to be able to use the
* ahci_platform_[en|dis]able_[phys|regulators] functions. * ahci_platform_[en|dis]able_[phys|regulators] functions.
*/ */
if (!child_nodes) if (child_nodes)
hpriv->nports = child_nodes;
else
hpriv->nports = 1; hpriv->nports = 1;
hpriv->phys = devm_kcalloc(dev, hpriv->nports, sizeof(*hpriv->phys), GFP_KERNEL); hpriv->phys = devm_kcalloc(dev, hpriv->nports, sizeof(*hpriv->phys), GFP_KERNEL);

View file

@ -2459,6 +2459,10 @@ static int genpd_iterate_idle_states(struct device_node *dn,
np = it.node; np = it.node;
if (!of_match_node(idle_state_match, np)) if (!of_match_node(idle_state_match, np))
continue; continue;
if (!of_device_is_available(np))
continue;
if (states) { if (states) {
ret = genpd_parse_state(&states[i], np); ret = genpd_parse_state(&states[i], np);
if (ret) { if (ret) {

View file

@ -1271,10 +1271,12 @@ static int nbd_start_device_ioctl(struct nbd_device *nbd, struct block_device *b
mutex_unlock(&nbd->config_lock); mutex_unlock(&nbd->config_lock);
ret = wait_event_interruptible(config->recv_wq, ret = wait_event_interruptible(config->recv_wq,
atomic_read(&config->recv_threads) == 0); atomic_read(&config->recv_threads) == 0);
if (ret) if (ret) {
sock_shutdown(nbd); sock_shutdown(nbd);
flush_workqueue(nbd->recv_workq); nbd_clear_que(nbd);
}
flush_workqueue(nbd->recv_workq);
mutex_lock(&nbd->config_lock); mutex_lock(&nbd->config_lock);
nbd_bdev_reset(bdev); nbd_bdev_reset(bdev);
/* user requested, ignore socket errors */ /* user requested, ignore socket errors */

View file

@ -893,8 +893,8 @@ static const struct memdev {
#endif #endif
[5] = { "zero", 0666, &zero_fops, 0 }, [5] = { "zero", 0666, &zero_fops, 0 },
[7] = { "full", 0666, &full_fops, 0 }, [7] = { "full", 0666, &full_fops, 0 },
[8] = { "random", 0666, &random_fops, 0 }, [8] = { "random", 0666, &random_fops, FMODE_NOWAIT },
[9] = { "urandom", 0666, &urandom_fops, 0 }, [9] = { "urandom", 0666, &urandom_fops, FMODE_NOWAIT },
#ifdef CONFIG_PRINTK #ifdef CONFIG_PRINTK
[11] = { "kmsg", 0644, &kmsg_fops, 0 }, [11] = { "kmsg", 0644, &kmsg_fops, 0 },
#endif #endif

View file

@ -891,20 +891,23 @@ void __init add_bootloader_randomness(const void *buf, size_t len)
} }
struct fast_pool { struct fast_pool {
struct work_struct mix;
unsigned long pool[4]; unsigned long pool[4];
unsigned long last; unsigned long last;
unsigned int count; unsigned int count;
struct timer_list mix;
}; };
static void mix_interrupt_randomness(struct timer_list *work);
static DEFINE_PER_CPU(struct fast_pool, irq_randomness) = { static DEFINE_PER_CPU(struct fast_pool, irq_randomness) = {
#ifdef CONFIG_64BIT #ifdef CONFIG_64BIT
#define FASTMIX_PERM SIPHASH_PERMUTATION #define FASTMIX_PERM SIPHASH_PERMUTATION
.pool = { SIPHASH_CONST_0, SIPHASH_CONST_1, SIPHASH_CONST_2, SIPHASH_CONST_3 } .pool = { SIPHASH_CONST_0, SIPHASH_CONST_1, SIPHASH_CONST_2, SIPHASH_CONST_3 },
#else #else
#define FASTMIX_PERM HSIPHASH_PERMUTATION #define FASTMIX_PERM HSIPHASH_PERMUTATION
.pool = { HSIPHASH_CONST_0, HSIPHASH_CONST_1, HSIPHASH_CONST_2, HSIPHASH_CONST_3 } .pool = { HSIPHASH_CONST_0, HSIPHASH_CONST_1, HSIPHASH_CONST_2, HSIPHASH_CONST_3 },
#endif #endif
.mix = __TIMER_INITIALIZER(mix_interrupt_randomness, 0)
}; };
/* /*
@ -946,7 +949,7 @@ int __cold random_online_cpu(unsigned int cpu)
} }
#endif #endif
static void mix_interrupt_randomness(struct work_struct *work) static void mix_interrupt_randomness(struct timer_list *work)
{ {
struct fast_pool *fast_pool = container_of(work, struct fast_pool, mix); struct fast_pool *fast_pool = container_of(work, struct fast_pool, mix);
/* /*
@ -977,7 +980,7 @@ static void mix_interrupt_randomness(struct work_struct *work)
local_irq_enable(); local_irq_enable();
mix_pool_bytes(pool, sizeof(pool)); mix_pool_bytes(pool, sizeof(pool));
credit_init_bits(max(1u, (count & U16_MAX) / 64)); credit_init_bits(clamp_t(unsigned int, (count & U16_MAX) / 64, 1, sizeof(pool) * 8));
memzero_explicit(pool, sizeof(pool)); memzero_explicit(pool, sizeof(pool));
} }
@ -1000,10 +1003,11 @@ void add_interrupt_randomness(int irq)
if (new_count < 1024 && !time_is_before_jiffies(fast_pool->last + HZ)) if (new_count < 1024 && !time_is_before_jiffies(fast_pool->last + HZ))
return; return;
if (unlikely(!fast_pool->mix.func))
INIT_WORK(&fast_pool->mix, mix_interrupt_randomness);
fast_pool->count |= MIX_INFLIGHT; fast_pool->count |= MIX_INFLIGHT;
queue_work_on(raw_smp_processor_id(), system_highpri_wq, &fast_pool->mix); if (!timer_pending(&fast_pool->mix)) {
fast_pool->mix.expires = jiffies;
add_timer_on(&fast_pool->mix, raw_smp_processor_id());
}
} }
EXPORT_SYMBOL_GPL(add_interrupt_randomness); EXPORT_SYMBOL_GPL(add_interrupt_randomness);
@ -1295,6 +1299,11 @@ static ssize_t random_read_iter(struct kiocb *kiocb, struct iov_iter *iter)
{ {
int ret; int ret;
if (!crng_ready() &&
((kiocb->ki_flags & IOCB_NOWAIT) ||
(kiocb->ki_filp->f_flags & O_NONBLOCK)))
return -EAGAIN;
ret = wait_for_random_bytes(); ret = wait_for_random_bytes();
if (ret != 0) if (ret != 0)
return ret; return ret;

View file

@ -950,7 +950,7 @@ static u32 bcm2835_clock_choose_div(struct clk_hw *hw,
return div; return div;
} }
static long bcm2835_clock_rate_from_divisor(struct bcm2835_clock *clock, static unsigned long bcm2835_clock_rate_from_divisor(struct bcm2835_clock *clock,
unsigned long parent_rate, unsigned long parent_rate,
u32 div) u32 div)
{ {
@ -1737,7 +1737,7 @@ static const struct bcm2835_clk_desc clk_desc_array[] = {
.load_mask = CM_PLLC_LOADPER, .load_mask = CM_PLLC_LOADPER,
.hold_mask = CM_PLLC_HOLDPER, .hold_mask = CM_PLLC_HOLDPER,
.fixed_divider = 1, .fixed_divider = 1,
.flags = CLK_SET_RATE_PARENT), .flags = CLK_IS_CRITICAL | CLK_SET_RATE_PARENT),
/* /*
* PLLD is the display PLL, used to drive DSI display panels. * PLLD is the display PLL, used to drive DSI display panels.

View file

@ -499,12 +499,15 @@ static void __init berlin2_clock_setup(struct device_node *np)
int n, ret; int n, ret;
clk_data = kzalloc(struct_size(clk_data, hws, MAX_CLKS), GFP_KERNEL); clk_data = kzalloc(struct_size(clk_data, hws, MAX_CLKS), GFP_KERNEL);
if (!clk_data) if (!clk_data) {
of_node_put(parent_np);
return; return;
}
clk_data->num = MAX_CLKS; clk_data->num = MAX_CLKS;
hws = clk_data->hws; hws = clk_data->hws;
gbase = of_iomap(parent_np, 0); gbase = of_iomap(parent_np, 0);
of_node_put(parent_np);
if (!gbase) if (!gbase)
return; return;

View file

@ -285,19 +285,23 @@ static void __init berlin2q_clock_setup(struct device_node *np)
int n, ret; int n, ret;
clk_data = kzalloc(struct_size(clk_data, hws, MAX_CLKS), GFP_KERNEL); clk_data = kzalloc(struct_size(clk_data, hws, MAX_CLKS), GFP_KERNEL);
if (!clk_data) if (!clk_data) {
of_node_put(parent_np);
return; return;
}
clk_data->num = MAX_CLKS; clk_data->num = MAX_CLKS;
hws = clk_data->hws; hws = clk_data->hws;
gbase = of_iomap(parent_np, 0); gbase = of_iomap(parent_np, 0);
if (!gbase) { if (!gbase) {
of_node_put(parent_np);
pr_err("%pOF: Unable to map global base\n", np); pr_err("%pOF: Unable to map global base\n", np);
return; return;
} }
/* BG2Q CPU PLL is not part of global registers */ /* BG2Q CPU PLL is not part of global registers */
cpupll_base = of_iomap(parent_np, 1); cpupll_base = of_iomap(parent_np, 1);
of_node_put(parent_np);
if (!cpupll_base) { if (!cpupll_base) {
pr_err("%pOF: Unable to map cpupll base\n", np); pr_err("%pOF: Unable to map cpupll base\n", np);
iounmap(gbase); iounmap(gbase);

View file

@ -218,7 +218,7 @@ static const struct of_device_id oxnas_stdclk_dt_ids[] = {
static int oxnas_stdclk_probe(struct platform_device *pdev) static int oxnas_stdclk_probe(struct platform_device *pdev)
{ {
struct device_node *np = pdev->dev.of_node; struct device_node *np = pdev->dev.of_node, *parent_np;
const struct oxnas_stdclk_data *data; const struct oxnas_stdclk_data *data;
const struct of_device_id *id; const struct of_device_id *id;
struct regmap *regmap; struct regmap *regmap;
@ -230,7 +230,9 @@ static int oxnas_stdclk_probe(struct platform_device *pdev)
return -ENODEV; return -ENODEV;
data = id->data; data = id->data;
regmap = syscon_node_to_regmap(of_get_parent(np)); parent_np = of_get_parent(np);
regmap = syscon_node_to_regmap(parent_np);
of_node_put(parent_np);
if (IS_ERR(regmap)) { if (IS_ERR(regmap)) {
dev_err(&pdev->dev, "failed to have parent regmap\n"); dev_err(&pdev->dev, "failed to have parent regmap\n");
return PTR_ERR(regmap); return PTR_ERR(regmap);

View file

@ -1348,6 +1348,7 @@ static void __init tegra114_clock_init(struct device_node *np)
} }
pmc_base = of_iomap(node, 0); pmc_base = of_iomap(node, 0);
of_node_put(node);
if (!pmc_base) { if (!pmc_base) {
pr_err("Can't map pmc registers\n"); pr_err("Can't map pmc registers\n");
WARN_ON(1); WARN_ON(1);

View file

@ -1152,6 +1152,7 @@ static void __init tegra20_clock_init(struct device_node *np)
} }
pmc_base = of_iomap(node, 0); pmc_base = of_iomap(node, 0);
of_node_put(node);
if (!pmc_base) { if (!pmc_base) {
pr_err("Can't map pmc registers\n"); pr_err("Can't map pmc registers\n");
BUG(); BUG();

View file

@ -3529,6 +3529,7 @@ static void __init tegra210_clock_init(struct device_node *np)
} }
pmc_base = of_iomap(node, 0); pmc_base = of_iomap(node, 0);
of_node_put(node);
if (!pmc_base) { if (!pmc_base) {
pr_err("Can't map pmc registers\n"); pr_err("Can't map pmc registers\n");
WARN_ON(1); WARN_ON(1);

View file

@ -252,14 +252,16 @@ static int of_dra7_atl_clk_probe(struct platform_device *pdev)
if (rc) { if (rc) {
pr_err("%s: failed to lookup atl clock %d\n", __func__, pr_err("%s: failed to lookup atl clock %d\n", __func__,
i); i);
return -EINVAL; ret = -EINVAL;
goto pm_put;
} }
clk = of_clk_get_from_provider(&clkspec); clk = of_clk_get_from_provider(&clkspec);
if (IS_ERR(clk)) { if (IS_ERR(clk)) {
pr_err("%s: failed to get atl clock %d from provider\n", pr_err("%s: failed to get atl clock %d from provider\n",
__func__, i); __func__, i);
return PTR_ERR(clk); ret = PTR_ERR(clk);
goto pm_put;
} }
cdesc = to_atl_desc(__clk_get_hw(clk)); cdesc = to_atl_desc(__clk_get_hw(clk));
@ -292,8 +294,9 @@ static int of_dra7_atl_clk_probe(struct platform_device *pdev)
if (cdesc->enabled) if (cdesc->enabled)
atl_clk_enable(__clk_get_hw(clk)); atl_clk_enable(__clk_get_hw(clk));
} }
pm_runtime_put_sync(cinfo->dev);
pm_put:
pm_runtime_put_sync(cinfo->dev);
return ret; return ret;
} }

View file

@ -257,6 +257,7 @@ static int cpt_ucode_load_fw(struct cpt_device *cpt, const u8 *fw, bool is_ae)
const struct firmware *fw_entry; const struct firmware *fw_entry;
struct device *dev = &cpt->pdev->dev; struct device *dev = &cpt->pdev->dev;
struct ucode_header *ucode; struct ucode_header *ucode;
unsigned int code_length;
struct microcode *mcode; struct microcode *mcode;
int j, ret = 0; int j, ret = 0;
@ -267,11 +268,12 @@ static int cpt_ucode_load_fw(struct cpt_device *cpt, const u8 *fw, bool is_ae)
ucode = (struct ucode_header *)fw_entry->data; ucode = (struct ucode_header *)fw_entry->data;
mcode = &cpt->mcode[cpt->next_mc_idx]; mcode = &cpt->mcode[cpt->next_mc_idx];
memcpy(mcode->version, (u8 *)fw_entry->data, CPT_UCODE_VERSION_SZ); memcpy(mcode->version, (u8 *)fw_entry->data, CPT_UCODE_VERSION_SZ);
mcode->code_size = ntohl(ucode->code_length) * 2; code_length = ntohl(ucode->code_length);
if (!mcode->code_size) { if (code_length == 0 || code_length >= INT_MAX / 2) {
ret = -EINVAL; ret = -EINVAL;
goto fw_release; goto fw_release;
} }
mcode->code_size = code_length * 2;
mcode->is_ae = is_ae; mcode->is_ae = is_ae;
mcode->core_mask = 0ULL; mcode->core_mask = 0ULL;

View file

@ -653,7 +653,7 @@ static void __cleanup(struct ioatdma_chan *ioat_chan, dma_addr_t phys_complete)
if (active - i == 0) { if (active - i == 0) {
dev_dbg(to_dev(ioat_chan), "%s: cancel completion timeout\n", dev_dbg(to_dev(ioat_chan), "%s: cancel completion timeout\n",
__func__); __func__);
mod_timer(&ioat_chan->timer, jiffies + IDLE_TIMEOUT); mod_timer_pending(&ioat_chan->timer, jiffies + IDLE_TIMEOUT);
} }
/* microsecond delay by sysfs variable per pending descriptor */ /* microsecond delay by sysfs variable per pending descriptor */
@ -679,7 +679,7 @@ static void ioat_cleanup(struct ioatdma_chan *ioat_chan)
if (chanerr & if (chanerr &
(IOAT_CHANERR_HANDLE_MASK | IOAT_CHANERR_RECOVER_MASK)) { (IOAT_CHANERR_HANDLE_MASK | IOAT_CHANERR_RECOVER_MASK)) {
mod_timer(&ioat_chan->timer, jiffies + IDLE_TIMEOUT); mod_timer_pending(&ioat_chan->timer, jiffies + IDLE_TIMEOUT);
ioat_eh(ioat_chan); ioat_eh(ioat_chan);
} }
} }
@ -876,7 +876,7 @@ static void check_active(struct ioatdma_chan *ioat_chan)
} }
if (test_and_clear_bit(IOAT_CHAN_ACTIVE, &ioat_chan->state)) if (test_and_clear_bit(IOAT_CHAN_ACTIVE, &ioat_chan->state))
mod_timer(&ioat_chan->timer, jiffies + IDLE_TIMEOUT); mod_timer_pending(&ioat_chan->timer, jiffies + IDLE_TIMEOUT);
} }
void ioat_timer_event(struct timer_list *t) void ioat_timer_event(struct timer_list *t)

View file

@ -2654,7 +2654,7 @@ static int xilinx_dma_probe(struct platform_device *pdev)
if (err < 0) { if (err < 0) {
dev_err(xdev->dev, dev_err(xdev->dev,
"missing xlnx,num-fstores property\n"); "missing xlnx,num-fstores property\n");
return err; goto disable_clks;
} }
err = of_property_read_u32(node, "xlnx,flush-fsync", err = of_property_read_u32(node, "xlnx,flush-fsync",
@ -2674,7 +2674,11 @@ static int xilinx_dma_probe(struct platform_device *pdev)
xdev->ext_addr = false; xdev->ext_addr = false;
/* Set the dma mask bits */ /* Set the dma mask bits */
dma_set_mask_and_coherent(xdev->dev, DMA_BIT_MASK(addr_width)); err = dma_set_mask_and_coherent(xdev->dev, DMA_BIT_MASK(addr_width));
if (err < 0) {
dev_err(xdev->dev, "DMA mask error %d\n", err);
goto disable_clks;
}
/* Initialize the DMA engine */ /* Initialize the DMA engine */
xdev->common.dev = &pdev->dev; xdev->common.dev = &pdev->dev;

View file

@ -106,9 +106,28 @@ static int scmi_pm_domain_probe(struct scmi_device *sdev)
scmi_pd_data->domains = domains; scmi_pd_data->domains = domains;
scmi_pd_data->num_domains = num_domains; scmi_pd_data->num_domains = num_domains;
dev_set_drvdata(dev, scmi_pd_data);
return of_genpd_add_provider_onecell(np, scmi_pd_data); return of_genpd_add_provider_onecell(np, scmi_pd_data);
} }
static void scmi_pm_domain_remove(struct scmi_device *sdev)
{
int i;
struct genpd_onecell_data *scmi_pd_data;
struct device *dev = &sdev->dev;
struct device_node *np = dev->of_node;
of_genpd_del_provider(np);
scmi_pd_data = dev_get_drvdata(dev);
for (i = 0; i < scmi_pd_data->num_domains; i++) {
if (!scmi_pd_data->domains[i])
continue;
pm_genpd_remove(scmi_pd_data->domains[i]);
}
}
static const struct scmi_device_id scmi_id_table[] = { static const struct scmi_device_id scmi_id_table[] = {
{ SCMI_PROTOCOL_POWER }, { SCMI_PROTOCOL_POWER },
{ }, { },
@ -118,6 +137,7 @@ MODULE_DEVICE_TABLE(scmi, scmi_id_table);
static struct scmi_driver scmi_power_domain_driver = { static struct scmi_driver scmi_power_domain_driver = {
.name = "scmi-power-domain", .name = "scmi-power-domain",
.probe = scmi_pm_domain_probe, .probe = scmi_pm_domain_probe,
.remove = scmi_pm_domain_remove,
.id_table = scmi_id_table, .id_table = scmi_id_table,
}; };
module_scmi_driver(scmi_power_domain_driver); module_scmi_driver(scmi_power_domain_driver);

View file

@ -301,14 +301,6 @@ efi_status_t allocate_new_fdt_and_exit_boot(efi_system_table_t *sys_table,
goto fail; goto fail;
} }
/*
* Now that we have done our final memory allocation (and free)
* we can get the memory map key needed for exit_boot_services().
*/
status = efi_get_memory_map(sys_table, &map);
if (status != EFI_SUCCESS)
goto fail_free_new_fdt;
status = update_fdt(sys_table, (void *)fdt_addr, fdt_size, status = update_fdt(sys_table, (void *)fdt_addr, fdt_size,
(void *)*new_fdt_addr, MAX_FDT_SIZE, cmdline_ptr, (void *)*new_fdt_addr, MAX_FDT_SIZE, cmdline_ptr,
initrd_addr, initrd_size); initrd_addr, initrd_size);

View file

@ -661,6 +661,15 @@ static struct notifier_block gsmi_die_notifier = {
static int gsmi_panic_callback(struct notifier_block *nb, static int gsmi_panic_callback(struct notifier_block *nb,
unsigned long reason, void *arg) unsigned long reason, void *arg)
{ {
/*
* Panic callbacks are executed with all other CPUs stopped,
* so we must not attempt to spin waiting for gsmi_dev.lock
* to be released.
*/
if (spin_is_locked(&gsmi_dev.lock))
return NOTIFY_DONE;
gsmi_shutdown_reason(GSMI_SHUTDOWN_PANIC); gsmi_shutdown_reason(GSMI_SHUTDOWN_PANIC);
return NOTIFY_DONE; return NOTIFY_DONE;
} }

View file

@ -1279,6 +1279,9 @@ int fsi_master_register(struct fsi_master *master)
mutex_init(&master->scan_lock); mutex_init(&master->scan_lock);
master->idx = ida_simple_get(&master_ida, 0, INT_MAX, GFP_KERNEL); master->idx = ida_simple_get(&master_ida, 0, INT_MAX, GFP_KERNEL);
if (master->idx < 0)
return master->idx;
dev_set_name(&master->dev, "fsi%d", master->idx); dev_set_name(&master->dev, "fsi%d", master->idx);
rc = device_register(&master->dev); rc = device_register(&master->dev);

View file

@ -1638,10 +1638,12 @@ amdgpu_connector_add(struct amdgpu_device *adev,
adev->mode_info.dither_property, adev->mode_info.dither_property,
AMDGPU_FMT_DITHER_DISABLE); AMDGPU_FMT_DITHER_DISABLE);
if (amdgpu_audio != 0) if (amdgpu_audio != 0) {
drm_object_attach_property(&amdgpu_connector->base.base, drm_object_attach_property(&amdgpu_connector->base.base,
adev->mode_info.audio_property, adev->mode_info.audio_property,
AMDGPU_AUDIO_AUTO); AMDGPU_AUDIO_AUTO);
amdgpu_connector->audio = AMDGPU_AUDIO_AUTO;
}
subpixel_order = SubPixelHorizontalRGB; subpixel_order = SubPixelHorizontalRGB;
connector->interlace_allowed = true; connector->interlace_allowed = true;
@ -1746,6 +1748,7 @@ amdgpu_connector_add(struct amdgpu_device *adev,
drm_object_attach_property(&amdgpu_connector->base.base, drm_object_attach_property(&amdgpu_connector->base.base,
adev->mode_info.audio_property, adev->mode_info.audio_property,
AMDGPU_AUDIO_AUTO); AMDGPU_AUDIO_AUTO);
amdgpu_connector->audio = AMDGPU_AUDIO_AUTO;
} }
drm_object_attach_property(&amdgpu_connector->base.base, drm_object_attach_property(&amdgpu_connector->base.base,
adev->mode_info.dither_property, adev->mode_info.dither_property,
@ -1794,6 +1797,7 @@ amdgpu_connector_add(struct amdgpu_device *adev,
drm_object_attach_property(&amdgpu_connector->base.base, drm_object_attach_property(&amdgpu_connector->base.base,
adev->mode_info.audio_property, adev->mode_info.audio_property,
AMDGPU_AUDIO_AUTO); AMDGPU_AUDIO_AUTO);
amdgpu_connector->audio = AMDGPU_AUDIO_AUTO;
} }
drm_object_attach_property(&amdgpu_connector->base.base, drm_object_attach_property(&amdgpu_connector->base.base,
adev->mode_info.dither_property, adev->mode_info.dither_property,
@ -1839,6 +1843,7 @@ amdgpu_connector_add(struct amdgpu_device *adev,
drm_object_attach_property(&amdgpu_connector->base.base, drm_object_attach_property(&amdgpu_connector->base.base,
adev->mode_info.audio_property, adev->mode_info.audio_property,
AMDGPU_AUDIO_AUTO); AMDGPU_AUDIO_AUTO);
amdgpu_connector->audio = AMDGPU_AUDIO_AUTO;
} }
drm_object_attach_property(&amdgpu_connector->base.base, drm_object_attach_property(&amdgpu_connector->base.base,
adev->mode_info.dither_property, adev->mode_info.dither_property,

View file

@ -26,12 +26,12 @@
#include "bw_fixed.h" #include "bw_fixed.h"
#define MIN_I64 \
(int64_t)(-(1LL << 63))
#define MAX_I64 \ #define MAX_I64 \
(int64_t)((1ULL << 63) - 1) (int64_t)((1ULL << 63) - 1)
#define MIN_I64 \
(-MAX_I64 - 1)
#define FRACTIONAL_PART_MASK \ #define FRACTIONAL_PART_MASK \
((1ULL << BW_FIXED_BITS_PER_FRACTIONAL_PART) - 1) ((1ULL << BW_FIXED_BITS_PER_FRACTIONAL_PART) - 1)

View file

@ -383,10 +383,7 @@ void adv7511_cec_irq_process(struct adv7511 *adv7511, unsigned int irq1);
#else #else
static inline int adv7511_cec_init(struct device *dev, struct adv7511 *adv7511) static inline int adv7511_cec_init(struct device *dev, struct adv7511 *adv7511)
{ {
unsigned int offset = adv7511->type == ADV7533 ? regmap_write(adv7511->regmap, ADV7511_REG_CEC_CTRL,
ADV7533_REG_CEC_OFFSET : 0;
regmap_write(adv7511->regmap, ADV7511_REG_CEC_CTRL + offset,
ADV7511_CEC_CTRL_POWER_DOWN); ADV7511_CEC_CTRL_POWER_DOWN);
return 0; return 0;
} }

View file

@ -316,7 +316,7 @@ int adv7511_cec_init(struct device *dev, struct adv7511 *adv7511)
goto err_cec_alloc; goto err_cec_alloc;
} }
regmap_write(adv7511->regmap, ADV7511_REG_CEC_CTRL + offset, 0); regmap_write(adv7511->regmap, ADV7511_REG_CEC_CTRL, 0);
/* cec soft reset */ /* cec soft reset */
regmap_write(adv7511->regmap_cec, regmap_write(adv7511->regmap_cec,
ADV7511_REG_CEC_SOFT_RESET + offset, 0x01); ADV7511_REG_CEC_SOFT_RESET + offset, 0x01);
@ -343,7 +343,7 @@ err_cec_alloc:
dev_info(dev, "Initializing CEC failed with error %d, disabling CEC\n", dev_info(dev, "Initializing CEC failed with error %d, disabling CEC\n",
ret); ret);
err_cec_parse_dt: err_cec_parse_dt:
regmap_write(adv7511->regmap, ADV7511_REG_CEC_CTRL + offset, regmap_write(adv7511->regmap, ADV7511_REG_CEC_CTRL,
ADV7511_CEC_CTRL_POWER_DOWN); ADV7511_CEC_CTRL_POWER_DOWN);
return ret == -EPROBE_DEFER ? ret : 0; return ret == -EPROBE_DEFER ? ret : 0;
} }

View file

@ -290,7 +290,9 @@ static void ge_b850v3_lvds_remove(void)
* This check is to avoid both the drivers * This check is to avoid both the drivers
* removing the bridge in their remove() function * removing the bridge in their remove() function
*/ */
if (!ge_b850v3_lvds_ptr) if (!ge_b850v3_lvds_ptr ||
!ge_b850v3_lvds_ptr->stdp2690_i2c ||
!ge_b850v3_lvds_ptr->stdp4028_i2c)
goto out; goto out;
drm_bridge_remove(&ge_b850v3_lvds_ptr->bridge); drm_bridge_remove(&ge_b850v3_lvds_ptr->bridge);

View file

@ -458,7 +458,13 @@ EXPORT_SYMBOL(drm_invalid_op);
*/ */
static int drm_copy_field(char __user *buf, size_t *buf_len, const char *value) static int drm_copy_field(char __user *buf, size_t *buf_len, const char *value)
{ {
int len; size_t len;
/* don't attempt to copy a NULL pointer */
if (WARN_ONCE(!value, "BUG: the value to copy was not set!")) {
*buf_len = 0;
return 0;
}
/* don't overflow userbuf */ /* don't overflow userbuf */
len = strlen(value); len = strlen(value);

View file

@ -305,6 +305,7 @@ static int mipi_dsi_remove_device_fn(struct device *dev, void *priv)
{ {
struct mipi_dsi_device *dsi = to_mipi_dsi_device(dev); struct mipi_dsi_device *dsi = to_mipi_dsi_device(dev);
mipi_dsi_detach(dsi);
mipi_dsi_device_unregister(dsi); mipi_dsi_device_unregister(dsi);
return 0; return 0;

View file

@ -95,6 +95,12 @@ static const struct dmi_system_id orientation_data[] = {
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "One S1003"), DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "One S1003"),
}, },
.driver_data = (void *)&lcd800x1280_rightside_up, .driver_data = (void *)&lcd800x1280_rightside_up,
}, { /* Anbernic Win600 */
.matches = {
DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "Anbernic"),
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Win600"),
},
.driver_data = (void *)&lcd720x1280_rightside_up,
}, { /* Asus T100HA */ }, { /* Asus T100HA */
.matches = { .matches = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),

View file

@ -654,12 +654,10 @@ static void _dpu_kms_hw_destroy(struct dpu_kms *dpu_kms)
_dpu_kms_mmu_destroy(dpu_kms); _dpu_kms_mmu_destroy(dpu_kms);
if (dpu_kms->catalog) { if (dpu_kms->catalog) {
for (i = 0; i < dpu_kms->catalog->vbif_count; i++) { for (i = 0; i < ARRAY_SIZE(dpu_kms->hw_vbif); i++) {
u32 vbif_idx = dpu_kms->catalog->vbif[i].id; if (dpu_kms->hw_vbif[i]) {
dpu_hw_vbif_destroy(dpu_kms->hw_vbif[i]);
if ((vbif_idx < VBIF_MAX) && dpu_kms->hw_vbif[vbif_idx]) { dpu_kms->hw_vbif[i] = NULL;
dpu_hw_vbif_destroy(dpu_kms->hw_vbif[vbif_idx]);
dpu_kms->hw_vbif[vbif_idx] = NULL;
} }
} }
} }
@ -1094,7 +1092,7 @@ static int dpu_kms_hw_init(struct msm_kms *kms)
for (i = 0; i < dpu_kms->catalog->vbif_count; i++) { for (i = 0; i < dpu_kms->catalog->vbif_count; i++) {
u32 vbif_idx = dpu_kms->catalog->vbif[i].id; u32 vbif_idx = dpu_kms->catalog->vbif[i].id;
dpu_kms->hw_vbif[i] = dpu_hw_vbif_init(vbif_idx, dpu_kms->hw_vbif[vbif_idx] = dpu_hw_vbif_init(vbif_idx,
dpu_kms->vbif[vbif_idx], dpu_kms->catalog); dpu_kms->vbif[vbif_idx], dpu_kms->catalog);
if (IS_ERR_OR_NULL(dpu_kms->hw_vbif[vbif_idx])) { if (IS_ERR_OR_NULL(dpu_kms->hw_vbif[vbif_idx])) {
rc = PTR_ERR(dpu_kms->hw_vbif[vbif_idx]); rc = PTR_ERR(dpu_kms->hw_vbif[vbif_idx]);

View file

@ -18,6 +18,14 @@
#include "dpu_hw_vbif.h" #include "dpu_hw_vbif.h"
#include "dpu_trace.h" #include "dpu_trace.h"
static struct dpu_hw_vbif *dpu_get_vbif(struct dpu_kms *dpu_kms, enum dpu_vbif vbif_idx)
{
if (vbif_idx < ARRAY_SIZE(dpu_kms->hw_vbif))
return dpu_kms->hw_vbif[vbif_idx];
return NULL;
}
/** /**
* _dpu_vbif_wait_for_xin_halt - wait for the xin to halt * _dpu_vbif_wait_for_xin_halt - wait for the xin to halt
* @vbif: Pointer to hardware vbif driver * @vbif: Pointer to hardware vbif driver
@ -155,11 +163,11 @@ exit:
void dpu_vbif_set_ot_limit(struct dpu_kms *dpu_kms, void dpu_vbif_set_ot_limit(struct dpu_kms *dpu_kms,
struct dpu_vbif_set_ot_params *params) struct dpu_vbif_set_ot_params *params)
{ {
struct dpu_hw_vbif *vbif = NULL; struct dpu_hw_vbif *vbif;
struct dpu_hw_mdp *mdp; struct dpu_hw_mdp *mdp;
bool forced_on = false; bool forced_on = false;
u32 ot_lim; u32 ot_lim;
int ret, i; int ret;
if (!dpu_kms) { if (!dpu_kms) {
DPU_ERROR("invalid arguments\n"); DPU_ERROR("invalid arguments\n");
@ -167,12 +175,7 @@ void dpu_vbif_set_ot_limit(struct dpu_kms *dpu_kms,
} }
mdp = dpu_kms->hw_mdp; mdp = dpu_kms->hw_mdp;
for (i = 0; i < ARRAY_SIZE(dpu_kms->hw_vbif); i++) { vbif = dpu_get_vbif(dpu_kms, params->vbif_idx);
if (dpu_kms->hw_vbif[i] &&
dpu_kms->hw_vbif[i]->idx == params->vbif_idx)
vbif = dpu_kms->hw_vbif[i];
}
if (!vbif || !mdp) { if (!vbif || !mdp) {
DPU_DEBUG("invalid arguments vbif %d mdp %d\n", DPU_DEBUG("invalid arguments vbif %d mdp %d\n",
vbif != 0, mdp != 0); vbif != 0, mdp != 0);
@ -217,7 +220,7 @@ exit:
void dpu_vbif_set_qos_remap(struct dpu_kms *dpu_kms, void dpu_vbif_set_qos_remap(struct dpu_kms *dpu_kms,
struct dpu_vbif_set_qos_params *params) struct dpu_vbif_set_qos_params *params)
{ {
struct dpu_hw_vbif *vbif = NULL; struct dpu_hw_vbif *vbif;
struct dpu_hw_mdp *mdp; struct dpu_hw_mdp *mdp;
bool forced_on = false; bool forced_on = false;
const struct dpu_vbif_qos_tbl *qos_tbl; const struct dpu_vbif_qos_tbl *qos_tbl;
@ -229,13 +232,7 @@ void dpu_vbif_set_qos_remap(struct dpu_kms *dpu_kms,
} }
mdp = dpu_kms->hw_mdp; mdp = dpu_kms->hw_mdp;
for (i = 0; i < ARRAY_SIZE(dpu_kms->hw_vbif); i++) { vbif = dpu_get_vbif(dpu_kms, params->vbif_idx);
if (dpu_kms->hw_vbif[i] &&
dpu_kms->hw_vbif[i]->idx == params->vbif_idx) {
vbif = dpu_kms->hw_vbif[i];
break;
}
}
if (!vbif || !vbif->cap) { if (!vbif || !vbif->cap) {
DPU_ERROR("invalid vbif %d\n", params->vbif_idx); DPU_ERROR("invalid vbif %d\n", params->vbif_idx);

View file

@ -74,7 +74,8 @@ static int mdp4_lvds_connector_get_modes(struct drm_connector *connector)
return ret; return ret;
} }
static int mdp4_lvds_connector_mode_valid(struct drm_connector *connector, static enum drm_mode_status
mdp4_lvds_connector_mode_valid(struct drm_connector *connector,
struct drm_display_mode *mode) struct drm_display_mode *mode)
{ {
struct mdp4_lvds_connector *mdp4_lvds_connector = struct mdp4_lvds_connector *mdp4_lvds_connector =

View file

@ -200,6 +200,12 @@ int msm_dsi_modeset_init(struct msm_dsi *msm_dsi, struct drm_device *dev,
return -EINVAL; return -EINVAL;
priv = dev->dev_private; priv = dev->dev_private;
if (priv->num_bridges == ARRAY_SIZE(priv->bridges)) {
DRM_DEV_ERROR(dev->dev, "too many bridges\n");
return -ENOSPC;
}
msm_dsi->dev = dev; msm_dsi->dev = dev;
ret = msm_dsi_host_modeset_init(msm_dsi->host, dev); ret = msm_dsi_host_modeset_init(msm_dsi->host, dev);

View file

@ -299,6 +299,11 @@ int msm_hdmi_modeset_init(struct hdmi *hdmi,
struct platform_device *pdev = hdmi->pdev; struct platform_device *pdev = hdmi->pdev;
int ret; int ret;
if (priv->num_bridges == ARRAY_SIZE(priv->bridges)) {
DRM_DEV_ERROR(dev->dev, "too many bridges\n");
return -ENOSPC;
}
hdmi->dev = dev; hdmi->dev = dev;
hdmi->encoder = encoder; hdmi->encoder = encoder;

View file

@ -291,7 +291,7 @@ static void vc4_vec_ntsc_j_mode_set(struct vc4_vec *vec)
static const struct drm_display_mode ntsc_mode = { static const struct drm_display_mode ntsc_mode = {
DRM_MODE("720x480", DRM_MODE_TYPE_DRIVER, 13500, DRM_MODE("720x480", DRM_MODE_TYPE_DRIVER, 13500,
720, 720 + 14, 720 + 14 + 64, 720 + 14 + 64 + 60, 0, 720, 720 + 14, 720 + 14 + 64, 720 + 14 + 64 + 60, 0,
480, 480 + 3, 480 + 3 + 3, 480 + 3 + 3 + 16, 0, 480, 480 + 7, 480 + 7 + 6, 525, 0,
DRM_MODE_FLAG_INTERLACE) DRM_MODE_FLAG_INTERLACE)
}; };
@ -313,7 +313,7 @@ static void vc4_vec_pal_m_mode_set(struct vc4_vec *vec)
static const struct drm_display_mode pal_mode = { static const struct drm_display_mode pal_mode = {
DRM_MODE("720x576", DRM_MODE_TYPE_DRIVER, 13500, DRM_MODE("720x576", DRM_MODE_TYPE_DRIVER, 13500,
720, 720 + 20, 720 + 20 + 64, 720 + 20 + 64 + 60, 0, 720, 720 + 20, 720 + 20 + 64, 720 + 20 + 64 + 60, 0,
576, 576 + 2, 576 + 2 + 3, 576 + 2 + 3 + 20, 0, 576, 576 + 4, 576 + 4 + 6, 625, 0,
DRM_MODE_FLAG_INTERLACE) DRM_MODE_FLAG_INTERLACE)
}; };

View file

@ -343,7 +343,7 @@ static int magicmouse_raw_event(struct hid_device *hdev,
magicmouse_raw_event(hdev, report, data + 2, data[1]); magicmouse_raw_event(hdev, report, data + 2, data[1]);
magicmouse_raw_event(hdev, report, data + 2 + data[1], magicmouse_raw_event(hdev, report, data + 2 + data[1],
size - 2 - data[1]); size - 2 - data[1]);
break; return 0;
default: default:
return 0; return 0;
} }

View file

@ -1154,7 +1154,7 @@ static void mt_touch_report(struct hid_device *hid,
int contact_count = -1; int contact_count = -1;
/* sticky fingers release in progress, abort */ /* sticky fingers release in progress, abort */
if (test_and_set_bit(MT_IO_FLAGS_RUNNING, &td->mt_io_flags)) if (test_and_set_bit_lock(MT_IO_FLAGS_RUNNING, &td->mt_io_flags))
return; return;
scantime = *app->scantime; scantime = *app->scantime;
@ -1235,7 +1235,7 @@ static void mt_touch_report(struct hid_device *hid,
del_timer(&td->release_timer); del_timer(&td->release_timer);
} }
clear_bit(MT_IO_FLAGS_RUNNING, &td->mt_io_flags); clear_bit_unlock(MT_IO_FLAGS_RUNNING, &td->mt_io_flags);
} }
static int mt_touch_input_configured(struct hid_device *hdev, static int mt_touch_input_configured(struct hid_device *hdev,
@ -1672,11 +1672,11 @@ static void mt_expired_timeout(struct timer_list *t)
* An input report came in just before we release the sticky fingers, * An input report came in just before we release the sticky fingers,
* it will take care of the sticky fingers. * it will take care of the sticky fingers.
*/ */
if (test_and_set_bit(MT_IO_FLAGS_RUNNING, &td->mt_io_flags)) if (test_and_set_bit_lock(MT_IO_FLAGS_RUNNING, &td->mt_io_flags))
return; return;
if (test_bit(MT_IO_FLAGS_PENDING_SLOTS, &td->mt_io_flags)) if (test_bit(MT_IO_FLAGS_PENDING_SLOTS, &td->mt_io_flags))
mt_release_contacts(hdev); mt_release_contacts(hdev);
clear_bit(MT_IO_FLAGS_RUNNING, &td->mt_io_flags); clear_bit_unlock(MT_IO_FLAGS_RUNNING, &td->mt_io_flags);
} }
static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id) static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id)

View file

@ -260,6 +260,8 @@ int roccat_report_event(int minor, u8 const *data)
if (!new_value) if (!new_value)
return -ENOMEM; return -ENOMEM;
mutex_lock(&device->cbuf_lock);
report = &device->cbuf[device->cbuf_end]; report = &device->cbuf[device->cbuf_end];
/* passing NULL is safe */ /* passing NULL is safe */
@ -279,6 +281,8 @@ int roccat_report_event(int minor, u8 const *data)
reader->cbuf_start = (reader->cbuf_start + 1) % ROCCAT_CBUF_SIZE; reader->cbuf_start = (reader->cbuf_start + 1) % ROCCAT_CBUF_SIZE;
} }
mutex_unlock(&device->cbuf_lock);
wake_up_interruptible(&device->wait); wake_up_interruptible(&device->wait);
return 0; return 0;
} }

View file

@ -560,6 +560,7 @@ static int ssi_probe(struct platform_device *pd)
if (!childpdev) { if (!childpdev) {
err = -ENODEV; err = -ENODEV;
dev_err(&pd->dev, "failed to create ssi controller port\n"); dev_err(&pd->dev, "failed to create ssi controller port\n");
of_node_put(child);
goto out3; goto out3;
} }
} }

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