Merge 5.10.52 into android12-5.10-lts
Changes in 5.10.52 certs: add 'x509_revocation_list' to gitignore cifs: handle reconnect of tcon when there is no cached dfs referral KVM: mmio: Fix use-after-free Read in kvm_vm_ioctl_unregister_coalesced_mmio KVM: x86: Use guest MAXPHYADDR from CPUID.0x8000_0008 iff TDP is enabled KVM: x86/mmu: Do not apply HPA (memory encryption) mask to GPAs KVM: nSVM: Check the value written to MSR_VM_HSAVE_PA KVM: X86: Disable hardware breakpoints unconditionally before kvm_x86->run() scsi: core: Fix bad pointer dereference when ehandler kthread is invalid scsi: zfcp: Report port fc_security as unknown early during remote cable pull tracing: Do not reference char * as a string in histograms drm/i915/gtt: drop the page table optimisation drm/i915/gt: Fix -EDEADLK handling regression cgroup: verify that source is a string fbmem: Do not delete the mode that is still in use drm/dp_mst: Do not set proposed vcpi directly drm/dp_mst: Avoid to mess up payload table by ports in stale topology drm/dp_mst: Add missing drm parameters to recently added call to drm_dbg_kms() drm/ingenic: Fix non-OSD mode drm/ingenic: Switch IPU plane to type OVERLAY Revert "drm/ast: Remove reference to struct drm_device.pdev" net: bridge: multicast: fix PIM hello router port marking race net: bridge: multicast: fix MRD advertisement router port marking race leds: tlc591xx: fix return value check in tlc591xx_probe() ASoC: Intel: sof_sdw: add mutual exclusion between PCH DMIC and RT715 dmaengine: fsl-qdma: check dma_set_mask return value scsi: arcmsr: Fix the wrong CDB payload report to IOP srcu: Fix broken node geometry after early ssp init rcu: Reject RCU_LOCKDEP_WARN() false positives tty: serial: fsl_lpuart: fix the potential risk of division or modulo by zero serial: fsl_lpuart: disable DMA for console and fix sysrq misc/libmasm/module: Fix two use after free in ibmasm_init_one misc: alcor_pci: fix null-ptr-deref when there is no PCI bridge ASoC: intel/boards: add missing MODULE_DEVICE_TABLE partitions: msdos: fix one-byte get_unaligned() iio: gyro: fxa21002c: Balance runtime pm + use pm_runtime_resume_and_get(). iio: magn: bmc150: Balance runtime pm + use pm_runtime_resume_and_get() ALSA: usx2y: Avoid camelCase ALSA: usx2y: Don't call free_pages_exact() with NULL address Revert "ALSA: bebob/oxfw: fix Kconfig entry for Mackie d.2 Pro" usb: common: usb-conn-gpio: fix NULL pointer dereference of charger w1: ds2438: fixing bug that would always get page0 scsi: arcmsr: Fix doorbell status being updated late on ARC-1886 scsi: hisi_sas: Propagate errors in interrupt_init_v1_hw() scsi: lpfc: Fix "Unexpected timeout" error in direct attach topology scsi: lpfc: Fix crash when lpfc_sli4_hba_setup() fails to initialize the SGLs scsi: core: Cap scsi_host cmd_per_lun at can_queue ALSA: ac97: fix PM reference leak in ac97_bus_remove() tty: serial: 8250: serial_cs: Fix a memory leak in error handling path scsi: mpt3sas: Fix deadlock while cancelling the running firmware event scsi: core: Fixup calling convention for scsi_mode_sense() scsi: scsi_dh_alua: Check for negative result value fs/jfs: Fix missing error code in lmLogInit() scsi: megaraid_sas: Fix resource leak in case of probe failure scsi: megaraid_sas: Early detection of VD deletion through RaidMap update scsi: megaraid_sas: Handle missing interrupts while re-enabling IRQs scsi: iscsi: Add iscsi_cls_conn refcount helpers scsi: iscsi: Fix conn use after free during resets scsi: iscsi: Fix shost->max_id use scsi: qedi: Fix null ref during abort handling scsi: qedi: Fix race during abort timeouts scsi: qedi: Fix TMF session block/unblock use scsi: qedi: Fix cleanup session block/unblock use mfd: da9052/stmpe: Add and modify MODULE_DEVICE_TABLE mfd: cpcap: Fix cpcap dmamask not set warnings ASoC: img: Fix PM reference leak in img_i2s_in_probe() fsi: Add missing MODULE_DEVICE_TABLE serial: tty: uartlite: fix console setup s390/sclp_vt220: fix console name to match device s390: disable SSP when needed selftests: timers: rtcpie: skip test if default RTC device does not exist ALSA: sb: Fix potential double-free of CSP mixer elements powerpc/ps3: Add dma_mask to ps3_dma_region iommu/arm-smmu: Fix arm_smmu_device refcount leak when arm_smmu_rpm_get fails iommu/arm-smmu: Fix arm_smmu_device refcount leak in address translation ASoC: soc-pcm: fix the return value in dpcm_apply_symmetry() gpio: zynq: Check return value of pm_runtime_get_sync gpio: zynq: Check return value of irq_get_irq_data scsi: storvsc: Correctly handle multiple flags in srb_status ALSA: ppc: fix error return code in snd_pmac_probe() selftests/powerpc: Fix "no_handler" EBB selftest gpio: pca953x: Add support for the On Semi pca9655 powerpc/mm/book3s64: Fix possible build error ASoC: soc-core: Fix the error return code in snd_soc_of_parse_audio_routing() habanalabs/gaudi: set the correct cpu_id on MME2_QM failure habanalabs: remove node from list before freeing the node s390/processor: always inline stap() and __load_psw_mask() s390/ipl_parm: fix program check new psw handling s390/mem_detect: fix diag260() program check new psw handling s390/mem_detect: fix tprot() program check new psw handling Input: hideep - fix the uninitialized use in hideep_nvm_unlock() ALSA: bebob: add support for ToneWeal FW66 ALSA: usb-audio: scarlett2: Fix 18i8 Gen 2 PCM Input count ALSA: usb-audio: scarlett2: Fix data_mutex lock ALSA: usb-audio: scarlett2: Fix scarlett2_*_ctl_put() return values usb: gadget: f_hid: fix endianness issue with descriptors usb: gadget: hid: fix error return code in hid_bind() powerpc/boot: Fixup device-tree on little endian ASoC: Intel: kbl_da7219_max98357a: shrink platform_id below 20 characters backlight: lm3630a: Fix return code of .update_status() callback ALSA: hda: Add IRQ check for platform_get_irq() ALSA: usb-audio: scarlett2: Fix 6i6 Gen 2 line out descriptions ALSA: firewire-motu: fix detection for S/PDIF source on optical interface in v2 protocol leds: turris-omnia: add missing MODULE_DEVICE_TABLE staging: rtl8723bs: fix macro value for 2.4Ghz only device intel_th: Wait until port is in reset before programming it i2c: core: Disable client irq on reboot/shutdown phy: intel: Fix for warnings due to EMMC clock 175Mhz change in FIP lib/decompress_unlz4.c: correctly handle zero-padding around initrds. kcov: add __no_sanitize_coverage to fix noinstr for all architectures power: supply: sc27xx: Add missing MODULE_DEVICE_TABLE power: supply: sc2731_charger: Add missing MODULE_DEVICE_TABLE pwm: spear: Don't modify HW state in .remove callback PCI: ftpci100: Rename macro name collision power: supply: ab8500: Avoid NULL pointers PCI: hv: Fix a race condition when removing the device power: supply: max17042: Do not enforce (incorrect) interrupt trigger type power: reset: gpio-poweroff: add missing MODULE_DEVICE_TABLE ARM: 9087/1: kprobes: test-thumb: fix for LLVM_IAS=1 PCI/P2PDMA: Avoid pci_get_slot(), which may sleep NFSv4: Fix delegation return in cases where we have to retry PCI: pciehp: Ignore Link Down/Up caused by DPC watchdog: Fix possible use-after-free in wdt_startup() watchdog: sc520_wdt: Fix possible use-after-free in wdt_turnoff() watchdog: Fix possible use-after-free by calling del_timer_sync() watchdog: imx_sc_wdt: fix pretimeout watchdog: iTCO_wdt: Account for rebooting on second timeout x86/fpu: Return proper error codes from user access functions remoteproc: core: Fix cdev remove and rproc del PCI: tegra: Add missing MODULE_DEVICE_TABLE orangefs: fix orangefs df output. ceph: remove bogus checks and WARN_ONs from ceph_set_page_dirty drm/gma500: Add the missed drm_gem_object_put() in psb_user_framebuffer_create() NFS: nfs_find_open_context() may only select open files power: supply: charger-manager: add missing MODULE_DEVICE_TABLE power: supply: ab8500: add missing MODULE_DEVICE_TABLE drm/amdkfd: fix sysfs kobj leak pwm: img: Fix PM reference leak in img_pwm_enable() pwm: tegra: Don't modify HW state in .remove callback ACPI: AMBA: Fix resource name in /proc/iomem ACPI: video: Add quirk for the Dell Vostro 3350 PCI: rockchip: Register IRQ handlers after device and data are ready virtio-blk: Fix memory leak among suspend/resume procedure virtio_net: Fix error handling in virtnet_restore() virtio_console: Assure used length from device is limited f2fs: atgc: fix to set default age threshold NFSD: Fix TP_printk() format specifier in nfsd_clid_class x86/signal: Detect and prevent an alternate signal stack overflow f2fs: add MODULE_SOFTDEP to ensure crc32 is included in the initramfs f2fs: compress: fix to disallow temp extension remoteproc: k3-r5: Fix an error message PCI/sysfs: Fix dsm_label_utf16s_to_utf8s() buffer overrun power: supply: rt5033_battery: Fix device tree enumeration NFSv4: Initialise connection to the server in nfs4_alloc_client() NFSv4: Fix an Oops in pnfs_mark_request_commit() when doing O_DIRECT misc: alcor_pci: fix inverted branch condition um: fix error return code in slip_open() um: fix error return code in winch_tramp() ubifs: Fix off-by-one error ubifs: journal: Fix error return code in ubifs_jnl_write_inode() watchdog: aspeed: fix hardware timeout calculation watchdog: jz4740: Fix return value check in jz4740_wdt_probe() SUNRPC: prevent port reuse on transports which don't request it. nfs: fix acl memory leak of posix_acl_create() ubifs: Set/Clear I_LINKABLE under i_lock for whiteout inode PCI: iproc: Fix multi-MSI base vector number allocation PCI: iproc: Support multi-MSI only on uniprocessor kernel f2fs: fix to avoid adding tab before doc section x86/fpu: Fix copy_xstate_to_kernel() gap handling x86/fpu: Limit xstate copy size in xstateregs_set() PCI: intel-gw: Fix INTx enable pwm: imx1: Don't disable clocks at device remove time PCI: tegra194: Fix tegra_pcie_ep_raise_msi_irq() ill-defined shift vdpa/mlx5: Fix umem sizes assignments on VQ create vdpa/mlx5: Fix possible failure in umem size calculation virtio_net: move tx vq operation under tx queue lock nvme-tcp: can't set sk_user_data without write_lock nfsd: Reduce contention for the nfsd_file nf_rwsem ALSA: isa: Fix error return code in snd_cmi8330_probe() vdpa/mlx5: Clear vq ready indication upon device reset NFSv4/pnfs: Fix the layout barrier update NFSv4/pnfs: Fix layoutget behaviour after invalidation NFSv4/pNFS: Don't call _nfs4_pnfs_v3_ds_connect multiple times hexagon: handle {,SOFT}IRQENTRY_TEXT in linker script hexagon: use common DISCARDS macro ARM: dts: gemini-rut1xx: remove duplicate ethernet node reset: RESET_BRCMSTB_RESCAL should depend on ARCH_BRCMSTB reset: RESET_INTEL_GW should depend on X86 reset: a10sr: add missing of_match_table reference ARM: exynos: add missing of_node_put for loop iteration ARM: dts: exynos: fix PWM LED max brightness on Odroid XU/XU3 ARM: dts: exynos: fix PWM LED max brightness on Odroid HC1 ARM: dts: exynos: fix PWM LED max brightness on Odroid XU4 memory: stm32-fmc2-ebi: add missing of_node_put for loop iteration memory: atmel-ebi: add missing of_node_put for loop iteration reset: brcmstb: Add missing MODULE_DEVICE_TABLE memory: pl353: Fix error return code in pl353_smc_probe() ARM: dts: sun8i: h3: orangepi-plus: Fix ethernet phy-mode rtc: fix snprintf() checking in is_rtc_hctosys() arm64: dts: renesas: v3msk: Fix memory size ARM: dts: r8a7779, marzen: Fix DU clock names arm64: dts: ti: j7200-main: Enable USB2 PHY RX sensitivity workaround arm64: dts: renesas: Add missing opp-suspend properties arm64: dts: renesas: r8a7796[01]: Fix OPP table entry voltages ARM: dts: stm32: Connect PHY IRQ line on DH STM32MP1 SoM ARM: dts: stm32: Rework LAN8710Ai PHY reset on DHCOM SoM arm64: dts: qcom: trogdor: Add no-hpd to DSI bridge node firmware: tegra: Fix error return code in tegra210_bpmp_init() firmware: arm_scmi: Reset Rx buffer to max size during async commands dt-bindings: i2c: at91: fix example for scl-gpios ARM: dts: BCM5301X: Fixup SPI binding reset: bail if try_module_get() fails arm64: dts: renesas: r8a779a0: Drop power-domains property from GIC node arm64: dts: ti: k3-j721e-main: Fix external refclk input to SERDES memory: fsl_ifc: fix leak of IO mapping on probe failure memory: fsl_ifc: fix leak of private memory on probe failure arm64: dts: allwinner: a64-sopine-baseboard: change RGMII mode to TXID ARM: dts: dra7: Fix duplicate USB4 target module node ARM: dts: am335x: align ti,pindir-d0-out-d1-in property with dt-shema ARM: dts: am437x: align ti,pindir-d0-out-d1-in property with dt-shema thermal/drivers/sprd: Add missing MODULE_DEVICE_TABLE ARM: dts: imx6q-dhcom: Fix ethernet reset time properties ARM: dts: imx6q-dhcom: Fix ethernet plugin detection problems ARM: dts: imx6q-dhcom: Add gpios pinctrl for i2c bus recovery thermal/drivers/rcar_gen3_thermal: Fix coefficient calculations firmware: turris-mox-rwtm: fix reply status decoding function firmware: turris-mox-rwtm: report failures better firmware: turris-mox-rwtm: fail probing when firmware does not support hwrng firmware: turris-mox-rwtm: show message about HWRNG registration arm64: dts: rockchip: Re-add regulator-boot-on, regulator-always-on for vdd_gpu on rk3399-roc-pc arm64: dts: rockchip: Re-add regulator-always-on for vcc_sdio for rk3399-roc-pc scsi: be2iscsi: Fix an error handling path in beiscsi_dev_probe() sched/uclamp: Ignore max aggregation if rq is idle jump_label: Fix jump_label_text_reserved() vs __init static_call: Fix static_call_text_reserved() vs __init mips: always link byteswap helpers into decompressor mips: disable branch profiling in boot/decompress.o MIPS: vdso: Invalid GIC access through VDSO scsi: scsi_dh_alua: Fix signedness bug in alua_rtpg() seq_file: disallow extremely large seq buffer allocations Linux 5.10.52 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Ic1b04661728db8b0e060ca6935783e15a22210da
This commit is contained in:
@@ -73,7 +73,7 @@ i2c0: i2c@f8034600 {
|
||||
pinctrl-0 = <&pinctrl_i2c0>;
|
||||
pinctrl-1 = <&pinctrl_i2c0_gpio>;
|
||||
sda-gpios = <&pioA 30 GPIO_ACTIVE_HIGH>;
|
||||
scl-gpios = <&pioA 31 GPIO_ACTIVE_HIGH>;
|
||||
scl-gpios = <&pioA 31 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
|
||||
|
||||
wm8731: wm8731@1a {
|
||||
compatible = "wm8731";
|
||||
|
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 10
|
||||
SUBLEVEL = 51
|
||||
SUBLEVEL = 52
|
||||
EXTRAVERSION =
|
||||
NAME = Dare mighty things
|
||||
|
||||
|
@@ -496,7 +496,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";
|
||||
|
@@ -860,7 +860,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 {
|
||||
@@ -868,7 +868,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 {
|
||||
|
@@ -17,17 +17,13 @@
|
||||
* VCP1, VCP2
|
||||
* MLB
|
||||
* ISS
|
||||
* USB3, USB4
|
||||
* USB3
|
||||
*/
|
||||
|
||||
&usb3_tm {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&usb4_tm {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&atl_tm {
|
||||
status = "disabled";
|
||||
};
|
||||
|
@@ -515,27 +515,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>;
|
||||
|
@@ -4095,28 +4095,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
usb4_tm: target-module@140000 { /* 0x48940000, ap 75 3c.0 */
|
||||
compatible = "ti,sysc-omap4", "ti,sysc";
|
||||
reg = <0x140000 0x4>,
|
||||
<0x140010 0x4>;
|
||||
reg-names = "rev", "sysc";
|
||||
ti,sysc-mask = <SYSC_OMAP4_DMADISABLE>;
|
||||
ti,sysc-midle = <SYSC_IDLE_FORCE>,
|
||||
<SYSC_IDLE_NO>,
|
||||
<SYSC_IDLE_SMART>,
|
||||
<SYSC_IDLE_SMART_WKUP>;
|
||||
ti,sysc-sidle = <SYSC_IDLE_FORCE>,
|
||||
<SYSC_IDLE_NO>,
|
||||
<SYSC_IDLE_SMART>,
|
||||
<SYSC_IDLE_SMART_WKUP>;
|
||||
/* Domains (P, C): l3init_pwrdm, l3init_clkdm */
|
||||
clocks = <&l3init_clkctrl DRA7_L3INIT_USB_OTG_SS4_CLKCTRL 0>;
|
||||
clock-names = "fck";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0x0 0x140000 0x20000>;
|
||||
};
|
||||
|
||||
target-module@170000 { /* 0x48970000, ap 21 0a.0 */
|
||||
compatible = "ti,sysc-omap4", "ti,sysc";
|
||||
reg = <0x170010 0x4>;
|
||||
|
@@ -11,7 +11,3 @@
|
||||
&rtctarget {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&usb4_tm {
|
||||
status = "disabled";
|
||||
};
|
||||
|
@@ -108,7 +108,3 @@
|
||||
&pcie2_rc {
|
||||
compatible = "ti,dra726-pcie-rc", "ti,dra7-pcie";
|
||||
};
|
||||
|
||||
&usb4_tm {
|
||||
status = "disabled";
|
||||
};
|
||||
|
@@ -49,49 +49,6 @@
|
||||
reg = <0x41500000 0x100>;
|
||||
};
|
||||
|
||||
target-module@48940000 {
|
||||
compatible = "ti,sysc-omap4", "ti,sysc";
|
||||
reg = <0x48940000 0x4>,
|
||||
<0x48940010 0x4>;
|
||||
reg-names = "rev", "sysc";
|
||||
ti,sysc-mask = <SYSC_OMAP4_DMADISABLE>;
|
||||
ti,sysc-midle = <SYSC_IDLE_FORCE>,
|
||||
<SYSC_IDLE_NO>,
|
||||
<SYSC_IDLE_SMART>,
|
||||
<SYSC_IDLE_SMART_WKUP>;
|
||||
ti,sysc-sidle = <SYSC_IDLE_FORCE>,
|
||||
<SYSC_IDLE_NO>,
|
||||
<SYSC_IDLE_SMART>,
|
||||
<SYSC_IDLE_SMART_WKUP>;
|
||||
clocks = <&l3init_clkctrl DRA7_L3INIT_USB_OTG_SS4_CLKCTRL 0>;
|
||||
clock-names = "fck";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0x0 0x48940000 0x20000>;
|
||||
|
||||
omap_dwc3_4: omap_dwc3_4@0 {
|
||||
compatible = "ti,dwc3";
|
||||
reg = <0 0x10000>;
|
||||
interrupts = <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
utmi-mode = <2>;
|
||||
ranges;
|
||||
status = "disabled";
|
||||
usb4: usb@10000 {
|
||||
compatible = "snps,dwc3";
|
||||
reg = <0x10000 0x17000>;
|
||||
interrupts = <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "peripheral",
|
||||
"host",
|
||||
"otg";
|
||||
maximum-speed = "high-speed";
|
||||
dr_mode = "otg";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
target-module@41501000 {
|
||||
compatible = "ti,sysc-omap2", "ti,sysc";
|
||||
@@ -224,3 +181,52 @@
|
||||
&pcie2_rc {
|
||||
compatible = "ti,dra746-pcie-rc", "ti,dra7-pcie";
|
||||
};
|
||||
|
||||
&l4_per3 {
|
||||
segment@0 {
|
||||
usb4_tm: target-module@140000 { /* 0x48940000, ap 75 3c.0 */
|
||||
compatible = "ti,sysc-omap4", "ti,sysc";
|
||||
reg = <0x140000 0x4>,
|
||||
<0x140010 0x4>;
|
||||
reg-names = "rev", "sysc";
|
||||
ti,sysc-mask = <SYSC_OMAP4_DMADISABLE>;
|
||||
ti,sysc-midle = <SYSC_IDLE_FORCE>,
|
||||
<SYSC_IDLE_NO>,
|
||||
<SYSC_IDLE_SMART>,
|
||||
<SYSC_IDLE_SMART_WKUP>;
|
||||
ti,sysc-sidle = <SYSC_IDLE_FORCE>,
|
||||
<SYSC_IDLE_NO>,
|
||||
<SYSC_IDLE_SMART>,
|
||||
<SYSC_IDLE_SMART_WKUP>;
|
||||
/* Domains (P, C): l3init_pwrdm, l3init_clkdm */
|
||||
clocks = <&l3init_clkctrl DRA7_L3INIT_USB_OTG_SS4_CLKCTRL 0>;
|
||||
clock-names = "fck";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0x0 0x140000 0x20000>;
|
||||
|
||||
omap_dwc3_4: omap_dwc3_4@0 {
|
||||
compatible = "ti,dwc3";
|
||||
reg = <0 0x10000>;
|
||||
interrupts = <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
utmi-mode = <2>;
|
||||
ranges;
|
||||
status = "disabled";
|
||||
usb4: usb@10000 {
|
||||
compatible = "snps,dwc3";
|
||||
reg = <0x10000 0x17000>;
|
||||
interrupts = <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "peripheral",
|
||||
"host",
|
||||
"otg";
|
||||
maximum-speed = "high-speed";
|
||||
dr_mode = "otg";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@@ -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";
|
||||
};
|
||||
};
|
||||
|
@@ -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";
|
||||
};
|
||||
};
|
||||
|
@@ -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";
|
||||
};
|
||||
};
|
||||
|
@@ -125,18 +125,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
ethernet@60000000 {
|
||||
status = "okay";
|
||||
|
||||
ethernet-port@0 {
|
||||
phy-mode = "rgmii";
|
||||
phy-handle = <&phy0>;
|
||||
};
|
||||
ethernet-port@1 {
|
||||
/* Not used in this platform */
|
||||
};
|
||||
};
|
||||
|
||||
usb@68000000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
@@ -96,30 +96,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 {
|
||||
@@ -285,6 +295,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
|
||||
@@ -292,6 +309,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
|
||||
@@ -299,6 +323,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
|
||||
|
@@ -145,7 +145,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 {
|
||||
|
@@ -463,6 +463,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";
|
||||
|
||||
|
@@ -118,7 +118,6 @@
|
||||
max-speed = <100>;
|
||||
phy-handle = <&phy0>;
|
||||
st,eth-ref-clk-sel;
|
||||
phy-reset-gpios = <&gpioh 3 GPIO_ACTIVE_LOW>;
|
||||
|
||||
mdio0 {
|
||||
#address-cells = <1>;
|
||||
@@ -127,6 +126,15 @@
|
||||
|
||||
phy0: ethernet-phy@1 {
|
||||
reg = <1>;
|
||||
/* LAN8710Ai */
|
||||
compatible = "ethernet-phy-id0007.c0f0",
|
||||
"ethernet-phy-ieee802.3-c22";
|
||||
clocks = <&rcc ETHCK_K>;
|
||||
reset-gpios = <&gpioh 3 GPIO_ACTIVE_LOW>;
|
||||
reset-assert-us = <500>;
|
||||
reset-deassert-us = <500>;
|
||||
interrupt-parent = <&gpioi>;
|
||||
interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@@ -85,7 +85,7 @@
|
||||
pinctrl-0 = <&emac_rgmii_pins>;
|
||||
phy-supply = <®_gmac_3v3>;
|
||||
phy-handle = <&ext_rgmii_phy>;
|
||||
phy-mode = "rgmii";
|
||||
phy-mode = "rgmii-id";
|
||||
|
||||
status = "okay";
|
||||
};
|
||||
|
@@ -55,6 +55,7 @@ void __init exynos_sysram_init(void)
|
||||
sysram_base_addr = of_iomap(node, 0);
|
||||
sysram_base_phys = of_translate_address(node,
|
||||
of_get_address(node, 0, NULL, NULL));
|
||||
of_node_put(node);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -62,6 +63,7 @@ void __init exynos_sysram_init(void)
|
||||
if (!of_device_is_available(node))
|
||||
continue;
|
||||
sysram_ns_base_addr = of_iomap(node, 0);
|
||||
of_node_put(node);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -441,21 +441,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"
|
||||
@@ -468,10 +468,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)")
|
||||
|
||||
|
@@ -79,7 +79,7 @@
|
||||
&emac {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii_pins>;
|
||||
phy-mode = "rgmii-id";
|
||||
phy-mode = "rgmii-txid";
|
||||
phy-handle = <&ext_rgmii_phy>;
|
||||
phy-supply = <®_dc1sw>;
|
||||
status = "okay";
|
||||
|
@@ -622,6 +622,8 @@ edp_brij_i2c: &i2c2 {
|
||||
clocks = <&rpmhcc RPMH_LN_BB_CLK3>;
|
||||
clock-names = "refclk";
|
||||
|
||||
no-hpd;
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
@@ -76,6 +76,7 @@
|
||||
opp-hz = /bits/ 64 <1500000000>;
|
||||
opp-microvolt = <820000>;
|
||||
clock-latency-ns = <300000>;
|
||||
opp-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
|
@@ -63,18 +63,19 @@
|
||||
|
||||
opp-500000000 {
|
||||
opp-hz = /bits/ 64 <500000000>;
|
||||
opp-microvolt = <820000>;
|
||||
opp-microvolt = <830000>;
|
||||
clock-latency-ns = <300000>;
|
||||
};
|
||||
opp-1000000000 {
|
||||
opp-hz = /bits/ 64 <1000000000>;
|
||||
opp-microvolt = <820000>;
|
||||
opp-microvolt = <830000>;
|
||||
clock-latency-ns = <300000>;
|
||||
};
|
||||
opp-1500000000 {
|
||||
opp-hz = /bits/ 64 <1500000000>;
|
||||
opp-microvolt = <820000>;
|
||||
opp-microvolt = <830000>;
|
||||
clock-latency-ns = <300000>;
|
||||
opp-suspend;
|
||||
};
|
||||
opp-1600000000 {
|
||||
opp-hz = /bits/ 64 <1600000000>;
|
||||
|
@@ -52,18 +52,19 @@
|
||||
|
||||
opp-500000000 {
|
||||
opp-hz = /bits/ 64 <500000000>;
|
||||
opp-microvolt = <820000>;
|
||||
opp-microvolt = <830000>;
|
||||
clock-latency-ns = <300000>;
|
||||
};
|
||||
opp-1000000000 {
|
||||
opp-hz = /bits/ 64 <1000000000>;
|
||||
opp-microvolt = <820000>;
|
||||
opp-microvolt = <830000>;
|
||||
clock-latency-ns = <300000>;
|
||||
};
|
||||
opp-1500000000 {
|
||||
opp-hz = /bits/ 64 <1500000000>;
|
||||
opp-microvolt = <820000>;
|
||||
opp-microvolt = <830000>;
|
||||
clock-latency-ns = <300000>;
|
||||
opp-suspend;
|
||||
};
|
||||
opp-1600000000 {
|
||||
opp-hz = /bits/ 64 <1600000000>;
|
||||
|
@@ -59,7 +59,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 {
|
||||
|
@@ -111,7 +111,6 @@
|
||||
<0x0 0xf1060000 0 0x110000>;
|
||||
interrupts = <GIC_PPI 9
|
||||
(GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_HIGH)>;
|
||||
power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>;
|
||||
};
|
||||
|
||||
prr: chipid@fff00044 {
|
||||
|
@@ -384,6 +384,7 @@
|
||||
|
||||
vcc_sdio: LDO_REG4 {
|
||||
regulator-name = "vcc_sdio";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <3000000>;
|
||||
@@ -488,6 +489,8 @@
|
||||
regulator-min-microvolt = <712500>;
|
||||
regulator-max-microvolt = <1500000>;
|
||||
regulator-ramp-delay = <1000>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
vin-supply = <&vcc3v3_sys>;
|
||||
|
||||
regulator-state-mem {
|
||||
|
@@ -446,6 +446,7 @@
|
||||
"otg";
|
||||
maximum-speed = "super-speed";
|
||||
dr_mode = "otg";
|
||||
cdns,phyrst-a-enable;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@@ -560,6 +560,10 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&cmn_refclk1 {
|
||||
clock-frequency = <100000000>;
|
||||
};
|
||||
|
||||
&serdes0 {
|
||||
serdes0_pcie_link: link@0 {
|
||||
reg = <0>;
|
||||
|
@@ -8,6 +8,20 @@
|
||||
#include <dt-bindings/mux/mux.h>
|
||||
#include <dt-bindings/mux/ti-serdes.h>
|
||||
|
||||
/ {
|
||||
cmn_refclk: clock-cmnrefclk {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <0>;
|
||||
};
|
||||
|
||||
cmn_refclk1: clock-cmnrefclk1 {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
&cbass_main {
|
||||
msmc_ram: sram@70000000 {
|
||||
compatible = "mmio-sram";
|
||||
@@ -369,24 +383,12 @@
|
||||
pinctrl-single,function-mask = <0xffffffff>;
|
||||
};
|
||||
|
||||
dummy_cmn_refclk: dummy-cmn-refclk {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <100000000>;
|
||||
};
|
||||
|
||||
dummy_cmn_refclk1: dummy-cmn-refclk1 {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <100000000>;
|
||||
};
|
||||
|
||||
serdes_wiz0: wiz@5000000 {
|
||||
compatible = "ti,j721e-wiz-16g";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
power-domains = <&k3_pds 292 TI_SCI_PD_EXCLUSIVE>;
|
||||
clocks = <&k3_clks 292 5>, <&k3_clks 292 11>, <&dummy_cmn_refclk>;
|
||||
clocks = <&k3_clks 292 5>, <&k3_clks 292 11>, <&cmn_refclk>;
|
||||
clock-names = "fck", "core_ref_clk", "ext_ref_clk";
|
||||
assigned-clocks = <&k3_clks 292 11>, <&k3_clks 292 0>;
|
||||
assigned-clock-parents = <&k3_clks 292 15>, <&k3_clks 292 4>;
|
||||
@@ -395,21 +397,21 @@
|
||||
ranges = <0x5000000 0x0 0x5000000 0x10000>;
|
||||
|
||||
wiz0_pll0_refclk: pll0-refclk {
|
||||
clocks = <&k3_clks 292 11>, <&dummy_cmn_refclk>;
|
||||
clocks = <&k3_clks 292 11>, <&cmn_refclk>;
|
||||
#clock-cells = <0>;
|
||||
assigned-clocks = <&wiz0_pll0_refclk>;
|
||||
assigned-clock-parents = <&k3_clks 292 11>;
|
||||
};
|
||||
|
||||
wiz0_pll1_refclk: pll1-refclk {
|
||||
clocks = <&k3_clks 292 0>, <&dummy_cmn_refclk1>;
|
||||
clocks = <&k3_clks 292 0>, <&cmn_refclk1>;
|
||||
#clock-cells = <0>;
|
||||
assigned-clocks = <&wiz0_pll1_refclk>;
|
||||
assigned-clock-parents = <&k3_clks 292 0>;
|
||||
};
|
||||
|
||||
wiz0_refclk_dig: refclk-dig {
|
||||
clocks = <&k3_clks 292 11>, <&k3_clks 292 0>, <&dummy_cmn_refclk>, <&dummy_cmn_refclk1>;
|
||||
clocks = <&k3_clks 292 11>, <&k3_clks 292 0>, <&cmn_refclk>, <&cmn_refclk1>;
|
||||
#clock-cells = <0>;
|
||||
assigned-clocks = <&wiz0_refclk_dig>;
|
||||
assigned-clock-parents = <&k3_clks 292 11>;
|
||||
@@ -443,7 +445,7 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
power-domains = <&k3_pds 293 TI_SCI_PD_EXCLUSIVE>;
|
||||
clocks = <&k3_clks 293 5>, <&k3_clks 293 13>, <&dummy_cmn_refclk>;
|
||||
clocks = <&k3_clks 293 5>, <&k3_clks 293 13>, <&cmn_refclk>;
|
||||
clock-names = "fck", "core_ref_clk", "ext_ref_clk";
|
||||
assigned-clocks = <&k3_clks 293 13>, <&k3_clks 293 0>;
|
||||
assigned-clock-parents = <&k3_clks 293 17>, <&k3_clks 293 4>;
|
||||
@@ -452,21 +454,21 @@
|
||||
ranges = <0x5010000 0x0 0x5010000 0x10000>;
|
||||
|
||||
wiz1_pll0_refclk: pll0-refclk {
|
||||
clocks = <&k3_clks 293 13>, <&dummy_cmn_refclk>;
|
||||
clocks = <&k3_clks 293 13>, <&cmn_refclk>;
|
||||
#clock-cells = <0>;
|
||||
assigned-clocks = <&wiz1_pll0_refclk>;
|
||||
assigned-clock-parents = <&k3_clks 293 13>;
|
||||
};
|
||||
|
||||
wiz1_pll1_refclk: pll1-refclk {
|
||||
clocks = <&k3_clks 293 0>, <&dummy_cmn_refclk1>;
|
||||
clocks = <&k3_clks 293 0>, <&cmn_refclk1>;
|
||||
#clock-cells = <0>;
|
||||
assigned-clocks = <&wiz1_pll1_refclk>;
|
||||
assigned-clock-parents = <&k3_clks 293 0>;
|
||||
};
|
||||
|
||||
wiz1_refclk_dig: refclk-dig {
|
||||
clocks = <&k3_clks 293 13>, <&k3_clks 293 0>, <&dummy_cmn_refclk>, <&dummy_cmn_refclk1>;
|
||||
clocks = <&k3_clks 293 13>, <&k3_clks 293 0>, <&cmn_refclk>, <&cmn_refclk1>;
|
||||
#clock-cells = <0>;
|
||||
assigned-clocks = <&wiz1_refclk_dig>;
|
||||
assigned-clock-parents = <&k3_clks 293 13>;
|
||||
@@ -500,7 +502,7 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
power-domains = <&k3_pds 294 TI_SCI_PD_EXCLUSIVE>;
|
||||
clocks = <&k3_clks 294 5>, <&k3_clks 294 11>, <&dummy_cmn_refclk>;
|
||||
clocks = <&k3_clks 294 5>, <&k3_clks 294 11>, <&cmn_refclk>;
|
||||
clock-names = "fck", "core_ref_clk", "ext_ref_clk";
|
||||
assigned-clocks = <&k3_clks 294 11>, <&k3_clks 294 0>;
|
||||
assigned-clock-parents = <&k3_clks 294 15>, <&k3_clks 294 4>;
|
||||
@@ -509,21 +511,21 @@
|
||||
ranges = <0x5020000 0x0 0x5020000 0x10000>;
|
||||
|
||||
wiz2_pll0_refclk: pll0-refclk {
|
||||
clocks = <&k3_clks 294 11>, <&dummy_cmn_refclk>;
|
||||
clocks = <&k3_clks 294 11>, <&cmn_refclk>;
|
||||
#clock-cells = <0>;
|
||||
assigned-clocks = <&wiz2_pll0_refclk>;
|
||||
assigned-clock-parents = <&k3_clks 294 11>;
|
||||
};
|
||||
|
||||
wiz2_pll1_refclk: pll1-refclk {
|
||||
clocks = <&k3_clks 294 0>, <&dummy_cmn_refclk1>;
|
||||
clocks = <&k3_clks 294 0>, <&cmn_refclk1>;
|
||||
#clock-cells = <0>;
|
||||
assigned-clocks = <&wiz2_pll1_refclk>;
|
||||
assigned-clock-parents = <&k3_clks 294 0>;
|
||||
};
|
||||
|
||||
wiz2_refclk_dig: refclk-dig {
|
||||
clocks = <&k3_clks 294 11>, <&k3_clks 294 0>, <&dummy_cmn_refclk>, <&dummy_cmn_refclk1>;
|
||||
clocks = <&k3_clks 294 11>, <&k3_clks 294 0>, <&cmn_refclk>, <&cmn_refclk1>;
|
||||
#clock-cells = <0>;
|
||||
assigned-clocks = <&wiz2_refclk_dig>;
|
||||
assigned-clock-parents = <&k3_clks 294 11>;
|
||||
@@ -557,7 +559,7 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
power-domains = <&k3_pds 295 TI_SCI_PD_EXCLUSIVE>;
|
||||
clocks = <&k3_clks 295 5>, <&k3_clks 295 9>, <&dummy_cmn_refclk>;
|
||||
clocks = <&k3_clks 295 5>, <&k3_clks 295 9>, <&cmn_refclk>;
|
||||
clock-names = "fck", "core_ref_clk", "ext_ref_clk";
|
||||
assigned-clocks = <&k3_clks 295 9>, <&k3_clks 295 0>;
|
||||
assigned-clock-parents = <&k3_clks 295 13>, <&k3_clks 295 4>;
|
||||
@@ -566,21 +568,21 @@
|
||||
ranges = <0x5030000 0x0 0x5030000 0x10000>;
|
||||
|
||||
wiz3_pll0_refclk: pll0-refclk {
|
||||
clocks = <&k3_clks 295 9>, <&dummy_cmn_refclk>;
|
||||
clocks = <&k3_clks 295 9>, <&cmn_refclk>;
|
||||
#clock-cells = <0>;
|
||||
assigned-clocks = <&wiz3_pll0_refclk>;
|
||||
assigned-clock-parents = <&k3_clks 295 9>;
|
||||
};
|
||||
|
||||
wiz3_pll1_refclk: pll1-refclk {
|
||||
clocks = <&k3_clks 295 0>, <&dummy_cmn_refclk1>;
|
||||
clocks = <&k3_clks 295 0>, <&cmn_refclk1>;
|
||||
#clock-cells = <0>;
|
||||
assigned-clocks = <&wiz3_pll1_refclk>;
|
||||
assigned-clock-parents = <&k3_clks 295 0>;
|
||||
};
|
||||
|
||||
wiz3_refclk_dig: refclk-dig {
|
||||
clocks = <&k3_clks 295 9>, <&k3_clks 295 0>, <&dummy_cmn_refclk>, <&dummy_cmn_refclk1>;
|
||||
clocks = <&k3_clks 295 9>, <&k3_clks 295 0>, <&cmn_refclk>, <&cmn_refclk1>;
|
||||
#clock-cells = <0>;
|
||||
assigned-clocks = <&wiz3_refclk_dig>;
|
||||
assigned-clock-parents = <&k3_clks 295 9>;
|
||||
|
@@ -38,6 +38,8 @@ SECTIONS
|
||||
.text : AT(ADDR(.text)) {
|
||||
_text = .;
|
||||
TEXT_TEXT
|
||||
IRQENTRY_TEXT
|
||||
SOFTIRQENTRY_TEXT
|
||||
SCHED_TEXT
|
||||
CPUIDLE_TEXT
|
||||
LOCK_TEXT
|
||||
@@ -59,14 +61,9 @@ SECTIONS
|
||||
|
||||
_end = .;
|
||||
|
||||
/DISCARD/ : {
|
||||
EXIT_TEXT
|
||||
EXIT_DATA
|
||||
EXIT_CALL
|
||||
}
|
||||
|
||||
STABS_DEBUG
|
||||
DWARF_DEBUG
|
||||
ELF_DETAILS
|
||||
|
||||
DISCARDS
|
||||
}
|
||||
|
@@ -39,7 +39,7 @@ KCOV_INSTRUMENT := n
|
||||
UBSAN_SANITIZE := 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
|
||||
@@ -53,7 +53,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
|
||||
|
@@ -7,6 +7,8 @@
|
||||
* Author: Wu Zhangjin <wuzhangjin@gmail.com>
|
||||
*/
|
||||
|
||||
#define DISABLE_BRANCH_PROFILING
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/string.h>
|
||||
|
@@ -67,7 +67,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 */
|
||||
|
@@ -13,6 +13,7 @@
|
||||
#include "string.h"
|
||||
#include "stdio.h"
|
||||
#include "ops.h"
|
||||
#include "of.h"
|
||||
|
||||
void dt_fixup_memory(u64 start, u64 size)
|
||||
{
|
||||
@@ -23,21 +24,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) {
|
||||
@@ -45,9 +50,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));
|
||||
@@ -65,10 +70,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;
|
||||
@@ -80,7 +85,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));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,8 +138,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)
|
||||
@@ -163,9 +172,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;
|
||||
@@ -180,18 +189,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;
|
||||
}
|
||||
|
||||
@@ -240,7 +249,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;
|
||||
|
||||
@@ -252,10 +260,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 (;;) {
|
||||
@@ -278,7 +286,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;
|
||||
|
||||
@@ -296,8 +303,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))
|
||||
@@ -350,11 +356,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))
|
||||
|
@@ -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 **)®_base, 1) < 1)
|
||||
if (dt_get_virtual_reg(devp, (void **)®_base, 1) < 1) {
|
||||
printf("virt reg parse fail...\r\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
n = getprop(devp, "reg-offset", ®_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", ®_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;
|
||||
|
@@ -71,6 +71,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
|
||||
@@ -85,6 +86,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;
|
||||
|
@@ -282,22 +282,30 @@ static inline void fixup_tlbie_lpid(unsigned long lpid)
|
||||
/*
|
||||
* We use 128 set in radix mode and 256 set in hpt mode.
|
||||
*/
|
||||
static __always_inline void _tlbiel_pid(unsigned long pid, unsigned long ric)
|
||||
static inline void _tlbiel_pid(unsigned long pid, unsigned long ric)
|
||||
{
|
||||
int set;
|
||||
|
||||
asm volatile("ptesync": : :"memory");
|
||||
|
||||
/*
|
||||
* Flush the first set of the TLB, and if we're doing a RIC_FLUSH_ALL,
|
||||
* also flush the entire Page Walk Cache.
|
||||
*/
|
||||
__tlbiel_pid(pid, 0, ric);
|
||||
switch (ric) {
|
||||
case RIC_FLUSH_PWC:
|
||||
|
||||
/* For PWC, only one flush is needed */
|
||||
if (ric == RIC_FLUSH_PWC) {
|
||||
/* For PWC, only one flush is needed */
|
||||
__tlbiel_pid(pid, 0, RIC_FLUSH_PWC);
|
||||
ppc_after_tlbiel_barrier();
|
||||
return;
|
||||
case RIC_FLUSH_TLB:
|
||||
__tlbiel_pid(pid, 0, RIC_FLUSH_TLB);
|
||||
break;
|
||||
case RIC_FLUSH_ALL:
|
||||
default:
|
||||
/*
|
||||
* Flush the first set of the TLB, and if
|
||||
* we're doing a RIC_FLUSH_ALL, also flush
|
||||
* the entire Page Walk Cache.
|
||||
*/
|
||||
__tlbiel_pid(pid, 0, RIC_FLUSH_ALL);
|
||||
}
|
||||
|
||||
/* For the remaining sets, just flush the TLB */
|
||||
@@ -1068,7 +1076,7 @@ void radix__tlb_flush(struct mmu_gather *tlb)
|
||||
}
|
||||
}
|
||||
|
||||
static __always_inline void __radix__flush_tlb_range_psize(struct mm_struct *mm,
|
||||
static void __radix__flush_tlb_range_psize(struct mm_struct *mm,
|
||||
unsigned long start, unsigned long end,
|
||||
int psize, bool also_pwc)
|
||||
{
|
||||
|
@@ -6,6 +6,7 @@
|
||||
* Copyright 2006 Sony Corp.
|
||||
*/
|
||||
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/memblock.h>
|
||||
@@ -1118,6 +1119,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;
|
||||
|
||||
@@ -1129,6 +1131,16 @@ int ps3_dma_region_init(struct ps3_system_bus_device *dev,
|
||||
r->offset -= map.r1.offset;
|
||||
r->len = len ? len : ALIGN(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)
|
||||
|
@@ -28,6 +28,7 @@ KBUILD_CFLAGS_DECOMPRESSOR += -DDISABLE_BRANCH_PROFILING -D__NO_FORTIFY
|
||||
KBUILD_CFLAGS_DECOMPRESSOR += -fno-delete-null-pointer-checks -msoft-float
|
||||
KBUILD_CFLAGS_DECOMPRESSOR += -fno-asynchronous-unwind-tables
|
||||
KBUILD_CFLAGS_DECOMPRESSOR += -ffreestanding
|
||||
KBUILD_CFLAGS_DECOMPRESSOR += -fno-stack-protector
|
||||
KBUILD_CFLAGS_DECOMPRESSOR += $(call cc-disable-warning, address-of-packed-member)
|
||||
KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),-g)
|
||||
KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO_DWARF4), $(call cc-option, -gdwarf-4,))
|
||||
|
@@ -28,22 +28,25 @@ static inline int __diag308(unsigned long subcode, void *addr)
|
||||
register unsigned long _addr asm("0") = (unsigned long)addr;
|
||||
register unsigned long _rc asm("1") = 0;
|
||||
unsigned long reg1, reg2;
|
||||
psw_t old = S390_lowcore.program_new_psw;
|
||||
psw_t old;
|
||||
|
||||
asm volatile(
|
||||
" mvc 0(16,%[psw_old]),0(%[psw_pgm])\n"
|
||||
" epsw %0,%1\n"
|
||||
" st %0,%[psw_pgm]\n"
|
||||
" st %1,%[psw_pgm]+4\n"
|
||||
" st %0,0(%[psw_pgm])\n"
|
||||
" st %1,4(%[psw_pgm])\n"
|
||||
" larl %0,1f\n"
|
||||
" stg %0,%[psw_pgm]+8\n"
|
||||
" stg %0,8(%[psw_pgm])\n"
|
||||
" diag %[addr],%[subcode],0x308\n"
|
||||
"1: nopr %%r7\n"
|
||||
"1: mvc 0(16,%[psw_pgm]),0(%[psw_old])\n"
|
||||
: "=&d" (reg1), "=&a" (reg2),
|
||||
[psw_pgm] "=Q" (S390_lowcore.program_new_psw),
|
||||
"+Q" (S390_lowcore.program_new_psw),
|
||||
"=Q" (old),
|
||||
[addr] "+d" (_addr), "+d" (_rc)
|
||||
: [subcode] "d" (subcode)
|
||||
: [subcode] "d" (subcode),
|
||||
[psw_old] "a" (&old),
|
||||
[psw_pgm] "a" (&S390_lowcore.program_new_psw)
|
||||
: "cc", "memory");
|
||||
S390_lowcore.program_new_psw = old;
|
||||
return _rc;
|
||||
}
|
||||
|
||||
|
@@ -70,24 +70,27 @@ static int __diag260(unsigned long rx1, unsigned long rx2)
|
||||
register unsigned long _ry asm("4") = 0x10; /* storage configuration */
|
||||
int rc = -1; /* fail */
|
||||
unsigned long reg1, reg2;
|
||||
psw_t old = S390_lowcore.program_new_psw;
|
||||
psw_t old;
|
||||
|
||||
asm volatile(
|
||||
" mvc 0(16,%[psw_old]),0(%[psw_pgm])\n"
|
||||
" epsw %0,%1\n"
|
||||
" st %0,%[psw_pgm]\n"
|
||||
" st %1,%[psw_pgm]+4\n"
|
||||
" st %0,0(%[psw_pgm])\n"
|
||||
" st %1,4(%[psw_pgm])\n"
|
||||
" larl %0,1f\n"
|
||||
" stg %0,%[psw_pgm]+8\n"
|
||||
" stg %0,8(%[psw_pgm])\n"
|
||||
" diag %[rx],%[ry],0x260\n"
|
||||
" ipm %[rc]\n"
|
||||
" srl %[rc],28\n"
|
||||
"1:\n"
|
||||
"1: mvc 0(16,%[psw_pgm]),0(%[psw_old])\n"
|
||||
: "=&d" (reg1), "=&a" (reg2),
|
||||
[psw_pgm] "=Q" (S390_lowcore.program_new_psw),
|
||||
"+Q" (S390_lowcore.program_new_psw),
|
||||
"=Q" (old),
|
||||
[rc] "+&d" (rc), [ry] "+d" (_ry)
|
||||
: [rx] "d" (_rx1), "d" (_rx2)
|
||||
: [rx] "d" (_rx1), "d" (_rx2),
|
||||
[psw_old] "a" (&old),
|
||||
[psw_pgm] "a" (&S390_lowcore.program_new_psw)
|
||||
: "cc", "memory");
|
||||
S390_lowcore.program_new_psw = old;
|
||||
return rc == 0 ? _ry : -1;
|
||||
}
|
||||
|
||||
@@ -112,24 +115,30 @@ static int diag260(void)
|
||||
|
||||
static int tprot(unsigned long addr)
|
||||
{
|
||||
unsigned long pgm_addr;
|
||||
unsigned long reg1, reg2;
|
||||
int rc = -EFAULT;
|
||||
psw_t old = S390_lowcore.program_new_psw;
|
||||
psw_t old;
|
||||
|
||||
S390_lowcore.program_new_psw.mask = __extract_psw();
|
||||
asm volatile(
|
||||
" larl %[pgm_addr],1f\n"
|
||||
" stg %[pgm_addr],%[psw_pgm_addr]\n"
|
||||
" mvc 0(16,%[psw_old]),0(%[psw_pgm])\n"
|
||||
" epsw %[reg1],%[reg2]\n"
|
||||
" st %[reg1],0(%[psw_pgm])\n"
|
||||
" st %[reg2],4(%[psw_pgm])\n"
|
||||
" larl %[reg1],1f\n"
|
||||
" stg %[reg1],8(%[psw_pgm])\n"
|
||||
" tprot 0(%[addr]),0\n"
|
||||
" ipm %[rc]\n"
|
||||
" srl %[rc],28\n"
|
||||
"1:\n"
|
||||
: [pgm_addr] "=&d"(pgm_addr),
|
||||
[psw_pgm_addr] "=Q"(S390_lowcore.program_new_psw.addr),
|
||||
[rc] "+&d"(rc)
|
||||
: [addr] "a"(addr)
|
||||
"1: mvc 0(16,%[psw_pgm]),0(%[psw_old])\n"
|
||||
: [reg1] "=&d" (reg1),
|
||||
[reg2] "=&a" (reg2),
|
||||
[rc] "+&d" (rc),
|
||||
"=Q" (S390_lowcore.program_new_psw.addr),
|
||||
"=Q" (old)
|
||||
: [psw_old] "a" (&old),
|
||||
[psw_pgm] "a" (&S390_lowcore.program_new_psw),
|
||||
[addr] "a" (addr)
|
||||
: "cc", "memory");
|
||||
S390_lowcore.program_new_psw = old;
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@@ -211,7 +211,7 @@ static __always_inline unsigned long current_stack_pointer(void)
|
||||
return sp;
|
||||
}
|
||||
|
||||
static __no_kasan_or_inline unsigned short stap(void)
|
||||
static __always_inline unsigned short stap(void)
|
||||
{
|
||||
unsigned short cpu_address;
|
||||
|
||||
@@ -250,7 +250,7 @@ static inline void __load_psw(psw_t psw)
|
||||
* Set PSW mask to specified value, while leaving the
|
||||
* PSW addr pointing to the next instruction.
|
||||
*/
|
||||
static __no_kasan_or_inline void __load_psw_mask(unsigned long mask)
|
||||
static __always_inline void __load_psw_mask(unsigned long mask)
|
||||
{
|
||||
unsigned long addr;
|
||||
psw_t psw;
|
||||
|
@@ -166,7 +166,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);
|
||||
}
|
||||
|
@@ -24,6 +24,7 @@ KBUILD_CFLAGS := -fno-strict-aliasing -Wall -Wstrict-prototypes
|
||||
KBUILD_CFLAGS += -Wno-pointer-sign -Wno-sign-compare
|
||||
KBUILD_CFLAGS += -fno-zero-initialized-in-bss -fno-builtin -ffreestanding
|
||||
KBUILD_CFLAGS += -c -MD -Os -m64 -msoft-float -fno-common
|
||||
KBUILD_CFLAGS += -fno-stack-protector
|
||||
KBUILD_CFLAGS += $(CLANG_FLAGS)
|
||||
KBUILD_CFLAGS += $(call cc-option,-fno-PIE)
|
||||
KBUILD_AFLAGS := $(filter-out -DCC_USING_EXPOLINE,$(KBUILD_AFLAGS))
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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; \
|
||||
})
|
||||
@@ -219,16 +220,20 @@ static inline void fxsave(struct fxregs_state *fx)
|
||||
#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")
|
||||
|
||||
|
@@ -117,7 +117,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;
|
||||
|
@@ -1084,20 +1084,10 @@ static inline bool xfeatures_mxcsr_quirk(u64 xfeatures)
|
||||
return true;
|
||||
}
|
||||
|
||||
static void fill_gap(struct membuf *to, unsigned *last, unsigned offset)
|
||||
static void copy_feature(bool from_xstate, struct membuf *to, void *xstate,
|
||||
void *init_xstate, unsigned int size)
|
||||
{
|
||||
if (*last >= offset)
|
||||
return;
|
||||
membuf_write(to, (void *)&init_fpstate.xsave + *last, offset - *last);
|
||||
*last = offset;
|
||||
}
|
||||
|
||||
static void copy_part(struct membuf *to, unsigned *last, unsigned offset,
|
||||
unsigned size, void *from)
|
||||
{
|
||||
fill_gap(to, last, offset);
|
||||
membuf_write(to, from, size);
|
||||
*last = offset + size;
|
||||
membuf_write(to, from_xstate ? xstate : init_xstate, size);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1109,10 +1099,10 @@ static void copy_part(struct membuf *to, unsigned *last, unsigned offset,
|
||||
*/
|
||||
void copy_xstate_to_kernel(struct membuf to, struct xregs_state *xsave)
|
||||
{
|
||||
const unsigned int off_mxcsr = offsetof(struct fxregs_state, mxcsr);
|
||||
struct xregs_state *xinit = &init_fpstate.xsave;
|
||||
struct xstate_header header;
|
||||
const unsigned off_mxcsr = offsetof(struct fxregs_state, mxcsr);
|
||||
unsigned size = to.left;
|
||||
unsigned last = 0;
|
||||
unsigned int zerofrom;
|
||||
int i;
|
||||
|
||||
/*
|
||||
@@ -1122,41 +1112,68 @@ void copy_xstate_to_kernel(struct membuf to, struct xregs_state *xsave)
|
||||
header.xfeatures = xsave->header.xfeatures;
|
||||
header.xfeatures &= xfeatures_mask_user();
|
||||
|
||||
if (header.xfeatures & XFEATURE_MASK_FP)
|
||||
copy_part(&to, &last, 0, off_mxcsr, &xsave->i387);
|
||||
if (header.xfeatures & (XFEATURE_MASK_SSE | XFEATURE_MASK_YMM))
|
||||
copy_part(&to, &last, off_mxcsr,
|
||||
MXCSR_AND_FLAGS_SIZE, &xsave->i387.mxcsr);
|
||||
if (header.xfeatures & XFEATURE_MASK_FP)
|
||||
copy_part(&to, &last, offsetof(struct fxregs_state, st_space),
|
||||
128, &xsave->i387.st_space);
|
||||
if (header.xfeatures & XFEATURE_MASK_SSE)
|
||||
copy_part(&to, &last, xstate_offsets[XFEATURE_SSE],
|
||||
256, &xsave->i387.xmm_space);
|
||||
/*
|
||||
* Fill xsave->i387.sw_reserved value for ptrace frame:
|
||||
*/
|
||||
copy_part(&to, &last, offsetof(struct fxregs_state, sw_reserved),
|
||||
48, xstate_fx_sw_bytes);
|
||||
/*
|
||||
* Copy xregs_state->header:
|
||||
*/
|
||||
copy_part(&to, &last, offsetof(struct xregs_state, header),
|
||||
sizeof(header), &header);
|
||||
/* Copy FP state up to MXCSR */
|
||||
copy_feature(header.xfeatures & XFEATURE_MASK_FP, &to, &xsave->i387,
|
||||
&xinit->i387, off_mxcsr);
|
||||
|
||||
/* Copy MXCSR when SSE or YMM are set in the feature mask */
|
||||
copy_feature(header.xfeatures & (XFEATURE_MASK_SSE | XFEATURE_MASK_YMM),
|
||||
&to, &xsave->i387.mxcsr, &xinit->i387.mxcsr,
|
||||
MXCSR_AND_FLAGS_SIZE);
|
||||
|
||||
/* Copy the remaining FP state */
|
||||
copy_feature(header.xfeatures & XFEATURE_MASK_FP,
|
||||
&to, &xsave->i387.st_space, &xinit->i387.st_space,
|
||||
sizeof(xsave->i387.st_space));
|
||||
|
||||
/* Copy the SSE state - shared with YMM, but independently managed */
|
||||
copy_feature(header.xfeatures & XFEATURE_MASK_SSE,
|
||||
&to, &xsave->i387.xmm_space, &xinit->i387.xmm_space,
|
||||
sizeof(xsave->i387.xmm_space));
|
||||
|
||||
/* Zero the padding area */
|
||||
membuf_zero(&to, sizeof(xsave->i387.padding));
|
||||
|
||||
/* Copy xsave->i387.sw_reserved */
|
||||
membuf_write(&to, xstate_fx_sw_bytes, sizeof(xsave->i387.sw_reserved));
|
||||
|
||||
/* Copy the user space relevant state of @xsave->header */
|
||||
membuf_write(&to, &header, sizeof(header));
|
||||
|
||||
zerofrom = offsetof(struct xregs_state, extended_state_area);
|
||||
|
||||
for (i = FIRST_EXTENDED_XFEATURE; i < XFEATURE_MAX; i++) {
|
||||
/*
|
||||
* Copy only in-use xstates:
|
||||
* The ptrace buffer is in non-compacted XSAVE format.
|
||||
* In non-compacted format disabled features still occupy
|
||||
* state space, but there is no state to copy from in the
|
||||
* compacted init_fpstate. The gap tracking will zero this
|
||||
* later.
|
||||
*/
|
||||
if ((header.xfeatures >> i) & 1) {
|
||||
void *src = __raw_xsave_addr(xsave, i);
|
||||
if (!(xfeatures_mask_user() & BIT_ULL(i)))
|
||||
continue;
|
||||
|
||||
copy_part(&to, &last, xstate_offsets[i],
|
||||
xstate_sizes[i], src);
|
||||
}
|
||||
/*
|
||||
* If there was a feature or alignment gap, zero the space
|
||||
* in the destination buffer.
|
||||
*/
|
||||
if (zerofrom < xstate_offsets[i])
|
||||
membuf_zero(&to, xstate_offsets[i] - zerofrom);
|
||||
|
||||
copy_feature(header.xfeatures & BIT_ULL(i), &to,
|
||||
__raw_xsave_addr(xsave, i),
|
||||
__raw_xsave_addr(xinit, i),
|
||||
xstate_sizes[i]);
|
||||
|
||||
/*
|
||||
* Keep track of the last copied state in the non-compacted
|
||||
* target buffer for gap zeroing.
|
||||
*/
|
||||
zerofrom = xstate_offsets[i] + xstate_sizes[i];
|
||||
}
|
||||
fill_gap(&to, &last, size);
|
||||
|
||||
if (to.left)
|
||||
membuf_zero(&to, to.left);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -234,10 +234,11 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size,
|
||||
void __user **fpstate)
|
||||
{
|
||||
/* Default to using normal stack */
|
||||
bool nested_altstack = on_sig_stack(regs->sp);
|
||||
bool entering_altstack = false;
|
||||
unsigned long math_size = 0;
|
||||
unsigned long sp = regs->sp;
|
||||
unsigned long buf_fx = 0;
|
||||
int onsigstack = on_sig_stack(sp);
|
||||
int ret;
|
||||
|
||||
/* redzone */
|
||||
@@ -246,15 +247,23 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size,
|
||||
|
||||
/* This is the X/Open sanctioned signal stack switching. */
|
||||
if (ka->sa.sa_flags & SA_ONSTACK) {
|
||||
if (sas_ss_flags(sp) == 0)
|
||||
/*
|
||||
* This checks nested_altstack via sas_ss_flags(). Sensible
|
||||
* programs use SS_AUTODISARM, which disables that check, and
|
||||
* programs that don't use SS_AUTODISARM get compatible.
|
||||
*/
|
||||
if (sas_ss_flags(sp) == 0) {
|
||||
sp = current->sas_ss_sp + current->sas_ss_size;
|
||||
entering_altstack = true;
|
||||
}
|
||||
} else if (IS_ENABLED(CONFIG_X86_32) &&
|
||||
!onsigstack &&
|
||||
!nested_altstack &&
|
||||
regs->ss != __USER_DS &&
|
||||
!(ka->sa.sa_flags & SA_RESTORER) &&
|
||||
ka->sa.sa_restorer) {
|
||||
/* This is the legacy signal stack switching. */
|
||||
sp = (unsigned long) ka->sa.sa_restorer;
|
||||
entering_altstack = true;
|
||||
}
|
||||
|
||||
sp = fpu__alloc_mathframe(sp, IS_ENABLED(CONFIG_X86_32),
|
||||
@@ -267,8 +276,15 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size,
|
||||
* If we are on the alternate signal stack and would overflow it, don't.
|
||||
* Return an always-bogus address instead so we will die with SIGSEGV.
|
||||
*/
|
||||
if (onsigstack && !likely(on_sig_stack(sp)))
|
||||
if (unlikely((nested_altstack || entering_altstack) &&
|
||||
!__on_sig_stack(sp))) {
|
||||
|
||||
if (show_unhandled_signals && printk_ratelimit())
|
||||
pr_info("%s[%d] overflowed sigaltstack\n",
|
||||
current->comm, task_pid_nr(current));
|
||||
|
||||
return (void __user *)-1L;
|
||||
}
|
||||
|
||||
/* save i387 and extended state */
|
||||
ret = copy_fpstate_to_sigframe(*fpstate, (void __user *)buf_fx, math_size);
|
||||
|
@@ -827,8 +827,14 @@ static inline int __do_cpuid_func(struct kvm_cpuid_array *array, 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;
|
||||
cpuid_entry_override(entry, CPUID_8000_0008_EBX);
|
||||
|
@@ -52,6 +52,8 @@
|
||||
#include <asm/kvm_page_track.h>
|
||||
#include "trace.h"
|
||||
|
||||
#include "paging.h"
|
||||
|
||||
extern bool itlb_multihit_kvm_mitigation;
|
||||
|
||||
static int __read_mostly nx_huge_pages = -1;
|
||||
|
14
arch/x86/kvm/mmu/paging.h
Normal file
14
arch/x86/kvm/mmu/paging.h
Normal file
@@ -0,0 +1,14 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/* Shadow paging constants/helpers that don't need to be #undef'd. */
|
||||
#ifndef __KVM_X86_PAGING_H
|
||||
#define __KVM_X86_PAGING_H
|
||||
|
||||
#define GUEST_PT64_BASE_ADDR_MASK (((1ULL << 52) - 1) & ~(u64)(PAGE_SIZE-1))
|
||||
#define PT64_LVL_ADDR_MASK(level) \
|
||||
(GUEST_PT64_BASE_ADDR_MASK & ~((1ULL << (PAGE_SHIFT + (((level) - 1) \
|
||||
* PT64_LEVEL_BITS))) - 1))
|
||||
#define PT64_LVL_OFFSET_MASK(level) \
|
||||
(GUEST_PT64_BASE_ADDR_MASK & ((1ULL << (PAGE_SHIFT + (((level) - 1) \
|
||||
* PT64_LEVEL_BITS))) - 1))
|
||||
#endif /* __KVM_X86_PAGING_H */
|
||||
|
@@ -24,7 +24,7 @@
|
||||
#define pt_element_t u64
|
||||
#define guest_walker guest_walker64
|
||||
#define FNAME(name) paging##64_##name
|
||||
#define PT_BASE_ADDR_MASK PT64_BASE_ADDR_MASK
|
||||
#define PT_BASE_ADDR_MASK GUEST_PT64_BASE_ADDR_MASK
|
||||
#define PT_LVL_ADDR_MASK(lvl) PT64_LVL_ADDR_MASK(lvl)
|
||||
#define PT_LVL_OFFSET_MASK(lvl) PT64_LVL_OFFSET_MASK(lvl)
|
||||
#define PT_INDEX(addr, level) PT64_INDEX(addr, level)
|
||||
@@ -57,7 +57,7 @@
|
||||
#define pt_element_t u64
|
||||
#define guest_walker guest_walkerEPT
|
||||
#define FNAME(name) ept_##name
|
||||
#define PT_BASE_ADDR_MASK PT64_BASE_ADDR_MASK
|
||||
#define PT_BASE_ADDR_MASK GUEST_PT64_BASE_ADDR_MASK
|
||||
#define PT_LVL_ADDR_MASK(lvl) PT64_LVL_ADDR_MASK(lvl)
|
||||
#define PT_LVL_OFFSET_MASK(lvl) PT64_LVL_OFFSET_MASK(lvl)
|
||||
#define PT_INDEX(addr, level) PT64_INDEX(addr, level)
|
||||
|
@@ -23,12 +23,6 @@
|
||||
#else
|
||||
#define PT64_BASE_ADDR_MASK (((1ULL << 52) - 1) & ~(u64)(PAGE_SIZE-1))
|
||||
#endif
|
||||
#define PT64_LVL_ADDR_MASK(level) \
|
||||
(PT64_BASE_ADDR_MASK & ~((1ULL << (PAGE_SHIFT + (((level) - 1) \
|
||||
* PT64_LEVEL_BITS))) - 1))
|
||||
#define PT64_LVL_OFFSET_MASK(level) \
|
||||
(PT64_BASE_ADDR_MASK & ((1ULL << (PAGE_SHIFT + (((level) - 1) \
|
||||
* PT64_LEVEL_BITS))) - 1))
|
||||
|
||||
#define PT64_PERM_MASK (PT_PRESENT_MASK | PT_WRITABLE_MASK | shadow_user_mask \
|
||||
| shadow_x_mask | shadow_nx_mask | shadow_me_mask)
|
||||
|
@@ -2745,7 +2745,16 @@ static int svm_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr)
|
||||
svm_disable_lbrv(vcpu);
|
||||
break;
|
||||
case MSR_VM_HSAVE_PA:
|
||||
svm->nested.hsave_msr = data;
|
||||
/*
|
||||
* Old kernels did not validate the value written to
|
||||
* MSR_VM_HSAVE_PA. Allow KVM_SET_MSR to set an invalid
|
||||
* value to allow live migrating buggy or malicious guests
|
||||
* originating from those kernels.
|
||||
*/
|
||||
if (!msr->host_initiated && !page_address_valid(vcpu, data))
|
||||
return 1;
|
||||
|
||||
svm->nested.hsave_msr = data & PAGE_MASK;
|
||||
break;
|
||||
case MSR_VM_CR:
|
||||
return svm_set_vm_cr(vcpu, data);
|
||||
|
@@ -9020,6 +9020,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);
|
||||
}
|
||||
|
||||
exit_fastpath = kvm_x86_ops.run(vcpu);
|
||||
|
@@ -510,7 +510,7 @@ static bool ldm_validate_partition_table(struct parsed_partitions *state)
|
||||
|
||||
p = (struct msdos_partition *)(data + 0x01BE);
|
||||
for (i = 0; i < 4; i++, p++)
|
||||
if (SYS_IND (p) == LDM_PARTITION) {
|
||||
if (p->sys_ind == LDM_PARTITION) {
|
||||
result = true;
|
||||
break;
|
||||
}
|
||||
|
@@ -84,9 +84,6 @@ struct parsed_partitions;
|
||||
#define TOC_BITMAP1 "config" /* Names of the two defined */
|
||||
#define TOC_BITMAP2 "log" /* bitmaps in the TOCBLOCK. */
|
||||
|
||||
/* Borrowed from msdos.c */
|
||||
#define SYS_IND(p) (get_unaligned(&(p)->sys_ind))
|
||||
|
||||
struct frag { /* VBLK Fragment handling */
|
||||
struct list_head list;
|
||||
u32 group;
|
||||
|
@@ -38,8 +38,6 @@
|
||||
*/
|
||||
#include <asm/unaligned.h>
|
||||
|
||||
#define SYS_IND(p) get_unaligned(&p->sys_ind)
|
||||
|
||||
static inline sector_t nr_sects(struct msdos_partition *p)
|
||||
{
|
||||
return (sector_t)get_unaligned_le32(&p->nr_sects);
|
||||
@@ -52,9 +50,9 @@ static inline sector_t start_sect(struct msdos_partition *p)
|
||||
|
||||
static inline int is_extended_partition(struct msdos_partition *p)
|
||||
{
|
||||
return (SYS_IND(p) == DOS_EXTENDED_PARTITION ||
|
||||
SYS_IND(p) == WIN98_EXTENDED_PARTITION ||
|
||||
SYS_IND(p) == LINUX_EXTENDED_PARTITION);
|
||||
return (p->sys_ind == DOS_EXTENDED_PARTITION ||
|
||||
p->sys_ind == WIN98_EXTENDED_PARTITION ||
|
||||
p->sys_ind == LINUX_EXTENDED_PARTITION);
|
||||
}
|
||||
|
||||
#define MSDOS_LABEL_MAGIC1 0x55
|
||||
@@ -193,7 +191,7 @@ static void parse_extended(struct parsed_partitions *state,
|
||||
|
||||
put_partition(state, state->next, next, size);
|
||||
set_info(state, state->next, disksig);
|
||||
if (SYS_IND(p) == LINUX_RAID_PARTITION)
|
||||
if (p->sys_ind == LINUX_RAID_PARTITION)
|
||||
state->parts[state->next].flags = ADDPART_FLAG_RAID;
|
||||
loopct = 0;
|
||||
if (++state->next == state->limit)
|
||||
@@ -546,7 +544,7 @@ static void parse_minix(struct parsed_partitions *state,
|
||||
* a secondary MBR describing its subpartitions, or
|
||||
* the normal boot sector. */
|
||||
if (msdos_magic_present(data + 510) &&
|
||||
SYS_IND(p) == MINIX_PARTITION) { /* subpartition table present */
|
||||
p->sys_ind == MINIX_PARTITION) { /* subpartition table present */
|
||||
char tmp[1 + BDEVNAME_SIZE + 10 + 9 + 1];
|
||||
|
||||
snprintf(tmp, sizeof(tmp), " %s%d: <minix:", state->name, origin);
|
||||
@@ -555,7 +553,7 @@ static void parse_minix(struct parsed_partitions *state,
|
||||
if (state->next == state->limit)
|
||||
break;
|
||||
/* add each partition in use */
|
||||
if (SYS_IND(p) == MINIX_PARTITION)
|
||||
if (p->sys_ind == MINIX_PARTITION)
|
||||
put_partition(state, state->next++,
|
||||
start_sect(p), nr_sects(p));
|
||||
}
|
||||
@@ -643,7 +641,7 @@ int msdos_partition(struct parsed_partitions *state)
|
||||
p = (struct msdos_partition *) (data + 0x1be);
|
||||
for (slot = 1 ; slot <= 4 ; slot++, p++) {
|
||||
/* If this is an EFI GPT disk, msdos should ignore it. */
|
||||
if (SYS_IND(p) == EFI_PMBR_OSTYPE_EFI_GPT) {
|
||||
if (p->sys_ind == EFI_PMBR_OSTYPE_EFI_GPT) {
|
||||
put_dev_sector(sect);
|
||||
return 0;
|
||||
}
|
||||
@@ -685,11 +683,11 @@ int msdos_partition(struct parsed_partitions *state)
|
||||
}
|
||||
put_partition(state, slot, start, size);
|
||||
set_info(state, slot, disksig);
|
||||
if (SYS_IND(p) == LINUX_RAID_PARTITION)
|
||||
if (p->sys_ind == LINUX_RAID_PARTITION)
|
||||
state->parts[slot].flags = ADDPART_FLAG_RAID;
|
||||
if (SYS_IND(p) == DM6_PARTITION)
|
||||
if (p->sys_ind == DM6_PARTITION)
|
||||
strlcat(state->pp_buf, "[DM]", PAGE_SIZE);
|
||||
if (SYS_IND(p) == EZD_PARTITION)
|
||||
if (p->sys_ind == EZD_PARTITION)
|
||||
strlcat(state->pp_buf, "[EZD]", PAGE_SIZE);
|
||||
}
|
||||
|
||||
@@ -698,7 +696,7 @@ int msdos_partition(struct parsed_partitions *state)
|
||||
/* second pass - output for each on a separate line */
|
||||
p = (struct msdos_partition *) (0x1be + data);
|
||||
for (slot = 1 ; slot <= 4 ; slot++, p++) {
|
||||
unsigned char id = SYS_IND(p);
|
||||
unsigned char id = p->sys_ind;
|
||||
int n;
|
||||
|
||||
if (!nr_sects(p))
|
||||
|
1
certs/.gitignore
vendored
1
certs/.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
x509_certificate_list
|
||||
x509_revocation_list
|
||||
|
@@ -76,6 +76,7 @@ static int amba_handler_attach(struct acpi_device *adev,
|
||||
case IORESOURCE_MEM:
|
||||
if (!address_found) {
|
||||
dev->res = *rentry->res;
|
||||
dev->res.name = dev_name(&dev->dev);
|
||||
address_found = true;
|
||||
}
|
||||
break;
|
||||
|
@@ -543,6 +543,15 @@ static const struct dmi_system_id video_dmi_table[] = {
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Vostro V131"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = video_set_report_key_events,
|
||||
.driver_data = (void *)((uintptr_t)REPORT_BRIGHTNESS_KEY_EVENTS),
|
||||
.ident = "Dell Vostro 3350",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 3350"),
|
||||
},
|
||||
},
|
||||
/*
|
||||
* Some machines change the brightness themselves when a brightness
|
||||
* hotkey gets pressed, despite us telling them not to. In this case
|
||||
|
@@ -948,6 +948,8 @@ static int virtblk_freeze(struct virtio_device *vdev)
|
||||
blk_mq_quiesce_queue(vblk->disk->queue);
|
||||
|
||||
vdev->config->del_vqs(vdev);
|
||||
kfree(vblk->vqs);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@@ -475,7 +475,7 @@ static struct port_buffer *get_inbuf(struct port *port)
|
||||
|
||||
buf = virtqueue_get_buf(port->in_vq, &len);
|
||||
if (buf) {
|
||||
buf->len = len;
|
||||
buf->len = min_t(size_t, len, buf->size);
|
||||
buf->offset = 0;
|
||||
port->stats.bytes_received += len;
|
||||
}
|
||||
@@ -1712,7 +1712,7 @@ static void control_work_handler(struct work_struct *work)
|
||||
while ((buf = virtqueue_get_buf(vq, &len))) {
|
||||
spin_unlock(&portdev->c_ivq_lock);
|
||||
|
||||
buf->len = len;
|
||||
buf->len = min_t(size_t, len, buf->size);
|
||||
buf->offset = 0;
|
||||
|
||||
handle_control_message(vq->vdev, portdev, buf);
|
||||
|
@@ -1235,7 +1235,11 @@ static int fsl_qdma_probe(struct platform_device *pdev)
|
||||
fsl_qdma->dma_dev.device_synchronize = fsl_qdma_synchronize;
|
||||
fsl_qdma->dma_dev.device_terminate_all = fsl_qdma_terminate_all;
|
||||
|
||||
dma_set_mask(&pdev->dev, DMA_BIT_MASK(40));
|
||||
ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(40));
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "dma_set_mask failure.\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
platform_set_drvdata(pdev, fsl_qdma);
|
||||
|
||||
|
@@ -337,6 +337,10 @@ static void scmi_handle_response(struct scmi_chan_info *cinfo,
|
||||
return;
|
||||
}
|
||||
|
||||
/* rx.len could be shrunk in the sync do_xfer, so reset to maxsz */
|
||||
if (msg_type == MSG_TYPE_DELAYED_RESP)
|
||||
xfer->rx.len = info->desc->max_msg_size;
|
||||
|
||||
scmi_dump_header_dbg(dev, &xfer->hdr);
|
||||
|
||||
info->desc->ops->fetch_response(cinfo, xfer);
|
||||
|
@@ -210,7 +210,7 @@ static int tegra210_bpmp_init(struct tegra_bpmp *bpmp)
|
||||
priv->tx_irq_data = irq_get_irq_data(err);
|
||||
if (!priv->tx_irq_data) {
|
||||
dev_err(&pdev->dev, "failed to get IRQ data for TX IRQ\n");
|
||||
return err;
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
err = platform_get_irq_byname(pdev, "rx");
|
||||
|
@@ -147,11 +147,14 @@ MOX_ATTR_RO(pubkey, "%s\n", pubkey);
|
||||
|
||||
static int mox_get_status(enum mbox_cmd cmd, u32 retval)
|
||||
{
|
||||
if (MBOX_STS_CMD(retval) != cmd ||
|
||||
MBOX_STS_ERROR(retval) != MBOX_STS_SUCCESS)
|
||||
if (MBOX_STS_CMD(retval) != cmd)
|
||||
return -EIO;
|
||||
else if (MBOX_STS_ERROR(retval) == MBOX_STS_FAIL)
|
||||
return -(int)MBOX_STS_VALUE(retval);
|
||||
else if (MBOX_STS_ERROR(retval) == MBOX_STS_BADCMD)
|
||||
return -ENOSYS;
|
||||
else if (MBOX_STS_ERROR(retval) != MBOX_STS_SUCCESS)
|
||||
return -EIO;
|
||||
else
|
||||
return MBOX_STS_VALUE(retval);
|
||||
}
|
||||
@@ -201,11 +204,14 @@ static int mox_get_board_info(struct mox_rwtm *rwtm)
|
||||
return ret;
|
||||
|
||||
ret = mox_get_status(MBOX_CMD_BOARD_INFO, reply->retval);
|
||||
if (ret < 0 && ret != -ENODATA) {
|
||||
return ret;
|
||||
} else if (ret == -ENODATA) {
|
||||
if (ret == -ENODATA) {
|
||||
dev_warn(rwtm->dev,
|
||||
"Board does not have manufacturing information burned!\n");
|
||||
} else if (ret == -ENOSYS) {
|
||||
dev_notice(rwtm->dev,
|
||||
"Firmware does not support the BOARD_INFO command\n");
|
||||
} else if (ret < 0) {
|
||||
return ret;
|
||||
} else {
|
||||
rwtm->serial_number = reply->status[1];
|
||||
rwtm->serial_number <<= 32;
|
||||
@@ -234,10 +240,13 @@ static int mox_get_board_info(struct mox_rwtm *rwtm)
|
||||
return ret;
|
||||
|
||||
ret = mox_get_status(MBOX_CMD_ECDSA_PUB_KEY, reply->retval);
|
||||
if (ret < 0 && ret != -ENODATA) {
|
||||
return ret;
|
||||
} else if (ret == -ENODATA) {
|
||||
if (ret == -ENODATA) {
|
||||
dev_warn(rwtm->dev, "Board has no public key burned!\n");
|
||||
} else if (ret == -ENOSYS) {
|
||||
dev_notice(rwtm->dev,
|
||||
"Firmware does not support the ECDSA_PUB_KEY command\n");
|
||||
} else if (ret < 0) {
|
||||
return ret;
|
||||
} else {
|
||||
u32 *s = reply->status;
|
||||
|
||||
@@ -251,6 +260,27 @@ static int mox_get_board_info(struct mox_rwtm *rwtm)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int check_get_random_support(struct mox_rwtm *rwtm)
|
||||
{
|
||||
struct armada_37xx_rwtm_tx_msg msg;
|
||||
int ret;
|
||||
|
||||
msg.command = MBOX_CMD_GET_RANDOM;
|
||||
msg.args[0] = 1;
|
||||
msg.args[1] = rwtm->buf_phys;
|
||||
msg.args[2] = 4;
|
||||
|
||||
ret = mbox_send_message(rwtm->mbox, &msg);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
ret = wait_for_completion_timeout(&rwtm->cmd_done, HZ / 2);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
return mox_get_status(MBOX_CMD_GET_RANDOM, rwtm->reply.retval);
|
||||
}
|
||||
|
||||
static int mox_hwrng_read(struct hwrng *rng, void *data, size_t max, bool wait)
|
||||
{
|
||||
struct mox_rwtm *rwtm = (struct mox_rwtm *) rng->priv;
|
||||
@@ -488,6 +518,13 @@ static int turris_mox_rwtm_probe(struct platform_device *pdev)
|
||||
if (ret < 0)
|
||||
dev_warn(dev, "Cannot read board information: %i\n", ret);
|
||||
|
||||
ret = check_get_random_support(rwtm);
|
||||
if (ret < 0) {
|
||||
dev_notice(dev,
|
||||
"Firmware does not support the GET_RANDOM command\n");
|
||||
goto free_channel;
|
||||
}
|
||||
|
||||
rwtm->hwrng.name = DRIVER_NAME "_hwrng";
|
||||
rwtm->hwrng.read = mox_hwrng_read;
|
||||
rwtm->hwrng.priv = (unsigned long) rwtm;
|
||||
@@ -505,6 +542,8 @@ static int turris_mox_rwtm_probe(struct platform_device *pdev)
|
||||
goto free_channel;
|
||||
}
|
||||
|
||||
dev_info(dev, "HWRNG successfully registered\n");
|
||||
|
||||
return 0;
|
||||
|
||||
free_channel:
|
||||
|
@@ -645,6 +645,7 @@ static const struct of_device_id fsi_master_aspeed_match[] = {
|
||||
{ .compatible = "aspeed,ast2600-fsi-master" },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, fsi_master_aspeed_match);
|
||||
|
||||
static struct platform_driver fsi_master_aspeed_driver = {
|
||||
.driver = {
|
||||
|
@@ -1427,6 +1427,7 @@ static const struct of_device_id fsi_master_acf_match[] = {
|
||||
{ .compatible = "aspeed,ast2500-cf-fsi-master" },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, fsi_master_acf_match);
|
||||
|
||||
static struct platform_driver fsi_master_acf = {
|
||||
.driver = {
|
||||
|
@@ -882,6 +882,7 @@ static const struct of_device_id fsi_master_gpio_match[] = {
|
||||
{ .compatible = "fsi-master-gpio" },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, fsi_master_gpio_match);
|
||||
|
||||
static struct platform_driver fsi_master_gpio_driver = {
|
||||
.driver = {
|
||||
|
@@ -579,6 +579,7 @@ static const struct of_device_id occ_match[] = {
|
||||
{ .compatible = "ibm,p9-occ" },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, occ_match);
|
||||
|
||||
static struct platform_driver occ_driver = {
|
||||
.driver = {
|
||||
|
@@ -1239,6 +1239,7 @@ static const struct of_device_id pca953x_dt_ids[] = {
|
||||
|
||||
{ .compatible = "onnn,cat9554", .data = OF_953X( 8, PCA_INT), },
|
||||
{ .compatible = "onnn,pca9654", .data = OF_953X( 8, PCA_INT), },
|
||||
{ .compatible = "onnn,pca9655", .data = OF_953X(16, PCA_INT), },
|
||||
|
||||
{ .compatible = "exar,xra1202", .data = OF_953X( 8, 0), },
|
||||
{ }
|
||||
|
@@ -736,6 +736,11 @@ static int __maybe_unused zynq_gpio_suspend(struct device *dev)
|
||||
struct zynq_gpio *gpio = dev_get_drvdata(dev);
|
||||
struct irq_data *data = irq_get_irq_data(gpio->irq);
|
||||
|
||||
if (!data) {
|
||||
dev_err(dev, "irq_get_irq_data() failed\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!device_may_wakeup(dev))
|
||||
disable_irq(gpio->irq);
|
||||
|
||||
@@ -753,6 +758,11 @@ static int __maybe_unused zynq_gpio_resume(struct device *dev)
|
||||
struct irq_data *data = irq_get_irq_data(gpio->irq);
|
||||
int ret;
|
||||
|
||||
if (!data) {
|
||||
dev_err(dev, "irq_get_irq_data() failed\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!device_may_wakeup(dev))
|
||||
enable_irq(gpio->irq);
|
||||
|
||||
@@ -1001,8 +1011,11 @@ err_pm_dis:
|
||||
static int zynq_gpio_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct zynq_gpio *gpio = platform_get_drvdata(pdev);
|
||||
int ret;
|
||||
|
||||
pm_runtime_get_sync(&pdev->dev);
|
||||
ret = pm_runtime_get_sync(&pdev->dev);
|
||||
if (ret < 0)
|
||||
dev_warn(&pdev->dev, "pm_runtime_get_sync() Failed\n");
|
||||
gpiochip_remove(&gpio->chip);
|
||||
clk_disable_unprepare(gpio->clk);
|
||||
device_set_wakeup_capable(&pdev->dev, 0);
|
||||
|
@@ -452,13 +452,9 @@ static const struct sysfs_ops procfs_stats_ops = {
|
||||
.show = kfd_procfs_stats_show,
|
||||
};
|
||||
|
||||
static struct attribute *procfs_stats_attrs[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
static struct kobj_type procfs_stats_type = {
|
||||
.sysfs_ops = &procfs_stats_ops,
|
||||
.default_attrs = procfs_stats_attrs,
|
||||
.release = kfd_procfs_kobj_release,
|
||||
};
|
||||
|
||||
int kfd_procfs_add_queue(struct queue *q)
|
||||
@@ -973,9 +969,11 @@ static void kfd_process_wq_release(struct work_struct *work)
|
||||
list_for_each_entry(pdd, &p->per_device_data, per_device_list) {
|
||||
sysfs_remove_file(p->kobj, &pdd->attr_vram);
|
||||
sysfs_remove_file(p->kobj, &pdd->attr_sdma);
|
||||
sysfs_remove_file(p->kobj, &pdd->attr_evict);
|
||||
if (pdd->dev->kfd2kgd->get_cu_occupancy != NULL)
|
||||
sysfs_remove_file(p->kobj, &pdd->attr_cu_occupancy);
|
||||
|
||||
sysfs_remove_file(pdd->kobj_stats, &pdd->attr_evict);
|
||||
if (pdd->dev->kfd2kgd->get_cu_occupancy)
|
||||
sysfs_remove_file(pdd->kobj_stats,
|
||||
&pdd->attr_cu_occupancy);
|
||||
kobject_del(pdd->kobj_stats);
|
||||
kobject_put(pdd->kobj_stats);
|
||||
pdd->kobj_stats = NULL;
|
||||
|
@@ -153,6 +153,7 @@ void pqm_uninit(struct process_queue_manager *pqm)
|
||||
if (pqn->q && pqn->q->gws)
|
||||
amdgpu_amdkfd_remove_gws_from_process(pqm->process->kgd_process_info,
|
||||
pqn->q->gws);
|
||||
kfd_procfs_del_queue(pqn->q);
|
||||
uninit_queue(pqn->q);
|
||||
list_del(&pqn->process_queue_list);
|
||||
kfree(pqn);
|
||||
|
@@ -406,6 +406,7 @@ struct ast_private *ast_device_create(struct drm_driver *drv,
|
||||
return ast;
|
||||
dev = &ast->base;
|
||||
|
||||
dev->pdev = pdev;
|
||||
pci_set_drvdata(pdev, dev);
|
||||
|
||||
ast->regs = pcim_iomap(pdev, 1, 0);
|
||||
@@ -447,8 +448,8 @@ struct ast_private *ast_device_create(struct drm_driver *drv,
|
||||
|
||||
/* map reserved buffer */
|
||||
ast->dp501_fw_buf = NULL;
|
||||
if (dev->vram_mm->vram_size < pci_resource_len(pdev, 0)) {
|
||||
ast->dp501_fw_buf = pci_iomap_range(pdev, 0, dev->vram_mm->vram_size, 0);
|
||||
if (dev->vram_mm->vram_size < pci_resource_len(dev->pdev, 0)) {
|
||||
ast->dp501_fw_buf = pci_iomap_range(dev->pdev, 0, dev->vram_mm->vram_size, 0);
|
||||
if (!ast->dp501_fw_buf)
|
||||
drm_info(dev, "failed to map reserved buffer!\n");
|
||||
}
|
||||
|
@@ -94,6 +94,9 @@ static int drm_dp_mst_register_i2c_bus(struct drm_dp_mst_port *port);
|
||||
static void drm_dp_mst_unregister_i2c_bus(struct drm_dp_mst_port *port);
|
||||
static void drm_dp_mst_kick_tx(struct drm_dp_mst_topology_mgr *mgr);
|
||||
|
||||
static bool drm_dp_mst_port_downstream_of_branch(struct drm_dp_mst_port *port,
|
||||
struct drm_dp_mst_branch *branch);
|
||||
|
||||
#define DBG_PREFIX "[dp_mst]"
|
||||
|
||||
#define DP_STR(x) [DP_ ## x] = #x
|
||||
@@ -2499,7 +2502,7 @@ drm_dp_mst_handle_conn_stat(struct drm_dp_mst_branch *mstb,
|
||||
{
|
||||
struct drm_dp_mst_topology_mgr *mgr = mstb->mgr;
|
||||
struct drm_dp_mst_port *port;
|
||||
int old_ddps, old_input, ret, i;
|
||||
int old_ddps, ret;
|
||||
u8 new_pdt;
|
||||
bool new_mcs;
|
||||
bool dowork = false, create_connector = false;
|
||||
@@ -2531,7 +2534,6 @@ drm_dp_mst_handle_conn_stat(struct drm_dp_mst_branch *mstb,
|
||||
}
|
||||
|
||||
old_ddps = port->ddps;
|
||||
old_input = port->input;
|
||||
port->input = conn_stat->input_port;
|
||||
port->ldps = conn_stat->legacy_device_plug_status;
|
||||
port->ddps = conn_stat->displayport_device_plug_status;
|
||||
@@ -2554,28 +2556,6 @@ drm_dp_mst_handle_conn_stat(struct drm_dp_mst_branch *mstb,
|
||||
dowork = false;
|
||||
}
|
||||
|
||||
if (!old_input && old_ddps != port->ddps && !port->ddps) {
|
||||
for (i = 0; i < mgr->max_payloads; i++) {
|
||||
struct drm_dp_vcpi *vcpi = mgr->proposed_vcpis[i];
|
||||
struct drm_dp_mst_port *port_validated;
|
||||
|
||||
if (!vcpi)
|
||||
continue;
|
||||
|
||||
port_validated =
|
||||
container_of(vcpi, struct drm_dp_mst_port, vcpi);
|
||||
port_validated =
|
||||
drm_dp_mst_topology_get_port_validated(mgr, port_validated);
|
||||
if (!port_validated) {
|
||||
mutex_lock(&mgr->payload_lock);
|
||||
vcpi->num_slots = 0;
|
||||
mutex_unlock(&mgr->payload_lock);
|
||||
} else {
|
||||
drm_dp_mst_topology_put_port(port_validated);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (port->connector)
|
||||
drm_modeset_unlock(&mgr->base.lock);
|
||||
else if (create_connector)
|
||||
@@ -3385,6 +3365,7 @@ int drm_dp_update_payload_part1(struct drm_dp_mst_topology_mgr *mgr)
|
||||
struct drm_dp_mst_port *port;
|
||||
int i, j;
|
||||
int cur_slots = 1;
|
||||
bool skip;
|
||||
|
||||
mutex_lock(&mgr->payload_lock);
|
||||
for (i = 0; i < mgr->max_payloads; i++) {
|
||||
@@ -3399,6 +3380,16 @@ int drm_dp_update_payload_part1(struct drm_dp_mst_topology_mgr *mgr)
|
||||
port = container_of(vcpi, struct drm_dp_mst_port,
|
||||
vcpi);
|
||||
|
||||
mutex_lock(&mgr->lock);
|
||||
skip = !drm_dp_mst_port_downstream_of_branch(port, mgr->mst_primary);
|
||||
mutex_unlock(&mgr->lock);
|
||||
|
||||
if (skip) {
|
||||
drm_dbg_kms(mgr->dev,
|
||||
"Virtual channel %d is not in current topology\n",
|
||||
i);
|
||||
continue;
|
||||
}
|
||||
/* Validated ports don't matter if we're releasing
|
||||
* VCPI
|
||||
*/
|
||||
@@ -3406,8 +3397,16 @@ int drm_dp_update_payload_part1(struct drm_dp_mst_topology_mgr *mgr)
|
||||
port = drm_dp_mst_topology_get_port_validated(
|
||||
mgr, port);
|
||||
if (!port) {
|
||||
mutex_unlock(&mgr->payload_lock);
|
||||
return -EINVAL;
|
||||
if (vcpi->num_slots == payload->num_slots) {
|
||||
cur_slots += vcpi->num_slots;
|
||||
payload->start_slot = req_payload.start_slot;
|
||||
continue;
|
||||
} else {
|
||||
drm_dbg_kms(mgr->dev,
|
||||
"Fail:set payload to invalid sink");
|
||||
mutex_unlock(&mgr->payload_lock);
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
put_port = true;
|
||||
}
|
||||
@@ -3491,6 +3490,7 @@ int drm_dp_update_payload_part2(struct drm_dp_mst_topology_mgr *mgr)
|
||||
struct drm_dp_mst_port *port;
|
||||
int i;
|
||||
int ret = 0;
|
||||
bool skip;
|
||||
|
||||
mutex_lock(&mgr->payload_lock);
|
||||
for (i = 0; i < mgr->max_payloads; i++) {
|
||||
@@ -3500,6 +3500,13 @@ int drm_dp_update_payload_part2(struct drm_dp_mst_topology_mgr *mgr)
|
||||
|
||||
port = container_of(mgr->proposed_vcpis[i], struct drm_dp_mst_port, vcpi);
|
||||
|
||||
mutex_lock(&mgr->lock);
|
||||
skip = !drm_dp_mst_port_downstream_of_branch(port, mgr->mst_primary);
|
||||
mutex_unlock(&mgr->lock);
|
||||
|
||||
if (skip)
|
||||
continue;
|
||||
|
||||
DRM_DEBUG_KMS("payload %d %d\n", i, mgr->payloads[i].payload_state);
|
||||
if (mgr->payloads[i].payload_state == DP_PAYLOAD_LOCAL) {
|
||||
ret = drm_dp_create_payload_step2(mgr, port, mgr->proposed_vcpis[i]->vcpi, &mgr->payloads[i]);
|
||||
@@ -4581,9 +4588,18 @@ EXPORT_SYMBOL(drm_dp_mst_reset_vcpi_slots);
|
||||
void drm_dp_mst_deallocate_vcpi(struct drm_dp_mst_topology_mgr *mgr,
|
||||
struct drm_dp_mst_port *port)
|
||||
{
|
||||
bool skip;
|
||||
|
||||
if (!port->vcpi.vcpi)
|
||||
return;
|
||||
|
||||
mutex_lock(&mgr->lock);
|
||||
skip = !drm_dp_mst_port_downstream_of_branch(port, mgr->mst_primary);
|
||||
mutex_unlock(&mgr->lock);
|
||||
|
||||
if (skip)
|
||||
return;
|
||||
|
||||
drm_dp_mst_put_payload_id(mgr, port->vcpi.vcpi);
|
||||
port->vcpi.num_slots = 0;
|
||||
port->vcpi.pbn = 0;
|
||||
|
@@ -435,6 +435,7 @@ static struct drm_framebuffer *psb_user_framebuffer_create
|
||||
const struct drm_mode_fb_cmd2 *cmd)
|
||||
{
|
||||
struct drm_gem_object *obj;
|
||||
struct drm_framebuffer *fb;
|
||||
|
||||
/*
|
||||
* Find the GEM object and thus the gtt range object that is
|
||||
@@ -445,7 +446,11 @@ static struct drm_framebuffer *psb_user_framebuffer_create
|
||||
return ERR_PTR(-ENOENT);
|
||||
|
||||
/* Let the core code do all the work */
|
||||
return psb_framebuffer_create(dev, cmd, obj);
|
||||
fb = psb_framebuffer_create(dev, cmd, obj);
|
||||
if (IS_ERR(fb))
|
||||
drm_gem_object_put(obj);
|
||||
|
||||
return fb;
|
||||
}
|
||||
|
||||
static int psbfb_probe(struct drm_fb_helper *fb_helper,
|
||||
|
@@ -299,10 +299,7 @@ static void __gen8_ppgtt_alloc(struct i915_address_space * const vm,
|
||||
__i915_gem_object_pin_pages(pt->base);
|
||||
i915_gem_object_make_unshrinkable(pt->base);
|
||||
|
||||
if (lvl ||
|
||||
gen8_pt_count(*start, end) < I915_PDES ||
|
||||
intel_vgpu_active(vm->i915))
|
||||
fill_px(pt, vm->scratch[lvl]->encode);
|
||||
fill_px(pt, vm->scratch[lvl]->encode);
|
||||
|
||||
spin_lock(&pd->lock);
|
||||
if (likely(!pd->entry[idx])) {
|
||||
|
@@ -348,7 +348,7 @@ static struct i915_fence_reg *fence_find(struct i915_ggtt *ggtt)
|
||||
if (intel_has_pending_fb_unpin(ggtt->vm.i915))
|
||||
return ERR_PTR(-EAGAIN);
|
||||
|
||||
return ERR_PTR(-EDEADLK);
|
||||
return ERR_PTR(-ENOBUFS);
|
||||
}
|
||||
|
||||
int __i915_vma_pin_fence(struct i915_vma *vma)
|
||||
|
@@ -347,7 +347,7 @@ static void ingenic_drm_plane_enable(struct ingenic_drm *priv,
|
||||
unsigned int en_bit;
|
||||
|
||||
if (priv->soc_info->has_osd) {
|
||||
if (plane->type == DRM_PLANE_TYPE_PRIMARY)
|
||||
if (plane != &priv->f0)
|
||||
en_bit = JZ_LCD_OSDC_F1EN;
|
||||
else
|
||||
en_bit = JZ_LCD_OSDC_F0EN;
|
||||
@@ -362,7 +362,7 @@ void ingenic_drm_plane_disable(struct device *dev, struct drm_plane *plane)
|
||||
unsigned int en_bit;
|
||||
|
||||
if (priv->soc_info->has_osd) {
|
||||
if (plane->type == DRM_PLANE_TYPE_PRIMARY)
|
||||
if (plane != &priv->f0)
|
||||
en_bit = JZ_LCD_OSDC_F1EN;
|
||||
else
|
||||
en_bit = JZ_LCD_OSDC_F0EN;
|
||||
@@ -389,8 +389,7 @@ void ingenic_drm_plane_config(struct device *dev,
|
||||
|
||||
ingenic_drm_plane_enable(priv, plane);
|
||||
|
||||
if (priv->soc_info->has_osd &&
|
||||
plane->type == DRM_PLANE_TYPE_PRIMARY) {
|
||||
if (priv->soc_info->has_osd && plane != &priv->f0) {
|
||||
switch (fourcc) {
|
||||
case DRM_FORMAT_XRGB1555:
|
||||
ctrl |= JZ_LCD_OSDCTRL_RGB555;
|
||||
@@ -423,7 +422,7 @@ void ingenic_drm_plane_config(struct device *dev,
|
||||
}
|
||||
|
||||
if (priv->soc_info->has_osd) {
|
||||
if (plane->type == DRM_PLANE_TYPE_PRIMARY) {
|
||||
if (plane != &priv->f0) {
|
||||
xy_reg = JZ_REG_LCD_XYP1;
|
||||
size_reg = JZ_REG_LCD_SIZE1;
|
||||
} else {
|
||||
@@ -455,7 +454,7 @@ static void ingenic_drm_plane_atomic_update(struct drm_plane *plane,
|
||||
height = state->src_h >> 16;
|
||||
cpp = state->fb->format->cpp[0];
|
||||
|
||||
if (priv->soc_info->has_osd && plane->type == DRM_PLANE_TYPE_OVERLAY)
|
||||
if (!priv->soc_info->has_osd || plane == &priv->f0)
|
||||
hwdesc = priv->dma_hwdesc_f0;
|
||||
else
|
||||
hwdesc = priv->dma_hwdesc_f1;
|
||||
@@ -692,6 +691,7 @@ static int ingenic_drm_bind(struct device *dev, bool has_components)
|
||||
const struct jz_soc_info *soc_info;
|
||||
struct ingenic_drm *priv;
|
||||
struct clk *parent_clk;
|
||||
struct drm_plane *primary;
|
||||
struct drm_bridge *bridge;
|
||||
struct drm_panel *panel;
|
||||
struct drm_encoder *encoder;
|
||||
@@ -784,9 +784,11 @@ static int ingenic_drm_bind(struct device *dev, bool has_components)
|
||||
if (soc_info->has_osd)
|
||||
priv->ipu_plane = drm_plane_from_index(drm, 0);
|
||||
|
||||
drm_plane_helper_add(&priv->f1, &ingenic_drm_plane_helper_funcs);
|
||||
primary = priv->soc_info->has_osd ? &priv->f1 : &priv->f0;
|
||||
|
||||
ret = drm_universal_plane_init(drm, &priv->f1, 1,
|
||||
drm_plane_helper_add(primary, &ingenic_drm_plane_helper_funcs);
|
||||
|
||||
ret = drm_universal_plane_init(drm, primary, 1,
|
||||
&ingenic_drm_primary_plane_funcs,
|
||||
ingenic_drm_primary_formats,
|
||||
ARRAY_SIZE(ingenic_drm_primary_formats),
|
||||
@@ -798,7 +800,7 @@ static int ingenic_drm_bind(struct device *dev, bool has_components)
|
||||
|
||||
drm_crtc_helper_add(&priv->crtc, &ingenic_drm_crtc_helper_funcs);
|
||||
|
||||
ret = drm_crtc_init_with_planes(drm, &priv->crtc, &priv->f1,
|
||||
ret = drm_crtc_init_with_planes(drm, &priv->crtc, primary,
|
||||
NULL, &ingenic_drm_crtc_funcs, NULL);
|
||||
if (ret) {
|
||||
dev_err(dev, "Failed to init CRTC: %i\n", ret);
|
||||
|
@@ -753,7 +753,7 @@ static int ingenic_ipu_bind(struct device *dev, struct device *master, void *d)
|
||||
|
||||
err = drm_universal_plane_init(drm, plane, 1, &ingenic_ipu_plane_funcs,
|
||||
soc_info->formats, soc_info->num_formats,
|
||||
NULL, DRM_PLANE_TYPE_PRIMARY, NULL);
|
||||
NULL, DRM_PLANE_TYPE_OVERLAY, NULL);
|
||||
if (err) {
|
||||
dev_err(dev, "Failed to init plane: %i\n", err);
|
||||
return err;
|
||||
|
@@ -215,6 +215,22 @@ static ssize_t port_show(struct device *dev, struct device_attribute *attr,
|
||||
|
||||
static DEVICE_ATTR_RO(port);
|
||||
|
||||
static void intel_th_trace_prepare(struct intel_th_device *thdev)
|
||||
{
|
||||
struct intel_th_device *hub = to_intel_th_hub(thdev);
|
||||
struct intel_th_driver *hubdrv = to_intel_th_driver(hub->dev.driver);
|
||||
|
||||
if (hub->type != INTEL_TH_SWITCH)
|
||||
return;
|
||||
|
||||
if (thdev->type != INTEL_TH_OUTPUT)
|
||||
return;
|
||||
|
||||
pm_runtime_get_sync(&thdev->dev);
|
||||
hubdrv->prepare(hub, &thdev->output);
|
||||
pm_runtime_put(&thdev->dev);
|
||||
}
|
||||
|
||||
static int intel_th_output_activate(struct intel_th_device *thdev)
|
||||
{
|
||||
struct intel_th_driver *thdrv =
|
||||
@@ -235,6 +251,7 @@ static int intel_th_output_activate(struct intel_th_device *thdev)
|
||||
if (ret)
|
||||
goto fail_put;
|
||||
|
||||
intel_th_trace_prepare(thdev);
|
||||
if (thdrv->activate)
|
||||
ret = thdrv->activate(thdev);
|
||||
else
|
||||
|
@@ -564,6 +564,21 @@ static void gth_tscu_resync(struct gth_device *gth)
|
||||
iowrite32(reg, gth->base + REG_TSCU_TSUCTRL);
|
||||
}
|
||||
|
||||
static void intel_th_gth_prepare(struct intel_th_device *thdev,
|
||||
struct intel_th_output *output)
|
||||
{
|
||||
struct gth_device *gth = dev_get_drvdata(&thdev->dev);
|
||||
int count;
|
||||
|
||||
/*
|
||||
* Wait until the output port is in reset before we start
|
||||
* programming it.
|
||||
*/
|
||||
for (count = GTH_PLE_WAITLOOP_DEPTH;
|
||||
count && !(gth_output_get(gth, output->port) & BIT(5)); count--)
|
||||
cpu_relax();
|
||||
}
|
||||
|
||||
/**
|
||||
* intel_th_gth_enable() - enable tracing to an output device
|
||||
* @thdev: GTH device
|
||||
@@ -815,6 +830,7 @@ static struct intel_th_driver intel_th_gth_driver = {
|
||||
.assign = intel_th_gth_assign,
|
||||
.unassign = intel_th_gth_unassign,
|
||||
.set_output = intel_th_gth_set_output,
|
||||
.prepare = intel_th_gth_prepare,
|
||||
.enable = intel_th_gth_enable,
|
||||
.trig_switch = intel_th_gth_switch,
|
||||
.disable = intel_th_gth_disable,
|
||||
|
@@ -143,6 +143,7 @@ intel_th_output_assigned(struct intel_th_device *thdev)
|
||||
* @remove: remove method
|
||||
* @assign: match a given output type device against available outputs
|
||||
* @unassign: deassociate an output type device from an output port
|
||||
* @prepare: prepare output port for tracing
|
||||
* @enable: enable tracing for a given output device
|
||||
* @disable: disable tracing for a given output device
|
||||
* @irq: interrupt callback
|
||||
@@ -164,6 +165,8 @@ struct intel_th_driver {
|
||||
struct intel_th_device *othdev);
|
||||
void (*unassign)(struct intel_th_device *thdev,
|
||||
struct intel_th_device *othdev);
|
||||
void (*prepare)(struct intel_th_device *thdev,
|
||||
struct intel_th_output *output);
|
||||
void (*enable)(struct intel_th_device *thdev,
|
||||
struct intel_th_output *output);
|
||||
void (*trig_switch)(struct intel_th_device *thdev,
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#include <linux/i2c-smbus.h>
|
||||
#include <linux/idr.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/irqflags.h>
|
||||
#include <linux/jump_label.h>
|
||||
#include <linux/kernel.h>
|
||||
@@ -585,6 +586,8 @@ static void i2c_device_shutdown(struct device *dev)
|
||||
driver = to_i2c_driver(dev->driver);
|
||||
if (driver->shutdown)
|
||||
driver->shutdown(client);
|
||||
else if (client->irq > 0)
|
||||
disable_irq(client->irq);
|
||||
}
|
||||
|
||||
static void i2c_client_dev_release(struct device *dev)
|
||||
|
@@ -366,14 +366,7 @@ out_unlock:
|
||||
|
||||
static int fxas21002c_pm_get(struct fxas21002c_data *data)
|
||||
{
|
||||
struct device *dev = regmap_get_device(data->regmap);
|
||||
int ret;
|
||||
|
||||
ret = pm_runtime_get_sync(dev);
|
||||
if (ret < 0)
|
||||
pm_runtime_put_noidle(dev);
|
||||
|
||||
return ret;
|
||||
return pm_runtime_resume_and_get(regmap_get_device(data->regmap));
|
||||
}
|
||||
|
||||
static int fxas21002c_pm_put(struct fxas21002c_data *data)
|
||||
@@ -1005,7 +998,6 @@ int fxas21002c_core_probe(struct device *dev, struct regmap *regmap, int irq,
|
||||
pm_disable:
|
||||
pm_runtime_disable(dev);
|
||||
pm_runtime_set_suspended(dev);
|
||||
pm_runtime_put_noidle(dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -1019,7 +1011,6 @@ void fxas21002c_core_remove(struct device *dev)
|
||||
|
||||
pm_runtime_disable(dev);
|
||||
pm_runtime_set_suspended(dev);
|
||||
pm_runtime_put_noidle(dev);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(fxas21002c_core_remove);
|
||||
|
||||
|
@@ -263,7 +263,7 @@ static int bmc150_magn_set_power_state(struct bmc150_magn_data *data, bool on)
|
||||
int ret;
|
||||
|
||||
if (on) {
|
||||
ret = pm_runtime_get_sync(data->dev);
|
||||
ret = pm_runtime_resume_and_get(data->dev);
|
||||
} else {
|
||||
pm_runtime_mark_last_busy(data->dev);
|
||||
ret = pm_runtime_put_autosuspend(data->dev);
|
||||
@@ -272,9 +272,6 @@ static int bmc150_magn_set_power_state(struct bmc150_magn_data *data, bool on)
|
||||
if (ret < 0) {
|
||||
dev_err(data->dev,
|
||||
"failed to change power state to %d\n", on);
|
||||
if (on)
|
||||
pm_runtime_put_noidle(data->dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
@@ -944,12 +941,14 @@ int bmc150_magn_probe(struct device *dev, struct regmap *regmap,
|
||||
ret = iio_device_register(indio_dev);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "unable to register iio device\n");
|
||||
goto err_buffer_cleanup;
|
||||
goto err_disable_runtime_pm;
|
||||
}
|
||||
|
||||
dev_dbg(dev, "Registered device %s\n", name);
|
||||
return 0;
|
||||
|
||||
err_disable_runtime_pm:
|
||||
pm_runtime_disable(dev);
|
||||
err_buffer_cleanup:
|
||||
iio_triggered_buffer_cleanup(indio_dev);
|
||||
err_free_irq:
|
||||
@@ -973,7 +972,6 @@ int bmc150_magn_remove(struct device *dev)
|
||||
|
||||
pm_runtime_disable(dev);
|
||||
pm_runtime_set_suspended(dev);
|
||||
pm_runtime_put_noidle(dev);
|
||||
|
||||
iio_triggered_buffer_cleanup(indio_dev);
|
||||
|
||||
|
@@ -361,13 +361,16 @@ static int hideep_enter_pgm(struct hideep_ts *ts)
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
static void hideep_nvm_unlock(struct hideep_ts *ts)
|
||||
static int hideep_nvm_unlock(struct hideep_ts *ts)
|
||||
{
|
||||
u32 unmask_code;
|
||||
int error;
|
||||
|
||||
hideep_pgm_w_reg(ts, HIDEEP_FLASH_CFG, HIDEEP_NVM_SFR_RPAGE);
|
||||
hideep_pgm_r_reg(ts, 0x0000000C, &unmask_code);
|
||||
error = hideep_pgm_r_reg(ts, 0x0000000C, &unmask_code);
|
||||
hideep_pgm_w_reg(ts, HIDEEP_FLASH_CFG, HIDEEP_NVM_DEFAULT_PAGE);
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
/* make it unprotected code */
|
||||
unmask_code &= ~HIDEEP_PROT_MODE;
|
||||
@@ -384,6 +387,8 @@ static void hideep_nvm_unlock(struct hideep_ts *ts)
|
||||
NVM_W_SFR(HIDEEP_NVM_MASK_OFS, ts->nvm_mask);
|
||||
SET_FLASH_HWCONTROL();
|
||||
hideep_pgm_w_reg(ts, HIDEEP_FLASH_CFG, HIDEEP_NVM_DEFAULT_PAGE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int hideep_check_status(struct hideep_ts *ts)
|
||||
@@ -462,7 +467,9 @@ static int hideep_program_nvm(struct hideep_ts *ts,
|
||||
u32 addr = 0;
|
||||
int error;
|
||||
|
||||
hideep_nvm_unlock(ts);
|
||||
error = hideep_nvm_unlock(ts);
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
while (ucode_len > 0) {
|
||||
xfer_len = min_t(size_t, ucode_len, HIDEEP_NVM_PAGE_SIZE);
|
||||
|
@@ -74,7 +74,7 @@ static bool using_legacy_binding, using_generic_binding;
|
||||
static inline int arm_smmu_rpm_get(struct arm_smmu_device *smmu)
|
||||
{
|
||||
if (pm_runtime_enabled(smmu->dev))
|
||||
return pm_runtime_get_sync(smmu->dev);
|
||||
return pm_runtime_resume_and_get(smmu->dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1278,6 +1278,7 @@ static phys_addr_t arm_smmu_iova_to_phys_hard(struct iommu_domain *domain,
|
||||
u64 phys;
|
||||
unsigned long va, flags;
|
||||
int ret, idx = cfg->cbndx;
|
||||
phys_addr_t addr = 0;
|
||||
|
||||
ret = arm_smmu_rpm_get(smmu);
|
||||
if (ret < 0)
|
||||
@@ -1297,6 +1298,7 @@ static phys_addr_t arm_smmu_iova_to_phys_hard(struct iommu_domain *domain,
|
||||
dev_err(dev,
|
||||
"iova to phys timed out on %pad. Falling back to software table walk.\n",
|
||||
&iova);
|
||||
arm_smmu_rpm_put(smmu);
|
||||
return ops->iova_to_phys(ops, iova);
|
||||
}
|
||||
|
||||
@@ -1305,12 +1307,14 @@ static phys_addr_t arm_smmu_iova_to_phys_hard(struct iommu_domain *domain,
|
||||
if (phys & ARM_SMMU_CB_PAR_F) {
|
||||
dev_err(dev, "translation fault!\n");
|
||||
dev_err(dev, "PAR = 0x%llx\n", phys);
|
||||
return 0;
|
||||
goto out;
|
||||
}
|
||||
|
||||
addr = (phys & GENMASK_ULL(39, 12)) | (iova & 0xfff);
|
||||
out:
|
||||
arm_smmu_rpm_put(smmu);
|
||||
|
||||
return (phys & GENMASK_ULL(39, 12)) | (iova & 0xfff);
|
||||
return addr;
|
||||
}
|
||||
|
||||
static phys_addr_t arm_smmu_iova_to_phys(struct iommu_domain *domain,
|
||||
|
@@ -148,16 +148,20 @@ static int
|
||||
tlc591xx_probe(struct i2c_client *client,
|
||||
const struct i2c_device_id *id)
|
||||
{
|
||||
struct device_node *np = dev_of_node(&client->dev), *child;
|
||||
struct device_node *np, *child;
|
||||
struct device *dev = &client->dev;
|
||||
const struct tlc591xx *tlc591xx;
|
||||
struct tlc591xx_priv *priv;
|
||||
int err, count, reg;
|
||||
|
||||
tlc591xx = device_get_match_data(dev);
|
||||
np = dev_of_node(dev);
|
||||
if (!np)
|
||||
return -ENODEV;
|
||||
|
||||
tlc591xx = device_get_match_data(dev);
|
||||
if (!tlc591xx)
|
||||
return -ENODEV;
|
||||
|
||||
count = of_get_available_child_count(np);
|
||||
if (!count || count > tlc591xx->max_leds)
|
||||
return -EINVAL;
|
||||
|
@@ -277,6 +277,7 @@ static const struct i2c_device_id omnia_id[] = {
|
||||
{ "omnia", 0 },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, omnia_id);
|
||||
|
||||
static struct i2c_driver omnia_leds_driver = {
|
||||
.probe = omnia_leds_probe,
|
||||
|
@@ -600,8 +600,10 @@ static int atmel_ebi_probe(struct platform_device *pdev)
|
||||
child);
|
||||
|
||||
ret = atmel_ebi_dev_disable(ebi, child);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
of_node_put(child);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -97,7 +97,6 @@ static int fsl_ifc_ctrl_remove(struct platform_device *dev)
|
||||
iounmap(ctrl->gregs);
|
||||
|
||||
dev_set_drvdata(&dev->dev, NULL);
|
||||
kfree(ctrl);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -209,7 +208,8 @@ static int fsl_ifc_ctrl_probe(struct platform_device *dev)
|
||||
|
||||
dev_info(&dev->dev, "Freescale Integrated Flash Controller\n");
|
||||
|
||||
fsl_ifc_ctrl_dev = kzalloc(sizeof(*fsl_ifc_ctrl_dev), GFP_KERNEL);
|
||||
fsl_ifc_ctrl_dev = devm_kzalloc(&dev->dev, sizeof(*fsl_ifc_ctrl_dev),
|
||||
GFP_KERNEL);
|
||||
if (!fsl_ifc_ctrl_dev)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -219,8 +219,7 @@ static int fsl_ifc_ctrl_probe(struct platform_device *dev)
|
||||
fsl_ifc_ctrl_dev->gregs = of_iomap(dev->dev.of_node, 0);
|
||||
if (!fsl_ifc_ctrl_dev->gregs) {
|
||||
dev_err(&dev->dev, "failed to get memory region\n");
|
||||
ret = -ENODEV;
|
||||
goto err;
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
if (of_property_read_bool(dev->dev.of_node, "little-endian")) {
|
||||
@@ -295,6 +294,7 @@ err_irq:
|
||||
free_irq(fsl_ifc_ctrl_dev->irq, fsl_ifc_ctrl_dev);
|
||||
irq_dispose_mapping(fsl_ifc_ctrl_dev->irq);
|
||||
err:
|
||||
iounmap(fsl_ifc_ctrl_dev->gregs);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@@ -407,6 +407,7 @@ static int pl353_smc_probe(struct amba_device *adev, const struct amba_id *id)
|
||||
break;
|
||||
}
|
||||
if (!match) {
|
||||
err = -ENODEV;
|
||||
dev_err(&adev->dev, "no matching children\n");
|
||||
goto out_clk_disable;
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user