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

https://source.android.com/security/bulletin/2021-08-01
CVE-2020-14381
CVE-2021-3347
CVE-2021-28375

* tag 'ASB-2021-08-05_4.19-stable' of https://github.com/aosp-mirror/kernel_common:
  Linux 4.19.200
  ARM: dts: versatile: Fix up interrupt controller node names
  cifs: fix the out of range assignment to bit fields in parse_server_interfaces
  firmware: arm_scmi: Fix range check for the maximum number of pending messages
  firmware: arm_scmi: Fix possible scmi_linux_errmap buffer overflow
  hfs: add lock nesting notation to hfs_find_init
  hfs: fix high memory mapping in hfs_bnode_read
  hfs: add missing clean-up in hfs_fill_super
  sctp: move 198 addresses from unusable to private scope
  net: annotate data race around sk_ll_usec
  net/802/garp: fix memleak in garp_request_join()
  net/802/mrp: fix memleak in mrp_request_join()
  workqueue: fix UAF in pwq_unbound_release_workfn()
  af_unix: fix garbage collect vs MSG_PEEK
  net: split out functions related to registering inflight socket files
  KVM: x86: determine if an exception has an error code only when injecting it.
  iio: dac: ds4422/ds4424 drop of_node check
  selftest: fix build error in tools/testing/selftests/vm/userfaultfd.c
  ANDROID: staging: ion: move buffer kmap from begin/end_cpu_access()
  Linux 4.19.199
  xhci: add xhci_get_virt_ep() helper
  spi: spi-fsl-dspi: Fix a resource leak in an error handling path
  PCI: Mark AMD Navi14 GPU ATS as broken
  btrfs: compression: don't try to compress if we don't have enough pages
  iio: accel: bma180: Fix BMA25x bandwidth register values
  iio: accel: bma180: Use explicit member assignment
  net: bcmgenet: ensure EXT_ENERGY_DET_MASK is clear
  net: dsa: mv88e6xxx: use correct .stats_set_histogram() on Topaz
  KVM: Use kvm_pfn_t for local PFN variable in hva_to_pfn_remapped()
  KVM: do not allow mapping valid but non-reference-counted pages
  KVM: do not assume PTE is writable after follow_pfn
  drm: Return -ENOTTY for non-drm ioctls
  nds32: fix up stack guard gap
  selftest: use mmap instead of posix_memalign to allocate memory
  ixgbe: Fix packet corruption due to missing DMA sync
  media: ngene: Fix out-of-bounds bug in ngene_command_config_free_buf()
  tracing: Fix bug in rb_per_cpu_empty() that might cause deadloop.
  usb: dwc2: gadget: Fix sending zero length packet in DDMA mode.
  USB: serial: cp210x: add ID for CEL EM3588 USB ZigBee stick
  USB: serial: cp210x: fix comments for GE CS1000
  USB: serial: option: add support for u-blox LARA-R6 family
  usb: renesas_usbhs: Fix superfluous irqs happen after usb_pkt_pop()
  usb: max-3421: Prevent corruption of freed memory
  USB: usb-storage: Add LaCie Rugged USB3-FW to IGNORE_UAS
  usb: hub: Fix link power management max exit latency (MEL) calculations
  usb: hub: Disable USB 3 device initiated lpm if exit latency is too high
  KVM: PPC: Book3S: Fix H_RTAS rets buffer overflow
  xhci: Fix lost USB 2 remote wake
  ALSA: sb: Fix potential ABBA deadlock in CSP driver
  ALSA: usb-audio: Add registration quirk for JBL Quantum headsets
  s390/ftrace: fix ftrace_update_ftrace_func implementation
  Revert "MIPS: add PMD table accounting into MIPS'pmd_alloc_one"
  proc: Avoid mixing integer types in mem_rw()
  drm/panel: raspberrypi-touchscreen: Prevent double-free
  net: sched: cls_api: Fix the the wrong parameter
  sctp: update active_key for asoc when old key is being replaced
  Revert "USB: quirks: ignore remote wake-up on Fibocom L850-GL LTE modem"
  nvme-pci: don't WARN_ON in nvme_reset_work if ctrl.state is not RESETTING
  net/sched: act_skbmod: Skip non-Ethernet packets
  net/tcp_fastopen: fix data races around tfo_active_disable_stamp
  spi: cadence: Correct initialisation of runtime PM again
  scsi: target: Fix protect handling in WRITE SAME(32)
  scsi: iscsi: Fix iface sysfs attr detection
  netrom: Decrease sock refcount when sock timers expire
  KVM: PPC: Fix kvm_arch_vcpu_ioctl vcpu_load leak
  net: decnet: Fix sleeping inside in af_decnet
  net: fix uninit-value in caif_seqpkt_sendmsg
  bpftool: Check malloc return value in mount_bpffs_for_pin
  s390/bpf: Perform r1 range checking before accessing jit->seen_reg[r1]
  liquidio: Fix unintentional sign extension issue on left shift of u16
  spi: mediatek: fix fifo rx mode
  perf probe-file: Delete namelist in del_events() on the error path
  perf test bpf: Free obj_buf
  perf lzma: Close lzma stream on exit
  perf dso: Fix memory leak in dso__new_map()
  perf probe: Fix dso->nsinfo refcounting
  perf map: Fix dso->nsinfo refcounting
  nvme-pci: do not call nvme_dev_remove_admin from nvme_remove
  ipv6: fix 'disable_policy' for fwd packets
  igb: Fix position of assignment to *ring
  igb: Check if num of q_vectors is smaller than max before array access
  iavf: Fix an error handling path in 'iavf_probe()'
  e1000e: Fix an error handling path in 'e1000_probe()'
  fm10k: Fix an error handling path in 'fm10k_probe()'
  igb: Fix an error handling path in 'igb_probe()'
  ixgbe: Fix an error handling path in 'ixgbe_probe()'
  igb: Fix use-after-free error during reset
  net: ip_tunnel: fix mtu calculation for ETHER tunnel devices
  udp: annotate data races around unix_sk(sk)->gso_size
  bpftool: Properly close va_list 'ap' by va_end() on error
  ipv6: tcp: drop silly ICMPv6 packet too big messages
  tcp: annotate data races around tp->mtu_info
  dma-buf/sync_file: Don't leak fences on merge failure
  net: validate lwtstate->data before returning from skb_tunnel_info()
  net: send SYNACK packet with accepted fwmark
  net: ti: fix UAF in tlan_remove_one
  net: qcom/emac: fix UAF in emac_remove
  net: moxa: fix UAF in moxart_mac_probe
  net: bcmgenet: Ensure all TX/RX queues DMAs are disabled
  net: bridge: sync fdb to new unicast-filtering ports
  netfilter: ctnetlink: suspicious RCU usage in ctnetlink_dump_helpinfo
  net: ipv6: fix return value of ip6_skb_dst_mtu
  net: dsa: mv88e6xxx: enable .rmu_disable() on Topaz
  dm writecache: fix writing beyond end of underlying device when shrinking
  dm writecache: return the exact table values that were set
  mm: slab: fix kmem_cache_create failed when sysfs node not destroyed
  sched/fair: Fix CFS bandwidth hrtimer expiry type
  scsi: libfc: Fix array index out of bound exception
  scsi: libsas: Add LUN number check in .slave_alloc callback
  scsi: aic7xxx: Fix unintentional sign extension issue on left shift of u8
  rtc: max77686: Do not enforce (incorrect) interrupt trigger type
  kbuild: mkcompile_h: consider timestamp if KBUILD_BUILD_TIMESTAMP is set
  thermal/core: Correct function name thermal_zone_device_unregister()
  arm64: dts: ls208xa: remove bus-num from dspi node
  soc/tegra: fuse: Fix Tegra234-only builds
  ARM: dts: stm32: move stmmac axi config in ethernet node on stm32mp15
  ARM: dts: stm32: fix i2c node name on stm32f746 to prevent warnings
  ARM: dts: rockchip: fix supply properties in io-domains nodes
  arm64: dts: juno: Update SCPI nodes as per the YAML schema
  ARM: dts: stm32: fix timer nodes on STM32 MCU to prevent warnings
  ARM: dts: stm32: fix RCC node name on stm32f429 MCU
  ARM: dts: stm32: fix gpio-keys node on STM32 MCU boards
  rtc: mxc_v2: add missing MODULE_DEVICE_TABLE
  ARM: imx: pm-imx5: Fix references to imx5_cpu_suspend_info
  ARM: dts: imx6: phyFLEX: Fix UART hardware flow control
  ARM: dts: Hurricane 2: Fix NAND nodes names
  ARM: dts: BCM63xx: Fix NAND nodes names
  ARM: NSP: dts: fix NAND nodes names
  ARM: Cygnus: dts: fix NAND nodes names
  ARM: brcmstb: dts: fix NAND nodes names
  reset: ti-syscon: fix to_ti_syscon_reset_data macro
  arm64: dts: rockchip: Fix power-controller node names for rk3328
  ARM: dts: rockchip: Fix power-controller node names for rk3288
  ARM: dts: rockchip: Fix IOMMU nodes properties on rk322x
  ARM: dts: rockchip: Fix the timer clocks order
  arm64: dts: rockchip: fix pinctrl sleep nodename for rk3399.dtsi
  ARM: dts: rockchip: fix pinctrl sleep nodename for rk3036-kylin and rk3288
  ARM: dts: gemini: add device_type on pci
  ARM: dts: gemini: rename mdio to the right name
  ANDROID: generate_initcall_order.pl: Use two dash long options for llvm-nm
  Revert "media: subdev: disallow ioctl for saa6588/davinci"
  ANDROID: GKI: fix up crc change in ip.h
  Linux 4.19.198
  seq_file: disallow extremely large seq buffer allocations
  scsi: scsi_dh_alua: Fix signedness bug in alua_rtpg()
  net: bridge: multicast: fix PIM hello router port marking race
  MIPS: vdso: Invalid GIC access through VDSO
  mips: disable branch profiling in boot/decompress.o
  mips: always link byteswap helpers into decompressor
  scsi: be2iscsi: Fix an error handling path in beiscsi_dev_probe()
  ARM: dts: imx6q-dhcom: Add gpios pinctrl for i2c bus recovery
  ARM: dts: imx6q-dhcom: Fix ethernet plugin detection problems
  ARM: dts: imx6q-dhcom: Fix ethernet reset time properties
  ARM: dts: am437x: align ti,pindir-d0-out-d1-in property with dt-shema
  ARM: dts: am335x: align ti,pindir-d0-out-d1-in property with dt-shema
  memory: fsl_ifc: fix leak of private memory on probe failure
  memory: fsl_ifc: fix leak of IO mapping on probe failure
  reset: bail if try_module_get() fails
  ARM: dts: BCM5301X: Fixup SPI binding
  ARM: dts: r8a7779, marzen: Fix DU clock names
  arm64: dts: renesas: v3msk: Fix memory size
  rtc: fix snprintf() checking in is_rtc_hctosys()
  memory: atmel-ebi: add missing of_node_put for loop iteration
  ARM: dts: exynos: fix PWM LED max brightness on Odroid XU4
  ARM: dts: exynos: fix PWM LED max brightness on Odroid HC1
  ARM: dts: exynos: fix PWM LED max brightness on Odroid XU/XU3
  reset: a10sr: add missing of_match_table reference
  hexagon: use common DISCARDS macro
  NFSv4/pNFS: Don't call _nfs4_pnfs_v3_ds_connect multiple times
  ALSA: isa: Fix error return code in snd_cmi8330_probe()
  virtio_net: move tx vq operation under tx queue lock
  x86/fpu: Limit xstate copy size in xstateregs_set()
  PCI: iproc: Support multi-MSI only on uniprocessor kernel
  PCI: iproc: Fix multi-MSI base vector number allocation
  ubifs: Set/Clear I_LINKABLE under i_lock for whiteout inode
  nfs: fix acl memory leak of posix_acl_create()
  watchdog: aspeed: fix hardware timeout calculation
  um: fix error return code in winch_tramp()
  um: fix error return code in slip_open()
  NFSv4: Initialise connection to the server in nfs4_alloc_client()
  power: supply: rt5033_battery: Fix device tree enumeration
  PCI/sysfs: Fix dsm_label_utf16s_to_utf8s() buffer overrun
  f2fs: add MODULE_SOFTDEP to ensure crc32 is included in the initramfs
  virtio_console: Assure used length from device is limited
  virtio_net: Fix error handling in virtnet_restore()
  virtio-blk: Fix memory leak among suspend/resume procedure
  ACPI: video: Add quirk for the Dell Vostro 3350
  ACPI: AMBA: Fix resource name in /proc/iomem
  pwm: tegra: Don't modify HW state in .remove callback
  power: supply: ab8500: add missing MODULE_DEVICE_TABLE
  power: supply: charger-manager: add missing MODULE_DEVICE_TABLE
  NFS: nfs_find_open_context() may only select open files
  ceph: remove bogus checks and WARN_ONs from ceph_set_page_dirty
  orangefs: fix orangefs df output.
  PCI: tegra: Add missing MODULE_DEVICE_TABLE
  x86/fpu: Return proper error codes from user access functions
  watchdog: iTCO_wdt: Account for rebooting on second timeout
  watchdog: Fix possible use-after-free by calling del_timer_sync()
  watchdog: sc520_wdt: Fix possible use-after-free in wdt_turnoff()
  watchdog: Fix possible use-after-free in wdt_startup()
  ARM: 9087/1: kprobes: test-thumb: fix for LLVM_IAS=1
  power: reset: gpio-poweroff: add missing MODULE_DEVICE_TABLE
  power: supply: max17042: Do not enforce (incorrect) interrupt trigger type
  power: supply: ab8500: Avoid NULL pointers
  pwm: spear: Don't modify HW state in .remove callback
  lib/decompress_unlz4.c: correctly handle zero-padding around initrds.
  i2c: core: Disable client irq on reboot/shutdown
  intel_th: Wait until port is in reset before programming it
  staging: rtl8723bs: fix macro value for 2.4Ghz only device
  ALSA: hda: Add IRQ check for platform_get_irq()
  backlight: lm3630a: Fix return code of .update_status() callback
  powerpc/boot: Fixup device-tree on little endian
  usb: gadget: hid: fix error return code in hid_bind()
  usb: gadget: f_hid: fix endianness issue with descriptors
  ALSA: bebob: add support for ToneWeal FW66
  Input: hideep - fix the uninitialized use in hideep_nvm_unlock()
  ASoC: soc-core: Fix the error return code in snd_soc_of_parse_audio_routing()
  gpio: pca953x: Add support for the On Semi pca9655
  selftests/powerpc: Fix "no_handler" EBB selftest
  ALSA: ppc: fix error return code in snd_pmac_probe()
  gpio: zynq: Check return value of pm_runtime_get_sync
  powerpc/ps3: Add dma_mask to ps3_dma_region
  ALSA: sb: Fix potential double-free of CSP mixer elements
  selftests: timers: rtcpie: skip test if default RTC device does not exist
  s390/sclp_vt220: fix console name to match device
  mfd: da9052/stmpe: Add and modify MODULE_DEVICE_TABLE
  scsi: qedi: Fix null ref during abort handling
  scsi: iscsi: Fix shost->max_id use
  scsi: iscsi: Fix conn use after free during resets
  scsi: iscsi: Add iscsi_cls_conn refcount helpers
  fs/jfs: Fix missing error code in lmLogInit()
  scsi: scsi_dh_alua: Check for negative result value
  tty: serial: 8250: serial_cs: Fix a memory leak in error handling path
  ALSA: ac97: fix PM reference leak in ac97_bus_remove()
  scsi: core: Cap scsi_host cmd_per_lun at can_queue
  scsi: lpfc: Fix crash when lpfc_sli4_hba_setup() fails to initialize the SGLs
  scsi: lpfc: Fix "Unexpected timeout" error in direct attach topology
  w1: ds2438: fixing bug that would always get page0
  Revert "ALSA: bebob/oxfw: fix Kconfig entry for Mackie d.2 Pro"
  misc/libmasm/module: Fix two use after free in ibmasm_init_one
  tty: serial: fsl_lpuart: fix the potential risk of division or modulo by zero
  PCI: aardvark: Fix kernel panic during PIO transfer
  PCI: aardvark: Don't rely on jiffies while holding spinlock
  tracing: Do not reference char * as a string in histograms
  scsi: core: Fix bad pointer dereference when ehandler kthread is invalid
  KVM: X86: Disable hardware breakpoints unconditionally before kvm_x86->run()
  KVM: x86: Use guest MAXPHYADDR from CPUID.0x8000_0008 iff TDP is enabled
  smackfs: restrict bytes count in smk_set_cipso()
  jfs: fix GPF in diFree
  pinctrl: mcp23s08: Fix missing unlock on error in mcp23s08_irq()
  media: uvcvideo: Fix pixel format change for Elgato Cam Link 4K
  media: gspca/sunplus: fix zero-length control requests
  media: gspca/sq905: fix control-request direction
  media: zr364xx: fix memory leak in zr364xx_start_readpipe
  media: dtv5100: fix control-request directions
  media: subdev: disallow ioctl for saa6588/davinci
  PCI: aardvark: Fix checking for PIO Non-posted Request
  PCI: Leave Apple Thunderbolt controllers on for s2idle or standby
  dm btree remove: assign new_root only when removal succeeds
  coresight: tmc-etf: Fix global-out-of-bounds in tmc_update_etf_buffer()
  ipack/carriers/tpci200: Fix a double free in tpci200_pci_probe
  tracing: Resize tgid_map to pid_max, not PID_MAX_DEFAULT
  tracing: Simplify & fix saved_tgids logic
  seq_buf: Fix overflow in seq_buf_putmem_hex()
  power: supply: ab8500: Fix an old bug
  ipmi/watchdog: Stop watchdog timer when the current action is 'none'
  qemu_fw_cfg: Make fw_cfg_rev_attr a proper kobj_attribute
  ASoC: tegra: Set driver_name=tegra for all machine drivers
  clocksource/arm_arch_timer: Improve Allwinner A64 timer workaround
  cpu/hotplug: Cure the cpusets trainwreck
  ata: ahci_sunxi: Disable DIPM
  mmc: core: Allow UHS-I voltage switch for SDSC cards if supported
  mmc: core: clear flags before allowing to retune
  mmc: sdhci: Fix warning message when accessing RPMB in HS400 mode
  drm/msm/mdp4: Fix modifier support enabling
  pinctrl/amd: Add device HID for new AMD GPIO controller
  drm/amd/display: fix incorrrect valid irq check
  drm/radeon: Add the missed drm_gem_object_put() in radeon_user_framebuffer_create()
  usb: gadget: f_fs: Fix setting of device and driver data cross-references
  powerpc/barrier: Avoid collision with clang's __lwsync macro
  fuse: reject internal errno
  serial: mvebu-uart: fix calculation of clock divisor
  serial: mvebu-uart: clarify the baud rate derivation
  bdi: Do not use freezable workqueue
  fscrypt: don't ignore minor_hash when hash is 0
  MIPS: set mips32r5 for virt extensions
  sctp: add size validation when walking chunks
  sctp: validate from_addr_param return
  Bluetooth: btusb: fix bt fiwmare downloading failure issue for qca btsoc.
  Bluetooth: Shutdown controller after workqueues are flushed or cancelled
  Bluetooth: Fix the HCI to MGMT status conversion table
  RDMA/cma: Fix rdma_resolve_route() memory leak
  net: ip: avoid OOM kills with large UDP sends over loopback
  media, bpf: Do not copy more entries than user space requested
  wireless: wext-spy: Fix out-of-bounds warning
  sfc: error code if SRIOV cannot be disabled
  sfc: avoid double pci_remove of VFs
  iwlwifi: pcie: free IML DMA memory allocation
  iwlwifi: mvm: don't change band on bound PHY contexts
  RDMA/rxe: Don't overwrite errno from ib_umem_get()
  vsock: notify server to shutdown when client has pending signal
  atm: nicstar: register the interrupt handler in the right place
  atm: nicstar: use 'dma_free_coherent' instead of 'kfree'
  MIPS: add PMD table accounting into MIPS'pmd_alloc_one
  rtl8xxxu: Fix device info for RTL8192EU devices
  net: fix mistake path for netdev_features_strings
  cw1200: add missing MODULE_DEVICE_TABLE
  wl1251: Fix possible buffer overflow in wl1251_cmd_scan
  wlcore/wl12xx: Fix wl12xx get_mac error if device is in ELP
  xfrm: Fix error reporting in xfrm_state_construct.
  selinux: use __GFP_NOWARN with GFP_NOWAIT in the AVC
  fjes: check return value after calling platform_get_resource()
  net: micrel: check return value after calling platform_get_resource()
  net: mvpp2: check return value after calling platform_get_resource()
  net: bcmgenet: check return value after calling platform_get_resource()
  virtio_net: Remove BUG() to avoid machine dead
  ice: set the value of global config lock timeout longer
  pinctrl: mcp23s08: fix race condition in irq handler
  dm space maps: don't reset space map allocation cursor when committing
  RDMA/cxgb4: Fix missing error code in create_qp()
  ipv6: use prandom_u32() for ID generation
  clk: tegra: Ensure that PLLU configuration is applied properly
  clk: renesas: r8a77995: Add ZA2 clock
  e100: handle eeprom as little endian
  udf: Fix NULL pointer dereference in udf_symlink function
  drm/virtio: Fix double free on probe failure
  reiserfs: add check for invalid 1st journal block
  net: Treat __napi_schedule_irqoff() as __napi_schedule() on PREEMPT_RT
  atm: nicstar: Fix possible use-after-free in nicstar_cleanup()
  mISDN: fix possible use-after-free in HFC_cleanup()
  atm: iphase: fix possible use-after-free in ia_module_exit()
  hugetlb: clear huge pte during flush function on mips platform
  drm/amd/display: fix use_max_lb flag for 420 pixel formats
  net: pch_gbe: Use proper accessors to BE data in pch_ptp_match()
  drm/amd/amdgpu/sriov disable all ip hw status by default
  drm/zte: Don't select DRM_KMS_FB_HELPER
  drm/mxsfb: Don't select DRM_KMS_FB_HELPER
  mmc: vub3000: fix control-request direction
  mmc: block: Disable CMDQ on the ioctl path
  perf llvm: Return -ENOMEM when asprintf() fails
  selftests/vm/pkeys: fix alloc_random_pkey() to make it really, really random
  mm/huge_memory.c: don't discard hugepage if other processes are mapping it
  vfio/pci: Handle concurrent vma faults
  arm64: dts: marvell: armada-37xx: Fix reg for standard variant of UART
  serial: mvebu-uart: correctly calculate minimal possible baudrate
  powerpc: Offline CPU in stop_this_cpu()
  leds: ktd2692: Fix an error handling path
  leds: as3645a: Fix error return code in as3645a_parse_node()
  configfs: fix memleak in configfs_release_bin_file
  ASoC: atmel-i2s: Fix usage of capture and playback at the same time
  extcon: max8997: Add missing modalias string
  extcon: sm5502: Drop invalid register write in sm5502_reg_data
  phy: ti: dm816x: Fix the error handling path in 'dm816x_usb_phy_probe()
  scsi: mpt3sas: Fix error return value in _scsih_expander_add()
  mtd: rawnand: marvell: add missing clk_disable_unprepare() on error in marvell_nfc_resume()
  of: Fix truncation of memory sizes on 32-bit platforms
  ASoC: cs42l42: Correct definition of CS42L42_ADC_PDN_MASK
  iio: prox: isl29501: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
  serial: 8250: Actually allow UPF_MAGIC_MULTIPLIER baud rates
  staging: mt7621-dts: fix pci address for PCI memory range
  staging: gdm724x: check for overflow in gdm_lte_netif_rx()
  staging: gdm724x: check for buffer overflow in gdm_lte_multi_sdu_pkt()
  iio: adc: ti-ads8688: Fix alignment of buffer in iio_push_to_buffers_with_timestamp()
  iio: adc: mxs-lradc: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
  iio: adc: hx711: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
  eeprom: idt_89hpesx: Restore printing the unsupported fwnode name
  eeprom: idt_89hpesx: Put fwnode in matching case during ->probe()
  s390: appldata depends on PROC_SYSCTL
  visorbus: fix error return code in visorchipset_init()
  fsi/sbefifo: Fix reset timeout
  fsi/sbefifo: Clean up correct FIFO when receiving reset request from SBE
  fsi: scom: Reset the FSI2PIB engine for any error
  fsi: core: Fix return of error values on failures
  scsi: FlashPoint: Rename si_flags field
  tty: nozomi: Fix the error handling path of 'nozomi_card_init()'
  char: pcmcia: error out if 'num_bytes_read' is greater than 4 in set_protocol()
  Input: hil_kbd - fix error return code in hil_dev_connect()
  ASoC: rsnd: tidyup loop on rsnd_adg_clk_query()
  ASoC: hisilicon: fix missing clk_disable_unprepare() on error in hi6210_i2s_startup()
  iio: potentiostat: lmp91000: Fix alignment of buffer in iio_push_to_buffers_with_timestamp()
  iio: light: tcs3472: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
  iio: light: tcs3414: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
  iio: light: isl29125: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
  iio: prox: as3935: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
  iio: prox: pulsed-light: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
  iio: prox: srf08: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
  iio: humidity: am2315: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
  iio: gyro: bmg160: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
  iio: adc: vf610: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
  iio: adc: ti-ads1015: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
  iio: accel: stk8ba50: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
  iio: accel: stk8312: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
  iio: accel: kxcjk-1013: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
  iio: accel: hid: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
  iio: accel: bma220: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
  iio: accel: bma180: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
  iio: adis_buffer: do not return ints in irq handlers
  mwifiex: re-fix for unaligned accesses
  tty: nozomi: Fix a resource leak in an error handling function
  RDMA/mlx5: Don't access NULL-cleared mpi pointer
  net: sched: fix warning in tcindex_alloc_perfect_hash
  net: lwtunnel: handle MTU calculation in forwading
  writeback: fix obtain a reference to a freeing memcg css
  Bluetooth: Fix handling of HCI_LE_Advertising_Set_Terminated event
  Bluetooth: mgmt: Fix slab-out-of-bounds in tlv_data_is_valid
  ipv6: fix out-of-bound access in ip6_parse_tlv()
  ibmvnic: free tx_pool if tso_pool alloc fails
  Revert "ibmvnic: remove duplicate napi_schedule call in open function"
  i40e: Fix autoneg disabling for non-10GBaseT links
  i40e: Fix error handling in i40e_vsi_open
  bpf: Do not change gso_size during bpf_skb_change_proto()
  ipv6: exthdrs: do not blindly use init_net
  net: bcmgenet: Fix attaching to PYH failed on RPi 4B
  mac80211: remove iwlwifi specific workaround NDPs of null_response
  ieee802154: hwsim: avoid possible crash in hwsim_del_edge_nl()
  ieee802154: hwsim: Fix memory leak in hwsim_add_one
  net/ipv4: swap flow ports when validating source
  vxlan: add missing rcu_read_lock() in neigh_reduce()
  pkt_sched: sch_qfq: fix qfq_change_class() error path
  net: ethernet: ezchip: fix error handling
  net: ethernet: ezchip: fix UAF in nps_enet_remove
  net: ethernet: aeroflex: fix UAF in greth_of_remove
  samples/bpf: Fix the error return code of xdp_redirect's main()
  RDMA/rxe: Fix qp reference counting for atomic ops
  netfilter: nft_tproxy: restrict support to TCP and UDP transport protocols
  netfilter: nft_osf: check for TCP packet before further processing
  netfilter: nft_exthdr: check for IPv6 packet before further processing
  RDMA/mlx5: Don't add slave port to unaffiliated list
  netlabel: Fix memory leak in netlbl_mgmt_add_common
  ath10k: Fix an error code in ath10k_add_interface()
  brcmsmac: mac80211_if: Fix a resource leak in an error handling path
  brcmfmac: correctly report average RSSI in station info
  brcmfmac: fix setting of station info chains bitmask
  ssb: Fix error return code in ssb_bus_scan()
  wcn36xx: Move hal_buf allocation to devm_kmalloc in probe
  ieee802154: hwsim: Fix possible memory leak in hwsim_subscribe_all_others
  wireless: carl9170: fix LEDS build errors & warnings
  tools/bpftool: Fix error return code in do_batch()
  drm: qxl: ensure surf.data is ininitialized
  RDMA/rxe: Fix failure during driver load
  ehea: fix error return code in ehea_restart_qps()
  drm/rockchip: cdn-dp-core: add missing clk_disable_unprepare() on error in cdn_dp_grf_write()
  net: pch_gbe: Propagate error from devm_gpio_request_one()
  net: mvpp2: Put fwnode in error case during ->probe()
  ocfs2: fix snprintf() checking
  blk-wbt: make sure throttle is enabled properly
  blk-wbt: introduce a new disable state to prevent false positive by rwb_enabled()
  ACPI: sysfs: Fix a buffer overrun problem with description_show()
  crypto: nx - Fix RCU warning in nx842_OF_upd_status
  spi: spi-sun6i: Fix chipselect/clock bug
  btrfs: clear log tree recovering status if starting transaction fails
  hwmon: (max31790) Fix fan speed reporting for fan7..12
  hwmon: (max31722) Remove non-standard ACPI device IDs
  media: s5p-g2d: Fix a memory leak on ctx->fh.m2m_ctx
  mmc: usdhi6rol0: fix error return code in usdhi6_probe()
  media: siano: Fix out-of-bounds warnings in smscore_load_firmware_family2()
  media: gspca/gl860: fix zero-length control requests
  media: tc358743: Fix error return code in tc358743_probe_of()
  media: exynos4-is: Fix a use after free in isp_video_release
  pata_ep93xx: fix deferred probing
  media: rc: i2c: Fix an error message
  crypto: ccp - Fix a resource leak in an error handling path
  evm: fix writing <securityfs>/evm overflow
  pata_octeon_cf: avoid WARN_ON() in ata_host_activate()
  media: I2C: change 'RST' to "RSET" to fix multiple build errors
  pata_rb532_cf: fix deferred probing
  sata_highbank: fix deferred probing
  crypto: ux500 - Fix error return code in hash_hw_final()
  crypto: ixp4xx - dma_unmap the correct address
  media: s5p_cec: decrement usage count if disabled
  ia64: mca_drv: fix incorrect array size calculation
  HID: wacom: Correct base usage for capacitive ExpressKey status bits
  ACPI: tables: Add custom DSDT file as makefile prerequisite
  clocksource: Retry clock read if long delays detected
  platform/x86: toshiba_acpi: Fix missing error code in toshiba_acpi_setup_keyboard()
  ACPI: bus: Call kobject_put() in acpi_init() error path
  ACPICA: Fix memory leak caused by _CID repair function
  fs: dlm: fix memory leak when fenced
  random32: Fix implicit truncation warning in prandom_seed_state()
  fs: dlm: cancel work sync othercon
  block_dump: remove block_dump feature in mark_inode_dirty()
  ACPI: EC: Make more Asus laptops use ECDT _GPE
  lib: vsprintf: Fix handling of number field widths in vsscanf
  hv_utils: Fix passing zero to 'PTR_ERR' warning
  ACPI: processor idle: Fix up C-state latency if not ordered
  EDAC/ti: Add missing MODULE_DEVICE_TABLE
  HID: do not use down_interruptible() when unbinding devices
  regulator: da9052: Ensure enough delay time for .set_voltage_time_sel
  btrfs: disable build on platforms having page size 256K
  btrfs: abort transaction if we fail to update the delayed inode
  btrfs: fix error handling in __btrfs_update_delayed_inode
  media: imx-csi: Skip first few frames from a BT.656 source
  media: siano: fix device register error path
  media: dvb_net: avoid speculation from net slot
  crypto: shash - avoid comparing pointers to exported functions under CFI
  mmc: via-sdmmc: add a check against NULL pointer dereference
  media: dvd_usb: memory leak in cinergyt2_fe_attach
  media: st-hva: Fix potential NULL pointer dereferences
  media: bt8xx: Fix a missing check bug in bt878_probe
  media: v4l2-core: Avoid the dangling pointer in v4l2_fh_release
  media: em28xx: Fix possible memory leak of em28xx struct
  sched/fair: Fix ascii art by relpacing tabs
  crypto: qat - remove unused macro in FW loader
  crypto: qat - check return code of qat_hal_rd_rel_reg()
  media: pvrusb2: fix warning in pvr2_i2c_core_done
  media: cobalt: fix race condition in setting HPD
  media: cpia2: fix memory leak in cpia2_usb_probe
  crypto: nx - add missing MODULE_DEVICE_TABLE
  regulator: uniphier: Add missing MODULE_DEVICE_TABLE
  spi: omap-100k: Fix the length judgment problem
  spi: spi-topcliff-pch: Fix potential double free in pch_spi_process_messages()
  spi: spi-loopback-test: Fix 'tx_buf' might be 'rx_buf'
  spi: Make of_register_spi_device also set the fwnode
  fuse: check connected before queueing on fpq->io
  evm: Refuse EVM_ALLOW_METADATA_WRITES only if an HMAC key is loaded
  evm: Execute evm_inode_init_security() only when an HMAC key is loaded
  powerpc/stacktrace: Fix spurious "stale" traces in raise_backtrace_ipi()
  seq_buf: Make trace_seq_putmem_hex() support data longer than 8
  tracepoint: Add tracepoint_probe_register_may_exist() for BPF tracing
  tracing/histograms: Fix parsing of "sym-offset" modifier
  rsi: fix AP mode with WPA failure due to encrypted EAPOL
  rsi: Assign beacon rate settings to the correct rate_info descriptor field
  ssb: sdio: Don't overwrite const buffer if block_write fails
  ath9k: Fix kernel NULL pointer dereference during ath_reset_internal()
  serial_cs: remove wrong GLOBETROTTER.cis entry
  serial_cs: Add Option International GSM-Ready 56K/ISDN modem
  serial: sh-sci: Stop dmaengine transfer in sci_stop_tx()
  iio: ltr501: ltr501_read_ps(): add missing endianness conversion
  iio: ltr501: ltr559: fix initialization of LTR501_ALS_CONTR
  iio: ltr501: mark register holding upper 8 bits of ALS_DATA{0,1} and PS_DATA as volatile, too
  iio: light: tcs3472: do not free unallocated IRQ
  rtc: stm32: Fix unbalanced clk_disable_unprepare() on probe error path
  s390/cio: dont call css_wait_for_slow_path() inside a lock
  SUNRPC: Should wake up the privileged task firstly.
  SUNRPC: Fix the batch tasks count wraparound.
  can: peak_pciefd: pucan_handle_status(): fix a potential starvation issue in TX path
  can: gw: synchronize rcu operations before removing gw job entry
  can: bcm: delay release of struct bcm_op after synchronize_rcu()
  ext4: use ext4_grp_locked_error in mb_find_extent
  ext4: fix avefreec in find_group_orlov
  ext4: remove check for zero nr_to_scan in ext4_es_scan()
  ext4: correct the cache_nr in tracepoint ext4_es_shrink_exit
  ext4: return error code when ext4_fill_flex_info() fails
  ext4: fix kernel infoleak via ext4_extent_header
  ext4: cleanup in-core orphan list if ext4_truncate() failed to get a transaction handle
  btrfs: clear defrag status of a root if starting transaction fails
  btrfs: send: fix invalid path for unlink operations after parent orphanization
  ARM: dts: at91: sama5d4: fix pinctrl muxing
  arm_pmu: Fix write counter incorrect in ARMv7 big-endian mode
  Input: joydev - prevent use of not validated data in JSIOCSBTNMAP ioctl
  iov_iter_fault_in_readable() should do nothing in xarray case
  ntfs: fix validity check for file name attribute
  xhci: solve a double free problem while doing s4
  usb: typec: Add the missed altmode_id_remove() in typec_register_altmode()
  usb: dwc3: Fix debugfs creation flow
  USB: cdc-acm: blacklist Heimann USB Appset device
  usb: gadget: eem: fix echo command packet response issue
  net: can: ems_usb: fix use-after-free in ems_usb_disconnect()
  Input: usbtouchscreen - fix control-request directions
  media: dvb-usb: fix wrong definition
  ALSA: usb-audio: Fix OOB access at proc output
  ALSA: usb-audio: fix rate on Ozone Z90 USB headset
  scsi: core: Retry I/O for Notify (Enable Spinup) Required error
  Revert "clocksource/drivers/timer-ti-dm: Handle dra7 timer wrap errata i940"
  Linux 4.19.197
  clocksource/drivers/timer-ti-dm: Handle dra7 timer wrap errata i940
  clocksource/drivers/timer-ti-dm: Prepare to handle dra7 timer wrap issue
  clocksource/drivers/timer-ti-dm: Add clockevent and clocksource support
  ARM: OMAP: replace setup_irq() by request_irq()
  KVM: SVM: Call SEV Guest Decommission if ASID binding fails
  xen/events: reset active flag for lateeoi events later
  kthread: prevent deadlock when kthread_mod_delayed_work() races with kthread_cancel_delayed_work_sync()
  kthread_worker: split code for canceling the delayed work timer
  ARM: dts: imx6qdl-sabresd: Remove incorrect power supply assignment
  KVM: SVM: Periodically schedule when unregistering regions on destroy
  ext4: eliminate bogus error in ext4_data_block_valid_rcu()
  drm/nouveau: fix dma_address check for CPU/GPU sync
  scsi: sr: Return appropriate error code when disk is ejected
  mm, futex: fix shared futex pgoff on shmem huge page
  mm/thp: another PVMW_SYNC fix in page_vma_mapped_walk()
  mm/thp: fix page_vma_mapped_walk() if THP mapped by ptes
  mm: page_vma_mapped_walk(): get vma_address_end() earlier
  mm: page_vma_mapped_walk(): use goto instead of while (1)
  mm: page_vma_mapped_walk(): add a level of indentation
  mm: page_vma_mapped_walk(): crossing page table boundary
  mm: page_vma_mapped_walk(): prettify PVMW_MIGRATION block
  mm: page_vma_mapped_walk(): use pmde for *pvmw->pmd
  mm: page_vma_mapped_walk(): settle PageHuge on entry
  mm: page_vma_mapped_walk(): use page for pvmw->page
  mm: thp: replace DEBUG_VM BUG with VM_WARN when unmap fails for split
  mm/thp: unmap_mapping_page() to fix THP truncate_cleanup_page()
  mm/thp: fix page_address_in_vma() on file THP tails
  mm/thp: fix vma_address() if virtual address below file offset
  mm/thp: try_to_unmap() use TTU_SYNC for safe splitting
  mm/thp: make is_huge_zero_pmd() safe and quicker
  mm/thp: fix __split_huge_pmd_locked() on shmem migration entry
  mm/rmap: use page_not_mapped in try_to_unmap()
  mm/rmap: remove unneeded semicolon in page_not_mapped()
  mm: add VM_WARN_ON_ONCE_PAGE() macro

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

Conflicts:
	drivers/staging/android/ion/ion.c
	drivers/usb/dwc3/core.c
	drivers/usb/gadget/function/f_fs.c
	kernel/cpu.c
	security/selinux/avc.c
This commit is contained in:
UtsavBalar1231 2022-02-26 15:38:42 +05:30
commit e6c876d8b8
602 changed files with 3902 additions and 2102 deletions

View File

@ -42,8 +42,30 @@ Description:
modification of EVM-protected metadata and
disable all further modification of policy
Note that once a key has been loaded, it will no longer be
possible to enable metadata modification.
Echoing a value is additive, the new value is added to the
existing initialization flags.
For example, after::
echo 2 ><securityfs>/evm
another echo can be performed::
echo 1 ><securityfs>/evm
and the resulting value will be 3.
Note that once an HMAC key has been loaded, it will no longer
be possible to enable metadata modification. Signaling that an
HMAC key has been loaded will clear the corresponding flag.
For example, if the current value is 6 (2 and 4 set)::
echo 1 ><securityfs>/evm
will set the new value to 3 (4 cleared).
Loading an HMAC key is the only way to disable metadata
modification.
Until key loading has been signaled EVM can not create
or validate the 'security.evm' xattr, but returns

View File

@ -571,6 +571,12 @@
loops can be debugged more effectively on production
systems.
clocksource.max_cswd_read_retries= [KNL]
Number of clocksource_watchdog() retries due to
external delays before the clock will be marked
unstable. Defaults to three retries, that is,
four attempts to read the clock under test.
clearcpuid=BITNUM[,BITNUM...] [X86]
Disable CPUID feature X for the kernel. See
arch/x86/include/asm/cpufeatures.h for the valid bit

View File

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

View File

@ -552,7 +552,7 @@ status = "okay";
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins>;
ti,pindir-d0-out-d1-in = <1>;
ti,pindir-d0-out-d1-in;
/* WLS1271 WiFi */
wlcore: wlcore@1 {
compatible = "ti,wl1271";

View File

@ -839,7 +839,7 @@
pinctrl-names = "default", "sleep";
pinctrl-0 = <&spi0_pins_default>;
pinctrl-1 = <&spi0_pins_sleep>;
ti,pindir-d0-out-d1-in = <1>;
ti,pindir-d0-out-d1-in;
};
&spi1 {
@ -847,7 +847,7 @@
pinctrl-names = "default", "sleep";
pinctrl-0 = <&spi1_pins_default>;
pinctrl-1 = <&spi1_pins_sleep>;
ti,pindir-d0-out-d1-in = <1>;
ti,pindir-d0-out-d1-in;
};
&usb2_phy1 {

View File

@ -455,7 +455,7 @@
status = "disabled";
};
nand: nand@18046000 {
nand_controller: nand-controller@18046000 {
compatible = "brcm,nand-iproc", "brcm,brcmnand-v6.1";
reg = <0x18046000 0x600>, <0xf8105408 0x600>,
<0x18046f00 0x20>;

View File

@ -179,7 +179,7 @@
status = "disabled";
};
nand: nand@26000 {
nand_controller: nand-controller@26000 {
compatible = "brcm,nand-iproc", "brcm,brcmnand-v6.1";
reg = <0x26000 0x600>,
<0x11b408 0x600>,

View File

@ -259,7 +259,7 @@
dma-coherent;
};
nand: nand@26000 {
nand_controller: nand-controller@26000 {
compatible = "brcm,nand-iproc", "brcm,brcmnand-v6.1";
reg = <0x026000 0x600>,
<0x11b408 0x600>,

View File

@ -451,27 +451,27 @@
<0x1811b408 0x004>,
<0x180293a0 0x01c>;
reg-names = "mspi", "bspi", "intr_regs", "intr_status_reg";
interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>,
interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "spi_lr_fullness_reached",
<GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "mspi_done",
"mspi_halted",
"spi_lr_fullness_reached",
"spi_lr_session_aborted",
"spi_lr_impatient",
"spi_lr_session_done",
"spi_lr_overhead",
"mspi_done",
"mspi_halted";
"spi_lr_overread";
clocks = <&iprocmed>;
clock-names = "iprocmed";
num-cs = <2>;
#address-cells = <1>;
#size-cells = <0>;
spi_nor: spi-nor@0 {
spi_nor: flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <20000000>;

View File

@ -175,7 +175,7 @@
status = "disabled";
};
nand: nand@2000 {
nand_controller: nand-controller@2000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "brcm,nand-bcm63138", "brcm,brcmnand-v7.0", "brcm,brcmnand";

View File

@ -14,10 +14,10 @@
};
};
&nand {
&nand_controller {
status = "okay";
nandcs@1 {
nand@1 {
compatible = "brcm,nandcs";
reg = <1>;
nand-ecc-step-size = <512>;

View File

@ -150,7 +150,7 @@
reg-names = "aon-ctrl", "aon-sram";
};
nand: nand@3e2800 {
nand_controller: nand-controller@3e2800 {
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;

View File

@ -84,8 +84,8 @@
status = "okay";
};
&nand {
nandcs@1 {
&nand_controller {
nand@1 {
compatible = "brcm,nandcs";
reg = <0>;
nand-on-flash-bbt;

View File

@ -60,8 +60,8 @@
status = "okay";
};
&nand {
nandcs@1 {
&nand_controller {
nand@1 {
compatible = "brcm,nandcs";
reg = <0>;
nand-on-flash-bbt;

View File

@ -68,8 +68,8 @@
status = "okay";
};
&nand {
nandcs@1 {
&nand_controller {
nand@1 {
compatible = "brcm,nandcs";
reg = <0>;
nand-on-flash-bbt;

View File

@ -74,8 +74,8 @@
status = "okay";
};
&nand {
nandcs@0 {
&nand_controller {
nand@0 {
compatible = "brcm,nandcs";
reg = <0>;
nand-on-flash-bbt;

View File

@ -74,8 +74,8 @@
status = "okay";
};
&nand {
nandcs@0 {
&nand_controller {
nand@0 {
compatible = "brcm,nandcs";
reg = <0>;
nand-on-flash-bbt;

View File

@ -90,8 +90,8 @@
};
};
&nand {
nandcs@0 {
&nand_controller {
nand@0 {
compatible = "brcm,nandcs";
reg = <0>;
nand-on-flash-bbt;

View File

@ -78,8 +78,8 @@
status = "okay";
};
&nand {
nandcs@0 {
&nand_controller {
nand@0 {
compatible = "brcm,nandcs";
reg = <0>;
nand-on-flash-bbt;

View File

@ -78,8 +78,8 @@
status = "okay";
};
&nand {
nandcs@0 {
&nand_controller {
nand@0 {
compatible = "brcm,nandcs";
reg = <0>;
nand-on-flash-bbt;

View File

@ -76,8 +76,8 @@
status = "okay";
};
&nand {
nandcs@0 {
&nand_controller {
nand@0 {
compatible = "brcm,nandcs";
reg = <0>;
nand-on-flash-bbt;

View File

@ -69,8 +69,8 @@
status = "okay";
};
&nand {
nandcs@0 {
&nand_controller {
nand@0 {
compatible = "brcm,nandcs";
reg = <0>;
nand-on-flash-bbt;

View File

@ -30,10 +30,10 @@
status = "okay";
};
&nand {
&nand_controller {
status = "okay";
nandcs@0 {
nand@0 {
compatible = "brcm,nandcs";
reg = <0>;
nand-ecc-strength = <4>;

View File

@ -78,8 +78,8 @@
status = "okay";
};
&nand {
nandcs@0 {
&nand_controller {
nand@0 {
compatible = "brcm,nandcs";
reg = <0>;
nand-on-flash-bbt;

View File

@ -22,7 +22,7 @@
label = "blue:heartbeat";
pwms = <&pwm 2 2000000 0>;
pwm-names = "pwm2";
max_brightness = <255>;
max-brightness = <255>;
linux,default-trigger = "heartbeat";
};
};

View File

@ -24,7 +24,7 @@
label = "blue:heartbeat";
pwms = <&pwm 2 2000000 0>;
pwm-names = "pwm2";
max_brightness = <255>;
max-brightness = <255>;
linux,default-trigger = "heartbeat";
};
};

View File

@ -22,7 +22,7 @@
* Green LED is much brighter than the others
* so limit its max brightness
*/
max_brightness = <127>;
max-brightness = <127>;
linux,default-trigger = "mmc0";
};
@ -30,7 +30,7 @@
label = "blue:heartbeat";
pwms = <&pwm 2 2000000 0>;
pwm-names = "pwm2";
max_brightness = <255>;
max-brightness = <255>;
linux,default-trigger = "heartbeat";
};
};

View File

@ -140,7 +140,7 @@
};
};
mdio0: ethernet-phy {
mdio0: mdio {
compatible = "virtual,mdio-gpio";
/* Uses MDC and MDIO */
gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */

View File

@ -62,7 +62,7 @@
};
};
mdio0: ethernet-phy {
mdio0: mdio {
compatible = "virtual,mdio-gpio";
gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
<&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */

View File

@ -56,7 +56,7 @@
};
};
mdio0: ethernet-phy {
mdio0: mdio {
compatible = "virtual,mdio-gpio";
gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
<&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */

View File

@ -68,7 +68,7 @@
};
};
mdio0: ethernet-phy {
mdio0: mdio {
compatible = "virtual,mdio-gpio";
gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
<&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */

View File

@ -67,7 +67,7 @@
};
};
mdio0: ethernet-phy {
mdio0: mdio {
compatible = "virtual,mdio-gpio";
gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
<&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */

View File

@ -286,6 +286,7 @@
clock-names = "PCLK", "PCICLK";
pinctrl-names = "default";
pinctrl-0 = <&pci_default_pins>;
device_type = "pci";
#address-cells = <3>;
#size-cells = <2>;
#interrupt-cells = <1>;

View File

@ -97,30 +97,40 @@
reg = <0>;
max-speed = <100>;
reset-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
reset-delay-us = <1000>;
reset-post-delay-us = <1000>;
reset-assert-us = <1000>;
reset-deassert-us = <1000>;
smsc,disable-energy-detect; /* Make plugin detection reliable */
};
};
};
&i2c1 {
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c1>;
pinctrl-1 = <&pinctrl_i2c1_gpio>;
scl-gpios = <&gpio3 21 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
sda-gpios = <&gpio3 28 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
status = "okay";
};
&i2c2 {
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c2>;
pinctrl-1 = <&pinctrl_i2c2_gpio>;
scl-gpios = <&gpio4 12 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
sda-gpios = <&gpio4 13 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
status = "okay";
};
&i2c3 {
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c3>;
pinctrl-1 = <&pinctrl_i2c3_gpio>;
scl-gpios = <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
sda-gpios = <&gpio1 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
status = "okay";
ltc3676: pmic@3c {
@ -286,6 +296,13 @@
>;
};
pinctrl_i2c1_gpio: i2c1-gpio-grp {
fsl,pins = <
MX6QDL_PAD_EIM_D21__GPIO3_IO21 0x4001b8b1
MX6QDL_PAD_EIM_D28__GPIO3_IO28 0x4001b8b1
>;
};
pinctrl_i2c2: i2c2-grp {
fsl,pins = <
MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1
@ -293,6 +310,13 @@
>;
};
pinctrl_i2c2_gpio: i2c2-gpio-grp {
fsl,pins = <
MX6QDL_PAD_KEY_COL3__GPIO4_IO12 0x4001b8b1
MX6QDL_PAD_KEY_ROW3__GPIO4_IO13 0x4001b8b1
>;
};
pinctrl_i2c3: i2c3-grp {
fsl,pins = <
MX6QDL_PAD_GPIO_3__I2C3_SCL 0x4001b8b1
@ -300,6 +324,13 @@
>;
};
pinctrl_i2c3_gpio: i2c3-gpio-grp {
fsl,pins = <
MX6QDL_PAD_GPIO_3__GPIO1_IO03 0x4001b8b1
MX6QDL_PAD_GPIO_6__GPIO1_IO06 0x4001b8b1
>;
};
pinctrl_pmic_hw300: pmic-hw300-grp {
fsl,pins = <
MX6QDL_PAD_EIM_A25__GPIO5_IO02 0x1B0B0

View File

@ -306,8 +306,8 @@
fsl,pins = <
MX6QDL_PAD_EIM_D24__UART3_TX_DATA 0x1b0b1
MX6QDL_PAD_EIM_D25__UART3_RX_DATA 0x1b0b1
MX6QDL_PAD_EIM_D30__UART3_RTS_B 0x1b0b1
MX6QDL_PAD_EIM_D31__UART3_CTS_B 0x1b0b1
MX6QDL_PAD_EIM_D31__UART3_RTS_B 0x1b0b1
MX6QDL_PAD_EIM_D30__UART3_CTS_B 0x1b0b1
>;
};
@ -394,6 +394,7 @@
&uart3 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart3>;
uart-has-rtscts;
status = "disabled";
};

View File

@ -675,10 +675,6 @@
vin-supply = <&vgen5_reg>;
};
&reg_vdd3p0 {
vin-supply = <&sw2_reg>;
};
&reg_vdd2p5 {
vin-supply = <&vgen5_reg>;
};

View File

@ -146,7 +146,7 @@
status = "okay";
clocks = <&mstp1_clks R8A7779_CLK_DU>, <&x3_clk>;
clock-names = "du", "dclkin.0";
clock-names = "du.0", "dclkin.0";
ports {
port@0 {

View File

@ -437,6 +437,7 @@
reg = <0xfff80000 0x40000>;
interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp1_clks R8A7779_CLK_DU>;
clock-names = "du.0";
power-domains = <&sysc R8A7779_PD_ALWAYS_ON>;
status = "disabled";

View File

@ -391,7 +391,7 @@
};
};
sleep {
suspend {
global_pwroff: global-pwroff {
rockchip,pins = <2 7 RK_FUNC_1 &pcfg_pull_none>;
};

View File

@ -73,16 +73,16 @@
compatible = "rockchip,rk3188-timer", "rockchip,rk3288-timer";
reg = <0x2000e000 0x20>;
interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru SCLK_TIMER3>, <&cru PCLK_TIMER3>;
clock-names = "timer", "pclk";
clocks = <&cru PCLK_TIMER3>, <&cru SCLK_TIMER3>;
clock-names = "pclk", "timer";
};
timer6: timer@200380a0 {
compatible = "rockchip,rk3188-timer", "rockchip,rk3288-timer";
reg = <0x200380a0 0x20>;
interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru SCLK_TIMER6>, <&cru PCLK_TIMER0>;
clock-names = "timer", "pclk";
clocks = <&cru PCLK_TIMER0>, <&cru SCLK_TIMER6>;
clock-names = "pclk", "timer";
};
i2s0: i2s@1011a000 {

View File

@ -548,10 +548,9 @@
compatible = "rockchip,iommu";
reg = <0x20020800 0x100>;
interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "vpu_mmu";
clocks = <&cru ACLK_VPU>, <&cru HCLK_VPU>;
clock-names = "aclk", "iface";
iommu-cells = <0>;
#iommu-cells = <0>;
status = "disabled";
};
@ -559,10 +558,9 @@
compatible = "rockchip,iommu";
reg = <0x20030480 0x40>, <0x200304c0 0x40>;
interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "vdec_mmu";
clocks = <&cru ACLK_RKVDEC>, <&cru HCLK_RKVDEC>;
clock-names = "aclk", "iface";
iommu-cells = <0>;
#iommu-cells = <0>;
status = "disabled";
};
@ -570,7 +568,6 @@
compatible = "rockchip,iommu";
reg = <0x20053f00 0x100>;
interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "vop_mmu";
clocks = <&cru ACLK_VOP>, <&cru HCLK_VOP>;
clock-names = "aclk", "iface";
iommu-cells = <0>;
@ -581,10 +578,9 @@
compatible = "rockchip,iommu";
reg = <0x20070800 0x100>;
interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "iep_mmu";
clocks = <&cru ACLK_IEP>, <&cru HCLK_IEP>;
clock-names = "aclk", "iface";
iommu-cells = <0>;
#iommu-cells = <0>;
status = "disabled";
};

View File

@ -218,7 +218,7 @@
flash0-supply = <&vcc_flash>;
flash1-supply = <&vccio_pmu>;
gpio30-supply = <&vccio_pmu>;
gpio1830 = <&vcc_io>;
gpio1830-supply = <&vcc_io>;
lcdc-supply = <&vcc_io>;
sdcard-supply = <&vccio_sd>;
wifi-supply = <&vcc_18>;

View File

@ -358,10 +358,10 @@
audio-supply = <&vcc_18>;
bb-supply = <&vcc_io>;
dvp-supply = <&vcc_io>;
flash0-suuply = <&vcc_18>;
flash0-supply = <&vcc_18>;
flash1-supply = <&vcc_lan>;
gpio30-supply = <&vcc_io>;
gpio1830 = <&vcc_io>;
gpio1830-supply = <&vcc_io>;
lcdc-supply = <&vcc_io>;
sdcard-supply = <&vccio_sd>;
wifi-supply = <&vcc_18>;

View File

@ -234,8 +234,8 @@
compatible = "rockchip,rk3288-timer";
reg = <0x0 0xff810000 0x0 0x20>;
interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&xin24m>, <&cru PCLK_TIMER>;
clock-names = "timer", "pclk";
clocks = <&cru PCLK_TIMER>, <&xin24m>;
clock-names = "pclk", "timer";
};
display-subsystem {
@ -759,7 +759,7 @@
* *_HDMI HDMI
* *_MIPI_* MIPI
*/
pd_vio@RK3288_PD_VIO {
power-domain@RK3288_PD_VIO {
reg = <RK3288_PD_VIO>;
clocks = <&cru ACLK_IEP>,
<&cru ACLK_ISP>,
@ -801,7 +801,7 @@
* Note: The following 3 are HEVC(H.265) clocks,
* and on the ACLK_HEVC_NIU (NOC).
*/
pd_hevc@RK3288_PD_HEVC {
power-domain@RK3288_PD_HEVC {
reg = <RK3288_PD_HEVC>;
clocks = <&cru ACLK_HEVC>,
<&cru SCLK_HEVC_CABAC>,
@ -815,7 +815,7 @@
* (video endecoder & decoder) clocks that on the
* ACLK_VCODEC_NIU and HCLK_VCODEC_NIU (NOC).
*/
pd_video@RK3288_PD_VIDEO {
power-domain@RK3288_PD_VIDEO {
reg = <RK3288_PD_VIDEO>;
clocks = <&cru ACLK_VCODEC>,
<&cru HCLK_VCODEC>;
@ -826,7 +826,7 @@
* Note: ACLK_GPU is the GPU clock,
* and on the ACLK_GPU_NIU (NOC).
*/
pd_gpu@RK3288_PD_GPU {
power-domain@RK3288_PD_GPU {
reg = <RK3288_PD_GPU>;
clocks = <&cru ACLK_GPU>;
pm_qos = <&qos_gpu_r>,
@ -1541,7 +1541,7 @@
drive-strength = <12>;
};
sleep {
suspend {
global_pwroff: global-pwroff {
rockchip,pins = <0 0 RK_FUNC_1 &pcfg_pull_none>;
};

View File

@ -1388,7 +1388,7 @@
0xffffffff 0x3ffcfe7c 0x1c010101 /* pioA */
0x7fffffff 0xfffccc3a 0x3f00cc3a /* pioB */
0xffffffff 0x3ff83fff 0xff00ffff /* pioC */
0x0003ff00 0x8002a800 0x00000000 /* pioD */
0xb003ff00 0x8002a800 0x00000000 /* pioD */
0xffffffff 0x7fffffff 0x76fff1bf /* pioE */
>;

View File

@ -111,17 +111,15 @@
};
};
gpio_keys {
gpio-keys {
compatible = "gpio-keys";
#address-cells = <1>;
#size-cells = <0>;
autorepeat;
button@0 {
button-0 {
label = "Wake up";
linux,code = <KEY_WAKEUP>;
gpios = <&gpioa 0 0>;
};
button@1 {
button-1 {
label = "Tamper";
linux,code = <KEY_RESTART>;
gpios = <&gpioc 13 0>;

View File

@ -73,12 +73,10 @@
};
};
gpio_keys {
gpio-keys {
compatible = "gpio-keys";
#address-cells = <1>;
#size-cells = <0>;
autorepeat;
button@0 {
button-0 {
label = "Wake up";
linux,code = <KEY_WAKEUP>;
gpios = <&gpioc 13 0>;

View File

@ -78,12 +78,10 @@
};
};
gpio_keys {
gpio-keys {
compatible = "gpio-keys";
#address-cells = <1>;
#size-cells = <0>;
autorepeat;
button@0 {
button-0 {
label = "User";
linux,code = <KEY_HOME>;
gpios = <&gpioa 0 0>;

View File

@ -263,8 +263,6 @@
};
timers13: timers@40001c00 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "st,stm32-timers";
reg = <0x40001C00 0x400>;
clocks = <&rcc 0 STM32F4_APB1_CLOCK(TIM13)>;
@ -278,8 +276,6 @@
};
timers14: timers@40002000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "st,stm32-timers";
reg = <0x40002000 0x400>;
clocks = <&rcc 0 STM32F4_APB1_CLOCK(TIM14)>;
@ -558,8 +554,6 @@
};
timers10: timers@40014400 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "st,stm32-timers";
reg = <0x40014400 0x400>;
clocks = <&rcc 0 STM32F4_APB2_CLOCK(TIM10)>;
@ -573,8 +567,6 @@
};
timers11: timers@40014800 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "st,stm32-timers";
reg = <0x40014800 0x400>;
clocks = <&rcc 0 STM32F4_APB2_CLOCK(TIM11)>;
@ -609,7 +601,7 @@
status = "disabled";
};
rcc: rcc@40023810 {
rcc: rcc@40023800 {
#reset-cells = <1>;
#clock-cells = <2>;
compatible = "st,stm32f42xx-rcc", "st,stm32-rcc";

View File

@ -103,12 +103,10 @@
};
};
gpio_keys {
gpio-keys {
compatible = "gpio-keys";
#address-cells = <1>;
#size-cells = <0>;
autorepeat;
button@0 {
button-0 {
label = "User";
linux,code = <KEY_WAKEUP>;
gpios = <&gpioa 0 GPIO_ACTIVE_HIGH>;

View File

@ -258,8 +258,6 @@
};
timers13: timers@40001c00 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "st,stm32-timers";
reg = <0x40001C00 0x400>;
clocks = <&rcc 0 STM32F7_APB1_CLOCK(TIM13)>;
@ -273,8 +271,6 @@
};
timers14: timers@40002000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "st,stm32-timers";
reg = <0x40002000 0x400>;
clocks = <&rcc 0 STM32F7_APB1_CLOCK(TIM14)>;
@ -357,9 +353,9 @@
status = "disabled";
};
i2c3: i2c@40005C00 {
i2c3: i2c@40005c00 {
compatible = "st,stm32f7-i2c";
reg = <0x40005C00 0x400>;
reg = <0x40005c00 0x400>;
interrupts = <72>,
<73>;
resets = <&rcc STM32F7_APB1_RESET(I2C3)>;
@ -521,8 +517,6 @@
};
timers10: timers@40014400 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "st,stm32-timers";
reg = <0x40014400 0x400>;
clocks = <&rcc 0 STM32F7_APB2_CLOCK(TIM10)>;
@ -536,8 +530,6 @@
};
timers11: timers@40014800 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "st,stm32-timers";
reg = <0x40014800 0x400>;
clocks = <&rcc 0 STM32F7_APB2_CLOCK(TIM11)>;

View File

@ -74,12 +74,10 @@
};
};
gpio_keys {
gpio-keys {
compatible = "gpio-keys";
#address-cells = <1>;
#size-cells = <0>;
autorepeat;
button@0 {
button-0 {
label = "User";
linux,code = <KEY_HOME>;
gpios = <&gpioa 0 GPIO_ACTIVE_HIGH>;

View File

@ -422,8 +422,6 @@
};
lptimer4: timer@58002c00 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "st,stm32-lptimer";
reg = <0x58002c00 0x400>;
clocks = <&rcc LPTIM4_CK>;
@ -438,8 +436,6 @@
};
lptimer5: timer@58003000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "st,stm32-lptimer";
reg = <0x58003000 0x400>;
clocks = <&rcc LPTIM5_CK>;

View File

@ -964,12 +964,6 @@
status = "disabled";
};
stmmac_axi_config_0: stmmac-axi-config {
snps,wr_osr_lmt = <0x7>;
snps,rd_osr_lmt = <0x7>;
snps,blen = <0 0 0 0 16 8 4>;
};
ethernet0: ethernet@5800a000 {
compatible = "st,stm32mp1-dwmac", "snps,dwmac-4.20a";
reg = <0x5800a000 0x2000>;
@ -992,6 +986,12 @@
snps,axi-config = <&stmmac_axi_config_0>;
snps,tso;
status = "disabled";
stmmac_axi_config_0: stmmac-axi-config {
snps,wr_osr_lmt = <0x7>;
snps,rd_osr_lmt = <0x7>;
snps,blen = <0 0 0 0 16 8 4>;
};
};
usbh_ohci: usbh-ohci@5800c000 {

View File

@ -192,16 +192,15 @@
#size-cells = <1>;
ranges;
vic: intc@10140000 {
vic: interrupt-controller@10140000 {
compatible = "arm,versatile-vic";
interrupt-controller;
#interrupt-cells = <1>;
reg = <0x10140000 0x1000>;
clear-mask = <0xffffffff>;
valid-mask = <0xffffffff>;
};
sic: intc@10003000 {
sic: interrupt-controller@10003000 {
compatible = "arm,versatile-sic";
interrupt-controller;
#interrupt-cells = <1>;

View File

@ -7,7 +7,7 @@
amba {
/* The Versatile PB is using more SIC IRQ lines than the AB */
sic: intc@10003000 {
sic: interrupt-controller@10003000 {
clear-mask = <0xffffffff>;
/*
* Valid interrupt lines mask according to

View File

@ -773,10 +773,10 @@ static inline void armv7pmu_write_counter(struct perf_event *event, u64 value)
pr_err("CPU%u writing wrong counter %d\n",
smp_processor_id(), idx);
} else if (idx == ARMV7_IDX_CYCLE_COUNTER) {
asm volatile("mcr p15, 0, %0, c9, c13, 0" : : "r" (value));
asm volatile("mcr p15, 0, %0, c9, c13, 0" : : "r" ((u32)value));
} else {
armv7_pmnc_select_counter(idx);
asm volatile("mcr p15, 0, %0, c9, c13, 2" : : "r" (value));
asm volatile("mcr p15, 0, %0, c9, c13, 2" : : "r" ((u32)value));
}
}

View File

@ -33,11 +33,11 @@
* ^
* ^
* imx53_suspend code
* PM_INFO structure(imx53_suspend_info)
* PM_INFO structure(imx5_cpu_suspend_info)
* ======================== low address =======================
*/
/* Offsets of members of struct imx53_suspend_info */
/* Offsets of members of struct imx5_cpu_suspend_info */
#define SUSPEND_INFO_MX53_M4IF_V_OFFSET 0x0
#define SUSPEND_INFO_MX53_IOMUXC_V_OFFSET 0x4
#define SUSPEND_INFO_MX53_IO_COUNT_OFFSET 0x8

View File

@ -610,11 +610,6 @@ static irqreturn_t omap_wakeup_interrupt(int irq, void *dev)
return IRQ_HANDLED;
}
static struct irqaction omap_wakeup_irq = {
.name = "peripheral wakeup",
.handler = omap_wakeup_interrupt
};
static const struct platform_suspend_ops omap_pm_ops = {
@ -627,6 +622,7 @@ static const struct platform_suspend_ops omap_pm_ops = {
static int __init omap_pm_init(void)
{
int error = 0;
int irq;
if (!cpu_class_is_omap1())
return -ENODEV;
@ -670,9 +666,12 @@ static int __init omap_pm_init(void)
arm_pm_idle = omap1_pm_idle;
if (cpu_is_omap7xx())
setup_irq(INT_7XX_WAKE_UP_REQ, &omap_wakeup_irq);
irq = INT_7XX_WAKE_UP_REQ;
else if (cpu_is_omap16xx())
setup_irq(INT_1610_WAKE_UP_REQ, &omap_wakeup_irq);
irq = INT_1610_WAKE_UP_REQ;
if (request_irq(irq, omap_wakeup_interrupt, 0, "peripheral wakeup",
NULL))
pr_err("Failed to request irq %d (peripheral wakeup)\n", irq);
/* Program new power ramp-up time
* (0 for most boards since we don't lower voltage when in deep sleep)

View File

@ -155,15 +155,11 @@ static irqreturn_t omap_mpu_timer1_interrupt(int irq, void *dev_id)
return IRQ_HANDLED;
}
static struct irqaction omap_mpu_timer1_irq = {
.name = "mpu_timer1",
.flags = IRQF_TIMER | IRQF_IRQPOLL,
.handler = omap_mpu_timer1_interrupt,
};
static __init void omap_init_mpu_timer(unsigned long rate)
{
setup_irq(INT_TIMER1, &omap_mpu_timer1_irq);
if (request_irq(INT_TIMER1, omap_mpu_timer1_interrupt,
IRQF_TIMER | IRQF_IRQPOLL, "mpu_timer1", NULL))
pr_err("Failed to request irq %d (mpu_timer1)\n", INT_TIMER1);
omap_mpu_timer_start(0, (rate / HZ) - 1, 1);
clockevent_mpu_timer1.cpumask = cpumask_of(0);

View File

@ -148,15 +148,11 @@ static irqreturn_t omap_32k_timer_interrupt(int irq, void *dev_id)
return IRQ_HANDLED;
}
static struct irqaction omap_32k_timer_irq = {
.name = "32KHz timer",
.flags = IRQF_TIMER | IRQF_IRQPOLL,
.handler = omap_32k_timer_interrupt,
};
static __init void omap_init_32k_timer(void)
{
setup_irq(INT_OS_TIMER, &omap_32k_timer_irq);
if (request_irq(INT_OS_TIMER, omap_32k_timer_interrupt,
IRQF_TIMER | IRQF_IRQPOLL, "32KHz timer", NULL))
pr_err("Failed to request irq %d(32KHz timer)\n", INT_OS_TIMER);
clockevent_32k_timer.cpumask = cpumask_of(0);
clockevents_config_and_register(&clockevent_32k_timer,

View File

@ -64,15 +64,28 @@
/* Clockevent code */
static struct omap_dm_timer clkev;
static struct clock_event_device clockevent_gpt;
/* Clockevent hwmod for am335x and am437x suspend */
static struct omap_hwmod *clockevent_gpt_hwmod;
/* Clockesource hwmod for am437x suspend */
static struct omap_hwmod *clocksource_gpt_hwmod;
struct dmtimer_clockevent {
struct clock_event_device dev;
struct omap_dm_timer timer;
};
static struct dmtimer_clockevent clockevent;
static struct omap_dm_timer *to_dmtimer(struct clock_event_device *clockevent)
{
struct dmtimer_clockevent *clkevt =
container_of(clockevent, struct dmtimer_clockevent, dev);
struct omap_dm_timer *timer = &clkevt->timer;
return timer;
}
#ifdef CONFIG_SOC_HAS_REALTIME_COUNTER
static unsigned long arch_timer_freq;
@ -84,24 +97,21 @@ void set_cntfreq(void)
static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id)
{
struct clock_event_device *evt = &clockevent_gpt;
__omap_dm_timer_write_status(&clkev, OMAP_TIMER_INT_OVERFLOW);
struct dmtimer_clockevent *clkevt = dev_id;
struct clock_event_device *evt = &clkevt->dev;
struct omap_dm_timer *timer = &clkevt->timer;
__omap_dm_timer_write_status(timer, OMAP_TIMER_INT_OVERFLOW);
evt->event_handler(evt);
return IRQ_HANDLED;
}
static struct irqaction omap2_gp_timer_irq = {
.name = "gp_timer",
.flags = IRQF_TIMER | IRQF_IRQPOLL,
.handler = omap2_gp_timer_interrupt,
};
static int omap2_gp_timer_set_next_event(unsigned long cycles,
struct clock_event_device *evt)
{
__omap_dm_timer_load_start(&clkev, OMAP_TIMER_CTRL_ST,
struct omap_dm_timer *timer = to_dmtimer(evt);
__omap_dm_timer_load_start(timer, OMAP_TIMER_CTRL_ST,
0xffffffff - cycles, OMAP_TIMER_POSTED);
return 0;
@ -109,22 +119,26 @@ static int omap2_gp_timer_set_next_event(unsigned long cycles,
static int omap2_gp_timer_shutdown(struct clock_event_device *evt)
{
__omap_dm_timer_stop(&clkev, OMAP_TIMER_POSTED, clkev.rate);
struct omap_dm_timer *timer = to_dmtimer(evt);
__omap_dm_timer_stop(timer, OMAP_TIMER_POSTED, timer->rate);
return 0;
}
static int omap2_gp_timer_set_periodic(struct clock_event_device *evt)
{
struct omap_dm_timer *timer = to_dmtimer(evt);
u32 period;
__omap_dm_timer_stop(&clkev, OMAP_TIMER_POSTED, clkev.rate);
__omap_dm_timer_stop(timer, OMAP_TIMER_POSTED, timer->rate);
period = clkev.rate / HZ;
period = timer->rate / HZ;
period -= 1;
/* Looks like we need to first set the load value separately */
__omap_dm_timer_write(&clkev, OMAP_TIMER_LOAD_REG, 0xffffffff - period,
__omap_dm_timer_write(timer, OMAP_TIMER_LOAD_REG, 0xffffffff - period,
OMAP_TIMER_POSTED);
__omap_dm_timer_load_start(&clkev,
__omap_dm_timer_load_start(timer,
OMAP_TIMER_CTRL_AR | OMAP_TIMER_CTRL_ST,
0xffffffff - period, OMAP_TIMER_POSTED);
return 0;
@ -138,26 +152,17 @@ static void omap_clkevt_idle(struct clock_event_device *unused)
omap_hwmod_idle(clockevent_gpt_hwmod);
}
static void omap_clkevt_unidle(struct clock_event_device *unused)
static void omap_clkevt_unidle(struct clock_event_device *evt)
{
struct omap_dm_timer *timer = to_dmtimer(evt);
if (!clockevent_gpt_hwmod)
return;
omap_hwmod_enable(clockevent_gpt_hwmod);
__omap_dm_timer_int_enable(&clkev, OMAP_TIMER_INT_OVERFLOW);
__omap_dm_timer_int_enable(timer, OMAP_TIMER_INT_OVERFLOW);
}
static struct clock_event_device clockevent_gpt = {
.features = CLOCK_EVT_FEAT_PERIODIC |
CLOCK_EVT_FEAT_ONESHOT,
.rating = 300,
.set_next_event = omap2_gp_timer_set_next_event,
.set_state_shutdown = omap2_gp_timer_shutdown,
.set_state_periodic = omap2_gp_timer_set_periodic,
.set_state_oneshot = omap2_gp_timer_shutdown,
.tick_resume = omap2_gp_timer_shutdown,
};
static const struct of_device_id omap_timer_match[] __initconst = {
{ .compatible = "ti,omap2420-timer", },
{ .compatible = "ti,omap3430-timer", },
@ -363,47 +368,57 @@ void tick_broadcast(const struct cpumask *mask)
}
#endif
static void __init omap2_gp_clockevent_init(int gptimer_id,
const char *fck_source,
const char *property)
static void __init dmtimer_clkevt_init_common(struct dmtimer_clockevent *clkevt,
int gptimer_id,
const char *fck_source,
unsigned int features,
const struct cpumask *cpumask,
const char *property,
int rating, const char *name)
{
struct omap_dm_timer *timer = &clkevt->timer;
int res;
clkev.id = gptimer_id;
clkev.errata = omap_dm_timer_get_errata();
timer->id = gptimer_id;
timer->errata = omap_dm_timer_get_errata();
clkevt->dev.features = features;
clkevt->dev.rating = rating;
clkevt->dev.set_next_event = omap2_gp_timer_set_next_event;
clkevt->dev.set_state_shutdown = omap2_gp_timer_shutdown;
clkevt->dev.set_state_periodic = omap2_gp_timer_set_periodic;
clkevt->dev.set_state_oneshot = omap2_gp_timer_shutdown;
clkevt->dev.tick_resume = omap2_gp_timer_shutdown;
/*
* For clock-event timers we never read the timer counter and
* so we are not impacted by errata i103 and i767. Therefore,
* we can safely ignore this errata for clock-event timers.
*/
__omap_dm_timer_override_errata(&clkev, OMAP_TIMER_ERRATA_I103_I767);
__omap_dm_timer_override_errata(timer, OMAP_TIMER_ERRATA_I103_I767);
res = omap_dm_timer_init_one(&clkev, fck_source, property,
&clockevent_gpt.name, OMAP_TIMER_POSTED);
res = omap_dm_timer_init_one(timer, fck_source, property,
&clkevt->dev.name, OMAP_TIMER_POSTED);
BUG_ON(res);
omap2_gp_timer_irq.dev_id = &clkev;
setup_irq(clkev.irq, &omap2_gp_timer_irq);
clkevt->dev.cpumask = cpumask;
clkevt->dev.irq = omap_dm_timer_get_irq(timer);
__omap_dm_timer_int_enable(&clkev, OMAP_TIMER_INT_OVERFLOW);
if (request_irq(clkevt->dev.irq, omap2_gp_timer_interrupt,
IRQF_TIMER | IRQF_IRQPOLL, name, clkevt))
pr_err("Failed to request irq %d (gp_timer)\n", clkevt->dev.irq);
clockevent_gpt.cpumask = cpu_possible_mask;
clockevent_gpt.irq = omap_dm_timer_get_irq(&clkev);
clockevents_config_and_register(&clockevent_gpt, clkev.rate,
3, /* Timer internal resynch latency */
0xffffffff);
__omap_dm_timer_int_enable(timer, OMAP_TIMER_INT_OVERFLOW);
if (soc_is_am33xx() || soc_is_am43xx()) {
clockevent_gpt.suspend = omap_clkevt_idle;
clockevent_gpt.resume = omap_clkevt_unidle;
clkevt->dev.suspend = omap_clkevt_idle;
clkevt->dev.resume = omap_clkevt_unidle;
clockevent_gpt_hwmod =
omap_hwmod_lookup(clockevent_gpt.name);
omap_hwmod_lookup(clkevt->dev.name);
}
pr_info("OMAP clockevent source: %s at %lu Hz\n", clockevent_gpt.name,
clkev.rate);
pr_info("OMAP clockevent source: %s at %lu Hz\n", clkevt->dev.name,
timer->rate);
}
/* Clocksource code */
@ -543,7 +558,12 @@ static void __init __omap_sync32k_timer_init(int clkev_nr, const char *clkev_src
{
omap_clk_init();
omap_dmtimer_init();
omap2_gp_clockevent_init(clkev_nr, clkev_src, clkev_prop);
dmtimer_clkevt_init_common(&clockevent, clkev_nr, clkev_src,
CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
cpu_possible_mask, clkev_prop, 300, "clockevent");
clockevents_config_and_register(&clockevent.dev, clockevent.timer.rate,
3, /* Timer internal resynch latency */
0xffffffff);
/* Enable the use of clocksource="gp_timer" kernel parameter */
if (use_gptimer_clksrc || gptimer)

View File

@ -444,21 +444,21 @@ void kprobe_thumb32_test_cases(void)
"3: mvn r0, r0 \n\t"
"2: nop \n\t")
TEST_RX("tbh [pc, r",7, (9f-(1f+4))>>1,"]",
TEST_RX("tbh [pc, r",7, (9f-(1f+4))>>1,", lsl #1]",
"9: \n\t"
".short (2f-1b-4)>>1 \n\t"
".short (3f-1b-4)>>1 \n\t"
"3: mvn r0, r0 \n\t"
"2: nop \n\t")
TEST_RX("tbh [pc, r",12, ((9f-(1f+4))>>1)+1,"]",
TEST_RX("tbh [pc, r",12, ((9f-(1f+4))>>1)+1,", lsl #1]",
"9: \n\t"
".short (2f-1b-4)>>1 \n\t"
".short (3f-1b-4)>>1 \n\t"
"3: mvn r0, r0 \n\t"
"2: nop \n\t")
TEST_RRX("tbh [r",1,9f, ", r",14,1,"]",
TEST_RRX("tbh [r",1,9f, ", r",14,1,", lsl #1]",
"9: \n\t"
".short (2f-1b-4)>>1 \n\t"
".short (3f-1b-4)>>1 \n\t"
@ -471,10 +471,10 @@ void kprobe_thumb32_test_cases(void)
TEST_UNSUPPORTED("strexb r0, r1, [r2]")
TEST_UNSUPPORTED("strexh r0, r1, [r2]")
TEST_UNSUPPORTED("strexd r0, r1, [r2]")
TEST_UNSUPPORTED("strexd r0, r1, r2, [r2]")
TEST_UNSUPPORTED("ldrexb r0, [r1]")
TEST_UNSUPPORTED("ldrexh r0, [r1]")
TEST_UNSUPPORTED("ldrexd r0, [r1]")
TEST_UNSUPPORTED("ldrexd r0, r1, [r1]")
TEST_GROUP("Data-processing (shifted register) and (modified immediate)")

View File

@ -533,13 +533,13 @@
clocks {
compatible = "arm,scpi-clocks";
scpi_dvfs: scpi-dvfs {
scpi_dvfs: clocks-0 {
compatible = "arm,scpi-dvfs-clocks";
#clock-cells = <1>;
clock-indices = <0>, <1>, <2>;
clock-output-names = "atlclk", "aplclk","gpuclk";
};
scpi_clk: scpi-clk {
scpi_clk: clocks-1 {
compatible = "arm,scpi-variable-clocks";
#clock-cells = <1>;
clock-indices = <3>;
@ -547,7 +547,7 @@
};
};
scpi_devpd: scpi-power-domains {
scpi_devpd: power-controller {
compatible = "arm,scpi-power-domains";
num-domains = <2>;
#power-domain-cells = <1>;

View File

@ -479,7 +479,6 @@
clocks = <&clockgen 4 3>;
clock-names = "dspi";
spi-num-chipselects = <5>;
bus-num = <0>;
};
esdhc: esdhc@2140000 {

View File

@ -121,7 +121,7 @@
uart0: serial@12000 {
compatible = "marvell,armada-3700-uart";
reg = <0x12000 0x200>;
reg = <0x12000 0x18>;
clocks = <&xtalclk>;
interrupts =
<GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,

View File

@ -24,7 +24,7 @@
memory@48000000 {
device_type = "memory";
/* first 128MB is reserved for secure area. */
reg = <0x0 0x48000000 0x0 0x38000000>;
reg = <0x0 0x48000000 0x0 0x78000000>;
};
osc5_clk: osc5-clock {

View File

@ -255,13 +255,13 @@
#address-cells = <1>;
#size-cells = <0>;
pd_hevc@RK3328_PD_HEVC {
power-domain@RK3328_PD_HEVC {
reg = <RK3328_PD_HEVC>;
};
pd_video@RK3328_PD_VIDEO {
power-domain@RK3328_PD_VIDEO {
reg = <RK3328_PD_VIDEO>;
};
pd_vpu@RK3328_PD_VPU {
power-domain@RK3328_PD_VPU {
reg = <RK3328_PD_VPU>;
};
};

View File

@ -2253,7 +2253,7 @@
};
};
sleep {
suspend {
ap_pwroff: ap-pwroff {
rockchip,pins = <1 5 RK_FUNC_1 &pcfg_pull_none>;
};

View File

@ -73,13 +73,8 @@ SECTIONS
_end = .;
/DISCARD/ : {
EXIT_TEXT
EXIT_DATA
EXIT_CALL
}
STABS_DEBUG
DWARF_DEBUG
DISCARDS
}

View File

@ -343,7 +343,7 @@ init_record_index_pools(void)
/* - 2 - */
sect_min_size = sal_log_sect_min_sizes[0];
for (i = 1; i < sizeof sal_log_sect_min_sizes/sizeof(size_t); i++)
for (i = 1; i < ARRAY_SIZE(sal_log_sect_min_sizes); i++)
if (sect_min_size > sal_log_sect_min_sizes[i])
sect_min_size = sal_log_sect_min_sizes[i];

View File

@ -33,7 +33,7 @@ KBUILD_AFLAGS := $(KBUILD_AFLAGS) -D__ASSEMBLY__ \
KCOV_INSTRUMENT := n
# decompressor objects (linked with vmlinuz)
vmlinuzobjs-y := $(obj)/head.o $(obj)/decompress.o $(obj)/string.o
vmlinuzobjs-y := $(obj)/head.o $(obj)/decompress.o $(obj)/string.o $(obj)/bswapsi.o
ifdef CONFIG_DEBUG_ZBOOT
vmlinuzobjs-$(CONFIG_DEBUG_ZBOOT) += $(obj)/dbg.o
@ -47,7 +47,7 @@ extra-y += uart-ath79.c
$(obj)/uart-ath79.c: $(srctree)/arch/mips/ath79/early_printk.c
$(call cmd,shipped)
vmlinuzobjs-$(CONFIG_KERNEL_XZ) += $(obj)/ashldi3.o $(obj)/bswapsi.o
vmlinuzobjs-$(CONFIG_KERNEL_XZ) += $(obj)/ashldi3.o
extra-y += ashldi3.c
$(obj)/ashldi3.c: $(obj)/%.c: $(srctree)/lib/%.c FORCE

View File

@ -11,6 +11,8 @@
* option) any later version.
*/
#define DISABLE_BRANCH_PROFILING
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/string.h>

View File

@ -67,7 +67,13 @@ static inline pte_t huge_ptep_get_and_clear(struct mm_struct *mm,
static inline void huge_ptep_clear_flush(struct vm_area_struct *vma,
unsigned long addr, pte_t *ptep)
{
flush_tlb_page(vma, addr & huge_page_mask(hstate_vma(vma)));
/*
* clear the huge pte entry firstly, so that the other smp threads will
* not get old pte entry after finishing flush_tlb_page and before
* setting new huge pte entry
*/
huge_ptep_get_and_clear(vma->vm_mm, addr, ptep);
flush_tlb_page(vma, addr);
}
static inline int huge_pte_none(pte_t pte)

View File

@ -1986,7 +1986,7 @@ _ASM_MACRO_0(tlbginvf, _ASM_INSN_IF_MIPS(0x4200000c)
({ int __res; \
__asm__ __volatile__( \
".set\tpush\n\t" \
".set\tmips32r2\n\t" \
".set\tmips32r5\n\t" \
_ASM_SET_VIRT \
"mfgc0\t%0, " #source ", %1\n\t" \
".set\tpop" \
@ -1999,7 +1999,7 @@ _ASM_MACRO_0(tlbginvf, _ASM_INSN_IF_MIPS(0x4200000c)
({ unsigned long long __res; \
__asm__ __volatile__( \
".set\tpush\n\t" \
".set\tmips64r2\n\t" \
".set\tmips64r5\n\t" \
_ASM_SET_VIRT \
"dmfgc0\t%0, " #source ", %1\n\t" \
".set\tpop" \
@ -2012,7 +2012,7 @@ _ASM_MACRO_0(tlbginvf, _ASM_INSN_IF_MIPS(0x4200000c)
do { \
__asm__ __volatile__( \
".set\tpush\n\t" \
".set\tmips32r2\n\t" \
".set\tmips32r5\n\t" \
_ASM_SET_VIRT \
"mtgc0\t%z0, " #register ", %1\n\t" \
".set\tpop" \
@ -2024,7 +2024,7 @@ do { \
do { \
__asm__ __volatile__( \
".set\tpush\n\t" \
".set\tmips64r2\n\t" \
".set\tmips64r5\n\t" \
_ASM_SET_VIRT \
"dmtgc0\t%z0, " #register ", %1\n\t" \
".set\tpop" \

View File

@ -82,7 +82,7 @@ static inline const struct vdso_data *get_vdso_data(void)
static inline void __iomem *get_gic(const struct vdso_data *data)
{
return (void __iomem *)data - PAGE_SIZE;
return (void __iomem *)((unsigned long)data & PAGE_MASK) - PAGE_SIZE;
}
#endif /* CONFIG_CLKSRC_MIPS_GIC */

View File

@ -59,7 +59,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
vma = find_vma(mm, addr);
if (TASK_SIZE - len >= addr &&
(!vma || addr + len <= vma->vm_start))
(!vma || addr + len <= vm_start_gap(vma)))
return addr;
}

View File

@ -17,6 +17,7 @@
#include "string.h"
#include "stdio.h"
#include "ops.h"
#include "of.h"
void dt_fixup_memory(u64 start, u64 size)
{
@ -27,21 +28,25 @@ void dt_fixup_memory(u64 start, u64 size)
root = finddevice("/");
if (getprop(root, "#address-cells", &naddr, sizeof(naddr)) < 0)
naddr = 2;
else
naddr = be32_to_cpu(naddr);
if (naddr < 1 || naddr > 2)
fatal("Can't cope with #address-cells == %d in /\n\r", naddr);
if (getprop(root, "#size-cells", &nsize, sizeof(nsize)) < 0)
nsize = 1;
else
nsize = be32_to_cpu(nsize);
if (nsize < 1 || nsize > 2)
fatal("Can't cope with #size-cells == %d in /\n\r", nsize);
i = 0;
if (naddr == 2)
memreg[i++] = start >> 32;
memreg[i++] = start & 0xffffffff;
memreg[i++] = cpu_to_be32(start >> 32);
memreg[i++] = cpu_to_be32(start & 0xffffffff);
if (nsize == 2)
memreg[i++] = size >> 32;
memreg[i++] = size & 0xffffffff;
memreg[i++] = cpu_to_be32(size >> 32);
memreg[i++] = cpu_to_be32(size & 0xffffffff);
memory = finddevice("/memory");
if (! memory) {
@ -49,9 +54,9 @@ void dt_fixup_memory(u64 start, u64 size)
setprop_str(memory, "device_type", "memory");
}
printf("Memory <- <0x%x", memreg[0]);
printf("Memory <- <0x%x", be32_to_cpu(memreg[0]));
for (i = 1; i < (naddr + nsize); i++)
printf(" 0x%x", memreg[i]);
printf(" 0x%x", be32_to_cpu(memreg[i]));
printf("> (%ldMB)\n\r", (unsigned long)(size >> 20));
setprop(memory, "reg", memreg, (naddr + nsize)*sizeof(u32));
@ -69,10 +74,10 @@ void dt_fixup_cpu_clocks(u32 cpu, u32 tb, u32 bus)
printf("CPU bus-frequency <- 0x%x (%dMHz)\n\r", bus, MHZ(bus));
while ((devp = find_node_by_devtype(devp, "cpu"))) {
setprop_val(devp, "clock-frequency", cpu);
setprop_val(devp, "timebase-frequency", tb);
setprop_val(devp, "clock-frequency", cpu_to_be32(cpu));
setprop_val(devp, "timebase-frequency", cpu_to_be32(tb));
if (bus > 0)
setprop_val(devp, "bus-frequency", bus);
setprop_val(devp, "bus-frequency", cpu_to_be32(bus));
}
timebase_period_ns = 1000000000 / tb;
@ -84,7 +89,7 @@ void dt_fixup_clock(const char *path, u32 freq)
if (devp) {
printf("%s: clock-frequency <- %x (%dMHz)\n\r", path, freq, MHZ(freq));
setprop_val(devp, "clock-frequency", freq);
setprop_val(devp, "clock-frequency", cpu_to_be32(freq));
}
}
@ -137,8 +142,12 @@ void dt_get_reg_format(void *node, u32 *naddr, u32 *nsize)
{
if (getprop(node, "#address-cells", naddr, 4) != 4)
*naddr = 2;
else
*naddr = be32_to_cpu(*naddr);
if (getprop(node, "#size-cells", nsize, 4) != 4)
*nsize = 1;
else
*nsize = be32_to_cpu(*nsize);
}
static void copy_val(u32 *dest, u32 *src, int naddr)
@ -167,9 +176,9 @@ static int add_reg(u32 *reg, u32 *add, int naddr)
int i, carry = 0;
for (i = MAX_ADDR_CELLS - 1; i >= MAX_ADDR_CELLS - naddr; i--) {
u64 tmp = (u64)reg[i] + add[i] + carry;
u64 tmp = (u64)be32_to_cpu(reg[i]) + be32_to_cpu(add[i]) + carry;
carry = tmp >> 32;
reg[i] = (u32)tmp;
reg[i] = cpu_to_be32((u32)tmp);
}
return !carry;
@ -184,18 +193,18 @@ static int compare_reg(u32 *reg, u32 *range, u32 *rangesize)
u32 end;
for (i = 0; i < MAX_ADDR_CELLS; i++) {
if (reg[i] < range[i])
if (be32_to_cpu(reg[i]) < be32_to_cpu(range[i]))
return 0;
if (reg[i] > range[i])
if (be32_to_cpu(reg[i]) > be32_to_cpu(range[i]))
break;
}
for (i = 0; i < MAX_ADDR_CELLS; i++) {
end = range[i] + rangesize[i];
end = be32_to_cpu(range[i]) + be32_to_cpu(rangesize[i]);
if (reg[i] < end)
if (be32_to_cpu(reg[i]) < end)
break;
if (reg[i] > end)
if (be32_to_cpu(reg[i]) > end)
return 0;
}
@ -244,7 +253,6 @@ static int dt_xlate(void *node, int res, int reglen, unsigned long *addr,
return 0;
dt_get_reg_format(parent, &naddr, &nsize);
if (nsize > 2)
return 0;
@ -256,10 +264,10 @@ static int dt_xlate(void *node, int res, int reglen, unsigned long *addr,
copy_val(last_addr, prop_buf + offset, naddr);
ret_size = prop_buf[offset + naddr];
ret_size = be32_to_cpu(prop_buf[offset + naddr]);
if (nsize == 2) {
ret_size <<= 32;
ret_size |= prop_buf[offset + naddr + 1];
ret_size |= be32_to_cpu(prop_buf[offset + naddr + 1]);
}
for (;;) {
@ -282,7 +290,6 @@ static int dt_xlate(void *node, int res, int reglen, unsigned long *addr,
offset = find_range(last_addr, prop_buf, prev_naddr,
naddr, prev_nsize, buflen / 4);
if (offset < 0)
return 0;
@ -300,8 +307,7 @@ static int dt_xlate(void *node, int res, int reglen, unsigned long *addr,
if (naddr > 2)
return 0;
ret_addr = ((u64)last_addr[2] << 32) | last_addr[3];
ret_addr = ((u64)be32_to_cpu(last_addr[2]) << 32) | be32_to_cpu(last_addr[3]);
if (sizeof(void *) == 4 &&
(ret_addr >= 0x100000000ULL || ret_size > 0x100000000ULL ||
ret_addr + ret_size > 0x100000000ULL))
@ -354,11 +360,14 @@ int dt_is_compatible(void *node, const char *compat)
int dt_get_virtual_reg(void *node, void **addr, int nres)
{
unsigned long xaddr;
int n;
int n, i;
n = getprop(node, "virtual-reg", addr, nres * 4);
if (n > 0)
if (n > 0) {
for (i = 0; i < n/4; i ++)
((u32 *)addr)[i] = be32_to_cpu(((u32 *)addr)[i]);
return n / 4;
}
for (n = 0; n < nres; n++) {
if (!dt_xlate_reg(node, n, &xaddr, NULL))

View File

@ -15,6 +15,7 @@
#include "stdio.h"
#include "io.h"
#include "ops.h"
#include "of.h"
#define UART_DLL 0 /* Out: Divisor Latch Low */
#define UART_DLM 1 /* Out: Divisor Latch High */
@ -58,16 +59,20 @@ int ns16550_console_init(void *devp, struct serial_console_data *scdp)
int n;
u32 reg_offset;
if (dt_get_virtual_reg(devp, (void **)&reg_base, 1) < 1)
if (dt_get_virtual_reg(devp, (void **)&reg_base, 1) < 1) {
printf("virt reg parse fail...\r\n");
return -1;
}
n = getprop(devp, "reg-offset", &reg_offset, sizeof(reg_offset));
if (n == sizeof(reg_offset))
reg_base += reg_offset;
reg_base += be32_to_cpu(reg_offset);
n = getprop(devp, "reg-shift", &reg_shift, sizeof(reg_shift));
if (n != sizeof(reg_shift))
reg_shift = 0;
else
reg_shift = be32_to_cpu(reg_shift);
scdp->open = ns16550_open;
scdp->putc = ns16550_putc;

View File

@ -44,6 +44,8 @@
# define SMPWMB eieio
#endif
/* clang defines this macro for a builtin, which will not work with runtime patching */
#undef __lwsync
#define __lwsync() __asm__ __volatile__ (stringify_in_c(LWSYNC) : : :"memory")
#define dma_rmb() __lwsync()
#define dma_wmb() __asm__ __volatile__ (stringify_in_c(SMPWMB) : : :"memory")

View File

@ -83,6 +83,7 @@ struct ps3_dma_region_ops;
* @bus_addr: The 'translated' bus address of the region.
* @len: The length in bytes of the region.
* @offset: The offset from the start of memory of the region.
* @dma_mask: Device dma_mask.
* @ioid: The IOID of the device who owns this region
* @chunk_list: Opaque variable used by the ioc page manager.
* @region_ops: struct ps3_dma_region_ops - dma region operations
@ -97,6 +98,7 @@ struct ps3_dma_region {
enum ps3_dma_region_type region_type;
unsigned long len;
unsigned long offset;
u64 dma_mask;
/* driver variables (set by ps3_dma_region_create) */
unsigned long bus_addr;

View File

@ -570,6 +570,8 @@ static void nmi_stop_this_cpu(struct pt_regs *regs)
/*
* IRQs are already hard disabled by the smp_handle_nmi_ipi.
*/
set_cpu_online(smp_processor_id(), false);
spin_begin();
while (1)
spin_cpu_relax();
@ -585,6 +587,15 @@ void smp_send_stop(void)
static void stop_this_cpu(void *dummy)
{
hard_irq_disable();
/*
* Offlining CPUs in stop_this_cpu can result in scheduler warnings,
* (see commit de6e5d38417e), but printk_safe_flush_on_panic() wants
* to know other CPUs are offline before it breaks locks to flush
* printk buffers, in case we panic()ed while holding the lock.
*/
set_cpu_online(smp_processor_id(), false);
spin_begin();
while (1)
spin_cpu_relax();

View File

@ -19,6 +19,7 @@
#include <asm/ptrace.h>
#include <asm/processor.h>
#include <linux/ftrace.h>
#include <linux/delay.h>
#include <asm/kprobes.h>
#include <asm/paca.h>
@ -204,17 +205,31 @@ static void handle_backtrace_ipi(struct pt_regs *regs)
static void raise_backtrace_ipi(cpumask_t *mask)
{
struct paca_struct *p;
unsigned int cpu;
u64 delay_us;
for_each_cpu(cpu, mask) {
if (cpu == smp_processor_id())
if (cpu == smp_processor_id()) {
handle_backtrace_ipi(NULL);
else
smp_send_safe_nmi_ipi(cpu, handle_backtrace_ipi, 5 * USEC_PER_SEC);
}
continue;
}
for_each_cpu(cpu, mask) {
struct paca_struct *p = paca_ptrs[cpu];
delay_us = 5 * USEC_PER_SEC;
if (smp_send_safe_nmi_ipi(cpu, handle_backtrace_ipi, delay_us)) {
// Now wait up to 5s for the other CPU to do its backtrace
while (cpumask_test_cpu(cpu, mask) && delay_us) {
udelay(1);
delay_us--;
}
// Other CPU cleared itself from the mask
if (delay_us)
continue;
}
p = paca_ptrs[cpu];
cpumask_clear_cpu(cpu, mask);

View File

@ -243,6 +243,17 @@ int kvmppc_rtas_hcall(struct kvm_vcpu *vcpu)
* value so we can restore it on the way out.
*/
orig_rets = args.rets;
if (be32_to_cpu(args.nargs) >= ARRAY_SIZE(args.args)) {
/*
* Don't overflow our args array: ensure there is room for
* at least rets[0] (even if the call specifies 0 nret).
*
* Each handler must then check for the correct nargs and nret
* values, but they may always return failure in rets[0].
*/
rc = -EINVAL;
goto fail;
}
args.rets = &args.args[be32_to_cpu(args.nargs)];
mutex_lock(&vcpu->kvm->arch.rtas_token_lock);
@ -270,9 +281,17 @@ int kvmppc_rtas_hcall(struct kvm_vcpu *vcpu)
fail:
/*
* We only get here if the guest has called RTAS with a bogus
* args pointer. That means we can't get to the args, and so we
* can't fail the RTAS call. So fail right out to userspace,
* which should kill the guest.
* args pointer or nargs/nret values that would overflow the
* array. That means we can't get to the args, and so we can't
* fail the RTAS call. So fail right out to userspace, which
* should kill the guest.
*
* SLOF should actually pass the hcall return value from the
* rtas handler call in r3, so enter_rtas could be modified to
* return a failure indication in r3 and we could return such
* errors to the guest rather than failing to host userspace.
* However old guests that don't test for failure could then
* continue silently after errors, so for now we won't do this.
*/
return rc;
}

View File

@ -1995,9 +1995,9 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
{
struct kvm_enable_cap cap;
r = -EFAULT;
vcpu_load(vcpu);
if (copy_from_user(&cap, argp, sizeof(cap)))
goto out;
vcpu_load(vcpu);
r = kvm_vcpu_ioctl_enable_cap(vcpu, &cap);
vcpu_put(vcpu);
break;
@ -2021,9 +2021,9 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
case KVM_DIRTY_TLB: {
struct kvm_dirty_tlb dirty;
r = -EFAULT;
vcpu_load(vcpu);
if (copy_from_user(&dirty, argp, sizeof(dirty)))
goto out;
vcpu_load(vcpu);
r = kvm_vcpu_ioctl_dirty_tlb(vcpu, &dirty);
vcpu_put(vcpu);
break;

View File

@ -18,6 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <linux/dma-mapping.h>
#include <linux/kernel.h>
#include <linux/export.h>
#include <linux/memblock.h>
@ -1130,6 +1131,7 @@ int ps3_dma_region_init(struct ps3_system_bus_device *dev,
enum ps3_dma_region_type region_type, void *addr, unsigned long len)
{
unsigned long lpar_addr;
int result;
lpar_addr = addr ? ps3_mm_phys_to_lpar(__pa(addr)) : 0;
@ -1141,6 +1143,16 @@ int ps3_dma_region_init(struct ps3_system_bus_device *dev,
r->offset -= map.r1.offset;
r->len = len ? len : _ALIGN_UP(map.total, 1 << r->page_size);
dev->core.dma_mask = &r->dma_mask;
result = dma_set_mask_and_coherent(&dev->core, DMA_BIT_MASK(32));
if (result < 0) {
dev_err(&dev->core, "%s:%d: dma_set_mask_and_coherent failed: %d\n",
__func__, __LINE__, result);
return result;
}
switch (dev->dev_type) {
case PS3_DEVICE_TYPE_SB:
r->region_ops = (USE_DYNAMIC_DMA)

View File

@ -867,7 +867,7 @@ config CMM_IUCV
config APPLDATA_BASE
def_bool n
prompt "Linux - VM Monitor Stream, base infrastructure"
depends on PROC_FS
depends on PROC_SYSCTL
help
This provides a kernel interface for creating and updating z/VM APPLDATA
monitor records. The monitor records are updated at certain time

View File

@ -20,6 +20,7 @@ void ftrace_caller(void);
extern char ftrace_graph_caller_end;
extern unsigned long ftrace_plt;
extern void *ftrace_func;
struct dyn_arch_ftrace { };

View File

@ -57,6 +57,7 @@
* > brasl %r0,ftrace_caller # offset 0
*/
void *ftrace_func __read_mostly = ftrace_stub;
unsigned long ftrace_plt;
static inline void ftrace_generate_orig_insn(struct ftrace_insn *insn)
@ -166,6 +167,7 @@ int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
int ftrace_update_ftrace_func(ftrace_func_t func)
{
ftrace_func = func;
return 0;
}

View File

@ -60,13 +60,13 @@ ENTRY(ftrace_caller)
#ifdef CONFIG_HAVE_MARCH_Z196_FEATURES
aghik %r2,%r0,-MCOUNT_INSN_SIZE
lgrl %r4,function_trace_op
lgrl %r1,ftrace_trace_function
lgrl %r1,ftrace_func
#else
lgr %r2,%r0
aghi %r2,-MCOUNT_INSN_SIZE
larl %r4,function_trace_op
lg %r4,0(%r4)
larl %r1,ftrace_trace_function
larl %r1,ftrace_func
lg %r1,0(%r1)
#endif
lgr %r3,%r14

View File

@ -141,7 +141,7 @@ static void __init set_preferred_console(void)
else if (CONSOLE_IS_3270)
add_preferred_console("tty3270", 0, NULL);
else if (CONSOLE_IS_VT220)
add_preferred_console("ttyS", 1, NULL);
add_preferred_console("ttysclp", 0, NULL);
else if (CONSOLE_IS_HVC)
add_preferred_console("hvc", 0, NULL);
}

View File

@ -113,7 +113,7 @@ static inline void reg_set_seen(struct bpf_jit *jit, u32 b1)
{
u32 r1 = reg2hex[b1];
if (!jit->seen_reg[r1] && r1 >= 6 && r1 <= 15)
if (r1 >= 6 && r1 <= 15 && !jit->seen_reg[r1])
jit->seen_reg[r1] = 1;
}

View File

@ -256,7 +256,8 @@ static int winch_tramp(int fd, struct tty_port *port, int *fd_out,
goto out_close;
}
if (os_set_fd_block(*fd_out, 0)) {
err = os_set_fd_block(*fd_out, 0);
if (err) {
printk(UM_KERN_ERR "winch_tramp: failed to set thread_fd "
"non-blocking.\n");
goto out_close;

View File

@ -145,7 +145,8 @@ static int slip_open(void *data)
}
sfd = err;
if (set_up_tty(sfd))
err = set_up_tty(sfd);
if (err)
goto out_close2;
pri->slave = sfd;

View File

@ -103,6 +103,7 @@ static inline void fpstate_init_fxstate(struct fxregs_state *fx)
}
extern void fpstate_sanitize_xstate(struct fpu *fpu);
/* Returns 0 or the negated trap number, which results in -EFAULT for #PF */
#define user_insn(insn, output, input...) \
({ \
int err; \
@ -110,14 +111,14 @@ extern void fpstate_sanitize_xstate(struct fpu *fpu);
might_fault(); \
\
asm volatile(ASM_STAC "\n" \
"1:" #insn "\n\t" \
"1: " #insn "\n" \
"2: " ASM_CLAC "\n" \
".section .fixup,\"ax\"\n" \
"3: movl $-1,%[err]\n" \
"3: negl %%eax\n" \
" jmp 2b\n" \
".previous\n" \
_ASM_EXTABLE(1b, 3b) \
: [err] "=r" (err), output \
_ASM_EXTABLE_FAULT(1b, 3b) \
: [err] "=a" (err), output \
: "0"(0), input); \
err; \
})
@ -221,16 +222,20 @@ static inline void copy_fxregs_to_kernel(struct fpu *fpu)
#define XRSTOR ".byte " REX_PREFIX "0x0f,0xae,0x2f"
#define XRSTORS ".byte " REX_PREFIX "0x0f,0xc7,0x1f"
/*
* After this @err contains 0 on success or the negated trap number when
* the operation raises an exception. For faults this results in -EFAULT.
*/
#define XSTATE_OP(op, st, lmask, hmask, err) \
asm volatile("1:" op "\n\t" \
"xor %[err], %[err]\n" \
"2:\n\t" \
".pushsection .fixup,\"ax\"\n\t" \
"3: movl $-2,%[err]\n\t" \
"3: negl %%eax\n\t" \
"jmp 2b\n\t" \
".popsection\n\t" \
_ASM_EXTABLE(1b, 3b) \
: [err] "=r" (err) \
_ASM_EXTABLE_FAULT(1b, 3b) \
: [err] "=a" (err) \
: "D" (st), "m" (*st), "a" (lmask), "d" (hmask) \
: "memory")

View File

@ -128,7 +128,7 @@ int xstateregs_set(struct task_struct *target, const struct user_regset *regset,
/*
* A whole standard-format XSAVE buffer is needed:
*/
if ((pos != 0) || (count < fpu_user_xstate_size))
if (pos != 0 || count != fpu_user_xstate_size)
return -EFAULT;
xsave = &fpu->state.xsave;

View File

@ -666,8 +666,14 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
unsigned virt_as = max((entry->eax >> 8) & 0xff, 48U);
unsigned phys_as = entry->eax & 0xff;
if (!g_phys_as)
/*
* Use bare metal's MAXPHADDR if the CPU doesn't report guest
* MAXPHYADDR separately, or if TDP (NPT) is disabled, as the
* guest version "applies only to guests using nested paging".
*/
if (!g_phys_as || !tdp_enabled)
g_phys_as = phys_as;
entry->eax = g_phys_as | (virt_as << 8);
entry->edx = 0;
/*

View File

@ -1791,9 +1791,25 @@ static void sev_asid_free(struct kvm *kvm)
__sev_asid_free(sev->asid);
}
static void sev_unbind_asid(struct kvm *kvm, unsigned int handle)
static void sev_decommission(unsigned int handle)
{
struct sev_data_decommission *decommission;
if (!handle)
return;
decommission = kzalloc(sizeof(*decommission), GFP_KERNEL);
if (!decommission)
return;
decommission->handle = handle;
sev_guest_decommission(decommission, NULL);
kfree(decommission);
}
static void sev_unbind_asid(struct kvm *kvm, unsigned int handle)
{
struct sev_data_deactivate *data;
if (!handle)
@ -1811,15 +1827,7 @@ static void sev_unbind_asid(struct kvm *kvm, unsigned int handle)
sev_guest_df_flush(NULL);
kfree(data);
decommission = kzalloc(sizeof(*decommission), GFP_KERNEL);
if (!decommission)
return;
/* decommission handle */
decommission->handle = handle;
sev_guest_decommission(decommission, NULL);
kfree(decommission);
sev_decommission(handle);
}
static struct page **sev_pin_memory(struct kvm *kvm, unsigned long uaddr,
@ -1954,6 +1962,7 @@ static void sev_vm_destroy(struct kvm *kvm)
list_for_each_safe(pos, q, head) {
__unregister_enc_region_locked(kvm,
list_entry(pos, struct enc_region, list));
cond_resched();
}
}
@ -6468,8 +6477,10 @@ static int sev_launch_start(struct kvm *kvm, struct kvm_sev_cmd *argp)
/* Bind ASID to this guest */
ret = sev_bind_asid(kvm, start->handle, error);
if (ret)
if (ret) {
sev_decommission(start->handle);
goto e_free_session;
}
/* return handle to userspace */
params.handle = start->handle;

View File

@ -416,8 +416,6 @@ static void kvm_multiple_exception(struct kvm_vcpu *vcpu,
if (!vcpu->arch.exception.pending && !vcpu->arch.exception.injected) {
queue:
if (has_error && !is_protmode(vcpu))
has_error = false;
if (reinject) {
/*
* On vmentry, vcpu->arch.exception.pending is only
@ -7114,6 +7112,13 @@ static void update_cr8_intercept(struct kvm_vcpu *vcpu)
kvm_x86_ops->update_cr8_intercept(vcpu, tpr, max_irr);
}
static void kvm_inject_exception(struct kvm_vcpu *vcpu)
{
if (vcpu->arch.exception.error_code && !is_protmode(vcpu))
vcpu->arch.exception.error_code = false;
kvm_x86_ops->queue_exception(vcpu);
}
static int inject_pending_event(struct kvm_vcpu *vcpu)
{
int r;
@ -7121,7 +7126,7 @@ static int inject_pending_event(struct kvm_vcpu *vcpu)
/* try to reinject previous events if any */
if (vcpu->arch.exception.injected)
kvm_x86_ops->queue_exception(vcpu);
kvm_inject_exception(vcpu);
/*
* Do not inject an NMI or interrupt if there is a pending
* exception. Exceptions and interrupts are recognized at
@ -7175,7 +7180,7 @@ static int inject_pending_event(struct kvm_vcpu *vcpu)
kvm_update_dr7(vcpu);
}
kvm_x86_ops->queue_exception(vcpu);
kvm_inject_exception(vcpu);
}
/* Don't consider new event if we re-injected an event */
@ -7772,6 +7777,8 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
set_debugreg(vcpu->arch.eff_db[3], 3);
set_debugreg(vcpu->arch.dr6, 6);
vcpu->arch.switch_db_regs &= ~KVM_DEBUGREG_RELOAD;
} else if (unlikely(hw_breakpoint_active())) {
set_debugreg(0, 7);
}
kvm_x86_ops->run(vcpu);

View File

@ -76,7 +76,8 @@ enum {
static inline bool rwb_enabled(struct rq_wb *rwb)
{
return rwb && rwb->wb_normal != 0;
return rwb && rwb->enable_state != WBT_STATE_OFF_DEFAULT &&
rwb->wb_normal != 0;
}
static void wb_timestamp(struct rq_wb *rwb, unsigned long *var)
@ -703,9 +704,13 @@ void wbt_set_write_cache(struct request_queue *q, bool write_cache_on)
void wbt_enable_default(struct request_queue *q)
{
struct rq_qos *rqos = wbt_rq_qos(q);
/* Throttling already enabled? */
if (rqos)
if (rqos) {
if (RQWB(rqos)->enable_state == WBT_STATE_OFF_DEFAULT)
RQWB(rqos)->enable_state = WBT_STATE_ON_DEFAULT;
return;
}
/* Queue not registered? Maybe shutting down... */
if (!blk_queue_registered(q))
@ -764,7 +769,7 @@ void wbt_disable_default(struct request_queue *q)
rwb = RQWB(rqos);
if (rwb->enable_state == WBT_STATE_ON_DEFAULT) {
blk_stat_deactivate(rwb->cb);
rwb->wb_normal = 0;
rwb->enable_state = WBT_STATE_OFF_DEFAULT;
}
}
EXPORT_SYMBOL_GPL(wbt_disable_default);

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