Merge tag 'ASB-2021-04-05_4.19-stable' of https://github.com/aosp-mirror/kernel_common into android12-base

https://source.android.com/security/bulletin/2021-04-01
CVE-2020-15436
CVE-2020-29368
CVE-2020-25705

* tag 'ASB-2021-04-05_4.19-stable' of https://github.com/aosp-mirror/kernel_common:
  ANDROID: Add OWNERS files referring to the respective android-mainline OWNERS
  BACKPORT: drm/virtio: Use vmalloc for command buffer allocations.
  UPSTREAM: drm/virtio: Rewrite virtio_gpu_queue_ctrl_buffer using fenced version.
  ANDROID: Make vsock virtio packet buff size configurable
  ANDROID: fix up ext4 build from 4.19.183
  ANDROID: refresh ABI XML to new version
  ANDROID: refresh ABI XML
  Linux 4.19.183
  cifs: Fix preauth hash corruption
  x86/apic/of: Fix CPU devicetree-node lookups
  genirq: Disable interrupts for force threaded handlers
  ext4: fix potential error in ext4_do_update_inode
  ext4: do not try to set xattr into ea_inode if value is empty
  ext4: find old entry again if failed to rename whiteout
  x86: Introduce TS_COMPAT_RESTART to fix get_nr_restart_syscall()
  x86: Move TS_COMPAT back to asm/thread_info.h
  kernel, fs: Introduce and use set_restart_fn() and arch_set_restart_data()
  x86/ioapic: Ignore IRQ2 again
  perf/x86/intel: Fix a crash caused by zero PEBS status
  PCI: rpadlpar: Fix potential drc_name corruption in store functions
  iio: hid-sensor-temperature: Fix issues of timestamp channel
  iio: hid-sensor-prox: Fix scale not correct issue
  iio: hid-sensor-humidity: Fix alignment issue of timestamp channel
  iio: gyro: mpu3050: Fix error handling in mpu3050_trigger_handler
  iio: adis16400: Fix an error code in adis16400_initial_setup()
  iio:adc:qcom-spmi-vadc: add default scale to LR_MUX2_BAT_ID channel
  iio:adc:stm32-adc: Add HAS_IOMEM dependency
  usb: gadget: configfs: Fix KASAN use-after-free
  USB: replace hardcode maximum usb string length by definition
  usbip: Fix incorrect double assignment to udc->ud.tcp_rx
  usb-storage: Add quirk to defeat Kindle's automatic unload
  powerpc: Force inlining of cpu_has_feature() to avoid build failure
  nvme-rdma: fix possible hang when failing to set io queues
  scsi: lpfc: Fix some error codes in debugfs
  net/qrtr: fix __netdev_alloc_skb call
  sunrpc: fix refcount leak for rpc auth modules
  svcrdma: disable timeouts on rdma backchannel
  NFSD: Repair misuse of sv_lock in 5.10.16-rt30.
  nvmet: don't check iosqes,iocqes for discovery controllers
  ASoC: fsl_ssi: Fix TDM slot setup for I2S mode
  btrfs: fix slab cache flags for free space tree bitmap
  btrfs: fix race when cloning extent buffer during rewind of an old root
  tools build: Check if gettid() is available before providing helper
  tools build feature: Check if eventfd() is available
  tools build feature: Check if get_current_dir_name() is available
  perf tools: Use %define api.pure full instead of %pure-parser
  lkdtm: don't move ctors to .rodata
  vmlinux.lds.h: Create section for protection against instrumentation
  Revert "PM: runtime: Update device status before letting suppliers suspend"
  ALSA: hda: generic: Fix the micmute led init state
  ASoC: ak5558: Add MODULE_DEVICE_TABLE
  ASoC: ak4458: Add MODULE_DEVICE_TABLE
  ANDROID: clang: update to 12.0.4
  Linux 4.19.182
  net: dsa: b53: Support setting learning on port
  net: dsa: tag_mtk: fix 802.1ad VLAN egress
  bpf: Add sanity check for upper ptr_limit
  bpf: Simplify alu_limit masking for pointer arithmetic
  bpf: Fix off-by-one for area size in creating mask to left
  bpf: Prohibit alu ops for pointer types not defining ptr_limit
  KVM: arm64: nvhe: Save the SPE context early
  ext4: check journal inode extents more carefully
  Revert "net: Introduce parse_protocol header_ops callback"
  Revert "net: check if protocol extracted by virtio_net_hdr_set_proto is correct"
  Linux 4.19.181
  xen/events: avoid handling the same event on two cpus at the same time
  xen/events: don't unmask an event channel when an eoi is pending
  xen/events: reset affinity of 2-level event when tearing it down
  KVM: arm64: Fix exclusive limit for IPA size
  hwmon: (lm90) Fix max6658 sporadic wrong temperature reading
  x86/unwind/orc: Disable KASAN checking in the ORC unwinder, part 2
  binfmt_misc: fix possible deadlock in bm_register_write
  powerpc/64s: Fix instruction encoding for lis in ppc_function_entry()
  include/linux/sched/mm.h: use rcu_dereference in in_vfork()
  stop_machine: mark helpers __always_inline
  hrtimer: Update softirq_expires_next correctly after __hrtimer_get_next_event()
  configfs: fix a use-after-free in __configfs_open_file
  block: rsxx: fix error return code of rsxx_pci_probe()
  NFSv4.2: fix return value of _nfs4_get_security_label()
  sh_eth: fix TRSCER mask for R7S72100
  staging: comedi: pcl818: Fix endian problem for AI command data
  staging: comedi: pcl711: Fix endian problem for AI command data
  staging: comedi: me4000: Fix endian problem for AI command data
  staging: comedi: dmm32at: Fix endian problem for AI command data
  staging: comedi: das800: Fix endian problem for AI command data
  staging: comedi: das6402: Fix endian problem for AI command data
  staging: comedi: adv_pci1710: Fix endian problem for AI command data
  staging: comedi: addi_apci_1500: Fix endian problem for command sample
  staging: comedi: addi_apci_1032: Fix endian problem for COS sample
  staging: rtl8192e: Fix possible buffer overflow in _rtl92e_wx_set_scan
  staging: rtl8712: Fix possible buffer overflow in r8712_sitesurvey_cmd
  staging: ks7010: prevent buffer overflow in ks_wlan_set_scan()
  staging: rtl8188eu: fix potential memory corruption in rtw_check_beacon_data()
  staging: rtl8712: unterminated string leads to read overflow
  staging: rtl8188eu: prevent ->ssid overflow in rtw_wx_set_scan()
  staging: rtl8192u: fix ->ssid overflow in r8192_wx_set_scan()
  usbip: fix vudc usbip_sockfd_store races leading to gpf
  usbip: fix vhci_hcd attach_store() races leading to gpf
  usbip: fix stub_dev usbip_sockfd_store() races leading to gpf
  usbip: fix vudc to check for stream socket
  usbip: fix vhci_hcd to check for stream socket
  usbip: fix stub_dev to check for stream socket
  USB: serial: cp210x: add some more GE USB IDs
  USB: serial: cp210x: add ID for Acuity Brands nLight Air Adapter
  USB: serial: ch341: add new Product ID
  USB: serial: io_edgeport: fix memory leak in edge_startup
  usb: xhci: Fix ASMedia ASM1042A and ASM3242 DMA addressing
  xhci: Improve detection of device initiated wake signal.
  usb: renesas_usbhs: Clear PIPECFG for re-enabling pipe with other EPNUM
  USB: usblp: fix a hang in poll() if disconnected
  usb: dwc3: qcom: Honor wakeup enabled/disabled state
  usb: gadget: f_uac1: stop playback on function disable
  usb: gadget: f_uac2: always increase endpoint max_packet_size by one audio slot
  USB: gadget: u_ether: Fix a configfs return code
  Goodix Fingerprint device is not a modem
  mmc: cqhci: Fix random crash when remove mmc module/card
  mmc: core: Fix partition switch time for eMMC
  s390/dasd: fix hanging IO request during DASD driver unbind
  s390/dasd: fix hanging DASD driver unbind
  Revert 95ebabde382c ("capabilities: Don't allow writing ambiguous v3 file capabilities")
  ALSA: usb-audio: Apply the control quirk to Plantronics headsets
  ALSA: usb-audio: Fix "cannot get freq eq" errors on Dell AE515 sound bar
  ALSA: hda: Avoid spurious unsol event handling during S3/S4
  ALSA: hda: Drop the BATCH workaround for AMD controllers
  ALSA: hda/hdmi: Cancel pending works before suspend
  ALSA: usb: Add Plantronics C320-M USB ctrl msg delay quirk
  scsi: target: core: Prevent underflow for service actions
  scsi: target: core: Add cmd length set before cmd complete
  scsi: libiscsi: Fix iscsi_prep_scsi_cmd_pdu() error handling
  s390/smp: __smp_rescan_cpus() - move cpumask away from stack
  i40e: Fix memory leak in i40e_probe
  PCI: Fix pci_register_io_range() memory leak
  PCI: mediatek: Add missing of_node_put() to fix reference leak
  PCI: xgene-msi: Fix race in installing chained irq handler
  sparc64: Use arch_validate_flags() to validate ADI flag
  sparc32: Limit memblock allocation to low memory
  powerpc/perf: Record counter overflow always if SAMPLE_IP is unset
  powerpc: improve handling of unrecoverable system reset
  powerpc/pci: Add ppc_md.discover_phbs()
  mmc: mediatek: fix race condition between msdc_request_timeout and irq
  mmc: mxs-mmc: Fix a resource leak in an error handling path in 'mxs_mmc_probe()'
  udf: fix silent AED tagLocation corruption
  i2c: rcar: optimize cacheline to minimize HW race condition
  net: phy: fix save wrong speed and duplex problem if autoneg is on
  media: v4l: vsp1: Fix bru null pointer access
  media: v4l: vsp1: Fix uif null pointer access
  media: usbtv: Fix deadlock on suspend
  sh_eth: fix TRSCER mask for R7S9210
  s390/cio: return -EFAULT if copy_to_user() fails
  drm: meson_drv add shutdown function
  drm/compat: Clear bounce structures
  s390/cio: return -EFAULT if copy_to_user() fails again
  perf traceevent: Ensure read cmdlines are null terminated.
  selftests: forwarding: Fix race condition in mirror installation
  net: stmmac: fix watchdog timeout during suspend/resume stress test
  net: stmmac: stop each tx channel independently
  net: qrtr: fix error return code of qrtr_sendmsg()
  net: davicom: Fix regulator not turned off on driver removal
  net: davicom: Fix regulator not turned off on failed probe
  net: lapbether: Remove netif_start_queue / netif_stop_queue
  cipso,calipso: resolve a number of problems with the DOI refcounts
  net: usb: qmi_wwan: allow qmimux add/del with master up
  net: sched: avoid duplicates in classes dump
  net: stmmac: fix incorrect DMA channel intr enable setting of EQoS v4.10
  net/mlx4_en: update moderation when config reset
  net: avoid infinite loop in mpls_gso_segment when mpls_hlen == 0
  net: check if protocol extracted by virtio_net_hdr_set_proto is correct
  sh_eth: fix TRSCER mask for SH771x
  Revert "mm, slub: consider rest of partial list if acquire_slab() fails"
  scripts/recordmcount.{c,pl}: support -ffunction-sections .text.* section names
  cifs: return proper error code in statfs(2)
  tcp: add sanity tests to TCP_QUEUE_SEQ
  tcp: annotate tp->write_seq lockless reads
  tcp: annotate tp->copied_seq lockless reads
  mt76: dma: do not report truncated frames to mac80211
  netfilter: x_tables: gpf inside xt_find_revision()
  can: flexcan: enable RX FIFO after FRZ/HALT valid
  can: flexcan: assert FRZ bit in flexcan_chip_freeze()
  can: skb: can_skb_set_owner(): fix ref counting if socket was closed before setting skb ownership
  net: Introduce parse_protocol header_ops callback
  net: Fix gro aggregation for udp encaps with zero csum
  ath9k: fix transmitting to stations in dynamic SMPS mode
  ethernet: alx: fix order of calls on resume
  uapi: nfnetlink_cthelper.h: fix userspace compilation error
  FROMGIT: configfs: fix a use-after-free in __configfs_open_file
  ANDROID: GKI: Enable CONFIG_BT for x86
  Revert "Revert "zram: close udev startup race condition as default groups""
  Revert "block: genhd: add 'groups' argument to device_add_disk"
  Revert "nvme: register ns_id attributes as default sysfs groups"
  Revert "aoe: register default groups with device_add_disk()"
  Revert "zram: register default groups with device_add_disk()"
  Revert "virtio-blk: modernize sysfs attribute creation"
  Linux 4.19.180
  mmc: sdhci-of-dwcmshc: set SDHCI_QUIRK2_PRESET_VALUE_BROKEN
  drm/msm/a5xx: Remove overwriting A5XX_PC_DBG_ECO_CNTL register
  misc: eeprom_93xx46: Add quirk to support Microchip 93LC46B eeprom
  PCI: Add function 1 DMA alias quirk for Marvell 9215 SATA controller
  ASoC: Intel: bytcr_rt5640: Add quirk for ARCHOS Cesium 140
  media: cx23885: add more quirks for reset DMA on some AMD IOMMU
  HID: mf: add support for 0079:1846 Mayflash/Dragonrise USB Gamecube Adapter
  platform/x86: acer-wmi: Add ACER_CAP_KBD_DOCK quirk for the Aspire Switch 10E SW3-016
  platform/x86: acer-wmi: Add support for SW_TABLET_MODE on Switch devices
  platform/x86: acer-wmi: Add ACER_CAP_SET_FUNCTION_MODE capability flag
  platform/x86: acer-wmi: Add new force_caps module parameter
  platform/x86: acer-wmi: Cleanup accelerometer device handling
  platform/x86: acer-wmi: Cleanup ACER_CAP_FOO defines
  mwifiex: pcie: skip cancel_work_sync() on reset failure path
  iommu/amd: Fix sleeping in atomic in increase_address_space()
  dm table: fix zoned iterate_devices based device capability checks
  dm table: fix DAX iterate_devices based device capability checks
  dm table: fix iterate_devices based device capability checks
  net: dsa: add GRO support via gro_cells
  r8169: fix resuming from suspend on RTL8105e if machine runs on battery
  dm verity: fix FEC for RS roots unaligned to block size
  rsxx: Return -EFAULT if copy_to_user() fails
  RDMA/rxe: Fix missing kconfig dependency on CRYPTO
  ALSA: ctxfi: cthw20k2: fix mask on conf to allow 4 bits
  virtio-blk: modernize sysfs attribute creation
  zram: register default groups with device_add_disk()
  aoe: register default groups with device_add_disk()
  nvme: register ns_id attributes as default sysfs groups
  block: genhd: add 'groups' argument to device_add_disk
  Revert "zram: close udev startup race condition as default groups"
  usbip: tools: fix build error for multiple definition
  drm/amdgpu: fix parameter error of RREG32_PCIE() in amdgpu_regs_pcie
  dm bufio: subtract the number of initial sectors in dm_bufio_get_device_size
  PM: runtime: Update device status before letting suppliers suspend
  btrfs: unlock extents in btrfs_zero_range in case of quota reservation errors
  btrfs: free correct amount of space in btrfs_delayed_inode_reserve_metadata
  btrfs: validate qgroup inherit for SNAP_CREATE_V2 ioctl
  btrfs: fix raid6 qstripe kmap
  btrfs: raid56: simplify tracking of Q stripe presence
  ANDROID: GKI: hack up fs/sysfs/file.c to prevent GENKSYMS change
  Revert "arm64: Avoid redundant type conversions in xchg() and cmpxchg()"
  Linux 4.19.179
  ALSA: hda/realtek: Apply dual codec quirks for MSI Godlike X570 board
  ALSA: hda/realtek: Add quirk for Clevo NH55RZQ
  media: v4l: ioctl: Fix memory leak in video_usercopy
  swap: fix swapfile read/write offset
  zsmalloc: account the number of compacted pages correctly
  xen-netback: respect gnttab_map_refs()'s return value
  Xen/gnttab: handle p2m update errors on a per-slot basis
  scsi: iscsi: Verify lengths on passthrough PDUs
  scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE
  sysfs: Add sysfs_emit and sysfs_emit_at to format sysfs output
  scsi: iscsi: Restrict sessions and handles to admin capabilities
  ASoC: Intel: bytcr_rt5640: Add quirk for the Acer One S1002 tablet
  ASoC: Intel: bytcr_rt5640: Add quirk for the Voyo Winpad A15 tablet
  ASoC: Intel: bytcr_rt5640: Add quirk for the Estar Beauty HD MID 7316R tablet
  parisc: Bump 64-bit IRQ stack size to 64 KB
  btrfs: fix error handling in commit_fs_roots
  f2fs: fix to set/clear I_LINKABLE under i_lock
  f2fs: handle unallocated section and zone on pinned/atgc
  media: uvcvideo: Allow entities with no pads
  drm/amd/display: Guard against NULL pointer deref when get_i2c_info fails
  PCI: Add a REBAR size quirk for Sapphire RX 5600 XT Pulse
  crypto: tcrypt - avoid signed overflow in byte count
  staging: most: sound: add sanity check for function argument
  Bluetooth: Fix null pointer dereference in amp_read_loc_assoc_final_data
  x86/build: Treat R_386_PLT32 relocation as R_386_PC32
  ath10k: fix wmi mgmt tx queue full due to race condition
  pktgen: fix misuse of BUG_ON() in pktgen_thread_worker()
  Bluetooth: hci_h5: Set HCI_QUIRK_SIMULTANEOUS_DISCOVERY for btrtl
  wlcore: Fix command execute failure 19 for wl12xx
  vt/consolemap: do font sum unsigned
  x86/reboot: Add Zotac ZBOX CI327 nano PCI reboot quirk
  staging: fwserial: Fix error handling in fwserial_create
  rsi: Move card interrupt handling to RX thread
  rsi: Fix TX EAPOL packet handling against iwlwifi AP
  dt-bindings: net: btusb: DT fix s/interrupt-name/interrupt-names/
  net: bridge: use switchdev for port flags set through sysfs too
  mm/hugetlb.c: fix unnecessary address expansion of pmd sharing
  net: fix up truesize of cloned skb in skb_prepare_for_shift()
  smackfs: restrict bytes count in smackfs write functions
  xfs: Fix assert failure in xfs_setattr_size()
  media: mceusb: sanity check for prescaler value
  udlfb: Fix memory leak in dlfb_usb_probe
  JFS: more checks for invalid superblock
  MIPS: VDSO: Use CLANG_FLAGS instead of filtering out '--target='
  arm64: Use correct ll/sc atomic constraints
  arm64: cmpxchg: Use "K" instead of "L" for ll/sc immediate constraint
  arm64: Avoid redundant type conversions in xchg() and cmpxchg()
  arm64 module: set plt* section addresses to 0x0
  virtio/s390: implement virtio-ccw revision 2 correctly
  drm/virtio: use kvmalloc for large allocations
  hugetlb: fix update_and_free_page contig page struct assumption
  net: usb: qmi_wwan: support ZTE P685M modem
  ANDROID: clang: update to 12.0.3
  Revert "block: split .sysfs_lock into two locks"
  Revert "block: fix race between switching elevator and removing queues"
  Revert "block: don't release queue's sysfs lock during switching elevator"
  Revert "dm: fix deadlock when swapping to encrypted device"
  Linux 4.19.178
  ARM: dts: aspeed: Add LCLK to lpc-snoop
  net: qrtr: Fix memory leak in qrtr_tun_open
  dm era: Update in-core bitset after committing the metadata
  net: icmp: pass zeroed opts from icmp{,v6}_ndo_send before sending
  ipv6: silence compilation warning for non-IPV6 builds
  ipv6: icmp6: avoid indirect call for icmpv6_send()
  xfrm: interface: use icmp_ndo_send helper
  sunvnet: use icmp_ndo_send helper
  gtp: use icmp_ndo_send helper
  icmp: allow icmpv6_ndo_send to work with CONFIG_IPV6=n
  icmp: introduce helper for nat'd source address in network device context
  dm era: only resize metadata in preresume
  dm era: Reinitialize bitset cache before digesting a new writeset
  dm era: Use correct value size in equality function of writeset tree
  dm era: Fix bitset memory leaks
  dm era: Verify the data block size hasn't changed
  dm era: Recover committed writeset after crash
  dm: fix deadlock when swapping to encrypted device
  gfs2: Don't skip dlm unlock if glock has an lvb
  sparc32: fix a user-triggerable oops in clear_user()
  f2fs: fix out-of-repair __setattr_copy()
  cpufreq: intel_pstate: Get per-CPU max freq via MSR_HWP_CAPABILITIES if available
  printk: fix deadlock when kernel panic
  gpio: pcf857x: Fix missing first interrupt
  mmc: sdhci-esdhc-imx: fix kernel panic when remove module
  module: Ignore _GLOBAL_OFFSET_TABLE_ when warning for undefined symbols
  arm64: Extend workaround for erratum 1024718 to all versions of Cortex-A55
  libnvdimm/dimm: Avoid race between probe and available_slots_show()
  hugetlb: fix copy_huge_page_from_user contig page struct assumption
  x86: fix seq_file iteration for pat/memtype.c
  seq_file: document how per-entry resources are managed.
  fs/affs: release old buffer head on error path
  mtd: spi-nor: hisi-sfc: Put child node np on error path
  watchdog: mei_wdt: request stop on unregister
  arm64: uprobe: Return EOPNOTSUPP for AARCH32 instruction probing
  floppy: reintroduce O_NDELAY fix
  x86/reboot: Force all cpus to exit VMX root if VMX is supported
  media: ipu3-cio2: Fix mbus_code processing in cio2_subdev_set_fmt()
  staging: rtl8188eu: Add Edimax EW-7811UN V2 to device table
  staging: gdm724x: Fix DMA from stack
  staging/mt7621-dma: mtk-hsdma.c->hsdma-mt7621.c
  dts64: mt7622: fix slow sd card access
  pstore: Fix typo in compression option name
  drivers/misc/vmw_vmci: restrict too big queue size in qp_host_alloc_queue
  misc: rtsx: init of rts522a add OCP power off when no card is present
  seccomp: Add missing return in non-void function
  crypto: sun4i-ss - handle BigEndian for cipher
  crypto: sun4i-ss - checking sg length is not sufficient
  crypto: arm64/sha - add missing module aliases
  btrfs: fix extent buffer leak on failure to copy root
  btrfs: fix reloc root leak with 0 ref reloc roots on recovery
  btrfs: abort the transaction if we fail to inc ref in btrfs_copy_root
  KEYS: trusted: Fix migratable=1 failing
  tpm_tis: Clean up locality release
  tpm_tis: Fix check_locality for correct locality acquisition
  ALSA: hda/realtek: modify EAPD in the ALC886
  USB: serial: mos7720: fix error code in mos7720_write()
  USB: serial: mos7840: fix error code in mos7840_write()
  USB: serial: ftdi_sio: fix FTX sub-integer prescaler
  usb: dwc3: gadget: Fix dep->interval for fullspeed interrupt
  usb: dwc3: gadget: Fix setting of DEPCFG.bInterval_m1
  usb: musb: Fix runtime PM race in musb_queue_resume_work
  USB: serial: option: update interface mapping for ZTE P685M
  Input: i8042 - add ASUS Zenbook Flip to noselftest list
  Input: joydev - prevent potential read overflow in ioctl
  Input: xpad - add support for PowerA Enhanced Wired Controller for Xbox Series X|S
  Input: raydium_ts_i2c - do not send zero length
  HID: wacom: Ignore attempts to overwrite the touch_max value from HID
  ACPI: configfs: add missing check after configfs_register_default_group()
  ACPI: property: Fix fwnode string properties matching
  blk-settings: align max_sectors on "logical_block_size" boundary
  scsi: bnx2fc: Fix Kconfig warning & CNIC build errors
  mm/rmap: fix potential pte_unmap on an not mapped pte
  i2c: brcmstb: Fix brcmstd_send_i2c_cmd condition
  arm64: Add missing ISB after invalidating TLB in __primary_switch
  r8169: fix jumbo packet handling on RTL8168e
  mm/hugetlb: fix potential double free in hugetlb_register_node() error path
  mm/memory.c: fix potential pte_unmap_unlock pte error
  ocfs2: fix a use after free on error
  vxlan: move debug check after netdev unregister
  net/mlx4_core: Add missed mlx4_free_cmd_mailbox()
  i40e: Fix add TC filter for IPv6
  i40e: Fix VFs not created
  i40e: Fix overwriting flow control settings during driver loading
  i40e: Add zero-initialization of AQ command structures
  i40e: Fix flow for IPv6 next header (extension header)
  regmap: sdw: use _no_pm functions in regmap_read/write
  ext4: fix potential htree index checksum corruption
  drm/msm/dsi: Correct io_start for MSM8994 (20nm PHY)
  PCI: Align checking of syscall user config accessors
  VMCI: Use set_page_dirty_lock() when unregistering guest memory
  pwm: rockchip: rockchip_pwm_probe(): Remove superfluous clk_unprepare()
  misc: eeprom_93xx46: Add module alias to avoid breaking support for non device tree users
  misc: eeprom_93xx46: Fix module alias to enable module autoprobe
  sparc64: only select COMPAT_BINFMT_ELF if BINFMT_ELF is set
  Input: elo - fix an error code in elo_connect()
  perf test: Fix unaligned access in sample parsing test
  perf intel-pt: Fix missing CYC processing in PSB
  Input: sur40 - fix an error code in sur40_probe()
  spi: pxa2xx: Fix the controller numbering for Wildcat Point
  clk: qcom: gcc-msm8998: Fix Alpha PLL type for all GPLLs
  powerpc/8xx: Fix software emulation interrupt
  powerpc/pseries/dlpar: handle ibm, configure-connector delay status
  mfd: wm831x-auxadc: Prevent use after free in wm831x_auxadc_read_irq()
  spi: stm32: properly handle 0 byte transfer
  RDMA/rxe: Correct skb on loopback path
  RDMA/rxe: Fix coding error in rxe_recv.c
  perf tools: Fix DSO filtering when not finding a map for a sampled address
  tracepoint: Do not fail unregistering a probe due to memory failure
  amba: Fix resource leak for drivers without .remove
  ARM: 9046/1: decompressor: Do not clear SCTLR.nTLSMD for ARMv7+ cores
  mmc: renesas_sdhi_internal_dmac: Fix DMA buffer alignment from 8 to 128-bytes
  mmc: usdhi6rol0: Fix a resource leak in the error handling path of the probe
  powerpc/47x: Disable 256k page size
  KVM: PPC: Make the VMX instruction emulation routines static
  IB/umad: Return EPOLLERR in case of when device disassociated
  IB/umad: Return EIO in case of when device disassociated
  auxdisplay: ht16k33: Fix refresh rate handling
  isofs: release buffer head before return
  regulator: s5m8767: Drop regulators OF node reference
  spi: atmel: Put allocated master before return
  certs: Fix blacklist flag type confusion
  regulator: axp20x: Fix reference cout leak
  clk: sunxi-ng: h6: Fix clock divider range on some clocks
  RDMA/mlx5: Use the correct obj_id upon DEVX TIR creation
  clocksource/drivers/mxs_timer: Add missing semicolon when DEBUG is defined
  rtc: s5m: select REGMAP_I2C
  power: reset: at91-sama5d2_shdwc: fix wkupdbc mask
  of/fdt: Make sure no-map does not remove already reserved regions
  fdt: Properly handle "no-map" field in the memory region
  mfd: bd9571mwv: Use devm_mfd_add_devices()
  dmaengine: hsu: disable spurious interrupt
  dmaengine: owl-dma: Fix a resource leak in the remove function
  dmaengine: fsldma: Fix a resource leak in an error handling path of the probe function
  dmaengine: fsldma: Fix a resource leak in the remove function
  HID: core: detect and skip invalid inputs to snto32()
  clk: sunxi-ng: h6: Fix CEC clock
  spi: cadence-quadspi: Abort read if dummy cycles required are too many
  quota: Fix memory leak when handling corrupted quota file
  clk: meson: clk-pll: fix initializing the old rate (fallback) for a PLL
  capabilities: Don't allow writing ambiguous v3 file capabilities
  jffs2: fix use after free in jffs2_sum_write_data()
  fs/jfs: fix potential integer overflow on shift of a int
  ima: Free IMA measurement buffer after kexec syscall
  ima: Free IMA measurement buffer on error
  crypto: ecdh_helper - Ensure 'len >= secret.len' in decode_key()
  hwrng: timeriomem - Fix cooldown period calculation
  btrfs: clarify error returns values in __load_free_space_cache
  Drivers: hv: vmbus: Avoid use-after-free in vmbus_onoffer_rescind()
  drm/amdgpu: Prevent shift wrapping in amdgpu_read_mask()
  f2fs: fix to avoid inconsistent quota data
  ASoC: cpcap: fix microphone timeslot mask
  ata: ahci_brcm: Add back regulators management
  crypto: talitos - Work around SEC6 ERRATA (AES-CTR mode data size error)
  media: uvcvideo: Accept invalid bFormatIndex and bFrameIndex values
  media: pxa_camera: declare variable when DEBUG is defined
  media: cx25821: Fix a bug when reallocating some dma memory
  media: qm1d1c0042: fix error return code in qm1d1c0042_init()
  media: lmedm04: Fix misuse of comma
  drm/amd/display: Fix 10/12 bpc setup in DCE output bit depth reduction.
  crypto: bcm - Rename struct device_private to bcm_device_private
  ASoC: cs42l56: fix up error handling in probe
  media: tm6000: Fix memleak in tm6000_start_stream
  media: media/pci: Fix memleak in empress_init
  media: em28xx: Fix use-after-free in em28xx_alloc_urbs
  media: vsp1: Fix an error handling path in the probe function
  media: camss: missing error code in msm_video_register()
  media: i2c: ov5670: Fix PIXEL_RATE minimum value
  MIPS: lantiq: Explicitly compare LTQ_EBU_PCC_ISTAT against 0
  MIPS: c-r4k: Fix section mismatch for loongson2_sc_init
  drm/amdgpu: Fix macro name _AMDGPU_TRACE_H_ in preprocessor if condition
  crypto: sun4i-ss - fix kmap usage
  gma500: clean up error handling in init
  drm/gma500: Fix error return code in psb_driver_load()
  fbdev: aty: SPARC64 requires FB_ATY_CT
  net: mvneta: Remove per-cpu queue mapping for Armada 3700
  net: amd-xgbe: Fix network fluctuations when using 1G BELFUSE SFP
  net: amd-xgbe: Reset link when the link never comes back
  net: amd-xgbe: Fix NETDEV WATCHDOG transmit queue timeout warning
  net: amd-xgbe: Reset the PHY rx data path when mailbox command timeout
  ibmvnic: skip send_request_unmap for timeout reset
  ibmvnic: add memory barrier to protect long term buffer
  b43: N-PHY: Fix the update of coef for the PHY revision >= 3case
  cxgb4/chtls/cxgbit: Keeping the max ofld immediate data size same in cxgb4 and ulds
  tcp: fix SO_RCVLOWAT related hangs under mem pressure
  bpf: Fix bpf_fib_lookup helper MTU check for SKB ctx
  mac80211: fix potential overflow when multiplying to u32 integers
  xen/netback: fix spurious event detection for common event case
  bnxt_en: reverse order of TX disable and carrier off
  ibmvnic: Set to CLOSED state even on error
  ath9k: fix data bus crash when setting nf_override via debugfs
  bpf_lru_list: Read double-checked variable once without lock
  soc: aspeed: snoop: Add clock control logic
  ARM: s3c: fix fiq for clang IAS
  arm64: dts: msm8916: Fix reserved and rfsa nodes unit address
  ARM: dts: armada388-helios4: assign pinctrl to each fan
  ARM: dts: armada388-helios4: assign pinctrl to LEDs
  staging: rtl8723bs: wifi_regd.c: Fix incorrect number of regulatory rules
  usb: dwc2: Make "trimming xfer length" a debug message
  usb: dwc2: Abort transaction after errors with unknown reason
  usb: dwc2: Do not update data length if it is 0 on inbound transfers
  ARM: dts: Configure missing thermal interrupt for 4430
  memory: ti-aemif: Drop child node when jumping out loop
  Bluetooth: Put HCI device if inquiry procedure interrupts
  Bluetooth: drop HCI device reference before return
  usb: gadget: u_audio: Free requests only after callback
  ACPICA: Fix exception code class checks
  cpufreq: brcmstb-avs-cpufreq: Fix resource leaks in ->remove()
  cpufreq: brcmstb-avs-cpufreq: Free resources in error path
  arm64: dts: allwinner: A64: Limit MMC2 bus frequency to 150 MHz
  arm64: dts: allwinner: Drop non-removable from SoPine/LTS SD card
  arm64: dts: allwinner: A64: properly connect USB PHY to port 0
  bpf: Avoid warning when re-casting __bpf_call_base into __bpf_call_base_args
  arm64: dts: exynos: correct PMIC interrupt trigger level on Espresso
  arm64: dts: exynos: correct PMIC interrupt trigger level on TM2
  ARM: dts: exynos: correct PMIC interrupt trigger level on Odroid XU3 family
  ARM: dts: exynos: correct PMIC interrupt trigger level on Arndale Octa
  ARM: dts: exynos: correct PMIC interrupt trigger level on Spring
  ARM: dts: exynos: correct PMIC interrupt trigger level on Rinato
  ARM: dts: exynos: correct PMIC interrupt trigger level on Monk
  ARM: dts: exynos: correct PMIC interrupt trigger level on Artik 5
  Bluetooth: Fix initializing response id after clearing struct
  Bluetooth: btqcomsmd: Fix a resource leak in error handling paths in the probe function
  ath10k: Fix error handling in case of CE pipe init failure
  random: fix the RNDRESEEDCRNG ioctl
  MIPS: vmlinux.lds.S: add missing PAGE_ALIGNED_DATA() section
  ALSA: usb-audio: Fix PCM buffer allocation in non-vmalloc mode
  bfq: Avoid false bfq queue merging
  PCI: qcom: Use PHY_REFCLK_USE_PAD only for ipq8064
  kdb: Make memory allocations more robust
  vmlinux.lds.h: add DWARF v5 sections
  locking/static_key: Fix false positive warnings on concurrent dec/inc
  jump_label/lockdep: Assert we hold the hotplug lock for _cpuslocked() operations
  scripts/recordmcount.pl: support big endian for ARCH sh
  cifs: Set CIFS_MOUNT_USE_PREFIX_PATH flag on setting cifs_sb->prepath.
  NET: usb: qmi_wwan: Adding support for Cinterion MV31
  block: don't release queue's sysfs lock during switching elevator
  block: fix race between switching elevator and removing queues
  block: split .sysfs_lock into two locks
  block: add helper for checking if queue is registered
  scripts: set proper OpenSSL include dir also for sign-file
  scripts: use pkg-config to locate libcrypto
  arm64: tegra: Add power-domain for Tegra210 HDA
  ntfs: check for valid standard information attribute
  usb: quirks: add quirk to start video capture on ELMO L-12F document camera reliable
  USB: quirks: sort quirk entries
  HID: make arrays usage and value to be the same
  ANDROID: syscalls/x86: use a weak function for IA32 compat syscalls
  ANDROID: Adding kprobes build configs for Cuttlefish

Change-Id: Ibe55302772a7f7de016842280a9997c992262ea8
Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>

Conflicts:
	arch/arm64/kernel/cpufeature.c
	drivers/block/zram/zram_drv.c
	drivers/iio/adc/qcom-spmi-vadc.c
	drivers/md/dm-verity-fec.c
	drivers/usb/gadget/configfs.c
	net/ipv4/tcp_ipv4.c
	net/ipv6/tcp_ipv6.c
	net/qrtr/qrtr.c
This commit is contained in:
UtsavBalar1231 2022-02-26 15:09:41 +05:30
commit 7f11ea40c4
527 changed files with 33629 additions and 30075 deletions

View File

@ -0,0 +1,2 @@
# include OWNERS from the authoritative android-mainline branch
include kernel/common:android-mainline:/Documentation/filesystems/OWNERS

View File

@ -192,6 +192,12 @@ between the calls to start() and stop(), so holding a lock during that time
is a reasonable thing to do. The seq_file code will also avoid taking any
other locks while the iterator is active.
The iterater value returned by start() or next() is guaranteed to be
passed to a subsequent next() or stop() call. This allows resources
such as locks that were taken to be reliably released. There is *no*
guarantee that the iterator will be passed to show(), though in practice
it often will be.
Formatted output

View File

@ -211,12 +211,10 @@ Other notes:
is 4096.
- show() methods should return the number of bytes printed into the
buffer. This is the return value of scnprintf().
buffer.
- show() must not use snprintf() when formatting the value to be
returned to user space. If you can guarantee that an overflow
will never happen you can use sprintf() otherwise you must use
scnprintf().
- show() should only use sysfs_emit() or sysfs_emit_at() when formatting
the value to be returned to user space.
- store() should return the number of bytes used from the buffer. If the
entire buffer has been used, just return the count argument.

View File

@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 4
PATCHLEVEL = 19
SUBLEVEL = 177
SUBLEVEL = 183
EXTRAVERSION =
NAME = "People's Front"

2
OWNERS Normal file
View File

@ -0,0 +1,2 @@
# include OWNERS from the authoritative android-mainline branch
include kernel/common:android-mainline:/OWNERS

File diff suppressed because it is too large Load Diff

2
arch/arm/OWNERS Normal file
View File

@ -0,0 +1,2 @@
# include OWNERS from the authoritative android-mainline branch
include kernel/common:android-mainline:/arch/arm/OWNERS

View File

@ -1090,9 +1090,9 @@ __armv4_mmu_cache_off:
__armv7_mmu_cache_off:
mrc p15, 0, r0, c1, c0
#ifdef CONFIG_MMU
bic r0, r0, #0x000d
bic r0, r0, #0x0005
#else
bic r0, r0, #0x000c
bic r0, r0, #0x0004
#endif
mcr p15, 0, r0, c1, c0 @ turn MMU and cache off
mov r12, lr

View File

@ -70,6 +70,9 @@
system-leds {
compatible = "gpio-leds";
pinctrl-names = "default";
pinctrl-0 = <&helios_system_led_pins>;
status-led {
label = "helios4:green:status";
gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
@ -86,6 +89,9 @@
io-leds {
compatible = "gpio-leds";
pinctrl-names = "default";
pinctrl-0 = <&helios_io_led_pins>;
sata1-led {
label = "helios4:green:ata1";
gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
@ -121,11 +127,15 @@
fan1: j10-pwm {
compatible = "pwm-fan";
pwms = <&gpio1 9 40000>; /* Target freq:25 kHz */
pinctrl-names = "default";
pinctrl-0 = <&helios_fan1_pins>;
};
fan2: j17-pwm {
compatible = "pwm-fan";
pwms = <&gpio1 23 40000>; /* Target freq:25 kHz */
pinctrl-names = "default";
pinctrl-0 = <&helios_fan2_pins>;
};
usb2_phy: usb2-phy {
@ -291,16 +301,22 @@
"mpp39", "mpp40";
marvell,function = "sd0";
};
helios_led_pins: helios-led-pins {
marvell,pins = "mpp24", "mpp25",
"mpp49", "mpp50",
helios_system_led_pins: helios-system-led-pins {
marvell,pins = "mpp24", "mpp25";
marvell,function = "gpio";
};
helios_io_led_pins: helios-io-led-pins {
marvell,pins = "mpp49", "mpp50",
"mpp52", "mpp53",
"mpp54";
marvell,function = "gpio";
};
helios_fan_pins: helios-fan-pins {
marvell,pins = "mpp41", "mpp43",
"mpp48", "mpp55";
helios_fan1_pins: helios_fan1_pins {
marvell,pins = "mpp41", "mpp43";
marvell,function = "gpio";
};
helios_fan2_pins: helios_fan2_pins {
marvell,pins = "mpp48", "mpp55";
marvell,function = "gpio";
};
microsom_spi1_cs_pins: spi1-cs-pins {

View File

@ -312,6 +312,7 @@
compatible = "aspeed,ast2400-ibt-bmc";
reg = <0xc0 0x18>;
interrupts = <8>;
clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
status = "disabled";
};
};

View File

@ -372,6 +372,7 @@
compatible = "aspeed,ast2500-ibt-bmc";
reg = <0xc0 0x18>;
interrupts = <8>;
clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
status = "disabled";
};
};

View File

@ -68,7 +68,7 @@
s2mps14_pmic@66 {
compatible = "samsung,s2mps14-pmic";
interrupt-parent = <&gpx3>;
interrupts = <5 IRQ_TYPE_NONE>;
interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&s2mps14_irq>;
reg = <0x66>;

View File

@ -188,7 +188,7 @@
s2mps14_pmic@66 {
compatible = "samsung,s2mps14-pmic";
interrupt-parent = <&gpx0>;
interrupts = <7 IRQ_TYPE_NONE>;
interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
reg = <0x66>;
wakeup-source;

View File

@ -253,7 +253,7 @@
s2mps14_pmic@66 {
compatible = "samsung,s2mps14-pmic";
interrupt-parent = <&gpx0>;
interrupts = <7 IRQ_TYPE_NONE>;
interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
reg = <0x66>;
wakeup-source;

View File

@ -108,7 +108,7 @@
compatible = "samsung,s5m8767-pmic";
reg = <0x66>;
interrupt-parent = <&gpx3>;
interrupts = <2 IRQ_TYPE_NONE>;
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&s5m8767_irq &s5m8767_dvs &s5m8767_ds>;
wakeup-source;

View File

@ -84,7 +84,7 @@
reg = <0x66>;
interrupt-parent = <&gpx3>;
interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&s2mps11_irq>;

View File

@ -136,7 +136,7 @@
samsung,s2mps11-acokb-ground;
interrupt-parent = <&gpx0>;
interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&s2mps11_irq>;

View File

@ -33,10 +33,12 @@
};
ocp {
/* 4430 has only gpio_86 tshut and no talert interrupt */
bandgap: bandgap@4a002260 {
reg = <0x4a002260 0x4
0x4a00232C 0x4>;
compatible = "ti,omap4430-bandgap";
gpios = <&gpio3 22 GPIO_ACTIVE_HIGH>;
#thermal-sensor-cells = <0>;
};

View File

@ -91,12 +91,39 @@ int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops,
int i;
for (i = 0; i < count; i++) {
struct gnttab_unmap_grant_ref unmap;
int rc;
if (map_ops[i].status)
continue;
if (unlikely(!set_phys_to_machine(map_ops[i].host_addr >> XEN_PAGE_SHIFT,
map_ops[i].dev_bus_addr >> XEN_PAGE_SHIFT))) {
return -ENOMEM;
}
if (likely(set_phys_to_machine(map_ops[i].host_addr >> XEN_PAGE_SHIFT,
map_ops[i].dev_bus_addr >> XEN_PAGE_SHIFT)))
continue;
/*
* Signal an error for this slot. This in turn requires
* immediate unmapping.
*/
map_ops[i].status = GNTST_general_error;
unmap.host_addr = map_ops[i].host_addr,
unmap.handle = map_ops[i].handle;
map_ops[i].handle = ~0;
if (map_ops[i].flags & GNTMAP_device_map)
unmap.dev_bus_addr = map_ops[i].dev_bus_addr;
else
unmap.dev_bus_addr = 0;
/*
* Pre-populate the status field, to be recognizable in
* the log message below.
*/
unmap.status = 1;
rc = HYPERVISOR_grant_table_op(GNTTABOP_unmap_grant_ref,
&unmap, 1);
if (rc || unmap.status != GNTST_okay)
pr_err_once("gnttab unmap failed: rc=%d st=%d\n",
rc, unmap.status);
}
return 0;

View File

@ -493,7 +493,7 @@ config ARM64_ERRATUM_1024718
help
This option adds work around for Arm Cortex-A55 Erratum 1024718.
Affected Cortex-A55 cores (r0p0, r0p1, r1p0) could cause incorrect
Affected Cortex-A55 cores (all revisions) could cause incorrect
update of the hardware dirty bit when the DBM/AP bits are updated
without a break-before-make. The work around is to disable the usage
of hardware DBM locally on the affected cores. CPUs not affected by

2
arch/arm64/OWNERS Normal file
View File

@ -0,0 +1,2 @@
# include OWNERS from the authoritative android-mainline branch
include kernel/common:android-mainline:/arch/arm64/OWNERS

View File

@ -67,8 +67,6 @@
};
&ehci0 {
phys = <&usbphy 0>;
phy-names = "usb";
status = "okay";
};
@ -107,6 +105,7 @@
pinctrl-0 = <&mmc2_pins>;
vmmc-supply = <&reg_dcdc1>;
vqmmc-supply = <&reg_eldo1>;
max-frequency = <200000000>;
bus-width = <8>;
non-removable;
cap-mmc-hw-reset;
@ -115,8 +114,6 @@
};
&ohci0 {
phys = <&usbphy 0>;
phy-names = "usb";
status = "okay";
};

View File

@ -51,7 +51,6 @@
pinctrl-names = "default";
pinctrl-0 = <&mmc0_pins>;
vmmc-supply = <&reg_dcdc1>;
non-removable;
disable-wp;
bus-width = <4>;
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */

View File

@ -264,7 +264,7 @@
resets = <&ccu RST_BUS_MMC2>;
reset-names = "ahb";
interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
max-frequency = <200000000>;
max-frequency = <150000000>;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
@ -312,6 +312,8 @@
<&ccu CLK_USB_OHCI0>;
resets = <&ccu RST_BUS_OHCI0>,
<&ccu RST_BUS_EHCI0>;
phys = <&usbphy 0>;
phy-names = "usb";
status = "disabled";
};
@ -322,6 +324,8 @@
clocks = <&ccu CLK_BUS_OHCI0>,
<&ccu CLK_USB_OHCI0>;
resets = <&ccu RST_BUS_OHCI0>;
phys = <&usbphy 0>;
phy-names = "usb";
status = "disabled";
};

View File

@ -378,7 +378,7 @@
s2mps13-pmic@66 {
compatible = "samsung,s2mps13-pmic";
interrupt-parent = <&gpa0>;
interrupts = <7 IRQ_TYPE_NONE>;
interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
reg = <0x66>;
samsung,s2mps11-wrstbi-ground;

View File

@ -85,7 +85,7 @@
s2mps15_pmic@66 {
compatible = "samsung,s2mps15-pmic";
reg = <0x66>;
interrupts = <2 IRQ_TYPE_NONE>;
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
interrupt-parent = <&gpa0>;
pinctrl-names = "default";
pinctrl-0 = <&pmic_irq>;

View File

@ -641,6 +641,8 @@
clocks = <&pericfg CLK_PERI_MSDC30_1_PD>,
<&topckgen CLK_TOP_AXI_SEL>;
clock-names = "source", "hclk";
resets = <&pericfg MT7622_PERI_MSDC1_SW_RST>;
reset-names = "hrst";
status = "disabled";
};

View File

@ -826,6 +826,7 @@
<&tegra_car 128>, /* hda2hdmi */
<&tegra_car 111>; /* hda2codec_2x */
reset-names = "hda", "hda2hdmi", "hda2codec_2x";
power-domains = <&pd_sor>;
status = "disabled";
};

View File

@ -64,7 +64,7 @@
no-map;
};
reserved@8668000 {
reserved@86680000 {
reg = <0x0 0x86680000 0x0 0x80000>;
no-map;
};
@ -77,7 +77,7 @@
qcom,client-id = <1>;
};
rfsa@867e00000 {
rfsa@867e0000 {
reg = <0x0 0x867e0000 0x0 0x20000>;
no-map;
};

View File

@ -35,7 +35,7 @@ Following example uses irq pin number 3 of gpio0 for out of band wake-on-bt:
compatible = "usb1286,204e";
reg = <1>;
interrupt-parent = <&gpio0>;
interrupt-name = "wakeup";
interrupt-names = "wakeup";
interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
};
};

View File

@ -21,6 +21,7 @@
MODULE_DESCRIPTION("SHA1 secure hash using ARMv8 Crypto Extensions");
MODULE_AUTHOR("Ard Biesheuvel <ard.biesheuvel@linaro.org>");
MODULE_LICENSE("GPL v2");
MODULE_ALIAS_CRYPTO("sha1");
struct sha1_ce_state {
struct sha1_state sst;

View File

@ -21,6 +21,8 @@
MODULE_DESCRIPTION("SHA-224/SHA-256 secure hash using ARMv8 Crypto Extensions");
MODULE_AUTHOR("Ard Biesheuvel <ard.biesheuvel@linaro.org>");
MODULE_LICENSE("GPL v2");
MODULE_ALIAS_CRYPTO("sha224");
MODULE_ALIAS_CRYPTO("sha256");
struct sha256_ce_state {
struct sha256_state sst;

View File

@ -22,6 +22,10 @@
MODULE_DESCRIPTION("SHA3 secure hash using ARMv8 Crypto Extensions");
MODULE_AUTHOR("Ard Biesheuvel <ard.biesheuvel@linaro.org>");
MODULE_LICENSE("GPL v2");
MODULE_ALIAS_CRYPTO("sha3-224");
MODULE_ALIAS_CRYPTO("sha3-256");
MODULE_ALIAS_CRYPTO("sha3-384");
MODULE_ALIAS_CRYPTO("sha3-512");
asmlinkage void sha3_ce_transform(u64 *st, const u8 *data, int blocks,
int md_len);

View File

@ -22,6 +22,8 @@
MODULE_DESCRIPTION("SHA-384/SHA-512 secure hash using ARMv8 Crypto Extensions");
MODULE_AUTHOR("Ard Biesheuvel <ard.biesheuvel@linaro.org>");
MODULE_LICENSE("GPL v2");
MODULE_ALIAS_CRYPTO("sha384");
MODULE_ALIAS_CRYPTO("sha512");
asmlinkage void sha512_ce_transform(struct sha512_state *sst, u8 const *src,
int blocks);

View File

@ -37,7 +37,7 @@
* (the optimize attribute silently ignores these options).
*/
#define ATOMIC_OP(op, asm_op) \
#define ATOMIC_OP(op, asm_op, constraint) \
__LL_SC_INLINE void \
__LL_SC_PREFIX(atomic_##op(int i, atomic_t *v)) \
{ \
@ -51,11 +51,11 @@ __LL_SC_PREFIX(atomic_##op(int i, atomic_t *v)) \
" stxr %w1, %w0, %2\n" \
" cbnz %w1, 1b" \
: "=&r" (result), "=&r" (tmp), "+Q" (v->counter) \
: "Ir" (i)); \
: #constraint "r" (i)); \
} \
__LL_SC_EXPORT(atomic_##op);
#define ATOMIC_OP_RETURN(name, mb, acq, rel, cl, op, asm_op) \
#define ATOMIC_OP_RETURN(name, mb, acq, rel, cl, op, asm_op, constraint)\
__LL_SC_INLINE int \
__LL_SC_PREFIX(atomic_##op##_return##name(int i, atomic_t *v)) \
{ \
@ -70,14 +70,14 @@ __LL_SC_PREFIX(atomic_##op##_return##name(int i, atomic_t *v)) \
" cbnz %w1, 1b\n" \
" " #mb \
: "=&r" (result), "=&r" (tmp), "+Q" (v->counter) \
: "Ir" (i) \
: #constraint "r" (i) \
: cl); \
\
return result; \
} \
__LL_SC_EXPORT(atomic_##op##_return##name);
#define ATOMIC_FETCH_OP(name, mb, acq, rel, cl, op, asm_op) \
#define ATOMIC_FETCH_OP(name, mb, acq, rel, cl, op, asm_op, constraint) \
__LL_SC_INLINE int \
__LL_SC_PREFIX(atomic_fetch_##op##name(int i, atomic_t *v)) \
{ \
@ -92,7 +92,7 @@ __LL_SC_PREFIX(atomic_fetch_##op##name(int i, atomic_t *v)) \
" cbnz %w2, 1b\n" \
" " #mb \
: "=&r" (result), "=&r" (val), "=&r" (tmp), "+Q" (v->counter) \
: "Ir" (i) \
: #constraint "r" (i) \
: cl); \
\
return result; \
@ -110,8 +110,8 @@ __LL_SC_EXPORT(atomic_fetch_##op##name);
ATOMIC_FETCH_OP (_acquire, , a, , "memory", __VA_ARGS__)\
ATOMIC_FETCH_OP (_release, , , l, "memory", __VA_ARGS__)
ATOMIC_OPS(add, add)
ATOMIC_OPS(sub, sub)
ATOMIC_OPS(add, add, I)
ATOMIC_OPS(sub, sub, J)
#undef ATOMIC_OPS
#define ATOMIC_OPS(...) \
@ -121,17 +121,17 @@ ATOMIC_OPS(sub, sub)
ATOMIC_FETCH_OP (_acquire, , a, , "memory", __VA_ARGS__)\
ATOMIC_FETCH_OP (_release, , , l, "memory", __VA_ARGS__)
ATOMIC_OPS(and, and)
ATOMIC_OPS(andnot, bic)
ATOMIC_OPS(or, orr)
ATOMIC_OPS(xor, eor)
ATOMIC_OPS(and, and, )
ATOMIC_OPS(andnot, bic, )
ATOMIC_OPS(or, orr, )
ATOMIC_OPS(xor, eor, )
#undef ATOMIC_OPS
#undef ATOMIC_FETCH_OP
#undef ATOMIC_OP_RETURN
#undef ATOMIC_OP
#define ATOMIC64_OP(op, asm_op) \
#define ATOMIC64_OP(op, asm_op, constraint) \
__LL_SC_INLINE void \
__LL_SC_PREFIX(atomic64_##op(long i, atomic64_t *v)) \
{ \
@ -145,11 +145,11 @@ __LL_SC_PREFIX(atomic64_##op(long i, atomic64_t *v)) \
" stxr %w1, %0, %2\n" \
" cbnz %w1, 1b" \
: "=&r" (result), "=&r" (tmp), "+Q" (v->counter) \
: "Ir" (i)); \
: #constraint "r" (i)); \
} \
__LL_SC_EXPORT(atomic64_##op);
#define ATOMIC64_OP_RETURN(name, mb, acq, rel, cl, op, asm_op) \
#define ATOMIC64_OP_RETURN(name, mb, acq, rel, cl, op, asm_op, constraint)\
__LL_SC_INLINE long \
__LL_SC_PREFIX(atomic64_##op##_return##name(long i, atomic64_t *v)) \
{ \
@ -164,14 +164,14 @@ __LL_SC_PREFIX(atomic64_##op##_return##name(long i, atomic64_t *v)) \
" cbnz %w1, 1b\n" \
" " #mb \
: "=&r" (result), "=&r" (tmp), "+Q" (v->counter) \
: "Ir" (i) \
: #constraint "r" (i) \
: cl); \
\
return result; \
} \
__LL_SC_EXPORT(atomic64_##op##_return##name);
#define ATOMIC64_FETCH_OP(name, mb, acq, rel, cl, op, asm_op) \
#define ATOMIC64_FETCH_OP(name, mb, acq, rel, cl, op, asm_op, constraint)\
__LL_SC_INLINE long \
__LL_SC_PREFIX(atomic64_fetch_##op##name(long i, atomic64_t *v)) \
{ \
@ -186,7 +186,7 @@ __LL_SC_PREFIX(atomic64_fetch_##op##name(long i, atomic64_t *v)) \
" cbnz %w2, 1b\n" \
" " #mb \
: "=&r" (result), "=&r" (val), "=&r" (tmp), "+Q" (v->counter) \
: "Ir" (i) \
: #constraint "r" (i) \
: cl); \
\
return result; \
@ -204,8 +204,8 @@ __LL_SC_EXPORT(atomic64_fetch_##op##name);
ATOMIC64_FETCH_OP (_acquire,, a, , "memory", __VA_ARGS__) \
ATOMIC64_FETCH_OP (_release,, , l, "memory", __VA_ARGS__)
ATOMIC64_OPS(add, add)
ATOMIC64_OPS(sub, sub)
ATOMIC64_OPS(add, add, I)
ATOMIC64_OPS(sub, sub, J)
#undef ATOMIC64_OPS
#define ATOMIC64_OPS(...) \
@ -215,10 +215,10 @@ ATOMIC64_OPS(sub, sub)
ATOMIC64_FETCH_OP (_acquire,, a, , "memory", __VA_ARGS__) \
ATOMIC64_FETCH_OP (_release,, , l, "memory", __VA_ARGS__)
ATOMIC64_OPS(and, and)
ATOMIC64_OPS(andnot, bic)
ATOMIC64_OPS(or, orr)
ATOMIC64_OPS(xor, eor)
ATOMIC64_OPS(and, and, L)
ATOMIC64_OPS(andnot, bic, )
ATOMIC64_OPS(or, orr, L)
ATOMIC64_OPS(xor, eor, L)
#undef ATOMIC64_OPS
#undef ATOMIC64_FETCH_OP
@ -248,7 +248,7 @@ __LL_SC_PREFIX(atomic64_dec_if_positive(atomic64_t *v))
}
__LL_SC_EXPORT(atomic64_dec_if_positive);
#define __CMPXCHG_CASE(w, sz, name, mb, acq, rel, cl) \
#define __CMPXCHG_CASE(w, sz, name, mb, acq, rel, cl, constraint) \
__LL_SC_INLINE unsigned long \
__LL_SC_PREFIX(__cmpxchg_case_##name(volatile void *ptr, \
unsigned long old, \
@ -267,29 +267,34 @@ __LL_SC_PREFIX(__cmpxchg_case_##name(volatile void *ptr, \
"2:" \
: [tmp] "=&r" (tmp), [oldval] "=&r" (oldval), \
[v] "+Q" (*(unsigned long *)ptr) \
: [old] "Lr" (old), [new] "r" (new) \
: [old] #constraint "r" (old), [new] "r" (new) \
: cl); \
\
return oldval; \
} \
__LL_SC_EXPORT(__cmpxchg_case_##name);
__CMPXCHG_CASE(w, b, 1, , , , )
__CMPXCHG_CASE(w, h, 2, , , , )
__CMPXCHG_CASE(w, , 4, , , , )
__CMPXCHG_CASE( , , 8, , , , )
__CMPXCHG_CASE(w, b, acq_1, , a, , "memory")
__CMPXCHG_CASE(w, h, acq_2, , a, , "memory")
__CMPXCHG_CASE(w, , acq_4, , a, , "memory")
__CMPXCHG_CASE( , , acq_8, , a, , "memory")
__CMPXCHG_CASE(w, b, rel_1, , , l, "memory")
__CMPXCHG_CASE(w, h, rel_2, , , l, "memory")
__CMPXCHG_CASE(w, , rel_4, , , l, "memory")
__CMPXCHG_CASE( , , rel_8, , , l, "memory")
__CMPXCHG_CASE(w, b, mb_1, dmb ish, , l, "memory")
__CMPXCHG_CASE(w, h, mb_2, dmb ish, , l, "memory")
__CMPXCHG_CASE(w, , mb_4, dmb ish, , l, "memory")
__CMPXCHG_CASE( , , mb_8, dmb ish, , l, "memory")
/*
* Earlier versions of GCC (no later than 8.1.0) appear to incorrectly
* handle the 'K' constraint for the value 4294967295 - thus we use no
* constraint for 32 bit operations.
*/
__CMPXCHG_CASE(w, b, 1, , , , , )
__CMPXCHG_CASE(w, h, 2, , , , , )
__CMPXCHG_CASE(w, , 4, , , , , )
__CMPXCHG_CASE( , , 8, , , , , L)
__CMPXCHG_CASE(w, b, acq_1, , a, , "memory", )
__CMPXCHG_CASE(w, h, acq_2, , a, , "memory", )
__CMPXCHG_CASE(w, , acq_4, , a, , "memory", )
__CMPXCHG_CASE( , , acq_8, , a, , "memory", L)
__CMPXCHG_CASE(w, b, rel_1, , , l, "memory", )
__CMPXCHG_CASE(w, h, rel_2, , , l, "memory", )
__CMPXCHG_CASE(w, , rel_4, , , l, "memory", )
__CMPXCHG_CASE( , , rel_8, , , l, "memory", L)
__CMPXCHG_CASE(w, b, mb_1, dmb ish, , l, "memory", )
__CMPXCHG_CASE(w, h, mb_2, dmb ish, , l, "memory", )
__CMPXCHG_CASE(w, , mb_4, dmb ish, , l, "memory", )
__CMPXCHG_CASE( , , mb_8, dmb ish, , l, "memory", L)
#undef __CMPXCHG_CASE

View File

@ -144,6 +144,9 @@ void __sysreg32_restore_state(struct kvm_vcpu *vcpu);
void __debug_switch_to_guest(struct kvm_vcpu *vcpu);
void __debug_switch_to_host(struct kvm_vcpu *vcpu);
void __debug_save_host_buffers_nvhe(struct kvm_vcpu *vcpu);
void __debug_restore_host_buffers_nvhe(struct kvm_vcpu *vcpu);
void __fpsimd_save_state(struct user_fpsimd_state *fp_regs);
void __fpsimd_restore_state(struct user_fpsimd_state *fp_regs);

View File

@ -1013,8 +1013,7 @@ static bool cpu_has_broken_dbm(void)
/* List of CPUs which have broken DBM support. */
static const struct midr_range cpus[] = {
#ifdef CONFIG_ARM64_ERRATUM_1024718
MIDR_RANGE(MIDR_CORTEX_A55, 0, 0, 1, 0), // A55 r0p0 -r1p0
MIDR_RANGE(MIDR_KRYO5S, 13, 14, 13, 14),
MIDR_ALL_VERSIONS(MIDR_CORTEX_A55),
#endif
{},
};

View File

@ -960,6 +960,7 @@ __primary_switch:
tlbi vmalle1 // Remove any stale TLB entries
dsb nsh
isb
msr sctlr_el1, x19 // re-enable the MMU
isb

View File

@ -1,5 +1,5 @@
SECTIONS {
.plt (NOLOAD) : { BYTE(0) }
.init.plt (NOLOAD) : { BYTE(0) }
.text.ftrace_trampoline (NOLOAD) : { BYTE(0) }
.plt 0 (NOLOAD) : { BYTE(0) }
.init.plt 0 (NOLOAD) : { BYTE(0) }
.text.ftrace_trampoline 0 (NOLOAD) : { BYTE(0) }
}

View File

@ -41,7 +41,7 @@ int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, struct mm_struct *mm,
/* TODO: Currently we do not support AARCH32 instruction probing */
if (mm->context.flags & MMCF_AARCH32)
return -ENOTSUPP;
return -EOPNOTSUPP;
else if (!IS_ALIGNED(addr, AARCH64_INSN_SIZE))
return -EINVAL;

View File

@ -149,6 +149,21 @@ static void __hyp_text __debug_restore_state(struct kvm_vcpu *vcpu,
write_sysreg(ctxt->sys_regs[MDCCINT_EL1], mdccint_el1);
}
void __hyp_text __debug_save_host_buffers_nvhe(struct kvm_vcpu *vcpu)
{
/*
* Non-VHE: Disable and flush SPE data generation
* VHE: The vcpu can run, but it can't hide.
*/
__debug_save_spe_nvhe(&vcpu->arch.host_debug_state.pmscr_el1);
}
void __hyp_text __debug_restore_host_buffers_nvhe(struct kvm_vcpu *vcpu)
{
__debug_restore_spe_nvhe(vcpu->arch.host_debug_state.pmscr_el1);
}
void __hyp_text __debug_switch_to_guest(struct kvm_vcpu *vcpu)
{
struct kvm_cpu_context *host_ctxt;
@ -156,13 +171,6 @@ void __hyp_text __debug_switch_to_guest(struct kvm_vcpu *vcpu)
struct kvm_guest_debug_arch *host_dbg;
struct kvm_guest_debug_arch *guest_dbg;
/*
* Non-VHE: Disable and flush SPE data generation
* VHE: The vcpu can run, but it can't hide.
*/
if (!has_vhe())
__debug_save_spe_nvhe(&vcpu->arch.host_debug_state.pmscr_el1);
if (!(vcpu->arch.flags & KVM_ARM64_DEBUG_DIRTY))
return;
@ -182,8 +190,6 @@ void __hyp_text __debug_switch_to_host(struct kvm_vcpu *vcpu)
struct kvm_guest_debug_arch *host_dbg;
struct kvm_guest_debug_arch *guest_dbg;
if (!has_vhe())
__debug_restore_spe_nvhe(vcpu->arch.host_debug_state.pmscr_el1);
if (!(vcpu->arch.flags & KVM_ARM64_DEBUG_DIRTY))
return;

View File

@ -560,6 +560,7 @@ int __hyp_text __kvm_vcpu_run_nvhe(struct kvm_vcpu *vcpu)
guest_ctxt = &vcpu->arch.ctxt;
__sysreg_save_state_nvhe(host_ctxt);
__debug_save_host_buffers_nvhe(vcpu);
__activate_traps(vcpu);
__activate_vm(kern_hyp_va(vcpu->kvm));
@ -599,11 +600,12 @@ int __hyp_text __kvm_vcpu_run_nvhe(struct kvm_vcpu *vcpu)
if (vcpu->arch.flags & KVM_ARM64_FP_ENABLED)
__fpsimd_save_fpexc32(vcpu);
__debug_switch_to_host(vcpu);
/*
* This must come after restoring the host sysregs, since a non-VHE
* system may enable SPE here and make use of the TTBRs.
*/
__debug_switch_to_host(vcpu);
__debug_restore_host_buffers_nvhe(vcpu);
return exit_code;
}

View File

@ -93,6 +93,7 @@ SECTIONS
INIT_TASK_DATA(THREAD_SIZE)
NOSAVE_DATA
PAGE_ALIGNED_DATA(PAGE_SIZE)
CACHELINE_ALIGNED_DATA(1 << CONFIG_MIPS_L1_CACHE_SHIFT)
READ_MOSTLY_DATA(1 << CONFIG_MIPS_L1_CACHE_SHIFT)
DATA_DATA

View File

@ -244,7 +244,7 @@ static void ltq_hw_irq_handler(struct irq_desc *desc)
generic_handle_irq(irq_linear_revmap(ltq_domain, hwirq));
/* if this is a EBU irq, we need to ack it or get a deadlock */
if ((irq == LTQ_ICU_EBU_IRQ) && (module == 0) && LTQ_EBU_PCC_ISTAT)
if (irq == LTQ_ICU_EBU_IRQ && !module && LTQ_EBU_PCC_ISTAT != 0)
ltq_ebu_w32(ltq_ebu_r32(LTQ_EBU_PCC_ISTAT) | 0x10,
LTQ_EBU_PCC_ISTAT);
}

View File

@ -1673,7 +1673,7 @@ static int probe_scache(void)
return 1;
}
static void __init loongson2_sc_init(void)
static void loongson2_sc_init(void)
{
struct cpuinfo_mips *c = &current_cpu_data;

View File

@ -16,12 +16,9 @@ ccflags-vdso := \
$(filter -march=%,$(KBUILD_CFLAGS)) \
$(filter -m%-float,$(KBUILD_CFLAGS)) \
$(filter -mno-loongson-%,$(KBUILD_CFLAGS)) \
$(CLANG_FLAGS) \
-D__VDSO__
ifeq ($(cc-name),clang)
ccflags-vdso += $(filter --target=%,$(KBUILD_CFLAGS))
endif
#
# The -fno-jump-tables flag only prevents the compiler from generating
# jump tables but does not prevent the compiler from emitting absolute

View File

@ -380,7 +380,11 @@ static inline int eirr_to_irq(unsigned long eirr)
/*
* IRQ STACK - used for irq handler
*/
#ifdef CONFIG_64BIT
#define IRQ_STACK_SIZE (4096 << 4) /* 64k irq stack size */
#else
#define IRQ_STACK_SIZE (4096 << 3) /* 32k irq stack size */
#endif
union irq_stack_union {
unsigned long stack[IRQ_STACK_SIZE/sizeof(unsigned long)];

View File

@ -709,7 +709,7 @@ config PPC_64K_PAGES
config PPC_256K_PAGES
bool "256k page size"
depends on 44x && !STDBINUTILS
depends on 44x && !STDBINUTILS && !PPC_47x
help
Make the page size 256k.

View File

@ -52,7 +52,7 @@ void __patch_exception(int exc, unsigned long addr);
#endif
#define OP_RT_RA_MASK 0xffff0000UL
#define LIS_R2 0x3c020000UL
#define LIS_R2 0x3c400000UL
#define ADDIS_R2_R12 0x3c4c0000UL
#define ADDI_R2_R2 0x38420000UL

View File

@ -7,7 +7,7 @@
#include <linux/bug.h>
#include <asm/cputable.h>
static inline bool early_cpu_has_feature(unsigned long feature)
static __always_inline bool early_cpu_has_feature(unsigned long feature)
{
return !!((CPU_FTRS_ALWAYS & feature) ||
(CPU_FTRS_POSSIBLE & cur_cpu_spec->cpu_features & feature));
@ -46,7 +46,7 @@ static __always_inline bool cpu_has_feature(unsigned long feature)
return static_branch_likely(&cpu_feature_keys[i]);
}
#else
static inline bool cpu_has_feature(unsigned long feature)
static __always_inline bool cpu_has_feature(unsigned long feature)
{
return early_cpu_has_feature(feature);
}

View File

@ -71,6 +71,9 @@ struct machdep_calls {
int (*pcibios_root_bridge_prepare)(struct pci_host_bridge
*bridge);
/* finds all the pci_controllers present at boot */
void (*discover_phbs)(void);
/* To setup PHBs when using automatic OF platform driver for PCI */
int (*pci_setup_phb)(struct pci_controller *host);

View File

@ -269,7 +269,7 @@ SystemCall:
/* On the MPC8xx, this is a software emulation interrupt. It occurs
* for all unimplemented and illegal instructions.
*/
EXCEPTION(0x1000, SoftEmu, program_check_exception, EXC_XFER_STD)
EXCEPTION(0x1000, SoftEmu, emulation_assist_interrupt, EXC_XFER_STD)
. = 0x1100
/*

View File

@ -1671,3 +1671,13 @@ static void fixup_hide_host_resource_fsl(struct pci_dev *dev)
}
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MOTOROLA, PCI_ANY_ID, fixup_hide_host_resource_fsl);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_FREESCALE, PCI_ANY_ID, fixup_hide_host_resource_fsl);
static int __init discover_phbs(void)
{
if (ppc_md.discover_phbs)
ppc_md.discover_phbs();
return 0;
}
core_initcall(discover_phbs);

View File

@ -433,8 +433,11 @@ out:
die("Unrecoverable nested System Reset", regs, SIGABRT);
#endif
/* Must die if the interrupt is not recoverable */
if (!(regs->msr & MSR_RI))
if (!(regs->msr & MSR_RI)) {
/* For the reason explained in die_mce, nmi_exit before die */
nmi_exit();
die("Unrecoverable System Reset", regs, SIGABRT);
}
if (!nested)
nmi_exit();

View File

@ -99,6 +99,7 @@ SECTIONS
#endif
/* careful! __ftr_alt_* sections need to be close to .text */
*(.text.hot TEXT_MAIN .text.fixup .text.unlikely .fixup __ftr_alt_* .ref.text);
NOINSTR_TEXT
SCHED_TEXT
CPUIDLE_TEXT
LOCK_TEXT

View File

@ -1497,7 +1497,7 @@ int kvmppc_handle_vmx_load(struct kvm_run *run, struct kvm_vcpu *vcpu,
return emulated;
}
int kvmppc_get_vmx_dword(struct kvm_vcpu *vcpu, int index, u64 *val)
static int kvmppc_get_vmx_dword(struct kvm_vcpu *vcpu, int index, u64 *val)
{
union kvmppc_one_reg reg;
int vmx_offset = 0;
@ -1515,7 +1515,7 @@ int kvmppc_get_vmx_dword(struct kvm_vcpu *vcpu, int index, u64 *val)
return result;
}
int kvmppc_get_vmx_word(struct kvm_vcpu *vcpu, int index, u64 *val)
static int kvmppc_get_vmx_word(struct kvm_vcpu *vcpu, int index, u64 *val)
{
union kvmppc_one_reg reg;
int vmx_offset = 0;
@ -1533,7 +1533,7 @@ int kvmppc_get_vmx_word(struct kvm_vcpu *vcpu, int index, u64 *val)
return result;
}
int kvmppc_get_vmx_hword(struct kvm_vcpu *vcpu, int index, u64 *val)
static int kvmppc_get_vmx_hword(struct kvm_vcpu *vcpu, int index, u64 *val)
{
union kvmppc_one_reg reg;
int vmx_offset = 0;
@ -1551,7 +1551,7 @@ int kvmppc_get_vmx_hword(struct kvm_vcpu *vcpu, int index, u64 *val)
return result;
}
int kvmppc_get_vmx_byte(struct kvm_vcpu *vcpu, int index, u64 *val)
static int kvmppc_get_vmx_byte(struct kvm_vcpu *vcpu, int index, u64 *val)
{
union kvmppc_one_reg reg;
int vmx_offset = 0;

View File

@ -2044,7 +2044,17 @@ static void record_and_restart(struct perf_event *event, unsigned long val,
left += period;
if (left <= 0)
left = period;
record = siar_valid(regs);
/*
* If address is not requested in the sample via
* PERF_SAMPLE_IP, just record that sample irrespective
* of SIAR valid check.
*/
if (event->attr.sample_type & PERF_SAMPLE_IP)
record = siar_valid(regs);
else
record = 1;
event->hw.last_period = event->hw.sample_period;
}
if (left < 0x80000000LL)
@ -2062,9 +2072,10 @@ static void record_and_restart(struct perf_event *event, unsigned long val,
* MMCR2. Check attr.exclude_kernel and address to drop the sample in
* these cases.
*/
if (event->attr.exclude_kernel && record)
if (is_kernel_addr(mfspr(SPRN_SIAR)))
record = 0;
if (event->attr.exclude_kernel &&
(event->attr.sample_type & PERF_SAMPLE_IP) &&
is_kernel_addr(mfspr(SPRN_SIAR)))
record = 0;
/*
* Finally record data if requested.

View File

@ -132,7 +132,6 @@ void dlpar_free_cc_nodes(struct device_node *dn)
#define NEXT_PROPERTY 3
#define PREV_PARENT 4
#define MORE_MEMORY 5
#define CALL_AGAIN -2
#define ERR_CFG_USE -9003
struct device_node *dlpar_configure_connector(__be32 drc_index,
@ -173,6 +172,9 @@ struct device_node *dlpar_configure_connector(__be32 drc_index,
spin_unlock(&rtas_data_buf_lock);
if (rtas_busy_delay(rc))
continue;
switch (rc) {
case COMPLETE:
break;
@ -221,9 +223,6 @@ struct device_node *dlpar_configure_connector(__be32 drc_index,
last_dn = last_dn->parent;
break;
case CALL_AGAIN:
break;
case MORE_MEMORY:
case ERR_CFG_USE:
default:

View File

@ -751,7 +751,7 @@ static int smp_add_core(struct sclp_core_entry *core, cpumask_t *avail,
static int __smp_rescan_cpus(struct sclp_core_info *info, bool early)
{
struct sclp_core_entry *core;
cpumask_t avail;
static cpumask_t avail;
bool configured;
u16 core_id;
int nr, i;

View File

@ -554,7 +554,7 @@ config COMPAT
bool
depends on SPARC64
default y
select COMPAT_BINFMT_ELF
select COMPAT_BINFMT_ELF if BINFMT_ELF
select HAVE_UID16
select ARCH_WANT_OLD_COMPAT_IPC
select COMPAT_OLD_SIGACTION

View File

@ -57,36 +57,40 @@ static inline int sparc_validate_prot(unsigned long prot, unsigned long addr)
{
if (prot & ~(PROT_READ | PROT_WRITE | PROT_EXEC | PROT_SEM | PROT_ADI))
return 0;
if (prot & PROT_ADI) {
if (!adi_capable())
return 0;
if (addr) {
struct vm_area_struct *vma;
vma = find_vma(current->mm, addr);
if (vma) {
/* ADI can not be enabled on PFN
* mapped pages
*/
if (vma->vm_flags & (VM_PFNMAP | VM_MIXEDMAP))
return 0;
/* Mergeable pages can become unmergeable
* if ADI is enabled on them even if they
* have identical data on them. This can be
* because ADI enabled pages with identical
* data may still not have identical ADI
* tags on them. Disallow ADI on mergeable
* pages.
*/
if (vma->vm_flags & VM_MERGEABLE)
return 0;
}
}
}
return 1;
}
#define arch_validate_flags(vm_flags) arch_validate_flags(vm_flags)
/* arch_validate_flags() - Ensure combination of flags is valid for a
* VMA.
*/
static inline bool arch_validate_flags(unsigned long vm_flags)
{
/* If ADI is being enabled on this VMA, check for ADI
* capability on the platform and ensure VMA is suitable
* for ADI
*/
if (vm_flags & VM_SPARC_ADI) {
if (!adi_capable())
return false;
/* ADI can not be enabled on PFN mapped pages */
if (vm_flags & (VM_PFNMAP | VM_MIXEDMAP))
return false;
/* Mergeable pages can become unmergeable
* if ADI is enabled on them even if they
* have identical data on them. This can be
* because ADI enabled pages with identical
* data may still not have identical ADI
* tags on them. Disallow ADI on mergeable
* pages.
*/
if (vm_flags & VM_MERGEABLE)
return false;
}
return true;
}
#endif /* CONFIG_SPARC64 */
#endif /* __ASSEMBLY__ */

View File

@ -142,6 +142,7 @@ __bzero:
ZERO_LAST_BLOCKS(%o0, 0x48, %g2)
ZERO_LAST_BLOCKS(%o0, 0x08, %g2)
13:
EXT(12b, 13b, 21f)
be 8f
andcc %o1, 4, %g0

View File

@ -199,6 +199,9 @@ unsigned long __init bootmem_init(unsigned long *pages_avail)
size = memblock_phys_mem_size() - memblock_reserved_size();
*pages_avail = (size >> PAGE_SHIFT) - high_pages;
/* Only allow low memory to be allocated via memblock allocation */
memblock_set_current_limit(max_low_pfn << PAGE_SHIFT);
return max_pfn;
}

2
arch/x86/OWNERS Normal file
View File

@ -0,0 +1,2 @@
# include OWNERS from the authoritative android-mainline branch
include kernel/common:android-mainline:/arch/x86/OWNERS

View File

@ -181,6 +181,7 @@ CONFIG_NET_EMATCH=y
CONFIG_NET_EMATCH_U32=y
CONFIG_NET_CLS_ACT=y
CONFIG_BPF_JIT=y
CONFIG_BT=y
CONFIG_CFG80211=y
# CONFIG_CFG80211_DEFAULT_PS is not set
# CONFIG_CFG80211_CRDA_SUPPORT is not set

View File

@ -1557,7 +1557,7 @@ static void intel_pmu_drain_pebs_nhm(struct pt_regs *iregs)
*/
if (!pebs_status && cpuc->pebs_enabled &&
!(cpuc->pebs_enabled & (cpuc->pebs_enabled-1)))
pebs_status = cpuc->pebs_enabled;
pebs_status = p->status = cpuc->pebs_enabled;
bit = find_first_bit((unsigned long *)&pebs_status,
x86_pmu.max_pebs_events);

View File

@ -522,15 +522,6 @@ static inline void arch_thread_struct_whitelist(unsigned long *offset,
*size = fpu_kernel_xstate_size;
}
/*
* Thread-synchronous status.
*
* This is different from the flags in that nobody else
* ever touches our thread-synchronous status, so we don't
* have to worry about atomic accesses.
*/
#define TS_COMPAT 0x0002 /* 32bit syscall active (64BIT)*/
/*
* Set IOPL bits in EFLAGS from given mask
*/

View File

@ -121,7 +121,11 @@ struct pt_regs;
* kernel/time/posix-stubs.c to cover this case as well.
*/
#define COND_SYSCALL_COMPAT(name) \
cond_syscall(__ia32_compat_sys_##name); \
asmlinkage __weak long __ia32_compat_sys_##name( \
const struct pt_regs *__unused) \
{ \
return sys_ni_syscall(); \
} \
cond_syscall(__x32_compat_sys_##name)
#define COMPAT_SYS_NI(name) \

View File

@ -227,10 +227,31 @@ static inline int arch_within_stack_frames(const void * const stack,
#endif
/*
* Thread-synchronous status.
*
* This is different from the flags in that nobody else
* ever touches our thread-synchronous status, so we don't
* have to worry about atomic accesses.
*/
#define TS_COMPAT 0x0002 /* 32bit syscall active (64BIT)*/
#ifndef __ASSEMBLY__
#ifdef CONFIG_COMPAT
#define TS_I386_REGS_POKED 0x0004 /* regs poked by 32-bit ptracer */
#define TS_COMPAT_RESTART 0x0008
#define arch_set_restart_data arch_set_restart_data
static inline void arch_set_restart_data(struct restart_block *restart)
{
struct thread_info *ti = current_thread_info();
if (ti->status & TS_COMPAT)
ti->status |= TS_COMPAT_RESTART;
else
ti->status &= ~TS_COMPAT_RESTART;
}
#endif
#ifndef __ASSEMBLY__
#ifdef CONFIG_X86_32
#define in_ia32_syscall() true

View File

@ -2279,6 +2279,11 @@ static int cpuid_to_apicid[] = {
[0 ... NR_CPUS - 1] = -1,
};
bool arch_match_cpu_phys_id(int cpu, u64 phys_id)
{
return phys_id == cpuid_to_apicid[cpu];
}
#ifdef CONFIG_SMP
/**
* apic_id_is_primary_thread - Check whether APIC ID belongs to a primary thread

View File

@ -1043,6 +1043,16 @@ static int mp_map_pin_to_irq(u32 gsi, int idx, int ioapic, int pin,
if (idx >= 0 && test_bit(mp_irqs[idx].srcbus, mp_bus_not_pci)) {
irq = mp_irqs[idx].srcbusirq;
legacy = mp_is_legacy_irq(irq);
/*
* IRQ2 is unusable for historical reasons on systems which
* have a legacy PIC. See the comment vs. IRQ2 further down.
*
* If this gets removed at some point then the related code
* in lapic_assign_system_vectors() needs to be adjusted as
* well.
*/
if (legacy && irq == PIC_CASCADE_IR)
return -EINVAL;
}
mutex_lock(&ioapic_mutex);

View File

@ -126,6 +126,7 @@ int apply_relocate(Elf32_Shdr *sechdrs,
*location += sym->st_value;
break;
case R_386_PC32:
case R_386_PLT32:
/* Add the value, subtract its position */
*location += sym->st_value - (uint32_t)location;
break;

View File

@ -477,6 +477,15 @@ static const struct dmi_system_id reboot_dmi_table[] __initconst = {
},
},
{ /* PCIe Wifi card isn't detected after reboot otherwise */
.callback = set_pci_reboot,
.ident = "Zotac ZBOX CI327 nano",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "NA"),
DMI_MATCH(DMI_PRODUCT_NAME, "ZBOX-CI327NANO-GS-01"),
},
},
/* Sony */
{ /* Handle problems with rebooting on Sony VGN-Z540N */
.callback = set_bios_reboot,
@ -538,29 +547,20 @@ static void emergency_vmx_disable_all(void)
local_irq_disable();
/*
* We need to disable VMX on all CPUs before rebooting, otherwise
* we risk hanging up the machine, because the CPU ignore INIT
* signals when VMX is enabled.
* Disable VMX on all CPUs before rebooting, otherwise we risk hanging
* the machine, because the CPU blocks INIT when it's in VMX root.
*
* We can't take any locks and we may be on an inconsistent
* state, so we use NMIs as IPIs to tell the other CPUs to disable
* VMX and halt.
* We can't take any locks and we may be on an inconsistent state, so
* use NMIs as IPIs to tell the other CPUs to exit VMX root and halt.
*
* For safety, we will avoid running the nmi_shootdown_cpus()
* stuff unnecessarily, but we don't have a way to check
* if other CPUs have VMX enabled. So we will call it only if the
* CPU we are running on has VMX enabled.
*
* We will miss cases where VMX is not enabled on all CPUs. This
* shouldn't do much harm because KVM always enable VMX on all
* CPUs anyway. But we can miss it on the small window where KVM
* is still enabling VMX.
* Do the NMI shootdown even if VMX if off on _this_ CPU, as that
* doesn't prevent a different CPU from being in VMX root operation.
*/
if (cpu_has_vmx() && cpu_vmx_enabled()) {
/* Disable VMX on this CPU. */
cpu_vmxoff();
if (cpu_has_vmx()) {
/* Safely force _this_ CPU out of VMX root operation. */
__cpu_emergency_vmxoff();
/* Halt and disable VMX on the other CPUs */
/* Halt and exit VMX root operation on the other CPUs. */
nmi_shootdown_cpus(vmxoff_nmi);
}

View File

@ -776,30 +776,8 @@ handle_signal(struct ksignal *ksig, struct pt_regs *regs)
static inline unsigned long get_nr_restart_syscall(const struct pt_regs *regs)
{
/*
* This function is fundamentally broken as currently
* implemented.
*
* The idea is that we want to trigger a call to the
* restart_block() syscall and that we want in_ia32_syscall(),
* in_x32_syscall(), etc. to match whatever they were in the
* syscall being restarted. We assume that the syscall
* instruction at (regs->ip - 2) matches whatever syscall
* instruction we used to enter in the first place.
*
* The problem is that we can get here when ptrace pokes
* syscall-like values into regs even if we're not in a syscall
* at all.
*
* For now, we maintain historical behavior and guess based on
* stored state. We could do better by saving the actual
* syscall arch in restart_block or (with caveats on x32) by
* checking if regs->ip points to 'int $0x80'. The current
* behavior is incorrect if a tracer has a different bitness
* than the tracee.
*/
#ifdef CONFIG_IA32_EMULATION
if (current_thread_info()->status & (TS_COMPAT|TS_I386_REGS_POKED))
if (current_thread_info()->status & TS_COMPAT_RESTART)
return __NR_ia32_restart_syscall;
#endif
#ifdef CONFIG_X86_X32_ABI

View File

@ -346,8 +346,8 @@ static bool deref_stack_regs(struct unwind_state *state, unsigned long addr,
if (!stack_access_ok(state, addr, sizeof(struct pt_regs)))
return false;
*ip = regs->ip;
*sp = regs->sp;
*ip = READ_ONCE_NOCHECK(regs->ip);
*sp = READ_ONCE_NOCHECK(regs->sp);
return true;
}
@ -359,8 +359,8 @@ static bool deref_stack_iret_regs(struct unwind_state *state, unsigned long addr
if (!stack_access_ok(state, addr, IRET_FRAME_SIZE))
return false;
*ip = regs->ip;
*sp = regs->sp;
*ip = READ_ONCE_NOCHECK(regs->ip);
*sp = READ_ONCE_NOCHECK(regs->sp);
return true;
}
@ -381,12 +381,12 @@ static bool get_reg(struct unwind_state *state, unsigned int reg_off,
return false;
if (state->full_regs) {
*val = ((unsigned long *)state->regs)[reg];
*val = READ_ONCE_NOCHECK(((unsigned long *)state->regs)[reg]);
return true;
}
if (state->prev_regs) {
*val = ((unsigned long *)state->prev_regs)[reg];
*val = READ_ONCE_NOCHECK(((unsigned long *)state->prev_regs)[reg]);
return true;
}

View File

@ -1131,12 +1131,14 @@ static void *memtype_seq_start(struct seq_file *seq, loff_t *pos)
static void *memtype_seq_next(struct seq_file *seq, void *v, loff_t *pos)
{
kfree(v);
++*pos;
return memtype_get_idx(*pos);
}
static void memtype_seq_stop(struct seq_file *seq, void *v)
{
kfree(v);
}
static int memtype_seq_show(struct seq_file *seq, void *v)
@ -1145,7 +1147,6 @@ static int memtype_seq_show(struct seq_file *seq, void *v)
seq_printf(seq, "%s @ 0x%Lx-0x%Lx\n", cattr_name(print_entry->type),
print_entry->start, print_entry->end);
kfree(print_entry);
return 0;
}

View File

@ -848,9 +848,11 @@ static int do_reloc32(struct section *sec, Elf_Rel *rel, Elf_Sym *sym,
case R_386_PC32:
case R_386_PC16:
case R_386_PC8:
case R_386_PLT32:
/*
* NONE can be ignored and PC relative relocations don't
* need to be adjusted.
* NONE can be ignored and PC relative relocations don't need
* to be adjusted. Because sym must be defined, R_386_PLT32 can
* be treated the same way as R_386_PC32.
*/
break;
@ -891,9 +893,11 @@ static int do_reloc_real(struct section *sec, Elf_Rel *rel, Elf_Sym *sym,
case R_386_PC32:
case R_386_PC16:
case R_386_PC8:
case R_386_PLT32:
/*
* NONE can be ignored and PC relative relocations don't
* need to be adjusted.
* NONE can be ignored and PC relative relocations don't need
* to be adjusted. Because sym must be defined, R_386_PLT32 can
* be treated the same way as R_386_PC32.
*/
break;

View File

@ -706,6 +706,8 @@ int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops,
for (i = 0; i < count; i++) {
unsigned long mfn, pfn;
struct gnttab_unmap_grant_ref unmap[2];
int rc;
/* Do not add to override if the map failed. */
if (map_ops[i].status != GNTST_okay ||
@ -723,10 +725,46 @@ int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops,
WARN(pfn_to_mfn(pfn) != INVALID_P2M_ENTRY, "page must be ballooned");
if (unlikely(!set_phys_to_machine(pfn, FOREIGN_FRAME(mfn)))) {
ret = -ENOMEM;
goto out;
if (likely(set_phys_to_machine(pfn, FOREIGN_FRAME(mfn))))
continue;
/*
* Signal an error for this slot. This in turn requires
* immediate unmapping.
*/
map_ops[i].status = GNTST_general_error;
unmap[0].host_addr = map_ops[i].host_addr,
unmap[0].handle = map_ops[i].handle;
map_ops[i].handle = ~0;
if (map_ops[i].flags & GNTMAP_device_map)
unmap[0].dev_bus_addr = map_ops[i].dev_bus_addr;
else
unmap[0].dev_bus_addr = 0;
if (kmap_ops) {
kmap_ops[i].status = GNTST_general_error;
unmap[1].host_addr = kmap_ops[i].host_addr,
unmap[1].handle = kmap_ops[i].handle;
kmap_ops[i].handle = ~0;
if (kmap_ops[i].flags & GNTMAP_device_map)
unmap[1].dev_bus_addr = kmap_ops[i].dev_bus_addr;
else
unmap[1].dev_bus_addr = 0;
}
/*
* Pre-populate both status fields, to be recognizable in
* the log message below.
*/
unmap[0].status = 1;
unmap[1].status = 1;
rc = HYPERVISOR_grant_table_op(GNTTABOP_unmap_grant_ref,
unmap, 1 + !!kmap_ops);
if (rc || unmap[0].status != GNTST_okay ||
unmap[1].status != GNTST_okay)
pr_err_once("gnttab unmap failed: rc=%d st0=%d st1=%d\n",
rc, unmap[0].status, unmap[1].status);
}
out:

2
block/OWNERS Normal file
View File

@ -0,0 +1,2 @@
# include OWNERS from the authoritative android-mainline branch
include kernel/common:android-mainline:/block/OWNERS

View File

@ -2478,6 +2478,7 @@ static void __bfq_set_in_service_queue(struct bfq_data *bfqd,
}
bfqd->in_service_queue = bfqq;
bfqd->in_serv_last_pos = 0;
}
/*

View File

@ -513,6 +513,14 @@ void blk_queue_io_opt(struct request_queue *q, unsigned int opt)
}
EXPORT_SYMBOL(blk_queue_io_opt);
static unsigned int blk_round_down_sectors(unsigned int sectors, unsigned int lbs)
{
sectors = round_down(sectors, lbs >> SECTOR_SHIFT);
if (sectors < PAGE_SIZE >> SECTOR_SHIFT)
sectors = PAGE_SIZE >> SECTOR_SHIFT;
return sectors;
}
/**
* blk_queue_stack_limits - inherit underlying queue limits for stacked drivers
* @t: the stacking driver (top)
@ -639,6 +647,10 @@ int blk_stack_limits(struct queue_limits *t, struct queue_limits *b,
ret = -1;
}
t->max_sectors = blk_round_down_sectors(t->max_sectors, t->logical_block_size);
t->max_hw_sectors = blk_round_down_sectors(t->max_hw_sectors, t->logical_block_size);
t->max_dev_sectors = blk_round_down_sectors(t->max_dev_sectors, t->logical_block_size);
/* Discard alignment and granularity */
if (b->discard_granularity) {
alignment = queue_limit_discard_alignment(b, start);

View File

@ -896,7 +896,7 @@ int blk_register_queue(struct gendisk *disk)
if (WARN_ON(!q))
return -ENXIO;
WARN_ONCE(test_bit(QUEUE_FLAG_REGISTERED, &q->queue_flags),
WARN_ONCE(blk_queue_registered(q),
"%s is registering an already registered queue\n",
kobject_name(&dev->kobj));
queue_flag_set_unlocked(QUEUE_FLAG_REGISTERED, q);
@ -973,7 +973,7 @@ void blk_unregister_queue(struct gendisk *disk)
return;
/* Return early if disk->queue was never registered. */
if (!test_bit(QUEUE_FLAG_REGISTERED, &q->queue_flags))
if (!blk_queue_registered(q))
return;
/*

View File

@ -708,7 +708,7 @@ void wbt_enable_default(struct request_queue *q)
return;
/* Queue not registered? Maybe shutting down... */
if (!test_bit(QUEUE_FLAG_REGISTERED, &q->queue_flags))
if (!blk_queue_registered(q))
return;
if ((q->mq_ops && IS_ENABLED(CONFIG_BLK_WBT_MQ)) ||

View File

@ -1096,7 +1096,7 @@ static int __elevator_change(struct request_queue *q, const char *name)
struct elevator_type *e;
/* Make sure queue is not in the middle of being removed */
if (!test_bit(QUEUE_FLAG_REGISTERED, &q->queue_flags))
if (!blk_queue_registered(q))
return -ENOENT;
/*

View File

@ -3,7 +3,7 @@ KMI_GENERATION=0
LLVM=1
DEPMOD=depmod
CLANG_PREBUILT_BIN=prebuilts-master/clang/host/linux-x86/clang-r407598/bin
CLANG_PREBUILT_BIN=prebuilts-master/clang/host/linux-x86/clang-r416183/bin
BUILDTOOLS_PREBUILT_BIN=build/build-tools/path/linux-x86
EXTRA_CMDS=''

19
build.config.gki_kprobes Normal file
View File

@ -0,0 +1,19 @@
DEFCONFIG=gki_defconfig
POST_DEFCONFIG_CMDS="check_defconfig && update_kprobes_config"
function update_kprobes_config() {
${KERNEL_DIR}/scripts/config --file ${OUT_DIR}/.config \
-d CONFIG_LTO \
-d CONFIG_LTO_CLANG \
-d CONFIG_CFI_CLANG \
-d CFI_PERMISSIVE \
-d CFI_CLANG \
-e CONFIG_FUNCTION_TRACER \
-e CONFIG_IRQSOFF_TRACER \
-e CONFIG_PREEMPT_TRACER \
-e CONFIG_DEBUG_FS \
-e CONFIG_CHECKPOINT_RESTORE \
-d CONFIG_RANDOMIZE_BASE
(cd ${OUT_DIR} && \
make ${CC_LD_ARG} O=${OUT_DIR} olddefconfig)
}

View File

@ -0,0 +1,4 @@
. ${ROOT_DIR}/${KERNEL_DIR}/build.config.common
. ${ROOT_DIR}/${KERNEL_DIR}/build.config.aarch64
. ${ROOT_DIR}/${KERNEL_DIR}/build.config.gki_kprobes

View File

@ -0,0 +1,4 @@
. ${ROOT_DIR}/${KERNEL_DIR}/build.config.common
. ${ROOT_DIR}/${KERNEL_DIR}/build.config.x86_64
. ${ROOT_DIR}/${KERNEL_DIR}/build.config.gki_kprobes

View File

@ -157,7 +157,7 @@ static int __init blacklist_init(void)
KEY_USR_VIEW | KEY_USR_READ |
KEY_USR_SEARCH,
KEY_ALLOC_NOT_IN_QUOTA |
KEY_FLAG_KEEP,
KEY_ALLOC_SET_KEEP,
NULL, NULL);
if (IS_ERR(blacklist_keyring))
panic("Can't allocate system blacklist keyring\n");

2
crypto/OWNERS Normal file
View File

@ -0,0 +1,2 @@
# include OWNERS from the authoritative android-mainline branch
include kernel/common:android-mainline:/crypto/OWNERS

View File

@ -71,6 +71,9 @@ int crypto_ecdh_decode_key(const char *buf, unsigned int len,
if (secret.type != CRYPTO_KPP_SECRET_TYPE_ECDH)
return -EINVAL;
if (unlikely(len < secret.len))
return -EINVAL;
ptr = ecdh_unpack_data(&params->curve_id, ptr, sizeof(params->curve_id));
ptr = ecdh_unpack_data(&params->key_size, ptr, sizeof(params->key_size));
if (secret.len != crypto_ecdh_key_len(params))

View File

@ -202,8 +202,8 @@ static int test_mb_aead_jiffies(struct test_mb_aead_data *data, int enc,
goto out;
}
pr_cont("%d operations in %d seconds (%ld bytes)\n",
bcount * num_mb, secs, (long)bcount * blen * num_mb);
pr_cont("%d operations in %d seconds (%llu bytes)\n",
bcount * num_mb, secs, (u64)bcount * blen * num_mb);
out:
kfree(rc);
@ -472,8 +472,8 @@ static int test_aead_jiffies(struct aead_request *req, int enc,
return ret;
}
printk("%d operations in %d seconds (%ld bytes)\n",
bcount, secs, (long)bcount * blen);
pr_cont("%d operations in %d seconds (%llu bytes)\n",
bcount, secs, (u64)bcount * blen);
return 0;
}
@ -763,8 +763,8 @@ static int test_mb_ahash_jiffies(struct test_mb_ahash_data *data, int blen,
goto out;
}
pr_cont("%d operations in %d seconds (%ld bytes)\n",
bcount * num_mb, secs, (long)bcount * blen * num_mb);
pr_cont("%d operations in %d seconds (%llu bytes)\n",
bcount * num_mb, secs, (u64)bcount * blen * num_mb);
out:
kfree(rc);
@ -1200,8 +1200,8 @@ static int test_mb_acipher_jiffies(struct test_mb_skcipher_data *data, int enc,
goto out;
}
pr_cont("%d operations in %d seconds (%ld bytes)\n",
bcount * num_mb, secs, (long)bcount * blen * num_mb);
pr_cont("%d operations in %d seconds (%llu bytes)\n",
bcount * num_mb, secs, (u64)bcount * blen * num_mb);
out:
kfree(rc);
@ -1438,8 +1438,8 @@ static int test_acipher_jiffies(struct skcipher_request *req, int enc,
return ret;
}
pr_cont("%d operations in %d seconds (%ld bytes)\n",
bcount, secs, (long)bcount * blen);
pr_cont("%d operations in %d seconds (%llu bytes)\n",
bcount, secs, (u64)bcount * blen);
return 0;
}

2
drivers/OWNERS Normal file
View File

@ -0,0 +1,2 @@
# include OWNERS from the authoritative android-mainline branch
include kernel/common:android-mainline:/drivers/OWNERS

View File

@ -269,7 +269,12 @@ static int __init acpi_configfs_init(void)
acpi_table_group = configfs_register_default_group(root, "table",
&acpi_tables_type);
return PTR_ERR_OR_ZERO(acpi_table_group);
if (IS_ERR(acpi_table_group)) {
configfs_unregister_subsystem(&acpi_configfs);
return PTR_ERR(acpi_table_group);
}
return 0;
}
module_init(acpi_configfs_init);

View File

@ -720,9 +720,6 @@ static int acpi_data_prop_read_single(const struct acpi_device_data *data,
const union acpi_object *obj;
int ret;
if (!val)
return -EINVAL;
if (proptype >= DEV_PROP_U8 && proptype <= DEV_PROP_U64) {
ret = acpi_data_get_property(data, propname, ACPI_TYPE_INTEGER, &obj);
if (ret)
@ -732,28 +729,43 @@ static int acpi_data_prop_read_single(const struct acpi_device_data *data,
case DEV_PROP_U8:
if (obj->integer.value > U8_MAX)
return -EOVERFLOW;
*(u8 *)val = obj->integer.value;
if (val)
*(u8 *)val = obj->integer.value;
break;
case DEV_PROP_U16:
if (obj->integer.value > U16_MAX)
return -EOVERFLOW;
*(u16 *)val = obj->integer.value;
if (val)
*(u16 *)val = obj->integer.value;
break;
case DEV_PROP_U32:
if (obj->integer.value > U32_MAX)
return -EOVERFLOW;
*(u32 *)val = obj->integer.value;
if (val)
*(u32 *)val = obj->integer.value;
break;
default:
*(u64 *)val = obj->integer.value;
if (val)
*(u64 *)val = obj->integer.value;
break;
}
if (!val)
return 1;
} else if (proptype == DEV_PROP_STRING) {
ret = acpi_data_get_property(data, propname, ACPI_TYPE_STRING, &obj);
if (ret)
return ret;
*(char **)val = obj->string.pointer;
if (val)
*(char **)val = obj->string.pointer;
return 1;
} else {
@ -767,7 +779,7 @@ int acpi_dev_prop_read_single(struct acpi_device *adev, const char *propname,
{
int ret;
if (!adev)
if (!adev || !val)
return -EINVAL;
ret = acpi_data_prop_read_single(&adev->data, propname, proptype, val);
@ -861,10 +873,20 @@ static int acpi_data_prop_read(const struct acpi_device_data *data,
const union acpi_object *items;
int ret;
if (val && nval == 1) {
if (nval == 1 || !val) {
ret = acpi_data_prop_read_single(data, propname, proptype, val);
if (ret >= 0)
/*
* The overflow error means that the property is there and it is
* single-value, but its type does not match, so return.
*/
if (ret >= 0 || ret == -EOVERFLOW)
return ret;
/*
* Reading this property as a single-value one failed, but its
* value may still be represented as one-element array, so
* continue.
*/
}
ret = acpi_data_get_property_array(data, propname, ACPI_TYPE_ANY, &obj);

View File

@ -284,10 +284,11 @@ static int amba_remove(struct device *dev)
{
struct amba_device *pcdev = to_amba_device(dev);
struct amba_driver *drv = to_amba_driver(dev->driver);
int ret;
int ret = 0;
pm_runtime_get_sync(dev);
ret = drv->remove(pcdev);
if (drv->remove)
ret = drv->remove(pcdev);
pm_runtime_put_noidle(dev);
/* Undo the runtime PM settings in amba_probe() */
@ -304,7 +305,9 @@ static int amba_remove(struct device *dev)
static void amba_shutdown(struct device *dev)
{
struct amba_driver *drv = to_amba_driver(dev->driver);
drv->shutdown(to_amba_device(dev));
if (drv->shutdown)
drv->shutdown(to_amba_device(dev));
}
/**
@ -317,12 +320,13 @@ static void amba_shutdown(struct device *dev)
*/
int amba_driver_register(struct amba_driver *drv)
{
drv->drv.bus = &amba_bustype;
if (!drv->probe)
return -EINVAL;
#define SETFN(fn) if (drv->fn) drv->drv.fn = amba_##fn
SETFN(probe);
SETFN(remove);
SETFN(shutdown);
drv->drv.bus = &amba_bustype;
drv->drv.probe = amba_probe;
drv->drv.remove = amba_remove;
drv->drv.shutdown = amba_shutdown;
return driver_register(&drv->drv);
}

View File

@ -370,6 +370,10 @@ static int brcm_ahci_resume(struct device *dev)
if (ret)
return ret;
ret = ahci_platform_enable_regulators(hpriv);
if (ret)
goto out_disable_clks;
brcm_sata_init(priv);
brcm_sata_phys_enable(priv);
brcm_sata_alpm_init(hpriv);
@ -399,6 +403,8 @@ out_disable_platform_phys:
ahci_platform_disable_phys(hpriv);
out_disable_phys:
brcm_sata_phys_disable(priv);
ahci_platform_disable_regulators(hpriv);
out_disable_clks:
ahci_platform_disable_clks(hpriv);
return ret;
}
@ -471,6 +477,10 @@ static int brcm_ahci_probe(struct platform_device *pdev)
if (ret)
goto out_reset;
ret = ahci_platform_enable_regulators(hpriv);
if (ret)
goto out_disable_clks;
/* Must be first so as to configure endianness including that
* of the standard AHCI register space.
*/
@ -480,7 +490,7 @@ static int brcm_ahci_probe(struct platform_device *pdev)
priv->port_mask = brcm_ahci_get_portmask(hpriv, priv);
if (!priv->port_mask) {
ret = -ENODEV;
goto out_disable_clks;
goto out_disable_regulators;
}
/* Must be done before ahci_platform_enable_phys() */
@ -505,6 +515,8 @@ out_disable_platform_phys:
ahci_platform_disable_phys(hpriv);
out_disable_phys:
brcm_sata_phys_disable(priv);
out_disable_regulators:
ahci_platform_disable_regulators(hpriv);
out_disable_clks:
ahci_platform_disable_clks(hpriv);
out_reset:

View File

@ -117,8 +117,7 @@ static void ht16k33_fb_queue(struct ht16k33_priv *priv)
{
struct ht16k33_fbdev *fbdev = &priv->fbdev;
schedule_delayed_work(&fbdev->work,
msecs_to_jiffies(HZ / fbdev->refresh_rate));
schedule_delayed_work(&fbdev->work, HZ / fbdev->refresh_rate);
}
/*

View File

@ -12,7 +12,7 @@ static int regmap_sdw_write(void *context, unsigned int reg, unsigned int val)
struct device *dev = context;
struct sdw_slave *slave = dev_to_sdw_dev(dev);
return sdw_write(slave, reg, val);
return sdw_write_no_pm(slave, reg, val);
}
static int regmap_sdw_read(void *context, unsigned int reg, unsigned int *val)
@ -21,7 +21,7 @@ static int regmap_sdw_read(void *context, unsigned int reg, unsigned int *val)
struct sdw_slave *slave = dev_to_sdw_dev(dev);
int read;
read = sdw_read(slave, reg);
read = sdw_read_no_pm(slave, reg);
if (read < 0)
return read;

View File

@ -4074,21 +4074,22 @@ static int floppy_open(struct block_device *bdev, fmode_t mode)
if (UFDCS->rawcmd == 1)
UFDCS->rawcmd = 2;
if (!(mode & FMODE_NDELAY)) {
if (mode & (FMODE_READ|FMODE_WRITE)) {
UDRS->last_checked = 0;
clear_bit(FD_OPEN_SHOULD_FAIL_BIT, &UDRS->flags);
check_disk_change(bdev);
if (test_bit(FD_DISK_CHANGED_BIT, &UDRS->flags))
goto out;
if (test_bit(FD_OPEN_SHOULD_FAIL_BIT, &UDRS->flags))
goto out;
}
res = -EROFS;
if ((mode & FMODE_WRITE) &&
!test_bit(FD_DISK_WRITABLE_BIT, &UDRS->flags))
if (mode & (FMODE_READ|FMODE_WRITE)) {
UDRS->last_checked = 0;
clear_bit(FD_OPEN_SHOULD_FAIL_BIT, &UDRS->flags);
check_disk_change(bdev);
if (test_bit(FD_DISK_CHANGED_BIT, &UDRS->flags))
goto out;
if (test_bit(FD_OPEN_SHOULD_FAIL_BIT, &UDRS->flags))
goto out;
}
res = -EROFS;
if ((mode & FMODE_WRITE) &&
!test_bit(FD_DISK_WRITABLE_BIT, &UDRS->flags))
goto out;
mutex_unlock(&open_lock);
mutex_unlock(&floppy_mutex);
return 0;

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