Linux 5.16-rc6
-----BEGIN PGP SIGNATURE----- iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAmG/rsoeHHRvcnZhbGRz QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGLW8H/0sfRUxZNJ+DgO6W 0LpyIx1DF7S2x1wOQGl7VZsjdy+dtuOW4BtEoqhuQWgQ2sr0zbavbeyZYTXD1+d6 I1h5C6JMD138JkoqZNdeyWwsalAFtVItH+lzszUGKTxueTbKCJTkGMerBZVu/gVY U3QYZHEkUH6o/2fINYfSMhEgyJpjVEUoaztB2drsC0tNUGeDjTmrhlRrWIKZ6Kn+ oAiMqsomSBF09TZ++GEqMYDTm39CwNDPJzKGyyOx86ydcg4ErWvjp1jfAUX0cvFG dso2K5mDzTewdF8bW0A1KvsQaliMFpxgZ5CTblYQ6HvyltjRj+0B8207VzHQXBKV YFZ8y9A= =mfug -----END PGP SIGNATURE----- Merge 5.16-rc6 into usb-next We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
commit
236c9ad1f8
@ -20,9 +20,9 @@ allOf:
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- apple,t8103-i2c
|
||||
- apple,i2c
|
||||
items:
|
||||
- const: apple,t8103-i2c
|
||||
- const: apple,i2c
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
@ -51,7 +51,7 @@ unevaluatedProperties: false
|
||||
examples:
|
||||
- |
|
||||
i2c@35010000 {
|
||||
compatible = "apple,t8103-i2c";
|
||||
compatible = "apple,t8103-i2c", "apple,i2c";
|
||||
reg = <0x35010000 0x4000>;
|
||||
interrupt-parent = <&aic>;
|
||||
interrupts = <0 627 4>;
|
||||
|
@ -440,6 +440,22 @@ NOTE: For 82599-based network connections, if you are enabling jumbo frames in
|
||||
a virtual function (VF), jumbo frames must first be enabled in the physical
|
||||
function (PF). The VF MTU setting cannot be larger than the PF MTU.
|
||||
|
||||
NBASE-T Support
|
||||
---------------
|
||||
The ixgbe driver supports NBASE-T on some devices. However, the advertisement
|
||||
of NBASE-T speeds is suppressed by default, to accommodate broken network
|
||||
switches which cannot cope with advertised NBASE-T speeds. Use the ethtool
|
||||
command to enable advertising NBASE-T speeds on devices which support it::
|
||||
|
||||
ethtool -s eth? advertise 0x1800000001028
|
||||
|
||||
On Linux systems with INTERFACES(5), this can be specified as a pre-up command
|
||||
in /etc/network/interfaces so that the interface is always brought up with
|
||||
NBASE-T support, e.g.::
|
||||
|
||||
iface eth? inet dhcp
|
||||
pre-up ethtool -s eth? advertise 0x1800000001028 || true
|
||||
|
||||
Generic Receive Offload, aka GRO
|
||||
--------------------------------
|
||||
The driver supports the in-kernel software implementation of GRO. GRO has
|
||||
|
14
MAINTAINERS
14
MAINTAINERS
@ -3066,7 +3066,7 @@ F: Documentation/devicetree/bindings/phy/phy-ath79-usb.txt
|
||||
F: drivers/phy/qualcomm/phy-ath79-usb.c
|
||||
|
||||
ATHEROS ATH GENERIC UTILITIES
|
||||
M: Kalle Valo <kvalo@codeaurora.org>
|
||||
M: Kalle Valo <kvalo@kernel.org>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Supported
|
||||
F: drivers/net/wireless/ath/*
|
||||
@ -3081,7 +3081,7 @@ W: https://wireless.wiki.kernel.org/en/users/Drivers/ath5k
|
||||
F: drivers/net/wireless/ath/ath5k/
|
||||
|
||||
ATHEROS ATH6KL WIRELESS DRIVER
|
||||
M: Kalle Valo <kvalo@codeaurora.org>
|
||||
M: Kalle Valo <kvalo@kernel.org>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Supported
|
||||
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath6kl
|
||||
@ -13248,7 +13248,7 @@ F: include/uapi/linux/if_*
|
||||
F: include/uapi/linux/netdevice.h
|
||||
|
||||
NETWORKING DRIVERS (WIRELESS)
|
||||
M: Kalle Valo <kvalo@codeaurora.org>
|
||||
M: Kalle Valo <kvalo@kernel.org>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Maintained
|
||||
Q: http://patchwork.kernel.org/project/linux-wireless/list/
|
||||
@ -15704,7 +15704,7 @@ T: git git://linuxtv.org/anttip/media_tree.git
|
||||
F: drivers/media/tuners/qt1010*
|
||||
|
||||
QUALCOMM ATHEROS ATH10K WIRELESS DRIVER
|
||||
M: Kalle Valo <kvalo@codeaurora.org>
|
||||
M: Kalle Valo <kvalo@kernel.org>
|
||||
L: ath10k@lists.infradead.org
|
||||
S: Supported
|
||||
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath10k
|
||||
@ -15712,7 +15712,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
|
||||
F: drivers/net/wireless/ath/ath10k/
|
||||
|
||||
QUALCOMM ATHEROS ATH11K WIRELESS DRIVER
|
||||
M: Kalle Valo <kvalo@codeaurora.org>
|
||||
M: Kalle Valo <kvalo@kernel.org>
|
||||
L: ath11k@lists.infradead.org
|
||||
S: Supported
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
|
||||
@ -15885,7 +15885,7 @@ F: Documentation/devicetree/bindings/media/*venus*
|
||||
F: drivers/media/platform/qcom/venus/
|
||||
|
||||
QUALCOMM WCN36XX WIRELESS DRIVER
|
||||
M: Kalle Valo <kvalo@codeaurora.org>
|
||||
M: Kalle Valo <kvalo@kernel.org>
|
||||
L: wcn36xx@lists.infradead.org
|
||||
S: Supported
|
||||
W: https://wireless.wiki.kernel.org/en/users/Drivers/wcn36xx
|
||||
@ -21067,7 +21067,7 @@ S: Maintained
|
||||
F: arch/x86/kernel/cpu/zhaoxin.c
|
||||
|
||||
ZONEFS FILESYSTEM
|
||||
M: Damien Le Moal <damien.lemoal@wdc.com>
|
||||
M: Damien Le Moal <damien.lemoal@opensource.wdc.com>
|
||||
M: Naohiro Aota <naohiro.aota@wdc.com>
|
||||
R: Johannes Thumshirn <jth@kernel.org>
|
||||
L: linux-fsdevel@vger.kernel.org
|
||||
|
2
Makefile
2
Makefile
@ -2,7 +2,7 @@
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 16
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc5
|
||||
EXTRAVERSION = -rc6
|
||||
NAME = Gobble Gobble
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
@ -178,6 +178,8 @@
|
||||
label = "cpu";
|
||||
ethernet = <&fec>;
|
||||
phy-mode = "rgmii-id";
|
||||
rx-internal-delay-ps = <2000>;
|
||||
tx-internal-delay-ps = <2000>;
|
||||
|
||||
fixed-link {
|
||||
speed = <100>;
|
||||
|
@ -82,6 +82,6 @@
|
||||
#define MX6ULL_PAD_CSI_DATA04__ESAI_TX_FS 0x01F4 0x0480 0x0000 0x9 0x0
|
||||
#define MX6ULL_PAD_CSI_DATA05__ESAI_TX_CLK 0x01F8 0x0484 0x0000 0x9 0x0
|
||||
#define MX6ULL_PAD_CSI_DATA06__ESAI_TX5_RX0 0x01FC 0x0488 0x0000 0x9 0x0
|
||||
#define MX6ULL_PAD_CSI_DATA07__ESAI_T0 0x0200 0x048C 0x0000 0x9 0x0
|
||||
#define MX6ULL_PAD_CSI_DATA07__ESAI_TX0 0x0200 0x048C 0x0000 0x9 0x0
|
||||
|
||||
#endif /* __DTS_IMX6ULL_PINFUNC_H */
|
||||
|
@ -91,6 +91,8 @@
|
||||
/* Internal port connected to eth2 */
|
||||
ethernet = <&enet2>;
|
||||
phy-mode = "rgmii";
|
||||
rx-internal-delay-ps = <0>;
|
||||
tx-internal-delay-ps = <0>;
|
||||
reg = <4>;
|
||||
|
||||
fixed-link {
|
||||
|
@ -12,7 +12,7 @@
|
||||
flash0: n25q00@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "n25q00aa";
|
||||
compatible = "micron,mt25qu02g", "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <100000000>;
|
||||
|
||||
|
@ -119,7 +119,7 @@
|
||||
flash: flash@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "n25q256a";
|
||||
compatible = "micron,n25q256a", "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <100000000>;
|
||||
|
||||
|
@ -124,7 +124,7 @@
|
||||
flash0: n25q00@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "n25q00";
|
||||
compatible = "micron,mt25qu02g", "jedec,spi-nor";
|
||||
reg = <0>; /* chip select */
|
||||
spi-max-frequency = <100000000>;
|
||||
|
||||
|
@ -169,7 +169,7 @@
|
||||
flash: flash@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "n25q00";
|
||||
compatible = "micron,mt25qu02g", "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <100000000>;
|
||||
|
||||
|
@ -80,7 +80,7 @@
|
||||
flash: flash@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "n25q256a";
|
||||
compatible = "micron,n25q256a", "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <100000000>;
|
||||
m25p,fast-read;
|
||||
|
@ -116,7 +116,7 @@
|
||||
flash0: n25q512a@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "n25q512a";
|
||||
compatible = "micron,n25q512a", "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <100000000>;
|
||||
|
||||
|
@ -224,7 +224,7 @@
|
||||
n25q128@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "n25q128";
|
||||
compatible = "micron,n25q128", "jedec,spi-nor";
|
||||
reg = <0>; /* chip select */
|
||||
spi-max-frequency = <100000000>;
|
||||
m25p,fast-read;
|
||||
@ -241,7 +241,7 @@
|
||||
n25q00@1 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "n25q00";
|
||||
compatible = "micron,mt25qu02g", "jedec,spi-nor";
|
||||
reg = <1>; /* chip select */
|
||||
spi-max-frequency = <100000000>;
|
||||
m25p,fast-read;
|
||||
|
@ -189,7 +189,7 @@ static int __init rockchip_smp_prepare_sram(struct device_node *node)
|
||||
rockchip_boot_fn = __pa_symbol(secondary_startup);
|
||||
|
||||
/* copy the trampoline to sram, that runs during startup of the core */
|
||||
memcpy(sram_base_addr, &rockchip_secondary_trampoline, trampoline_sz);
|
||||
memcpy_toio(sram_base_addr, &rockchip_secondary_trampoline, trampoline_sz);
|
||||
flush_cache_all();
|
||||
outer_clean_range(0, trampoline_sz);
|
||||
|
||||
|
@ -161,7 +161,6 @@ config ARCH_MEDIATEK
|
||||
|
||||
config ARCH_MESON
|
||||
bool "Amlogic Platforms"
|
||||
select COMMON_CLK
|
||||
help
|
||||
This enables support for the arm64 based Amlogic SoCs
|
||||
such as the s905, S905X/D, S912, A113X/D or S905X/D2
|
||||
|
@ -134,23 +134,23 @@
|
||||
type = "critical";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
cpu_cooling_maps: cooling-maps {
|
||||
map0 {
|
||||
trip = <&cpu_passive>;
|
||||
cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
<&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
<&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
<&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
};
|
||||
cpu_cooling_maps: cooling-maps {
|
||||
map0 {
|
||||
trip = <&cpu_passive>;
|
||||
cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
<&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
<&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
<&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
};
|
||||
|
||||
map1 {
|
||||
trip = <&cpu_hot>;
|
||||
cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
<&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
<&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
<&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
map1 {
|
||||
trip = <&cpu_hot>;
|
||||
cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
<&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
<&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
<&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -60,7 +60,7 @@
|
||||
|
||||
&port02 {
|
||||
bus-range = <3 3>;
|
||||
ethernet0: pci@0,0 {
|
||||
ethernet0: ethernet@0,0 {
|
||||
reg = <0x30000 0x0 0x0 0x0 0x0>;
|
||||
/* To be filled by the loader */
|
||||
local-mac-address = [00 10 18 00 00 00];
|
||||
|
@ -144,6 +144,7 @@
|
||||
apple,npins = <212>;
|
||||
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
interrupt-parent = <&aic>;
|
||||
interrupts = <AIC_IRQ 190 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<AIC_IRQ 191 IRQ_TYPE_LEVEL_HIGH>,
|
||||
@ -170,6 +171,7 @@
|
||||
apple,npins = <42>;
|
||||
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
interrupt-parent = <&aic>;
|
||||
interrupts = <AIC_IRQ 268 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<AIC_IRQ 269 IRQ_TYPE_LEVEL_HIGH>,
|
||||
@ -190,6 +192,7 @@
|
||||
apple,npins = <23>;
|
||||
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
interrupt-parent = <&aic>;
|
||||
interrupts = <AIC_IRQ 330 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<AIC_IRQ 331 IRQ_TYPE_LEVEL_HIGH>,
|
||||
@ -210,6 +213,7 @@
|
||||
apple,npins = <16>;
|
||||
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
interrupt-parent = <&aic>;
|
||||
interrupts = <AIC_IRQ 391 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<AIC_IRQ 392 IRQ_TYPE_LEVEL_HIGH>,
|
||||
|
@ -38,7 +38,6 @@
|
||||
powerdn {
|
||||
label = "External Power Down";
|
||||
gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
|
||||
interrupts = <&gpio1 17 IRQ_TYPE_EDGE_FALLING>;
|
||||
linux,code = <KEY_POWER>;
|
||||
};
|
||||
|
||||
@ -46,7 +45,6 @@
|
||||
admin {
|
||||
label = "ADMIN button";
|
||||
gpios = <&gpio3 8 GPIO_ACTIVE_HIGH>;
|
||||
interrupts = <&gpio3 8 IRQ_TYPE_EDGE_RISING>;
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
};
|
||||
};
|
||||
|
@ -386,6 +386,8 @@
|
||||
reg = <2>;
|
||||
ethernet = <&dpmac17>;
|
||||
phy-mode = "rgmii-id";
|
||||
rx-internal-delay-ps = <2000>;
|
||||
tx-internal-delay-ps = <2000>;
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
@ -529,6 +531,8 @@
|
||||
reg = <2>;
|
||||
ethernet = <&dpmac18>;
|
||||
phy-mode = "rgmii-id";
|
||||
rx-internal-delay-ps = <2000>;
|
||||
tx-internal-delay-ps = <2000>;
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
|
@ -524,8 +524,6 @@
|
||||
<&clk IMX8MQ_VIDEO_PLL1>,
|
||||
<&clk IMX8MQ_VIDEO_PLL1_OUT>;
|
||||
assigned-clock-rates = <0>, <0>, <0>, <594000000>;
|
||||
interconnects = <&noc IMX8MQ_ICM_LCDIF &noc IMX8MQ_ICS_DRAM>;
|
||||
interconnect-names = "dram";
|
||||
status = "disabled";
|
||||
|
||||
port@0 {
|
||||
|
@ -97,7 +97,7 @@
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
vim-supply = <&vcc_io>;
|
||||
vin-supply = <&vcc_io>;
|
||||
};
|
||||
|
||||
vdd_core: vdd-core {
|
||||
|
@ -705,7 +705,6 @@
|
||||
&sdhci {
|
||||
bus-width = <8>;
|
||||
mmc-hs400-1_8v;
|
||||
mmc-hs400-enhanced-strobe;
|
||||
non-removable;
|
||||
status = "okay";
|
||||
};
|
||||
|
@ -276,6 +276,7 @@
|
||||
clock-output-names = "xin32k", "rk808-clkout2";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pmic_int_l>;
|
||||
rockchip,system-power-controller;
|
||||
vcc1-supply = <&vcc5v0_sys>;
|
||||
vcc2-supply = <&vcc5v0_sys>;
|
||||
vcc3-supply = <&vcc5v0_sys>;
|
||||
|
@ -55,7 +55,7 @@
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
vim-supply = <&vcc3v3_sys>;
|
||||
vin-supply = <&vcc3v3_sys>;
|
||||
};
|
||||
|
||||
vcc3v3_sys: vcc3v3-sys {
|
||||
|
@ -502,7 +502,7 @@
|
||||
status = "okay";
|
||||
|
||||
bt656-supply = <&vcc_3v0>;
|
||||
audio-supply = <&vcc_3v0>;
|
||||
audio-supply = <&vcc1v8_codec>;
|
||||
sdmmc-supply = <&vcc_sdio>;
|
||||
gpio1830-supply = <&vcc_3v0>;
|
||||
};
|
||||
|
@ -149,6 +149,7 @@ int load_other_segments(struct kimage *image,
|
||||
initrd_len, cmdline, 0);
|
||||
if (!dtb) {
|
||||
pr_err("Preparing for new dtb failed\n");
|
||||
ret = -EINVAL;
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
|
@ -6,5 +6,7 @@
|
||||
#define PCI_IOSIZE SZ_64K
|
||||
#define IO_SPACE_LIMIT (PCI_IOSIZE - 1)
|
||||
|
||||
#define pci_remap_iospace pci_remap_iospace
|
||||
|
||||
#include <asm/mach-generic/spaces.h>
|
||||
#endif
|
||||
|
@ -20,10 +20,6 @@
|
||||
#include <linux/list.h>
|
||||
#include <linux/of.h>
|
||||
|
||||
#ifdef CONFIG_PCI_DRIVERS_GENERIC
|
||||
#define pci_remap_iospace pci_remap_iospace
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PCI_DRIVERS_LEGACY
|
||||
|
||||
/*
|
||||
|
@ -47,6 +47,7 @@ void pcibios_fixup_bus(struct pci_bus *bus)
|
||||
pci_read_bridge_bases(bus);
|
||||
}
|
||||
|
||||
#ifdef pci_remap_iospace
|
||||
int pci_remap_iospace(const struct resource *res, phys_addr_t phys_addr)
|
||||
{
|
||||
unsigned long vaddr;
|
||||
@ -60,3 +61,4 @@ int pci_remap_iospace(const struct resource *res, phys_addr_t phys_addr)
|
||||
set_io_port_base(vaddr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
@ -422,11 +422,17 @@ static inline int create_stub(const Elf64_Shdr *sechdrs,
|
||||
const char *name)
|
||||
{
|
||||
long reladdr;
|
||||
func_desc_t desc;
|
||||
int i;
|
||||
|
||||
if (is_mprofile_ftrace_call(name))
|
||||
return create_ftrace_stub(entry, addr, me);
|
||||
|
||||
memcpy(entry->jump, ppc64_stub_insns, sizeof(ppc64_stub_insns));
|
||||
for (i = 0; i < sizeof(ppc64_stub_insns) / sizeof(u32); i++) {
|
||||
if (patch_instruction(&entry->jump[i],
|
||||
ppc_inst(ppc64_stub_insns[i])))
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Stub uses address relative to r2. */
|
||||
reladdr = (unsigned long)entry - my_r2(sechdrs, me);
|
||||
@ -437,10 +443,24 @@ static inline int create_stub(const Elf64_Shdr *sechdrs,
|
||||
}
|
||||
pr_debug("Stub %p get data from reladdr %li\n", entry, reladdr);
|
||||
|
||||
entry->jump[0] |= PPC_HA(reladdr);
|
||||
entry->jump[1] |= PPC_LO(reladdr);
|
||||
entry->funcdata = func_desc(addr);
|
||||
entry->magic = STUB_MAGIC;
|
||||
if (patch_instruction(&entry->jump[0],
|
||||
ppc_inst(entry->jump[0] | PPC_HA(reladdr))))
|
||||
return 0;
|
||||
|
||||
if (patch_instruction(&entry->jump[1],
|
||||
ppc_inst(entry->jump[1] | PPC_LO(reladdr))))
|
||||
return 0;
|
||||
|
||||
// func_desc_t is 8 bytes if ABIv2, else 16 bytes
|
||||
desc = func_desc(addr);
|
||||
for (i = 0; i < sizeof(func_desc_t) / sizeof(u32); i++) {
|
||||
if (patch_instruction(((u32 *)&entry->funcdata) + i,
|
||||
ppc_inst(((u32 *)(&desc))[i])))
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (patch_instruction(&entry->magic, ppc_inst(STUB_MAGIC)))
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
@ -495,8 +515,11 @@ static int restore_r2(const char *name, u32 *instruction, struct module *me)
|
||||
me->name, *instruction, instruction);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* ld r2,R2_STACK_OFFSET(r1) */
|
||||
*instruction = PPC_INST_LD_TOC;
|
||||
if (patch_instruction(instruction, ppc_inst(PPC_INST_LD_TOC)))
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -636,9 +659,12 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,
|
||||
}
|
||||
|
||||
/* Only replace bits 2 through 26 */
|
||||
*(uint32_t *)location
|
||||
= (*(uint32_t *)location & ~0x03fffffc)
|
||||
value = (*(uint32_t *)location & ~0x03fffffc)
|
||||
| (value & 0x03fffffc);
|
||||
|
||||
if (patch_instruction((u32 *)location, ppc_inst(value)))
|
||||
return -EFAULT;
|
||||
|
||||
break;
|
||||
|
||||
case R_PPC64_REL64:
|
||||
|
@ -220,7 +220,7 @@ static int smp_85xx_start_cpu(int cpu)
|
||||
local_irq_save(flags);
|
||||
hard_irq_disable();
|
||||
|
||||
if (qoriq_pm_ops)
|
||||
if (qoriq_pm_ops && qoriq_pm_ops->cpu_up_prepare)
|
||||
qoriq_pm_ops->cpu_up_prepare(cpu);
|
||||
|
||||
/* if cpu is not spinning, reset it */
|
||||
@ -292,7 +292,7 @@ static int smp_85xx_kick_cpu(int nr)
|
||||
booting_thread_hwid = cpu_thread_in_core(nr);
|
||||
primary = cpu_first_thread_sibling(nr);
|
||||
|
||||
if (qoriq_pm_ops)
|
||||
if (qoriq_pm_ops && qoriq_pm_ops->cpu_up_prepare)
|
||||
qoriq_pm_ops->cpu_up_prepare(nr);
|
||||
|
||||
/*
|
||||
|
@ -76,6 +76,7 @@
|
||||
spi-max-frequency = <20000000>;
|
||||
voltage-ranges = <3300 3300>;
|
||||
disable-wp;
|
||||
gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
/* Copyright (c) 2020 SiFive, Inc */
|
||||
|
||||
#include "fu740-c000.dtsi"
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
/* Clock frequency (in Hz) of the PCB crystal for rtcclk */
|
||||
@ -54,10 +55,21 @@
|
||||
temperature-sensor@4c {
|
||||
compatible = "ti,tmp451";
|
||||
reg = <0x4c>;
|
||||
vcc-supply = <&vdd_bpro>;
|
||||
interrupt-parent = <&gpio>;
|
||||
interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
|
||||
};
|
||||
|
||||
eeprom@54 {
|
||||
compatible = "microchip,24c02", "atmel,24c02";
|
||||
reg = <0x54>;
|
||||
vcc-supply = <&vdd_bpro>;
|
||||
label = "board-id";
|
||||
pagesize = <16>;
|
||||
read-only;
|
||||
size = <256>;
|
||||
};
|
||||
|
||||
pmic@58 {
|
||||
compatible = "dlg,da9063";
|
||||
reg = <0x58>;
|
||||
@ -65,48 +77,44 @@
|
||||
interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
|
||||
interrupt-controller;
|
||||
|
||||
regulators {
|
||||
vdd_bcore1: bcore1 {
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <900000>;
|
||||
regulator-min-microamp = <5000000>;
|
||||
regulator-max-microamp = <5000000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
onkey {
|
||||
compatible = "dlg,da9063-onkey";
|
||||
};
|
||||
|
||||
vdd_bcore2: bcore2 {
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <900000>;
|
||||
regulator-min-microamp = <5000000>;
|
||||
regulator-max-microamp = <5000000>;
|
||||
rtc {
|
||||
compatible = "dlg,da9063-rtc";
|
||||
};
|
||||
|
||||
wdt {
|
||||
compatible = "dlg,da9063-watchdog";
|
||||
};
|
||||
|
||||
regulators {
|
||||
vdd_bcore: bcores-merged {
|
||||
regulator-min-microvolt = <1050000>;
|
||||
regulator-max-microvolt = <1050000>;
|
||||
regulator-min-microamp = <4800000>;
|
||||
regulator-max-microamp = <4800000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vdd_bpro: bpro {
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-min-microamp = <2500000>;
|
||||
regulator-max-microamp = <2500000>;
|
||||
regulator-min-microamp = <2400000>;
|
||||
regulator-max-microamp = <2400000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vdd_bperi: bperi {
|
||||
regulator-min-microvolt = <1050000>;
|
||||
regulator-max-microvolt = <1050000>;
|
||||
regulator-min-microvolt = <1060000>;
|
||||
regulator-max-microvolt = <1060000>;
|
||||
regulator-min-microamp = <1500000>;
|
||||
regulator-max-microamp = <1500000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vdd_bmem: bmem {
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1200000>;
|
||||
regulator-min-microamp = <3000000>;
|
||||
regulator-max-microamp = <3000000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vdd_bio: bio {
|
||||
vdd_bmem_bio: bmem-bio-merged {
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1200000>;
|
||||
regulator-min-microamp = <3000000>;
|
||||
@ -117,86 +125,66 @@
|
||||
vdd_ldo1: ldo1 {
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-min-microamp = <100000>;
|
||||
regulator-max-microamp = <100000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vdd_ldo2: ldo2 {
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-min-microamp = <200000>;
|
||||
regulator-max-microamp = <200000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vdd_ldo3: ldo3 {
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-min-microamp = <200000>;
|
||||
regulator-max-microamp = <200000>;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vdd_ldo4: ldo4 {
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-min-microamp = <200000>;
|
||||
regulator-max-microamp = <200000>;
|
||||
regulator-min-microvolt = <2500000>;
|
||||
regulator-max-microvolt = <2500000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vdd_ldo5: ldo5 {
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-min-microamp = <100000>;
|
||||
regulator-max-microamp = <100000>;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vdd_ldo6: ldo6 {
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-min-microamp = <200000>;
|
||||
regulator-max-microamp = <200000>;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vdd_ldo7: ldo7 {
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-min-microamp = <200000>;
|
||||
regulator-max-microamp = <200000>;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vdd_ldo8: ldo8 {
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-min-microamp = <200000>;
|
||||
regulator-max-microamp = <200000>;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vdd_ld09: ldo9 {
|
||||
regulator-min-microvolt = <1050000>;
|
||||
regulator-max-microvolt = <1050000>;
|
||||
regulator-min-microamp = <200000>;
|
||||
regulator-max-microamp = <200000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vdd_ldo10: ldo10 {
|
||||
regulator-min-microvolt = <1000000>;
|
||||
regulator-max-microvolt = <1000000>;
|
||||
regulator-min-microamp = <300000>;
|
||||
regulator-max-microamp = <300000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vdd_ldo11: ldo11 {
|
||||
regulator-min-microvolt = <2500000>;
|
||||
regulator-max-microvolt = <2500000>;
|
||||
regulator-min-microamp = <300000>;
|
||||
regulator-max-microamp = <300000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
};
|
||||
@ -223,6 +211,7 @@
|
||||
spi-max-frequency = <20000000>;
|
||||
voltage-ranges = <3300 3300>;
|
||||
disable-wp;
|
||||
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
@ -245,4 +234,8 @@
|
||||
|
||||
&gpio {
|
||||
status = "okay";
|
||||
gpio-line-names = "J29.1", "PMICNTB", "PMICSHDN", "J8.1", "J8.3",
|
||||
"PCIe_PWREN", "THERM", "UBRDG_RSTN", "PCIe_PERSTN",
|
||||
"ULPI_RSTN", "J8.2", "UHUB_RSTN", "GEMGXL_RST", "J8.4",
|
||||
"EN_VDD_SD", "SD_CD";
|
||||
};
|
||||
|
@ -117,6 +117,7 @@ CONFIG_UNIX=y
|
||||
CONFIG_UNIX_DIAG=m
|
||||
CONFIG_XFRM_USER=m
|
||||
CONFIG_NET_KEY=m
|
||||
CONFIG_NET_SWITCHDEV=y
|
||||
CONFIG_SMC=m
|
||||
CONFIG_SMC_DIAG=m
|
||||
CONFIG_INET=y
|
||||
@ -511,6 +512,7 @@ CONFIG_NLMON=m
|
||||
CONFIG_MLX4_EN=m
|
||||
CONFIG_MLX5_CORE=m
|
||||
CONFIG_MLX5_CORE_EN=y
|
||||
CONFIG_MLX5_ESWITCH=y
|
||||
# CONFIG_NET_VENDOR_MICREL is not set
|
||||
# CONFIG_NET_VENDOR_MICROCHIP is not set
|
||||
# CONFIG_NET_VENDOR_MICROSEMI is not set
|
||||
|
@ -109,6 +109,7 @@ CONFIG_UNIX=y
|
||||
CONFIG_UNIX_DIAG=m
|
||||
CONFIG_XFRM_USER=m
|
||||
CONFIG_NET_KEY=m
|
||||
CONFIG_NET_SWITCHDEV=y
|
||||
CONFIG_SMC=m
|
||||
CONFIG_SMC_DIAG=m
|
||||
CONFIG_INET=y
|
||||
@ -502,6 +503,7 @@ CONFIG_NLMON=m
|
||||
CONFIG_MLX4_EN=m
|
||||
CONFIG_MLX5_CORE=m
|
||||
CONFIG_MLX5_CORE_EN=y
|
||||
CONFIG_MLX5_ESWITCH=y
|
||||
# CONFIG_NET_VENDOR_MICREL is not set
|
||||
# CONFIG_NET_VENDOR_MICROCHIP is not set
|
||||
# CONFIG_NET_VENDOR_MICROSEMI is not set
|
||||
|
@ -290,7 +290,6 @@ void kprobe_ftrace_handler(unsigned long ip, unsigned long parent_ip,
|
||||
return;
|
||||
|
||||
regs = ftrace_get_regs(fregs);
|
||||
preempt_disable_notrace();
|
||||
p = get_kprobe((kprobe_opcode_t *)ip);
|
||||
if (unlikely(!p) || kprobe_disabled(p))
|
||||
goto out;
|
||||
@ -318,7 +317,6 @@ void kprobe_ftrace_handler(unsigned long ip, unsigned long parent_ip,
|
||||
}
|
||||
__this_cpu_write(current_kprobe, NULL);
|
||||
out:
|
||||
preempt_enable_notrace();
|
||||
ftrace_test_recursion_unlock(bit);
|
||||
}
|
||||
NOKPROBE_SYMBOL(kprobe_ftrace_handler);
|
||||
|
@ -138,7 +138,7 @@ void noinstr do_io_irq(struct pt_regs *regs)
|
||||
struct pt_regs *old_regs = set_irq_regs(regs);
|
||||
int from_idle;
|
||||
|
||||
irq_enter();
|
||||
irq_enter_rcu();
|
||||
|
||||
if (user_mode(regs)) {
|
||||
update_timer_sys();
|
||||
@ -158,7 +158,8 @@ void noinstr do_io_irq(struct pt_regs *regs)
|
||||
do_irq_async(regs, IO_INTERRUPT);
|
||||
} while (MACHINE_IS_LPAR && irq_pending(regs));
|
||||
|
||||
irq_exit();
|
||||
irq_exit_rcu();
|
||||
|
||||
set_irq_regs(old_regs);
|
||||
irqentry_exit(regs, state);
|
||||
|
||||
@ -172,7 +173,7 @@ void noinstr do_ext_irq(struct pt_regs *regs)
|
||||
struct pt_regs *old_regs = set_irq_regs(regs);
|
||||
int from_idle;
|
||||
|
||||
irq_enter();
|
||||
irq_enter_rcu();
|
||||
|
||||
if (user_mode(regs)) {
|
||||
update_timer_sys();
|
||||
@ -190,7 +191,7 @@ void noinstr do_ext_irq(struct pt_regs *regs)
|
||||
|
||||
do_irq_async(regs, EXT_INTERRUPT);
|
||||
|
||||
irq_exit();
|
||||
irq_exit_rcu();
|
||||
set_irq_regs(old_regs);
|
||||
irqentry_exit(regs, state);
|
||||
|
||||
|
@ -7,6 +7,8 @@
|
||||
* Author(s): Philipp Rudo <prudo@linux.vnet.ibm.com>
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "kexec: " fmt
|
||||
|
||||
#include <linux/elf.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/kexec.h>
|
||||
@ -290,8 +292,16 @@ int arch_kexec_apply_relocations_add(struct purgatory_info *pi,
|
||||
const Elf_Shdr *relsec,
|
||||
const Elf_Shdr *symtab)
|
||||
{
|
||||
const char *strtab, *name, *shstrtab;
|
||||
const Elf_Shdr *sechdrs;
|
||||
Elf_Rela *relas;
|
||||
int i, r_type;
|
||||
int ret;
|
||||
|
||||
/* String & section header string table */
|
||||
sechdrs = (void *)pi->ehdr + pi->ehdr->e_shoff;
|
||||
strtab = (char *)pi->ehdr + sechdrs[symtab->sh_link].sh_offset;
|
||||
shstrtab = (char *)pi->ehdr + sechdrs[pi->ehdr->e_shstrndx].sh_offset;
|
||||
|
||||
relas = (void *)pi->ehdr + relsec->sh_offset;
|
||||
|
||||
@ -304,15 +314,27 @@ int arch_kexec_apply_relocations_add(struct purgatory_info *pi,
|
||||
sym = (void *)pi->ehdr + symtab->sh_offset;
|
||||
sym += ELF64_R_SYM(relas[i].r_info);
|
||||
|
||||
if (sym->st_shndx == SHN_UNDEF)
|
||||
return -ENOEXEC;
|
||||
if (sym->st_name)
|
||||
name = strtab + sym->st_name;
|
||||
else
|
||||
name = shstrtab + sechdrs[sym->st_shndx].sh_name;
|
||||
|
||||
if (sym->st_shndx == SHN_COMMON)
|
||||
if (sym->st_shndx == SHN_UNDEF) {
|
||||
pr_err("Undefined symbol: %s\n", name);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
if (sym->st_shndx == SHN_COMMON) {
|
||||
pr_err("symbol '%s' in common section\n", name);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
if (sym->st_shndx >= pi->ehdr->e_shnum &&
|
||||
sym->st_shndx != SHN_ABS)
|
||||
sym->st_shndx != SHN_ABS) {
|
||||
pr_err("Invalid section %d for symbol %s\n",
|
||||
sym->st_shndx, name);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
loc = pi->purgatory_buf;
|
||||
loc += section->sh_offset;
|
||||
@ -326,7 +348,15 @@ int arch_kexec_apply_relocations_add(struct purgatory_info *pi,
|
||||
addr = section->sh_addr + relas[i].r_offset;
|
||||
|
||||
r_type = ELF64_R_TYPE(relas[i].r_info);
|
||||
arch_kexec_do_relocs(r_type, loc, val, addr);
|
||||
|
||||
if (r_type == R_390_PLT32DBL)
|
||||
r_type = R_390_PC32DBL;
|
||||
|
||||
ret = arch_kexec_do_relocs(r_type, loc, val, addr);
|
||||
if (ret) {
|
||||
pr_err("Unknown rela relocation: %d\n", r_type);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -3987,7 +3987,21 @@ out_retry:
|
||||
static bool is_page_fault_stale(struct kvm_vcpu *vcpu,
|
||||
struct kvm_page_fault *fault, int mmu_seq)
|
||||
{
|
||||
if (is_obsolete_sp(vcpu->kvm, to_shadow_page(vcpu->arch.mmu->root_hpa)))
|
||||
struct kvm_mmu_page *sp = to_shadow_page(vcpu->arch.mmu->root_hpa);
|
||||
|
||||
/* Special roots, e.g. pae_root, are not backed by shadow pages. */
|
||||
if (sp && is_obsolete_sp(vcpu->kvm, sp))
|
||||
return true;
|
||||
|
||||
/*
|
||||
* Roots without an associated shadow page are considered invalid if
|
||||
* there is a pending request to free obsolete roots. The request is
|
||||
* only a hint that the current root _may_ be obsolete and needs to be
|
||||
* reloaded, e.g. if the guest frees a PGD that KVM is tracking as a
|
||||
* previous root, then __kvm_mmu_prepare_zap_page() signals all vCPUs
|
||||
* to reload even if no vCPU is actively using the root.
|
||||
*/
|
||||
if (!sp && kvm_test_request(KVM_REQ_MMU_RELOAD, vcpu))
|
||||
return true;
|
||||
|
||||
return fault->slot &&
|
||||
|
@ -3413,7 +3413,7 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
|
||||
|
||||
if (!msr_info->host_initiated)
|
||||
return 1;
|
||||
if (guest_cpuid_has(vcpu, X86_FEATURE_PDCM) && kvm_get_msr_feature(&msr_ent))
|
||||
if (kvm_get_msr_feature(&msr_ent))
|
||||
return 1;
|
||||
if (data & ~msr_ent.data)
|
||||
return 1;
|
||||
|
@ -1252,19 +1252,54 @@ st: if (is_imm8(insn->off))
|
||||
case BPF_LDX | BPF_MEM | BPF_DW:
|
||||
case BPF_LDX | BPF_PROBE_MEM | BPF_DW:
|
||||
if (BPF_MODE(insn->code) == BPF_PROBE_MEM) {
|
||||
/* test src_reg, src_reg */
|
||||
maybe_emit_mod(&prog, src_reg, src_reg, true); /* always 1 byte */
|
||||
EMIT2(0x85, add_2reg(0xC0, src_reg, src_reg));
|
||||
/* jne start_of_ldx */
|
||||
EMIT2(X86_JNE, 0);
|
||||
/* Though the verifier prevents negative insn->off in BPF_PROBE_MEM
|
||||
* add abs(insn->off) to the limit to make sure that negative
|
||||
* offset won't be an issue.
|
||||
* insn->off is s16, so it won't affect valid pointers.
|
||||
*/
|
||||
u64 limit = TASK_SIZE_MAX + PAGE_SIZE + abs(insn->off);
|
||||
u8 *end_of_jmp1, *end_of_jmp2;
|
||||
|
||||
/* Conservatively check that src_reg + insn->off is a kernel address:
|
||||
* 1. src_reg + insn->off >= limit
|
||||
* 2. src_reg + insn->off doesn't become small positive.
|
||||
* Cannot do src_reg + insn->off >= limit in one branch,
|
||||
* since it needs two spare registers, but JIT has only one.
|
||||
*/
|
||||
|
||||
/* movabsq r11, limit */
|
||||
EMIT2(add_1mod(0x48, AUX_REG), add_1reg(0xB8, AUX_REG));
|
||||
EMIT((u32)limit, 4);
|
||||
EMIT(limit >> 32, 4);
|
||||
/* cmp src_reg, r11 */
|
||||
maybe_emit_mod(&prog, src_reg, AUX_REG, true);
|
||||
EMIT2(0x39, add_2reg(0xC0, src_reg, AUX_REG));
|
||||
/* if unsigned '<' goto end_of_jmp2 */
|
||||
EMIT2(X86_JB, 0);
|
||||
end_of_jmp1 = prog;
|
||||
|
||||
/* mov r11, src_reg */
|
||||
emit_mov_reg(&prog, true, AUX_REG, src_reg);
|
||||
/* add r11, insn->off */
|
||||
maybe_emit_1mod(&prog, AUX_REG, true);
|
||||
EMIT2_off32(0x81, add_1reg(0xC0, AUX_REG), insn->off);
|
||||
/* jmp if not carry to start_of_ldx
|
||||
* Otherwise ERR_PTR(-EINVAL) + 128 will be the user addr
|
||||
* that has to be rejected.
|
||||
*/
|
||||
EMIT2(0x73 /* JNC */, 0);
|
||||
end_of_jmp2 = prog;
|
||||
|
||||
/* xor dst_reg, dst_reg */
|
||||
emit_mov_imm32(&prog, false, dst_reg, 0);
|
||||
/* jmp byte_after_ldx */
|
||||
EMIT2(0xEB, 0);
|
||||
|
||||
/* populate jmp_offset for JNE above */
|
||||
temp[4] = prog - temp - 5 /* sizeof(test + jne) */;
|
||||
/* populate jmp_offset for JB above to jump to xor dst_reg */
|
||||
end_of_jmp1[-1] = end_of_jmp2 - end_of_jmp1;
|
||||
/* populate jmp_offset for JNC above to jump to start_of_ldx */
|
||||
start_of_ldx = prog;
|
||||
end_of_jmp2[-1] = start_of_ldx - end_of_jmp2;
|
||||
}
|
||||
emit_ldx(&prog, BPF_SIZE(insn->code), dst_reg, src_reg, insn->off);
|
||||
if (BPF_MODE(insn->code) == BPF_PROBE_MEM) {
|
||||
@ -1305,7 +1340,7 @@ st: if (is_imm8(insn->off))
|
||||
* End result: x86 insn "mov rbx, qword ptr [rax+0x14]"
|
||||
* of 4 bytes will be ignored and rbx will be zero inited.
|
||||
*/
|
||||
ex->fixup = (prog - temp) | (reg2pt_regs[dst_reg] << 8);
|
||||
ex->fixup = (prog - start_of_ldx) | (reg2pt_regs[dst_reg] << 8);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -2311,7 +2311,14 @@ static void ioc_timer_fn(struct timer_list *timer)
|
||||
hwm = current_hweight_max(iocg);
|
||||
new_hwi = hweight_after_donation(iocg, old_hwi, hwm,
|
||||
usage, &now);
|
||||
if (new_hwi < hwm) {
|
||||
/*
|
||||
* Donation calculation assumes hweight_after_donation
|
||||
* to be positive, a condition that a donor w/ hwa < 2
|
||||
* can't meet. Don't bother with donation if hwa is
|
||||
* below 2. It's not gonna make a meaningful difference
|
||||
* anyway.
|
||||
*/
|
||||
if (new_hwi < hwm && hwa >= 2) {
|
||||
iocg->hweight_donating = hwa;
|
||||
iocg->hweight_after_donation = new_hwi;
|
||||
list_add(&iocg->surplus_list, &surpluses);
|
||||
|
@ -41,8 +41,7 @@ obj-$(CONFIG_DMADEVICES) += dma/
|
||||
# SOC specific infrastructure drivers.
|
||||
obj-y += soc/
|
||||
|
||||
obj-$(CONFIG_VIRTIO) += virtio/
|
||||
obj-$(CONFIG_VIRTIO_PCI_LIB) += virtio/
|
||||
obj-y += virtio/
|
||||
obj-$(CONFIG_VDPA) += vdpa/
|
||||
obj-$(CONFIG_XEN) += xen/
|
||||
|
||||
|
@ -2859,8 +2859,19 @@ static unsigned int ata_scsi_pass_thru(struct ata_queued_cmd *qc)
|
||||
goto invalid_fld;
|
||||
}
|
||||
|
||||
if (ata_is_ncq(tf->protocol) && (cdb[2 + cdb_offset] & 0x3) == 0)
|
||||
tf->protocol = ATA_PROT_NCQ_NODATA;
|
||||
if ((cdb[2 + cdb_offset] & 0x3) == 0) {
|
||||
/*
|
||||
* When T_LENGTH is zero (No data is transferred), dir should
|
||||
* be DMA_NONE.
|
||||
*/
|
||||
if (scmd->sc_data_direction != DMA_NONE) {
|
||||
fp = 2 + cdb_offset;
|
||||
goto invalid_fld;
|
||||
}
|
||||
|
||||
if (ata_is_ncq(tf->protocol))
|
||||
tf->protocol = ATA_PROT_NCQ_NODATA;
|
||||
}
|
||||
|
||||
/* enable LBA */
|
||||
tf->flags |= ATA_TFLAG_LBA;
|
||||
|
@ -3418,6 +3418,14 @@ static int __clk_core_init(struct clk_core *core)
|
||||
|
||||
clk_prepare_lock();
|
||||
|
||||
/*
|
||||
* Set hw->core after grabbing the prepare_lock to synchronize with
|
||||
* callers of clk_core_fill_parent_index() where we treat hw->core
|
||||
* being NULL as the clk not being registered yet. This is crucial so
|
||||
* that clks aren't parented until their parent is fully registered.
|
||||
*/
|
||||
core->hw->core = core;
|
||||
|
||||
ret = clk_pm_runtime_get(core);
|
||||
if (ret)
|
||||
goto unlock;
|
||||
@ -3582,8 +3590,10 @@ static int __clk_core_init(struct clk_core *core)
|
||||
out:
|
||||
clk_pm_runtime_put(core);
|
||||
unlock:
|
||||
if (ret)
|
||||
if (ret) {
|
||||
hlist_del_init(&core->child_node);
|
||||
core->hw->core = NULL;
|
||||
}
|
||||
|
||||
clk_prepare_unlock();
|
||||
|
||||
@ -3847,7 +3857,6 @@ __clk_register(struct device *dev, struct device_node *np, struct clk_hw *hw)
|
||||
core->num_parents = init->num_parents;
|
||||
core->min_rate = 0;
|
||||
core->max_rate = ULONG_MAX;
|
||||
hw->core = core;
|
||||
|
||||
ret = clk_core_populate_parent_map(core, init);
|
||||
if (ret)
|
||||
@ -3865,7 +3874,7 @@ __clk_register(struct device *dev, struct device_node *np, struct clk_hw *hw)
|
||||
goto fail_create_clk;
|
||||
}
|
||||
|
||||
clk_core_link_consumer(hw->core, hw->clk);
|
||||
clk_core_link_consumer(core, hw->clk);
|
||||
|
||||
ret = __clk_core_init(core);
|
||||
if (!ret)
|
||||
|
@ -373,7 +373,7 @@ static void axi_chan_block_xfer_start(struct axi_dma_chan *chan,
|
||||
struct axi_dma_desc *first)
|
||||
{
|
||||
u32 priority = chan->chip->dw->hdata->priority[chan->id];
|
||||
struct axi_dma_chan_config config;
|
||||
struct axi_dma_chan_config config = {};
|
||||
u32 irq_mask;
|
||||
u8 lms = 0; /* Select AXI0 master for LLI fetching */
|
||||
|
||||
@ -391,7 +391,7 @@ static void axi_chan_block_xfer_start(struct axi_dma_chan *chan,
|
||||
config.tt_fc = DWAXIDMAC_TT_FC_MEM_TO_MEM_DMAC;
|
||||
config.prior = priority;
|
||||
config.hs_sel_dst = DWAXIDMAC_HS_SEL_HW;
|
||||
config.hs_sel_dst = DWAXIDMAC_HS_SEL_HW;
|
||||
config.hs_sel_src = DWAXIDMAC_HS_SEL_HW;
|
||||
switch (chan->direction) {
|
||||
case DMA_MEM_TO_DEV:
|
||||
dw_axi_dma_set_byte_halfword(chan, true);
|
||||
|
@ -187,17 +187,9 @@ static int dw_edma_pcie_probe(struct pci_dev *pdev,
|
||||
|
||||
/* DMA configuration */
|
||||
err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
|
||||
if (!err) {
|
||||
if (err) {
|
||||
pci_err(pdev, "DMA mask 64 set failed\n");
|
||||
return err;
|
||||
} else {
|
||||
pci_err(pdev, "DMA mask 64 set failed\n");
|
||||
|
||||
err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
|
||||
if (err) {
|
||||
pci_err(pdev, "DMA mask 32 set failed\n");
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
/* Data structure allocation */
|
||||
|
@ -137,10 +137,10 @@ halt:
|
||||
INIT_WORK(&idxd->work, idxd_device_reinit);
|
||||
queue_work(idxd->wq, &idxd->work);
|
||||
} else {
|
||||
spin_lock(&idxd->dev_lock);
|
||||
idxd->state = IDXD_DEV_HALTED;
|
||||
idxd_wqs_quiesce(idxd);
|
||||
idxd_wqs_unmap_portal(idxd);
|
||||
spin_lock(&idxd->dev_lock);
|
||||
idxd_device_clear_state(idxd);
|
||||
dev_err(&idxd->pdev->dev,
|
||||
"idxd halted, need %s.\n",
|
||||
|
@ -106,6 +106,7 @@ static void llist_abort_desc(struct idxd_wq *wq, struct idxd_irq_entry *ie,
|
||||
{
|
||||
struct idxd_desc *d, *t, *found = NULL;
|
||||
struct llist_node *head;
|
||||
LIST_HEAD(flist);
|
||||
|
||||
desc->completion->status = IDXD_COMP_DESC_ABORT;
|
||||
/*
|
||||
@ -120,7 +121,11 @@ static void llist_abort_desc(struct idxd_wq *wq, struct idxd_irq_entry *ie,
|
||||
found = desc;
|
||||
continue;
|
||||
}
|
||||
list_add_tail(&desc->list, &ie->work_list);
|
||||
|
||||
if (d->completion->status)
|
||||
list_add_tail(&d->list, &flist);
|
||||
else
|
||||
list_add_tail(&d->list, &ie->work_list);
|
||||
}
|
||||
}
|
||||
|
||||
@ -130,6 +135,17 @@ static void llist_abort_desc(struct idxd_wq *wq, struct idxd_irq_entry *ie,
|
||||
|
||||
if (found)
|
||||
complete_desc(found, IDXD_COMPLETE_ABORT);
|
||||
|
||||
/*
|
||||
* complete_desc() will return desc to allocator and the desc can be
|
||||
* acquired by a different process and the desc->list can be modified.
|
||||
* Delete desc from list so the list trasversing does not get corrupted
|
||||
* by the other process.
|
||||
*/
|
||||
list_for_each_entry_safe(d, t, &flist, list) {
|
||||
list_del_init(&d->list);
|
||||
complete_desc(d, IDXD_COMPLETE_NORMAL);
|
||||
}
|
||||
}
|
||||
|
||||
int idxd_submit_desc(struct idxd_wq *wq, struct idxd_desc *desc)
|
||||
|
@ -874,4 +874,4 @@ MODULE_LICENSE("GPL v2");
|
||||
MODULE_DESCRIPTION("STMicroelectronics FDMA engine driver");
|
||||
MODULE_AUTHOR("Ludovic.barre <Ludovic.barre@st.com>");
|
||||
MODULE_AUTHOR("Peter Griffin <peter.griffin@linaro.org>");
|
||||
MODULE_ALIAS("platform: " DRIVER_NAME);
|
||||
MODULE_ALIAS("platform:" DRIVER_NAME);
|
||||
|
@ -4534,45 +4534,60 @@ static int udma_setup_resources(struct udma_dev *ud)
|
||||
rm_res = tisci_rm->rm_ranges[RM_RANGE_TCHAN];
|
||||
if (IS_ERR(rm_res)) {
|
||||
bitmap_zero(ud->tchan_map, ud->tchan_cnt);
|
||||
irq_res.sets = 1;
|
||||
} else {
|
||||
bitmap_fill(ud->tchan_map, ud->tchan_cnt);
|
||||
for (i = 0; i < rm_res->sets; i++)
|
||||
udma_mark_resource_ranges(ud, ud->tchan_map,
|
||||
&rm_res->desc[i], "tchan");
|
||||
irq_res.sets = rm_res->sets;
|
||||
}
|
||||
irq_res.sets = rm_res->sets;
|
||||
|
||||
/* rchan and matching default flow ranges */
|
||||
rm_res = tisci_rm->rm_ranges[RM_RANGE_RCHAN];
|
||||
if (IS_ERR(rm_res)) {
|
||||
bitmap_zero(ud->rchan_map, ud->rchan_cnt);
|
||||
irq_res.sets++;
|
||||
} else {
|
||||
bitmap_fill(ud->rchan_map, ud->rchan_cnt);
|
||||
for (i = 0; i < rm_res->sets; i++)
|
||||
udma_mark_resource_ranges(ud, ud->rchan_map,
|
||||
&rm_res->desc[i], "rchan");
|
||||
irq_res.sets += rm_res->sets;
|
||||
}
|
||||
|
||||
irq_res.sets += rm_res->sets;
|
||||
irq_res.desc = kcalloc(irq_res.sets, sizeof(*irq_res.desc), GFP_KERNEL);
|
||||
if (!irq_res.desc)
|
||||
return -ENOMEM;
|
||||
rm_res = tisci_rm->rm_ranges[RM_RANGE_TCHAN];
|
||||
for (i = 0; i < rm_res->sets; i++) {
|
||||
irq_res.desc[i].start = rm_res->desc[i].start;
|
||||
irq_res.desc[i].num = rm_res->desc[i].num;
|
||||
irq_res.desc[i].start_sec = rm_res->desc[i].start_sec;
|
||||
irq_res.desc[i].num_sec = rm_res->desc[i].num_sec;
|
||||
if (IS_ERR(rm_res)) {
|
||||
irq_res.desc[0].start = 0;
|
||||
irq_res.desc[0].num = ud->tchan_cnt;
|
||||
i = 1;
|
||||
} else {
|
||||
for (i = 0; i < rm_res->sets; i++) {
|
||||
irq_res.desc[i].start = rm_res->desc[i].start;
|
||||
irq_res.desc[i].num = rm_res->desc[i].num;
|
||||
irq_res.desc[i].start_sec = rm_res->desc[i].start_sec;
|
||||
irq_res.desc[i].num_sec = rm_res->desc[i].num_sec;
|
||||
}
|
||||
}
|
||||
rm_res = tisci_rm->rm_ranges[RM_RANGE_RCHAN];
|
||||
for (j = 0; j < rm_res->sets; j++, i++) {
|
||||
if (rm_res->desc[j].num) {
|
||||
irq_res.desc[i].start = rm_res->desc[j].start +
|
||||
ud->soc_data->oes.udma_rchan;
|
||||
irq_res.desc[i].num = rm_res->desc[j].num;
|
||||
}
|
||||
if (rm_res->desc[j].num_sec) {
|
||||
irq_res.desc[i].start_sec = rm_res->desc[j].start_sec +
|
||||
ud->soc_data->oes.udma_rchan;
|
||||
irq_res.desc[i].num_sec = rm_res->desc[j].num_sec;
|
||||
if (IS_ERR(rm_res)) {
|
||||
irq_res.desc[i].start = 0;
|
||||
irq_res.desc[i].num = ud->rchan_cnt;
|
||||
} else {
|
||||
for (j = 0; j < rm_res->sets; j++, i++) {
|
||||
if (rm_res->desc[j].num) {
|
||||
irq_res.desc[i].start = rm_res->desc[j].start +
|
||||
ud->soc_data->oes.udma_rchan;
|
||||
irq_res.desc[i].num = rm_res->desc[j].num;
|
||||
}
|
||||
if (rm_res->desc[j].num_sec) {
|
||||
irq_res.desc[i].start_sec = rm_res->desc[j].start_sec +
|
||||
ud->soc_data->oes.udma_rchan;
|
||||
irq_res.desc[i].num_sec = rm_res->desc[j].num_sec;
|
||||
}
|
||||
}
|
||||
}
|
||||
ret = ti_sci_inta_msi_domain_alloc_irqs(ud->dev, &irq_res);
|
||||
@ -4690,14 +4705,15 @@ static int bcdma_setup_resources(struct udma_dev *ud)
|
||||
rm_res = tisci_rm->rm_ranges[RM_RANGE_BCHAN];
|
||||
if (IS_ERR(rm_res)) {
|
||||
bitmap_zero(ud->bchan_map, ud->bchan_cnt);
|
||||
irq_res.sets++;
|
||||
} else {
|
||||
bitmap_fill(ud->bchan_map, ud->bchan_cnt);
|
||||
for (i = 0; i < rm_res->sets; i++)
|
||||
udma_mark_resource_ranges(ud, ud->bchan_map,
|
||||
&rm_res->desc[i],
|
||||
"bchan");
|
||||
irq_res.sets += rm_res->sets;
|
||||
}
|
||||
irq_res.sets += rm_res->sets;
|
||||
}
|
||||
|
||||
/* tchan ranges */
|
||||
@ -4705,14 +4721,15 @@ static int bcdma_setup_resources(struct udma_dev *ud)
|
||||
rm_res = tisci_rm->rm_ranges[RM_RANGE_TCHAN];
|
||||
if (IS_ERR(rm_res)) {
|
||||
bitmap_zero(ud->tchan_map, ud->tchan_cnt);
|
||||
irq_res.sets += 2;
|
||||
} else {
|
||||
bitmap_fill(ud->tchan_map, ud->tchan_cnt);
|
||||
for (i = 0; i < rm_res->sets; i++)
|
||||
udma_mark_resource_ranges(ud, ud->tchan_map,
|
||||
&rm_res->desc[i],
|
||||
"tchan");
|
||||
irq_res.sets += rm_res->sets * 2;
|
||||
}
|
||||
irq_res.sets += rm_res->sets * 2;
|
||||
}
|
||||
|
||||
/* rchan ranges */
|
||||
@ -4720,47 +4737,72 @@ static int bcdma_setup_resources(struct udma_dev *ud)
|
||||
rm_res = tisci_rm->rm_ranges[RM_RANGE_RCHAN];
|
||||
if (IS_ERR(rm_res)) {
|
||||
bitmap_zero(ud->rchan_map, ud->rchan_cnt);
|
||||
irq_res.sets += 2;
|
||||
} else {
|
||||
bitmap_fill(ud->rchan_map, ud->rchan_cnt);
|
||||
for (i = 0; i < rm_res->sets; i++)
|
||||
udma_mark_resource_ranges(ud, ud->rchan_map,
|
||||
&rm_res->desc[i],
|
||||
"rchan");
|
||||
irq_res.sets += rm_res->sets * 2;
|
||||
}
|
||||
irq_res.sets += rm_res->sets * 2;
|
||||
}
|
||||
|
||||
irq_res.desc = kcalloc(irq_res.sets, sizeof(*irq_res.desc), GFP_KERNEL);
|
||||
if (!irq_res.desc)
|
||||
return -ENOMEM;
|
||||
if (ud->bchan_cnt) {
|
||||
rm_res = tisci_rm->rm_ranges[RM_RANGE_BCHAN];
|
||||
for (i = 0; i < rm_res->sets; i++) {
|
||||
irq_res.desc[i].start = rm_res->desc[i].start +
|
||||
oes->bcdma_bchan_ring;
|
||||
irq_res.desc[i].num = rm_res->desc[i].num;
|
||||
if (IS_ERR(rm_res)) {
|
||||
irq_res.desc[0].start = oes->bcdma_bchan_ring;
|
||||
irq_res.desc[0].num = ud->bchan_cnt;
|
||||
i = 1;
|
||||
} else {
|
||||
for (i = 0; i < rm_res->sets; i++) {
|
||||
irq_res.desc[i].start = rm_res->desc[i].start +
|
||||
oes->bcdma_bchan_ring;
|
||||
irq_res.desc[i].num = rm_res->desc[i].num;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ud->tchan_cnt) {
|
||||
rm_res = tisci_rm->rm_ranges[RM_RANGE_TCHAN];
|
||||
for (j = 0; j < rm_res->sets; j++, i += 2) {
|
||||
irq_res.desc[i].start = rm_res->desc[j].start +
|
||||
oes->bcdma_tchan_data;
|
||||
irq_res.desc[i].num = rm_res->desc[j].num;
|
||||
if (IS_ERR(rm_res)) {
|
||||
irq_res.desc[i].start = oes->bcdma_tchan_data;
|
||||
irq_res.desc[i].num = ud->tchan_cnt;
|
||||
irq_res.desc[i + 1].start = oes->bcdma_tchan_ring;
|
||||
irq_res.desc[i + 1].num = ud->tchan_cnt;
|
||||
i += 2;
|
||||
} else {
|
||||
for (j = 0; j < rm_res->sets; j++, i += 2) {
|
||||
irq_res.desc[i].start = rm_res->desc[j].start +
|
||||
oes->bcdma_tchan_data;
|
||||
irq_res.desc[i].num = rm_res->desc[j].num;
|
||||
|
||||
irq_res.desc[i + 1].start = rm_res->desc[j].start +
|
||||
oes->bcdma_tchan_ring;
|
||||
irq_res.desc[i + 1].num = rm_res->desc[j].num;
|
||||
irq_res.desc[i + 1].start = rm_res->desc[j].start +
|
||||
oes->bcdma_tchan_ring;
|
||||
irq_res.desc[i + 1].num = rm_res->desc[j].num;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ud->rchan_cnt) {
|
||||
rm_res = tisci_rm->rm_ranges[RM_RANGE_RCHAN];
|
||||
for (j = 0; j < rm_res->sets; j++, i += 2) {
|
||||
irq_res.desc[i].start = rm_res->desc[j].start +
|
||||
oes->bcdma_rchan_data;
|
||||
irq_res.desc[i].num = rm_res->desc[j].num;
|
||||
if (IS_ERR(rm_res)) {
|
||||
irq_res.desc[i].start = oes->bcdma_rchan_data;
|
||||
irq_res.desc[i].num = ud->rchan_cnt;
|
||||
irq_res.desc[i + 1].start = oes->bcdma_rchan_ring;
|
||||
irq_res.desc[i + 1].num = ud->rchan_cnt;
|
||||
i += 2;
|
||||
} else {
|
||||
for (j = 0; j < rm_res->sets; j++, i += 2) {
|
||||
irq_res.desc[i].start = rm_res->desc[j].start +
|
||||
oes->bcdma_rchan_data;
|
||||
irq_res.desc[i].num = rm_res->desc[j].num;
|
||||
|
||||
irq_res.desc[i + 1].start = rm_res->desc[j].start +
|
||||
oes->bcdma_rchan_ring;
|
||||
irq_res.desc[i + 1].num = rm_res->desc[j].num;
|
||||
irq_res.desc[i + 1].start = rm_res->desc[j].start +
|
||||
oes->bcdma_rchan_ring;
|
||||
irq_res.desc[i + 1].num = rm_res->desc[j].num;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -4858,39 +4900,54 @@ static int pktdma_setup_resources(struct udma_dev *ud)
|
||||
if (IS_ERR(rm_res)) {
|
||||
/* all rflows are assigned exclusively to Linux */
|
||||
bitmap_zero(ud->rflow_in_use, ud->rflow_cnt);
|
||||
irq_res.sets = 1;
|
||||
} else {
|
||||
bitmap_fill(ud->rflow_in_use, ud->rflow_cnt);
|
||||
for (i = 0; i < rm_res->sets; i++)
|
||||
udma_mark_resource_ranges(ud, ud->rflow_in_use,
|
||||
&rm_res->desc[i], "rflow");
|
||||
irq_res.sets = rm_res->sets;
|
||||
}
|
||||
irq_res.sets = rm_res->sets;
|
||||
|
||||
/* tflow ranges */
|
||||
rm_res = tisci_rm->rm_ranges[RM_RANGE_TFLOW];
|
||||
if (IS_ERR(rm_res)) {
|
||||
/* all tflows are assigned exclusively to Linux */
|
||||
bitmap_zero(ud->tflow_map, ud->tflow_cnt);
|
||||
irq_res.sets++;
|
||||
} else {
|
||||
bitmap_fill(ud->tflow_map, ud->tflow_cnt);
|
||||
for (i = 0; i < rm_res->sets; i++)
|
||||
udma_mark_resource_ranges(ud, ud->tflow_map,
|
||||
&rm_res->desc[i], "tflow");
|
||||
irq_res.sets += rm_res->sets;
|
||||
}
|
||||
irq_res.sets += rm_res->sets;
|
||||
|
||||
irq_res.desc = kcalloc(irq_res.sets, sizeof(*irq_res.desc), GFP_KERNEL);
|
||||
if (!irq_res.desc)
|
||||
return -ENOMEM;
|
||||
rm_res = tisci_rm->rm_ranges[RM_RANGE_TFLOW];
|
||||
for (i = 0; i < rm_res->sets; i++) {
|
||||
irq_res.desc[i].start = rm_res->desc[i].start +
|
||||
oes->pktdma_tchan_flow;
|
||||
irq_res.desc[i].num = rm_res->desc[i].num;
|
||||
if (IS_ERR(rm_res)) {
|
||||
irq_res.desc[0].start = oes->pktdma_tchan_flow;
|
||||
irq_res.desc[0].num = ud->tflow_cnt;
|
||||
i = 1;
|
||||
} else {
|
||||
for (i = 0; i < rm_res->sets; i++) {
|
||||
irq_res.desc[i].start = rm_res->desc[i].start +
|
||||
oes->pktdma_tchan_flow;
|
||||
irq_res.desc[i].num = rm_res->desc[i].num;
|
||||
}
|
||||
}
|
||||
rm_res = tisci_rm->rm_ranges[RM_RANGE_RFLOW];
|
||||
for (j = 0; j < rm_res->sets; j++, i++) {
|
||||
irq_res.desc[i].start = rm_res->desc[j].start +
|
||||
oes->pktdma_rchan_flow;
|
||||
irq_res.desc[i].num = rm_res->desc[j].num;
|
||||
if (IS_ERR(rm_res)) {
|
||||
irq_res.desc[i].start = oes->pktdma_rchan_flow;
|
||||
irq_res.desc[i].num = ud->rflow_cnt;
|
||||
} else {
|
||||
for (j = 0; j < rm_res->sets; j++, i++) {
|
||||
irq_res.desc[i].start = rm_res->desc[j].start +
|
||||
oes->pktdma_rchan_flow;
|
||||
irq_res.desc[i].num = rm_res->desc[j].num;
|
||||
}
|
||||
}
|
||||
ret = ti_sci_inta_msi_domain_alloc_irqs(ud->dev, &irq_res);
|
||||
kfree(irq_res.desc);
|
||||
|
@ -16,7 +16,6 @@ struct scpi_pm_domain {
|
||||
struct generic_pm_domain genpd;
|
||||
struct scpi_ops *ops;
|
||||
u32 domain;
|
||||
char name[30];
|
||||
};
|
||||
|
||||
/*
|
||||
@ -110,8 +109,13 @@ static int scpi_pm_domain_probe(struct platform_device *pdev)
|
||||
|
||||
scpi_pd->domain = i;
|
||||
scpi_pd->ops = scpi_ops;
|
||||
sprintf(scpi_pd->name, "%pOFn.%d", np, i);
|
||||
scpi_pd->genpd.name = scpi_pd->name;
|
||||
scpi_pd->genpd.name = devm_kasprintf(dev, GFP_KERNEL,
|
||||
"%pOFn.%d", np, i);
|
||||
if (!scpi_pd->genpd.name) {
|
||||
dev_err(dev, "Failed to allocate genpd name:%pOFn.%d\n",
|
||||
np, i);
|
||||
continue;
|
||||
}
|
||||
scpi_pd->genpd.power_off = scpi_pd_power_off;
|
||||
scpi_pd->genpd.power_on = scpi_pd_power_on;
|
||||
|
||||
|
@ -77,13 +77,14 @@ static const char *get_filename(struct tegra_bpmp *bpmp,
|
||||
const char *root_path, *filename = NULL;
|
||||
char *root_path_buf;
|
||||
size_t root_len;
|
||||
size_t root_path_buf_len = 512;
|
||||
|
||||
root_path_buf = kzalloc(512, GFP_KERNEL);
|
||||
root_path_buf = kzalloc(root_path_buf_len, GFP_KERNEL);
|
||||
if (!root_path_buf)
|
||||
goto out;
|
||||
|
||||
root_path = dentry_path(bpmp->debugfs_mirror, root_path_buf,
|
||||
sizeof(root_path_buf));
|
||||
root_path_buf_len);
|
||||
if (IS_ERR(root_path))
|
||||
goto out;
|
||||
|
||||
|
@ -3070,8 +3070,8 @@ static void gfx_v9_0_init_pg(struct amdgpu_device *adev)
|
||||
AMD_PG_SUPPORT_CP |
|
||||
AMD_PG_SUPPORT_GDS |
|
||||
AMD_PG_SUPPORT_RLC_SMU_HS)) {
|
||||
WREG32(mmRLC_JUMP_TABLE_RESTORE,
|
||||
adev->gfx.rlc.cp_table_gpu_addr >> 8);
|
||||
WREG32_SOC15(GC, 0, mmRLC_JUMP_TABLE_RESTORE,
|
||||
adev->gfx.rlc.cp_table_gpu_addr >> 8);
|
||||
gfx_v9_0_init_gfx_power_gating(adev);
|
||||
}
|
||||
}
|
||||
|
@ -162,7 +162,6 @@ static void gfxhub_v1_0_init_tlb_regs(struct amdgpu_device *adev)
|
||||
ENABLE_ADVANCED_DRIVER_MODEL, 1);
|
||||
tmp = REG_SET_FIELD(tmp, MC_VM_MX_L1_TLB_CNTL,
|
||||
SYSTEM_APERTURE_UNMAPPED_ACCESS, 0);
|
||||
tmp = REG_SET_FIELD(tmp, MC_VM_MX_L1_TLB_CNTL, ECO_BITS, 0);
|
||||
tmp = REG_SET_FIELD(tmp, MC_VM_MX_L1_TLB_CNTL,
|
||||
MTYPE, MTYPE_UC);/* XXX for emulation. */
|
||||
tmp = REG_SET_FIELD(tmp, MC_VM_MX_L1_TLB_CNTL, ATC_EN, 1);
|
||||
|
@ -196,7 +196,6 @@ static void gfxhub_v2_0_init_tlb_regs(struct amdgpu_device *adev)
|
||||
ENABLE_ADVANCED_DRIVER_MODEL, 1);
|
||||
tmp = REG_SET_FIELD(tmp, GCMC_VM_MX_L1_TLB_CNTL,
|
||||
SYSTEM_APERTURE_UNMAPPED_ACCESS, 0);
|
||||
tmp = REG_SET_FIELD(tmp, GCMC_VM_MX_L1_TLB_CNTL, ECO_BITS, 0);
|
||||
tmp = REG_SET_FIELD(tmp, GCMC_VM_MX_L1_TLB_CNTL,
|
||||
MTYPE, MTYPE_UC); /* UC, uncached */
|
||||
|
||||
|
@ -197,7 +197,6 @@ static void gfxhub_v2_1_init_tlb_regs(struct amdgpu_device *adev)
|
||||
ENABLE_ADVANCED_DRIVER_MODEL, 1);
|
||||
tmp = REG_SET_FIELD(tmp, GCMC_VM_MX_L1_TLB_CNTL,
|
||||
SYSTEM_APERTURE_UNMAPPED_ACCESS, 0);
|
||||
tmp = REG_SET_FIELD(tmp, GCMC_VM_MX_L1_TLB_CNTL, ECO_BITS, 0);
|
||||
tmp = REG_SET_FIELD(tmp, GCMC_VM_MX_L1_TLB_CNTL,
|
||||
MTYPE, MTYPE_UC); /* UC, uncached */
|
||||
|
||||
|
@ -1808,6 +1808,14 @@ static int gmc_v9_0_hw_fini(void *handle)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Pair the operations did in gmc_v9_0_hw_init and thus maintain
|
||||
* a correct cached state for GMC. Otherwise, the "gate" again
|
||||
* operation on S3 resuming will fail due to wrong cached state.
|
||||
*/
|
||||
if (adev->mmhub.funcs->update_power_gating)
|
||||
adev->mmhub.funcs->update_power_gating(adev, false);
|
||||
|
||||
amdgpu_irq_put(adev, &adev->gmc.ecc_irq, 0);
|
||||
amdgpu_irq_put(adev, &adev->gmc.vm_fault, 0);
|
||||
|
||||
|
@ -145,7 +145,6 @@ static void mmhub_v1_0_init_tlb_regs(struct amdgpu_device *adev)
|
||||
ENABLE_ADVANCED_DRIVER_MODEL, 1);
|
||||
tmp = REG_SET_FIELD(tmp, MC_VM_MX_L1_TLB_CNTL,
|
||||
SYSTEM_APERTURE_UNMAPPED_ACCESS, 0);
|
||||
tmp = REG_SET_FIELD(tmp, MC_VM_MX_L1_TLB_CNTL, ECO_BITS, 0);
|
||||
tmp = REG_SET_FIELD(tmp, MC_VM_MX_L1_TLB_CNTL,
|
||||
MTYPE, MTYPE_UC);/* XXX for emulation. */
|
||||
tmp = REG_SET_FIELD(tmp, MC_VM_MX_L1_TLB_CNTL, ATC_EN, 1);
|
||||
@ -302,10 +301,10 @@ static void mmhub_v1_0_update_power_gating(struct amdgpu_device *adev,
|
||||
if (amdgpu_sriov_vf(adev))
|
||||
return;
|
||||
|
||||
if (enable && adev->pg_flags & AMD_PG_SUPPORT_MMHUB) {
|
||||
amdgpu_dpm_set_powergating_by_smu(adev, AMD_IP_BLOCK_TYPE_GMC, true);
|
||||
|
||||
}
|
||||
if (adev->pg_flags & AMD_PG_SUPPORT_MMHUB)
|
||||
amdgpu_dpm_set_powergating_by_smu(adev,
|
||||
AMD_IP_BLOCK_TYPE_GMC,
|
||||
enable);
|
||||
}
|
||||
|
||||
static int mmhub_v1_0_gart_enable(struct amdgpu_device *adev)
|
||||
|
@ -165,7 +165,6 @@ static void mmhub_v1_7_init_tlb_regs(struct amdgpu_device *adev)
|
||||
ENABLE_ADVANCED_DRIVER_MODEL, 1);
|
||||
tmp = REG_SET_FIELD(tmp, MC_VM_MX_L1_TLB_CNTL,
|
||||
SYSTEM_APERTURE_UNMAPPED_ACCESS, 0);
|
||||
tmp = REG_SET_FIELD(tmp, MC_VM_MX_L1_TLB_CNTL, ECO_BITS, 0);
|
||||
tmp = REG_SET_FIELD(tmp, MC_VM_MX_L1_TLB_CNTL,
|
||||
MTYPE, MTYPE_UC);/* XXX for emulation. */
|
||||
tmp = REG_SET_FIELD(tmp, MC_VM_MX_L1_TLB_CNTL, ATC_EN, 1);
|
||||
|
@ -267,7 +267,6 @@ static void mmhub_v2_0_init_tlb_regs(struct amdgpu_device *adev)
|
||||
ENABLE_ADVANCED_DRIVER_MODEL, 1);
|
||||
tmp = REG_SET_FIELD(tmp, MMMC_VM_MX_L1_TLB_CNTL,
|
||||
SYSTEM_APERTURE_UNMAPPED_ACCESS, 0);
|
||||
tmp = REG_SET_FIELD(tmp, MMMC_VM_MX_L1_TLB_CNTL, ECO_BITS, 0);
|
||||
tmp = REG_SET_FIELD(tmp, MMMC_VM_MX_L1_TLB_CNTL,
|
||||
MTYPE, MTYPE_UC); /* UC, uncached */
|
||||
|
||||
|
@ -194,7 +194,6 @@ static void mmhub_v2_3_init_tlb_regs(struct amdgpu_device *adev)
|
||||
ENABLE_ADVANCED_DRIVER_MODEL, 1);
|
||||
tmp = REG_SET_FIELD(tmp, MMMC_VM_MX_L1_TLB_CNTL,
|
||||
SYSTEM_APERTURE_UNMAPPED_ACCESS, 0);
|
||||
tmp = REG_SET_FIELD(tmp, MMMC_VM_MX_L1_TLB_CNTL, ECO_BITS, 0);
|
||||
tmp = REG_SET_FIELD(tmp, MMMC_VM_MX_L1_TLB_CNTL,
|
||||
MTYPE, MTYPE_UC); /* UC, uncached */
|
||||
|
||||
|
@ -189,8 +189,6 @@ static void mmhub_v9_4_init_tlb_regs(struct amdgpu_device *adev, int hubid)
|
||||
ENABLE_ADVANCED_DRIVER_MODEL, 1);
|
||||
tmp = REG_SET_FIELD(tmp, VMSHAREDVC0_MC_VM_MX_L1_TLB_CNTL,
|
||||
SYSTEM_APERTURE_UNMAPPED_ACCESS, 0);
|
||||
tmp = REG_SET_FIELD(tmp, VMSHAREDVC0_MC_VM_MX_L1_TLB_CNTL,
|
||||
ECO_BITS, 0);
|
||||
tmp = REG_SET_FIELD(tmp, VMSHAREDVC0_MC_VM_MX_L1_TLB_CNTL,
|
||||
MTYPE, MTYPE_UC);/* XXX for emulation. */
|
||||
tmp = REG_SET_FIELD(tmp, VMSHAREDVC0_MC_VM_MX_L1_TLB_CNTL,
|
||||
|
@ -1051,6 +1051,11 @@ static int dm_dmub_hw_init(struct amdgpu_device *adev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Reset DMCUB if it was previously running - before we overwrite its memory. */
|
||||
status = dmub_srv_hw_reset(dmub_srv);
|
||||
if (status != DMUB_STATUS_OK)
|
||||
DRM_WARN("Error resetting DMUB HW: %d\n", status);
|
||||
|
||||
hdr = (const struct dmcub_firmware_header_v1_0 *)dmub_fw->data;
|
||||
|
||||
fw_inst_const = dmub_fw->data +
|
||||
|
@ -101,6 +101,7 @@ static const struct hw_sequencer_funcs dcn31_funcs = {
|
||||
.z10_restore = dcn31_z10_restore,
|
||||
.z10_save_init = dcn31_z10_save_init,
|
||||
.set_disp_pattern_generator = dcn30_set_disp_pattern_generator,
|
||||
.exit_optimized_pwr_state = dcn21_exit_optimized_pwr_state,
|
||||
.update_visual_confirm_color = dcn20_update_visual_confirm_color,
|
||||
};
|
||||
|
||||
|
@ -1328,7 +1328,12 @@ static int pp_set_powergating_by_smu(void *handle,
|
||||
pp_dpm_powergate_vce(handle, gate);
|
||||
break;
|
||||
case AMD_IP_BLOCK_TYPE_GMC:
|
||||
pp_dpm_powergate_mmhub(handle);
|
||||
/*
|
||||
* For now, this is only used on PICASSO.
|
||||
* And only "gate" operation is supported.
|
||||
*/
|
||||
if (gate)
|
||||
pp_dpm_powergate_mmhub(handle);
|
||||
break;
|
||||
case AMD_IP_BLOCK_TYPE_GFX:
|
||||
ret = pp_dpm_powergate_gfx(handle, gate);
|
||||
|
@ -191,6 +191,9 @@ int smu_v12_0_fini_smc_tables(struct smu_context *smu)
|
||||
kfree(smu_table->watermarks_table);
|
||||
smu_table->watermarks_table = NULL;
|
||||
|
||||
kfree(smu_table->gpu_metrics_table);
|
||||
smu_table->gpu_metrics_table = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -198,6 +198,7 @@ int smu_v13_0_check_fw_status(struct smu_context *smu)
|
||||
|
||||
int smu_v13_0_check_fw_version(struct smu_context *smu)
|
||||
{
|
||||
struct amdgpu_device *adev = smu->adev;
|
||||
uint32_t if_version = 0xff, smu_version = 0xff;
|
||||
uint16_t smu_major;
|
||||
uint8_t smu_minor, smu_debug;
|
||||
@ -210,6 +211,8 @@ int smu_v13_0_check_fw_version(struct smu_context *smu)
|
||||
smu_major = (smu_version >> 16) & 0xffff;
|
||||
smu_minor = (smu_version >> 8) & 0xff;
|
||||
smu_debug = (smu_version >> 0) & 0xff;
|
||||
if (smu->is_apu)
|
||||
adev->pm.fw_version = smu_version;
|
||||
|
||||
switch (smu->adev->ip_versions[MP1_HWIP][0]) {
|
||||
case IP_VERSION(13, 0, 2):
|
||||
|
@ -1121,7 +1121,10 @@ static void ast_crtc_reset(struct drm_crtc *crtc)
|
||||
if (crtc->state)
|
||||
crtc->funcs->atomic_destroy_state(crtc, crtc->state);
|
||||
|
||||
__drm_atomic_helper_crtc_reset(crtc, &ast_state->base);
|
||||
if (ast_state)
|
||||
__drm_atomic_helper_crtc_reset(crtc, &ast_state->base);
|
||||
else
|
||||
__drm_atomic_helper_crtc_reset(crtc, NULL);
|
||||
}
|
||||
|
||||
static struct drm_crtc_state *
|
||||
|
@ -1743,7 +1743,13 @@ void drm_fb_helper_fill_info(struct fb_info *info,
|
||||
sizes->fb_width, sizes->fb_height);
|
||||
|
||||
info->par = fb_helper;
|
||||
snprintf(info->fix.id, sizeof(info->fix.id), "%s",
|
||||
/*
|
||||
* The DRM drivers fbdev emulation device name can be confusing if the
|
||||
* driver name also has a "drm" suffix on it. Leading to names such as
|
||||
* "simpledrmdrmfb" in /proc/fb. Unfortunately, it's an uAPI and can't
|
||||
* be changed due user-space tools (e.g: pm-utils) matching against it.
|
||||
*/
|
||||
snprintf(info->fix.id, sizeof(info->fix.id), "%sdrmfb",
|
||||
fb_helper->dev->driver->name);
|
||||
|
||||
}
|
||||
|
@ -596,7 +596,7 @@ static void parse_dmc_fw(struct drm_i915_private *dev_priv,
|
||||
continue;
|
||||
|
||||
offset = readcount + dmc->dmc_info[id].dmc_offset * 4;
|
||||
if (fw->size - offset < 0) {
|
||||
if (offset > fw->size) {
|
||||
drm_err(&dev_priv->drm, "Reading beyond the fw_size\n");
|
||||
continue;
|
||||
}
|
||||
|
@ -458,7 +458,7 @@ static struct drm_display_mode simpledrm_mode(unsigned int width,
|
||||
{
|
||||
struct drm_display_mode mode = { SIMPLEDRM_MODE(width, height) };
|
||||
|
||||
mode.clock = 60 /* Hz */ * mode.hdisplay * mode.vdisplay;
|
||||
mode.clock = mode.hdisplay * mode.vdisplay * 60 / 1000 /* kHz */;
|
||||
drm_mode_set_name(&mode);
|
||||
|
||||
return mode;
|
||||
|
@ -19,6 +19,7 @@ config HYPERV_TIMER
|
||||
config HYPERV_UTILS
|
||||
tristate "Microsoft Hyper-V Utilities driver"
|
||||
depends on HYPERV && CONNECTOR && NLS
|
||||
depends on PTP_1588_CLOCK_OPTIONAL
|
||||
help
|
||||
Select this option to enable the Hyper-V Utilities.
|
||||
|
||||
|
@ -1139,6 +1139,7 @@ static void cancel_writeback_rate_update_dwork(struct cached_dev *dc)
|
||||
static void cached_dev_detach_finish(struct work_struct *w)
|
||||
{
|
||||
struct cached_dev *dc = container_of(w, struct cached_dev, detach);
|
||||
struct cache_set *c = dc->disk.c;
|
||||
|
||||
BUG_ON(!test_bit(BCACHE_DEV_DETACHING, &dc->disk.flags));
|
||||
BUG_ON(refcount_read(&dc->count));
|
||||
@ -1156,7 +1157,7 @@ static void cached_dev_detach_finish(struct work_struct *w)
|
||||
|
||||
bcache_device_detach(&dc->disk);
|
||||
list_move(&dc->list, &uncached_devices);
|
||||
calc_cached_dev_sectors(dc->disk.c);
|
||||
calc_cached_dev_sectors(c);
|
||||
|
||||
clear_bit(BCACHE_DEV_DETACHING, &dc->disk.flags);
|
||||
clear_bit(BCACHE_DEV_UNLINK_DONE, &dc->disk.flags);
|
||||
|
@ -1963,7 +1963,7 @@ static bool __journal_read_write(struct dm_integrity_io *dio, struct bio *bio,
|
||||
n_sectors -= bv.bv_len >> SECTOR_SHIFT;
|
||||
bio_advance_iter(bio, &bio->bi_iter, bv.bv_len);
|
||||
retry_kmap:
|
||||
mem = bvec_kmap_local(&bv);
|
||||
mem = kmap_local_page(bv.bv_page);
|
||||
if (likely(dio->op == REQ_OP_WRITE))
|
||||
flush_dcache_page(bv.bv_page);
|
||||
|
||||
|
@ -423,9 +423,9 @@ static int rebalance_children(struct shadow_spine *s,
|
||||
|
||||
memcpy(n, dm_block_data(child),
|
||||
dm_bm_block_size(dm_tm_get_bm(info->tm)));
|
||||
dm_tm_unlock(info->tm, child);
|
||||
|
||||
dm_tm_dec(info->tm, dm_block_location(child));
|
||||
dm_tm_unlock(info->tm, child);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -768,6 +768,10 @@ static void mv88e6xxx_mac_link_down(struct dsa_switch *ds, int port,
|
||||
if ((!mv88e6xxx_port_ppu_updates(chip, port) ||
|
||||
mode == MLO_AN_FIXED) && ops->port_sync_link)
|
||||
err = ops->port_sync_link(chip, port, mode, false);
|
||||
|
||||
if (!err && ops->port_set_speed_duplex)
|
||||
err = ops->port_set_speed_duplex(chip, port, SPEED_UNFORCED,
|
||||
DUPLEX_UNFORCED);
|
||||
mv88e6xxx_reg_unlock(chip);
|
||||
|
||||
if (err)
|
||||
|
@ -283,7 +283,7 @@ static int mv88e6xxx_port_set_speed_duplex(struct mv88e6xxx_chip *chip,
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
if (speed)
|
||||
if (speed != SPEED_UNFORCED)
|
||||
dev_dbg(chip->dev, "p%d: Speed set to %d Mbps\n", port, speed);
|
||||
else
|
||||
dev_dbg(chip->dev, "p%d: Speed unforced\n", port);
|
||||
@ -516,7 +516,7 @@ int mv88e6393x_port_set_speed_duplex(struct mv88e6xxx_chip *chip, int port,
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
if (speed)
|
||||
if (speed != SPEED_UNFORCED)
|
||||
dev_dbg(chip->dev, "p%d: Speed set to %d Mbps\n", port, speed);
|
||||
else
|
||||
dev_dbg(chip->dev, "p%d: Speed unforced\n", port);
|
||||
|
@ -1309,11 +1309,11 @@ static netdev_tx_t bcm_sysport_xmit(struct sk_buff *skb,
|
||||
struct bcm_sysport_priv *priv = netdev_priv(dev);
|
||||
struct device *kdev = &priv->pdev->dev;
|
||||
struct bcm_sysport_tx_ring *ring;
|
||||
unsigned long flags, desc_flags;
|
||||
struct bcm_sysport_cb *cb;
|
||||
struct netdev_queue *txq;
|
||||
u32 len_status, addr_lo;
|
||||
unsigned int skb_len;
|
||||
unsigned long flags;
|
||||
dma_addr_t mapping;
|
||||
u16 queue;
|
||||
int ret;
|
||||
@ -1373,8 +1373,10 @@ static netdev_tx_t bcm_sysport_xmit(struct sk_buff *skb,
|
||||
ring->desc_count--;
|
||||
|
||||
/* Ports are latched, so write upper address first */
|
||||
spin_lock_irqsave(&priv->desc_lock, desc_flags);
|
||||
tdma_writel(priv, len_status, TDMA_WRITE_PORT_HI(ring->index));
|
||||
tdma_writel(priv, addr_lo, TDMA_WRITE_PORT_LO(ring->index));
|
||||
spin_unlock_irqrestore(&priv->desc_lock, desc_flags);
|
||||
|
||||
/* Check ring space and update SW control flow */
|
||||
if (ring->desc_count == 0)
|
||||
@ -2013,6 +2015,7 @@ static int bcm_sysport_open(struct net_device *dev)
|
||||
}
|
||||
|
||||
/* Initialize both hardware and software ring */
|
||||
spin_lock_init(&priv->desc_lock);
|
||||
for (i = 0; i < dev->num_tx_queues; i++) {
|
||||
ret = bcm_sysport_init_tx_ring(priv, i);
|
||||
if (ret) {
|
||||
|
@ -711,6 +711,7 @@ struct bcm_sysport_priv {
|
||||
int wol_irq;
|
||||
|
||||
/* Transmit rings */
|
||||
spinlock_t desc_lock;
|
||||
struct bcm_sysport_tx_ring *tx_rings;
|
||||
|
||||
/* Receive queue */
|
||||
|
@ -589,9 +589,9 @@ static int bcmgenet_mii_pd_init(struct bcmgenet_priv *priv)
|
||||
* Internal or external PHY with MDIO access
|
||||
*/
|
||||
phydev = phy_attach(priv->dev, phy_name, pd->phy_interface);
|
||||
if (!phydev) {
|
||||
if (IS_ERR(phydev)) {
|
||||
dev_err(kdev, "failed to register PHY device\n");
|
||||
return -ENODEV;
|
||||
return PTR_ERR(phydev);
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
|
@ -388,6 +388,8 @@ struct dpaa2_eth_ch_stats {
|
||||
__u64 bytes_per_cdan;
|
||||
};
|
||||
|
||||
#define DPAA2_ETH_CH_STATS 7
|
||||
|
||||
/* Maximum number of queues associated with a DPNI */
|
||||
#define DPAA2_ETH_MAX_TCS 8
|
||||
#define DPAA2_ETH_MAX_RX_QUEUES_PER_TC 16
|
||||
|
@ -278,7 +278,7 @@ static void dpaa2_eth_get_ethtool_stats(struct net_device *net_dev,
|
||||
/* Per-channel stats */
|
||||
for (k = 0; k < priv->num_channels; k++) {
|
||||
ch_stats = &priv->channel[k]->stats;
|
||||
for (j = 0; j < sizeof(*ch_stats) / sizeof(__u64) - 1; j++)
|
||||
for (j = 0; j < DPAA2_ETH_CH_STATS; j++)
|
||||
*((__u64 *)data + i + j) += *((__u64 *)ch_stats + j);
|
||||
}
|
||||
i += j;
|
||||
|
@ -839,6 +839,8 @@ struct hnae3_handle {
|
||||
|
||||
u8 netdev_flags;
|
||||
struct dentry *hnae3_dbgfs;
|
||||
/* protects concurrent contention between debugfs commands */
|
||||
struct mutex dbgfs_lock;
|
||||
|
||||
/* Network interface message level enabled bits */
|
||||
u32 msg_enable;
|
||||
|
@ -1226,6 +1226,7 @@ static ssize_t hns3_dbg_read(struct file *filp, char __user *buffer,
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
mutex_lock(&handle->dbgfs_lock);
|
||||
save_buf = &hns3_dbg_cmd[index].buf;
|
||||
|
||||
if (!test_bit(HNS3_NIC_STATE_INITED, &priv->state) ||
|
||||
@ -1238,15 +1239,15 @@ static ssize_t hns3_dbg_read(struct file *filp, char __user *buffer,
|
||||
read_buf = *save_buf;
|
||||
} else {
|
||||
read_buf = kvzalloc(hns3_dbg_cmd[index].buf_len, GFP_KERNEL);
|
||||
if (!read_buf)
|
||||
return -ENOMEM;
|
||||
if (!read_buf) {
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* save the buffer addr until the last read operation */
|
||||
*save_buf = read_buf;
|
||||
}
|
||||
|
||||
/* get data ready for the first time to read */
|
||||
if (!*ppos) {
|
||||
/* get data ready for the first time to read */
|
||||
ret = hns3_dbg_read_cmd(dbg_data, hns3_dbg_cmd[index].cmd,
|
||||
read_buf, hns3_dbg_cmd[index].buf_len);
|
||||
if (ret)
|
||||
@ -1255,8 +1256,10 @@ static ssize_t hns3_dbg_read(struct file *filp, char __user *buffer,
|
||||
|
||||
size = simple_read_from_buffer(buffer, count, ppos, read_buf,
|
||||
strlen(read_buf));
|
||||
if (size > 0)
|
||||
if (size > 0) {
|
||||
mutex_unlock(&handle->dbgfs_lock);
|
||||
return size;
|
||||
}
|
||||
|
||||
out:
|
||||
/* free the buffer for the last read operation */
|
||||
@ -1265,6 +1268,7 @@ out:
|
||||
*save_buf = NULL;
|
||||
}
|
||||
|
||||
mutex_unlock(&handle->dbgfs_lock);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1337,6 +1341,8 @@ int hns3_dbg_init(struct hnae3_handle *handle)
|
||||
debugfs_create_dir(hns3_dbg_dentry[i].name,
|
||||
handle->hnae3_dbgfs);
|
||||
|
||||
mutex_init(&handle->dbgfs_lock);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(hns3_dbg_cmd); i++) {
|
||||
if ((hns3_dbg_cmd[i].cmd == HNAE3_DBG_CMD_TM_NODES &&
|
||||
ae_dev->dev_version <= HNAE3_DEVICE_VERSION_V2) ||
|
||||
@ -1363,6 +1369,7 @@ int hns3_dbg_init(struct hnae3_handle *handle)
|
||||
return 0;
|
||||
|
||||
out:
|
||||
mutex_destroy(&handle->dbgfs_lock);
|
||||
debugfs_remove_recursive(handle->hnae3_dbgfs);
|
||||
handle->hnae3_dbgfs = NULL;
|
||||
return ret;
|
||||
@ -1378,6 +1385,7 @@ void hns3_dbg_uninit(struct hnae3_handle *handle)
|
||||
hns3_dbg_cmd[i].buf = NULL;
|
||||
}
|
||||
|
||||
mutex_destroy(&handle->dbgfs_lock);
|
||||
debugfs_remove_recursive(handle->hnae3_dbgfs);
|
||||
handle->hnae3_dbgfs = NULL;
|
||||
}
|
||||
|
@ -114,7 +114,8 @@ int hclgevf_send_mbx_msg(struct hclgevf_dev *hdev,
|
||||
|
||||
memcpy(&req->msg, send_msg, sizeof(struct hclge_vf_to_pf_msg));
|
||||
|
||||
trace_hclge_vf_mbx_send(hdev, req);
|
||||
if (test_bit(HCLGEVF_STATE_NIC_REGISTERED, &hdev->state))
|
||||
trace_hclge_vf_mbx_send(hdev, req);
|
||||
|
||||
/* synchronous send */
|
||||
if (need_resp) {
|
||||
|
@ -2046,6 +2046,7 @@ static void iavf_watchdog_task(struct work_struct *work)
|
||||
}
|
||||
adapter->aq_required = 0;
|
||||
adapter->current_op = VIRTCHNL_OP_UNKNOWN;
|
||||
mutex_unlock(&adapter->crit_lock);
|
||||
queue_delayed_work(iavf_wq,
|
||||
&adapter->watchdog_task,
|
||||
msecs_to_jiffies(10));
|
||||
@ -2076,16 +2077,14 @@ static void iavf_watchdog_task(struct work_struct *work)
|
||||
iavf_detect_recover_hung(&adapter->vsi);
|
||||
break;
|
||||
case __IAVF_REMOVE:
|
||||
mutex_unlock(&adapter->crit_lock);
|
||||
return;
|
||||
default:
|
||||
mutex_unlock(&adapter->crit_lock);
|
||||
return;
|
||||
}
|
||||
|
||||
/* check for hw reset */
|
||||
reg_val = rd32(hw, IAVF_VF_ARQLEN1) & IAVF_VF_ARQLEN1_ARQENABLE_MASK;
|
||||
if (!reg_val) {
|
||||
iavf_change_state(adapter, __IAVF_RESETTING);
|
||||
adapter->flags |= IAVF_FLAG_RESET_PENDING;
|
||||
adapter->aq_required = 0;
|
||||
adapter->current_op = VIRTCHNL_OP_UNKNOWN;
|
||||
|
@ -705,7 +705,7 @@ static int ice_ptp_adjfine(struct ptp_clock_info *info, long scaled_ppm)
|
||||
scaled_ppm = -scaled_ppm;
|
||||
}
|
||||
|
||||
while ((u64)scaled_ppm > div_u64(U64_MAX, incval)) {
|
||||
while ((u64)scaled_ppm > div64_u64(U64_MAX, incval)) {
|
||||
/* handle overflow by scaling down the scaled_ppm and
|
||||
* the divisor, losing some precision
|
||||
*/
|
||||
@ -1540,19 +1540,16 @@ static void ice_ptp_tx_tstamp_work(struct kthread_work *work)
|
||||
if (err)
|
||||
continue;
|
||||
|
||||
/* Check if the timestamp is valid */
|
||||
if (!(raw_tstamp & ICE_PTP_TS_VALID))
|
||||
/* Check if the timestamp is invalid or stale */
|
||||
if (!(raw_tstamp & ICE_PTP_TS_VALID) ||
|
||||
raw_tstamp == tx->tstamps[idx].cached_tstamp)
|
||||
continue;
|
||||
|
||||
/* clear the timestamp register, so that it won't show valid
|
||||
* again when re-used.
|
||||
*/
|
||||
ice_clear_phy_tstamp(hw, tx->quad, phy_idx);
|
||||
|
||||
/* The timestamp is valid, so we'll go ahead and clear this
|
||||
* index and then send the timestamp up to the stack.
|
||||
*/
|
||||
spin_lock(&tx->lock);
|
||||
tx->tstamps[idx].cached_tstamp = raw_tstamp;
|
||||
clear_bit(idx, tx->in_use);
|
||||
skb = tx->tstamps[idx].skb;
|
||||
tx->tstamps[idx].skb = NULL;
|
||||
|
@ -55,15 +55,21 @@ struct ice_perout_channel {
|
||||
* struct ice_tx_tstamp - Tracking for a single Tx timestamp
|
||||
* @skb: pointer to the SKB for this timestamp request
|
||||
* @start: jiffies when the timestamp was first requested
|
||||
* @cached_tstamp: last read timestamp
|
||||
*
|
||||
* This structure tracks a single timestamp request. The SKB pointer is
|
||||
* provided when initiating a request. The start time is used to ensure that
|
||||
* we discard old requests that were not fulfilled within a 2 second time
|
||||
* window.
|
||||
* Timestamp values in the PHY are read only and do not get cleared except at
|
||||
* hardware reset or when a new timestamp value is captured. The cached_tstamp
|
||||
* field is used to detect the case where a new timestamp has not yet been
|
||||
* captured, ensuring that we avoid sending stale timestamp data to the stack.
|
||||
*/
|
||||
struct ice_tx_tstamp {
|
||||
struct sk_buff *skb;
|
||||
unsigned long start;
|
||||
u64 cached_tstamp;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -7648,6 +7648,20 @@ static int igb_set_vf_mac_filter(struct igb_adapter *adapter, const int vf,
|
||||
struct vf_mac_filter *entry = NULL;
|
||||
int ret = 0;
|
||||
|
||||
if ((vf_data->flags & IGB_VF_FLAG_PF_SET_MAC) &&
|
||||
!vf_data->trusted) {
|
||||
dev_warn(&pdev->dev,
|
||||
"VF %d requested MAC filter but is administratively denied\n",
|
||||
vf);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (!is_valid_ether_addr(addr)) {
|
||||
dev_warn(&pdev->dev,
|
||||
"VF %d attempted to set invalid MAC filter\n",
|
||||
vf);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
switch (info) {
|
||||
case E1000_VF_MAC_FILTER_CLR:
|
||||
/* remove all unicast MAC filters related to the current VF */
|
||||
@ -7661,20 +7675,6 @@ static int igb_set_vf_mac_filter(struct igb_adapter *adapter, const int vf,
|
||||
}
|
||||
break;
|
||||
case E1000_VF_MAC_FILTER_ADD:
|
||||
if ((vf_data->flags & IGB_VF_FLAG_PF_SET_MAC) &&
|
||||
!vf_data->trusted) {
|
||||
dev_warn(&pdev->dev,
|
||||
"VF %d requested MAC filter but is administratively denied\n",
|
||||
vf);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (!is_valid_ether_addr(addr)) {
|
||||
dev_warn(&pdev->dev,
|
||||
"VF %d attempted to set invalid MAC filter\n",
|
||||
vf);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* try to find empty slot in the list */
|
||||
list_for_each(pos, &adapter->vf_macs.l) {
|
||||
entry = list_entry(pos, struct vf_mac_filter, l);
|
||||
|
@ -2859,6 +2859,7 @@ static int igbvf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
return 0;
|
||||
|
||||
err_hw_init:
|
||||
netif_napi_del(&adapter->rx_ring->napi);
|
||||
kfree(adapter->tx_ring);
|
||||
kfree(adapter->rx_ring);
|
||||
err_sw_init:
|
||||
|
@ -636,7 +636,7 @@ s32 igc_set_ltr_i225(struct igc_hw *hw, bool link)
|
||||
ltrv = rd32(IGC_LTRMAXV);
|
||||
if (ltr_max != (ltrv & IGC_LTRMAXV_LTRV_MASK)) {
|
||||
ltrv = IGC_LTRMAXV_LSNP_REQ | ltr_max |
|
||||
(scale_min << IGC_LTRMAXV_SCALE_SHIFT);
|
||||
(scale_max << IGC_LTRMAXV_SCALE_SHIFT);
|
||||
wr32(IGC_LTRMAXV, ltrv);
|
||||
}
|
||||
}
|
||||
|
@ -5531,6 +5531,10 @@ static int ixgbe_non_sfp_link_config(struct ixgbe_hw *hw)
|
||||
if (!speed && hw->mac.ops.get_link_capabilities) {
|
||||
ret = hw->mac.ops.get_link_capabilities(hw, &speed,
|
||||
&autoneg);
|
||||
/* remove NBASE-T speeds from default autonegotiation
|
||||
* to accommodate broken network switches in the field
|
||||
* which cannot cope with advertised NBASE-T speeds
|
||||
*/
|
||||
speed &= ~(IXGBE_LINK_SPEED_5GB_FULL |
|
||||
IXGBE_LINK_SPEED_2_5GB_FULL);
|
||||
}
|
||||
|
@ -3405,6 +3405,9 @@ static s32 ixgbe_reset_hw_X550em(struct ixgbe_hw *hw)
|
||||
/* flush pending Tx transactions */
|
||||
ixgbe_clear_tx_pending(hw);
|
||||
|
||||
/* set MDIO speed before talking to the PHY in case it's the 1st time */
|
||||
ixgbe_set_mdio_speed(hw);
|
||||
|
||||
/* PHY ops must be identified and initialized prior to reset */
|
||||
status = hw->phy.ops.init(hw);
|
||||
if (status == IXGBE_ERR_SFP_NOT_SUPPORTED ||
|
||||
|
@ -8494,7 +8494,8 @@ mlxsw_sp_rif_mac_profile_replace(struct mlxsw_sp *mlxsw_sp,
|
||||
u8 mac_profile;
|
||||
int err;
|
||||
|
||||
if (!mlxsw_sp_rif_mac_profile_is_shared(rif))
|
||||
if (!mlxsw_sp_rif_mac_profile_is_shared(rif) &&
|
||||
!mlxsw_sp_rif_mac_profile_find(mlxsw_sp, new_mac))
|
||||
return mlxsw_sp_rif_mac_profile_edit(rif, new_mac);
|
||||
|
||||
err = mlxsw_sp_rif_mac_profile_get(mlxsw_sp, new_mac,
|
||||
|
@ -609,6 +609,9 @@ static size_t ef100_update_stats(struct efx_nic *efx,
|
||||
ef100_common_stat_mask(mask);
|
||||
ef100_ethtool_stat_mask(mask);
|
||||
|
||||
if (!mc_stats)
|
||||
return 0;
|
||||
|
||||
efx_nic_copy_stats(efx, mc_stats);
|
||||
efx_nic_update_stats(ef100_stat_desc, EF100_STAT_COUNT, mask,
|
||||
stats, mc_stats, false);
|
||||
|
@ -33,6 +33,7 @@ struct rk_gmac_ops {
|
||||
void (*set_rgmii_speed)(struct rk_priv_data *bsp_priv, int speed);
|
||||
void (*set_rmii_speed)(struct rk_priv_data *bsp_priv, int speed);
|
||||
void (*integrated_phy_powerup)(struct rk_priv_data *bsp_priv);
|
||||
bool regs_valid;
|
||||
u32 regs[];
|
||||
};
|
||||
|
||||
@ -1092,6 +1093,7 @@ static const struct rk_gmac_ops rk3568_ops = {
|
||||
.set_to_rmii = rk3568_set_to_rmii,
|
||||
.set_rgmii_speed = rk3568_set_gmac_speed,
|
||||
.set_rmii_speed = rk3568_set_gmac_speed,
|
||||
.regs_valid = true,
|
||||
.regs = {
|
||||
0xfe2a0000, /* gmac0 */
|
||||
0xfe010000, /* gmac1 */
|
||||
@ -1383,7 +1385,7 @@ static struct rk_priv_data *rk_gmac_setup(struct platform_device *pdev,
|
||||
* to be distinguished.
|
||||
*/
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (res) {
|
||||
if (res && ops->regs_valid) {
|
||||
int i = 0;
|
||||
|
||||
while (ops->regs[i]) {
|
||||
|
@ -172,6 +172,19 @@ struct stmmac_flow_entry {
|
||||
int is_l4;
|
||||
};
|
||||
|
||||
/* Rx Frame Steering */
|
||||
enum stmmac_rfs_type {
|
||||
STMMAC_RFS_T_VLAN,
|
||||
STMMAC_RFS_T_MAX,
|
||||
};
|
||||
|
||||
struct stmmac_rfs_entry {
|
||||
unsigned long cookie;
|
||||
int in_use;
|
||||
int type;
|
||||
int tc;
|
||||
};
|
||||
|
||||
struct stmmac_priv {
|
||||
/* Frequently used values are kept adjacent for cache effect */
|
||||
u32 tx_coal_frames[MTL_MAX_TX_QUEUES];
|
||||
@ -289,6 +302,10 @@ struct stmmac_priv {
|
||||
struct stmmac_tc_entry *tc_entries;
|
||||
unsigned int flow_entries_max;
|
||||
struct stmmac_flow_entry *flow_entries;
|
||||
unsigned int rfs_entries_max[STMMAC_RFS_T_MAX];
|
||||
unsigned int rfs_entries_cnt[STMMAC_RFS_T_MAX];
|
||||
unsigned int rfs_entries_total;
|
||||
struct stmmac_rfs_entry *rfs_entries;
|
||||
|
||||
/* Pulse Per Second output */
|
||||
struct stmmac_pps_cfg pps[STMMAC_PPS_MAX];
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user