mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
Merge branch 'topic/firewire-include-fix' into for-linus
Pull header inclusion fix for firewire drivers Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
commit
e122319a45
1
.mailmap
1
.mailmap
|
|
@ -373,6 +373,7 @@ Jarkko Sakkinen <jarkko@kernel.org> <jarkko.sakkinen@opinsys.com>
|
|||
Jason Gunthorpe <jgg@ziepe.ca> <jgg@mellanox.com>
|
||||
Jason Gunthorpe <jgg@ziepe.ca> <jgg@nvidia.com>
|
||||
Jason Gunthorpe <jgg@ziepe.ca> <jgunthorpe@obsidianresearch.com>
|
||||
Jason Wang <jasowangio@gmail.com> <jasowang@redhat.com>
|
||||
Jason Xing <kerneljasonxing@gmail.com> <kernelxing@tencent.com>
|
||||
<javier@osg.samsung.com> <javier.martinez@collabora.co.uk>
|
||||
Javi Merino <javi.merino@kernel.org> <javi.merino@arm.com>
|
||||
|
|
|
|||
|
|
@ -29,3 +29,29 @@ Date: Oct 2025
|
|||
KernelVersion: 6.18
|
||||
Contact: Cédric Le Goater <clg@redhat.com>
|
||||
Description: Read the migration features of the vfio device.
|
||||
|
||||
What: /sys/kernel/debug/vfio/<device>/pci
|
||||
Date: June 2026
|
||||
KernelVersion: 7.2
|
||||
Contact: Alex Williamson <alex.williamson@nvidia.com>
|
||||
Description: This debugfs file directory is used for debugging
|
||||
VFIO PCI devices.
|
||||
|
||||
What: /sys/kernel/debug/vfio/<device>/pci/nointxmask
|
||||
Date: June 2026
|
||||
KernelVersion: 7.2
|
||||
Contact: Alex Williamson <alex.williamson@nvidia.com>
|
||||
Description: Read the nointxmask policy latched for this device. This
|
||||
policy governs whether the device may use PCI 2.3 style
|
||||
INTx masking when supported, reporting a value of "N", or
|
||||
requires APIC level INTx masking, reporting a value of "Y".
|
||||
|
||||
What: /sys/kernel/debug/vfio/<device>/pci/disable_idle_d3
|
||||
Date: June 2026
|
||||
KernelVersion: 7.2
|
||||
Contact: Alex Williamson <alex.williamson@nvidia.com>
|
||||
Description: Read the disable_idle_d3 policy latched for this device. This
|
||||
policy governs whether the device PM runtime usage count is
|
||||
kept elevated while the device is bound to the driver and
|
||||
unused, reporting a value of "Y", or decremented to allow the
|
||||
device to enter a low power state, reporting a value of "N".
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@ properties:
|
|||
- enum:
|
||||
- mscc,ocelot-spi
|
||||
- mscc,jaguar2-spi
|
||||
- renesas,rzn1-spi
|
||||
- sophgo,sg2042-spi
|
||||
- thead,th1520-spi
|
||||
- const: snps,dw-apb-ssi
|
||||
|
|
@ -94,6 +93,9 @@ properties:
|
|||
- const: ssi_clk
|
||||
- const: pclk
|
||||
|
||||
power-domains:
|
||||
maxItems: 1
|
||||
|
||||
resets:
|
||||
maxItems: 1
|
||||
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ ACLs Partially Supported. only DACLs available, SACLs
|
|||
to allow future support for running as a domain
|
||||
member.
|
||||
Kerberos Supported.
|
||||
Durable handle v1,v2 Planned for future.
|
||||
Durable handle v1,v2 Supported.
|
||||
Persistent handle Planned for future.
|
||||
SMB2 notify Planned for future.
|
||||
Sparse file support Supported.
|
||||
|
|
@ -111,7 +111,7 @@ DCE/RPC support Partially Supported. a few calls(NetShareEnumAll,
|
|||
for Witness protocol e.g.)
|
||||
ksmbd/nfsd interoperability Planned for future. The features that ksmbd
|
||||
support are Leases, Notify, ACLs and Share modes.
|
||||
SMB3.1.1 Compression Planned for future.
|
||||
SMB3.1.1 Compression Supported.
|
||||
SMB3.1.1 over QUIC Planned for future.
|
||||
Signing/Encryption over RDMA Planned for future.
|
||||
SMB3.1.1 GMAC signing support Planned for future.
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ these logs can be cleared by writing in the proper reset_history attribute.
|
|||
``/sys/kernel/debug/i2c/i2c-[X]/[X]-addr/``
|
||||
contains the following attributes:
|
||||
|
||||
======================= ==========================================
|
||||
============================== ==========================================================
|
||||
power1_failed_fault_log Set to 1 by a power1 fault occurring.
|
||||
power1_good_input_fault_log Set to 1 by a power1 good input fault occurring at PGIO3.
|
||||
in11_fet_short_fault_log Set to 1 when a FET-short fault occurs.
|
||||
|
|
@ -264,4 +264,4 @@ in11_fet_bad_fault_log Set to 1 when a FET-BAD fault occurs.
|
|||
in0_lcrit_fault_log Set to 1 by a VIN undervoltage fault occurring.
|
||||
in0_crit_fault_log Set to 1 by a VIN overvoltage fault occurring.
|
||||
curr1_crit_fault_log Set to 1 by an overcurrent fault occurring.
|
||||
======================= ==========================================
|
||||
============================== ==========================================================
|
||||
|
|
|
|||
22
MAINTAINERS
22
MAINTAINERS
|
|
@ -15738,8 +15738,8 @@ F: drivers/net/ethernet/marvell/octeon_ep_vf
|
|||
MARVELL OCTEONTX2 PHYSICAL FUNCTION DRIVER
|
||||
M: Sunil Goutham <sgoutham@marvell.com>
|
||||
M: Geetha sowjanya <gakula@marvell.com>
|
||||
M: Ratheesh Kannoth <rkannoth@marvell.com>
|
||||
M: Subbaraya Sundeep <sbhatta@marvell.com>
|
||||
M: hariprasad <hkelam@marvell.com>
|
||||
M: Bharat Bhushan <bbhushan2@marvell.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
|
|
@ -15748,9 +15748,8 @@ F: include/linux/soc/marvell/octeontx2/
|
|||
|
||||
MARVELL OCTEONTX2 RVU ADMIN FUNCTION DRIVER
|
||||
M: Sunil Goutham <sgoutham@marvell.com>
|
||||
M: Linu Cherian <lcherian@marvell.com>
|
||||
M: Ratheesh Kannoth <rkannoth@marvell.com>
|
||||
M: Geetha sowjanya <gakula@marvell.com>
|
||||
M: hariprasad <hkelam@marvell.com>
|
||||
M: Subbaraya Sundeep <sbhatta@marvell.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
|
|
@ -15758,8 +15757,8 @@ F: Documentation/networking/device_drivers/ethernet/marvell/octeontx2.rst
|
|||
F: drivers/net/ethernet/marvell/octeontx2/af/
|
||||
|
||||
MARVELL PEM PMU DRIVER
|
||||
M: Linu Cherian <lcherian@marvell.com>
|
||||
M: Gowthami Thiagarajan <gthiagarajan@marvell.com>
|
||||
M: Geetha sowjanya <gakula@marvell.com>
|
||||
S: Supported
|
||||
F: drivers/perf/marvell_pem_pmu.c
|
||||
|
||||
|
|
@ -18442,6 +18441,7 @@ F: drivers/net/ethernet/mucse/
|
|||
|
||||
MULTIFUNCTION DEVICES (MFD)
|
||||
M: Lee Jones <lee@kernel.org>
|
||||
L: mfd@lists.linux.dev
|
||||
S: Maintained
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git
|
||||
F: Documentation/devicetree/bindings/mfd/
|
||||
|
|
@ -27521,7 +27521,7 @@ F: drivers/net/ethernet/dec/tulip/
|
|||
|
||||
TUN/TAP DRIVER
|
||||
M: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
|
||||
M: Jason Wang <jasowang@redhat.com>
|
||||
M: Jason Wang <jasowangio@gmail.com>
|
||||
S: Maintained
|
||||
W: http://vtun.sourceforge.net/tun
|
||||
F: Documentation/networking/tuntap.rst
|
||||
|
|
@ -28513,7 +28513,7 @@ F: include/uapi/linux/virtio_balloon.h
|
|||
|
||||
VIRTIO BLOCK AND SCSI DRIVERS
|
||||
M: "Michael S. Tsirkin" <mst@redhat.com>
|
||||
M: Jason Wang <jasowang@redhat.com>
|
||||
M: Jason Wang <jasowangio@gmail.com>
|
||||
R: Paolo Bonzini <pbonzini@redhat.com>
|
||||
R: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
R: Eugenio Pérez <eperezma@redhat.com>
|
||||
|
|
@ -28542,7 +28542,7 @@ F: include/uapi/linux/virtio_console.h
|
|||
|
||||
VIRTIO CORE
|
||||
M: "Michael S. Tsirkin" <mst@redhat.com>
|
||||
M: Jason Wang <jasowang@redhat.com>
|
||||
M: Jason Wang <jasowangio@gmail.com>
|
||||
R: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
|
||||
R: Eugenio Pérez <eperezma@redhat.com>
|
||||
L: virtualization@lists.linux.dev
|
||||
|
|
@ -28620,7 +28620,7 @@ F: include/uapi/linux/virtio_gpu.h
|
|||
|
||||
VIRTIO HOST (VHOST)
|
||||
M: "Michael S. Tsirkin" <mst@redhat.com>
|
||||
M: Jason Wang <jasowang@redhat.com>
|
||||
M: Jason Wang <jasowangio@gmail.com>
|
||||
R: Eugenio Pérez <eperezma@redhat.com>
|
||||
L: kvm@vger.kernel.org
|
||||
L: virtualization@lists.linux.dev
|
||||
|
|
@ -28635,7 +28635,7 @@ F: kernel/vhost_task.c
|
|||
|
||||
VIRTIO HOST (VHOST-SCSI)
|
||||
M: "Michael S. Tsirkin" <mst@redhat.com>
|
||||
M: Jason Wang <jasowang@redhat.com>
|
||||
M: Jason Wang <jasowangio@gmail.com>
|
||||
M: Mike Christie <michael.christie@oracle.com>
|
||||
R: Paolo Bonzini <pbonzini@redhat.com>
|
||||
R: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
|
|
@ -28675,7 +28675,7 @@ F: include/uapi/linux/virtio_mem.h
|
|||
|
||||
VIRTIO NET DRIVER
|
||||
M: "Michael S. Tsirkin" <mst@redhat.com>
|
||||
M: Jason Wang <jasowang@redhat.com>
|
||||
M: Jason Wang <jasowangio@gmail.com>
|
||||
R: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
|
||||
R: Eugenio Pérez <eperezma@redhat.com>
|
||||
L: netdev@vger.kernel.org
|
||||
|
|
@ -28726,7 +28726,7 @@ F: include/linux/vbox_utils.h
|
|||
F: include/uapi/linux/vbox*.h
|
||||
|
||||
VIRTUAL BOX SHARED FOLDER VFS DRIVER
|
||||
M: Hans de Goede <hansg@kernel.org>
|
||||
M: Jori Koolstra <jkoolstra@xs4all.nl>
|
||||
L: linux-fsdevel@vger.kernel.org
|
||||
S: Maintained
|
||||
F: fs/vboxsf/*
|
||||
|
|
|
|||
2
Makefile
2
Makefile
|
|
@ -2,7 +2,7 @@
|
|||
VERSION = 7
|
||||
PATCHLEVEL = 2
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc1
|
||||
EXTRAVERSION = -rc2
|
||||
NAME = Baby Opossum Posse
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
#include <linux/irqdomain.h>
|
||||
#include <linux/clocksource.h>
|
||||
#include <linux/clockchips.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
|
||||
#include <asm/setup.h>
|
||||
#include <asm/mach/arch.h>
|
||||
|
|
|
|||
|
|
@ -2177,7 +2177,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_verifier_env *env, struct bpf_pr
|
|||
image_size = extable_offset + extable_size;
|
||||
ro_header = bpf_jit_binary_pack_alloc(image_size, &ro_image_ptr,
|
||||
sizeof(u64), &header, &image_ptr,
|
||||
jit_fill_hole);
|
||||
jit_fill_hole, was_classic);
|
||||
if (!ro_header)
|
||||
goto out_off;
|
||||
|
||||
|
|
@ -2870,7 +2870,7 @@ int arch_bpf_trampoline_size(const struct btf_func_model *m, u32 flags,
|
|||
|
||||
void *arch_alloc_bpf_trampoline(unsigned int size)
|
||||
{
|
||||
return bpf_prog_pack_alloc(size, jit_fill_hole);
|
||||
return bpf_prog_pack_alloc(size, jit_fill_hole, false);
|
||||
}
|
||||
|
||||
void arch_free_bpf_trampoline(void *image, unsigned int size)
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include <linux/err.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/kvm_host.h>
|
||||
#include <asm/cacheflush.h>
|
||||
#include <asm/cpufeature.h>
|
||||
|
|
|
|||
|
|
@ -1790,7 +1790,7 @@ static int invoke_bpf(struct jit_ctx *ctx, struct bpf_tramp_nodes *tn,
|
|||
|
||||
void *arch_alloc_bpf_trampoline(unsigned int size)
|
||||
{
|
||||
return bpf_prog_pack_alloc(size, jit_fill_hole);
|
||||
return bpf_prog_pack_alloc(size, jit_fill_hole, false);
|
||||
}
|
||||
|
||||
void arch_free_bpf_trampoline(void *image, unsigned int size)
|
||||
|
|
@ -2256,7 +2256,8 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_verifier_env *env, struct bpf_pr
|
|||
image_size = prog_size + extable_size;
|
||||
/* Now we know the size of the structure to make */
|
||||
ro_header = bpf_jit_binary_pack_alloc(image_size, &ro_image_ptr, sizeof(u32),
|
||||
&header, &image_ptr, jit_fill_hole);
|
||||
&header, &image_ptr, jit_fill_hole,
|
||||
bpf_prog_was_classic(prog));
|
||||
if (!ro_header)
|
||||
goto out_offset;
|
||||
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ CONFIG_DMA_JZ4780=y
|
|||
# CONFIG_INGENIC_TIMER is not set
|
||||
CONFIG_INGENIC_SYSOST=y
|
||||
# CONFIG_IOMMU_SUPPORT is not set
|
||||
CONFIG_JZ4770_PHY=y
|
||||
CONFIG_PHY_INGENIC_USB=y
|
||||
CONFIG_EXT4_FS=y
|
||||
# CONFIG_DNOTIFY is not set
|
||||
CONFIG_AUTOFS_FS=y
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ CONFIG_DMA_JZ4780=y
|
|||
# CONFIG_INGENIC_TIMER is not set
|
||||
CONFIG_INGENIC_SYSOST=y
|
||||
# CONFIG_IOMMU_SUPPORT is not set
|
||||
CONFIG_JZ4770_PHY=y
|
||||
CONFIG_PHY_INGENIC_USB=y
|
||||
CONFIG_EXT4_FS=y
|
||||
# CONFIG_DNOTIFY is not set
|
||||
CONFIG_AUTOFS_FS=y
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ CONFIG_USB_MUSB_HDRC=y
|
|||
CONFIG_USB_MUSB_GADGET=y
|
||||
CONFIG_USB_MUSB_JZ4740=y
|
||||
CONFIG_USB_INVENTRA_DMA=y
|
||||
CONFIG_JZ4770_PHY=y
|
||||
CONFIG_PHY_INGENIC_USB=y
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_GADGET_VBUS_DRAW=500
|
||||
CONFIG_USB_ETH=y
|
||||
|
|
|
|||
|
|
@ -38,6 +38,10 @@ static struct platform_device dec_rtc_device = {
|
|||
.num_resources = ARRAY_SIZE(dec_rtc_resources),
|
||||
};
|
||||
|
||||
static struct platform_device *dec_rtc_devices[] __initdata = {
|
||||
&dec_rtc_device,
|
||||
};
|
||||
|
||||
static struct resource dec_dz_resources[] = {
|
||||
{ .name = "dz", .flags = IORESOURCE_MEM, },
|
||||
{ .name = "dz", .flags = IORESOURCE_IRQ, },
|
||||
|
|
@ -137,7 +141,7 @@ static int __init dec_add_devices(void)
|
|||
}
|
||||
num_zs = i;
|
||||
|
||||
ret1 = platform_device_register(&dec_rtc_device);
|
||||
ret1 = platform_add_devices(dec_rtc_devices, 1);
|
||||
ret2 = IS_ENABLED(CONFIG_32BIT) ?
|
||||
platform_add_devices(dec_dz_devices, num_dz) : 0;
|
||||
ret3 = platform_add_devices(dec_zs_devices, num_zs);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
#define __ASM_CDMM_H
|
||||
|
||||
#include <linux/device.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/device-id/mips_cdmm.h>
|
||||
|
||||
/**
|
||||
* struct mips_cdmm_device - Represents a single device on a CDMM bus.
|
||||
|
|
|
|||
9
arch/mips/include/asm/irq_work.h
Normal file
9
arch/mips/include/asm/irq_work.h
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
|
||||
#ifndef _ASM_MIPS_IRQ_WORK_H
|
||||
#define _ASM_MIPS_IRQ_WORK_H
|
||||
static inline bool arch_irq_work_has_interrupt(void)
|
||||
{
|
||||
return IS_ENABLED(CONFIG_MACH_LOONGSON64) && IS_ENABLED(CONFIG_SMP);
|
||||
}
|
||||
#endif /* _ASM_MIPS_IRQ_WORK_H */
|
||||
|
|
@ -50,6 +50,8 @@ extern int __cpu_logical_map[NR_CPUS];
|
|||
#define SMP_CALL_FUNCTION 0x2
|
||||
/* Octeon - Tell another core to flush its icache */
|
||||
#define SMP_ICACHE_FLUSH 0x4
|
||||
/* Loongson64 - Self IPI for IRQ work */
|
||||
#define SMP_IRQ_WORK 0x8
|
||||
|
||||
/* Mask of CPUs which are currently definitely operating coherently */
|
||||
extern cpumask_t cpu_coherent_mask;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
*/
|
||||
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include <lantiq_soc.h>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
#include <linux/interrupt.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/of_irq.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
#include <linux/err.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/gpio/consumer.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -381,6 +381,13 @@ loongson3_send_ipi_mask(const struct cpumask *mask, unsigned int action)
|
|||
ipi_write_action(cpu_logical_map(i), (u32)action);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_IRQ_WORK
|
||||
void arch_irq_work_raise(void)
|
||||
{
|
||||
loongson3_send_ipi_single(smp_processor_id(), SMP_IRQ_WORK);
|
||||
}
|
||||
#endif
|
||||
|
||||
static irqreturn_t loongson3_ipi_interrupt(int irq, void *dev_id)
|
||||
{
|
||||
int cpu = smp_processor_id();
|
||||
|
|
@ -397,6 +404,9 @@ static irqreturn_t loongson3_ipi_interrupt(int irq, void *dev_id)
|
|||
irq_exit();
|
||||
}
|
||||
|
||||
if (action & SMP_IRQ_WORK)
|
||||
irq_work_run();
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -426,10 +426,11 @@ static inline void __init highmem_init(void)
|
|||
unsigned long tmp;
|
||||
|
||||
/*
|
||||
* If CPU cannot support HIGHMEM discard the memory above highstart_pfn
|
||||
* If CPU cannot support HIGHMEM discard any memory above highstart_pfn
|
||||
*/
|
||||
if (cpu_has_dc_aliases) {
|
||||
memblock_remove(PFN_PHYS(highstart_pfn), -1);
|
||||
if (highstart_pfn)
|
||||
memblock_remove(PFN_PHYS(highstart_pfn), -1);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
#include <linux/pci.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include <asm/mach-ralink/rt288x.h>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
#include <linux/err.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/timer.h>
|
||||
#include <linux/types.h>
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include <asm/isa-rev.h>
|
||||
|
||||
#include <linux/build-salt.h>
|
||||
#include <linux/elfnote.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
|
|
@ -15,6 +16,8 @@ ELFNOTE_START(Linux, 0, "a")
|
|||
.long LINUX_VERSION_CODE
|
||||
ELFNOTE_END
|
||||
|
||||
BUILD_SALT
|
||||
|
||||
/*
|
||||
* The .MIPS.abiflags section must be defined with the FP ABI flags set
|
||||
* to 'any' to be able to link with both old and new libraries.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
#ifndef _PARISC_HARDWARE_H
|
||||
#define _PARISC_HARDWARE_H
|
||||
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/device-id/parisc.h>
|
||||
|
||||
#define HWTYPE_ANY_ID PA_HWTYPE_ANY_ID
|
||||
#define HVERSION_ANY_ID PA_HVERSION_ANY_ID
|
||||
|
|
@ -95,8 +95,6 @@ struct bc_module {
|
|||
#define HPHW_MC 15
|
||||
#define HPHW_FAULTY 31
|
||||
|
||||
struct parisc_device_id;
|
||||
|
||||
/* hardware.c: */
|
||||
extern const char *parisc_hardware_description(struct parisc_device_id *id);
|
||||
extern enum cpu_type parisc_get_cpu_type(unsigned long hversion);
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
#define _ASM_PARISC_PARISC_DEVICE_H_
|
||||
|
||||
#include <linux/device.h>
|
||||
#include <linux/device-id/parisc.h>
|
||||
|
||||
struct parisc_device {
|
||||
struct resource hpa; /* Hard Physical Address */
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include <asm/assembly.h>
|
||||
#include <uapi/asm/ptrace.h>
|
||||
#include <linux/compiler.h>
|
||||
|
||||
#define task_regs(task) ((struct pt_regs *) ((char *)(task) + TASK_REGS))
|
||||
|
||||
|
|
|
|||
|
|
@ -295,7 +295,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_verifier_env *env, struct bpf_pr
|
|||
alloclen = proglen + FUNCTION_DESCR_SIZE + fixup_len + extable_len;
|
||||
|
||||
fhdr = bpf_jit_binary_pack_alloc(alloclen, &fimage, 4, &hdr, &image,
|
||||
bpf_jit_fill_ill_insns);
|
||||
bpf_jit_fill_ill_insns, bpf_prog_was_classic(fp));
|
||||
if (!fhdr)
|
||||
goto out_err;
|
||||
|
||||
|
|
@ -588,7 +588,7 @@ bool bpf_jit_inlines_helper_call(s32 imm)
|
|||
|
||||
void *arch_alloc_bpf_trampoline(unsigned int size)
|
||||
{
|
||||
return bpf_prog_pack_alloc(size, bpf_jit_fill_ill_insns);
|
||||
return bpf_prog_pack_alloc(size, bpf_jit_fill_ill_insns, false);
|
||||
}
|
||||
|
||||
void arch_free_bpf_trampoline(void *image, unsigned int size)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/mutex.h>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <asm/reg.h>
|
||||
#include <asm/synch.h>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
#include <linux/sched.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/syscore_ops.h>
|
||||
#include <asm/fsl_lbc.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
#include <linux/export.h>
|
||||
#include <linux/suspend.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -454,7 +454,8 @@ config NR_CPUS
|
|||
range 2 32 if RISCV_SBI_V01 && 32BIT
|
||||
range 2 64 if RISCV_SBI_V01 && 64BIT
|
||||
default "32" if 32BIT
|
||||
default "64" if 64BIT
|
||||
default "64" if RISCV_SBI_V01 && 64BIT
|
||||
default "256" if !RISCV_SBI_V01 && 64BIT
|
||||
|
||||
config HOTPLUG_CPU
|
||||
bool "Support for hot-pluggable CPUs"
|
||||
|
|
|
|||
|
|
@ -501,8 +501,8 @@ void asm_offsets(void)
|
|||
OFFSET(SBI_HART_BOOT_STACK_PTR_OFFSET, sbi_hart_boot_data, stack_ptr);
|
||||
|
||||
DEFINE(STACKFRAME_SIZE_ON_STACK, ALIGN(sizeof(struct stackframe), STACK_ALIGN));
|
||||
OFFSET(STACKFRAME_FP, stackframe, fp);
|
||||
OFFSET(STACKFRAME_RA, stackframe, ra);
|
||||
DEFINE(STACKFRAME_FP, offsetof(struct stackframe, fp) - sizeof(struct stackframe));
|
||||
DEFINE(STACKFRAME_RA, offsetof(struct stackframe, ra) - sizeof(struct stackframe));
|
||||
#ifdef CONFIG_FUNCTION_TRACER
|
||||
DEFINE(FTRACE_OPS_FUNC, offsetof(struct ftrace_ops, func));
|
||||
#ifdef CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
|
||||
|
|
|
|||
|
|
@ -386,8 +386,8 @@ SYM_CODE_END(ret_from_fork_user_asm)
|
|||
SYM_FUNC_START(call_on_irq_stack)
|
||||
/* Create a frame record to save ra and s0 (fp) */
|
||||
addi sp, sp, -STACKFRAME_SIZE_ON_STACK
|
||||
REG_S ra, STACKFRAME_RA(sp)
|
||||
REG_S s0, STACKFRAME_FP(sp)
|
||||
REG_S ra, (STACKFRAME_SIZE_ON_STACK + STACKFRAME_RA)(sp)
|
||||
REG_S s0, (STACKFRAME_SIZE_ON_STACK + STACKFRAME_FP)(sp)
|
||||
addi s0, sp, STACKFRAME_SIZE_ON_STACK
|
||||
|
||||
/* Switch to the per-CPU shadow call stack */
|
||||
|
|
@ -405,8 +405,8 @@ SYM_FUNC_START(call_on_irq_stack)
|
|||
|
||||
/* Switch back to the thread stack and restore ra and s0 */
|
||||
addi sp, s0, -STACKFRAME_SIZE_ON_STACK
|
||||
REG_L ra, STACKFRAME_RA(sp)
|
||||
REG_L s0, STACKFRAME_FP(sp)
|
||||
REG_L ra, (STACKFRAME_SIZE_ON_STACK + STACKFRAME_RA)(sp)
|
||||
REG_L s0, (STACKFRAME_SIZE_ON_STACK + STACKFRAME_FP)(sp)
|
||||
addi sp, sp, STACKFRAME_SIZE_ON_STACK
|
||||
|
||||
ret
|
||||
|
|
|
|||
|
|
@ -41,6 +41,9 @@
|
|||
REG_S x29, PT_T4(sp)
|
||||
REG_S x30, PT_T5(sp)
|
||||
REG_S x31, PT_T6(sp)
|
||||
/* save original sp */
|
||||
addi a0, sp, PT_SIZE_ON_STACK
|
||||
REG_S a0, PT_SP(sp)
|
||||
.endm
|
||||
|
||||
.macro restore_all_base_regs
|
||||
|
|
|
|||
|
|
@ -189,13 +189,12 @@ int arch_cpuhp_kick_ap_alive(unsigned int cpu, struct task_struct *tidle)
|
|||
#else
|
||||
int __cpu_up(unsigned int cpu, struct task_struct *tidle)
|
||||
{
|
||||
int ret = 0;
|
||||
int ret;
|
||||
tidle->thread_info.cpu = cpu;
|
||||
|
||||
ret = start_secondary_cpu(cpu, tidle);
|
||||
if (!ret) {
|
||||
wait_for_completion_timeout(&cpu_running,
|
||||
msecs_to_jiffies(1000));
|
||||
wait_for_completion_timeout(&cpu_running, secs_to_jiffies(1));
|
||||
|
||||
if (!cpu_online(cpu)) {
|
||||
pr_crit("CPU%u: failed to come online\n", cpu);
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
* Here we can supply some information useful to userland.
|
||||
*/
|
||||
|
||||
#include <linux/build-salt.h>
|
||||
#include <linux/elfnote.h>
|
||||
#include <linux/version.h>
|
||||
#include <asm/assembler.h>
|
||||
|
|
@ -12,4 +13,6 @@ ELFNOTE_START(Linux, 0, "a")
|
|||
.long LINUX_VERSION_CODE
|
||||
ELFNOTE_END
|
||||
|
||||
BUILD_SALT
|
||||
|
||||
emit_riscv_feature_1_and
|
||||
|
|
|
|||
|
|
@ -1321,7 +1321,7 @@ int arch_bpf_trampoline_size(const struct btf_func_model *m, u32 flags,
|
|||
|
||||
void *arch_alloc_bpf_trampoline(unsigned int size)
|
||||
{
|
||||
return bpf_prog_pack_alloc(size, bpf_fill_ill_insns);
|
||||
return bpf_prog_pack_alloc(size, bpf_fill_ill_insns, false);
|
||||
}
|
||||
|
||||
void arch_free_bpf_trampoline(void *image, unsigned int size)
|
||||
|
|
|
|||
|
|
@ -109,7 +109,8 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_verifier_env *env, struct bpf_pr
|
|||
bpf_jit_binary_pack_alloc(prog_size + extable_size,
|
||||
&jit_data->ro_image, sizeof(u32),
|
||||
&jit_data->header, &jit_data->image,
|
||||
bpf_fill_ill_insns);
|
||||
bpf_fill_ill_insns,
|
||||
bpf_prog_was_classic(prog));
|
||||
if (!jit_data->ro_header)
|
||||
goto out_offset;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
#define _S390_CCWDEV_H_
|
||||
|
||||
#include <linux/device.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/device-id/ccw.h>
|
||||
#include <asm/chsc.h>
|
||||
#include <asm/fcx.h>
|
||||
#include <asm/irq.h>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
#include <asm/platform_early.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/device-id/platform.h>
|
||||
#include <linux/pm.h>
|
||||
|
||||
static __initdata LIST_HEAD(sh_early_platform_driver_list);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/device-id/of.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
/* This is a dummy device table linked into all of the crypto
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/irq.h>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
#include <linux/dma-mapping.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/irq.h>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
#include <linux/string.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/of.h>
|
||||
|
|
|
|||
|
|
@ -38,11 +38,8 @@
|
|||
/*
|
||||
* Declare drivers belonging to specific x86 CPUs
|
||||
* Similar in spirit to pci_device_id and related PCI functions
|
||||
*
|
||||
* The wildcard initializers are in mod_devicetable.h because
|
||||
* file2alias needs them. Sigh.
|
||||
*/
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/device-id/x86_cpu.h>
|
||||
/* Get the INTEL_FAM* model defines */
|
||||
#include <asm/intel-family.h>
|
||||
/* And the X86_VENDOR_* ones */
|
||||
|
|
|
|||
|
|
@ -388,6 +388,10 @@ extern void srso_alias_return_thunk(void);
|
|||
extern void entry_untrain_ret(void);
|
||||
extern void write_ibpb(void);
|
||||
|
||||
#ifdef CONFIG_BPF_JIT
|
||||
extern void bpf_arch_ibpb(void);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
extern void clear_bhb_loop(void);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
#include <linux/sched/smt.h>
|
||||
#include <linux/pgtable.h>
|
||||
#include <linux/bpf.h>
|
||||
#include <linux/filter.h>
|
||||
#include <linux/kvm_types.h>
|
||||
|
||||
#include <asm/spec-ctrl.h>
|
||||
|
|
@ -1651,8 +1652,21 @@ static inline const char *spectre_v2_module_string(void)
|
|||
{
|
||||
return spectre_v2_bad_module ? " - vulnerable module loaded" : "";
|
||||
}
|
||||
|
||||
/*
|
||||
* The "retpoline sequence" is the "call;mov;ret" sequence that
|
||||
* replaces normal indirect branch instructions. Differentiate
|
||||
* *the* retpoline sequence from the LFENCE-prefixed indirect
|
||||
* branches that simply use the retpoline infrastructure.
|
||||
*/
|
||||
static inline bool retpoline_seq_enabled(void)
|
||||
{
|
||||
return boot_cpu_has(X86_FEATURE_RETPOLINE) && !boot_cpu_has(X86_FEATURE_RETPOLINE_LFENCE);
|
||||
}
|
||||
|
||||
#else
|
||||
static inline const char *spectre_v2_module_string(void) { return ""; }
|
||||
static inline bool retpoline_seq_enabled(void) { return false; }
|
||||
#endif
|
||||
|
||||
#define SPECTRE_V2_LFENCE_MSG "WARNING: LFENCE mitigation is not recommended for this CPU, data leaks possible!\n"
|
||||
|
|
@ -2095,8 +2109,7 @@ static void __init bhi_apply_mitigation(void)
|
|||
return;
|
||||
|
||||
/* Retpoline mitigates against BHI unless the CPU has RRSBA behavior */
|
||||
if (boot_cpu_has(X86_FEATURE_RETPOLINE) &&
|
||||
!boot_cpu_has(X86_FEATURE_RETPOLINE_LFENCE)) {
|
||||
if (retpoline_seq_enabled()) {
|
||||
spec_ctrl_disable_kernel_rrsba();
|
||||
if (rrsba_disabled)
|
||||
return;
|
||||
|
|
@ -2238,6 +2251,27 @@ static void __init spectre_v2_update_mitigation(void)
|
|||
pr_info("%s\n", spectre_v2_strings[spectre_v2_enabled]);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BPF_JIT
|
||||
static void __bpf_arch_ibpb(void *unused)
|
||||
{
|
||||
write_ibpb();
|
||||
}
|
||||
|
||||
void bpf_arch_ibpb(void)
|
||||
{
|
||||
on_each_cpu(__bpf_arch_ibpb, NULL, 1);
|
||||
}
|
||||
|
||||
static bool __init cpu_wants_ibpb_bpf(void)
|
||||
{
|
||||
/* A genuine retpoline already neutralizes ring0 indirect predictions */
|
||||
if (retpoline_seq_enabled())
|
||||
return false;
|
||||
|
||||
return boot_cpu_has(X86_FEATURE_IBPB);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void __init spectre_v2_apply_mitigation(void)
|
||||
{
|
||||
if (spectre_v2_enabled == SPECTRE_V2_EIBRS && unprivileged_ebpf_enabled())
|
||||
|
|
@ -2314,6 +2348,14 @@ static void __init spectre_v2_apply_mitigation(void)
|
|||
setup_force_cpu_cap(X86_FEATURE_USE_IBRS_FW);
|
||||
pr_info("Enabling Restricted Speculation for firmware calls\n");
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BPF_JIT
|
||||
if (cpu_wants_ibpb_bpf()) {
|
||||
static_call_update(bpf_arch_pred_flush, bpf_arch_ibpb);
|
||||
static_branch_enable(&bpf_pred_flush_enabled);
|
||||
pr_info("Enabling IBPB for BPF\n");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void update_stibp_msr(void * __unused)
|
||||
|
|
@ -3490,9 +3532,7 @@ static const char *spectre_bhi_state(void)
|
|||
return "; BHI: BHI_DIS_S";
|
||||
else if (boot_cpu_has(X86_FEATURE_CLEAR_BHB_LOOP))
|
||||
return "; BHI: SW loop, KVM: SW loop";
|
||||
else if (boot_cpu_has(X86_FEATURE_RETPOLINE) &&
|
||||
!boot_cpu_has(X86_FEATURE_RETPOLINE_LFENCE) &&
|
||||
rrsba_disabled)
|
||||
else if (retpoline_seq_enabled() && rrsba_disabled)
|
||||
return "; BHI: Retpoline";
|
||||
else if (boot_cpu_has(X86_FEATURE_CLEAR_BHB_VMEXIT))
|
||||
return "; BHI: Vulnerable, KVM: SW loop";
|
||||
|
|
|
|||
|
|
@ -259,6 +259,11 @@ int resctrl_arch_rmid_read(struct rdt_resource *r, struct rdt_domain_hdr *hdr,
|
|||
if (!domain_header_is_valid(hdr, RESCTRL_MON_DOMAIN, RDT_RESOURCE_L3))
|
||||
return -EINVAL;
|
||||
|
||||
if (cpumask_empty(&hdr->cpu_mask)) {
|
||||
pr_warn_once("Domain %d has no CPUs\n", hdr->id);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
d = container_of(hdr, struct rdt_l3_mon_domain, hdr);
|
||||
hw_dom = resctrl_to_arch_mon_dom(d);
|
||||
cpu = cpumask_any(&hdr->cpu_mask);
|
||||
|
|
|
|||
|
|
@ -761,9 +761,9 @@ void arch_uprobe_clear_state(struct mm_struct *mm)
|
|||
destroy_uprobe_trampoline(tramp);
|
||||
}
|
||||
|
||||
static bool __in_uprobe_trampoline(unsigned long ip)
|
||||
static bool __in_uprobe_trampoline(struct mm_struct *mm, unsigned long ip)
|
||||
{
|
||||
struct vm_area_struct *vma = vma_lookup(current->mm, ip);
|
||||
struct vm_area_struct *vma = vma_lookup(mm, ip);
|
||||
|
||||
return vma && vma_is_special_mapping(vma, &tramp_mapping);
|
||||
}
|
||||
|
|
@ -776,14 +776,14 @@ static bool in_uprobe_trampoline(unsigned long ip)
|
|||
|
||||
rcu_read_lock();
|
||||
if (mmap_lock_speculate_try_begin(mm, &seq)) {
|
||||
found = __in_uprobe_trampoline(ip);
|
||||
found = __in_uprobe_trampoline(mm, ip);
|
||||
retry = mmap_lock_speculate_retry(mm, seq);
|
||||
}
|
||||
rcu_read_unlock();
|
||||
|
||||
if (retry) {
|
||||
mmap_read_lock(mm);
|
||||
found = __in_uprobe_trampoline(ip);
|
||||
found = __in_uprobe_trampoline(mm, ip);
|
||||
mmap_read_unlock(mm);
|
||||
}
|
||||
return found;
|
||||
|
|
@ -1044,7 +1044,7 @@ static int copy_from_vaddr(struct mm_struct *mm, unsigned long vaddr, void *dst,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static bool __is_optimized(uprobe_opcode_t *insn, unsigned long vaddr)
|
||||
static bool __is_optimized(struct mm_struct *mm, uprobe_opcode_t *insn, unsigned long vaddr)
|
||||
{
|
||||
struct __packed __arch_relative_insn {
|
||||
u8 op;
|
||||
|
|
@ -1053,7 +1053,7 @@ static bool __is_optimized(uprobe_opcode_t *insn, unsigned long vaddr)
|
|||
|
||||
if (!is_call_insn(insn))
|
||||
return false;
|
||||
return __in_uprobe_trampoline(vaddr + 5 + call->raddr);
|
||||
return __in_uprobe_trampoline(mm, vaddr + 5 + call->raddr);
|
||||
}
|
||||
|
||||
static int is_optimized(struct mm_struct *mm, unsigned long vaddr)
|
||||
|
|
@ -1064,7 +1064,7 @@ static int is_optimized(struct mm_struct *mm, unsigned long vaddr)
|
|||
err = copy_from_vaddr(mm, vaddr, &insn, 5);
|
||||
if (err)
|
||||
return err;
|
||||
return __is_optimized((uprobe_opcode_t *)&insn, vaddr);
|
||||
return __is_optimized(mm, (uprobe_opcode_t *)&insn, vaddr);
|
||||
}
|
||||
|
||||
static bool should_optimize(struct arch_uprobe *auprobe)
|
||||
|
|
@ -1246,9 +1246,15 @@ static int default_post_xol_op(struct arch_uprobe *auprobe, struct pt_regs *regs
|
|||
long correction = utask->vaddr - utask->xol_vaddr;
|
||||
regs->ip += correction;
|
||||
} else if (auprobe->defparam.fixups & UPROBE_FIX_CALL) {
|
||||
unsigned long retaddr = utask->vaddr + auprobe->defparam.ilen;
|
||||
int err;
|
||||
|
||||
regs->sp += sizeof_long(regs); /* Pop incorrect return address */
|
||||
if (emulate_push_stack(regs, utask->vaddr + auprobe->defparam.ilen))
|
||||
if (emulate_push_stack(regs, retaddr))
|
||||
return -ERESTART;
|
||||
err = shstk_update_last_frame(retaddr);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
/* popf; tell the caller to not touch TF */
|
||||
if (auprobe->defparam.fixups & UPROBE_FIX_SETF)
|
||||
|
|
@ -1338,6 +1344,10 @@ static bool branch_emulate_op(struct arch_uprobe *auprobe, struct pt_regs *regs)
|
|||
*/
|
||||
if (emulate_push_stack(regs, new_ip))
|
||||
return false;
|
||||
if (shstk_push(new_ip) == -EFAULT) {
|
||||
regs->sp += sizeof_long(regs);
|
||||
return false;
|
||||
}
|
||||
} else if (!check_jmp_cond(auprobe, regs)) {
|
||||
offs = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
#include "pmu.h"
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/highmem.h>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
#include <linux/kvm_host.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/moduleparam.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/objtool.h>
|
||||
#include <linux/sched.h>
|
||||
|
|
|
|||
|
|
@ -3653,7 +3653,7 @@ static int __arch_prepare_bpf_trampoline(struct bpf_tramp_image *im, void *rw_im
|
|||
|
||||
void *arch_alloc_bpf_trampoline(unsigned int size)
|
||||
{
|
||||
return bpf_prog_pack_alloc(size, jit_fill_hole);
|
||||
return bpf_prog_pack_alloc(size, jit_fill_hole, false);
|
||||
}
|
||||
|
||||
void arch_free_bpf_trampoline(void *image, unsigned int size)
|
||||
|
|
@ -3965,7 +3965,8 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_verifier_env *env, struct bpf_pr
|
|||
/* allocate module memory for x86 insns and extable */
|
||||
header = bpf_jit_binary_pack_alloc(roundup(proglen, align) + extable_size,
|
||||
&image, align, &rw_header, &rw_image,
|
||||
jit_fill_hole);
|
||||
jit_fill_hole,
|
||||
bpf_prog_was_classic(prog));
|
||||
if (!header)
|
||||
goto out_addrs;
|
||||
prog->aux->extable = (void *) image + roundup(proglen, align);
|
||||
|
|
|
|||
|
|
@ -2291,18 +2291,19 @@ static void xen_remap_exchanged_ptes(unsigned long vaddr, int order,
|
|||
}
|
||||
|
||||
/*
|
||||
* Perform the hypercall to exchange a region of our pfns to point to
|
||||
* memory with the required contiguous alignment. Takes the pfns as
|
||||
* input, and populates mfns as output.
|
||||
* Perform the hypercall to exchange a region of our pages to point to memory
|
||||
* with the required contiguous alignment. Takes as input the mfns to trade
|
||||
* in (mfns_in) and the pfns where the new pages are to appear (fns_inout),
|
||||
* and populates mfns as output (fns_inout).
|
||||
*
|
||||
* Returns a success code indicating whether the hypervisor was able to
|
||||
* satisfy the request or not.
|
||||
*/
|
||||
static int xen_exchange_memory(unsigned long extents_in, unsigned int order_in,
|
||||
unsigned long *pfns_in,
|
||||
unsigned long *mfns_in,
|
||||
unsigned long extents_out,
|
||||
unsigned int order_out,
|
||||
unsigned long *mfns_out,
|
||||
unsigned long *fns_inout,
|
||||
unsigned int address_bits)
|
||||
{
|
||||
long rc;
|
||||
|
|
@ -2312,13 +2313,13 @@ static int xen_exchange_memory(unsigned long extents_in, unsigned int order_in,
|
|||
.in = {
|
||||
.nr_extents = extents_in,
|
||||
.extent_order = order_in,
|
||||
.extent_start = pfns_in,
|
||||
.extent_start = mfns_in,
|
||||
.domid = DOMID_SELF
|
||||
},
|
||||
.out = {
|
||||
.nr_extents = extents_out,
|
||||
.extent_order = order_out,
|
||||
.extent_start = mfns_out,
|
||||
.extent_start = fns_inout,
|
||||
.address_bits = address_bits,
|
||||
.domid = DOMID_SELF
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,6 +59,18 @@ static bool aie2_tdr_detect(struct amdxdna_dev *xdna)
|
|||
return false;
|
||||
}
|
||||
|
||||
static void aie2_cmd_release(struct kref *ref)
|
||||
{
|
||||
struct amdxdna_drv_cmd *drv_cmd = container_of(ref, struct amdxdna_drv_cmd, refcnt);
|
||||
|
||||
kfree(drv_cmd);
|
||||
}
|
||||
|
||||
static void aie2_cmd_put(struct amdxdna_drv_cmd *drv_cmd)
|
||||
{
|
||||
kref_put(&drv_cmd->refcnt, aie2_cmd_release);
|
||||
}
|
||||
|
||||
static void aie2_job_release(struct kref *ref)
|
||||
{
|
||||
struct amdxdna_sched_job *job;
|
||||
|
|
@ -70,6 +82,8 @@ static void aie2_job_release(struct kref *ref)
|
|||
wake_up(&job->hwctx->priv->job_free_wq);
|
||||
if (job->out_fence)
|
||||
dma_fence_put(job->out_fence);
|
||||
if (job->drv_cmd)
|
||||
aie2_cmd_put(job->drv_cmd);
|
||||
kfree(job->aie2_job_health);
|
||||
kfree(job);
|
||||
}
|
||||
|
|
@ -901,7 +915,7 @@ static int aie2_hwctx_cfg_debug_bo(struct amdxdna_hwctx *hwctx, u32 bo_hdl,
|
|||
{
|
||||
struct amdxdna_client *client = hwctx->client;
|
||||
struct amdxdna_dev *xdna = client->xdna;
|
||||
struct amdxdna_drv_cmd cmd = { 0 };
|
||||
struct amdxdna_drv_cmd *cmd;
|
||||
struct amdxdna_gem_obj *abo;
|
||||
u64 seq;
|
||||
int ret;
|
||||
|
|
@ -912,32 +926,39 @@ static int aie2_hwctx_cfg_debug_bo(struct amdxdna_hwctx *hwctx, u32 bo_hdl,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
cmd = kzalloc_obj(*cmd);
|
||||
if (!cmd) {
|
||||
ret = -ENOMEM;
|
||||
goto put_obj;
|
||||
}
|
||||
kref_init(&cmd->refcnt);
|
||||
|
||||
if (attach) {
|
||||
if (abo->assigned_hwctx != AMDXDNA_INVALID_CTX_HANDLE) {
|
||||
ret = -EBUSY;
|
||||
goto put_obj;
|
||||
goto put_cmd;
|
||||
}
|
||||
cmd.opcode = ATTACH_DEBUG_BO;
|
||||
cmd->opcode = ATTACH_DEBUG_BO;
|
||||
} else {
|
||||
if (abo->assigned_hwctx != hwctx->id) {
|
||||
ret = -EINVAL;
|
||||
goto put_obj;
|
||||
goto put_cmd;
|
||||
}
|
||||
cmd.opcode = DETACH_DEBUG_BO;
|
||||
cmd->opcode = DETACH_DEBUG_BO;
|
||||
}
|
||||
|
||||
ret = amdxdna_cmd_submit(client, &cmd, AMDXDNA_INVALID_BO_HANDLE,
|
||||
ret = amdxdna_cmd_submit(client, cmd, AMDXDNA_INVALID_BO_HANDLE,
|
||||
&bo_hdl, 1, hwctx->id, &seq);
|
||||
if (ret) {
|
||||
XDNA_ERR(xdna, "Submit command failed");
|
||||
goto put_obj;
|
||||
goto put_cmd;
|
||||
}
|
||||
|
||||
aie2_cmd_wait(hwctx, seq);
|
||||
if (cmd.result) {
|
||||
XDNA_ERR(xdna, "Response failure 0x%x", cmd.result);
|
||||
if (cmd->result) {
|
||||
XDNA_ERR(xdna, "Response failure 0x%x", cmd->result);
|
||||
ret = -EINVAL;
|
||||
goto put_obj;
|
||||
goto put_cmd;
|
||||
}
|
||||
|
||||
if (attach)
|
||||
|
|
@ -947,6 +968,8 @@ static int aie2_hwctx_cfg_debug_bo(struct amdxdna_hwctx *hwctx, u32 bo_hdl,
|
|||
|
||||
XDNA_DBG(xdna, "Config debug BO %d to %s", bo_hdl, hwctx->name);
|
||||
|
||||
put_cmd:
|
||||
aie2_cmd_put(cmd);
|
||||
put_obj:
|
||||
amdxdna_gem_put_obj(abo);
|
||||
return ret;
|
||||
|
|
@ -974,25 +997,32 @@ int aie2_hwctx_sync_debug_bo(struct amdxdna_hwctx *hwctx, u32 debug_bo_hdl)
|
|||
{
|
||||
struct amdxdna_client *client = hwctx->client;
|
||||
struct amdxdna_dev *xdna = client->xdna;
|
||||
struct amdxdna_drv_cmd cmd = { 0 };
|
||||
struct amdxdna_drv_cmd *cmd;
|
||||
u64 seq;
|
||||
int ret;
|
||||
|
||||
cmd.opcode = SYNC_DEBUG_BO;
|
||||
ret = amdxdna_cmd_submit(client, &cmd, AMDXDNA_INVALID_BO_HANDLE,
|
||||
cmd = kzalloc_obj(*cmd);
|
||||
if (!cmd)
|
||||
return -ENOMEM;
|
||||
kref_init(&cmd->refcnt);
|
||||
|
||||
cmd->opcode = SYNC_DEBUG_BO;
|
||||
ret = amdxdna_cmd_submit(client, cmd, AMDXDNA_INVALID_BO_HANDLE,
|
||||
&debug_bo_hdl, 1, hwctx->id, &seq);
|
||||
if (ret) {
|
||||
XDNA_ERR(xdna, "Submit command failed");
|
||||
return ret;
|
||||
goto put_cmd;
|
||||
}
|
||||
|
||||
aie2_cmd_wait(hwctx, seq);
|
||||
if (cmd.result) {
|
||||
XDNA_ERR(xdna, "Response failure 0x%x", cmd.result);
|
||||
return -EINVAL;
|
||||
if (cmd->result) {
|
||||
XDNA_ERR(xdna, "Response failure 0x%x", cmd->result);
|
||||
ret = -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
put_cmd:
|
||||
aie2_cmd_put(cmd);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int aie2_populate_range(struct amdxdna_gem_obj *abo)
|
||||
|
|
@ -1142,6 +1172,8 @@ int aie2_cmd_submit(struct amdxdna_hwctx *hwctx, struct amdxdna_sched_job *job,
|
|||
dma_resv_add_fence(job->bos[i]->resv, job->out_fence, DMA_RESV_USAGE_WRITE);
|
||||
job->seq = hwctx->priv->seq++;
|
||||
kref_get(&job->refcnt);
|
||||
if (job->drv_cmd)
|
||||
kref_get(&job->drv_cmd->refcnt);
|
||||
drm_sched_entity_push_job(&job->base);
|
||||
|
||||
*seq = job->seq;
|
||||
|
|
|
|||
|
|
@ -132,6 +132,7 @@ enum amdxdna_job_opcode {
|
|||
struct amdxdna_drv_cmd {
|
||||
enum amdxdna_job_opcode opcode;
|
||||
u32 result;
|
||||
struct kref refcnt;
|
||||
};
|
||||
|
||||
struct app_health_report;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
*/
|
||||
|
||||
#include <drm/amdxdna_accel.h>
|
||||
#include <drm/drm_managed.h>
|
||||
#include <linux/iommu.h>
|
||||
#include <linux/iova.h>
|
||||
|
||||
|
|
@ -153,10 +154,30 @@ void amdxdna_iommu_free(struct amdxdna_dev *xdna, size_t size,
|
|||
free_pages((unsigned long)cpu_addr, get_order(size));
|
||||
}
|
||||
|
||||
static void amdxdna_cleanup_force_iova(struct drm_device *dev, void *res)
|
||||
{
|
||||
struct amdxdna_dev *xdna = to_xdna_dev(dev);
|
||||
|
||||
if (xdna->domain) {
|
||||
iommu_detach_group(xdna->domain, xdna->group);
|
||||
put_iova_domain(&xdna->iovad);
|
||||
iova_cache_put();
|
||||
iommu_domain_free(xdna->domain);
|
||||
}
|
||||
|
||||
iommu_group_put(xdna->group);
|
||||
}
|
||||
|
||||
void amdxdna_iommu_fini(struct amdxdna_dev *xdna)
|
||||
{
|
||||
if (xdna->group && !xdna->domain)
|
||||
iommu_group_put(xdna->group);
|
||||
}
|
||||
|
||||
int amdxdna_iommu_init(struct amdxdna_dev *xdna)
|
||||
{
|
||||
unsigned long order;
|
||||
int ret;
|
||||
int ret = 0;
|
||||
|
||||
xdna->group = iommu_group_get(xdna->ddev.dev);
|
||||
if (!xdna->group || !force_iova)
|
||||
|
|
@ -182,8 +203,14 @@ int amdxdna_iommu_init(struct amdxdna_dev *xdna)
|
|||
if (ret)
|
||||
goto put_iova;
|
||||
|
||||
ret = drmm_add_action(&xdna->ddev, amdxdna_cleanup_force_iova, NULL);
|
||||
if (ret)
|
||||
goto detach_group;
|
||||
|
||||
return 0;
|
||||
|
||||
detach_group:
|
||||
iommu_detach_group(xdna->domain, xdna->group);
|
||||
put_iova:
|
||||
put_iova_domain(&xdna->iovad);
|
||||
iova_cache_put();
|
||||
|
|
@ -191,20 +218,8 @@ int amdxdna_iommu_init(struct amdxdna_dev *xdna)
|
|||
iommu_domain_free(xdna->domain);
|
||||
put_group:
|
||||
iommu_group_put(xdna->group);
|
||||
xdna->group = NULL;
|
||||
xdna->domain = NULL;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void amdxdna_iommu_fini(struct amdxdna_dev *xdna)
|
||||
{
|
||||
if (xdna->domain) {
|
||||
iommu_detach_group(xdna->domain, xdna->group);
|
||||
put_iova_domain(&xdna->iovad);
|
||||
iova_cache_put();
|
||||
iommu_domain_free(xdna->domain);
|
||||
}
|
||||
|
||||
if (xdna->group)
|
||||
iommu_group_put(xdna->group);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -138,9 +138,11 @@ static int amdxdna_drm_open(struct drm_device *ddev, struct drm_file *filp)
|
|||
xdna->dev_info->dev_heap_max_size);
|
||||
mutex_init(&client->mm_lock);
|
||||
|
||||
mutex_lock(&xdna->client_lock);
|
||||
mutex_lock(&xdna->dev_lock);
|
||||
list_add_tail(&client->node, &xdna->client_list);
|
||||
mutex_unlock(&xdna->dev_lock);
|
||||
mutex_unlock(&xdna->client_lock);
|
||||
|
||||
filp->driver_priv = client;
|
||||
client->filp = filp;
|
||||
|
|
@ -174,18 +176,14 @@ static void amdxdna_drm_close(struct drm_device *ddev, struct drm_file *filp)
|
|||
{
|
||||
struct amdxdna_client *client = filp->driver_priv;
|
||||
struct amdxdna_dev *xdna = to_xdna_dev(ddev);
|
||||
int idx;
|
||||
|
||||
XDNA_DBG(xdna, "closing pid %d", client->pid);
|
||||
|
||||
if (!drm_dev_enter(&xdna->ddev, &idx))
|
||||
return;
|
||||
|
||||
mutex_lock(&xdna->client_lock);
|
||||
mutex_lock(&xdna->dev_lock);
|
||||
amdxdna_client_cleanup(client);
|
||||
mutex_unlock(&xdna->dev_lock);
|
||||
|
||||
drm_dev_exit(idx);
|
||||
mutex_unlock(&xdna->client_lock);
|
||||
}
|
||||
|
||||
static int amdxdna_drm_get_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
|
||||
|
|
@ -371,6 +369,10 @@ static int amdxdna_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
|||
if (!xdna->dev_info)
|
||||
return -ENODEV;
|
||||
|
||||
ret = drmm_mutex_init(ddev, &xdna->client_lock);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
drmm_mutex_init(ddev, &xdna->dev_lock);
|
||||
init_rwsem(&xdna->notifier_lock);
|
||||
INIT_LIST_HEAD(&xdna->client_list);
|
||||
|
|
@ -390,9 +392,9 @@ static int amdxdna_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
xdna->notifier_wq = alloc_ordered_workqueue("notifier_wq", WQ_MEM_RECLAIM);
|
||||
if (!xdna->notifier_wq) {
|
||||
ret = -ENOMEM;
|
||||
xdna->notifier_wq = drmm_alloc_ordered_workqueue(ddev, "notifier_wq", WQ_MEM_RECLAIM);
|
||||
if (IS_ERR(xdna->notifier_wq)) {
|
||||
ret = PTR_ERR(xdna->notifier_wq);
|
||||
goto iommu_fini;
|
||||
}
|
||||
|
||||
|
|
@ -401,7 +403,7 @@ static int amdxdna_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
|||
mutex_unlock(&xdna->dev_lock);
|
||||
if (ret) {
|
||||
XDNA_ERR(xdna, "Hardware init failed, ret %d", ret);
|
||||
goto destroy_notifier_wq;
|
||||
goto iommu_fini;
|
||||
}
|
||||
|
||||
ret = amdxdna_sysfs_init(xdna);
|
||||
|
|
@ -425,8 +427,6 @@ static int amdxdna_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
|||
mutex_lock(&xdna->dev_lock);
|
||||
xdna->dev_info->ops->fini(xdna);
|
||||
mutex_unlock(&xdna->dev_lock);
|
||||
destroy_notifier_wq:
|
||||
destroy_workqueue(xdna->notifier_wq);
|
||||
iommu_fini:
|
||||
amdxdna_iommu_fini(xdna);
|
||||
return ret;
|
||||
|
|
@ -437,23 +437,19 @@ static void amdxdna_remove(struct pci_dev *pdev)
|
|||
struct amdxdna_dev *xdna = pci_get_drvdata(pdev);
|
||||
struct amdxdna_client *client;
|
||||
|
||||
destroy_workqueue(xdna->notifier_wq);
|
||||
|
||||
drm_dev_unplug(&xdna->ddev);
|
||||
amdxdna_sysfs_fini(xdna);
|
||||
|
||||
mutex_lock(&xdna->client_lock);
|
||||
mutex_lock(&xdna->dev_lock);
|
||||
client = list_first_entry_or_null(&xdna->client_list,
|
||||
struct amdxdna_client, node);
|
||||
while (client) {
|
||||
amdxdna_client_cleanup(client);
|
||||
|
||||
client = list_first_entry_or_null(&xdna->client_list,
|
||||
struct amdxdna_client, node);
|
||||
list_for_each_entry(client, &xdna->client_list, node) {
|
||||
amdxdna_hwctx_remove_all(client);
|
||||
amdxdna_sva_fini(client);
|
||||
}
|
||||
|
||||
xdna->dev_info->ops->fini(xdna);
|
||||
mutex_unlock(&xdna->dev_lock);
|
||||
mutex_unlock(&xdna->client_lock);
|
||||
|
||||
amdxdna_iommu_fini(xdna);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -120,6 +120,7 @@ struct amdxdna_dev {
|
|||
|
||||
struct mutex dev_lock; /* per device lock */
|
||||
struct list_head client_list;
|
||||
struct mutex client_lock; /* client_list */
|
||||
struct amdxdna_fw_ver fw_ver;
|
||||
struct rw_semaphore notifier_lock; /* for mmu notifier*/
|
||||
struct workqueue_struct *notifier_wq;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
#include <linux/io.h>
|
||||
#include <linux/iopoll.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/math64.h>
|
||||
#include <linux/mhi.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/time64.h>
|
||||
#include <linux/timer.h>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
#include <linux/limits.h>
|
||||
#include <linux/mhi.h>
|
||||
#include <linux/minmax.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/overflow.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/vmalloc.h>
|
||||
|
|
|
|||
|
|
@ -856,7 +856,7 @@ static int acpi_tad_probe(struct platform_device *pdev)
|
|||
* runtime suspend. Everything else should be taken care of by the ACPI
|
||||
* PM domain callbacks.
|
||||
*/
|
||||
if (ACPI_TAD_AC_WAKE) {
|
||||
if (caps & ACPI_TAD_AC_WAKE) {
|
||||
device_init_wakeup(dev, true);
|
||||
dev_pm_set_driver_flags(dev, DPM_FLAG_SMART_SUSPEND |
|
||||
DPM_FLAG_MAY_SKIP_RESUME);
|
||||
|
|
|
|||
|
|
@ -626,8 +626,6 @@ void acpi_ut_repair_name(char *name);
|
|||
#if defined (ACPI_DEBUGGER) || defined (ACPI_APPLICATION) || defined (ACPI_DEBUG_OUTPUT)
|
||||
u8 acpi_ut_safe_strcpy(char *dest, acpi_size dest_size, char *source);
|
||||
|
||||
void acpi_ut_safe_strncpy(char *dest, char *source, acpi_size dest_size);
|
||||
|
||||
u8 acpi_ut_safe_strcat(char *dest, acpi_size dest_size, char *source);
|
||||
|
||||
u8
|
||||
|
|
|
|||
|
|
@ -164,20 +164,4 @@ acpi_ut_safe_strncat(char *dest,
|
|||
return (FALSE);
|
||||
}
|
||||
|
||||
void acpi_ut_safe_strncpy(char *dest, char *source, acpi_size dest_size)
|
||||
{
|
||||
/* Always terminate destination string */
|
||||
|
||||
#ifdef __KERNEL__
|
||||
strscpy_pad(dest, source, dest_size);
|
||||
#else
|
||||
/*
|
||||
* strscpy_pad() is not defined in ACPICA tools builds, so use strncpy()
|
||||
* and directly NUL-terminate the destination string in that case.
|
||||
*/
|
||||
strncpy(dest, source, dest_size);
|
||||
dest[dest_size - 1] = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include <linux/acpi.h>
|
||||
#include <linux/acpi_rimt.h>
|
||||
#include <linux/device/driver.h>
|
||||
#include <linux/iommu.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/pci.h>
|
||||
|
|
@ -257,11 +258,11 @@ static int rimt_iommu_xlate(struct device *dev, struct acpi_rimt_node *node, u32
|
|||
rimt_fwnode = rimt_get_fwnode(node);
|
||||
|
||||
/*
|
||||
* The IOMMU drivers may not be probed yet.
|
||||
* Defer the IOMMU configuration
|
||||
* The IOMMU drivers may not be probed yet. Defer the IOMMU
|
||||
* configuration if it's still in initialization stage.
|
||||
*/
|
||||
if (!rimt_fwnode)
|
||||
return -EPROBE_DEFER;
|
||||
return driver_deferred_probe_check_state(dev);
|
||||
|
||||
/*
|
||||
* EPROBE_DEFER ensures IOMMU is probed before the devices that
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/pm.h>
|
||||
#include <linux/device.h>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
#include <linux/clk.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
|
|
|
|||
|
|
@ -2847,6 +2847,24 @@ static void ata_dev_config_cpr(struct ata_device *dev)
|
|||
if (!nr_cpr)
|
||||
goto out;
|
||||
|
||||
/*
|
||||
* The device reports the number of CPR descriptors independently of the
|
||||
* log size, and that count is also used to emit VPD page B9h into the
|
||||
* fixed-size rbuf. Reject a count larger than what that buffer can hold
|
||||
* (ATA_DEV_MAX_CPR) or larger than the log the device actually returned.
|
||||
*/
|
||||
if (nr_cpr > ATA_DEV_MAX_CPR) {
|
||||
ata_dev_warn(dev,
|
||||
"Too many concurrent positioning ranges\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (buf_len < 64 + (size_t)nr_cpr * 32) {
|
||||
ata_dev_warn(dev,
|
||||
"Invalid number of concurrent positioning ranges\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
cpr_log = kzalloc_flex(*cpr_log, cpr, nr_cpr);
|
||||
if (!cpr_log)
|
||||
goto out;
|
||||
|
|
@ -4295,6 +4313,9 @@ static const struct ata_dev_quirks_entry __ata_dev_quirks[] = {
|
|||
/* Apacer models with LPM issues */
|
||||
{ "Apacer AS340*", NULL, ATA_QUIRK_NOLPM },
|
||||
|
||||
/* PNY CS900 (Phison PS3111-S11, DRAM-less) drops the link on DIPM */
|
||||
{ "PNY CS900 1TB SSD", NULL, ATA_QUIRK_NOLPM },
|
||||
|
||||
/* Silicon Motion models with LPM issues */
|
||||
{ "MD619HXCLDE3TC", "TCVAID", ATA_QUIRK_NOLPM },
|
||||
{ "MD619GXCLDE3TC", "TCV35D", ATA_QUIRK_NOLPM },
|
||||
|
|
|
|||
|
|
@ -37,8 +37,6 @@
|
|||
#include "libata.h"
|
||||
#include "libata-transport.h"
|
||||
|
||||
#define ATA_SCSI_RBUF_SIZE 2048
|
||||
|
||||
static DEFINE_SPINLOCK(ata_scsi_rbuf_lock);
|
||||
static u8 ata_scsi_rbuf[ATA_SCSI_RBUF_SIZE];
|
||||
|
||||
|
|
@ -1933,8 +1931,13 @@ static void ata_scsi_rbuf_fill(struct ata_device *dev, struct scsi_cmnd *cmd,
|
|||
memset(ata_scsi_rbuf, 0, ATA_SCSI_RBUF_SIZE);
|
||||
len = actor(dev, cmd, ata_scsi_rbuf);
|
||||
if (len) {
|
||||
if (WARN_ON(len > ATA_SCSI_RBUF_SIZE)) {
|
||||
ata_scsi_set_sense(dev, cmd, ABORTED_COMMAND, 0, 0);
|
||||
spin_unlock_irqrestore(&ata_scsi_rbuf_lock, flags);
|
||||
return;
|
||||
}
|
||||
sg_copy_from_buffer(scsi_sglist(cmd), scsi_sg_count(cmd),
|
||||
ata_scsi_rbuf, ATA_SCSI_RBUF_SIZE);
|
||||
ata_scsi_rbuf, len);
|
||||
cmd->result = SAM_STAT_GOOD;
|
||||
if (scsi_bufflen(cmd) > len)
|
||||
scsi_set_resid(cmd, scsi_bufflen(cmd) - len);
|
||||
|
|
|
|||
|
|
@ -149,6 +149,15 @@ static inline bool ata_acpi_dev_manage_restart(struct ata_device *dev) { return
|
|||
#endif
|
||||
|
||||
/* libata-scsi.c */
|
||||
#define ATA_SCSI_RBUF_SIZE 2048
|
||||
|
||||
/*
|
||||
* Maximum number of concurrent positioning ranges (CPR) supported. The ACS
|
||||
* specifications allow up to 255, but we limit this to the number of CPR
|
||||
* descriptors that fit in the rbuf buffer used to emit VPD page B9h.
|
||||
*/
|
||||
#define ATA_DEV_MAX_CPR min(255, ((ATA_SCSI_RBUF_SIZE - 64) / 32))
|
||||
|
||||
extern struct ata_device *ata_scsi_find_dev(struct ata_port *ap,
|
||||
const struct scsi_device *scsidev);
|
||||
extern int ata_scsi_add_hosts(struct ata_host *host,
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/libata.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/zorro.h>
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@
|
|||
#include <linux/delay.h>
|
||||
#include <linux/dmaengine.h>
|
||||
#include <linux/ktime.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
|
||||
#include <linux/soc/cirrus/ep93xx.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
#include <linux/clk.h>
|
||||
#include <linux/libata.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#define DRV_NAME "pata_imx"
|
||||
|
|
|
|||
|
|
@ -286,6 +286,7 @@ static int pxa_ata_probe(struct platform_device *pdev)
|
|||
ret = dmaengine_slave_config(data->dma_chan, &config);
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "dma configuration failed: %d\n", ret);
|
||||
dma_release_channel(data->dma_chan);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -353,7 +353,7 @@ static int gemini_sata_probe(struct platform_device *pdev)
|
|||
if (sg->ide_pins) {
|
||||
ret = gemini_setup_ide_pins(dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto out_unprep_clk;
|
||||
}
|
||||
|
||||
dev_info(dev, "set up the Gemini IDE/SATA nexus\n");
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@
|
|||
#include <linux/init.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/iopoll.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/types.h>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
#include <linux/delay.h>
|
||||
#include <linux/gpio/consumer.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/property.h>
|
||||
#include <linux/slab.h>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
*/
|
||||
#include <linux/hex.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/property.h>
|
||||
#include <linux/slab.h>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@
|
|||
#include <linux/device/devres.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/pm.h>
|
||||
#include <linux/regmap.h>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
#include <linux/errno.h>
|
||||
#include <linux/gpio/consumer.h>
|
||||
#include <linux/map_to_7segment.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/types.h>
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ static int print_unex = 1;
|
|||
#include <linux/major.h>
|
||||
#include <linux/mc146818rtc.h> /* CMOS defines */
|
||||
#include <linux/mm.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/device-id/pnp.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
#include <linux/errno.h>
|
||||
#include <linux/gpio/consumer.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/serdev.h>
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
#include <linux/devcoredump.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/gpio/consumer.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/acpi.h>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
#include <linux/io.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/mhi_ep.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
#include "internal.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
#include <linux/interrupt.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/mhi.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/vmalloc.h>
|
||||
|
|
|
|||
1
drivers/cache/hisi_soc_hha.c
vendored
1
drivers/cache/hisi_soc_hha.c
vendored
|
|
@ -23,7 +23,6 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/memregion.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
* Copyright (C) 2022-2023, Advanced Micro Devices, Inc.
|
||||
*/
|
||||
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/cdx/cdx_bus.h>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/bitfield.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/hw_random.h>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/clk.h>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
#include <linux/io.h>
|
||||
#include <linux/iopoll.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/workqueue.h>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/delay.h>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
#include <linux/iopoll.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/property.h>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
#include <linux/io.h>
|
||||
#include <linux/iopoll.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/clk.h>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
#include <linux/hw_random.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/iopoll.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/slab.h>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
#include <linux/io.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/delay.h>
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user