Merge 5.2-rc7 into android-mainline
Linux 5.2-rc7 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
commit
96e821be4b
@ -152,17 +152,19 @@ examples:
|
||||
- |
|
||||
// Example 2: Spike ISA Simulator with 1 Hart
|
||||
cpus {
|
||||
cpu@0 {
|
||||
device_type = "cpu";
|
||||
reg = <0>;
|
||||
compatible = "riscv";
|
||||
riscv,isa = "rv64imafdc";
|
||||
mmu-type = "riscv,sv48";
|
||||
interrupt-controller {
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-controller;
|
||||
compatible = "riscv,cpu-intc";
|
||||
};
|
||||
};
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
cpu@0 {
|
||||
device_type = "cpu";
|
||||
reg = <0>;
|
||||
compatible = "riscv";
|
||||
riscv,isa = "rv64imafdc";
|
||||
mmu-type = "riscv,sv48";
|
||||
interrupt-controller {
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-controller;
|
||||
compatible = "riscv,cpu-intc";
|
||||
};
|
||||
};
|
||||
};
|
||||
...
|
||||
|
10
MAINTAINERS
10
MAINTAINERS
@ -3122,6 +3122,7 @@ F: arch/arm/mach-bcm/
|
||||
BROADCOM BCM2835 ARM ARCHITECTURE
|
||||
M: Eric Anholt <eric@anholt.net>
|
||||
M: Stefan Wahren <wahrenst@gmx.net>
|
||||
L: bcm-kernel-feedback-list@broadcom.com
|
||||
L: linux-rpi-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
T: git git://github.com/anholt/linux
|
||||
@ -3151,6 +3152,7 @@ F: arch/arm/boot/dts/bcm953012*
|
||||
|
||||
BROADCOM BCM53573 ARM ARCHITECTURE
|
||||
M: Rafał Miłecki <rafal@milecki.pl>
|
||||
L: bcm-kernel-feedback-list@broadcom.com
|
||||
L: linux-arm-kernel@lists.infradead.org
|
||||
S: Maintained
|
||||
F: arch/arm/boot/dts/bcm53573*
|
||||
@ -3940,6 +3942,14 @@ M: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
|
||||
S: Maintained
|
||||
F: .clang-format
|
||||
|
||||
CLANG/LLVM BUILD SUPPORT
|
||||
L: clang-built-linux@googlegroups.com
|
||||
W: https://clangbuiltlinux.github.io/
|
||||
B: https://github.com/ClangBuiltLinux/linux/issues
|
||||
C: irc://chat.freenode.net/clangbuiltlinux
|
||||
S: Supported
|
||||
K: \b(?i:clang|llvm)\b
|
||||
|
||||
CLEANCACHE API
|
||||
M: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
||||
L: linux-kernel@vger.kernel.org
|
||||
|
4
Makefile
4
Makefile
@ -2,8 +2,8 @@
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 2
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc6
|
||||
NAME = Golden Lions
|
||||
EXTRAVERSION = -rc7
|
||||
NAME = Bobtail Squid
|
||||
|
||||
# *DOCUMENTATION*
|
||||
# To see a list of typical targets execute "make help"
|
||||
|
@ -5,6 +5,10 @@
|
||||
|
||||
KBUILD_DEFCONFIG := nsim_hs_defconfig
|
||||
|
||||
ifeq ($(CROSS_COMPILE),)
|
||||
CROSS_COMPILE := $(call cc-cross-prefix, arc-linux- arceb-linux-)
|
||||
endif
|
||||
|
||||
cflags-y += -fno-common -pipe -fno-builtin -mmedium-calls -D__linux__
|
||||
cflags-$(CONFIG_ISA_ARCOMPACT) += -mA7
|
||||
cflags-$(CONFIG_ISA_ARCV2) += -mcpu=hs38
|
||||
|
@ -32,8 +32,6 @@ static void __init hsdk_init_per_cpu(unsigned int cpu)
|
||||
|
||||
#define ARC_PERIPHERAL_BASE 0xf0000000
|
||||
#define CREG_BASE (ARC_PERIPHERAL_BASE + 0x1000)
|
||||
#define CREG_PAE (CREG_BASE + 0x180)
|
||||
#define CREG_PAE_UPDATE (CREG_BASE + 0x194)
|
||||
|
||||
#define SDIO_BASE (ARC_PERIPHERAL_BASE + 0xA000)
|
||||
#define SDIO_UHS_REG_EXT (SDIO_BASE + 0x108)
|
||||
@ -99,20 +97,167 @@ static void __init hsdk_enable_gpio_intc_wire(void)
|
||||
iowrite32(GPIO_INT_CONNECTED_MASK, (void __iomem *) GPIO_INTEN);
|
||||
}
|
||||
|
||||
static void __init hsdk_init_early(void)
|
||||
enum hsdk_axi_masters {
|
||||
M_HS_CORE = 0,
|
||||
M_HS_RTT,
|
||||
M_AXI_TUN,
|
||||
M_HDMI_VIDEO,
|
||||
M_HDMI_AUDIO,
|
||||
M_USB_HOST,
|
||||
M_ETHERNET,
|
||||
M_SDIO,
|
||||
M_GPU,
|
||||
M_DMAC_0,
|
||||
M_DMAC_1,
|
||||
M_DVFS
|
||||
};
|
||||
|
||||
#define UPDATE_VAL 1
|
||||
|
||||
/*
|
||||
* This is modified configuration of AXI bridge. Default settings
|
||||
* are specified in "Table 111 CREG Address Decoder register reset values".
|
||||
*
|
||||
* AXI_M_m_SLV{0|1} - Slave Select register for master 'm'.
|
||||
* Possible slaves are:
|
||||
* - 0 => no slave selected
|
||||
* - 1 => DDR controller port #1
|
||||
* - 2 => SRAM controller
|
||||
* - 3 => AXI tunnel
|
||||
* - 4 => EBI controller
|
||||
* - 5 => ROM controller
|
||||
* - 6 => AXI2APB bridge
|
||||
* - 7 => DDR controller port #2
|
||||
* - 8 => DDR controller port #3
|
||||
* - 9 => HS38x4 IOC
|
||||
* - 10 => HS38x4 DMI
|
||||
* AXI_M_m_OFFSET{0|1} - Addr Offset register for master 'm'
|
||||
*
|
||||
* Please read ARC HS Development IC Specification, section 17.2 for more
|
||||
* information about apertures configuration.
|
||||
*
|
||||
* m master AXI_M_m_SLV0 AXI_M_m_SLV1 AXI_M_m_OFFSET0 AXI_M_m_OFFSET1
|
||||
* 0 HS (CBU) 0x11111111 0x63111111 0xFEDCBA98 0x0E543210
|
||||
* 1 HS (RTT) 0x77777777 0x77777777 0xFEDCBA98 0x76543210
|
||||
* 2 AXI Tunnel 0x88888888 0x88888888 0xFEDCBA98 0x76543210
|
||||
* 3 HDMI-VIDEO 0x77777777 0x77777777 0xFEDCBA98 0x76543210
|
||||
* 4 HDMI-ADUIO 0x77777777 0x77777777 0xFEDCBA98 0x76543210
|
||||
* 5 USB-HOST 0x77777777 0x77999999 0xFEDCBA98 0x76DCBA98
|
||||
* 6 ETHERNET 0x77777777 0x77999999 0xFEDCBA98 0x76DCBA98
|
||||
* 7 SDIO 0x77777777 0x77999999 0xFEDCBA98 0x76DCBA98
|
||||
* 8 GPU 0x77777777 0x77777777 0xFEDCBA98 0x76543210
|
||||
* 9 DMAC (port #1) 0x77777777 0x77777777 0xFEDCBA98 0x76543210
|
||||
* 10 DMAC (port #2) 0x77777777 0x77777777 0xFEDCBA98 0x76543210
|
||||
* 11 DVFS 0x00000000 0x60000000 0x00000000 0x00000000
|
||||
*/
|
||||
|
||||
#define CREG_AXI_M_SLV0(m) ((void __iomem *)(CREG_BASE + 0x20 * (m)))
|
||||
#define CREG_AXI_M_SLV1(m) ((void __iomem *)(CREG_BASE + 0x20 * (m) + 0x04))
|
||||
#define CREG_AXI_M_OFT0(m) ((void __iomem *)(CREG_BASE + 0x20 * (m) + 0x08))
|
||||
#define CREG_AXI_M_OFT1(m) ((void __iomem *)(CREG_BASE + 0x20 * (m) + 0x0C))
|
||||
#define CREG_AXI_M_UPDT(m) ((void __iomem *)(CREG_BASE + 0x20 * (m) + 0x14))
|
||||
|
||||
#define CREG_AXI_M_HS_CORE_BOOT ((void __iomem *)(CREG_BASE + 0x010))
|
||||
|
||||
#define CREG_PAE ((void __iomem *)(CREG_BASE + 0x180))
|
||||
#define CREG_PAE_UPDT ((void __iomem *)(CREG_BASE + 0x194))
|
||||
|
||||
static void __init hsdk_init_memory_bridge(void)
|
||||
{
|
||||
u32 reg;
|
||||
|
||||
/*
|
||||
* M_HS_CORE has one unique register - BOOT.
|
||||
* We need to clean boot mirror (BOOT[1:0]) bits in them to avoid first
|
||||
* aperture to be masked by 'boot mirror'.
|
||||
*/
|
||||
reg = readl(CREG_AXI_M_HS_CORE_BOOT) & (~0x3);
|
||||
writel(reg, CREG_AXI_M_HS_CORE_BOOT);
|
||||
writel(0x11111111, CREG_AXI_M_SLV0(M_HS_CORE));
|
||||
writel(0x63111111, CREG_AXI_M_SLV1(M_HS_CORE));
|
||||
writel(0xFEDCBA98, CREG_AXI_M_OFT0(M_HS_CORE));
|
||||
writel(0x0E543210, CREG_AXI_M_OFT1(M_HS_CORE));
|
||||
writel(UPDATE_VAL, CREG_AXI_M_UPDT(M_HS_CORE));
|
||||
|
||||
writel(0x77777777, CREG_AXI_M_SLV0(M_HS_RTT));
|
||||
writel(0x77777777, CREG_AXI_M_SLV1(M_HS_RTT));
|
||||
writel(0xFEDCBA98, CREG_AXI_M_OFT0(M_HS_RTT));
|
||||
writel(0x76543210, CREG_AXI_M_OFT1(M_HS_RTT));
|
||||
writel(UPDATE_VAL, CREG_AXI_M_UPDT(M_HS_RTT));
|
||||
|
||||
writel(0x88888888, CREG_AXI_M_SLV0(M_AXI_TUN));
|
||||
writel(0x88888888, CREG_AXI_M_SLV1(M_AXI_TUN));
|
||||
writel(0xFEDCBA98, CREG_AXI_M_OFT0(M_AXI_TUN));
|
||||
writel(0x76543210, CREG_AXI_M_OFT1(M_AXI_TUN));
|
||||
writel(UPDATE_VAL, CREG_AXI_M_UPDT(M_AXI_TUN));
|
||||
|
||||
writel(0x77777777, CREG_AXI_M_SLV0(M_HDMI_VIDEO));
|
||||
writel(0x77777777, CREG_AXI_M_SLV1(M_HDMI_VIDEO));
|
||||
writel(0xFEDCBA98, CREG_AXI_M_OFT0(M_HDMI_VIDEO));
|
||||
writel(0x76543210, CREG_AXI_M_OFT1(M_HDMI_VIDEO));
|
||||
writel(UPDATE_VAL, CREG_AXI_M_UPDT(M_HDMI_VIDEO));
|
||||
|
||||
writel(0x77777777, CREG_AXI_M_SLV0(M_HDMI_AUDIO));
|
||||
writel(0x77777777, CREG_AXI_M_SLV1(M_HDMI_AUDIO));
|
||||
writel(0xFEDCBA98, CREG_AXI_M_OFT0(M_HDMI_AUDIO));
|
||||
writel(0x76543210, CREG_AXI_M_OFT1(M_HDMI_AUDIO));
|
||||
writel(UPDATE_VAL, CREG_AXI_M_UPDT(M_HDMI_AUDIO));
|
||||
|
||||
writel(0x77777777, CREG_AXI_M_SLV0(M_USB_HOST));
|
||||
writel(0x77999999, CREG_AXI_M_SLV1(M_USB_HOST));
|
||||
writel(0xFEDCBA98, CREG_AXI_M_OFT0(M_USB_HOST));
|
||||
writel(0x76DCBA98, CREG_AXI_M_OFT1(M_USB_HOST));
|
||||
writel(UPDATE_VAL, CREG_AXI_M_UPDT(M_USB_HOST));
|
||||
|
||||
writel(0x77777777, CREG_AXI_M_SLV0(M_ETHERNET));
|
||||
writel(0x77999999, CREG_AXI_M_SLV1(M_ETHERNET));
|
||||
writel(0xFEDCBA98, CREG_AXI_M_OFT0(M_ETHERNET));
|
||||
writel(0x76DCBA98, CREG_AXI_M_OFT1(M_ETHERNET));
|
||||
writel(UPDATE_VAL, CREG_AXI_M_UPDT(M_ETHERNET));
|
||||
|
||||
writel(0x77777777, CREG_AXI_M_SLV0(M_SDIO));
|
||||
writel(0x77999999, CREG_AXI_M_SLV1(M_SDIO));
|
||||
writel(0xFEDCBA98, CREG_AXI_M_OFT0(M_SDIO));
|
||||
writel(0x76DCBA98, CREG_AXI_M_OFT1(M_SDIO));
|
||||
writel(UPDATE_VAL, CREG_AXI_M_UPDT(M_SDIO));
|
||||
|
||||
writel(0x77777777, CREG_AXI_M_SLV0(M_GPU));
|
||||
writel(0x77777777, CREG_AXI_M_SLV1(M_GPU));
|
||||
writel(0xFEDCBA98, CREG_AXI_M_OFT0(M_GPU));
|
||||
writel(0x76543210, CREG_AXI_M_OFT1(M_GPU));
|
||||
writel(UPDATE_VAL, CREG_AXI_M_UPDT(M_GPU));
|
||||
|
||||
writel(0x77777777, CREG_AXI_M_SLV0(M_DMAC_0));
|
||||
writel(0x77777777, CREG_AXI_M_SLV1(M_DMAC_0));
|
||||
writel(0xFEDCBA98, CREG_AXI_M_OFT0(M_DMAC_0));
|
||||
writel(0x76543210, CREG_AXI_M_OFT1(M_DMAC_0));
|
||||
writel(UPDATE_VAL, CREG_AXI_M_UPDT(M_DMAC_0));
|
||||
|
||||
writel(0x77777777, CREG_AXI_M_SLV0(M_DMAC_1));
|
||||
writel(0x77777777, CREG_AXI_M_SLV1(M_DMAC_1));
|
||||
writel(0xFEDCBA98, CREG_AXI_M_OFT0(M_DMAC_1));
|
||||
writel(0x76543210, CREG_AXI_M_OFT1(M_DMAC_1));
|
||||
writel(UPDATE_VAL, CREG_AXI_M_UPDT(M_DMAC_1));
|
||||
|
||||
writel(0x00000000, CREG_AXI_M_SLV0(M_DVFS));
|
||||
writel(0x60000000, CREG_AXI_M_SLV1(M_DVFS));
|
||||
writel(0x00000000, CREG_AXI_M_OFT0(M_DVFS));
|
||||
writel(0x00000000, CREG_AXI_M_OFT1(M_DVFS));
|
||||
writel(UPDATE_VAL, CREG_AXI_M_UPDT(M_DVFS));
|
||||
|
||||
/*
|
||||
* PAE remapping for DMA clients does not work due to an RTL bug, so
|
||||
* CREG_PAE register must be programmed to all zeroes, otherwise it
|
||||
* will cause problems with DMA to/from peripherals even if PAE40 is
|
||||
* not used.
|
||||
*/
|
||||
writel(0x00000000, CREG_PAE);
|
||||
writel(UPDATE_VAL, CREG_PAE_UPDT);
|
||||
}
|
||||
|
||||
/* Default is 1, which means "PAE offset = 4GByte" */
|
||||
writel_relaxed(0, (void __iomem *) CREG_PAE);
|
||||
|
||||
/* Really apply settings made above */
|
||||
writel(1, (void __iomem *) CREG_PAE_UPDATE);
|
||||
static void __init hsdk_init_early(void)
|
||||
{
|
||||
hsdk_init_memory_bridge();
|
||||
|
||||
/*
|
||||
* Switch SDIO external ciu clock divider from default div-by-8 to
|
||||
|
@ -20,7 +20,7 @@
|
||||
};
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,19200n8 root=/dev/sda1 rw rootwait";
|
||||
bootargs = "console=ttyS0,19200n8 root=/dev/sda1 rw rootwait consoleblank=300";
|
||||
stdout-path = "uart0:19200n8";
|
||||
};
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
/ {
|
||||
model = "D-Link DNS-313 1-Bay Network Storage Enclosure";
|
||||
compatible = "dlink,dir-313", "cortina,gemini";
|
||||
compatible = "dlink,dns-313", "cortina,gemini";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
|
@ -358,7 +358,7 @@
|
||||
pwm1: pwm@2080000 {
|
||||
compatible = "fsl,imx6ul-pwm", "fsl,imx27-pwm";
|
||||
reg = <0x02080000 0x4000>;
|
||||
interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clks IMX6UL_CLK_PWM1>,
|
||||
<&clks IMX6UL_CLK_PWM1>;
|
||||
clock-names = "ipg", "per";
|
||||
@ -369,7 +369,7 @@
|
||||
pwm2: pwm@2084000 {
|
||||
compatible = "fsl,imx6ul-pwm", "fsl,imx27-pwm";
|
||||
reg = <0x02084000 0x4000>;
|
||||
interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clks IMX6UL_CLK_PWM2>,
|
||||
<&clks IMX6UL_CLK_PWM2>;
|
||||
clock-names = "ipg", "per";
|
||||
@ -380,7 +380,7 @@
|
||||
pwm3: pwm@2088000 {
|
||||
compatible = "fsl,imx6ul-pwm", "fsl,imx27-pwm";
|
||||
reg = <0x02088000 0x4000>;
|
||||
interrupts = <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clks IMX6UL_CLK_PWM3>,
|
||||
<&clks IMX6UL_CLK_PWM3>;
|
||||
clock-names = "ipg", "per";
|
||||
@ -391,7 +391,7 @@
|
||||
pwm4: pwm@208c000 {
|
||||
compatible = "fsl,imx6ul-pwm", "fsl,imx27-pwm";
|
||||
reg = <0x0208c000 0x4000>;
|
||||
interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clks IMX6UL_CLK_PWM4>,
|
||||
<&clks IMX6UL_CLK_PWM4>;
|
||||
clock-names = "ipg", "per";
|
||||
|
@ -248,8 +248,8 @@
|
||||
<GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 172 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 173 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 171 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 172 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 173 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>,
|
||||
@ -264,7 +264,6 @@
|
||||
clocks = <&clkc CLKID_CLK81>, <&clkc CLKID_MALI>;
|
||||
clock-names = "bus", "core";
|
||||
operating-points-v2 = <&gpu_opp_table>;
|
||||
switch-delay = <0xffff>;
|
||||
};
|
||||
};
|
||||
}; /* end of / */
|
||||
|
@ -163,23 +163,23 @@
|
||||
|
||||
opp-255000000 {
|
||||
opp-hz = /bits/ 64 <255000000>;
|
||||
opp-microvolt = <1150000>;
|
||||
opp-microvolt = <1100000>;
|
||||
};
|
||||
opp-364300000 {
|
||||
opp-hz = /bits/ 64 <364300000>;
|
||||
opp-microvolt = <1150000>;
|
||||
opp-microvolt = <1100000>;
|
||||
};
|
||||
opp-425000000 {
|
||||
opp-hz = /bits/ 64 <425000000>;
|
||||
opp-microvolt = <1150000>;
|
||||
opp-microvolt = <1100000>;
|
||||
};
|
||||
opp-510000000 {
|
||||
opp-hz = /bits/ 64 <510000000>;
|
||||
opp-microvolt = <1150000>;
|
||||
opp-microvolt = <1100000>;
|
||||
};
|
||||
opp-637500000 {
|
||||
opp-hz = /bits/ 64 <637500000>;
|
||||
opp-microvolt = <1150000>;
|
||||
opp-microvolt = <1100000>;
|
||||
turbo-mode;
|
||||
};
|
||||
};
|
||||
@ -229,7 +229,6 @@
|
||||
clocks = <&clkc CLKID_CLK81>, <&clkc CLKID_MALI>;
|
||||
clock-names = "bus", "core";
|
||||
operating-points-v2 = <&gpu_opp_table>;
|
||||
switch-delay = <0xffff>;
|
||||
};
|
||||
};
|
||||
}; /* end of / */
|
||||
|
@ -430,7 +430,7 @@ static void omap3_prm_reconfigure_io_chain(void)
|
||||
* registers, and omap3xxx_prm_reconfigure_io_chain() must be called.
|
||||
* No return value.
|
||||
*/
|
||||
static void __init omap3xxx_prm_enable_io_wakeup(void)
|
||||
static void omap3xxx_prm_enable_io_wakeup(void)
|
||||
{
|
||||
if (prm_features & PRM_HAS_IO_WAKEUP)
|
||||
omap2_prm_set_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD,
|
||||
|
@ -28,7 +28,7 @@
|
||||
enable-method = "psci";
|
||||
clocks = <&clockgen 1 0>;
|
||||
next-level-cache = <&l2>;
|
||||
cpu-idle-states = <&CPU_PH20>;
|
||||
cpu-idle-states = <&CPU_PW20>;
|
||||
};
|
||||
|
||||
cpu1: cpu@1 {
|
||||
@ -38,7 +38,7 @@
|
||||
enable-method = "psci";
|
||||
clocks = <&clockgen 1 0>;
|
||||
next-level-cache = <&l2>;
|
||||
cpu-idle-states = <&CPU_PH20>;
|
||||
cpu-idle-states = <&CPU_PW20>;
|
||||
};
|
||||
|
||||
l2: l2-cache {
|
||||
@ -53,13 +53,13 @@
|
||||
*/
|
||||
entry-method = "arm,psci";
|
||||
|
||||
CPU_PH20: cpu-ph20 {
|
||||
compatible = "arm,idle-state";
|
||||
idle-state-name = "PH20";
|
||||
arm,psci-suspend-param = <0x00010000>;
|
||||
entry-latency-us = <1000>;
|
||||
exit-latency-us = <1000>;
|
||||
min-residency-us = <3000>;
|
||||
CPU_PW20: cpu-pw20 {
|
||||
compatible = "arm,idle-state";
|
||||
idle-state-name = "PW20";
|
||||
arm,psci-suspend-param = <0x0>;
|
||||
entry-latency-us = <2000>;
|
||||
exit-latency-us = <2000>;
|
||||
min-residency-us = <6000>;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -613,6 +613,7 @@ CONFIG_RTC_DRV_TEGRA=y
|
||||
CONFIG_RTC_DRV_IMX_SC=m
|
||||
CONFIG_RTC_DRV_XGENE=y
|
||||
CONFIG_DMADEVICES=y
|
||||
CONFIG_FSL_EDMA=y
|
||||
CONFIG_DMA_BCM2835=m
|
||||
CONFIG_K3_DMA=y
|
||||
CONFIG_MV_XOR=y
|
||||
|
@ -39,6 +39,11 @@ static int save_fpu_state(struct sigcontext __user *sc)
|
||||
#endif
|
||||
|
||||
struct rt_sigframe {
|
||||
/*
|
||||
* pad[3] is compatible with the same struct defined in
|
||||
* gcc/libgcc/config/csky/linux-unwind.h
|
||||
*/
|
||||
int pad[3];
|
||||
struct siginfo info;
|
||||
struct ucontext uc;
|
||||
};
|
||||
|
@ -310,6 +310,36 @@ static inline bool mips_gic_present(void)
|
||||
return IS_ENABLED(CONFIG_MIPS_GIC) && mips_gic_base;
|
||||
}
|
||||
|
||||
/**
|
||||
* mips_gic_vx_map_reg() - Return GIC_Vx_<intr>_MAP register offset
|
||||
* @intr: A GIC local interrupt
|
||||
*
|
||||
* Determine the index of the GIC_VL_<intr>_MAP or GIC_VO_<intr>_MAP register
|
||||
* within the block of GIC map registers. This is almost the same as the order
|
||||
* of interrupts in the pending & mask registers, as used by enum
|
||||
* mips_gic_local_interrupt, but moves the FDC interrupt & thus offsets the
|
||||
* interrupts after it...
|
||||
*
|
||||
* Return: The map register index corresponding to @intr.
|
||||
*
|
||||
* The return value is suitable for use with the (read|write)_gic_v[lo]_map
|
||||
* accessor functions.
|
||||
*/
|
||||
static inline unsigned int
|
||||
mips_gic_vx_map_reg(enum mips_gic_local_interrupt intr)
|
||||
{
|
||||
/* WD, Compare & Timer are 1:1 */
|
||||
if (intr <= GIC_LOCAL_INT_TIMER)
|
||||
return intr;
|
||||
|
||||
/* FDC moves to after Timer... */
|
||||
if (intr == GIC_LOCAL_INT_FDC)
|
||||
return GIC_LOCAL_INT_TIMER + 1;
|
||||
|
||||
/* As a result everything else is offset by 1 */
|
||||
return intr + 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* gic_get_c0_compare_int() - Return cp0 count/compare interrupt virq
|
||||
*
|
||||
|
@ -786,6 +786,10 @@ int apply_relocate_add(Elf_Shdr *sechdrs,
|
||||
/* 32-bit PC relative address */
|
||||
*loc = val - dot - 8 + addend;
|
||||
break;
|
||||
case R_PARISC_PCREL64:
|
||||
/* 64-bit PC relative address */
|
||||
*loc64 = val - dot - 8 + addend;
|
||||
break;
|
||||
case R_PARISC_DIR64:
|
||||
/* 64-bit effective address */
|
||||
*loc64 = val + addend;
|
||||
|
@ -315,7 +315,7 @@ TRAMP_REAL_BEGIN(machine_check_common_early)
|
||||
mfspr r11,SPRN_DSISR /* Save DSISR */
|
||||
std r11,_DSISR(r1)
|
||||
std r9,_CCR(r1) /* Save CR in stackframe */
|
||||
kuap_save_amr_and_lock r9, r10, cr1
|
||||
/* We don't touch AMR here, we never go to virtual mode */
|
||||
/* Save r9 through r13 from EXMC save area to stack frame. */
|
||||
EXCEPTION_PROLOG_COMMON_2(PACA_EXMC)
|
||||
mfmsr r11 /* get MSR value */
|
||||
|
@ -50,20 +50,52 @@ EXPORT_SYMBOL_GPL(hash__alloc_context_id);
|
||||
|
||||
void slb_setup_new_exec(void);
|
||||
|
||||
static int realloc_context_ids(mm_context_t *ctx)
|
||||
{
|
||||
int i, id;
|
||||
|
||||
/*
|
||||
* id 0 (aka. ctx->id) is special, we always allocate a new one, even if
|
||||
* there wasn't one allocated previously (which happens in the exec
|
||||
* case where ctx is newly allocated).
|
||||
*
|
||||
* We have to be a bit careful here. We must keep the existing ids in
|
||||
* the array, so that we can test if they're non-zero to decide if we
|
||||
* need to allocate a new one. However in case of error we must free the
|
||||
* ids we've allocated but *not* any of the existing ones (or risk a
|
||||
* UAF). That's why we decrement i at the start of the error handling
|
||||
* loop, to skip the id that we just tested but couldn't reallocate.
|
||||
*/
|
||||
for (i = 0; i < ARRAY_SIZE(ctx->extended_id); i++) {
|
||||
if (i == 0 || ctx->extended_id[i]) {
|
||||
id = hash__alloc_context_id();
|
||||
if (id < 0)
|
||||
goto error;
|
||||
|
||||
ctx->extended_id[i] = id;
|
||||
}
|
||||
}
|
||||
|
||||
/* The caller expects us to return id */
|
||||
return ctx->id;
|
||||
|
||||
error:
|
||||
for (i--; i >= 0; i--) {
|
||||
if (ctx->extended_id[i])
|
||||
ida_free(&mmu_context_ida, ctx->extended_id[i]);
|
||||
}
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
static int hash__init_new_context(struct mm_struct *mm)
|
||||
{
|
||||
int index;
|
||||
|
||||
index = hash__alloc_context_id();
|
||||
if (index < 0)
|
||||
return index;
|
||||
|
||||
mm->context.hash_context = kmalloc(sizeof(struct hash_mm_context),
|
||||
GFP_KERNEL);
|
||||
if (!mm->context.hash_context) {
|
||||
ida_free(&mmu_context_ida, index);
|
||||
if (!mm->context.hash_context)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
/*
|
||||
* The old code would re-promote on fork, we don't do that when using
|
||||
@ -91,13 +123,20 @@ static int hash__init_new_context(struct mm_struct *mm)
|
||||
mm->context.hash_context->spt = kmalloc(sizeof(struct subpage_prot_table),
|
||||
GFP_KERNEL);
|
||||
if (!mm->context.hash_context->spt) {
|
||||
ida_free(&mmu_context_ida, index);
|
||||
kfree(mm->context.hash_context);
|
||||
return -ENOMEM;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
index = realloc_context_ids(&mm->context);
|
||||
if (index < 0) {
|
||||
#ifdef CONFIG_PPC_SUBPAGE_PROT
|
||||
kfree(mm->context.hash_context->spt);
|
||||
#endif
|
||||
kfree(mm->context.hash_context);
|
||||
return index;
|
||||
}
|
||||
|
||||
pkey_mm_init(mm);
|
||||
|
@ -163,6 +163,7 @@
|
||||
interrupt-parent = <&plic0>;
|
||||
interrupts = <4>;
|
||||
clocks = <&prci PRCI_CLK_TLCLK>;
|
||||
status = "disabled";
|
||||
};
|
||||
uart1: serial@10011000 {
|
||||
compatible = "sifive,fu540-c000-uart", "sifive,uart0";
|
||||
@ -170,6 +171,7 @@
|
||||
interrupt-parent = <&plic0>;
|
||||
interrupts = <5>;
|
||||
clocks = <&prci PRCI_CLK_TLCLK>;
|
||||
status = "disabled";
|
||||
};
|
||||
i2c0: i2c@10030000 {
|
||||
compatible = "sifive,fu540-c000-i2c", "sifive,i2c0";
|
||||
@ -181,6 +183,7 @@
|
||||
reg-io-width = <1>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
qspi0: spi@10040000 {
|
||||
compatible = "sifive,fu540-c000-spi", "sifive,spi0";
|
||||
@ -191,6 +194,7 @@
|
||||
clocks = <&prci PRCI_CLK_TLCLK>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
qspi1: spi@10041000 {
|
||||
compatible = "sifive,fu540-c000-spi", "sifive,spi0";
|
||||
@ -201,6 +205,7 @@
|
||||
clocks = <&prci PRCI_CLK_TLCLK>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
qspi2: spi@10050000 {
|
||||
compatible = "sifive,fu540-c000-spi", "sifive,spi0";
|
||||
@ -210,6 +215,7 @@
|
||||
clocks = <&prci PRCI_CLK_TLCLK>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -42,7 +42,20 @@
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&qspi0 {
|
||||
status = "okay";
|
||||
flash@0 {
|
||||
compatible = "issi,is25wp256", "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
|
@ -69,6 +69,7 @@ CONFIG_VIRTIO_MMIO=y
|
||||
CONFIG_CLK_SIFIVE=y
|
||||
CONFIG_CLK_SIFIVE_FU540_PRCI=y
|
||||
CONFIG_SIFIVE_PLIC=y
|
||||
CONFIG_SPI_SIFIVE=y
|
||||
CONFIG_EXT4_FS=y
|
||||
CONFIG_EXT4_FS_POSIX_ACL=y
|
||||
CONFIG_AUTOFS4_FS=y
|
||||
@ -84,4 +85,8 @@ CONFIG_ROOT_NFS=y
|
||||
CONFIG_CRYPTO_USER_API_HASH=y
|
||||
CONFIG_CRYPTO_DEV_VIRTIO=y
|
||||
CONFIG_PRINTK_TIME=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_MMC_SPI=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_DEVTMPFS_MOUNT=y
|
||||
# CONFIG_RCU_TRACE is not set
|
||||
|
@ -272,9 +272,6 @@ asmlinkage void do_page_fault(struct pt_regs *regs)
|
||||
* entries, but in RISC-V, SFENCE.VMA specifies an
|
||||
* ordering constraint, not a cache flush; it is
|
||||
* necessary even after writing invalid entries.
|
||||
* Relying on flush_tlb_fix_spurious_fault would
|
||||
* suffice, but the extra traps reduce
|
||||
* performance. So, eagerly SFENCE.VMA.
|
||||
*/
|
||||
local_flush_tlb_page(addr);
|
||||
|
||||
|
@ -561,14 +561,14 @@ int x86_pmu_hw_config(struct perf_event *event)
|
||||
}
|
||||
|
||||
/* sample_regs_user never support XMM registers */
|
||||
if (unlikely(event->attr.sample_regs_user & PEBS_XMM_REGS))
|
||||
if (unlikely(event->attr.sample_regs_user & PERF_REG_EXTENDED_MASK))
|
||||
return -EINVAL;
|
||||
/*
|
||||
* Besides the general purpose registers, XMM registers may
|
||||
* be collected in PEBS on some platforms, e.g. Icelake
|
||||
*/
|
||||
if (unlikely(event->attr.sample_regs_intr & PEBS_XMM_REGS)) {
|
||||
if (x86_pmu.pebs_no_xmm_regs)
|
||||
if (unlikely(event->attr.sample_regs_intr & PERF_REG_EXTENDED_MASK)) {
|
||||
if (!(event->pmu->capabilities & PERF_PMU_CAP_EXTENDED_REGS))
|
||||
return -EINVAL;
|
||||
|
||||
if (!event->attr.precise_ip)
|
||||
@ -2402,13 +2402,13 @@ perf_callchain_kernel(struct perf_callchain_entry_ctx *entry, struct pt_regs *re
|
||||
return;
|
||||
}
|
||||
|
||||
if (perf_hw_regs(regs)) {
|
||||
if (perf_callchain_store(entry, regs->ip))
|
||||
return;
|
||||
if (perf_callchain_store(entry, regs->ip))
|
||||
return;
|
||||
|
||||
if (perf_hw_regs(regs))
|
||||
unwind_start(&state, current, regs, NULL);
|
||||
} else {
|
||||
else
|
||||
unwind_start(&state, current, NULL, (void *)regs->sp);
|
||||
}
|
||||
|
||||
for (; !unwind_done(&state); unwind_next_frame(&state)) {
|
||||
addr = unwind_get_return_address(&state);
|
||||
|
@ -987,7 +987,7 @@ static u64 pebs_update_adaptive_cfg(struct perf_event *event)
|
||||
pebs_data_cfg |= PEBS_DATACFG_GP;
|
||||
|
||||
if ((sample_type & PERF_SAMPLE_REGS_INTR) &&
|
||||
(attr->sample_regs_intr & PEBS_XMM_REGS))
|
||||
(attr->sample_regs_intr & PERF_REG_EXTENDED_MASK))
|
||||
pebs_data_cfg |= PEBS_DATACFG_XMMS;
|
||||
|
||||
if (sample_type & PERF_SAMPLE_BRANCH_STACK) {
|
||||
@ -1964,10 +1964,9 @@ void __init intel_ds_init(void)
|
||||
x86_pmu.bts = boot_cpu_has(X86_FEATURE_BTS);
|
||||
x86_pmu.pebs = boot_cpu_has(X86_FEATURE_PEBS);
|
||||
x86_pmu.pebs_buffer_size = PEBS_BUFFER_SIZE;
|
||||
if (x86_pmu.version <= 4) {
|
||||
if (x86_pmu.version <= 4)
|
||||
x86_pmu.pebs_no_isolation = 1;
|
||||
x86_pmu.pebs_no_xmm_regs = 1;
|
||||
}
|
||||
|
||||
if (x86_pmu.pebs) {
|
||||
char pebs_type = x86_pmu.intel_cap.pebs_trap ? '+' : '-';
|
||||
char *pebs_qual = "";
|
||||
@ -2020,9 +2019,9 @@ void __init intel_ds_init(void)
|
||||
PERF_SAMPLE_TIME;
|
||||
x86_pmu.flags |= PMU_FL_PEBS_ALL;
|
||||
pebs_qual = "-baseline";
|
||||
x86_get_pmu()->capabilities |= PERF_PMU_CAP_EXTENDED_REGS;
|
||||
} else {
|
||||
/* Only basic record supported */
|
||||
x86_pmu.pebs_no_xmm_regs = 1;
|
||||
x86_pmu.large_pebs_flags &=
|
||||
~(PERF_SAMPLE_ADDR |
|
||||
PERF_SAMPLE_TIME |
|
||||
|
@ -121,24 +121,6 @@ struct amd_nb {
|
||||
(1ULL << PERF_REG_X86_R14) | \
|
||||
(1ULL << PERF_REG_X86_R15))
|
||||
|
||||
#define PEBS_XMM_REGS \
|
||||
((1ULL << PERF_REG_X86_XMM0) | \
|
||||
(1ULL << PERF_REG_X86_XMM1) | \
|
||||
(1ULL << PERF_REG_X86_XMM2) | \
|
||||
(1ULL << PERF_REG_X86_XMM3) | \
|
||||
(1ULL << PERF_REG_X86_XMM4) | \
|
||||
(1ULL << PERF_REG_X86_XMM5) | \
|
||||
(1ULL << PERF_REG_X86_XMM6) | \
|
||||
(1ULL << PERF_REG_X86_XMM7) | \
|
||||
(1ULL << PERF_REG_X86_XMM8) | \
|
||||
(1ULL << PERF_REG_X86_XMM9) | \
|
||||
(1ULL << PERF_REG_X86_XMM10) | \
|
||||
(1ULL << PERF_REG_X86_XMM11) | \
|
||||
(1ULL << PERF_REG_X86_XMM12) | \
|
||||
(1ULL << PERF_REG_X86_XMM13) | \
|
||||
(1ULL << PERF_REG_X86_XMM14) | \
|
||||
(1ULL << PERF_REG_X86_XMM15))
|
||||
|
||||
/*
|
||||
* Per register state.
|
||||
*/
|
||||
@ -668,8 +650,7 @@ struct x86_pmu {
|
||||
pebs_broken :1,
|
||||
pebs_prec_dist :1,
|
||||
pebs_no_tlb :1,
|
||||
pebs_no_isolation :1,
|
||||
pebs_no_xmm_regs :1;
|
||||
pebs_no_isolation :1;
|
||||
int pebs_record_size;
|
||||
int pebs_buffer_size;
|
||||
int max_pebs_events;
|
||||
|
@ -52,4 +52,7 @@ enum perf_event_x86_regs {
|
||||
/* These include both GPRs and XMMX registers */
|
||||
PERF_REG_X86_XMM_MAX = PERF_REG_X86_XMM15 + 2,
|
||||
};
|
||||
|
||||
#define PERF_REG_EXTENDED_MASK (~((1ULL << PERF_REG_X86_XMM0) - 1))
|
||||
|
||||
#endif /* _ASM_X86_PERF_REGS_H */
|
||||
|
@ -1464,7 +1464,8 @@ static void apic_pending_intr_clear(void)
|
||||
if (queued) {
|
||||
if (boot_cpu_has(X86_FEATURE_TSC) && cpu_khz) {
|
||||
ntsc = rdtsc();
|
||||
max_loops = (cpu_khz << 10) - (ntsc - tsc);
|
||||
max_loops = (long long)cpu_khz << 10;
|
||||
max_loops -= ntsc - tsc;
|
||||
} else {
|
||||
max_loops--;
|
||||
}
|
||||
|
@ -835,6 +835,16 @@ static enum ssb_mitigation __init __ssb_select_mitigation(void)
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* If SSBD is controlled by the SPEC_CTRL MSR, then set the proper
|
||||
* bit in the mask to allow guests to use the mitigation even in the
|
||||
* case where the host does not enable it.
|
||||
*/
|
||||
if (static_cpu_has(X86_FEATURE_SPEC_CTRL_SSBD) ||
|
||||
static_cpu_has(X86_FEATURE_AMD_SSBD)) {
|
||||
x86_spec_ctrl_mask |= SPEC_CTRL_SSBD;
|
||||
}
|
||||
|
||||
/*
|
||||
* We have three CPU feature flags that are in play here:
|
||||
* - X86_BUG_SPEC_STORE_BYPASS - CPU is susceptible.
|
||||
@ -852,7 +862,6 @@ static enum ssb_mitigation __init __ssb_select_mitigation(void)
|
||||
x86_amd_ssb_disable();
|
||||
} else {
|
||||
x86_spec_ctrl_base |= SPEC_CTRL_SSBD;
|
||||
x86_spec_ctrl_mask |= SPEC_CTRL_SSBD;
|
||||
wrmsrl(MSR_IA32_SPEC_CTRL, x86_spec_ctrl_base);
|
||||
}
|
||||
}
|
||||
|
@ -789,13 +789,16 @@ static struct syscore_ops mc_syscore_ops = {
|
||||
.resume = mc_bp_resume,
|
||||
};
|
||||
|
||||
static int mc_cpu_online(unsigned int cpu)
|
||||
static int mc_cpu_starting(unsigned int cpu)
|
||||
{
|
||||
struct device *dev;
|
||||
|
||||
dev = get_cpu_device(cpu);
|
||||
microcode_update_cpu(cpu);
|
||||
pr_debug("CPU%d added\n", cpu);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int mc_cpu_online(unsigned int cpu)
|
||||
{
|
||||
struct device *dev = get_cpu_device(cpu);
|
||||
|
||||
if (sysfs_create_group(&dev->kobj, &mc_attr_group))
|
||||
pr_err("Failed to create group for CPU%d\n", cpu);
|
||||
@ -872,7 +875,9 @@ int __init microcode_init(void)
|
||||
goto out_ucode_group;
|
||||
|
||||
register_syscore_ops(&mc_syscore_ops);
|
||||
cpuhp_setup_state_nocalls(CPUHP_AP_MICROCODE_LOADER, "x86/microcode:online",
|
||||
cpuhp_setup_state_nocalls(CPUHP_AP_MICROCODE_LOADER, "x86/microcode:starting",
|
||||
mc_cpu_starting, NULL);
|
||||
cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN, "x86/microcode:online",
|
||||
mc_cpu_online, mc_cpu_down_prep);
|
||||
|
||||
pr_info("Microcode Update Driver: v%s.", DRIVER_VERSION);
|
||||
|
@ -796,8 +796,12 @@ static int rdt_bit_usage_show(struct kernfs_open_file *of,
|
||||
struct seq_file *seq, void *v)
|
||||
{
|
||||
struct rdt_resource *r = of->kn->parent->priv;
|
||||
u32 sw_shareable = 0, hw_shareable = 0;
|
||||
u32 exclusive = 0, pseudo_locked = 0;
|
||||
/*
|
||||
* Use unsigned long even though only 32 bits are used to ensure
|
||||
* test_bit() is used safely.
|
||||
*/
|
||||
unsigned long sw_shareable = 0, hw_shareable = 0;
|
||||
unsigned long exclusive = 0, pseudo_locked = 0;
|
||||
struct rdt_domain *dom;
|
||||
int i, hwb, swb, excl, psl;
|
||||
enum rdtgrp_mode mode;
|
||||
@ -842,10 +846,10 @@ static int rdt_bit_usage_show(struct kernfs_open_file *of,
|
||||
}
|
||||
for (i = r->cache.cbm_len - 1; i >= 0; i--) {
|
||||
pseudo_locked = dom->plr ? dom->plr->cbm : 0;
|
||||
hwb = test_bit(i, (unsigned long *)&hw_shareable);
|
||||
swb = test_bit(i, (unsigned long *)&sw_shareable);
|
||||
excl = test_bit(i, (unsigned long *)&exclusive);
|
||||
psl = test_bit(i, (unsigned long *)&pseudo_locked);
|
||||
hwb = test_bit(i, &hw_shareable);
|
||||
swb = test_bit(i, &sw_shareable);
|
||||
excl = test_bit(i, &exclusive);
|
||||
psl = test_bit(i, &pseudo_locked);
|
||||
if (hwb && swb)
|
||||
seq_putc(seq, 'X');
|
||||
else if (hwb && !swb)
|
||||
@ -2486,26 +2490,19 @@ static int mkdir_mondata_all(struct kernfs_node *parent_kn,
|
||||
*/
|
||||
static void cbm_ensure_valid(u32 *_val, struct rdt_resource *r)
|
||||
{
|
||||
/*
|
||||
* Convert the u32 _val to an unsigned long required by all the bit
|
||||
* operations within this function. No more than 32 bits of this
|
||||
* converted value can be accessed because all bit operations are
|
||||
* additionally provided with cbm_len that is initialized during
|
||||
* hardware enumeration using five bits from the EAX register and
|
||||
* thus never can exceed 32 bits.
|
||||
*/
|
||||
unsigned long *val = (unsigned long *)_val;
|
||||
unsigned long val = *_val;
|
||||
unsigned int cbm_len = r->cache.cbm_len;
|
||||
unsigned long first_bit, zero_bit;
|
||||
|
||||
if (*val == 0)
|
||||
if (val == 0)
|
||||
return;
|
||||
|
||||
first_bit = find_first_bit(val, cbm_len);
|
||||
zero_bit = find_next_zero_bit(val, cbm_len, first_bit);
|
||||
first_bit = find_first_bit(&val, cbm_len);
|
||||
zero_bit = find_next_zero_bit(&val, cbm_len, first_bit);
|
||||
|
||||
/* Clear any remaining bits to ensure contiguous region */
|
||||
bitmap_clear(val, zero_bit, cbm_len - zero_bit);
|
||||
bitmap_clear(&val, zero_bit, cbm_len - zero_bit);
|
||||
*_val = (u32)val;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -184,24 +184,25 @@ unsigned long __head __startup_64(unsigned long physaddr,
|
||||
pgtable_flags = _KERNPG_TABLE_NOENC + sme_get_me_mask();
|
||||
|
||||
if (la57) {
|
||||
p4d = fixup_pointer(early_dynamic_pgts[next_early_pgt++], physaddr);
|
||||
p4d = fixup_pointer(early_dynamic_pgts[(*next_pgt_ptr)++],
|
||||
physaddr);
|
||||
|
||||
i = (physaddr >> PGDIR_SHIFT) % PTRS_PER_PGD;
|
||||
pgd[i + 0] = (pgdval_t)p4d + pgtable_flags;
|
||||
pgd[i + 1] = (pgdval_t)p4d + pgtable_flags;
|
||||
|
||||
i = (physaddr >> P4D_SHIFT) % PTRS_PER_P4D;
|
||||
p4d[i + 0] = (pgdval_t)pud + pgtable_flags;
|
||||
p4d[i + 1] = (pgdval_t)pud + pgtable_flags;
|
||||
i = physaddr >> P4D_SHIFT;
|
||||
p4d[(i + 0) % PTRS_PER_P4D] = (pgdval_t)pud + pgtable_flags;
|
||||
p4d[(i + 1) % PTRS_PER_P4D] = (pgdval_t)pud + pgtable_flags;
|
||||
} else {
|
||||
i = (physaddr >> PGDIR_SHIFT) % PTRS_PER_PGD;
|
||||
pgd[i + 0] = (pgdval_t)pud + pgtable_flags;
|
||||
pgd[i + 1] = (pgdval_t)pud + pgtable_flags;
|
||||
}
|
||||
|
||||
i = (physaddr >> PUD_SHIFT) % PTRS_PER_PUD;
|
||||
pud[i + 0] = (pudval_t)pmd + pgtable_flags;
|
||||
pud[i + 1] = (pudval_t)pmd + pgtable_flags;
|
||||
i = physaddr >> PUD_SHIFT;
|
||||
pud[(i + 0) % PTRS_PER_PUD] = (pudval_t)pmd + pgtable_flags;
|
||||
pud[(i + 1) % PTRS_PER_PUD] = (pudval_t)pmd + pgtable_flags;
|
||||
|
||||
pmd_entry = __PAGE_KERNEL_LARGE_EXEC & ~_PAGE_GLOBAL;
|
||||
/* Filter out unsupported __PAGE_KERNEL_* bits: */
|
||||
@ -211,8 +212,9 @@ unsigned long __head __startup_64(unsigned long physaddr,
|
||||
pmd_entry += physaddr;
|
||||
|
||||
for (i = 0; i < DIV_ROUND_UP(_end - _text, PMD_SIZE); i++) {
|
||||
int idx = i + (physaddr >> PMD_SHIFT) % PTRS_PER_PMD;
|
||||
pmd[idx] = pmd_entry + i * PMD_SIZE;
|
||||
int idx = i + (physaddr >> PMD_SHIFT);
|
||||
|
||||
pmd[idx % PTRS_PER_PMD] = pmd_entry + i * PMD_SIZE;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -74,6 +74,9 @@ u64 perf_reg_value(struct pt_regs *regs, int idx)
|
||||
return regs_get_register(regs, pt_regs_offset[idx]);
|
||||
}
|
||||
|
||||
#define PERF_REG_X86_RESERVED (((1ULL << PERF_REG_X86_XMM0) - 1) & \
|
||||
~((1ULL << PERF_REG_X86_MAX) - 1))
|
||||
|
||||
#ifdef CONFIG_X86_32
|
||||
#define REG_NOSUPPORT ((1ULL << PERF_REG_X86_R8) | \
|
||||
(1ULL << PERF_REG_X86_R9) | \
|
||||
@ -86,7 +89,7 @@ u64 perf_reg_value(struct pt_regs *regs, int idx)
|
||||
|
||||
int perf_reg_validate(u64 mask)
|
||||
{
|
||||
if (!mask || (mask & REG_NOSUPPORT))
|
||||
if (!mask || (mask & (REG_NOSUPPORT | PERF_REG_X86_RESERVED)))
|
||||
return -EINVAL;
|
||||
|
||||
return 0;
|
||||
@ -112,7 +115,7 @@ void perf_get_regs_user(struct perf_regs *regs_user,
|
||||
|
||||
int perf_reg_validate(u64 mask)
|
||||
{
|
||||
if (!mask || (mask & REG_NOSUPPORT))
|
||||
if (!mask || (mask & (REG_NOSUPPORT | PERF_REG_X86_RESERVED)))
|
||||
return -EINVAL;
|
||||
|
||||
return 0;
|
||||
|
@ -82,9 +82,9 @@ static struct orc_entry *orc_find(unsigned long ip);
|
||||
* But they are copies of the ftrace entries that are static and
|
||||
* defined in ftrace_*.S, which do have orc entries.
|
||||
*
|
||||
* If the undwinder comes across a ftrace trampoline, then find the
|
||||
* If the unwinder comes across a ftrace trampoline, then find the
|
||||
* ftrace function that was used to create it, and use that ftrace
|
||||
* function's orc entrie, as the placement of the return code in
|
||||
* function's orc entry, as the placement of the return code in
|
||||
* the stack will be identical.
|
||||
*/
|
||||
static struct orc_entry *orc_ftrace_find(unsigned long ip)
|
||||
@ -128,6 +128,16 @@ static struct orc_entry null_orc_entry = {
|
||||
.type = ORC_TYPE_CALL
|
||||
};
|
||||
|
||||
/* Fake frame pointer entry -- used as a fallback for generated code */
|
||||
static struct orc_entry orc_fp_entry = {
|
||||
.type = ORC_TYPE_CALL,
|
||||
.sp_reg = ORC_REG_BP,
|
||||
.sp_offset = 16,
|
||||
.bp_reg = ORC_REG_PREV_SP,
|
||||
.bp_offset = -16,
|
||||
.end = 0,
|
||||
};
|
||||
|
||||
static struct orc_entry *orc_find(unsigned long ip)
|
||||
{
|
||||
static struct orc_entry *orc;
|
||||
@ -392,8 +402,16 @@ bool unwind_next_frame(struct unwind_state *state)
|
||||
* calls and calls to noreturn functions.
|
||||
*/
|
||||
orc = orc_find(state->signal ? state->ip : state->ip - 1);
|
||||
if (!orc)
|
||||
goto err;
|
||||
if (!orc) {
|
||||
/*
|
||||
* As a fallback, try to assume this code uses a frame pointer.
|
||||
* This is useful for generated code, like BPF, which ORC
|
||||
* doesn't know about. This is just a guess, so the rest of
|
||||
* the unwind is no longer considered reliable.
|
||||
*/
|
||||
orc = &orc_fp_entry;
|
||||
state->error = true;
|
||||
}
|
||||
|
||||
/* End-of-stack check for kernel threads: */
|
||||
if (orc->sp_reg == ORC_REG_UNDEFINED) {
|
||||
|
@ -671,23 +671,25 @@ static unsigned long __meminit
|
||||
phys_p4d_init(p4d_t *p4d_page, unsigned long paddr, unsigned long paddr_end,
|
||||
unsigned long page_size_mask, bool init)
|
||||
{
|
||||
unsigned long paddr_next, paddr_last = paddr_end;
|
||||
unsigned long vaddr = (unsigned long)__va(paddr);
|
||||
int i = p4d_index(vaddr);
|
||||
unsigned long vaddr, vaddr_end, vaddr_next, paddr_next, paddr_last;
|
||||
|
||||
paddr_last = paddr_end;
|
||||
vaddr = (unsigned long)__va(paddr);
|
||||
vaddr_end = (unsigned long)__va(paddr_end);
|
||||
|
||||
if (!pgtable_l5_enabled())
|
||||
return phys_pud_init((pud_t *) p4d_page, paddr, paddr_end,
|
||||
page_size_mask, init);
|
||||
|
||||
for (; i < PTRS_PER_P4D; i++, paddr = paddr_next) {
|
||||
p4d_t *p4d;
|
||||
for (; vaddr < vaddr_end; vaddr = vaddr_next) {
|
||||
p4d_t *p4d = p4d_page + p4d_index(vaddr);
|
||||
pud_t *pud;
|
||||
|
||||
vaddr = (unsigned long)__va(paddr);
|
||||
p4d = p4d_page + p4d_index(vaddr);
|
||||
paddr_next = (paddr & P4D_MASK) + P4D_SIZE;
|
||||
vaddr_next = (vaddr & P4D_MASK) + P4D_SIZE;
|
||||
paddr = __pa(vaddr);
|
||||
|
||||
if (paddr >= paddr_end) {
|
||||
paddr_next = __pa(vaddr_next);
|
||||
if (!after_bootmem &&
|
||||
!e820__mapped_any(paddr & P4D_MASK, paddr_next,
|
||||
E820_TYPE_RAM) &&
|
||||
@ -699,13 +701,13 @@ phys_p4d_init(p4d_t *p4d_page, unsigned long paddr, unsigned long paddr_end,
|
||||
|
||||
if (!p4d_none(*p4d)) {
|
||||
pud = pud_offset(p4d, 0);
|
||||
paddr_last = phys_pud_init(pud, paddr, paddr_end,
|
||||
page_size_mask, init);
|
||||
paddr_last = phys_pud_init(pud, paddr, __pa(vaddr_end),
|
||||
page_size_mask, init);
|
||||
continue;
|
||||
}
|
||||
|
||||
pud = alloc_low_page();
|
||||
paddr_last = phys_pud_init(pud, paddr, paddr_end,
|
||||
paddr_last = phys_pud_init(pud, paddr, __pa(vaddr_end),
|
||||
page_size_mask, init);
|
||||
|
||||
spin_lock(&init_mm.page_table_lock);
|
||||
|
@ -728,7 +728,7 @@ void efi_recover_from_page_fault(unsigned long phys_addr)
|
||||
* Address range 0x0000 - 0x0fff is always mapped in the efi_pgd, so
|
||||
* page faulting on these addresses isn't expected.
|
||||
*/
|
||||
if (phys_addr >= 0x0000 && phys_addr <= 0x0fff)
|
||||
if (phys_addr <= 0x0fff)
|
||||
return;
|
||||
|
||||
/*
|
||||
|
@ -240,7 +240,7 @@ static struct kmem_cache *bfq_pool;
|
||||
* containing only random (seeky) I/O are prevented from being tagged
|
||||
* as soft real-time.
|
||||
*/
|
||||
#define BFQQ_TOTALLY_SEEKY(bfqq) (bfqq->seek_history & -1)
|
||||
#define BFQQ_TOTALLY_SEEKY(bfqq) (bfqq->seek_history == -1)
|
||||
|
||||
/* Min number of samples required to perform peak-rate update */
|
||||
#define BFQ_RATE_MIN_SAMPLES 32
|
||||
|
@ -52,8 +52,9 @@ static const struct fb_var_screeninfo cfag12864bfb_var = {
|
||||
|
||||
static int cfag12864bfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
|
||||
{
|
||||
return vm_insert_page(vma, vma->vm_start,
|
||||
virt_to_page(cfag12864b_buffer));
|
||||
struct page *pages = virt_to_page(cfag12864b_buffer);
|
||||
|
||||
return vm_map_pages_zero(vma, &pages, 1);
|
||||
}
|
||||
|
||||
static struct fb_ops cfag12864bfb_ops = {
|
||||
|
@ -223,9 +223,9 @@ static const struct backlight_ops ht16k33_bl_ops = {
|
||||
static int ht16k33_mmap(struct fb_info *info, struct vm_area_struct *vma)
|
||||
{
|
||||
struct ht16k33_priv *priv = info->par;
|
||||
struct page *pages = virt_to_page(priv->fbdev.buffer);
|
||||
|
||||
return vm_insert_page(vma, vma->vm_start,
|
||||
virt_to_page(priv->fbdev.buffer));
|
||||
return vm_map_pages_zero(vma, &pages, 1);
|
||||
}
|
||||
|
||||
static struct fb_ops ht16k33_fb_ops = {
|
||||
|
@ -368,7 +368,7 @@ static struct clk_core *clk_core_get(struct clk_core *core, u8 p_index)
|
||||
const char *dev_id = dev ? dev_name(dev) : NULL;
|
||||
struct device_node *np = core->of_node;
|
||||
|
||||
if (np && index >= 0)
|
||||
if (np && (name || index >= 0))
|
||||
hw = of_clk_get_hw(np, index, name);
|
||||
|
||||
/*
|
||||
|
@ -2734,8 +2734,8 @@ static struct clk_hw_onecell_data g12a_hw_onecell_data = {
|
||||
[CLKID_MALI_1_DIV] = &g12a_mali_1_div.hw,
|
||||
[CLKID_MALI_1] = &g12a_mali_1.hw,
|
||||
[CLKID_MALI] = &g12a_mali.hw,
|
||||
[CLKID_MPLL_5OM_DIV] = &g12a_mpll_50m_div.hw,
|
||||
[CLKID_MPLL_5OM] = &g12a_mpll_50m.hw,
|
||||
[CLKID_MPLL_50M_DIV] = &g12a_mpll_50m_div.hw,
|
||||
[CLKID_MPLL_50M] = &g12a_mpll_50m.hw,
|
||||
[CLKID_SYS_PLL_DIV16_EN] = &g12a_sys_pll_div16_en.hw,
|
||||
[CLKID_SYS_PLL_DIV16] = &g12a_sys_pll_div16.hw,
|
||||
[CLKID_CPU_CLK_DYN0_SEL] = &g12a_cpu_clk_premux0.hw,
|
||||
|
@ -166,7 +166,7 @@
|
||||
#define CLKID_HDMI_DIV 167
|
||||
#define CLKID_MALI_0_DIV 170
|
||||
#define CLKID_MALI_1_DIV 173
|
||||
#define CLKID_MPLL_5OM_DIV 176
|
||||
#define CLKID_MPLL_50M_DIV 176
|
||||
#define CLKID_SYS_PLL_DIV16_EN 178
|
||||
#define CLKID_SYS_PLL_DIV16 179
|
||||
#define CLKID_CPU_CLK_DYN0_SEL 180
|
||||
|
@ -1761,7 +1761,7 @@ static struct clk_regmap meson8m2_gp_pll = {
|
||||
},
|
||||
};
|
||||
|
||||
static const char * const mmeson8b_vpu_0_1_parent_names[] = {
|
||||
static const char * const meson8b_vpu_0_1_parent_names[] = {
|
||||
"fclk_div4", "fclk_div3", "fclk_div5", "fclk_div7"
|
||||
};
|
||||
|
||||
@ -1778,8 +1778,8 @@ static struct clk_regmap meson8b_vpu_0_sel = {
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "vpu_0_sel",
|
||||
.ops = &clk_regmap_mux_ops,
|
||||
.parent_names = mmeson8b_vpu_0_1_parent_names,
|
||||
.num_parents = ARRAY_SIZE(mmeson8b_vpu_0_1_parent_names),
|
||||
.parent_names = meson8b_vpu_0_1_parent_names,
|
||||
.num_parents = ARRAY_SIZE(meson8b_vpu_0_1_parent_names),
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
},
|
||||
};
|
||||
@ -1837,8 +1837,8 @@ static struct clk_regmap meson8b_vpu_1_sel = {
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "vpu_1_sel",
|
||||
.ops = &clk_regmap_mux_ops,
|
||||
.parent_names = mmeson8b_vpu_0_1_parent_names,
|
||||
.num_parents = ARRAY_SIZE(mmeson8b_vpu_0_1_parent_names),
|
||||
.parent_names = meson8b_vpu_0_1_parent_names,
|
||||
.num_parents = ARRAY_SIZE(meson8b_vpu_0_1_parent_names),
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
},
|
||||
};
|
||||
|
@ -103,9 +103,9 @@ static const struct stratix10_perip_cnt_clock s10_main_perip_cnt_clks[] = {
|
||||
{ STRATIX10_NOC_CLK, "noc_clk", NULL, noc_mux, ARRAY_SIZE(noc_mux),
|
||||
0, 0, 0, 0x3C, 1},
|
||||
{ STRATIX10_EMAC_A_FREE_CLK, "emaca_free_clk", NULL, emaca_free_mux, ARRAY_SIZE(emaca_free_mux),
|
||||
0, 0, 4, 0xB0, 0},
|
||||
0, 0, 2, 0xB0, 0},
|
||||
{ STRATIX10_EMAC_B_FREE_CLK, "emacb_free_clk", NULL, emacb_free_mux, ARRAY_SIZE(emacb_free_mux),
|
||||
0, 0, 4, 0xB0, 1},
|
||||
0, 0, 2, 0xB0, 1},
|
||||
{ STRATIX10_EMAC_PTP_FREE_CLK, "emac_ptp_free_clk", NULL, emac_ptp_free_mux,
|
||||
ARRAY_SIZE(emac_ptp_free_mux), 0, 0, 4, 0xB0, 2},
|
||||
{ STRATIX10_GPIO_DB_FREE_CLK, "gpio_db_free_clk", NULL, gpio_db_free_mux,
|
||||
|
@ -3366,6 +3366,8 @@ static struct tegra_clk_init_table init_table[] __initdata = {
|
||||
{ TEGRA210_CLK_I2S3_SYNC, TEGRA210_CLK_CLK_MAX, 24576000, 0 },
|
||||
{ TEGRA210_CLK_I2S4_SYNC, TEGRA210_CLK_CLK_MAX, 24576000, 0 },
|
||||
{ TEGRA210_CLK_VIMCLK_SYNC, TEGRA210_CLK_CLK_MAX, 24576000, 0 },
|
||||
{ TEGRA210_CLK_HDA, TEGRA210_CLK_PLL_P, 51000000, 0 },
|
||||
{ TEGRA210_CLK_HDA2CODEC_2X, TEGRA210_CLK_PLL_P, 48000000, 0 },
|
||||
/* This MUST be the last entry. */
|
||||
{ TEGRA210_CLK_CLK_MAX, TEGRA210_CLK_CLK_MAX, 0, 0 },
|
||||
};
|
||||
|
@ -229,6 +229,7 @@ static struct clk_hw *_ti_omap4_clkctrl_xlate(struct of_phandle_args *clkspec,
|
||||
{
|
||||
struct omap_clkctrl_provider *provider = data;
|
||||
struct omap_clkctrl_clk *entry;
|
||||
bool found = false;
|
||||
|
||||
if (clkspec->args_count != 2)
|
||||
return ERR_PTR(-EINVAL);
|
||||
@ -238,11 +239,13 @@ static struct clk_hw *_ti_omap4_clkctrl_xlate(struct of_phandle_args *clkspec,
|
||||
|
||||
list_for_each_entry(entry, &provider->clocks, node) {
|
||||
if (entry->reg_offset == clkspec->args[0] &&
|
||||
entry->bit_offset == clkspec->args[1])
|
||||
entry->bit_offset == clkspec->args[1]) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!entry)
|
||||
if (!found)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
return entry->clk;
|
||||
|
@ -47,11 +47,6 @@ void __init efi_bgrt_init(struct acpi_table_header *table)
|
||||
bgrt->version);
|
||||
goto out;
|
||||
}
|
||||
if (bgrt->status & 0xfe) {
|
||||
pr_notice("Ignoring BGRT: reserved status bits are non-zero %u\n",
|
||||
bgrt->status);
|
||||
goto out;
|
||||
}
|
||||
if (bgrt->image_type != 0) {
|
||||
pr_notice("Ignoring BGRT: invalid image type %u (expected 0)\n",
|
||||
bgrt->image_type);
|
||||
|
@ -1009,14 +1009,16 @@ int __ref efi_mem_reserve_persistent(phys_addr_t addr, u64 size)
|
||||
|
||||
/* first try to find a slot in an existing linked list entry */
|
||||
for (prsv = efi_memreserve_root->next; prsv; prsv = rsv->next) {
|
||||
rsv = __va(prsv);
|
||||
rsv = memremap(prsv, sizeof(*rsv), MEMREMAP_WB);
|
||||
index = atomic_fetch_add_unless(&rsv->count, 1, rsv->size);
|
||||
if (index < rsv->size) {
|
||||
rsv->entry[index].base = addr;
|
||||
rsv->entry[index].size = size;
|
||||
|
||||
memunmap(rsv);
|
||||
return 0;
|
||||
}
|
||||
memunmap(rsv);
|
||||
}
|
||||
|
||||
/* no slot found - allocate a new linked list entry */
|
||||
@ -1024,7 +1026,13 @@ int __ref efi_mem_reserve_persistent(phys_addr_t addr, u64 size)
|
||||
if (!rsv)
|
||||
return -ENOMEM;
|
||||
|
||||
rsv->size = EFI_MEMRESERVE_COUNT(PAGE_SIZE);
|
||||
/*
|
||||
* The memremap() call above assumes that a linux_efi_memreserve entry
|
||||
* never crosses a page boundary, so let's ensure that this remains true
|
||||
* even when kexec'ing a 4k pages kernel from a >4k pages kernel, by
|
||||
* using SZ_4K explicitly in the size calculation below.
|
||||
*/
|
||||
rsv->size = EFI_MEMRESERVE_COUNT(SZ_4K);
|
||||
atomic_set(&rsv->count, 1);
|
||||
rsv->entry[0].base = addr;
|
||||
rsv->entry[0].size = size;
|
||||
|
@ -43,11 +43,13 @@ static int efibc_set_variable(const char *name, const char *value)
|
||||
efibc_str_to_str16(value, (efi_char16_t *)entry->var.Data);
|
||||
memcpy(&entry->var.VendorGuid, &guid, sizeof(guid));
|
||||
|
||||
ret = efivar_entry_set(entry,
|
||||
EFI_VARIABLE_NON_VOLATILE
|
||||
| EFI_VARIABLE_BOOTSERVICE_ACCESS
|
||||
| EFI_VARIABLE_RUNTIME_ACCESS,
|
||||
size, entry->var.Data, NULL);
|
||||
ret = efivar_entry_set_safe(entry->var.VariableName,
|
||||
entry->var.VendorGuid,
|
||||
EFI_VARIABLE_NON_VOLATILE
|
||||
| EFI_VARIABLE_BOOTSERVICE_ACCESS
|
||||
| EFI_VARIABLE_RUNTIME_ACCESS,
|
||||
false, size, entry->var.Data);
|
||||
|
||||
if (ret)
|
||||
pr_err("failed to set %s EFI variable: 0x%x\n",
|
||||
name, ret);
|
||||
|
@ -80,6 +80,7 @@
|
||||
#define HID_DEVICE_ID_ALPS_U1_DUAL_3BTN_PTP 0x1220
|
||||
#define HID_DEVICE_ID_ALPS_U1 0x1215
|
||||
#define HID_DEVICE_ID_ALPS_T4_BTNLESS 0x120C
|
||||
#define HID_DEVICE_ID_ALPS_1222 0x1222
|
||||
|
||||
|
||||
#define USB_VENDOR_ID_AMI 0x046b
|
||||
@ -269,6 +270,7 @@
|
||||
#define USB_DEVICE_ID_CHICONY_MULTI_TOUCH 0xb19d
|
||||
#define USB_DEVICE_ID_CHICONY_WIRELESS 0x0618
|
||||
#define USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE 0x1053
|
||||
#define USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE2 0x0939
|
||||
#define USB_DEVICE_ID_CHICONY_WIRELESS2 0x1123
|
||||
#define USB_DEVICE_ID_ASUS_AK1D 0x1125
|
||||
#define USB_DEVICE_ID_CHICONY_TOSHIBA_WT10A 0x1408
|
||||
@ -569,6 +571,7 @@
|
||||
|
||||
#define USB_VENDOR_ID_HUION 0x256c
|
||||
#define USB_DEVICE_ID_HUION_TABLET 0x006e
|
||||
#define USB_DEVICE_ID_HUION_HS64 0x006d
|
||||
|
||||
#define USB_VENDOR_ID_IBM 0x04b3
|
||||
#define USB_DEVICE_ID_IBM_SCROLLPOINT_III 0x3100
|
||||
|
@ -30,6 +30,7 @@
|
||||
|
||||
#define REPORT_ID_HIDPP_SHORT 0x10
|
||||
#define REPORT_ID_HIDPP_LONG 0x11
|
||||
#define REPORT_ID_HIDPP_VERY_LONG 0x12
|
||||
|
||||
#define HIDPP_REPORT_SHORT_LENGTH 7
|
||||
#define HIDPP_REPORT_LONG_LENGTH 20
|
||||
@ -1242,7 +1243,8 @@ static int logi_dj_ll_raw_request(struct hid_device *hid,
|
||||
int ret;
|
||||
|
||||
if ((buf[0] == REPORT_ID_HIDPP_SHORT) ||
|
||||
(buf[0] == REPORT_ID_HIDPP_LONG)) {
|
||||
(buf[0] == REPORT_ID_HIDPP_LONG) ||
|
||||
(buf[0] == REPORT_ID_HIDPP_VERY_LONG)) {
|
||||
if (count < 2)
|
||||
return -EINVAL;
|
||||
|
||||
|
@ -1776,6 +1776,10 @@ static const struct hid_device_id mt_devices[] = {
|
||||
HID_DEVICE(BUS_I2C, HID_GROUP_MULTITOUCH_WIN_8,
|
||||
USB_VENDOR_ID_ALPS_JP,
|
||||
HID_DEVICE_ID_ALPS_U1_DUAL_3BTN_PTP) },
|
||||
{ .driver_data = MT_CLS_WIN_8_DUAL,
|
||||
HID_DEVICE(BUS_I2C, HID_GROUP_MULTITOUCH_WIN_8,
|
||||
USB_VENDOR_ID_ALPS_JP,
|
||||
HID_DEVICE_ID_ALPS_1222) },
|
||||
|
||||
/* Lenovo X1 TAB Gen 2 */
|
||||
{ .driver_data = MT_CLS_WIN_8_DUAL,
|
||||
|
@ -42,6 +42,7 @@ static const struct hid_device_id hid_quirks[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_UC100KM), HID_QUIRK_NOGET },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_MULTI_TOUCH), HID_QUIRK_MULTI_INPUT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE2), HID_QUIRK_ALWAYS_POLL },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS), HID_QUIRK_MULTI_INPUT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHIC, USB_DEVICE_ID_CHIC_GAMEPAD), HID_QUIRK_BADPAD },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_3AXIS_5BUTTON_STICK), HID_QUIRK_NOGET },
|
||||
|
@ -369,6 +369,8 @@ static const struct hid_device_id uclogic_devices[] = {
|
||||
USB_DEVICE_ID_UCLOGIC_TABLET_TWHA60) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_HUION,
|
||||
USB_DEVICE_ID_HUION_TABLET) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_HUION,
|
||||
USB_DEVICE_ID_HUION_HS64) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC,
|
||||
USB_DEVICE_ID_HUION_TABLET) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC,
|
||||
|
@ -977,6 +977,8 @@ int uclogic_params_init(struct uclogic_params *params,
|
||||
/* FALL THROUGH */
|
||||
case VID_PID(USB_VENDOR_ID_HUION,
|
||||
USB_DEVICE_ID_HUION_TABLET):
|
||||
case VID_PID(USB_VENDOR_ID_HUION,
|
||||
USB_DEVICE_ID_HUION_HS64):
|
||||
case VID_PID(USB_VENDOR_ID_UCLOGIC,
|
||||
USB_DEVICE_ID_HUION_TABLET):
|
||||
case VID_PID(USB_VENDOR_ID_UCLOGIC,
|
||||
|
@ -816,9 +816,9 @@ static int load_fw_from_host(struct ishtp_cl_data *client_data)
|
||||
goto end_err_fw_release;
|
||||
|
||||
release_firmware(fw);
|
||||
kfree(filename);
|
||||
dev_info(cl_data_to_dev(client_data), "ISH firmware %s loaded\n",
|
||||
filename);
|
||||
kfree(filename);
|
||||
return 0;
|
||||
|
||||
end_err_fw_release:
|
||||
|
@ -891,7 +891,7 @@ static int hid_ishtp_cl_reset(struct ishtp_cl_device *cl_device)
|
||||
*/
|
||||
static int hid_ishtp_cl_suspend(struct device *device)
|
||||
{
|
||||
struct ishtp_cl_device *cl_device = dev_get_drvdata(device);
|
||||
struct ishtp_cl_device *cl_device = ishtp_dev_to_cl_device(device);
|
||||
struct ishtp_cl *hid_ishtp_cl = ishtp_get_drvdata(cl_device);
|
||||
struct ishtp_cl_data *client_data = ishtp_get_client_data(hid_ishtp_cl);
|
||||
|
||||
@ -912,7 +912,7 @@ static int hid_ishtp_cl_suspend(struct device *device)
|
||||
*/
|
||||
static int hid_ishtp_cl_resume(struct device *device)
|
||||
{
|
||||
struct ishtp_cl_device *cl_device = dev_get_drvdata(device);
|
||||
struct ishtp_cl_device *cl_device = ishtp_dev_to_cl_device(device);
|
||||
struct ishtp_cl *hid_ishtp_cl = ishtp_get_drvdata(cl_device);
|
||||
struct ishtp_cl_data *client_data = ishtp_get_client_data(hid_ishtp_cl);
|
||||
|
||||
|
@ -471,7 +471,6 @@ static struct ishtp_cl_device *ishtp_bus_add_device(struct ishtp_device *dev,
|
||||
}
|
||||
|
||||
ishtp_device_ready = true;
|
||||
dev_set_drvdata(&device->dev, device);
|
||||
|
||||
return device;
|
||||
}
|
||||
@ -639,6 +638,20 @@ void *ishtp_get_drvdata(struct ishtp_cl_device *cl_device)
|
||||
}
|
||||
EXPORT_SYMBOL(ishtp_get_drvdata);
|
||||
|
||||
/**
|
||||
* ishtp_dev_to_cl_device() - get ishtp_cl_device instance from device instance
|
||||
* @device: device instance
|
||||
*
|
||||
* Get ish_cl_device instance which embeds device instance in it.
|
||||
*
|
||||
* Return: pointer to ishtp_cl_device instance
|
||||
*/
|
||||
struct ishtp_cl_device *ishtp_dev_to_cl_device(struct device *device)
|
||||
{
|
||||
return to_ishtp_cl_device(device);
|
||||
}
|
||||
EXPORT_SYMBOL(ishtp_dev_to_cl_device);
|
||||
|
||||
/**
|
||||
* ishtp_bus_new_client() - Create a new client
|
||||
* @dev: ISHTP device instance
|
||||
|
@ -89,8 +89,19 @@ static int csky_irq_set_affinity(struct irq_data *d,
|
||||
if (cpu >= nr_cpu_ids)
|
||||
return -EINVAL;
|
||||
|
||||
/* Enable interrupt destination */
|
||||
cpu |= BIT(31);
|
||||
/*
|
||||
* The csky,mpintc could support auto irq deliver, but it only
|
||||
* could deliver external irq to one cpu or all cpus. So it
|
||||
* doesn't support deliver external irq to a group of cpus
|
||||
* with cpu_mask.
|
||||
* SO we only use auto deliver mode when affinity mask_val is
|
||||
* equal to cpu_present_mask.
|
||||
*
|
||||
*/
|
||||
if (cpumask_equal(mask_val, cpu_present_mask))
|
||||
cpu = 0;
|
||||
else
|
||||
cpu |= BIT(31);
|
||||
|
||||
writel_relaxed(cpu, INTCG_base + INTCG_CIDSTR + offset);
|
||||
|
||||
|
@ -733,32 +733,43 @@ static void its_flush_cmd(struct its_node *its, struct its_cmd_block *cmd)
|
||||
}
|
||||
|
||||
static int its_wait_for_range_completion(struct its_node *its,
|
||||
struct its_cmd_block *from,
|
||||
u64 prev_idx,
|
||||
struct its_cmd_block *to)
|
||||
{
|
||||
u64 rd_idx, from_idx, to_idx;
|
||||
u64 rd_idx, to_idx, linear_idx;
|
||||
u32 count = 1000000; /* 1s! */
|
||||
|
||||
from_idx = its_cmd_ptr_to_offset(its, from);
|
||||
/* Linearize to_idx if the command set has wrapped around */
|
||||
to_idx = its_cmd_ptr_to_offset(its, to);
|
||||
if (to_idx < prev_idx)
|
||||
to_idx += ITS_CMD_QUEUE_SZ;
|
||||
|
||||
linear_idx = prev_idx;
|
||||
|
||||
while (1) {
|
||||
s64 delta;
|
||||
|
||||
rd_idx = readl_relaxed(its->base + GITS_CREADR);
|
||||
|
||||
/* Direct case */
|
||||
if (from_idx < to_idx && rd_idx >= to_idx)
|
||||
break;
|
||||
/*
|
||||
* Compute the read pointer progress, taking the
|
||||
* potential wrap-around into account.
|
||||
*/
|
||||
delta = rd_idx - prev_idx;
|
||||
if (rd_idx < prev_idx)
|
||||
delta += ITS_CMD_QUEUE_SZ;
|
||||
|
||||
/* Wrapped case */
|
||||
if (from_idx >= to_idx && rd_idx >= to_idx && rd_idx < from_idx)
|
||||
linear_idx += delta;
|
||||
if (linear_idx >= to_idx)
|
||||
break;
|
||||
|
||||
count--;
|
||||
if (!count) {
|
||||
pr_err_ratelimited("ITS queue timeout (%llu %llu %llu)\n",
|
||||
from_idx, to_idx, rd_idx);
|
||||
pr_err_ratelimited("ITS queue timeout (%llu %llu)\n",
|
||||
to_idx, linear_idx);
|
||||
return -1;
|
||||
}
|
||||
prev_idx = rd_idx;
|
||||
cpu_relax();
|
||||
udelay(1);
|
||||
}
|
||||
@ -775,6 +786,7 @@ void name(struct its_node *its, \
|
||||
struct its_cmd_block *cmd, *sync_cmd, *next_cmd; \
|
||||
synctype *sync_obj; \
|
||||
unsigned long flags; \
|
||||
u64 rd_idx; \
|
||||
\
|
||||
raw_spin_lock_irqsave(&its->lock, flags); \
|
||||
\
|
||||
@ -796,10 +808,11 @@ void name(struct its_node *its, \
|
||||
} \
|
||||
\
|
||||
post: \
|
||||
rd_idx = readl_relaxed(its->base + GITS_CREADR); \
|
||||
next_cmd = its_post_commands(its); \
|
||||
raw_spin_unlock_irqrestore(&its->lock, flags); \
|
||||
\
|
||||
if (its_wait_for_range_completion(its, cmd, next_cmd)) \
|
||||
if (its_wait_for_range_completion(its, rd_idx, next_cmd)) \
|
||||
pr_err_ratelimited("ITS cmd %ps failed\n", builder); \
|
||||
}
|
||||
|
||||
|
@ -388,7 +388,7 @@ static void gic_all_vpes_irq_cpu_online(struct irq_data *d)
|
||||
intr = GIC_HWIRQ_TO_LOCAL(d->hwirq);
|
||||
cd = irq_data_get_irq_chip_data(d);
|
||||
|
||||
write_gic_vl_map(intr, cd->map);
|
||||
write_gic_vl_map(mips_gic_vx_map_reg(intr), cd->map);
|
||||
if (cd->mask)
|
||||
write_gic_vl_smask(BIT(intr));
|
||||
}
|
||||
@ -517,7 +517,7 @@ static int gic_irq_domain_map(struct irq_domain *d, unsigned int virq,
|
||||
spin_lock_irqsave(&gic_lock, flags);
|
||||
for_each_online_cpu(cpu) {
|
||||
write_gic_vl_other(mips_cm_vp_id(cpu));
|
||||
write_gic_vo_map(intr, map);
|
||||
write_gic_vo_map(mips_gic_vx_map_reg(intr), map);
|
||||
}
|
||||
spin_unlock_irqrestore(&gic_lock, flags);
|
||||
|
||||
|
@ -159,9 +159,9 @@ static struct ti_sci_inta_vint_desc *ti_sci_inta_alloc_parent_irq(struct irq_dom
|
||||
parent_fwspec.param[1] = vint_desc->vint_id;
|
||||
|
||||
parent_virq = irq_create_fwspec_mapping(&parent_fwspec);
|
||||
if (parent_virq <= 0) {
|
||||
if (parent_virq == 0) {
|
||||
kfree(vint_desc);
|
||||
return ERR_PTR(parent_virq);
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
vint_desc->parent_virq = parent_virq;
|
||||
|
||||
|
@ -140,8 +140,8 @@ static char __init *dm_parse_table_entry(struct dm_device *dev, char *str)
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
/* target_args */
|
||||
dev->target_args_array[n] = kstrndup(field[3], GFP_KERNEL,
|
||||
DM_MAX_STR_SIZE);
|
||||
dev->target_args_array[n] = kstrndup(field[3], DM_MAX_STR_SIZE,
|
||||
GFP_KERNEL);
|
||||
if (!dev->target_args_array[n])
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
@ -272,10 +272,10 @@ static int __init dm_init_init(void)
|
||||
return 0;
|
||||
|
||||
if (strlen(create) >= DM_MAX_STR_SIZE) {
|
||||
DMERR("Argument is too big. Limit is %d\n", DM_MAX_STR_SIZE);
|
||||
DMERR("Argument is too big. Limit is %d", DM_MAX_STR_SIZE);
|
||||
return -EINVAL;
|
||||
}
|
||||
str = kstrndup(create, GFP_KERNEL, DM_MAX_STR_SIZE);
|
||||
str = kstrndup(create, DM_MAX_STR_SIZE, GFP_KERNEL);
|
||||
if (!str)
|
||||
return -ENOMEM;
|
||||
|
||||
@ -283,7 +283,7 @@ static int __init dm_init_init(void)
|
||||
if (r)
|
||||
goto out;
|
||||
|
||||
DMINFO("waiting for all devices to be available before creating mapped devices\n");
|
||||
DMINFO("waiting for all devices to be available before creating mapped devices");
|
||||
wait_for_device_probe();
|
||||
|
||||
list_for_each_entry(dev, &devices, list) {
|
||||
|
@ -60,6 +60,7 @@
|
||||
|
||||
#define WRITE_LOG_VERSION 1ULL
|
||||
#define WRITE_LOG_MAGIC 0x6a736677736872ULL
|
||||
#define WRITE_LOG_SUPER_SECTOR 0
|
||||
|
||||
/*
|
||||
* The disk format for this is braindead simple.
|
||||
@ -115,6 +116,7 @@ struct log_writes_c {
|
||||
struct list_head logging_blocks;
|
||||
wait_queue_head_t wait;
|
||||
struct task_struct *log_kthread;
|
||||
struct completion super_done;
|
||||
};
|
||||
|
||||
struct pending_block {
|
||||
@ -180,6 +182,14 @@ static void log_end_io(struct bio *bio)
|
||||
bio_put(bio);
|
||||
}
|
||||
|
||||
static void log_end_super(struct bio *bio)
|
||||
{
|
||||
struct log_writes_c *lc = bio->bi_private;
|
||||
|
||||
complete(&lc->super_done);
|
||||
log_end_io(bio);
|
||||
}
|
||||
|
||||
/*
|
||||
* Meant to be called if there is an error, it will free all the pages
|
||||
* associated with the block.
|
||||
@ -215,7 +225,8 @@ static int write_metadata(struct log_writes_c *lc, void *entry,
|
||||
bio->bi_iter.bi_size = 0;
|
||||
bio->bi_iter.bi_sector = sector;
|
||||
bio_set_dev(bio, lc->logdev->bdev);
|
||||
bio->bi_end_io = log_end_io;
|
||||
bio->bi_end_io = (sector == WRITE_LOG_SUPER_SECTOR) ?
|
||||
log_end_super : log_end_io;
|
||||
bio->bi_private = lc;
|
||||
bio_set_op_attrs(bio, REQ_OP_WRITE, 0);
|
||||
|
||||
@ -418,11 +429,18 @@ static int log_super(struct log_writes_c *lc)
|
||||
super.nr_entries = cpu_to_le64(lc->logged_entries);
|
||||
super.sectorsize = cpu_to_le32(lc->sectorsize);
|
||||
|
||||
if (write_metadata(lc, &super, sizeof(super), NULL, 0, 0)) {
|
||||
if (write_metadata(lc, &super, sizeof(super), NULL, 0,
|
||||
WRITE_LOG_SUPER_SECTOR)) {
|
||||
DMERR("Couldn't write super");
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Super sector should be writen in-order, otherwise the
|
||||
* nr_entries could be rewritten incorrectly by an old bio.
|
||||
*/
|
||||
wait_for_completion_io(&lc->super_done);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -531,6 +549,7 @@ static int log_writes_ctr(struct dm_target *ti, unsigned int argc, char **argv)
|
||||
INIT_LIST_HEAD(&lc->unflushed_blocks);
|
||||
INIT_LIST_HEAD(&lc->logging_blocks);
|
||||
init_waitqueue_head(&lc->wait);
|
||||
init_completion(&lc->super_done);
|
||||
atomic_set(&lc->io_blocks, 0);
|
||||
atomic_set(&lc->pending_blocks, 0);
|
||||
|
||||
|
@ -561,7 +561,7 @@ static char **realloc_argv(unsigned *size, char **old_argv)
|
||||
gfp = GFP_NOIO;
|
||||
}
|
||||
argv = kmalloc_array(new_size, sizeof(*argv), gfp);
|
||||
if (argv) {
|
||||
if (argv && old_argv) {
|
||||
memcpy(argv, old_argv, *size * sizeof(*argv));
|
||||
*size = new_size;
|
||||
}
|
||||
|
@ -235,8 +235,8 @@ static int verity_handle_err(struct dm_verity *v, enum verity_block_type type,
|
||||
BUG();
|
||||
}
|
||||
|
||||
DMERR("%s: %s block %llu is corrupted", v->data_dev->name, type_str,
|
||||
block);
|
||||
DMERR_LIMIT("%s: %s block %llu is corrupted", v->data_dev->name,
|
||||
type_str, block);
|
||||
|
||||
if (v->corrupted_errs == DM_VERITY_MAX_CORRUPTED_ERRS)
|
||||
DMERR("%s: reached maximum errors", v->data_dev->name);
|
||||
|
@ -204,12 +204,11 @@ static struct irq_chip stmfx_irq_chip = {
|
||||
static irqreturn_t stmfx_irq_handler(int irq, void *data)
|
||||
{
|
||||
struct stmfx *stmfx = data;
|
||||
unsigned long n, pending;
|
||||
u32 ack;
|
||||
int ret;
|
||||
unsigned long bits;
|
||||
u32 pending, ack;
|
||||
int n, ret;
|
||||
|
||||
ret = regmap_read(stmfx->map, STMFX_REG_IRQ_PENDING,
|
||||
(u32 *)&pending);
|
||||
ret = regmap_read(stmfx->map, STMFX_REG_IRQ_PENDING, &pending);
|
||||
if (ret)
|
||||
return IRQ_NONE;
|
||||
|
||||
@ -224,7 +223,8 @@ static irqreturn_t stmfx_irq_handler(int irq, void *data)
|
||||
return IRQ_NONE;
|
||||
}
|
||||
|
||||
for_each_set_bit(n, &pending, STMFX_REG_IRQ_SRC_MAX)
|
||||
bits = pending;
|
||||
for_each_set_bit(n, &bits, STMFX_REG_IRQ_SRC_MAX)
|
||||
handle_nested_irq(irq_find_mapping(stmfx->irq_domain, n));
|
||||
|
||||
return IRQ_HANDLED;
|
||||
|
@ -4662,7 +4662,6 @@ static int nand_detect(struct nand_chip *chip, struct nand_flash_dev *type)
|
||||
memorg = nanddev_get_memorg(&chip->base);
|
||||
memorg->planes_per_lun = 1;
|
||||
memorg->luns_per_target = 1;
|
||||
memorg->ntargets = 1;
|
||||
|
||||
/*
|
||||
* Reset the chip, required by some chips (e.g. Micron MT29FxGxxxxx)
|
||||
@ -5027,6 +5026,8 @@ static int nand_scan_ident(struct nand_chip *chip, unsigned int maxchips,
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
memorg->ntargets = maxchips;
|
||||
|
||||
/* Read the flash type */
|
||||
ret = nand_detect(chip, table);
|
||||
if (ret) {
|
||||
|
@ -1636,6 +1636,95 @@ static int sr2_bit7_quad_enable(struct spi_nor *nor)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* spi_nor_clear_sr_bp() - clear the Status Register Block Protection bits.
|
||||
* @nor: pointer to a 'struct spi_nor'
|
||||
*
|
||||
* Read-modify-write function that clears the Block Protection bits from the
|
||||
* Status Register without affecting other bits.
|
||||
*
|
||||
* Return: 0 on success, -errno otherwise.
|
||||
*/
|
||||
static int spi_nor_clear_sr_bp(struct spi_nor *nor)
|
||||
{
|
||||
int ret;
|
||||
u8 mask = SR_BP2 | SR_BP1 | SR_BP0;
|
||||
|
||||
ret = read_sr(nor);
|
||||
if (ret < 0) {
|
||||
dev_err(nor->dev, "error while reading status register\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
write_enable(nor);
|
||||
|
||||
ret = write_sr(nor, ret & ~mask);
|
||||
if (ret) {
|
||||
dev_err(nor->dev, "write to status register failed\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = spi_nor_wait_till_ready(nor);
|
||||
if (ret)
|
||||
dev_err(nor->dev, "timeout while writing status register\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* spi_nor_spansion_clear_sr_bp() - clear the Status Register Block Protection
|
||||
* bits on spansion flashes.
|
||||
* @nor: pointer to a 'struct spi_nor'
|
||||
*
|
||||
* Read-modify-write function that clears the Block Protection bits from the
|
||||
* Status Register without affecting other bits. The function is tightly
|
||||
* coupled with the spansion_quad_enable() function. Both assume that the Write
|
||||
* Register with 16 bits, together with the Read Configuration Register (35h)
|
||||
* instructions are supported.
|
||||
*
|
||||
* Return: 0 on success, -errno otherwise.
|
||||
*/
|
||||
static int spi_nor_spansion_clear_sr_bp(struct spi_nor *nor)
|
||||
{
|
||||
int ret;
|
||||
u8 mask = SR_BP2 | SR_BP1 | SR_BP0;
|
||||
u8 sr_cr[2] = {0};
|
||||
|
||||
/* Check current Quad Enable bit value. */
|
||||
ret = read_cr(nor);
|
||||
if (ret < 0) {
|
||||
dev_err(nor->dev,
|
||||
"error while reading configuration register\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* When the configuration register Quad Enable bit is one, only the
|
||||
* Write Status (01h) command with two data bytes may be used.
|
||||
*/
|
||||
if (ret & CR_QUAD_EN_SPAN) {
|
||||
sr_cr[1] = ret;
|
||||
|
||||
ret = read_sr(nor);
|
||||
if (ret < 0) {
|
||||
dev_err(nor->dev,
|
||||
"error while reading status register\n");
|
||||
return ret;
|
||||
}
|
||||
sr_cr[0] = ret & ~mask;
|
||||
|
||||
ret = write_sr_cr(nor, sr_cr);
|
||||
if (ret)
|
||||
dev_err(nor->dev, "16-bit write register failed\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* If the Quad Enable bit is zero, use the Write Status (01h) command
|
||||
* with one data byte.
|
||||
*/
|
||||
return spi_nor_clear_sr_bp(nor);
|
||||
}
|
||||
|
||||
/* Used when the "_ext_id" is two bytes at most */
|
||||
#define INFO(_jedec_id, _ext_id, _sector_size, _n_sectors, _flags) \
|
||||
.id = { \
|
||||
@ -3660,6 +3749,8 @@ static int spi_nor_init_params(struct spi_nor *nor,
|
||||
default:
|
||||
/* Kept only for backward compatibility purpose. */
|
||||
params->quad_enable = spansion_quad_enable;
|
||||
if (nor->clear_sr_bp)
|
||||
nor->clear_sr_bp = spi_nor_spansion_clear_sr_bp;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -3912,17 +4003,13 @@ static int spi_nor_init(struct spi_nor *nor)
|
||||
{
|
||||
int err;
|
||||
|
||||
/*
|
||||
* Atmel, SST, Intel/Numonyx, and others serial NOR tend to power up
|
||||
* with the software protection bits set
|
||||
*/
|
||||
if (JEDEC_MFR(nor->info) == SNOR_MFR_ATMEL ||
|
||||
JEDEC_MFR(nor->info) == SNOR_MFR_INTEL ||
|
||||
JEDEC_MFR(nor->info) == SNOR_MFR_SST ||
|
||||
nor->info->flags & SPI_NOR_HAS_LOCK) {
|
||||
write_enable(nor);
|
||||
write_sr(nor, 0);
|
||||
spi_nor_wait_till_ready(nor);
|
||||
if (nor->clear_sr_bp) {
|
||||
err = nor->clear_sr_bp(nor);
|
||||
if (err) {
|
||||
dev_err(nor->dev,
|
||||
"fail to clear block protection bits\n");
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
if (nor->quad_enable) {
|
||||
@ -4047,6 +4134,16 @@ int spi_nor_scan(struct spi_nor *nor, const char *name,
|
||||
if (info->flags & SPI_S3AN)
|
||||
nor->flags |= SNOR_F_READY_XSR_RDY;
|
||||
|
||||
/*
|
||||
* Atmel, SST, Intel/Numonyx, and others serial NOR tend to power up
|
||||
* with the software protection bits set.
|
||||
*/
|
||||
if (JEDEC_MFR(nor->info) == SNOR_MFR_ATMEL ||
|
||||
JEDEC_MFR(nor->info) == SNOR_MFR_INTEL ||
|
||||
JEDEC_MFR(nor->info) == SNOR_MFR_SST ||
|
||||
nor->info->flags & SPI_NOR_HAS_LOCK)
|
||||
nor->clear_sr_bp = spi_nor_clear_sr_bp;
|
||||
|
||||
/* Parse the Serial Flash Discoverable Parameters table. */
|
||||
ret = spi_nor_init_params(nor, ¶ms);
|
||||
if (ret)
|
||||
|
@ -4320,12 +4320,12 @@ void bond_setup(struct net_device *bond_dev)
|
||||
bond_dev->features |= NETIF_F_NETNS_LOCAL;
|
||||
|
||||
bond_dev->hw_features = BOND_VLAN_FEATURES |
|
||||
NETIF_F_HW_VLAN_CTAG_TX |
|
||||
NETIF_F_HW_VLAN_CTAG_RX |
|
||||
NETIF_F_HW_VLAN_CTAG_FILTER;
|
||||
|
||||
bond_dev->hw_features |= NETIF_F_GSO_ENCAP_ALL | NETIF_F_GSO_UDP_L4;
|
||||
bond_dev->features |= bond_dev->hw_features;
|
||||
bond_dev->features |= NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_STAG_TX;
|
||||
}
|
||||
|
||||
/* Destroy a bonding device.
|
||||
|
@ -436,9 +436,9 @@ int ksz_switch_register(struct ksz_device *dev,
|
||||
return PTR_ERR(dev->reset_gpio);
|
||||
|
||||
if (dev->reset_gpio) {
|
||||
gpiod_set_value(dev->reset_gpio, 1);
|
||||
gpiod_set_value_cansleep(dev->reset_gpio, 1);
|
||||
mdelay(10);
|
||||
gpiod_set_value(dev->reset_gpio, 0);
|
||||
gpiod_set_value_cansleep(dev->reset_gpio, 0);
|
||||
}
|
||||
|
||||
mutex_init(&dev->dev_mutex);
|
||||
@ -487,7 +487,7 @@ void ksz_switch_remove(struct ksz_device *dev)
|
||||
dsa_unregister_switch(dev->ds);
|
||||
|
||||
if (dev->reset_gpio)
|
||||
gpiod_set_value(dev->reset_gpio, 1);
|
||||
gpiod_set_value_cansleep(dev->reset_gpio, 1);
|
||||
|
||||
}
|
||||
EXPORT_SYMBOL(ksz_switch_remove);
|
||||
|
@ -843,9 +843,14 @@ int aq_filters_vlans_update(struct aq_nic_s *aq_nic)
|
||||
return err;
|
||||
|
||||
if (aq_nic->ndev->features & NETIF_F_HW_VLAN_CTAG_FILTER) {
|
||||
if (hweight < AQ_VLAN_MAX_FILTERS)
|
||||
err = aq_hw_ops->hw_filter_vlan_ctrl(aq_hw, true);
|
||||
if (hweight < AQ_VLAN_MAX_FILTERS && hweight > 0) {
|
||||
err = aq_hw_ops->hw_filter_vlan_ctrl(aq_hw,
|
||||
!(aq_nic->packet_filter & IFF_PROMISC));
|
||||
aq_nic->aq_nic_cfg.is_vlan_force_promisc = false;
|
||||
} else {
|
||||
/* otherwise left in promiscue mode */
|
||||
aq_nic->aq_nic_cfg.is_vlan_force_promisc = true;
|
||||
}
|
||||
}
|
||||
|
||||
return err;
|
||||
@ -866,6 +871,7 @@ int aq_filters_vlan_offload_off(struct aq_nic_s *aq_nic)
|
||||
if (unlikely(!aq_hw_ops->hw_filter_vlan_ctrl))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
aq_nic->aq_nic_cfg.is_vlan_force_promisc = true;
|
||||
err = aq_hw_ops->hw_filter_vlan_ctrl(aq_hw, false);
|
||||
if (err)
|
||||
return err;
|
||||
|
@ -126,6 +126,7 @@ void aq_nic_cfg_start(struct aq_nic_s *self)
|
||||
|
||||
cfg->link_speed_msk &= cfg->aq_hw_caps->link_speed_msk;
|
||||
cfg->features = cfg->aq_hw_caps->hw_features;
|
||||
cfg->is_vlan_force_promisc = true;
|
||||
}
|
||||
|
||||
static int aq_nic_update_link_status(struct aq_nic_s *self)
|
||||
|
@ -35,6 +35,7 @@ struct aq_nic_cfg_s {
|
||||
u32 flow_control;
|
||||
u32 link_speed_msk;
|
||||
u32 wol;
|
||||
bool is_vlan_force_promisc;
|
||||
u16 is_mc_list_enabled;
|
||||
u16 mc_list_count;
|
||||
bool is_autoneg;
|
||||
|
@ -778,8 +778,15 @@ static int hw_atl_b0_hw_packet_filter_set(struct aq_hw_s *self,
|
||||
unsigned int packet_filter)
|
||||
{
|
||||
unsigned int i = 0U;
|
||||
struct aq_nic_cfg_s *cfg = self->aq_nic_cfg;
|
||||
|
||||
hw_atl_rpfl2promiscuous_mode_en_set(self,
|
||||
IS_FILTER_ENABLED(IFF_PROMISC));
|
||||
|
||||
hw_atl_rpf_vlan_prom_mode_en_set(self,
|
||||
IS_FILTER_ENABLED(IFF_PROMISC) ||
|
||||
cfg->is_vlan_force_promisc);
|
||||
|
||||
hw_atl_rpfl2promiscuous_mode_en_set(self, IS_FILTER_ENABLED(IFF_PROMISC));
|
||||
hw_atl_rpfl2multicast_flr_en_set(self,
|
||||
IS_FILTER_ENABLED(IFF_ALLMULTI), 0);
|
||||
|
||||
@ -788,13 +795,13 @@ static int hw_atl_b0_hw_packet_filter_set(struct aq_hw_s *self,
|
||||
|
||||
hw_atl_rpfl2broadcast_en_set(self, IS_FILTER_ENABLED(IFF_BROADCAST));
|
||||
|
||||
self->aq_nic_cfg->is_mc_list_enabled = IS_FILTER_ENABLED(IFF_MULTICAST);
|
||||
cfg->is_mc_list_enabled = IS_FILTER_ENABLED(IFF_MULTICAST);
|
||||
|
||||
for (i = HW_ATL_B0_MAC_MIN; i < HW_ATL_B0_MAC_MAX; ++i)
|
||||
hw_atl_rpfl2_uc_flr_en_set(self,
|
||||
(self->aq_nic_cfg->is_mc_list_enabled &&
|
||||
(i <= self->aq_nic_cfg->mc_list_count)) ?
|
||||
1U : 0U, i);
|
||||
(cfg->is_mc_list_enabled &&
|
||||
(i <= cfg->mc_list_count)) ?
|
||||
1U : 0U, i);
|
||||
|
||||
return aq_hw_err_from_flags(self);
|
||||
}
|
||||
@ -1086,7 +1093,7 @@ static int hw_atl_b0_hw_vlan_set(struct aq_hw_s *self,
|
||||
static int hw_atl_b0_hw_vlan_ctrl(struct aq_hw_s *self, bool enable)
|
||||
{
|
||||
/* set promisc in case of disabing the vland filter */
|
||||
hw_atl_rpf_vlan_prom_mode_en_set(self, !!!enable);
|
||||
hw_atl_rpf_vlan_prom_mode_en_set(self, !enable);
|
||||
|
||||
return aq_hw_err_from_flags(self);
|
||||
}
|
||||
|
@ -4180,7 +4180,7 @@ static int macb_probe(struct platform_device *pdev)
|
||||
if (PTR_ERR(mac) == -EPROBE_DEFER) {
|
||||
err = -EPROBE_DEFER;
|
||||
goto err_out_free_netdev;
|
||||
} else if (!IS_ERR(mac)) {
|
||||
} else if (!IS_ERR_OR_NULL(mac)) {
|
||||
ether_addr_copy(bp->dev->dev_addr, mac);
|
||||
} else {
|
||||
macb_get_hwaddr(bp);
|
||||
|
@ -891,7 +891,7 @@ static void be_self_test(struct net_device *netdev, struct ethtool_test *test,
|
||||
u64 *data)
|
||||
{
|
||||
struct be_adapter *adapter = netdev_priv(netdev);
|
||||
int status;
|
||||
int status, cnt;
|
||||
u8 link_status = 0;
|
||||
|
||||
if (adapter->function_caps & BE_FUNCTION_CAPS_SUPER_NIC) {
|
||||
@ -902,6 +902,9 @@ static void be_self_test(struct net_device *netdev, struct ethtool_test *test,
|
||||
|
||||
memset(data, 0, sizeof(u64) * ETHTOOL_TESTS_NUM);
|
||||
|
||||
/* check link status before offline tests */
|
||||
link_status = netif_carrier_ok(netdev);
|
||||
|
||||
if (test->flags & ETH_TEST_FL_OFFLINE) {
|
||||
if (be_loopback_test(adapter, BE_MAC_LOOPBACK, &data[0]) != 0)
|
||||
test->flags |= ETH_TEST_FL_FAILED;
|
||||
@ -922,13 +925,26 @@ static void be_self_test(struct net_device *netdev, struct ethtool_test *test,
|
||||
test->flags |= ETH_TEST_FL_FAILED;
|
||||
}
|
||||
|
||||
status = be_cmd_link_status_query(adapter, NULL, &link_status, 0);
|
||||
if (status) {
|
||||
test->flags |= ETH_TEST_FL_FAILED;
|
||||
data[4] = -1;
|
||||
} else if (!link_status) {
|
||||
/* link status was down prior to test */
|
||||
if (!link_status) {
|
||||
test->flags |= ETH_TEST_FL_FAILED;
|
||||
data[4] = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
for (cnt = 10; cnt; cnt--) {
|
||||
status = be_cmd_link_status_query(adapter, NULL, &link_status,
|
||||
0);
|
||||
if (status) {
|
||||
test->flags |= ETH_TEST_FL_FAILED;
|
||||
data[4] = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (link_status)
|
||||
break;
|
||||
|
||||
msleep_interruptible(500);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1057,7 +1057,7 @@ sis900_open(struct net_device *net_dev)
|
||||
sis900_set_mode(sis_priv, HW_SPEED_10_MBPS, FDX_CAPABLE_HALF_SELECTED);
|
||||
|
||||
/* Enable all known interrupts by setting the interrupt mask. */
|
||||
sw32(imr, RxSOVR | RxORN | RxERR | RxOK | TxURN | TxERR | TxIDLE);
|
||||
sw32(imr, RxSOVR | RxORN | RxERR | RxOK | TxURN | TxERR | TxIDLE | TxDESC);
|
||||
sw32(cr, RxENA | sr32(cr));
|
||||
sw32(ier, IE);
|
||||
|
||||
@ -1578,7 +1578,7 @@ static void sis900_tx_timeout(struct net_device *net_dev)
|
||||
sw32(txdp, sis_priv->tx_ring_dma);
|
||||
|
||||
/* Enable all known interrupts by setting the interrupt mask. */
|
||||
sw32(imr, RxSOVR | RxORN | RxERR | RxOK | TxURN | TxERR | TxIDLE);
|
||||
sw32(imr, RxSOVR | RxORN | RxERR | RxOK | TxURN | TxERR | TxIDLE | TxDESC);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1618,7 +1618,7 @@ sis900_start_xmit(struct sk_buff *skb, struct net_device *net_dev)
|
||||
spin_unlock_irqrestore(&sis_priv->lock, flags);
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
sis_priv->tx_ring[entry].cmdsts = (OWN | skb->len);
|
||||
sis_priv->tx_ring[entry].cmdsts = (OWN | INTR | skb->len);
|
||||
sw32(cr, TxENA | sr32(cr));
|
||||
|
||||
sis_priv->cur_tx ++;
|
||||
@ -1674,7 +1674,7 @@ static irqreturn_t sis900_interrupt(int irq, void *dev_instance)
|
||||
do {
|
||||
status = sr32(isr);
|
||||
|
||||
if ((status & (HIBERR|TxURN|TxERR|TxIDLE|RxORN|RxERR|RxOK)) == 0)
|
||||
if ((status & (HIBERR|TxURN|TxERR|TxIDLE|TxDESC|RxORN|RxERR|RxOK)) == 0)
|
||||
/* nothing intresting happened */
|
||||
break;
|
||||
handled = 1;
|
||||
@ -1684,7 +1684,7 @@ static irqreturn_t sis900_interrupt(int irq, void *dev_instance)
|
||||
/* Rx interrupt */
|
||||
sis900_rx(net_dev);
|
||||
|
||||
if (status & (TxURN | TxERR | TxIDLE))
|
||||
if (status & (TxURN | TxERR | TxIDLE | TxDESC))
|
||||
/* Tx interrupt */
|
||||
sis900_finish_xmit(net_dev);
|
||||
|
||||
@ -1896,8 +1896,8 @@ static void sis900_finish_xmit (struct net_device *net_dev)
|
||||
|
||||
if (tx_status & OWN) {
|
||||
/* The packet is not transmitted yet (owned by hardware) !
|
||||
* Note: the interrupt is generated only when Tx Machine
|
||||
* is idle, so this is an almost impossible case */
|
||||
* Note: this is an almost impossible condition
|
||||
* in case of TxDESC ('descriptor interrupt') */
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2473,7 +2473,7 @@ static int sis900_resume(struct pci_dev *pci_dev)
|
||||
sis900_set_mode(sis_priv, HW_SPEED_10_MBPS, FDX_CAPABLE_HALF_SELECTED);
|
||||
|
||||
/* Enable all known interrupts by setting the interrupt mask. */
|
||||
sw32(imr, RxSOVR | RxORN | RxERR | RxOK | TxURN | TxERR | TxIDLE);
|
||||
sw32(imr, RxSOVR | RxORN | RxERR | RxOK | TxURN | TxERR | TxIDLE | TxDESC);
|
||||
sw32(cr, RxENA | sr32(cr));
|
||||
sw32(ier, IE);
|
||||
|
||||
|
@ -112,7 +112,7 @@ static int adjust_systime(void __iomem *ioaddr, u32 sec, u32 nsec,
|
||||
* programmed with (2^32 – <new_sec_value>)
|
||||
*/
|
||||
if (gmac4)
|
||||
sec = (100000000ULL - sec);
|
||||
sec = -sec;
|
||||
|
||||
value = readl(ioaddr + PTP_TCR);
|
||||
if (value & PTP_TCR_TSCTRLSSR)
|
||||
|
@ -2947,12 +2947,15 @@ static netdev_tx_t stmmac_tso_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
|
||||
/* Manage tx mitigation */
|
||||
tx_q->tx_count_frames += nfrags + 1;
|
||||
if (priv->tx_coal_frames <= tx_q->tx_count_frames) {
|
||||
if (likely(priv->tx_coal_frames > tx_q->tx_count_frames) &&
|
||||
!(priv->synopsys_id >= DWMAC_CORE_4_00 &&
|
||||
(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) &&
|
||||
priv->hwts_tx_en)) {
|
||||
stmmac_tx_timer_arm(priv, queue);
|
||||
} else {
|
||||
tx_q->tx_count_frames = 0;
|
||||
stmmac_set_tx_ic(priv, desc);
|
||||
priv->xstats.tx_set_ic_bit++;
|
||||
tx_q->tx_count_frames = 0;
|
||||
} else {
|
||||
stmmac_tx_timer_arm(priv, queue);
|
||||
}
|
||||
|
||||
skb_tx_timestamp(skb);
|
||||
@ -3166,12 +3169,15 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
* element in case of no SG.
|
||||
*/
|
||||
tx_q->tx_count_frames += nfrags + 1;
|
||||
if (priv->tx_coal_frames <= tx_q->tx_count_frames) {
|
||||
if (likely(priv->tx_coal_frames > tx_q->tx_count_frames) &&
|
||||
!(priv->synopsys_id >= DWMAC_CORE_4_00 &&
|
||||
(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) &&
|
||||
priv->hwts_tx_en)) {
|
||||
stmmac_tx_timer_arm(priv, queue);
|
||||
} else {
|
||||
tx_q->tx_count_frames = 0;
|
||||
stmmac_set_tx_ic(priv, desc);
|
||||
priv->xstats.tx_set_ic_bit++;
|
||||
tx_q->tx_count_frames = 0;
|
||||
} else {
|
||||
stmmac_tx_timer_arm(priv, queue);
|
||||
}
|
||||
|
||||
skb_tx_timestamp(skb);
|
||||
|
@ -63,6 +63,7 @@ MODULE_AUTHOR("Frank Cusack <fcusack@fcusack.com>");
|
||||
MODULE_DESCRIPTION("Point-to-Point Protocol Microsoft Point-to-Point Encryption support");
|
||||
MODULE_LICENSE("Dual BSD/GPL");
|
||||
MODULE_ALIAS("ppp-compress-" __stringify(CI_MPPE));
|
||||
MODULE_SOFTDEP("pre: arc4");
|
||||
MODULE_VERSION("1.0.2");
|
||||
|
||||
static unsigned int
|
||||
|
@ -2128,12 +2128,12 @@ static void team_setup(struct net_device *dev)
|
||||
dev->features |= NETIF_F_NETNS_LOCAL;
|
||||
|
||||
dev->hw_features = TEAM_VLAN_FEATURES |
|
||||
NETIF_F_HW_VLAN_CTAG_TX |
|
||||
NETIF_F_HW_VLAN_CTAG_RX |
|
||||
NETIF_F_HW_VLAN_CTAG_FILTER;
|
||||
|
||||
dev->hw_features |= NETIF_F_GSO_ENCAP_ALL | NETIF_F_GSO_UDP_L4;
|
||||
dev->features |= dev->hw_features;
|
||||
dev->features |= NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_STAG_TX;
|
||||
}
|
||||
|
||||
static int team_newlink(struct net *src_net, struct net_device *dev,
|
||||
|
@ -1482,7 +1482,7 @@ static int qmi_wwan_probe(struct usb_interface *intf,
|
||||
* different. Ignore the current interface if the number of endpoints
|
||||
* equals the number for the diag interface (two).
|
||||
*/
|
||||
info = (void *)&id->driver_info;
|
||||
info = (void *)id->driver_info;
|
||||
|
||||
if (info->data & QMI_WWAN_QUIRK_QUECTEL_DYNCFG) {
|
||||
if (desc->bNumEndpoints == 2)
|
||||
|
@ -350,8 +350,8 @@ static int vrf_finish_output6(struct net *net, struct sock *sk,
|
||||
{
|
||||
struct dst_entry *dst = skb_dst(skb);
|
||||
struct net_device *dev = dst->dev;
|
||||
const struct in6_addr *nexthop;
|
||||
struct neighbour *neigh;
|
||||
struct in6_addr *nexthop;
|
||||
int ret;
|
||||
|
||||
nf_reset(skb);
|
||||
|
@ -859,7 +859,7 @@ static int pci_pm_suspend_noirq(struct device *dev)
|
||||
pci_dev->bus->self->skip_bus_pm = true;
|
||||
}
|
||||
|
||||
if (pci_dev->skip_bus_pm && !pm_suspend_via_firmware()) {
|
||||
if (pci_dev->skip_bus_pm && pm_suspend_no_platform()) {
|
||||
dev_dbg(dev, "PCI PM: Skipped\n");
|
||||
goto Fixup;
|
||||
}
|
||||
@ -914,10 +914,10 @@ static int pci_pm_resume_noirq(struct device *dev)
|
||||
/*
|
||||
* In the suspend-to-idle case, devices left in D0 during suspend will
|
||||
* stay in D0, so it is not necessary to restore or update their
|
||||
* configuration here and attempting to put them into D0 again may
|
||||
* confuse some firmware, so avoid doing that.
|
||||
* configuration here and attempting to put them into D0 again is
|
||||
* pointless, so avoid doing that.
|
||||
*/
|
||||
if (!pci_dev->skip_bus_pm || pm_suspend_via_firmware())
|
||||
if (!(pci_dev->skip_bus_pm && pm_suspend_no_platform()))
|
||||
pci_pm_default_resume_early(pci_dev);
|
||||
|
||||
pci_fixup_device(pci_fixup_resume_early, pci_dev);
|
||||
|
@ -113,6 +113,8 @@ static void mtk_eint_mask(struct irq_data *d)
|
||||
void __iomem *reg = mtk_eint_get_offset(eint, d->hwirq,
|
||||
eint->regs->mask_set);
|
||||
|
||||
eint->cur_mask[d->hwirq >> 5] &= ~mask;
|
||||
|
||||
writel(mask, reg);
|
||||
}
|
||||
|
||||
@ -123,6 +125,8 @@ static void mtk_eint_unmask(struct irq_data *d)
|
||||
void __iomem *reg = mtk_eint_get_offset(eint, d->hwirq,
|
||||
eint->regs->mask_clr);
|
||||
|
||||
eint->cur_mask[d->hwirq >> 5] |= mask;
|
||||
|
||||
writel(mask, reg);
|
||||
|
||||
if (eint->dual_edge[d->hwirq])
|
||||
@ -217,19 +221,6 @@ static void mtk_eint_chip_write_mask(const struct mtk_eint *eint,
|
||||
}
|
||||
}
|
||||
|
||||
static void mtk_eint_chip_read_mask(const struct mtk_eint *eint,
|
||||
void __iomem *base, u32 *buf)
|
||||
{
|
||||
int port;
|
||||
void __iomem *reg;
|
||||
|
||||
for (port = 0; port < eint->hw->ports; port++) {
|
||||
reg = base + eint->regs->mask + (port << 2);
|
||||
buf[port] = ~readl_relaxed(reg);
|
||||
/* Mask is 0 when irq is enabled, and 1 when disabled. */
|
||||
}
|
||||
}
|
||||
|
||||
static int mtk_eint_irq_request_resources(struct irq_data *d)
|
||||
{
|
||||
struct mtk_eint *eint = irq_data_get_irq_chip_data(d);
|
||||
@ -318,7 +309,7 @@ static void mtk_eint_irq_handler(struct irq_desc *desc)
|
||||
struct irq_chip *chip = irq_desc_get_chip(desc);
|
||||
struct mtk_eint *eint = irq_desc_get_handler_data(desc);
|
||||
unsigned int status, eint_num;
|
||||
int offset, index, virq;
|
||||
int offset, mask_offset, index, virq;
|
||||
void __iomem *reg = mtk_eint_get_offset(eint, 0, eint->regs->stat);
|
||||
int dual_edge, start_level, curr_level;
|
||||
|
||||
@ -328,10 +319,24 @@ static void mtk_eint_irq_handler(struct irq_desc *desc)
|
||||
status = readl(reg);
|
||||
while (status) {
|
||||
offset = __ffs(status);
|
||||
mask_offset = eint_num >> 5;
|
||||
index = eint_num + offset;
|
||||
virq = irq_find_mapping(eint->domain, index);
|
||||
status &= ~BIT(offset);
|
||||
|
||||
/*
|
||||
* If we get an interrupt on pin that was only required
|
||||
* for wake (but no real interrupt requested), mask the
|
||||
* interrupt (as would mtk_eint_resume do anyway later
|
||||
* in the resume sequence).
|
||||
*/
|
||||
if (eint->wake_mask[mask_offset] & BIT(offset) &&
|
||||
!(eint->cur_mask[mask_offset] & BIT(offset))) {
|
||||
writel_relaxed(BIT(offset), reg -
|
||||
eint->regs->stat +
|
||||
eint->regs->mask_set);
|
||||
}
|
||||
|
||||
dual_edge = eint->dual_edge[index];
|
||||
if (dual_edge) {
|
||||
/*
|
||||
@ -370,7 +375,6 @@ static void mtk_eint_irq_handler(struct irq_desc *desc)
|
||||
|
||||
int mtk_eint_do_suspend(struct mtk_eint *eint)
|
||||
{
|
||||
mtk_eint_chip_read_mask(eint, eint->base, eint->cur_mask);
|
||||
mtk_eint_chip_write_mask(eint, eint->base, eint->wake_mask);
|
||||
|
||||
return 0;
|
||||
|
@ -771,6 +771,10 @@ static int mcp23s08_probe_one(struct mcp23s08 *mcp, struct device *dev,
|
||||
if (ret < 0)
|
||||
goto fail;
|
||||
|
||||
ret = devm_gpiochip_add_data(dev, &mcp->chip, mcp);
|
||||
if (ret < 0)
|
||||
goto fail;
|
||||
|
||||
mcp->irq_controller =
|
||||
device_property_read_bool(dev, "interrupt-controller");
|
||||
if (mcp->irq && mcp->irq_controller) {
|
||||
@ -812,10 +816,6 @@ static int mcp23s08_probe_one(struct mcp23s08 *mcp, struct device *dev,
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ret = devm_gpiochip_add_data(dev, &mcp->chip, mcp);
|
||||
if (ret < 0)
|
||||
goto fail;
|
||||
|
||||
if (one_regmap_config) {
|
||||
mcp->pinctrl_desc.name = devm_kasprintf(dev, GFP_KERNEL,
|
||||
"mcp23xxx-pinctrl.%d", raw_chip_address);
|
||||
|
@ -396,7 +396,7 @@ static int ocelot_pin_function_idx(struct ocelot_pinctrl *info,
|
||||
return -1;
|
||||
}
|
||||
|
||||
#define REG(r, info, p) ((r) * (info)->stride + (4 * ((p) / 32)))
|
||||
#define REG_ALT(msb, info, p) (OCELOT_GPIO_ALT0 * (info)->stride + 4 * ((msb) + ((info)->stride * ((p) / 32))))
|
||||
|
||||
static int ocelot_pinmux_set_mux(struct pinctrl_dev *pctldev,
|
||||
unsigned int selector, unsigned int group)
|
||||
@ -412,19 +412,21 @@ static int ocelot_pinmux_set_mux(struct pinctrl_dev *pctldev,
|
||||
|
||||
/*
|
||||
* f is encoded on two bits.
|
||||
* bit 0 of f goes in BIT(pin) of ALT0, bit 1 of f goes in BIT(pin) of
|
||||
* ALT1
|
||||
* bit 0 of f goes in BIT(pin) of ALT[0], bit 1 of f goes in BIT(pin) of
|
||||
* ALT[1]
|
||||
* This is racy because both registers can't be updated at the same time
|
||||
* but it doesn't matter much for now.
|
||||
*/
|
||||
regmap_update_bits(info->map, REG(OCELOT_GPIO_ALT0, info, pin->pin),
|
||||
regmap_update_bits(info->map, REG_ALT(0, info, pin->pin),
|
||||
BIT(p), f << p);
|
||||
regmap_update_bits(info->map, REG(OCELOT_GPIO_ALT1, info, pin->pin),
|
||||
regmap_update_bits(info->map, REG_ALT(1, info, pin->pin),
|
||||
BIT(p), f << (p - 1));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define REG(r, info, p) ((r) * (info)->stride + (4 * ((p) / 32)))
|
||||
|
||||
static int ocelot_gpio_set_direction(struct pinctrl_dev *pctldev,
|
||||
struct pinctrl_gpio_range *range,
|
||||
unsigned int pin, bool input)
|
||||
@ -432,7 +434,7 @@ static int ocelot_gpio_set_direction(struct pinctrl_dev *pctldev,
|
||||
struct ocelot_pinctrl *info = pinctrl_dev_get_drvdata(pctldev);
|
||||
unsigned int p = pin % 32;
|
||||
|
||||
regmap_update_bits(info->map, REG(OCELOT_GPIO_OE, info, p), BIT(p),
|
||||
regmap_update_bits(info->map, REG(OCELOT_GPIO_OE, info, pin), BIT(p),
|
||||
input ? 0 : BIT(p));
|
||||
|
||||
return 0;
|
||||
@ -445,9 +447,9 @@ static int ocelot_gpio_request_enable(struct pinctrl_dev *pctldev,
|
||||
struct ocelot_pinctrl *info = pinctrl_dev_get_drvdata(pctldev);
|
||||
unsigned int p = offset % 32;
|
||||
|
||||
regmap_update_bits(info->map, REG(OCELOT_GPIO_ALT0, info, offset),
|
||||
regmap_update_bits(info->map, REG_ALT(0, info, offset),
|
||||
BIT(p), 0);
|
||||
regmap_update_bits(info->map, REG(OCELOT_GPIO_ALT1, info, offset),
|
||||
regmap_update_bits(info->map, REG_ALT(1, info, offset),
|
||||
BIT(p), 0);
|
||||
|
||||
return 0;
|
||||
|
@ -763,6 +763,7 @@ static int pvscsi_queue_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd
|
||||
struct pvscsi_adapter *adapter = shost_priv(host);
|
||||
struct pvscsi_ctx *ctx;
|
||||
unsigned long flags;
|
||||
unsigned char op;
|
||||
|
||||
spin_lock_irqsave(&adapter->hw_lock, flags);
|
||||
|
||||
@ -775,13 +776,14 @@ static int pvscsi_queue_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd
|
||||
}
|
||||
|
||||
cmd->scsi_done = done;
|
||||
op = cmd->cmnd[0];
|
||||
|
||||
dev_dbg(&cmd->device->sdev_gendev,
|
||||
"queued cmd %p, ctx %p, op=%x\n", cmd, ctx, cmd->cmnd[0]);
|
||||
"queued cmd %p, ctx %p, op=%x\n", cmd, ctx, op);
|
||||
|
||||
spin_unlock_irqrestore(&adapter->hw_lock, flags);
|
||||
|
||||
pvscsi_kick_io(adapter, cmd->cmnd[0]);
|
||||
pvscsi_kick_io(adapter, op);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -275,9 +275,9 @@ static void afs_break_one_callback(struct afs_server *server,
|
||||
struct afs_super_info *as = AFS_FS_S(cbi->sb);
|
||||
struct afs_volume *volume = as->volume;
|
||||
|
||||
write_lock(&volume->cb_break_lock);
|
||||
write_lock(&volume->cb_v_break_lock);
|
||||
volume->cb_v_break++;
|
||||
write_unlock(&volume->cb_break_lock);
|
||||
write_unlock(&volume->cb_v_break_lock);
|
||||
} else {
|
||||
data.volume = NULL;
|
||||
data.fid = *fid;
|
||||
|
@ -55,6 +55,16 @@ static noinline void dump_vnode(struct afs_vnode *vnode, struct afs_vnode *paren
|
||||
dump_stack();
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the file size and block count. Estimate the number of 512 bytes blocks
|
||||
* used, rounded up to nearest 1K for consistency with other AFS clients.
|
||||
*/
|
||||
static void afs_set_i_size(struct afs_vnode *vnode, u64 size)
|
||||
{
|
||||
i_size_write(&vnode->vfs_inode, size);
|
||||
vnode->vfs_inode.i_blocks = ((size + 1023) >> 10) << 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialise an inode from the vnode status.
|
||||
*/
|
||||
@ -124,12 +134,7 @@ static int afs_inode_init_from_status(struct afs_vnode *vnode, struct key *key,
|
||||
return afs_protocol_error(NULL, -EBADMSG, afs_eproto_file_type);
|
||||
}
|
||||
|
||||
/*
|
||||
* Estimate 512 bytes blocks used, rounded up to nearest 1K
|
||||
* for consistency with other AFS clients.
|
||||
*/
|
||||
inode->i_blocks = ((i_size_read(inode) + 1023) >> 10) << 1;
|
||||
i_size_write(&vnode->vfs_inode, status->size);
|
||||
afs_set_i_size(vnode, status->size);
|
||||
|
||||
vnode->invalid_before = status->data_version;
|
||||
inode_set_iversion_raw(&vnode->vfs_inode, status->data_version);
|
||||
@ -207,11 +212,13 @@ static void afs_apply_status(struct afs_fs_cursor *fc,
|
||||
|
||||
if (expected_version &&
|
||||
*expected_version != status->data_version) {
|
||||
kdebug("vnode modified %llx on {%llx:%llu} [exp %llx] %s",
|
||||
(unsigned long long) status->data_version,
|
||||
vnode->fid.vid, vnode->fid.vnode,
|
||||
(unsigned long long) *expected_version,
|
||||
fc->type ? fc->type->name : "???");
|
||||
if (test_bit(AFS_VNODE_CB_PROMISED, &vnode->flags))
|
||||
pr_warn("kAFS: vnode modified {%llx:%llu} %llx->%llx %s\n",
|
||||
vnode->fid.vid, vnode->fid.vnode,
|
||||
(unsigned long long)*expected_version,
|
||||
(unsigned long long)status->data_version,
|
||||
fc->type ? fc->type->name : "???");
|
||||
|
||||
vnode->invalid_before = status->data_version;
|
||||
if (vnode->status.type == AFS_FTYPE_DIR) {
|
||||
if (test_and_clear_bit(AFS_VNODE_DIR_VALID, &vnode->flags))
|
||||
@ -230,7 +237,7 @@ static void afs_apply_status(struct afs_fs_cursor *fc,
|
||||
|
||||
if (data_changed) {
|
||||
inode_set_iversion_raw(&vnode->vfs_inode, status->data_version);
|
||||
i_size_write(&vnode->vfs_inode, status->size);
|
||||
afs_set_i_size(vnode, status->size);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -109,10 +109,8 @@ struct afs_call {
|
||||
struct rxrpc_call *rxcall; /* RxRPC call handle */
|
||||
struct key *key; /* security for this call */
|
||||
struct afs_net *net; /* The network namespace */
|
||||
union {
|
||||
struct afs_server *server;
|
||||
struct afs_vlserver *vlserver;
|
||||
};
|
||||
struct afs_server *server; /* The fileserver record if fs op (pins ref) */
|
||||
struct afs_vlserver *vlserver; /* The vlserver record if vl op */
|
||||
struct afs_cb_interest *cbi; /* Callback interest for server used */
|
||||
struct afs_vnode *lvnode; /* vnode being locked */
|
||||
void *request; /* request data (first part) */
|
||||
@ -616,7 +614,7 @@ struct afs_volume {
|
||||
unsigned int servers_seq; /* Incremented each time ->servers changes */
|
||||
|
||||
unsigned cb_v_break; /* Break-everything counter. */
|
||||
rwlock_t cb_break_lock;
|
||||
rwlock_t cb_v_break_lock;
|
||||
|
||||
afs_voltype_t type; /* type of volume */
|
||||
short error;
|
||||
|
@ -43,6 +43,7 @@ static struct afs_volume *afs_alloc_volume(struct afs_fs_context *params,
|
||||
atomic_set(&volume->usage, 1);
|
||||
INIT_LIST_HEAD(&volume->proc_link);
|
||||
rwlock_init(&volume->servers_lock);
|
||||
rwlock_init(&volume->cb_v_break_lock);
|
||||
memcpy(volume->name, vldb->name, vldb->name_len + 1);
|
||||
|
||||
slist = afs_alloc_server_list(params->cell, params->key, vldb, type_mask);
|
||||
|
28
fs/aio.c
28
fs/aio.c
@ -2095,6 +2095,7 @@ SYSCALL_DEFINE6(io_pgetevents,
|
||||
struct __aio_sigset ksig = { NULL, };
|
||||
sigset_t ksigmask, sigsaved;
|
||||
struct timespec64 ts;
|
||||
bool interrupted;
|
||||
int ret;
|
||||
|
||||
if (timeout && unlikely(get_timespec64(&ts, timeout)))
|
||||
@ -2108,8 +2109,10 @@ SYSCALL_DEFINE6(io_pgetevents,
|
||||
return ret;
|
||||
|
||||
ret = do_io_getevents(ctx_id, min_nr, nr, events, timeout ? &ts : NULL);
|
||||
restore_user_sigmask(ksig.sigmask, &sigsaved);
|
||||
if (signal_pending(current) && !ret)
|
||||
|
||||
interrupted = signal_pending(current);
|
||||
restore_user_sigmask(ksig.sigmask, &sigsaved, interrupted);
|
||||
if (interrupted && !ret)
|
||||
ret = -ERESTARTNOHAND;
|
||||
|
||||
return ret;
|
||||
@ -2128,6 +2131,7 @@ SYSCALL_DEFINE6(io_pgetevents_time32,
|
||||
struct __aio_sigset ksig = { NULL, };
|
||||
sigset_t ksigmask, sigsaved;
|
||||
struct timespec64 ts;
|
||||
bool interrupted;
|
||||
int ret;
|
||||
|
||||
if (timeout && unlikely(get_old_timespec32(&ts, timeout)))
|
||||
@ -2142,8 +2146,10 @@ SYSCALL_DEFINE6(io_pgetevents_time32,
|
||||
return ret;
|
||||
|
||||
ret = do_io_getevents(ctx_id, min_nr, nr, events, timeout ? &ts : NULL);
|
||||
restore_user_sigmask(ksig.sigmask, &sigsaved);
|
||||
if (signal_pending(current) && !ret)
|
||||
|
||||
interrupted = signal_pending(current);
|
||||
restore_user_sigmask(ksig.sigmask, &sigsaved, interrupted);
|
||||
if (interrupted && !ret)
|
||||
ret = -ERESTARTNOHAND;
|
||||
|
||||
return ret;
|
||||
@ -2193,6 +2199,7 @@ COMPAT_SYSCALL_DEFINE6(io_pgetevents,
|
||||
struct __compat_aio_sigset ksig = { NULL, };
|
||||
sigset_t ksigmask, sigsaved;
|
||||
struct timespec64 t;
|
||||
bool interrupted;
|
||||
int ret;
|
||||
|
||||
if (timeout && get_old_timespec32(&t, timeout))
|
||||
@ -2206,8 +2213,10 @@ COMPAT_SYSCALL_DEFINE6(io_pgetevents,
|
||||
return ret;
|
||||
|
||||
ret = do_io_getevents(ctx_id, min_nr, nr, events, timeout ? &t : NULL);
|
||||
restore_user_sigmask(ksig.sigmask, &sigsaved);
|
||||
if (signal_pending(current) && !ret)
|
||||
|
||||
interrupted = signal_pending(current);
|
||||
restore_user_sigmask(ksig.sigmask, &sigsaved, interrupted);
|
||||
if (interrupted && !ret)
|
||||
ret = -ERESTARTNOHAND;
|
||||
|
||||
return ret;
|
||||
@ -2226,6 +2235,7 @@ COMPAT_SYSCALL_DEFINE6(io_pgetevents_time64,
|
||||
struct __compat_aio_sigset ksig = { NULL, };
|
||||
sigset_t ksigmask, sigsaved;
|
||||
struct timespec64 t;
|
||||
bool interrupted;
|
||||
int ret;
|
||||
|
||||
if (timeout && get_timespec64(&t, timeout))
|
||||
@ -2239,8 +2249,10 @@ COMPAT_SYSCALL_DEFINE6(io_pgetevents_time64,
|
||||
return ret;
|
||||
|
||||
ret = do_io_getevents(ctx_id, min_nr, nr, events, timeout ? &t : NULL);
|
||||
restore_user_sigmask(ksig.sigmask, &sigsaved);
|
||||
if (signal_pending(current) && !ret)
|
||||
|
||||
interrupted = signal_pending(current);
|
||||
restore_user_sigmask(ksig.sigmask, &sigsaved, interrupted);
|
||||
if (interrupted && !ret)
|
||||
ret = -ERESTARTNOHAND;
|
||||
|
||||
return ret;
|
||||
|
@ -856,9 +856,14 @@ static int load_flat_file(struct linux_binprm *bprm,
|
||||
|
||||
static int load_flat_shared_library(int id, struct lib_info *libs)
|
||||
{
|
||||
/*
|
||||
* This is a fake bprm struct; only the members "buf", "file" and
|
||||
* "filename" are actually used.
|
||||
*/
|
||||
struct linux_binprm bprm;
|
||||
int res;
|
||||
char buf[16];
|
||||
loff_t pos = 0;
|
||||
|
||||
memset(&bprm, 0, sizeof(bprm));
|
||||
|
||||
@ -872,25 +877,11 @@ static int load_flat_shared_library(int id, struct lib_info *libs)
|
||||
if (IS_ERR(bprm.file))
|
||||
return res;
|
||||
|
||||
bprm.cred = prepare_exec_creds();
|
||||
res = -ENOMEM;
|
||||
if (!bprm.cred)
|
||||
goto out;
|
||||
res = kernel_read(bprm.file, bprm.buf, BINPRM_BUF_SIZE, &pos);
|
||||
|
||||
/* We don't really care about recalculating credentials at this point
|
||||
* as we're past the point of no return and are dealing with shared
|
||||
* libraries.
|
||||
*/
|
||||
bprm.called_set_creds = 1;
|
||||
|
||||
res = prepare_binprm(&bprm);
|
||||
|
||||
if (!res)
|
||||
if (res >= 0)
|
||||
res = load_flat_file(&bprm, libs, id, NULL);
|
||||
|
||||
abort_creds(bprm.cred);
|
||||
|
||||
out:
|
||||
allow_write_access(bprm.file);
|
||||
fput(bprm.file);
|
||||
|
||||
|
@ -2121,9 +2121,10 @@ char *ceph_mdsc_build_path(struct dentry *dentry, int *plen, u64 *pbase,
|
||||
if (inode && ceph_snap(inode) == CEPH_SNAPDIR) {
|
||||
dout("build_path path+%d: %p SNAPDIR\n",
|
||||
pos, temp);
|
||||
} else if (stop_on_nosnap && inode &&
|
||||
} else if (stop_on_nosnap && inode && dentry != temp &&
|
||||
ceph_snap(inode) == CEPH_NOSNAP) {
|
||||
spin_unlock(&temp->d_lock);
|
||||
pos++; /* get rid of any prepended '/' */
|
||||
break;
|
||||
} else {
|
||||
pos -= temp->d_name.len;
|
||||
|
@ -2327,7 +2327,7 @@ SYSCALL_DEFINE6(epoll_pwait, int, epfd, struct epoll_event __user *, events,
|
||||
|
||||
error = do_epoll_wait(epfd, events, maxevents, timeout);
|
||||
|
||||
restore_user_sigmask(sigmask, &sigsaved);
|
||||
restore_user_sigmask(sigmask, &sigsaved, error == -EINTR);
|
||||
|
||||
return error;
|
||||
}
|
||||
@ -2352,7 +2352,7 @@ COMPAT_SYSCALL_DEFINE6(epoll_pwait, int, epfd,
|
||||
|
||||
err = do_epoll_wait(epfd, events, maxevents, timeout);
|
||||
|
||||
restore_user_sigmask(sigmask, &sigsaved);
|
||||
restore_user_sigmask(sigmask, &sigsaved, err == -EINTR);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
@ -362,7 +362,7 @@ EXPORT_SYMBOL(inc_nlink);
|
||||
|
||||
static void __address_space_init_once(struct address_space *mapping)
|
||||
{
|
||||
xa_init_flags(&mapping->i_pages, XA_FLAGS_LOCK_IRQ);
|
||||
xa_init_flags(&mapping->i_pages, XA_FLAGS_LOCK_IRQ | XA_FLAGS_ACCOUNT);
|
||||
init_rwsem(&mapping->i_mmap_rwsem);
|
||||
INIT_LIST_HEAD(&mapping->private_list);
|
||||
spin_lock_init(&mapping->private_lock);
|
||||
|
@ -579,6 +579,7 @@ static struct io_kiocb *io_get_req(struct io_ring_ctx *ctx,
|
||||
state->cur_req++;
|
||||
}
|
||||
|
||||
req->file = NULL;
|
||||
req->ctx = ctx;
|
||||
req->flags = 0;
|
||||
/* one is dropped after submission, the other at completion */
|
||||
@ -1801,10 +1802,8 @@ static int io_req_set_file(struct io_ring_ctx *ctx, const struct sqe_submit *s,
|
||||
req->sequence = ctx->cached_sq_head - 1;
|
||||
}
|
||||
|
||||
if (!io_op_needs_file(s->sqe)) {
|
||||
req->file = NULL;
|
||||
if (!io_op_needs_file(s->sqe))
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (flags & IOSQE_FIXED_FILE) {
|
||||
if (unlikely(!ctx->user_files ||
|
||||
@ -2201,11 +2200,12 @@ static int io_cqring_wait(struct io_ring_ctx *ctx, int min_events,
|
||||
}
|
||||
|
||||
ret = wait_event_interruptible(ctx->wait, io_cqring_events(ring) >= min_events);
|
||||
if (ret == -ERESTARTSYS)
|
||||
ret = -EINTR;
|
||||
|
||||
if (sig)
|
||||
restore_user_sigmask(sig, &sigsaved);
|
||||
restore_user_sigmask(sig, &sigsaved, ret == -ERESTARTSYS);
|
||||
|
||||
if (ret == -ERESTARTSYS)
|
||||
ret = -EINTR;
|
||||
|
||||
return READ_ONCE(ring->r.head) == READ_ONCE(ring->r.tail) ? ret : 0;
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#define NFSDBG_FACILITY NFSDBG_PNFS_LD
|
||||
|
||||
static unsigned int dataserver_timeo = NFS_DEF_TCP_RETRANS;
|
||||
static unsigned int dataserver_timeo = NFS_DEF_TCP_TIMEO;
|
||||
static unsigned int dataserver_retrans;
|
||||
|
||||
static bool ff_layout_has_available_ds(struct pnfs_layout_segment *lseg);
|
||||
|
@ -462,7 +462,7 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
|
||||
* a program is not able to use ptrace(2) in that case. It is
|
||||
* safe because the task has stopped executing permanently.
|
||||
*/
|
||||
if (permitted && (task->flags & PF_DUMPCORE)) {
|
||||
if (permitted && (task->flags & (PF_EXITING|PF_DUMPCORE))) {
|
||||
if (try_get_task_stack(task)) {
|
||||
eip = KSTK_EIP(task);
|
||||
esp = KSTK_ESP(task);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user