Merge "Merge android-4.19-q.75 (cfe571e) into msm-4.19"
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
commit
eca47d45e3
@@ -325,7 +325,7 @@ beneath or above the path of another overlay lower layer path.
|
|||||||
|
|
||||||
Using an upper layer path and/or a workdir path that are already used by
|
Using an upper layer path and/or a workdir path that are already used by
|
||||||
another overlay mount is not allowed and may fail with EBUSY. Using
|
another overlay mount is not allowed and may fail with EBUSY. Using
|
||||||
partially overlapping paths is not allowed but will not fail with EBUSY.
|
partially overlapping paths is not allowed and may fail with EBUSY.
|
||||||
If files are accessed from two overlayfs mounts which share or overlap the
|
If files are accessed from two overlayfs mounts which share or overlap the
|
||||||
upper layer and/or workdir path the behavior of the overlay is undefined,
|
upper layer and/or workdir path the behavior of the overlay is undefined,
|
||||||
though it will not result in a crash or deadlock.
|
though it will not result in a crash or deadlock.
|
||||||
|
|||||||
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
VERSION = 4
|
VERSION = 4
|
||||||
PATCHLEVEL = 19
|
PATCHLEVEL = 19
|
||||||
SUBLEVEL = 73
|
SUBLEVEL = 75
|
||||||
EXTRAVERSION =
|
EXTRAVERSION =
|
||||||
NAME = "People's Front"
|
NAME = "People's Front"
|
||||||
|
|
||||||
|
|||||||
@@ -98,14 +98,9 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
&mmc1 {
|
&mmc1 {
|
||||||
pinctrl-names = "default", "hs", "sdr12", "sdr25", "sdr50", "ddr50", "sdr104";
|
pinctrl-names = "default", "hs";
|
||||||
pinctrl-0 = <&mmc1_pins_default_no_clk_pu>;
|
pinctrl-0 = <&mmc1_pins_default_no_clk_pu>;
|
||||||
pinctrl-1 = <&mmc1_pins_hs>;
|
pinctrl-1 = <&mmc1_pins_hs>;
|
||||||
pinctrl-2 = <&mmc1_pins_sdr12>;
|
|
||||||
pinctrl-3 = <&mmc1_pins_sdr25>;
|
|
||||||
pinctrl-4 = <&mmc1_pins_sdr50>;
|
|
||||||
pinctrl-5 = <&mmc1_pins_ddr50_rev20 &mmc1_iodelay_ddr50_conf>;
|
|
||||||
pinctrl-6 = <&mmc1_pins_sdr104 &mmc1_iodelay_sdr104_rev20_conf>;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
&mmc2 {
|
&mmc2 {
|
||||||
|
|||||||
@@ -20,14 +20,9 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
&mmc1 {
|
&mmc1 {
|
||||||
pinctrl-names = "default", "hs", "sdr12", "sdr25", "sdr50", "ddr50", "sdr104";
|
pinctrl-names = "default", "hs";
|
||||||
pinctrl-0 = <&mmc1_pins_default_no_clk_pu>;
|
pinctrl-0 = <&mmc1_pins_default_no_clk_pu>;
|
||||||
pinctrl-1 = <&mmc1_pins_hs>;
|
pinctrl-1 = <&mmc1_pins_hs>;
|
||||||
pinctrl-2 = <&mmc1_pins_sdr12>;
|
|
||||||
pinctrl-3 = <&mmc1_pins_sdr25>;
|
|
||||||
pinctrl-4 = <&mmc1_pins_sdr50>;
|
|
||||||
pinctrl-5 = <&mmc1_pins_ddr50 &mmc1_iodelay_ddr_rev20_conf>;
|
|
||||||
pinctrl-6 = <&mmc1_pins_sdr104 &mmc1_iodelay_sdr104_rev20_conf>;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
&mmc2 {
|
&mmc2 {
|
||||||
|
|||||||
@@ -24,14 +24,9 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
&mmc1 {
|
&mmc1 {
|
||||||
pinctrl-names = "default", "hs", "sdr12", "sdr25", "sdr50", "ddr50", "sdr104";
|
pinctrl-names = "default", "hs";
|
||||||
pinctrl-0 = <&mmc1_pins_default_no_clk_pu>;
|
pinctrl-0 = <&mmc1_pins_default_no_clk_pu>;
|
||||||
pinctrl-1 = <&mmc1_pins_hs>;
|
pinctrl-1 = <&mmc1_pins_hs>;
|
||||||
pinctrl-2 = <&mmc1_pins_default>;
|
|
||||||
pinctrl-3 = <&mmc1_pins_hs>;
|
|
||||||
pinctrl-4 = <&mmc1_pins_sdr50>;
|
|
||||||
pinctrl-5 = <&mmc1_pins_ddr50 &mmc1_iodelay_ddr_conf>;
|
|
||||||
pinctrl-6 = <&mmc1_pins_ddr50 &mmc1_iodelay_sdr104_conf>;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
&mmc2 {
|
&mmc2 {
|
||||||
|
|||||||
@@ -433,6 +433,7 @@
|
|||||||
|
|
||||||
bus-width = <4>;
|
bus-width = <4>;
|
||||||
cd-gpios = <&gpio6 27 GPIO_ACTIVE_LOW>; /* gpio 219 */
|
cd-gpios = <&gpio6 27 GPIO_ACTIVE_LOW>; /* gpio 219 */
|
||||||
|
no-1-8-v;
|
||||||
};
|
};
|
||||||
|
|
||||||
&mmc2 {
|
&mmc2 {
|
||||||
|
|||||||
@@ -19,14 +19,9 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
&mmc1 {
|
&mmc1 {
|
||||||
pinctrl-names = "default", "hs", "sdr12", "sdr25", "sdr50", "ddr50", "sdr104";
|
pinctrl-names = "default", "hs";
|
||||||
pinctrl-0 = <&mmc1_pins_default>;
|
pinctrl-0 = <&mmc1_pins_default>;
|
||||||
pinctrl-1 = <&mmc1_pins_hs>;
|
pinctrl-1 = <&mmc1_pins_hs>;
|
||||||
pinctrl-2 = <&mmc1_pins_sdr12>;
|
|
||||||
pinctrl-3 = <&mmc1_pins_sdr25>;
|
|
||||||
pinctrl-4 = <&mmc1_pins_sdr50>;
|
|
||||||
pinctrl-5 = <&mmc1_pins_ddr50 &mmc1_iodelay_ddr_rev11_conf>;
|
|
||||||
pinctrl-6 = <&mmc1_pins_sdr104 &mmc1_iodelay_sdr104_rev11_conf>;
|
|
||||||
vmmc-supply = <&vdd_3v3>;
|
vmmc-supply = <&vdd_3v3>;
|
||||||
vqmmc-supply = <&ldo1_reg>;
|
vqmmc-supply = <&ldo1_reg>;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -19,14 +19,9 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
&mmc1 {
|
&mmc1 {
|
||||||
pinctrl-names = "default", "hs", "sdr12", "sdr25", "sdr50", "ddr50", "sdr104";
|
pinctrl-names = "default", "hs";
|
||||||
pinctrl-0 = <&mmc1_pins_default>;
|
pinctrl-0 = <&mmc1_pins_default>;
|
||||||
pinctrl-1 = <&mmc1_pins_hs>;
|
pinctrl-1 = <&mmc1_pins_hs>;
|
||||||
pinctrl-2 = <&mmc1_pins_sdr12>;
|
|
||||||
pinctrl-3 = <&mmc1_pins_sdr25>;
|
|
||||||
pinctrl-4 = <&mmc1_pins_sdr50>;
|
|
||||||
pinctrl-5 = <&mmc1_pins_ddr50 &mmc1_iodelay_ddr_rev20_conf>;
|
|
||||||
pinctrl-6 = <&mmc1_pins_sdr104 &mmc1_iodelay_sdr104_rev20_conf>;
|
|
||||||
vmmc-supply = <&vdd_3v3>;
|
vmmc-supply = <&vdd_3v3>;
|
||||||
vqmmc-supply = <&ldo1_reg>;
|
vqmmc-supply = <&ldo1_reg>;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
*
|
*
|
||||||
* Datamanual Revisions:
|
* Datamanual Revisions:
|
||||||
*
|
*
|
||||||
* AM572x Silicon Revision 2.0: SPRS953B, Revised November 2016
|
* AM572x Silicon Revision 2.0: SPRS953F, Revised May 2019
|
||||||
* AM572x Silicon Revision 1.1: SPRS915R, Revised November 2016
|
* AM572x Silicon Revision 1.1: SPRS915R, Revised November 2016
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -229,45 +229,45 @@
|
|||||||
|
|
||||||
mmc3_pins_default: mmc3_pins_default {
|
mmc3_pins_default: mmc3_pins_default {
|
||||||
pinctrl-single,pins = <
|
pinctrl-single,pins = <
|
||||||
DRA7XX_CORE_IOPAD(0x377c, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_clk.mmc3_clk */
|
DRA7XX_CORE_IOPAD(0x377c, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_clk.mmc3_clk */
|
||||||
DRA7XX_CORE_IOPAD(0x3780, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_cmd.mmc3_cmd */
|
DRA7XX_CORE_IOPAD(0x3780, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_cmd.mmc3_cmd */
|
||||||
DRA7XX_CORE_IOPAD(0x3784, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_dat0.mmc3_dat0 */
|
DRA7XX_CORE_IOPAD(0x3784, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_dat0.mmc3_dat0 */
|
||||||
DRA7XX_CORE_IOPAD(0x3788, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_dat1.mmc3_dat1 */
|
DRA7XX_CORE_IOPAD(0x3788, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_dat1.mmc3_dat1 */
|
||||||
DRA7XX_CORE_IOPAD(0x378c, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_dat2.mmc3_dat2 */
|
DRA7XX_CORE_IOPAD(0x378c, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_dat2.mmc3_dat2 */
|
||||||
DRA7XX_CORE_IOPAD(0x3790, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_dat3.mmc3_dat3 */
|
DRA7XX_CORE_IOPAD(0x3790, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_dat3.mmc3_dat3 */
|
||||||
>;
|
>;
|
||||||
};
|
};
|
||||||
|
|
||||||
mmc3_pins_hs: mmc3_pins_hs {
|
mmc3_pins_hs: mmc3_pins_hs {
|
||||||
pinctrl-single,pins = <
|
pinctrl-single,pins = <
|
||||||
DRA7XX_CORE_IOPAD(0x377c, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_clk.mmc3_clk */
|
DRA7XX_CORE_IOPAD(0x377c, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_clk.mmc3_clk */
|
||||||
DRA7XX_CORE_IOPAD(0x3780, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_cmd.mmc3_cmd */
|
DRA7XX_CORE_IOPAD(0x3780, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_cmd.mmc3_cmd */
|
||||||
DRA7XX_CORE_IOPAD(0x3784, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_dat0.mmc3_dat0 */
|
DRA7XX_CORE_IOPAD(0x3784, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_dat0.mmc3_dat0 */
|
||||||
DRA7XX_CORE_IOPAD(0x3788, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_dat1.mmc3_dat1 */
|
DRA7XX_CORE_IOPAD(0x3788, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_dat1.mmc3_dat1 */
|
||||||
DRA7XX_CORE_IOPAD(0x378c, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_dat2.mmc3_dat2 */
|
DRA7XX_CORE_IOPAD(0x378c, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_dat2.mmc3_dat2 */
|
||||||
DRA7XX_CORE_IOPAD(0x3790, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_dat3.mmc3_dat3 */
|
DRA7XX_CORE_IOPAD(0x3790, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_dat3.mmc3_dat3 */
|
||||||
>;
|
>;
|
||||||
};
|
};
|
||||||
|
|
||||||
mmc3_pins_sdr12: mmc3_pins_sdr12 {
|
mmc3_pins_sdr12: mmc3_pins_sdr12 {
|
||||||
pinctrl-single,pins = <
|
pinctrl-single,pins = <
|
||||||
DRA7XX_CORE_IOPAD(0x377c, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_clk.mmc3_clk */
|
DRA7XX_CORE_IOPAD(0x377c, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_clk.mmc3_clk */
|
||||||
DRA7XX_CORE_IOPAD(0x3780, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_cmd.mmc3_cmd */
|
DRA7XX_CORE_IOPAD(0x3780, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_cmd.mmc3_cmd */
|
||||||
DRA7XX_CORE_IOPAD(0x3784, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_dat0.mmc3_dat0 */
|
DRA7XX_CORE_IOPAD(0x3784, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_dat0.mmc3_dat0 */
|
||||||
DRA7XX_CORE_IOPAD(0x3788, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_dat1.mmc3_dat1 */
|
DRA7XX_CORE_IOPAD(0x3788, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_dat1.mmc3_dat1 */
|
||||||
DRA7XX_CORE_IOPAD(0x378c, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_dat2.mmc3_dat2 */
|
DRA7XX_CORE_IOPAD(0x378c, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_dat2.mmc3_dat2 */
|
||||||
DRA7XX_CORE_IOPAD(0x3790, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_dat3.mmc3_dat3 */
|
DRA7XX_CORE_IOPAD(0x3790, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_dat3.mmc3_dat3 */
|
||||||
>;
|
>;
|
||||||
};
|
};
|
||||||
|
|
||||||
mmc3_pins_sdr25: mmc3_pins_sdr25 {
|
mmc3_pins_sdr25: mmc3_pins_sdr25 {
|
||||||
pinctrl-single,pins = <
|
pinctrl-single,pins = <
|
||||||
DRA7XX_CORE_IOPAD(0x377c, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_clk.mmc3_clk */
|
DRA7XX_CORE_IOPAD(0x377c, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_clk.mmc3_clk */
|
||||||
DRA7XX_CORE_IOPAD(0x3780, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_cmd.mmc3_cmd */
|
DRA7XX_CORE_IOPAD(0x3780, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_cmd.mmc3_cmd */
|
||||||
DRA7XX_CORE_IOPAD(0x3784, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_dat0.mmc3_dat0 */
|
DRA7XX_CORE_IOPAD(0x3784, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_dat0.mmc3_dat0 */
|
||||||
DRA7XX_CORE_IOPAD(0x3788, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_dat1.mmc3_dat1 */
|
DRA7XX_CORE_IOPAD(0x3788, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_dat1.mmc3_dat1 */
|
||||||
DRA7XX_CORE_IOPAD(0x378c, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_dat2.mmc3_dat2 */
|
DRA7XX_CORE_IOPAD(0x378c, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_dat2.mmc3_dat2 */
|
||||||
DRA7XX_CORE_IOPAD(0x3790, (PIN_INPUT_PULLUP | MUX_MODE0)) /* mmc3_dat3.mmc3_dat3 */
|
DRA7XX_CORE_IOPAD(0x3790, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)) /* mmc3_dat3.mmc3_dat3 */
|
||||||
>;
|
>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -135,6 +135,8 @@ restart:
|
|||||||
orr r11, r11, r13 @ mask all requested interrupts
|
orr r11, r11, r13 @ mask all requested interrupts
|
||||||
str r11, [r12, #OMAP1510_GPIO_INT_MASK]
|
str r11, [r12, #OMAP1510_GPIO_INT_MASK]
|
||||||
|
|
||||||
|
str r13, [r12, #OMAP1510_GPIO_INT_STATUS] @ ack all requested interrupts
|
||||||
|
|
||||||
ands r10, r13, #KEYBRD_CLK_MASK @ extract keyboard status - set?
|
ands r10, r13, #KEYBRD_CLK_MASK @ extract keyboard status - set?
|
||||||
beq hksw @ no - try next source
|
beq hksw @ no - try next source
|
||||||
|
|
||||||
@@ -142,7 +144,6 @@ restart:
|
|||||||
@@@@@@@@@@@@@@@@@@@@@@
|
@@@@@@@@@@@@@@@@@@@@@@
|
||||||
@ Keyboard clock FIQ mode interrupt handler
|
@ Keyboard clock FIQ mode interrupt handler
|
||||||
@ r10 now contains KEYBRD_CLK_MASK, use it
|
@ r10 now contains KEYBRD_CLK_MASK, use it
|
||||||
str r10, [r12, #OMAP1510_GPIO_INT_STATUS] @ ack the interrupt
|
|
||||||
bic r11, r11, r10 @ unmask it
|
bic r11, r11, r10 @ unmask it
|
||||||
str r11, [r12, #OMAP1510_GPIO_INT_MASK]
|
str r11, [r12, #OMAP1510_GPIO_INT_MASK]
|
||||||
|
|
||||||
|
|||||||
@@ -73,9 +73,7 @@ static irqreturn_t deferred_fiq(int irq, void *dev_id)
|
|||||||
* interrupts default to since commit 80ac93c27441
|
* interrupts default to since commit 80ac93c27441
|
||||||
* requires interrupt already acked and unmasked.
|
* requires interrupt already acked and unmasked.
|
||||||
*/
|
*/
|
||||||
if (irq_chip->irq_ack)
|
if (!WARN_ON_ONCE(!irq_chip->irq_unmask))
|
||||||
irq_chip->irq_ack(d);
|
|
||||||
if (irq_chip->irq_unmask)
|
|
||||||
irq_chip->irq_unmask(d);
|
irq_chip->irq_unmask(d);
|
||||||
}
|
}
|
||||||
for (; irq_counter[gpio] < fiq_count; irq_counter[gpio]++)
|
for (; irq_counter[gpio] < fiq_count; irq_counter[gpio]++)
|
||||||
|
|||||||
@@ -131,6 +131,9 @@ static int __init omap4_sram_init(void)
|
|||||||
struct device_node *np;
|
struct device_node *np;
|
||||||
struct gen_pool *sram_pool;
|
struct gen_pool *sram_pool;
|
||||||
|
|
||||||
|
if (!soc_is_omap44xx() && !soc_is_omap54xx())
|
||||||
|
return 0;
|
||||||
|
|
||||||
np = of_find_compatible_node(NULL, NULL, "ti,omap4-mpu");
|
np = of_find_compatible_node(NULL, NULL, "ti,omap4-mpu");
|
||||||
if (!np)
|
if (!np)
|
||||||
pr_warn("%s:Unable to allocate sram needed to handle errata I688\n",
|
pr_warn("%s:Unable to allocate sram needed to handle errata I688\n",
|
||||||
|
|||||||
@@ -385,7 +385,8 @@ static struct omap_hwmod dra7xx_dcan2_hwmod = {
|
|||||||
static struct omap_hwmod_class_sysconfig dra7xx_epwmss_sysc = {
|
static struct omap_hwmod_class_sysconfig dra7xx_epwmss_sysc = {
|
||||||
.rev_offs = 0x0,
|
.rev_offs = 0x0,
|
||||||
.sysc_offs = 0x4,
|
.sysc_offs = 0x4,
|
||||||
.sysc_flags = SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET,
|
.sysc_flags = SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
|
||||||
|
SYSC_HAS_RESET_STATUS,
|
||||||
.idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
|
.idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
|
||||||
.sysc_fields = &omap_hwmod_sysc_type2,
|
.sysc_fields = &omap_hwmod_sysc_type2,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -196,6 +196,11 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max_low,
|
|||||||
#ifdef CONFIG_HAVE_ARCH_PFN_VALID
|
#ifdef CONFIG_HAVE_ARCH_PFN_VALID
|
||||||
int pfn_valid(unsigned long pfn)
|
int pfn_valid(unsigned long pfn)
|
||||||
{
|
{
|
||||||
|
phys_addr_t addr = __pfn_to_phys(pfn);
|
||||||
|
|
||||||
|
if (__phys_to_pfn(addr) != pfn)
|
||||||
|
return 0;
|
||||||
|
|
||||||
return memblock_is_map_memory(__pfn_to_phys(pfn));
|
return memblock_is_map_memory(__pfn_to_phys(pfn));
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(pfn_valid);
|
EXPORT_SYMBOL(pfn_valid);
|
||||||
@@ -713,7 +718,8 @@ static void update_sections_early(struct section_perm perms[], int n)
|
|||||||
if (t->flags & PF_KTHREAD)
|
if (t->flags & PF_KTHREAD)
|
||||||
continue;
|
continue;
|
||||||
for_each_thread(t, s)
|
for_each_thread(t, s)
|
||||||
set_section_perms(perms, n, true, s->mm);
|
if (s->mm)
|
||||||
|
set_section_perms(perms, n, true, s->mm);
|
||||||
}
|
}
|
||||||
set_section_perms(perms, n, true, current->active_mm);
|
set_section_perms(perms, n, true, current->active_mm);
|
||||||
set_section_perms(perms, n, true, &init_mm);
|
set_section_perms(perms, n, true, &init_mm);
|
||||||
|
|||||||
@@ -899,6 +899,12 @@ static bool unmap_kernel_at_el0(const struct arm64_cpu_capabilities *entry,
|
|||||||
static const struct midr_range kpti_safe_list[] = {
|
static const struct midr_range kpti_safe_list[] = {
|
||||||
MIDR_ALL_VERSIONS(MIDR_CAVIUM_THUNDERX2),
|
MIDR_ALL_VERSIONS(MIDR_CAVIUM_THUNDERX2),
|
||||||
MIDR_ALL_VERSIONS(MIDR_BRCM_VULCAN),
|
MIDR_ALL_VERSIONS(MIDR_BRCM_VULCAN),
|
||||||
|
MIDR_ALL_VERSIONS(MIDR_CORTEX_A35),
|
||||||
|
MIDR_ALL_VERSIONS(MIDR_CORTEX_A53),
|
||||||
|
MIDR_ALL_VERSIONS(MIDR_CORTEX_A55),
|
||||||
|
MIDR_ALL_VERSIONS(MIDR_CORTEX_A57),
|
||||||
|
MIDR_ALL_VERSIONS(MIDR_CORTEX_A72),
|
||||||
|
MIDR_ALL_VERSIONS(MIDR_CORTEX_A73),
|
||||||
{ /* sentinel */ }
|
{ /* sentinel */ }
|
||||||
};
|
};
|
||||||
char const *str = "command line option";
|
char const *str = "command line option";
|
||||||
|
|||||||
@@ -306,6 +306,7 @@ extern unsigned long __copy_tofrom_user(void __user *to,
|
|||||||
static inline unsigned long
|
static inline unsigned long
|
||||||
raw_copy_in_user(void __user *to, const void __user *from, unsigned long n)
|
raw_copy_in_user(void __user *to, const void __user *from, unsigned long n)
|
||||||
{
|
{
|
||||||
|
barrier_nospec();
|
||||||
return __copy_tofrom_user(to, from, n);
|
return __copy_tofrom_user(to, from, n);
|
||||||
}
|
}
|
||||||
#endif /* __powerpc64__ */
|
#endif /* __powerpc64__ */
|
||||||
|
|||||||
@@ -521,14 +521,6 @@ void __init radix__early_init_devtree(void)
|
|||||||
mmu_psize_defs[MMU_PAGE_64K].shift = 16;
|
mmu_psize_defs[MMU_PAGE_64K].shift = 16;
|
||||||
mmu_psize_defs[MMU_PAGE_64K].ap = 0x5;
|
mmu_psize_defs[MMU_PAGE_64K].ap = 0x5;
|
||||||
found:
|
found:
|
||||||
#ifdef CONFIG_SPARSEMEM_VMEMMAP
|
|
||||||
if (mmu_psize_defs[MMU_PAGE_2M].shift) {
|
|
||||||
/*
|
|
||||||
* map vmemmap using 2M if available
|
|
||||||
*/
|
|
||||||
mmu_vmemmap_psize = MMU_PAGE_2M;
|
|
||||||
}
|
|
||||||
#endif /* CONFIG_SPARSEMEM_VMEMMAP */
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -567,7 +559,13 @@ void __init radix__early_init_mmu(void)
|
|||||||
|
|
||||||
#ifdef CONFIG_SPARSEMEM_VMEMMAP
|
#ifdef CONFIG_SPARSEMEM_VMEMMAP
|
||||||
/* vmemmap mapping */
|
/* vmemmap mapping */
|
||||||
mmu_vmemmap_psize = mmu_virtual_psize;
|
if (mmu_psize_defs[MMU_PAGE_2M].shift) {
|
||||||
|
/*
|
||||||
|
* map vmemmap using 2M if available
|
||||||
|
*/
|
||||||
|
mmu_vmemmap_psize = MMU_PAGE_2M;
|
||||||
|
} else
|
||||||
|
mmu_vmemmap_psize = mmu_virtual_psize;
|
||||||
#endif
|
#endif
|
||||||
/*
|
/*
|
||||||
* initialize page table size
|
* initialize page table size
|
||||||
|
|||||||
@@ -1879,6 +1879,16 @@ int s390int_to_s390irq(struct kvm_s390_interrupt *s390int,
|
|||||||
case KVM_S390_MCHK:
|
case KVM_S390_MCHK:
|
||||||
irq->u.mchk.mcic = s390int->parm64;
|
irq->u.mchk.mcic = s390int->parm64;
|
||||||
break;
|
break;
|
||||||
|
case KVM_S390_INT_PFAULT_INIT:
|
||||||
|
irq->u.ext.ext_params = s390int->parm;
|
||||||
|
irq->u.ext.ext_params2 = s390int->parm64;
|
||||||
|
break;
|
||||||
|
case KVM_S390_RESTART:
|
||||||
|
case KVM_S390_INT_CLOCK_COMP:
|
||||||
|
case KVM_S390_INT_CPU_TIMER:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -928,6 +928,8 @@ static int kvm_s390_vm_start_migration(struct kvm *kvm)
|
|||||||
/* mark all the pages in active slots as dirty */
|
/* mark all the pages in active slots as dirty */
|
||||||
for (slotnr = 0; slotnr < slots->used_slots; slotnr++) {
|
for (slotnr = 0; slotnr < slots->used_slots; slotnr++) {
|
||||||
ms = slots->memslots + slotnr;
|
ms = slots->memslots + slotnr;
|
||||||
|
if (!ms->dirty_bitmap)
|
||||||
|
return -EINVAL;
|
||||||
/*
|
/*
|
||||||
* The second half of the bitmap is only used on x86,
|
* The second half of the bitmap is only used on x86,
|
||||||
* and would be wasted otherwise, so we put it to good
|
* and would be wasted otherwise, so we put it to good
|
||||||
@@ -3956,7 +3958,7 @@ long kvm_arch_vcpu_async_ioctl(struct file *filp,
|
|||||||
}
|
}
|
||||||
case KVM_S390_INTERRUPT: {
|
case KVM_S390_INTERRUPT: {
|
||||||
struct kvm_s390_interrupt s390int;
|
struct kvm_s390_interrupt s390int;
|
||||||
struct kvm_s390_irq s390irq;
|
struct kvm_s390_irq s390irq = {};
|
||||||
|
|
||||||
if (copy_from_user(&s390int, argp, sizeof(s390int)))
|
if (copy_from_user(&s390int, argp, sizeof(s390int)))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|||||||
@@ -841,7 +841,7 @@ static noinline int bpf_jit_insn(struct bpf_jit *jit, struct bpf_prog *fp, int i
|
|||||||
break;
|
break;
|
||||||
case BPF_ALU64 | BPF_NEG: /* dst = -dst */
|
case BPF_ALU64 | BPF_NEG: /* dst = -dst */
|
||||||
/* lcgr %dst,%dst */
|
/* lcgr %dst,%dst */
|
||||||
EMIT4(0xb9130000, dst_reg, dst_reg);
|
EMIT4(0xb9030000, dst_reg, dst_reg);
|
||||||
break;
|
break;
|
||||||
/*
|
/*
|
||||||
* BPF_FROM_BE/LE
|
* BPF_FROM_BE/LE
|
||||||
@@ -1015,8 +1015,8 @@ static noinline int bpf_jit_insn(struct bpf_jit *jit, struct bpf_prog *fp, int i
|
|||||||
/* llgf %w1,map.max_entries(%b2) */
|
/* llgf %w1,map.max_entries(%b2) */
|
||||||
EMIT6_DISP_LH(0xe3000000, 0x0016, REG_W1, REG_0, BPF_REG_2,
|
EMIT6_DISP_LH(0xe3000000, 0x0016, REG_W1, REG_0, BPF_REG_2,
|
||||||
offsetof(struct bpf_array, map.max_entries));
|
offsetof(struct bpf_array, map.max_entries));
|
||||||
/* clgrj %b3,%w1,0xa,label0: if %b3 >= %w1 goto out */
|
/* clrj %b3,%w1,0xa,label0: if (u32)%b3 >= (u32)%w1 goto out */
|
||||||
EMIT6_PCREL_LABEL(0xec000000, 0x0065, BPF_REG_3,
|
EMIT6_PCREL_LABEL(0xec000000, 0x0077, BPF_REG_3,
|
||||||
REG_W1, 0, 0xa);
|
REG_W1, 0, 0xa);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1042,8 +1042,10 @@ static noinline int bpf_jit_insn(struct bpf_jit *jit, struct bpf_prog *fp, int i
|
|||||||
* goto out;
|
* goto out;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* sllg %r1,%b3,3: %r1 = index * 8 */
|
/* llgfr %r1,%b3: %r1 = (u32) index */
|
||||||
EMIT6_DISP_LH(0xeb000000, 0x000d, REG_1, BPF_REG_3, REG_0, 3);
|
EMIT4(0xb9160000, REG_1, BPF_REG_3);
|
||||||
|
/* sllg %r1,%r1,3: %r1 *= 8 */
|
||||||
|
EMIT6_DISP_LH(0xeb000000, 0x000d, REG_1, REG_1, REG_0, 3);
|
||||||
/* lg %r1,prog(%b2,%r1) */
|
/* lg %r1,prog(%b2,%r1) */
|
||||||
EMIT6_DISP_LH(0xe3000000, 0x0004, REG_1, BPF_REG_2,
|
EMIT6_DISP_LH(0xe3000000, 0x0004, REG_1, BPF_REG_2,
|
||||||
REG_1, offsetof(struct bpf_array, ptrs));
|
REG_1, offsetof(struct bpf_array, ptrs));
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ REALMODE_CFLAGS := $(M16_CFLAGS) -g -Os -DDISABLE_BRANCH_PROFILING \
|
|||||||
|
|
||||||
REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -ffreestanding)
|
REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -ffreestanding)
|
||||||
REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -fno-stack-protector)
|
REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -fno-stack-protector)
|
||||||
|
REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -Wno-address-of-packed-member)
|
||||||
REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), $(cc_stack_align4))
|
REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), $(cc_stack_align4))
|
||||||
export REALMODE_CFLAGS
|
export REALMODE_CFLAGS
|
||||||
|
|
||||||
|
|||||||
@@ -672,10 +672,17 @@ static int perf_ibs_handle_irq(struct perf_ibs *perf_ibs, struct pt_regs *iregs)
|
|||||||
|
|
||||||
throttle = perf_event_overflow(event, &data, ®s);
|
throttle = perf_event_overflow(event, &data, ®s);
|
||||||
out:
|
out:
|
||||||
if (throttle)
|
if (throttle) {
|
||||||
perf_ibs_stop(event, 0);
|
perf_ibs_stop(event, 0);
|
||||||
else
|
} else {
|
||||||
perf_ibs_enable_event(perf_ibs, hwc, period >> 4);
|
period >>= 4;
|
||||||
|
|
||||||
|
if ((ibs_caps & IBS_CAPS_RDWROPCNT) &&
|
||||||
|
(*config & IBS_OP_CNT_CTL))
|
||||||
|
period |= *config & IBS_OP_CUR_CNT_RAND;
|
||||||
|
|
||||||
|
perf_ibs_enable_event(perf_ibs, hwc, period);
|
||||||
|
}
|
||||||
|
|
||||||
perf_event_update_userpage(event);
|
perf_event_update_userpage(event);
|
||||||
|
|
||||||
|
|||||||
@@ -3319,6 +3319,11 @@ static u64 bdw_limit_period(struct perf_event *event, u64 left)
|
|||||||
return left;
|
return left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static u64 nhm_limit_period(struct perf_event *event, u64 left)
|
||||||
|
{
|
||||||
|
return max(left, 32ULL);
|
||||||
|
}
|
||||||
|
|
||||||
PMU_FORMAT_ATTR(event, "config:0-7" );
|
PMU_FORMAT_ATTR(event, "config:0-7" );
|
||||||
PMU_FORMAT_ATTR(umask, "config:8-15" );
|
PMU_FORMAT_ATTR(umask, "config:8-15" );
|
||||||
PMU_FORMAT_ATTR(edge, "config:18" );
|
PMU_FORMAT_ATTR(edge, "config:18" );
|
||||||
@@ -4115,6 +4120,7 @@ __init int intel_pmu_init(void)
|
|||||||
x86_pmu.pebs_constraints = intel_nehalem_pebs_event_constraints;
|
x86_pmu.pebs_constraints = intel_nehalem_pebs_event_constraints;
|
||||||
x86_pmu.enable_all = intel_pmu_nhm_enable_all;
|
x86_pmu.enable_all = intel_pmu_nhm_enable_all;
|
||||||
x86_pmu.extra_regs = intel_nehalem_extra_regs;
|
x86_pmu.extra_regs = intel_nehalem_extra_regs;
|
||||||
|
x86_pmu.limit_period = nhm_limit_period;
|
||||||
|
|
||||||
x86_pmu.cpu_events = nhm_events_attrs;
|
x86_pmu.cpu_events = nhm_events_attrs;
|
||||||
|
|
||||||
|
|||||||
@@ -37,12 +37,14 @@ static inline int fill_gva_list(u64 gva_list[], int offset,
|
|||||||
* Lower 12 bits encode the number of additional
|
* Lower 12 bits encode the number of additional
|
||||||
* pages to flush (in addition to the 'cur' page).
|
* pages to flush (in addition to the 'cur' page).
|
||||||
*/
|
*/
|
||||||
if (diff >= HV_TLB_FLUSH_UNIT)
|
if (diff >= HV_TLB_FLUSH_UNIT) {
|
||||||
gva_list[gva_n] |= ~PAGE_MASK;
|
gva_list[gva_n] |= ~PAGE_MASK;
|
||||||
else if (diff)
|
cur += HV_TLB_FLUSH_UNIT;
|
||||||
|
} else if (diff) {
|
||||||
gva_list[gva_n] |= (diff - 1) >> PAGE_SHIFT;
|
gva_list[gva_n] |= (diff - 1) >> PAGE_SHIFT;
|
||||||
|
cur = end;
|
||||||
|
}
|
||||||
|
|
||||||
cur += HV_TLB_FLUSH_UNIT;
|
|
||||||
gva_n++;
|
gva_n++;
|
||||||
|
|
||||||
} while (cur < end);
|
} while (cur < end);
|
||||||
|
|||||||
@@ -209,16 +209,20 @@ struct x86_pmu_capability {
|
|||||||
#define IBSCTL_LVT_OFFSET_VALID (1ULL<<8)
|
#define IBSCTL_LVT_OFFSET_VALID (1ULL<<8)
|
||||||
#define IBSCTL_LVT_OFFSET_MASK 0x0F
|
#define IBSCTL_LVT_OFFSET_MASK 0x0F
|
||||||
|
|
||||||
/* ibs fetch bits/masks */
|
/* IBS fetch bits/masks */
|
||||||
#define IBS_FETCH_RAND_EN (1ULL<<57)
|
#define IBS_FETCH_RAND_EN (1ULL<<57)
|
||||||
#define IBS_FETCH_VAL (1ULL<<49)
|
#define IBS_FETCH_VAL (1ULL<<49)
|
||||||
#define IBS_FETCH_ENABLE (1ULL<<48)
|
#define IBS_FETCH_ENABLE (1ULL<<48)
|
||||||
#define IBS_FETCH_CNT 0xFFFF0000ULL
|
#define IBS_FETCH_CNT 0xFFFF0000ULL
|
||||||
#define IBS_FETCH_MAX_CNT 0x0000FFFFULL
|
#define IBS_FETCH_MAX_CNT 0x0000FFFFULL
|
||||||
|
|
||||||
/* ibs op bits/masks */
|
/*
|
||||||
/* lower 4 bits of the current count are ignored: */
|
* IBS op bits/masks
|
||||||
#define IBS_OP_CUR_CNT (0xFFFF0ULL<<32)
|
* The lower 7 bits of the current count are random bits
|
||||||
|
* preloaded by hardware and ignored in software
|
||||||
|
*/
|
||||||
|
#define IBS_OP_CUR_CNT (0xFFF80ULL<<32)
|
||||||
|
#define IBS_OP_CUR_CNT_RAND (0x0007FULL<<32)
|
||||||
#define IBS_OP_CNT_CTL (1ULL<<19)
|
#define IBS_OP_CNT_CTL (1ULL<<19)
|
||||||
#define IBS_OP_VAL (1ULL<<18)
|
#define IBS_OP_VAL (1ULL<<18)
|
||||||
#define IBS_OP_ENABLE (1ULL<<17)
|
#define IBS_OP_ENABLE (1ULL<<17)
|
||||||
|
|||||||
@@ -451,8 +451,10 @@ do { \
|
|||||||
({ \
|
({ \
|
||||||
int __gu_err; \
|
int __gu_err; \
|
||||||
__inttype(*(ptr)) __gu_val; \
|
__inttype(*(ptr)) __gu_val; \
|
||||||
|
__typeof__(ptr) __gu_ptr = (ptr); \
|
||||||
|
__typeof__(size) __gu_size = (size); \
|
||||||
__uaccess_begin_nospec(); \
|
__uaccess_begin_nospec(); \
|
||||||
__get_user_size(__gu_val, (ptr), (size), __gu_err, -EFAULT); \
|
__get_user_size(__gu_val, __gu_ptr, __gu_size, __gu_err, -EFAULT); \
|
||||||
__uaccess_end(); \
|
__uaccess_end(); \
|
||||||
(x) = (__force __typeof__(*(ptr)))__gu_val; \
|
(x) = (__force __typeof__(*(ptr)))__gu_val; \
|
||||||
__builtin_expect(__gu_err, 0); \
|
__builtin_expect(__gu_err, 0); \
|
||||||
|
|||||||
@@ -2432,7 +2432,13 @@ unsigned int arch_dynirq_lower_bound(unsigned int from)
|
|||||||
* dmar_alloc_hwirq() may be called before setup_IO_APIC(), so use
|
* dmar_alloc_hwirq() may be called before setup_IO_APIC(), so use
|
||||||
* gsi_top if ioapic_dynirq_base hasn't been initialized yet.
|
* gsi_top if ioapic_dynirq_base hasn't been initialized yet.
|
||||||
*/
|
*/
|
||||||
return ioapic_initialized ? ioapic_dynirq_base : gsi_top;
|
if (!ioapic_initialized)
|
||||||
|
return gsi_top;
|
||||||
|
/*
|
||||||
|
* For DT enabled machines ioapic_dynirq_base is irrelevant and not
|
||||||
|
* updated. So simply return @from if ioapic_dynirq_base == 0.
|
||||||
|
*/
|
||||||
|
return ioapic_dynirq_base ? : from;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_X86_32
|
#ifdef CONFIG_X86_32
|
||||||
|
|||||||
@@ -8757,6 +8757,7 @@ static int handle_vmread(struct kvm_vcpu *vcpu)
|
|||||||
u32 vmx_instruction_info = vmcs_read32(VMX_INSTRUCTION_INFO);
|
u32 vmx_instruction_info = vmcs_read32(VMX_INSTRUCTION_INFO);
|
||||||
gva_t gva = 0;
|
gva_t gva = 0;
|
||||||
struct vmcs12 *vmcs12;
|
struct vmcs12 *vmcs12;
|
||||||
|
struct x86_exception e;
|
||||||
|
|
||||||
if (!nested_vmx_check_permission(vcpu))
|
if (!nested_vmx_check_permission(vcpu))
|
||||||
return 1;
|
return 1;
|
||||||
@@ -8798,8 +8799,10 @@ static int handle_vmread(struct kvm_vcpu *vcpu)
|
|||||||
vmx_instruction_info, true, &gva))
|
vmx_instruction_info, true, &gva))
|
||||||
return 1;
|
return 1;
|
||||||
/* _system ok, nested_vmx_check_permission has verified cpl=0 */
|
/* _system ok, nested_vmx_check_permission has verified cpl=0 */
|
||||||
kvm_write_guest_virt_system(vcpu, gva, &field_value,
|
if (kvm_write_guest_virt_system(vcpu, gva, &field_value,
|
||||||
(is_long_mode(vcpu) ? 8 : 4), NULL);
|
(is_long_mode(vcpu) ? 8 : 4),
|
||||||
|
NULL))
|
||||||
|
kvm_inject_page_fault(vcpu, &e);
|
||||||
}
|
}
|
||||||
|
|
||||||
nested_vmx_succeed(vcpu);
|
nested_vmx_succeed(vcpu);
|
||||||
|
|||||||
@@ -5016,6 +5016,13 @@ int kvm_write_guest_virt_system(struct kvm_vcpu *vcpu, gva_t addr, void *val,
|
|||||||
/* kvm_write_guest_virt_system can pull in tons of pages. */
|
/* kvm_write_guest_virt_system can pull in tons of pages. */
|
||||||
vcpu->arch.l1tf_flush_l1d = true;
|
vcpu->arch.l1tf_flush_l1d = true;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* FIXME: this should call handle_emulation_failure if X86EMUL_IO_NEEDED
|
||||||
|
* is returned, but our callers are not ready for that and they blindly
|
||||||
|
* call kvm_inject_page_fault. Ensure that they at least do not leak
|
||||||
|
* uninitialized kernel stack memory into cr2 and error code.
|
||||||
|
*/
|
||||||
|
memset(exception, 0, sizeof(*exception));
|
||||||
return kvm_write_guest_virt_helper(addr, val, bytes, vcpu,
|
return kvm_write_guest_virt_helper(addr, val, bytes, vcpu,
|
||||||
PFERR_WRITE_MASK, exception);
|
PFERR_WRITE_MASK, exception);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,37 +18,40 @@ targets += purgatory.ro
|
|||||||
KASAN_SANITIZE := n
|
KASAN_SANITIZE := n
|
||||||
KCOV_INSTRUMENT := n
|
KCOV_INSTRUMENT := n
|
||||||
|
|
||||||
|
# These are adjustments to the compiler flags used for objects that
|
||||||
|
# make up the standalone purgatory.ro
|
||||||
|
|
||||||
|
PURGATORY_CFLAGS_REMOVE := -mcmodel=kernel
|
||||||
|
PURGATORY_CFLAGS := -mcmodel=large -ffreestanding -fno-zero-initialized-in-bss
|
||||||
|
|
||||||
# Default KBUILD_CFLAGS can have -pg option set when FTRACE is enabled. That
|
# Default KBUILD_CFLAGS can have -pg option set when FTRACE is enabled. That
|
||||||
# in turn leaves some undefined symbols like __fentry__ in purgatory and not
|
# in turn leaves some undefined symbols like __fentry__ in purgatory and not
|
||||||
# sure how to relocate those.
|
# sure how to relocate those.
|
||||||
ifdef CONFIG_FUNCTION_TRACER
|
ifdef CONFIG_FUNCTION_TRACER
|
||||||
CFLAGS_REMOVE_sha256.o += $(CC_FLAGS_FTRACE)
|
PURGATORY_CFLAGS_REMOVE += $(CC_FLAGS_FTRACE)
|
||||||
CFLAGS_REMOVE_purgatory.o += $(CC_FLAGS_FTRACE)
|
|
||||||
CFLAGS_REMOVE_string.o += $(CC_FLAGS_FTRACE)
|
|
||||||
CFLAGS_REMOVE_kexec-purgatory.o += $(CC_FLAGS_FTRACE)
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_STACKPROTECTOR
|
ifdef CONFIG_STACKPROTECTOR
|
||||||
CFLAGS_REMOVE_sha256.o += -fstack-protector
|
PURGATORY_CFLAGS_REMOVE += -fstack-protector
|
||||||
CFLAGS_REMOVE_purgatory.o += -fstack-protector
|
|
||||||
CFLAGS_REMOVE_string.o += -fstack-protector
|
|
||||||
CFLAGS_REMOVE_kexec-purgatory.o += -fstack-protector
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_STACKPROTECTOR_STRONG
|
ifdef CONFIG_STACKPROTECTOR_STRONG
|
||||||
CFLAGS_REMOVE_sha256.o += -fstack-protector-strong
|
PURGATORY_CFLAGS_REMOVE += -fstack-protector-strong
|
||||||
CFLAGS_REMOVE_purgatory.o += -fstack-protector-strong
|
|
||||||
CFLAGS_REMOVE_string.o += -fstack-protector-strong
|
|
||||||
CFLAGS_REMOVE_kexec-purgatory.o += -fstack-protector-strong
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_RETPOLINE
|
ifdef CONFIG_RETPOLINE
|
||||||
CFLAGS_REMOVE_sha256.o += $(RETPOLINE_CFLAGS)
|
PURGATORY_CFLAGS_REMOVE += $(RETPOLINE_CFLAGS)
|
||||||
CFLAGS_REMOVE_purgatory.o += $(RETPOLINE_CFLAGS)
|
|
||||||
CFLAGS_REMOVE_string.o += $(RETPOLINE_CFLAGS)
|
|
||||||
CFLAGS_REMOVE_kexec-purgatory.o += $(RETPOLINE_CFLAGS)
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
CFLAGS_REMOVE_purgatory.o += $(PURGATORY_CFLAGS_REMOVE)
|
||||||
|
CFLAGS_purgatory.o += $(PURGATORY_CFLAGS)
|
||||||
|
|
||||||
|
CFLAGS_REMOVE_sha256.o += $(PURGATORY_CFLAGS_REMOVE)
|
||||||
|
CFLAGS_sha256.o += $(PURGATORY_CFLAGS)
|
||||||
|
|
||||||
|
CFLAGS_REMOVE_string.o += $(PURGATORY_CFLAGS_REMOVE)
|
||||||
|
CFLAGS_string.o += $(PURGATORY_CFLAGS)
|
||||||
|
|
||||||
$(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE
|
$(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE
|
||||||
$(call if_changed,ld)
|
$(call if_changed,ld)
|
||||||
|
|
||||||
|
|||||||
@@ -200,7 +200,7 @@ config ATM_NICSTAR_USE_SUNI
|
|||||||
make the card work).
|
make the card work).
|
||||||
|
|
||||||
config ATM_NICSTAR_USE_IDT77105
|
config ATM_NICSTAR_USE_IDT77105
|
||||||
bool "Use IDT77015 PHY driver (25Mbps)"
|
bool "Use IDT77105 PHY driver (25Mbps)"
|
||||||
depends on ATM_NICSTAR
|
depends on ATM_NICSTAR
|
||||||
help
|
help
|
||||||
Support for the PHYsical layer chip in ForeRunner LE25 cards. In
|
Support for the PHYsical layer chip in ForeRunner LE25 cards. In
|
||||||
|
|||||||
@@ -1653,12 +1653,63 @@ static inline struct kobject *get_glue_dir(struct device *dev)
|
|||||||
*/
|
*/
|
||||||
static void cleanup_glue_dir(struct device *dev, struct kobject *glue_dir)
|
static void cleanup_glue_dir(struct device *dev, struct kobject *glue_dir)
|
||||||
{
|
{
|
||||||
|
unsigned int ref;
|
||||||
|
|
||||||
/* see if we live in a "glue" directory */
|
/* see if we live in a "glue" directory */
|
||||||
if (!live_in_glue_dir(glue_dir, dev))
|
if (!live_in_glue_dir(glue_dir, dev))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mutex_lock(&gdp_mutex);
|
mutex_lock(&gdp_mutex);
|
||||||
if (!kobject_has_children(glue_dir) && kref_read(&glue_dir->kref) == 1)
|
/**
|
||||||
|
* There is a race condition between removing glue directory
|
||||||
|
* and adding a new device under the glue directory.
|
||||||
|
*
|
||||||
|
* CPU1: CPU2:
|
||||||
|
*
|
||||||
|
* device_add()
|
||||||
|
* get_device_parent()
|
||||||
|
* class_dir_create_and_add()
|
||||||
|
* kobject_add_internal()
|
||||||
|
* create_dir() // create glue_dir
|
||||||
|
*
|
||||||
|
* device_add()
|
||||||
|
* get_device_parent()
|
||||||
|
* kobject_get() // get glue_dir
|
||||||
|
*
|
||||||
|
* device_del()
|
||||||
|
* cleanup_glue_dir()
|
||||||
|
* kobject_del(glue_dir)
|
||||||
|
*
|
||||||
|
* kobject_add()
|
||||||
|
* kobject_add_internal()
|
||||||
|
* create_dir() // in glue_dir
|
||||||
|
* sysfs_create_dir_ns()
|
||||||
|
* kernfs_create_dir_ns(sd)
|
||||||
|
*
|
||||||
|
* sysfs_remove_dir() // glue_dir->sd=NULL
|
||||||
|
* sysfs_put() // free glue_dir->sd
|
||||||
|
*
|
||||||
|
* // sd is freed
|
||||||
|
* kernfs_new_node(sd)
|
||||||
|
* kernfs_get(glue_dir)
|
||||||
|
* kernfs_add_one()
|
||||||
|
* kernfs_put()
|
||||||
|
*
|
||||||
|
* Before CPU1 remove last child device under glue dir, if CPU2 add
|
||||||
|
* a new device under glue dir, the glue_dir kobject reference count
|
||||||
|
* will be increase to 2 in kobject_get(k). And CPU2 has been called
|
||||||
|
* kernfs_create_dir_ns(). Meanwhile, CPU1 call sysfs_remove_dir()
|
||||||
|
* and sysfs_put(). This result in glue_dir->sd is freed.
|
||||||
|
*
|
||||||
|
* Then the CPU2 will see a stale "empty" but still potentially used
|
||||||
|
* glue dir around in kernfs_new_node().
|
||||||
|
*
|
||||||
|
* In order to avoid this happening, we also should make sure that
|
||||||
|
* kernfs_node for glue_dir is released in CPU1 only when refcount
|
||||||
|
* for glue_dir kobj is 1.
|
||||||
|
*/
|
||||||
|
ref = kref_read(&glue_dir->kref);
|
||||||
|
if (!kobject_has_children(glue_dir) && !--ref)
|
||||||
kobject_del(glue_dir);
|
kobject_del(glue_dir);
|
||||||
kobject_put(glue_dir);
|
kobject_put(glue_dir);
|
||||||
mutex_unlock(&gdp_mutex);
|
mutex_unlock(&gdp_mutex);
|
||||||
|
|||||||
@@ -3791,7 +3791,7 @@ static int compat_getdrvprm(int drive,
|
|||||||
v.native_format = UDP->native_format;
|
v.native_format = UDP->native_format;
|
||||||
mutex_unlock(&floppy_mutex);
|
mutex_unlock(&floppy_mutex);
|
||||||
|
|
||||||
if (copy_from_user(arg, &v, sizeof(struct compat_floppy_drive_params)))
|
if (copy_to_user(arg, &v, sizeof(struct compat_floppy_drive_params)))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -3827,7 +3827,7 @@ static int compat_getdrvstat(int drive, bool poll,
|
|||||||
v.bufblocks = UDRS->bufblocks;
|
v.bufblocks = UDRS->bufblocks;
|
||||||
mutex_unlock(&floppy_mutex);
|
mutex_unlock(&floppy_mutex);
|
||||||
|
|
||||||
if (copy_from_user(arg, &v, sizeof(struct compat_floppy_drive_struct)))
|
if (copy_to_user(arg, &v, sizeof(struct compat_floppy_drive_struct)))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
return 0;
|
return 0;
|
||||||
Eintr:
|
Eintr:
|
||||||
|
|||||||
@@ -1139,10 +1139,6 @@ static int btusb_open(struct hci_dev *hdev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
data->intf->needs_remote_wakeup = 1;
|
data->intf->needs_remote_wakeup = 1;
|
||||||
/* device specific wakeup source enabled and required for USB
|
|
||||||
* remote wakeup while host is suspended
|
|
||||||
*/
|
|
||||||
device_wakeup_enable(&data->udev->dev);
|
|
||||||
|
|
||||||
if (test_and_set_bit(BTUSB_INTR_RUNNING, &data->flags))
|
if (test_and_set_bit(BTUSB_INTR_RUNNING, &data->flags))
|
||||||
goto done;
|
goto done;
|
||||||
@@ -1206,7 +1202,6 @@ static int btusb_close(struct hci_dev *hdev)
|
|||||||
goto failed;
|
goto failed;
|
||||||
|
|
||||||
data->intf->needs_remote_wakeup = 0;
|
data->intf->needs_remote_wakeup = 0;
|
||||||
device_wakeup_disable(&data->udev->dev);
|
|
||||||
usb_autopm_put_interface(data->intf);
|
usb_autopm_put_interface(data->intf);
|
||||||
|
|
||||||
failed:
|
failed:
|
||||||
|
|||||||
@@ -1022,10 +1022,7 @@ static int sysc_init_sysc_mask(struct sysc *ddata)
|
|||||||
if (error)
|
if (error)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (val)
|
ddata->cfg.sysc_val = val & ddata->cap->sysc_mask;
|
||||||
ddata->cfg.sysc_val = val & ddata->cap->sysc_mask;
|
|
||||||
else
|
|
||||||
ddata->cfg.sysc_val = ddata->cap->sysc_mask;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -1688,7 +1685,7 @@ static int sysc_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
error = sysc_init_dts_quirks(ddata);
|
error = sysc_init_dts_quirks(ddata);
|
||||||
if (error)
|
if (error)
|
||||||
goto unprepare;
|
return error;
|
||||||
|
|
||||||
error = sysc_get_clocks(ddata);
|
error = sysc_get_clocks(ddata);
|
||||||
if (error)
|
if (error)
|
||||||
@@ -1696,27 +1693,27 @@ static int sysc_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
error = sysc_map_and_check_registers(ddata);
|
error = sysc_map_and_check_registers(ddata);
|
||||||
if (error)
|
if (error)
|
||||||
goto unprepare;
|
return error;
|
||||||
|
|
||||||
error = sysc_init_sysc_mask(ddata);
|
error = sysc_init_sysc_mask(ddata);
|
||||||
if (error)
|
if (error)
|
||||||
goto unprepare;
|
return error;
|
||||||
|
|
||||||
error = sysc_init_idlemodes(ddata);
|
error = sysc_init_idlemodes(ddata);
|
||||||
if (error)
|
if (error)
|
||||||
goto unprepare;
|
return error;
|
||||||
|
|
||||||
error = sysc_init_syss_mask(ddata);
|
error = sysc_init_syss_mask(ddata);
|
||||||
if (error)
|
if (error)
|
||||||
goto unprepare;
|
return error;
|
||||||
|
|
||||||
error = sysc_init_pdata(ddata);
|
error = sysc_init_pdata(ddata);
|
||||||
if (error)
|
if (error)
|
||||||
goto unprepare;
|
return error;
|
||||||
|
|
||||||
error = sysc_init_resets(ddata);
|
error = sysc_init_resets(ddata);
|
||||||
if (error)
|
if (error)
|
||||||
return error;
|
goto unprepare;
|
||||||
|
|
||||||
pm_runtime_enable(ddata->dev);
|
pm_runtime_enable(ddata->dev);
|
||||||
error = sysc_init_module(ddata);
|
error = sysc_init_module(ddata);
|
||||||
|
|||||||
@@ -61,10 +61,8 @@ static int rockchip_mmc_get_phase(struct clk_hw *hw)
|
|||||||
u32 delay_num = 0;
|
u32 delay_num = 0;
|
||||||
|
|
||||||
/* See the comment for rockchip_mmc_set_phase below */
|
/* See the comment for rockchip_mmc_set_phase below */
|
||||||
if (!rate) {
|
if (!rate)
|
||||||
pr_err("%s: invalid clk rate\n", __func__);
|
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
|
||||||
|
|
||||||
raw_value = readl(mmc_clock->reg) >> (mmc_clock->shift);
|
raw_value = readl(mmc_clock->reg) >> (mmc_clock->shift);
|
||||||
|
|
||||||
|
|||||||
@@ -959,11 +959,13 @@ static void talitos_sg_unmap(struct device *dev,
|
|||||||
|
|
||||||
static void ipsec_esp_unmap(struct device *dev,
|
static void ipsec_esp_unmap(struct device *dev,
|
||||||
struct talitos_edesc *edesc,
|
struct talitos_edesc *edesc,
|
||||||
struct aead_request *areq)
|
struct aead_request *areq, bool encrypt)
|
||||||
{
|
{
|
||||||
struct crypto_aead *aead = crypto_aead_reqtfm(areq);
|
struct crypto_aead *aead = crypto_aead_reqtfm(areq);
|
||||||
struct talitos_ctx *ctx = crypto_aead_ctx(aead);
|
struct talitos_ctx *ctx = crypto_aead_ctx(aead);
|
||||||
unsigned int ivsize = crypto_aead_ivsize(aead);
|
unsigned int ivsize = crypto_aead_ivsize(aead);
|
||||||
|
unsigned int authsize = crypto_aead_authsize(aead);
|
||||||
|
unsigned int cryptlen = areq->cryptlen - (encrypt ? 0 : authsize);
|
||||||
bool is_ipsec_esp = edesc->desc.hdr & DESC_HDR_TYPE_IPSEC_ESP;
|
bool is_ipsec_esp = edesc->desc.hdr & DESC_HDR_TYPE_IPSEC_ESP;
|
||||||
struct talitos_ptr *civ_ptr = &edesc->desc.ptr[is_ipsec_esp ? 2 : 3];
|
struct talitos_ptr *civ_ptr = &edesc->desc.ptr[is_ipsec_esp ? 2 : 3];
|
||||||
|
|
||||||
@@ -972,7 +974,7 @@ static void ipsec_esp_unmap(struct device *dev,
|
|||||||
DMA_FROM_DEVICE);
|
DMA_FROM_DEVICE);
|
||||||
unmap_single_talitos_ptr(dev, civ_ptr, DMA_TO_DEVICE);
|
unmap_single_talitos_ptr(dev, civ_ptr, DMA_TO_DEVICE);
|
||||||
|
|
||||||
talitos_sg_unmap(dev, edesc, areq->src, areq->dst, areq->cryptlen,
|
talitos_sg_unmap(dev, edesc, areq->src, areq->dst, cryptlen,
|
||||||
areq->assoclen);
|
areq->assoclen);
|
||||||
|
|
||||||
if (edesc->dma_len)
|
if (edesc->dma_len)
|
||||||
@@ -983,7 +985,7 @@ static void ipsec_esp_unmap(struct device *dev,
|
|||||||
unsigned int dst_nents = edesc->dst_nents ? : 1;
|
unsigned int dst_nents = edesc->dst_nents ? : 1;
|
||||||
|
|
||||||
sg_pcopy_to_buffer(areq->dst, dst_nents, ctx->iv, ivsize,
|
sg_pcopy_to_buffer(areq->dst, dst_nents, ctx->iv, ivsize,
|
||||||
areq->assoclen + areq->cryptlen - ivsize);
|
areq->assoclen + cryptlen - ivsize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1005,7 +1007,7 @@ static void ipsec_esp_encrypt_done(struct device *dev,
|
|||||||
|
|
||||||
edesc = container_of(desc, struct talitos_edesc, desc);
|
edesc = container_of(desc, struct talitos_edesc, desc);
|
||||||
|
|
||||||
ipsec_esp_unmap(dev, edesc, areq);
|
ipsec_esp_unmap(dev, edesc, areq, true);
|
||||||
|
|
||||||
/* copy the generated ICV to dst */
|
/* copy the generated ICV to dst */
|
||||||
if (edesc->icv_ool) {
|
if (edesc->icv_ool) {
|
||||||
@@ -1039,7 +1041,7 @@ static void ipsec_esp_decrypt_swauth_done(struct device *dev,
|
|||||||
|
|
||||||
edesc = container_of(desc, struct talitos_edesc, desc);
|
edesc = container_of(desc, struct talitos_edesc, desc);
|
||||||
|
|
||||||
ipsec_esp_unmap(dev, edesc, req);
|
ipsec_esp_unmap(dev, edesc, req, false);
|
||||||
|
|
||||||
if (!err) {
|
if (!err) {
|
||||||
char icvdata[SHA512_DIGEST_SIZE];
|
char icvdata[SHA512_DIGEST_SIZE];
|
||||||
@@ -1085,7 +1087,7 @@ static void ipsec_esp_decrypt_hwauth_done(struct device *dev,
|
|||||||
|
|
||||||
edesc = container_of(desc, struct talitos_edesc, desc);
|
edesc = container_of(desc, struct talitos_edesc, desc);
|
||||||
|
|
||||||
ipsec_esp_unmap(dev, edesc, req);
|
ipsec_esp_unmap(dev, edesc, req, false);
|
||||||
|
|
||||||
/* check ICV auth status */
|
/* check ICV auth status */
|
||||||
if (!err && ((desc->hdr_lo & DESC_HDR_LO_ICCR1_MASK) !=
|
if (!err && ((desc->hdr_lo & DESC_HDR_LO_ICCR1_MASK) !=
|
||||||
@@ -1188,6 +1190,7 @@ static int talitos_sg_map(struct device *dev, struct scatterlist *src,
|
|||||||
* fill in and submit ipsec_esp descriptor
|
* fill in and submit ipsec_esp descriptor
|
||||||
*/
|
*/
|
||||||
static int ipsec_esp(struct talitos_edesc *edesc, struct aead_request *areq,
|
static int ipsec_esp(struct talitos_edesc *edesc, struct aead_request *areq,
|
||||||
|
bool encrypt,
|
||||||
void (*callback)(struct device *dev,
|
void (*callback)(struct device *dev,
|
||||||
struct talitos_desc *desc,
|
struct talitos_desc *desc,
|
||||||
void *context, int error))
|
void *context, int error))
|
||||||
@@ -1197,7 +1200,7 @@ static int ipsec_esp(struct talitos_edesc *edesc, struct aead_request *areq,
|
|||||||
struct talitos_ctx *ctx = crypto_aead_ctx(aead);
|
struct talitos_ctx *ctx = crypto_aead_ctx(aead);
|
||||||
struct device *dev = ctx->dev;
|
struct device *dev = ctx->dev;
|
||||||
struct talitos_desc *desc = &edesc->desc;
|
struct talitos_desc *desc = &edesc->desc;
|
||||||
unsigned int cryptlen = areq->cryptlen;
|
unsigned int cryptlen = areq->cryptlen - (encrypt ? 0 : authsize);
|
||||||
unsigned int ivsize = crypto_aead_ivsize(aead);
|
unsigned int ivsize = crypto_aead_ivsize(aead);
|
||||||
int tbl_off = 0;
|
int tbl_off = 0;
|
||||||
int sg_count, ret;
|
int sg_count, ret;
|
||||||
@@ -1324,7 +1327,7 @@ static int ipsec_esp(struct talitos_edesc *edesc, struct aead_request *areq,
|
|||||||
|
|
||||||
ret = talitos_submit(dev, ctx->ch, desc, callback, areq);
|
ret = talitos_submit(dev, ctx->ch, desc, callback, areq);
|
||||||
if (ret != -EINPROGRESS) {
|
if (ret != -EINPROGRESS) {
|
||||||
ipsec_esp_unmap(dev, edesc, areq);
|
ipsec_esp_unmap(dev, edesc, areq, encrypt);
|
||||||
kfree(edesc);
|
kfree(edesc);
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
@@ -1438,9 +1441,10 @@ static struct talitos_edesc *aead_edesc_alloc(struct aead_request *areq, u8 *iv,
|
|||||||
unsigned int authsize = crypto_aead_authsize(authenc);
|
unsigned int authsize = crypto_aead_authsize(authenc);
|
||||||
struct talitos_ctx *ctx = crypto_aead_ctx(authenc);
|
struct talitos_ctx *ctx = crypto_aead_ctx(authenc);
|
||||||
unsigned int ivsize = crypto_aead_ivsize(authenc);
|
unsigned int ivsize = crypto_aead_ivsize(authenc);
|
||||||
|
unsigned int cryptlen = areq->cryptlen - (encrypt ? 0 : authsize);
|
||||||
|
|
||||||
return talitos_edesc_alloc(ctx->dev, areq->src, areq->dst,
|
return talitos_edesc_alloc(ctx->dev, areq->src, areq->dst,
|
||||||
iv, areq->assoclen, areq->cryptlen,
|
iv, areq->assoclen, cryptlen,
|
||||||
authsize, ivsize, icv_stashing,
|
authsize, ivsize, icv_stashing,
|
||||||
areq->base.flags, encrypt);
|
areq->base.flags, encrypt);
|
||||||
}
|
}
|
||||||
@@ -1459,7 +1463,7 @@ static int aead_encrypt(struct aead_request *req)
|
|||||||
/* set encrypt */
|
/* set encrypt */
|
||||||
edesc->desc.hdr = ctx->desc_hdr_template | DESC_HDR_MODE0_ENCRYPT;
|
edesc->desc.hdr = ctx->desc_hdr_template | DESC_HDR_MODE0_ENCRYPT;
|
||||||
|
|
||||||
return ipsec_esp(edesc, req, ipsec_esp_encrypt_done);
|
return ipsec_esp(edesc, req, true, ipsec_esp_encrypt_done);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int aead_decrypt(struct aead_request *req)
|
static int aead_decrypt(struct aead_request *req)
|
||||||
@@ -1471,14 +1475,13 @@ static int aead_decrypt(struct aead_request *req)
|
|||||||
struct talitos_edesc *edesc;
|
struct talitos_edesc *edesc;
|
||||||
void *icvdata;
|
void *icvdata;
|
||||||
|
|
||||||
req->cryptlen -= authsize;
|
|
||||||
|
|
||||||
/* allocate extended descriptor */
|
/* allocate extended descriptor */
|
||||||
edesc = aead_edesc_alloc(req, req->iv, 1, false);
|
edesc = aead_edesc_alloc(req, req->iv, 1, false);
|
||||||
if (IS_ERR(edesc))
|
if (IS_ERR(edesc))
|
||||||
return PTR_ERR(edesc);
|
return PTR_ERR(edesc);
|
||||||
|
|
||||||
if ((priv->features & TALITOS_FTR_HW_AUTH_CHECK) &&
|
if ((edesc->desc.hdr & DESC_HDR_TYPE_IPSEC_ESP) &&
|
||||||
|
(priv->features & TALITOS_FTR_HW_AUTH_CHECK) &&
|
||||||
((!edesc->src_nents && !edesc->dst_nents) ||
|
((!edesc->src_nents && !edesc->dst_nents) ||
|
||||||
priv->features & TALITOS_FTR_SRC_LINK_TBL_LEN_INCLUDES_EXTENT)) {
|
priv->features & TALITOS_FTR_SRC_LINK_TBL_LEN_INCLUDES_EXTENT)) {
|
||||||
|
|
||||||
@@ -1489,7 +1492,8 @@ static int aead_decrypt(struct aead_request *req)
|
|||||||
|
|
||||||
/* reset integrity check result bits */
|
/* reset integrity check result bits */
|
||||||
|
|
||||||
return ipsec_esp(edesc, req, ipsec_esp_decrypt_hwauth_done);
|
return ipsec_esp(edesc, req, false,
|
||||||
|
ipsec_esp_decrypt_hwauth_done);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Have to check the ICV with software */
|
/* Have to check the ICV with software */
|
||||||
@@ -1505,7 +1509,7 @@ static int aead_decrypt(struct aead_request *req)
|
|||||||
sg_pcopy_to_buffer(req->src, edesc->src_nents ? : 1, icvdata, authsize,
|
sg_pcopy_to_buffer(req->src, edesc->src_nents ? : 1, icvdata, authsize,
|
||||||
req->assoclen + req->cryptlen - authsize);
|
req->assoclen + req->cryptlen - authsize);
|
||||||
|
|
||||||
return ipsec_esp(edesc, req, ipsec_esp_decrypt_swauth_done);
|
return ipsec_esp(edesc, req, false, ipsec_esp_decrypt_swauth_done);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ablkcipher_setkey(struct crypto_ablkcipher *cipher,
|
static int ablkcipher_setkey(struct crypto_ablkcipher *cipher,
|
||||||
@@ -1538,6 +1542,18 @@ static int ablkcipher_setkey(struct crypto_ablkcipher *cipher,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int ablkcipher_aes_setkey(struct crypto_ablkcipher *cipher,
|
||||||
|
const u8 *key, unsigned int keylen)
|
||||||
|
{
|
||||||
|
if (keylen == AES_KEYSIZE_128 || keylen == AES_KEYSIZE_192 ||
|
||||||
|
keylen == AES_KEYSIZE_256)
|
||||||
|
return ablkcipher_setkey(cipher, key, keylen);
|
||||||
|
|
||||||
|
crypto_ablkcipher_set_flags(cipher, CRYPTO_TFM_RES_BAD_KEY_LEN);
|
||||||
|
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
static void common_nonsnoop_unmap(struct device *dev,
|
static void common_nonsnoop_unmap(struct device *dev,
|
||||||
struct talitos_edesc *edesc,
|
struct talitos_edesc *edesc,
|
||||||
struct ablkcipher_request *areq)
|
struct ablkcipher_request *areq)
|
||||||
@@ -1660,6 +1676,14 @@ static int ablkcipher_encrypt(struct ablkcipher_request *areq)
|
|||||||
struct crypto_ablkcipher *cipher = crypto_ablkcipher_reqtfm(areq);
|
struct crypto_ablkcipher *cipher = crypto_ablkcipher_reqtfm(areq);
|
||||||
struct talitos_ctx *ctx = crypto_ablkcipher_ctx(cipher);
|
struct talitos_ctx *ctx = crypto_ablkcipher_ctx(cipher);
|
||||||
struct talitos_edesc *edesc;
|
struct talitos_edesc *edesc;
|
||||||
|
unsigned int blocksize =
|
||||||
|
crypto_tfm_alg_blocksize(crypto_ablkcipher_tfm(cipher));
|
||||||
|
|
||||||
|
if (!areq->nbytes)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (areq->nbytes % blocksize)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
/* allocate extended descriptor */
|
/* allocate extended descriptor */
|
||||||
edesc = ablkcipher_edesc_alloc(areq, true);
|
edesc = ablkcipher_edesc_alloc(areq, true);
|
||||||
@@ -1677,6 +1701,14 @@ static int ablkcipher_decrypt(struct ablkcipher_request *areq)
|
|||||||
struct crypto_ablkcipher *cipher = crypto_ablkcipher_reqtfm(areq);
|
struct crypto_ablkcipher *cipher = crypto_ablkcipher_reqtfm(areq);
|
||||||
struct talitos_ctx *ctx = crypto_ablkcipher_ctx(cipher);
|
struct talitos_ctx *ctx = crypto_ablkcipher_ctx(cipher);
|
||||||
struct talitos_edesc *edesc;
|
struct talitos_edesc *edesc;
|
||||||
|
unsigned int blocksize =
|
||||||
|
crypto_tfm_alg_blocksize(crypto_ablkcipher_tfm(cipher));
|
||||||
|
|
||||||
|
if (!areq->nbytes)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (areq->nbytes % blocksize)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
/* allocate extended descriptor */
|
/* allocate extended descriptor */
|
||||||
edesc = ablkcipher_edesc_alloc(areq, false);
|
edesc = ablkcipher_edesc_alloc(areq, false);
|
||||||
@@ -2705,6 +2737,7 @@ static struct talitos_alg_template driver_algs[] = {
|
|||||||
.min_keysize = AES_MIN_KEY_SIZE,
|
.min_keysize = AES_MIN_KEY_SIZE,
|
||||||
.max_keysize = AES_MAX_KEY_SIZE,
|
.max_keysize = AES_MAX_KEY_SIZE,
|
||||||
.ivsize = AES_BLOCK_SIZE,
|
.ivsize = AES_BLOCK_SIZE,
|
||||||
|
.setkey = ablkcipher_aes_setkey,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
.desc_hdr_template = DESC_HDR_TYPE_COMMON_NONSNOOP_NO_AFEU |
|
.desc_hdr_template = DESC_HDR_TYPE_COMMON_NONSNOOP_NO_AFEU |
|
||||||
@@ -2715,13 +2748,13 @@ static struct talitos_alg_template driver_algs[] = {
|
|||||||
.alg.crypto = {
|
.alg.crypto = {
|
||||||
.cra_name = "ctr(aes)",
|
.cra_name = "ctr(aes)",
|
||||||
.cra_driver_name = "ctr-aes-talitos",
|
.cra_driver_name = "ctr-aes-talitos",
|
||||||
.cra_blocksize = AES_BLOCK_SIZE,
|
.cra_blocksize = 1,
|
||||||
.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER |
|
.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER |
|
||||||
CRYPTO_ALG_ASYNC,
|
CRYPTO_ALG_ASYNC,
|
||||||
.cra_ablkcipher = {
|
.cra_ablkcipher = {
|
||||||
.min_keysize = AES_MIN_KEY_SIZE,
|
.min_keysize = AES_MIN_KEY_SIZE,
|
||||||
.max_keysize = AES_MAX_KEY_SIZE,
|
.max_keysize = AES_MAX_KEY_SIZE,
|
||||||
.ivsize = AES_BLOCK_SIZE,
|
.setkey = ablkcipher_aes_setkey,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
.desc_hdr_template = DESC_HDR_TYPE_AESU_CTR_NONSNOOP |
|
.desc_hdr_template = DESC_HDR_TYPE_AESU_CTR_NONSNOOP |
|
||||||
|
|||||||
@@ -395,8 +395,10 @@ static int ti_dra7_xbar_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
ret = of_property_read_u32_array(node, pname, (u32 *)rsv_events,
|
ret = of_property_read_u32_array(node, pname, (u32 *)rsv_events,
|
||||||
nelm * 2);
|
nelm * 2);
|
||||||
if (ret)
|
if (ret) {
|
||||||
|
kfree(rsv_events);
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < nelm; i++) {
|
for (i = 0; i < nelm; i++) {
|
||||||
ti_dra7_xbar_reserve(rsv_events[i][0], rsv_events[i][1],
|
ti_dra7_xbar_reserve(rsv_events[i][0], rsv_events[i][1],
|
||||||
|
|||||||
@@ -1543,8 +1543,10 @@ static int omap_dma_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
rc = devm_request_irq(&pdev->dev, irq, omap_dma_irq,
|
rc = devm_request_irq(&pdev->dev, irq, omap_dma_irq,
|
||||||
IRQF_SHARED, "omap-dma-engine", od);
|
IRQF_SHARED, "omap-dma-engine", od);
|
||||||
if (rc)
|
if (rc) {
|
||||||
|
omap_dma_free(od);
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (omap_dma_glbl_read(od, CAPS_0) & CAPS_0_SUPPORT_LL123)
|
if (omap_dma_glbl_read(od, CAPS_0) & CAPS_0_SUPPORT_LL123)
|
||||||
|
|||||||
@@ -100,8 +100,8 @@ static int vpd_section_check_key_name(const u8 *key, s32 key_len)
|
|||||||
return VPD_OK;
|
return VPD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vpd_section_attrib_add(const u8 *key, s32 key_len,
|
static int vpd_section_attrib_add(const u8 *key, u32 key_len,
|
||||||
const u8 *value, s32 value_len,
|
const u8 *value, u32 value_len,
|
||||||
void *arg)
|
void *arg)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|||||||
@@ -19,8 +19,8 @@
|
|||||||
|
|
||||||
#include "vpd_decode.h"
|
#include "vpd_decode.h"
|
||||||
|
|
||||||
static int vpd_decode_len(const s32 max_len, const u8 *in,
|
static int vpd_decode_len(const u32 max_len, const u8 *in,
|
||||||
s32 *length, s32 *decoded_len)
|
u32 *length, u32 *decoded_len)
|
||||||
{
|
{
|
||||||
u8 more;
|
u8 more;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
@@ -40,18 +40,39 @@ static int vpd_decode_len(const s32 max_len, const u8 *in,
|
|||||||
} while (more);
|
} while (more);
|
||||||
|
|
||||||
*decoded_len = i;
|
*decoded_len = i;
|
||||||
|
|
||||||
return VPD_OK;
|
return VPD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int vpd_decode_string(const s32 max_len, const u8 *input_buf, s32 *consumed,
|
static int vpd_decode_entry(const u32 max_len, const u8 *input_buf,
|
||||||
|
u32 *_consumed, const u8 **entry, u32 *entry_len)
|
||||||
|
{
|
||||||
|
u32 decoded_len;
|
||||||
|
u32 consumed = *_consumed;
|
||||||
|
|
||||||
|
if (vpd_decode_len(max_len - consumed, &input_buf[consumed],
|
||||||
|
entry_len, &decoded_len) != VPD_OK)
|
||||||
|
return VPD_FAIL;
|
||||||
|
if (max_len - consumed < decoded_len)
|
||||||
|
return VPD_FAIL;
|
||||||
|
|
||||||
|
consumed += decoded_len;
|
||||||
|
*entry = input_buf + consumed;
|
||||||
|
|
||||||
|
/* entry_len is untrusted data and must be checked again. */
|
||||||
|
if (max_len - consumed < *entry_len)
|
||||||
|
return VPD_FAIL;
|
||||||
|
|
||||||
|
consumed += decoded_len;
|
||||||
|
*_consumed = consumed;
|
||||||
|
return VPD_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int vpd_decode_string(const u32 max_len, const u8 *input_buf, u32 *consumed,
|
||||||
vpd_decode_callback callback, void *callback_arg)
|
vpd_decode_callback callback, void *callback_arg)
|
||||||
{
|
{
|
||||||
int type;
|
int type;
|
||||||
int res;
|
u32 key_len;
|
||||||
s32 key_len;
|
u32 value_len;
|
||||||
s32 value_len;
|
|
||||||
s32 decoded_len;
|
|
||||||
const u8 *key;
|
const u8 *key;
|
||||||
const u8 *value;
|
const u8 *value;
|
||||||
|
|
||||||
@@ -66,26 +87,14 @@ int vpd_decode_string(const s32 max_len, const u8 *input_buf, s32 *consumed,
|
|||||||
case VPD_TYPE_STRING:
|
case VPD_TYPE_STRING:
|
||||||
(*consumed)++;
|
(*consumed)++;
|
||||||
|
|
||||||
/* key */
|
if (vpd_decode_entry(max_len, input_buf, consumed, &key,
|
||||||
res = vpd_decode_len(max_len - *consumed, &input_buf[*consumed],
|
&key_len) != VPD_OK)
|
||||||
&key_len, &decoded_len);
|
|
||||||
if (res != VPD_OK || *consumed + decoded_len >= max_len)
|
|
||||||
return VPD_FAIL;
|
return VPD_FAIL;
|
||||||
|
|
||||||
*consumed += decoded_len;
|
if (vpd_decode_entry(max_len, input_buf, consumed, &value,
|
||||||
key = &input_buf[*consumed];
|
&value_len) != VPD_OK)
|
||||||
*consumed += key_len;
|
|
||||||
|
|
||||||
/* value */
|
|
||||||
res = vpd_decode_len(max_len - *consumed, &input_buf[*consumed],
|
|
||||||
&value_len, &decoded_len);
|
|
||||||
if (res != VPD_OK || *consumed + decoded_len > max_len)
|
|
||||||
return VPD_FAIL;
|
return VPD_FAIL;
|
||||||
|
|
||||||
*consumed += decoded_len;
|
|
||||||
value = &input_buf[*consumed];
|
|
||||||
*consumed += value_len;
|
|
||||||
|
|
||||||
if (type == VPD_TYPE_STRING)
|
if (type == VPD_TYPE_STRING)
|
||||||
return callback(key, key_len, value, value_len,
|
return callback(key, key_len, value, value_len,
|
||||||
callback_arg);
|
callback_arg);
|
||||||
|
|||||||
@@ -33,8 +33,8 @@ enum {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* Callback for vpd_decode_string to invoke. */
|
/* Callback for vpd_decode_string to invoke. */
|
||||||
typedef int vpd_decode_callback(const u8 *key, s32 key_len,
|
typedef int vpd_decode_callback(const u8 *key, u32 key_len,
|
||||||
const u8 *value, s32 value_len,
|
const u8 *value, u32 value_len,
|
||||||
void *arg);
|
void *arg);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -52,7 +52,7 @@ typedef int vpd_decode_callback(const u8 *key, s32 key_len,
|
|||||||
* If one entry is successfully decoded, sends it to callback and returns the
|
* If one entry is successfully decoded, sends it to callback and returns the
|
||||||
* result.
|
* result.
|
||||||
*/
|
*/
|
||||||
int vpd_decode_string(const s32 max_len, const u8 *input_buf, s32 *consumed,
|
int vpd_decode_string(const u32 max_len, const u8 *input_buf, u32 *consumed,
|
||||||
vpd_decode_callback callback, void *callback_arg);
|
vpd_decode_callback callback, void *callback_arg);
|
||||||
|
|
||||||
#endif /* __VPD_DECODE_H */
|
#endif /* __VPD_DECODE_H */
|
||||||
|
|||||||
@@ -463,9 +463,9 @@ static int ti_sci_cmd_get_revision(struct ti_sci_info *info)
|
|||||||
struct ti_sci_xfer *xfer;
|
struct ti_sci_xfer *xfer;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/* No need to setup flags since it is expected to respond */
|
|
||||||
xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_VERSION,
|
xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_VERSION,
|
||||||
0x0, sizeof(struct ti_sci_msg_hdr),
|
TI_SCI_FLAG_REQ_ACK_ON_PROCESSED,
|
||||||
|
sizeof(struct ti_sci_msg_hdr),
|
||||||
sizeof(*rev_info));
|
sizeof(*rev_info));
|
||||||
if (IS_ERR(xfer)) {
|
if (IS_ERR(xfer)) {
|
||||||
ret = PTR_ERR(xfer);
|
ret = PTR_ERR(xfer);
|
||||||
@@ -593,9 +593,9 @@ static int ti_sci_get_device_state(const struct ti_sci_handle *handle,
|
|||||||
info = handle_to_ti_sci_info(handle);
|
info = handle_to_ti_sci_info(handle);
|
||||||
dev = info->dev;
|
dev = info->dev;
|
||||||
|
|
||||||
/* Response is expected, so need of any flags */
|
|
||||||
xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_GET_DEVICE_STATE,
|
xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_GET_DEVICE_STATE,
|
||||||
0, sizeof(*req), sizeof(*resp));
|
TI_SCI_FLAG_REQ_ACK_ON_PROCESSED,
|
||||||
|
sizeof(*req), sizeof(*resp));
|
||||||
if (IS_ERR(xfer)) {
|
if (IS_ERR(xfer)) {
|
||||||
ret = PTR_ERR(xfer);
|
ret = PTR_ERR(xfer);
|
||||||
dev_err(dev, "Message alloc failed(%d)\n", ret);
|
dev_err(dev, "Message alloc failed(%d)\n", ret);
|
||||||
|
|||||||
@@ -207,7 +207,7 @@ static int altera_ps_write_complete(struct fpga_manager *mgr,
|
|||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!IS_ERR(conf->confd)) {
|
if (conf->confd) {
|
||||||
if (!gpiod_get_raw_value_cansleep(conf->confd)) {
|
if (!gpiod_get_raw_value_cansleep(conf->confd)) {
|
||||||
dev_err(&mgr->dev, "CONF_DONE is inactive!\n");
|
dev_err(&mgr->dev, "CONF_DONE is inactive!\n");
|
||||||
return -EIO;
|
return -EIO;
|
||||||
@@ -265,10 +265,13 @@ static int altera_ps_probe(struct spi_device *spi)
|
|||||||
return PTR_ERR(conf->status);
|
return PTR_ERR(conf->status);
|
||||||
}
|
}
|
||||||
|
|
||||||
conf->confd = devm_gpiod_get(&spi->dev, "confd", GPIOD_IN);
|
conf->confd = devm_gpiod_get_optional(&spi->dev, "confd", GPIOD_IN);
|
||||||
if (IS_ERR(conf->confd)) {
|
if (IS_ERR(conf->confd)) {
|
||||||
dev_warn(&spi->dev, "Not using confd gpio: %ld\n",
|
dev_err(&spi->dev, "Failed to get confd gpio: %ld\n",
|
||||||
PTR_ERR(conf->confd));
|
PTR_ERR(conf->confd));
|
||||||
|
return PTR_ERR(conf->confd);
|
||||||
|
} else if (!conf->confd) {
|
||||||
|
dev_warn(&spi->dev, "Not using confd gpio");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Register manager with unique name */
|
/* Register manager with unique name */
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
* published by the Free Software Foundation.
|
* published by the Free Software Foundation.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <linux/dmi.h>
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
#include <linux/gpio.h>
|
#include <linux/gpio.h>
|
||||||
#include <linux/gpio/consumer.h>
|
#include <linux/gpio/consumer.h>
|
||||||
@@ -23,6 +24,11 @@
|
|||||||
|
|
||||||
#include "gpiolib.h"
|
#include "gpiolib.h"
|
||||||
|
|
||||||
|
static int run_edge_events_on_boot = -1;
|
||||||
|
module_param(run_edge_events_on_boot, int, 0444);
|
||||||
|
MODULE_PARM_DESC(run_edge_events_on_boot,
|
||||||
|
"Run edge _AEI event-handlers at boot: 0=no, 1=yes, -1=auto");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct acpi_gpio_event - ACPI GPIO event handler data
|
* struct acpi_gpio_event - ACPI GPIO event handler data
|
||||||
*
|
*
|
||||||
@@ -174,10 +180,13 @@ static void acpi_gpiochip_request_irq(struct acpi_gpio_chip *acpi_gpio,
|
|||||||
event->irq_requested = true;
|
event->irq_requested = true;
|
||||||
|
|
||||||
/* Make sure we trigger the initial state of edge-triggered IRQs */
|
/* Make sure we trigger the initial state of edge-triggered IRQs */
|
||||||
value = gpiod_get_raw_value_cansleep(event->desc);
|
if (run_edge_events_on_boot &&
|
||||||
if (((event->irqflags & IRQF_TRIGGER_RISING) && value == 1) ||
|
(event->irqflags & (IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING))) {
|
||||||
((event->irqflags & IRQF_TRIGGER_FALLING) && value == 0))
|
value = gpiod_get_raw_value_cansleep(event->desc);
|
||||||
event->handler(event->irq, event);
|
if (((event->irqflags & IRQF_TRIGGER_RISING) && value == 1) ||
|
||||||
|
((event->irqflags & IRQF_TRIGGER_FALLING) && value == 0))
|
||||||
|
event->handler(event->irq, event);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void acpi_gpiochip_request_irqs(struct acpi_gpio_chip *acpi_gpio)
|
static void acpi_gpiochip_request_irqs(struct acpi_gpio_chip *acpi_gpio)
|
||||||
@@ -1253,3 +1262,28 @@ static int acpi_gpio_handle_deferred_request_irqs(void)
|
|||||||
}
|
}
|
||||||
/* We must use _sync so that this runs after the first deferred_probe run */
|
/* We must use _sync so that this runs after the first deferred_probe run */
|
||||||
late_initcall_sync(acpi_gpio_handle_deferred_request_irqs);
|
late_initcall_sync(acpi_gpio_handle_deferred_request_irqs);
|
||||||
|
|
||||||
|
static const struct dmi_system_id run_edge_events_on_boot_blacklist[] = {
|
||||||
|
{
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_SYS_VENDOR, "MINIX"),
|
||||||
|
DMI_MATCH(DMI_PRODUCT_NAME, "Z83-4"),
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{} /* Terminating entry */
|
||||||
|
};
|
||||||
|
|
||||||
|
static int acpi_gpio_setup_params(void)
|
||||||
|
{
|
||||||
|
if (run_edge_events_on_boot < 0) {
|
||||||
|
if (dmi_check_system(run_edge_events_on_boot_blacklist))
|
||||||
|
run_edge_events_on_boot = 0;
|
||||||
|
else
|
||||||
|
run_edge_events_on_boot = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Directly after dmi_setup() which runs as core_initcall() */
|
||||||
|
postcore_initcall(acpi_gpio_setup_params);
|
||||||
|
|||||||
@@ -524,6 +524,14 @@ static int linehandle_create(struct gpio_device *gdev, void __user *ip)
|
|||||||
if (lflags & ~GPIOHANDLE_REQUEST_VALID_FLAGS)
|
if (lflags & ~GPIOHANDLE_REQUEST_VALID_FLAGS)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Do not allow both INPUT & OUTPUT flags to be set as they are
|
||||||
|
* contradictory.
|
||||||
|
*/
|
||||||
|
if ((lflags & GPIOHANDLE_REQUEST_INPUT) &&
|
||||||
|
(lflags & GPIOHANDLE_REQUEST_OUTPUT))
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Do not allow OPEN_SOURCE & OPEN_DRAIN flags in a single request. If
|
* Do not allow OPEN_SOURCE & OPEN_DRAIN flags in a single request. If
|
||||||
* the hardware actually supports enabling both at the same time the
|
* the hardware actually supports enabling both at the same time the
|
||||||
@@ -916,7 +924,9 @@ static int lineevent_create(struct gpio_device *gdev, void __user *ip)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* This is just wrong: we don't look for events on output lines */
|
/* This is just wrong: we don't look for events on output lines */
|
||||||
if (lflags & GPIOHANDLE_REQUEST_OUTPUT) {
|
if ((lflags & GPIOHANDLE_REQUEST_OUTPUT) ||
|
||||||
|
(lflags & GPIOHANDLE_REQUEST_OPEN_DRAIN) ||
|
||||||
|
(lflags & GPIOHANDLE_REQUEST_OPEN_SOURCE)) {
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
goto out_free_label;
|
goto out_free_label;
|
||||||
}
|
}
|
||||||
@@ -930,10 +940,6 @@ static int lineevent_create(struct gpio_device *gdev, void __user *ip)
|
|||||||
|
|
||||||
if (lflags & GPIOHANDLE_REQUEST_ACTIVE_LOW)
|
if (lflags & GPIOHANDLE_REQUEST_ACTIVE_LOW)
|
||||||
set_bit(FLAG_ACTIVE_LOW, &desc->flags);
|
set_bit(FLAG_ACTIVE_LOW, &desc->flags);
|
||||||
if (lflags & GPIOHANDLE_REQUEST_OPEN_DRAIN)
|
|
||||||
set_bit(FLAG_OPEN_DRAIN, &desc->flags);
|
|
||||||
if (lflags & GPIOHANDLE_REQUEST_OPEN_SOURCE)
|
|
||||||
set_bit(FLAG_OPEN_SOURCE, &desc->flags);
|
|
||||||
|
|
||||||
ret = gpiod_direction_input(desc);
|
ret = gpiod_direction_input(desc);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
|||||||
@@ -82,6 +82,12 @@ static const struct drm_dmi_panel_orientation_data itworks_tw891 = {
|
|||||||
.orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
|
.orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct drm_dmi_panel_orientation_data lcd720x1280_rightside_up = {
|
||||||
|
.width = 720,
|
||||||
|
.height = 1280,
|
||||||
|
.orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
|
||||||
|
};
|
||||||
|
|
||||||
static const struct drm_dmi_panel_orientation_data lcd800x1280_rightside_up = {
|
static const struct drm_dmi_panel_orientation_data lcd800x1280_rightside_up = {
|
||||||
.width = 800,
|
.width = 800,
|
||||||
.height = 1280,
|
.height = 1280,
|
||||||
@@ -109,6 +115,12 @@ static const struct dmi_system_id orientation_data[] = {
|
|||||||
DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"),
|
DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"),
|
||||||
},
|
},
|
||||||
.driver_data = (void *)&gpd_micropc,
|
.driver_data = (void *)&gpd_micropc,
|
||||||
|
}, { /* GPD MicroPC (later BIOS versions with proper DMI strings) */
|
||||||
|
.matches = {
|
||||||
|
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "GPD"),
|
||||||
|
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "MicroPC"),
|
||||||
|
},
|
||||||
|
.driver_data = (void *)&lcd720x1280_rightside_up,
|
||||||
}, { /*
|
}, { /*
|
||||||
* GPD Pocket, note that the the DMI data is less generic then
|
* GPD Pocket, note that the the DMI data is less generic then
|
||||||
* it seems, devices with a board-vendor of "AMI Corporation"
|
* it seems, devices with a board-vendor of "AMI Corporation"
|
||||||
|
|||||||
@@ -566,12 +566,15 @@ static int mtk_drm_probe(struct platform_device *pdev)
|
|||||||
comp = devm_kzalloc(dev, sizeof(*comp), GFP_KERNEL);
|
comp = devm_kzalloc(dev, sizeof(*comp), GFP_KERNEL);
|
||||||
if (!comp) {
|
if (!comp) {
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
|
of_node_put(node);
|
||||||
goto err_node;
|
goto err_node;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = mtk_ddp_comp_init(dev, node, comp, comp_id, NULL);
|
ret = mtk_ddp_comp_init(dev, node, comp, comp_id, NULL);
|
||||||
if (ret)
|
if (ret) {
|
||||||
|
of_node_put(node);
|
||||||
goto err_node;
|
goto err_node;
|
||||||
|
}
|
||||||
|
|
||||||
private->ddp_comp[comp_id] = comp;
|
private->ddp_comp[comp_id] = comp;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -120,6 +120,13 @@ static void meson_plane_atomic_update(struct drm_plane *plane,
|
|||||||
priv->viu.osd1_blk0_cfg[0] |= OSD_BLK_MODE_32 |
|
priv->viu.osd1_blk0_cfg[0] |= OSD_BLK_MODE_32 |
|
||||||
OSD_COLOR_MATRIX_32_ARGB;
|
OSD_COLOR_MATRIX_32_ARGB;
|
||||||
break;
|
break;
|
||||||
|
case DRM_FORMAT_XBGR8888:
|
||||||
|
/* For XRGB, replace the pixel's alpha by 0xFF */
|
||||||
|
writel_bits_relaxed(OSD_REPLACE_EN, OSD_REPLACE_EN,
|
||||||
|
priv->io_base + _REG(VIU_OSD1_CTRL_STAT2));
|
||||||
|
priv->viu.osd1_blk0_cfg[0] |= OSD_BLK_MODE_32 |
|
||||||
|
OSD_COLOR_MATRIX_32_ABGR;
|
||||||
|
break;
|
||||||
case DRM_FORMAT_ARGB8888:
|
case DRM_FORMAT_ARGB8888:
|
||||||
/* For ARGB, use the pixel's alpha */
|
/* For ARGB, use the pixel's alpha */
|
||||||
writel_bits_relaxed(OSD_REPLACE_EN, 0,
|
writel_bits_relaxed(OSD_REPLACE_EN, 0,
|
||||||
@@ -127,6 +134,13 @@ static void meson_plane_atomic_update(struct drm_plane *plane,
|
|||||||
priv->viu.osd1_blk0_cfg[0] |= OSD_BLK_MODE_32 |
|
priv->viu.osd1_blk0_cfg[0] |= OSD_BLK_MODE_32 |
|
||||||
OSD_COLOR_MATRIX_32_ARGB;
|
OSD_COLOR_MATRIX_32_ARGB;
|
||||||
break;
|
break;
|
||||||
|
case DRM_FORMAT_ABGR8888:
|
||||||
|
/* For ARGB, use the pixel's alpha */
|
||||||
|
writel_bits_relaxed(OSD_REPLACE_EN, 0,
|
||||||
|
priv->io_base + _REG(VIU_OSD1_CTRL_STAT2));
|
||||||
|
priv->viu.osd1_blk0_cfg[0] |= OSD_BLK_MODE_32 |
|
||||||
|
OSD_COLOR_MATRIX_32_ABGR;
|
||||||
|
break;
|
||||||
case DRM_FORMAT_RGB888:
|
case DRM_FORMAT_RGB888:
|
||||||
priv->viu.osd1_blk0_cfg[0] |= OSD_BLK_MODE_24 |
|
priv->viu.osd1_blk0_cfg[0] |= OSD_BLK_MODE_24 |
|
||||||
OSD_COLOR_MATRIX_24_RGB;
|
OSD_COLOR_MATRIX_24_RGB;
|
||||||
@@ -196,7 +210,9 @@ static const struct drm_plane_funcs meson_plane_funcs = {
|
|||||||
|
|
||||||
static const uint32_t supported_drm_formats[] = {
|
static const uint32_t supported_drm_formats[] = {
|
||||||
DRM_FORMAT_ARGB8888,
|
DRM_FORMAT_ARGB8888,
|
||||||
|
DRM_FORMAT_ABGR8888,
|
||||||
DRM_FORMAT_XRGB8888,
|
DRM_FORMAT_XRGB8888,
|
||||||
|
DRM_FORMAT_XBGR8888,
|
||||||
DRM_FORMAT_RGB888,
|
DRM_FORMAT_RGB888,
|
||||||
DRM_FORMAT_RGB565,
|
DRM_FORMAT_RGB565,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -282,14 +282,16 @@ static void wacom_feature_mapping(struct hid_device *hdev,
|
|||||||
/* leave touch_max as is if predefined */
|
/* leave touch_max as is if predefined */
|
||||||
if (!features->touch_max) {
|
if (!features->touch_max) {
|
||||||
/* read manually */
|
/* read manually */
|
||||||
data = kzalloc(2, GFP_KERNEL);
|
n = hid_report_len(field->report);
|
||||||
|
data = hid_alloc_report_buf(field->report, GFP_KERNEL);
|
||||||
if (!data)
|
if (!data)
|
||||||
break;
|
break;
|
||||||
data[0] = field->report->id;
|
data[0] = field->report->id;
|
||||||
ret = wacom_get_report(hdev, HID_FEATURE_REPORT,
|
ret = wacom_get_report(hdev, HID_FEATURE_REPORT,
|
||||||
data, 2, WAC_CMD_RETRIES);
|
data, n, WAC_CMD_RETRIES);
|
||||||
if (ret == 2) {
|
if (ret == n) {
|
||||||
features->touch_max = data[1];
|
ret = hid_report_raw_event(hdev,
|
||||||
|
HID_FEATURE_REPORT, data, n, 0);
|
||||||
} else {
|
} else {
|
||||||
features->touch_max = 16;
|
features->touch_max = 16;
|
||||||
hid_warn(hdev, "wacom_feature_mapping: "
|
hid_warn(hdev, "wacom_feature_mapping: "
|
||||||
|
|||||||
@@ -2533,6 +2533,7 @@ static void wacom_wac_finger_event(struct hid_device *hdev,
|
|||||||
struct wacom *wacom = hid_get_drvdata(hdev);
|
struct wacom *wacom = hid_get_drvdata(hdev);
|
||||||
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
|
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
|
||||||
unsigned equivalent_usage = wacom_equivalent_usage(usage->hid);
|
unsigned equivalent_usage = wacom_equivalent_usage(usage->hid);
|
||||||
|
struct wacom_features *features = &wacom->wacom_wac.features;
|
||||||
|
|
||||||
switch (equivalent_usage) {
|
switch (equivalent_usage) {
|
||||||
case HID_GD_X:
|
case HID_GD_X:
|
||||||
@@ -2553,6 +2554,9 @@ static void wacom_wac_finger_event(struct hid_device *hdev,
|
|||||||
case HID_DG_TIPSWITCH:
|
case HID_DG_TIPSWITCH:
|
||||||
wacom_wac->hid_data.tipswitch = value;
|
wacom_wac->hid_data.tipswitch = value;
|
||||||
break;
|
break;
|
||||||
|
case HID_DG_CONTACTMAX:
|
||||||
|
features->touch_max = value;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -94,6 +94,7 @@ static int i2c_dw_unreg_slave(struct i2c_client *slave)
|
|||||||
|
|
||||||
dev->disable_int(dev);
|
dev->disable_int(dev);
|
||||||
dev->disable(dev);
|
dev->disable(dev);
|
||||||
|
synchronize_irq(dev->irq);
|
||||||
dev->slave = NULL;
|
dev->slave = NULL;
|
||||||
pm_runtime_put(dev->dev);
|
pm_runtime_put(dev->dev);
|
||||||
|
|
||||||
|
|||||||
@@ -981,11 +981,11 @@ static int stm32_dfsdm_adc_chan_init_one(struct iio_dev *indio_dev,
|
|||||||
ch->info_mask_shared_by_all = BIT(IIO_CHAN_INFO_OVERSAMPLING_RATIO);
|
ch->info_mask_shared_by_all = BIT(IIO_CHAN_INFO_OVERSAMPLING_RATIO);
|
||||||
|
|
||||||
if (adc->dev_data->type == DFSDM_AUDIO) {
|
if (adc->dev_data->type == DFSDM_AUDIO) {
|
||||||
ch->scan_type.sign = 's';
|
|
||||||
ch->ext_info = dfsdm_adc_audio_ext_info;
|
ch->ext_info = dfsdm_adc_audio_ext_info;
|
||||||
} else {
|
} else {
|
||||||
ch->scan_type.sign = 'u';
|
ch->scan_type.shift = 8;
|
||||||
}
|
}
|
||||||
|
ch->scan_type.sign = 's';
|
||||||
ch->scan_type.realbits = 24;
|
ch->scan_type.realbits = 24;
|
||||||
ch->scan_type.storagebits = 32;
|
ch->scan_type.storagebits = 32;
|
||||||
|
|
||||||
|
|||||||
@@ -1723,8 +1723,8 @@ void rdma_destroy_id(struct rdma_cm_id *id)
|
|||||||
mutex_lock(&id_priv->handler_mutex);
|
mutex_lock(&id_priv->handler_mutex);
|
||||||
mutex_unlock(&id_priv->handler_mutex);
|
mutex_unlock(&id_priv->handler_mutex);
|
||||||
|
|
||||||
|
rdma_restrack_del(&id_priv->res);
|
||||||
if (id_priv->cma_dev) {
|
if (id_priv->cma_dev) {
|
||||||
rdma_restrack_del(&id_priv->res);
|
|
||||||
if (rdma_cap_ib_cm(id_priv->id.device, 1)) {
|
if (rdma_cap_ib_cm(id_priv->id.device, 1)) {
|
||||||
if (id_priv->cm_id.ib)
|
if (id_priv->cm_id.ib)
|
||||||
ib_destroy_cm_id(id_priv->cm_id.ib);
|
ib_destroy_cm_id(id_priv->cm_id.ib);
|
||||||
@@ -3463,10 +3463,9 @@ int rdma_bind_addr(struct rdma_cm_id *id, struct sockaddr *addr)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
err2:
|
err2:
|
||||||
if (id_priv->cma_dev) {
|
rdma_restrack_del(&id_priv->res);
|
||||||
rdma_restrack_del(&id_priv->res);
|
if (id_priv->cma_dev)
|
||||||
cma_release_dev(id_priv);
|
cma_release_dev(id_priv);
|
||||||
}
|
|
||||||
err1:
|
err1:
|
||||||
cma_comp_exch(id_priv, RDMA_CM_ADDR_BOUND, RDMA_CM_IDLE);
|
cma_comp_exch(id_priv, RDMA_CM_ADDR_BOUND, RDMA_CM_IDLE);
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ void rdma_restrack_del(struct rdma_restrack_entry *res)
|
|||||||
struct ib_device *dev;
|
struct ib_device *dev;
|
||||||
|
|
||||||
if (!res->valid)
|
if (!res->valid)
|
||||||
return;
|
goto out;
|
||||||
|
|
||||||
dev = res_to_dev(res);
|
dev = res_to_dev(res);
|
||||||
if (!dev)
|
if (!dev)
|
||||||
@@ -222,8 +222,10 @@ void rdma_restrack_del(struct rdma_restrack_entry *res)
|
|||||||
down_write(&dev->res.rwsem);
|
down_write(&dev->res.rwsem);
|
||||||
hash_del(&res->node);
|
hash_del(&res->node);
|
||||||
res->valid = false;
|
res->valid = false;
|
||||||
|
up_write(&dev->res.rwsem);
|
||||||
|
|
||||||
|
out:
|
||||||
if (res->task)
|
if (res->task)
|
||||||
put_task_struct(res->task);
|
put_task_struct(res->task);
|
||||||
up_write(&dev->res.rwsem);
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(rdma_restrack_del);
|
EXPORT_SYMBOL(rdma_restrack_del);
|
||||||
|
|||||||
@@ -1358,7 +1358,7 @@ static const struct acpi_device_id elan_acpi_id[] = {
|
|||||||
{ "ELAN0618", 0 },
|
{ "ELAN0618", 0 },
|
||||||
{ "ELAN0619", 0 },
|
{ "ELAN0619", 0 },
|
||||||
{ "ELAN061A", 0 },
|
{ "ELAN061A", 0 },
|
||||||
{ "ELAN061B", 0 },
|
/* { "ELAN061B", 0 }, not working on the Lenovo Legion Y7000 */
|
||||||
{ "ELAN061C", 0 },
|
{ "ELAN061C", 0 },
|
||||||
{ "ELAN061D", 0 },
|
{ "ELAN061D", 0 },
|
||||||
{ "ELAN061E", 0 },
|
{ "ELAN061E", 0 },
|
||||||
|
|||||||
@@ -1153,6 +1153,17 @@ static void amd_iommu_flush_tlb_all(struct amd_iommu *iommu)
|
|||||||
iommu_completion_wait(iommu);
|
iommu_completion_wait(iommu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void amd_iommu_flush_tlb_domid(struct amd_iommu *iommu, u32 dom_id)
|
||||||
|
{
|
||||||
|
struct iommu_cmd cmd;
|
||||||
|
|
||||||
|
build_inv_iommu_pages(&cmd, 0, CMD_INV_IOMMU_ALL_PAGES_ADDRESS,
|
||||||
|
dom_id, 1);
|
||||||
|
iommu_queue_command(iommu, &cmd);
|
||||||
|
|
||||||
|
iommu_completion_wait(iommu);
|
||||||
|
}
|
||||||
|
|
||||||
static void amd_iommu_flush_all(struct amd_iommu *iommu)
|
static void amd_iommu_flush_all(struct amd_iommu *iommu)
|
||||||
{
|
{
|
||||||
struct iommu_cmd cmd;
|
struct iommu_cmd cmd;
|
||||||
@@ -1329,18 +1340,21 @@ static void domain_flush_devices(struct protection_domain *domain)
|
|||||||
* another level increases the size of the address space by 9 bits to a size up
|
* another level increases the size of the address space by 9 bits to a size up
|
||||||
* to 64 bits.
|
* to 64 bits.
|
||||||
*/
|
*/
|
||||||
static bool increase_address_space(struct protection_domain *domain,
|
static void increase_address_space(struct protection_domain *domain,
|
||||||
gfp_t gfp)
|
gfp_t gfp)
|
||||||
{
|
{
|
||||||
|
unsigned long flags;
|
||||||
u64 *pte;
|
u64 *pte;
|
||||||
|
|
||||||
if (domain->mode == PAGE_MODE_6_LEVEL)
|
spin_lock_irqsave(&domain->lock, flags);
|
||||||
|
|
||||||
|
if (WARN_ON_ONCE(domain->mode == PAGE_MODE_6_LEVEL))
|
||||||
/* address space already 64 bit large */
|
/* address space already 64 bit large */
|
||||||
return false;
|
goto out;
|
||||||
|
|
||||||
pte = (void *)get_zeroed_page(gfp);
|
pte = (void *)get_zeroed_page(gfp);
|
||||||
if (!pte)
|
if (!pte)
|
||||||
return false;
|
goto out;
|
||||||
|
|
||||||
*pte = PM_LEVEL_PDE(domain->mode,
|
*pte = PM_LEVEL_PDE(domain->mode,
|
||||||
iommu_virt_to_phys(domain->pt_root));
|
iommu_virt_to_phys(domain->pt_root));
|
||||||
@@ -1348,7 +1362,10 @@ static bool increase_address_space(struct protection_domain *domain,
|
|||||||
domain->mode += 1;
|
domain->mode += 1;
|
||||||
domain->updated = true;
|
domain->updated = true;
|
||||||
|
|
||||||
return true;
|
out:
|
||||||
|
spin_unlock_irqrestore(&domain->lock, flags);
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static u64 *alloc_pte(struct protection_domain *domain,
|
static u64 *alloc_pte(struct protection_domain *domain,
|
||||||
@@ -1838,6 +1855,7 @@ static void set_dte_entry(u16 devid, struct protection_domain *domain,
|
|||||||
{
|
{
|
||||||
u64 pte_root = 0;
|
u64 pte_root = 0;
|
||||||
u64 flags = 0;
|
u64 flags = 0;
|
||||||
|
u32 old_domid;
|
||||||
|
|
||||||
if (domain->mode != PAGE_MODE_NONE)
|
if (domain->mode != PAGE_MODE_NONE)
|
||||||
pte_root = iommu_virt_to_phys(domain->pt_root);
|
pte_root = iommu_virt_to_phys(domain->pt_root);
|
||||||
@@ -1887,8 +1905,20 @@ static void set_dte_entry(u16 devid, struct protection_domain *domain,
|
|||||||
flags &= ~DEV_DOMID_MASK;
|
flags &= ~DEV_DOMID_MASK;
|
||||||
flags |= domain->id;
|
flags |= domain->id;
|
||||||
|
|
||||||
|
old_domid = amd_iommu_dev_table[devid].data[1] & DEV_DOMID_MASK;
|
||||||
amd_iommu_dev_table[devid].data[1] = flags;
|
amd_iommu_dev_table[devid].data[1] = flags;
|
||||||
amd_iommu_dev_table[devid].data[0] = pte_root;
|
amd_iommu_dev_table[devid].data[0] = pte_root;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* A kdump kernel might be replacing a domain ID that was copied from
|
||||||
|
* the previous kernel--if so, it needs to flush the translation cache
|
||||||
|
* entries for the old domain ID that is being overwritten
|
||||||
|
*/
|
||||||
|
if (old_domid) {
|
||||||
|
struct amd_iommu *iommu = amd_iommu_rlookup_table[devid];
|
||||||
|
|
||||||
|
amd_iommu_flush_tlb_domid(iommu, old_domid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void clear_dte_entry(u16 devid)
|
static void clear_dte_entry(u16 devid)
|
||||||
|
|||||||
@@ -688,6 +688,9 @@ capi_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos
|
|||||||
if (!cdev->ap.applid)
|
if (!cdev->ap.applid)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
|
if (count < CAPIMSG_BASELEN)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
skb = alloc_skb(count, GFP_USER);
|
skb = alloc_skb(count, GFP_USER);
|
||||||
if (!skb)
|
if (!skb)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
@@ -698,7 +701,8 @@ capi_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos
|
|||||||
}
|
}
|
||||||
mlen = CAPIMSG_LEN(skb->data);
|
mlen = CAPIMSG_LEN(skb->data);
|
||||||
if (CAPIMSG_CMD(skb->data) == CAPI_DATA_B3_REQ) {
|
if (CAPIMSG_CMD(skb->data) == CAPI_DATA_B3_REQ) {
|
||||||
if ((size_t)(mlen + CAPIMSG_DATALEN(skb->data)) != count) {
|
if (count < CAPI_DATA_B3_REQ_LEN ||
|
||||||
|
(size_t)(mlen + CAPIMSG_DATALEN(skb->data)) != count) {
|
||||||
kfree_skb(skb);
|
kfree_skb(skb);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
@@ -711,6 +715,10 @@ capi_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos
|
|||||||
CAPIMSG_SETAPPID(skb->data, cdev->ap.applid);
|
CAPIMSG_SETAPPID(skb->data, cdev->ap.applid);
|
||||||
|
|
||||||
if (CAPIMSG_CMD(skb->data) == CAPI_DISCONNECT_B3_RESP) {
|
if (CAPIMSG_CMD(skb->data) == CAPI_DISCONNECT_B3_RESP) {
|
||||||
|
if (count < CAPI_DISCONNECT_B3_RESP_LEN) {
|
||||||
|
kfree_skb(skb);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
mutex_lock(&cdev->lock);
|
mutex_lock(&cdev->lock);
|
||||||
capincci_free(cdev, CAPIMSG_NCCI(skb->data));
|
capincci_free(cdev, CAPIMSG_NCCI(skb->data));
|
||||||
mutex_unlock(&cdev->lock);
|
mutex_unlock(&cdev->lock);
|
||||||
|
|||||||
@@ -607,10 +607,9 @@ static int technisat_usb2_frontend_attach(struct dvb_usb_adapter *a)
|
|||||||
static int technisat_usb2_get_ir(struct dvb_usb_device *d)
|
static int technisat_usb2_get_ir(struct dvb_usb_device *d)
|
||||||
{
|
{
|
||||||
struct technisat_usb2_state *state = d->priv;
|
struct technisat_usb2_state *state = d->priv;
|
||||||
u8 *buf = state->buf;
|
|
||||||
u8 *b;
|
|
||||||
int ret;
|
|
||||||
struct ir_raw_event ev;
|
struct ir_raw_event ev;
|
||||||
|
u8 *buf = state->buf;
|
||||||
|
int i, ret;
|
||||||
|
|
||||||
buf[0] = GET_IR_DATA_VENDOR_REQUEST;
|
buf[0] = GET_IR_DATA_VENDOR_REQUEST;
|
||||||
buf[1] = 0x08;
|
buf[1] = 0x08;
|
||||||
@@ -646,26 +645,25 @@ static int technisat_usb2_get_ir(struct dvb_usb_device *d)
|
|||||||
return 0; /* no key pressed */
|
return 0; /* no key pressed */
|
||||||
|
|
||||||
/* decoding */
|
/* decoding */
|
||||||
b = buf+1;
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
deb_rc("RC: %d ", ret);
|
deb_rc("RC: %d ", ret);
|
||||||
debug_dump(b, ret, deb_rc);
|
debug_dump(buf + 1, ret, deb_rc);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ev.pulse = 0;
|
ev.pulse = 0;
|
||||||
while (1) {
|
for (i = 1; i < ARRAY_SIZE(state->buf); i++) {
|
||||||
ev.pulse = !ev.pulse;
|
if (buf[i] == 0xff) {
|
||||||
ev.duration = (*b * FIRMWARE_CLOCK_DIVISOR * FIRMWARE_CLOCK_TICK) / 1000;
|
|
||||||
ir_raw_event_store(d->rc_dev, &ev);
|
|
||||||
|
|
||||||
b++;
|
|
||||||
if (*b == 0xff) {
|
|
||||||
ev.pulse = 0;
|
ev.pulse = 0;
|
||||||
ev.duration = 888888*2;
|
ev.duration = 888888*2;
|
||||||
ir_raw_event_store(d->rc_dev, &ev);
|
ir_raw_event_store(d->rc_dev, &ev);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ev.pulse = !ev.pulse;
|
||||||
|
ev.duration = (buf[i] * FIRMWARE_CLOCK_DIVISOR *
|
||||||
|
FIRMWARE_CLOCK_TICK) / 1000;
|
||||||
|
ir_raw_event_store(d->rc_dev, &ev);
|
||||||
}
|
}
|
||||||
|
|
||||||
ir_raw_event_handle(d->rc_dev);
|
ir_raw_event_handle(d->rc_dev);
|
||||||
|
|||||||
@@ -105,6 +105,7 @@ static void tm6000_urb_received(struct urb *urb)
|
|||||||
printk(KERN_ERR "tm6000: error %s\n", __func__);
|
printk(KERN_ERR "tm6000: error %s\n", __func__);
|
||||||
kfree(urb->transfer_buffer);
|
kfree(urb->transfer_buffer);
|
||||||
usb_free_urb(urb);
|
usb_free_urb(urb);
|
||||||
|
dev->dvb->bulk_urb = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -135,6 +136,7 @@ static int tm6000_start_stream(struct tm6000_core *dev)
|
|||||||
dvb->bulk_urb->transfer_buffer = kzalloc(size, GFP_KERNEL);
|
dvb->bulk_urb->transfer_buffer = kzalloc(size, GFP_KERNEL);
|
||||||
if (!dvb->bulk_urb->transfer_buffer) {
|
if (!dvb->bulk_urb->transfer_buffer) {
|
||||||
usb_free_urb(dvb->bulk_urb);
|
usb_free_urb(dvb->bulk_urb);
|
||||||
|
dvb->bulk_urb = NULL;
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -161,6 +163,7 @@ static int tm6000_start_stream(struct tm6000_core *dev)
|
|||||||
|
|
||||||
kfree(dvb->bulk_urb->transfer_buffer);
|
kfree(dvb->bulk_urb->transfer_buffer);
|
||||||
usb_free_urb(dvb->bulk_urb);
|
usb_free_urb(dvb->bulk_urb);
|
||||||
|
dvb->bulk_urb = NULL;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -863,19 +863,21 @@ static int mtk_nfc_write_oob_std(struct mtd_info *mtd, struct nand_chip *chip,
|
|||||||
return mtk_nfc_write_page_raw(mtd, chip, NULL, 1, page);
|
return mtk_nfc_write_page_raw(mtd, chip, NULL, 1, page);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int mtk_nfc_update_ecc_stats(struct mtd_info *mtd, u8 *buf, u32 sectors)
|
static int mtk_nfc_update_ecc_stats(struct mtd_info *mtd, u8 *buf, u32 start,
|
||||||
|
u32 sectors)
|
||||||
{
|
{
|
||||||
struct nand_chip *chip = mtd_to_nand(mtd);
|
struct nand_chip *chip = mtd_to_nand(mtd);
|
||||||
struct mtk_nfc *nfc = nand_get_controller_data(chip);
|
struct mtk_nfc *nfc = nand_get_controller_data(chip);
|
||||||
struct mtk_nfc_nand_chip *mtk_nand = to_mtk_nand(chip);
|
struct mtk_nfc_nand_chip *mtk_nand = to_mtk_nand(chip);
|
||||||
struct mtk_ecc_stats stats;
|
struct mtk_ecc_stats stats;
|
||||||
|
u32 reg_size = mtk_nand->fdm.reg_size;
|
||||||
int rc, i;
|
int rc, i;
|
||||||
|
|
||||||
rc = nfi_readl(nfc, NFI_STA) & STA_EMP_PAGE;
|
rc = nfi_readl(nfc, NFI_STA) & STA_EMP_PAGE;
|
||||||
if (rc) {
|
if (rc) {
|
||||||
memset(buf, 0xff, sectors * chip->ecc.size);
|
memset(buf, 0xff, sectors * chip->ecc.size);
|
||||||
for (i = 0; i < sectors; i++)
|
for (i = 0; i < sectors; i++)
|
||||||
memset(oob_ptr(chip, i), 0xff, mtk_nand->fdm.reg_size);
|
memset(oob_ptr(chip, start + i), 0xff, reg_size);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -895,7 +897,7 @@ static int mtk_nfc_read_subpage(struct mtd_info *mtd, struct nand_chip *chip,
|
|||||||
u32 spare = mtk_nand->spare_per_sector;
|
u32 spare = mtk_nand->spare_per_sector;
|
||||||
u32 column, sectors, start, end, reg;
|
u32 column, sectors, start, end, reg;
|
||||||
dma_addr_t addr;
|
dma_addr_t addr;
|
||||||
int bitflips;
|
int bitflips = 0;
|
||||||
size_t len;
|
size_t len;
|
||||||
u8 *buf;
|
u8 *buf;
|
||||||
int rc;
|
int rc;
|
||||||
@@ -962,14 +964,11 @@ static int mtk_nfc_read_subpage(struct mtd_info *mtd, struct nand_chip *chip,
|
|||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
dev_err(nfc->dev, "subpage done timeout\n");
|
dev_err(nfc->dev, "subpage done timeout\n");
|
||||||
bitflips = -EIO;
|
bitflips = -EIO;
|
||||||
} else {
|
} else if (!raw) {
|
||||||
bitflips = 0;
|
rc = mtk_ecc_wait_done(nfc->ecc, ECC_DECODE);
|
||||||
if (!raw) {
|
bitflips = rc < 0 ? -ETIMEDOUT :
|
||||||
rc = mtk_ecc_wait_done(nfc->ecc, ECC_DECODE);
|
mtk_nfc_update_ecc_stats(mtd, buf, start, sectors);
|
||||||
bitflips = rc < 0 ? -ETIMEDOUT :
|
mtk_nfc_read_fdm(chip, start, sectors);
|
||||||
mtk_nfc_update_ecc_stats(mtd, buf, sectors);
|
|
||||||
mtk_nfc_read_fdm(chip, start, sectors);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dma_unmap_single(nfc->dev, addr, len, DMA_FROM_DEVICE);
|
dma_unmap_single(nfc->dev, addr, len, DMA_FROM_DEVICE);
|
||||||
|
|||||||
@@ -469,13 +469,19 @@ static int __init xgbe_mod_init(void)
|
|||||||
|
|
||||||
ret = xgbe_platform_init();
|
ret = xgbe_platform_init();
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
goto err_platform_init;
|
||||||
|
|
||||||
ret = xgbe_pci_init();
|
ret = xgbe_pci_init();
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
goto err_pci_init;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
err_pci_init:
|
||||||
|
xgbe_platform_exit();
|
||||||
|
err_platform_init:
|
||||||
|
unregister_netdevice_notifier(&xgbe_netdev_notifier);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __exit xgbe_mod_exit(void)
|
static void __exit xgbe_mod_exit(void)
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ static int aq_vec_poll(struct napi_struct *napi, int budget)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err_exit:
|
||||||
if (!was_tx_cleaned)
|
if (!was_tx_cleaned)
|
||||||
work_done = budget;
|
work_done = budget;
|
||||||
|
|
||||||
@@ -98,7 +99,7 @@ static int aq_vec_poll(struct napi_struct *napi, int budget)
|
|||||||
1U << self->aq_ring_param.vec_idx);
|
1U << self->aq_ring_param.vec_idx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
err_exit:
|
|
||||||
return work_done;
|
return work_done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1998,6 +1998,10 @@ static void __ibmvnic_reset(struct work_struct *work)
|
|||||||
|
|
||||||
rwi = get_next_rwi(adapter);
|
rwi = get_next_rwi(adapter);
|
||||||
while (rwi) {
|
while (rwi) {
|
||||||
|
if (adapter->state == VNIC_REMOVING ||
|
||||||
|
adapter->state == VNIC_REMOVED)
|
||||||
|
goto out;
|
||||||
|
|
||||||
if (adapter->force_reset_recovery) {
|
if (adapter->force_reset_recovery) {
|
||||||
adapter->force_reset_recovery = false;
|
adapter->force_reset_recovery = false;
|
||||||
rc = do_hard_reset(adapter, rwi, reset_state);
|
rc = do_hard_reset(adapter, rwi, reset_state);
|
||||||
@@ -2022,7 +2026,7 @@ static void __ibmvnic_reset(struct work_struct *work)
|
|||||||
netdev_dbg(adapter->netdev, "Reset failed\n");
|
netdev_dbg(adapter->netdev, "Reset failed\n");
|
||||||
free_all_rwi(adapter);
|
free_all_rwi(adapter);
|
||||||
}
|
}
|
||||||
|
out:
|
||||||
adapter->resetting = false;
|
adapter->resetting = false;
|
||||||
if (we_lock_rtnl)
|
if (we_lock_rtnl)
|
||||||
rtnl_unlock();
|
rtnl_unlock();
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
#include <net/tc_act/tc_mirred.h>
|
#include <net/tc_act/tc_mirred.h>
|
||||||
#include <net/vxlan.h>
|
#include <net/vxlan.h>
|
||||||
#include <net/mpls.h>
|
#include <net/mpls.h>
|
||||||
|
#include <net/xfrm.h>
|
||||||
|
|
||||||
#include "ixgbe.h"
|
#include "ixgbe.h"
|
||||||
#include "ixgbe_common.h"
|
#include "ixgbe_common.h"
|
||||||
@@ -2625,7 +2626,7 @@ static void ixgbe_update_itr(struct ixgbe_q_vector *q_vector,
|
|||||||
/* 16K ints/sec to 9.2K ints/sec */
|
/* 16K ints/sec to 9.2K ints/sec */
|
||||||
avg_wire_size *= 15;
|
avg_wire_size *= 15;
|
||||||
avg_wire_size += 11452;
|
avg_wire_size += 11452;
|
||||||
} else if (avg_wire_size <= 1980) {
|
} else if (avg_wire_size < 1968) {
|
||||||
/* 9.2K ints/sec to 8K ints/sec */
|
/* 9.2K ints/sec to 8K ints/sec */
|
||||||
avg_wire_size *= 5;
|
avg_wire_size *= 5;
|
||||||
avg_wire_size += 22420;
|
avg_wire_size += 22420;
|
||||||
@@ -2658,6 +2659,8 @@ static void ixgbe_update_itr(struct ixgbe_q_vector *q_vector,
|
|||||||
case IXGBE_LINK_SPEED_2_5GB_FULL:
|
case IXGBE_LINK_SPEED_2_5GB_FULL:
|
||||||
case IXGBE_LINK_SPEED_1GB_FULL:
|
case IXGBE_LINK_SPEED_1GB_FULL:
|
||||||
case IXGBE_LINK_SPEED_10_FULL:
|
case IXGBE_LINK_SPEED_10_FULL:
|
||||||
|
if (avg_wire_size > 8064)
|
||||||
|
avg_wire_size = 8064;
|
||||||
itr += DIV_ROUND_UP(avg_wire_size,
|
itr += DIV_ROUND_UP(avg_wire_size,
|
||||||
IXGBE_ITR_ADAPTIVE_MIN_INC * 64) *
|
IXGBE_ITR_ADAPTIVE_MIN_INC * 64) *
|
||||||
IXGBE_ITR_ADAPTIVE_MIN_INC;
|
IXGBE_ITR_ADAPTIVE_MIN_INC;
|
||||||
@@ -8599,7 +8602,8 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb,
|
|||||||
#endif /* IXGBE_FCOE */
|
#endif /* IXGBE_FCOE */
|
||||||
|
|
||||||
#ifdef CONFIG_XFRM_OFFLOAD
|
#ifdef CONFIG_XFRM_OFFLOAD
|
||||||
if (skb->sp && !ixgbe_ipsec_tx(tx_ring, first, &ipsec_tx))
|
if (xfrm_offload(skb) &&
|
||||||
|
!ixgbe_ipsec_tx(tx_ring, first, &ipsec_tx))
|
||||||
goto out_drop;
|
goto out_drop;
|
||||||
#endif
|
#endif
|
||||||
tso = ixgbe_tso(tx_ring, first, &hdr_len, &ipsec_tx);
|
tso = ixgbe_tso(tx_ring, first, &hdr_len, &ipsec_tx);
|
||||||
|
|||||||
@@ -4954,6 +4954,13 @@ static const struct dmi_system_id msi_blacklist[] = {
|
|||||||
DMI_MATCH(DMI_BOARD_NAME, "P6T"),
|
DMI_MATCH(DMI_BOARD_NAME, "P6T"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.ident = "ASUS P6X",
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
|
||||||
|
DMI_MATCH(DMI_BOARD_NAME, "P6X"),
|
||||||
|
},
|
||||||
|
},
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1150,7 +1150,7 @@ static int qed_slowpath_start(struct qed_dev *cdev,
|
|||||||
&drv_version);
|
&drv_version);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
DP_NOTICE(cdev, "Failed sending drv version command\n");
|
DP_NOTICE(cdev, "Failed sending drv version command\n");
|
||||||
return rc;
|
goto err4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1158,6 +1158,8 @@ static int qed_slowpath_start(struct qed_dev *cdev,
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
err4:
|
||||||
|
qed_ll2_dealloc_if(cdev);
|
||||||
err3:
|
err3:
|
||||||
qed_hw_stop(cdev);
|
qed_hw_stop(cdev);
|
||||||
err2:
|
err2:
|
||||||
|
|||||||
@@ -793,15 +793,16 @@ static int sgiseeq_probe(struct platform_device *pdev)
|
|||||||
printk(KERN_ERR "Sgiseeq: Cannot register net device, "
|
printk(KERN_ERR "Sgiseeq: Cannot register net device, "
|
||||||
"aborting.\n");
|
"aborting.\n");
|
||||||
err = -ENODEV;
|
err = -ENODEV;
|
||||||
goto err_out_free_page;
|
goto err_out_free_attrs;
|
||||||
}
|
}
|
||||||
|
|
||||||
printk(KERN_INFO "%s: %s %pM\n", dev->name, sgiseeqstr, dev->dev_addr);
|
printk(KERN_INFO "%s: %s %pM\n", dev->name, sgiseeqstr, dev->dev_addr);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_out_free_page:
|
err_out_free_attrs:
|
||||||
free_page((unsigned long) sp->srings);
|
dma_free_attrs(&pdev->dev, sizeof(*sp->srings), sp->srings,
|
||||||
|
sp->srings_dma, DMA_ATTR_NON_CONSISTENT);
|
||||||
err_out_free_dev:
|
err_out_free_dev:
|
||||||
free_netdev(dev);
|
free_netdev(dev);
|
||||||
|
|
||||||
|
|||||||
@@ -821,7 +821,7 @@ static int hwsim_add_one(struct genl_info *info, struct device *dev,
|
|||||||
err = hwsim_subscribe_all_others(phy);
|
err = hwsim_subscribe_all_others(phy);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
mutex_unlock(&hwsim_phys_lock);
|
mutex_unlock(&hwsim_phys_lock);
|
||||||
goto err_reg;
|
goto err_subscribe;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
list_add_tail(&phy->list, &hwsim_phys);
|
list_add_tail(&phy->list, &hwsim_phys);
|
||||||
@@ -831,6 +831,8 @@ static int hwsim_add_one(struct genl_info *info, struct device *dev,
|
|||||||
|
|
||||||
return idx;
|
return idx;
|
||||||
|
|
||||||
|
err_subscribe:
|
||||||
|
ieee802154_unregister_hw(phy->hw);
|
||||||
err_reg:
|
err_reg:
|
||||||
kfree(pib);
|
kfree(pib);
|
||||||
err_pib:
|
err_pib:
|
||||||
@@ -920,9 +922,9 @@ static __init int hwsim_init_module(void)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
platform_drv:
|
platform_drv:
|
||||||
genl_unregister_family(&hwsim_genl_family);
|
|
||||||
platform_dev:
|
|
||||||
platform_device_unregister(mac802154hwsim_dev);
|
platform_device_unregister(mac802154hwsim_dev);
|
||||||
|
platform_dev:
|
||||||
|
genl_unregister_family(&hwsim_genl_family);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -380,8 +380,8 @@ static void phylink_get_fixed_state(struct phylink *pl, struct phylink_link_stat
|
|||||||
* Local device Link partner
|
* Local device Link partner
|
||||||
* Pause AsymDir Pause AsymDir Result
|
* Pause AsymDir Pause AsymDir Result
|
||||||
* 1 X 1 X TX+RX
|
* 1 X 1 X TX+RX
|
||||||
* 0 1 1 1 RX
|
* 0 1 1 1 TX
|
||||||
* 1 1 0 1 TX
|
* 1 1 0 1 RX
|
||||||
*/
|
*/
|
||||||
static void phylink_resolve_flow(struct phylink *pl,
|
static void phylink_resolve_flow(struct phylink *pl,
|
||||||
struct phylink_link_state *state)
|
struct phylink_link_state *state)
|
||||||
@@ -402,7 +402,7 @@ static void phylink_resolve_flow(struct phylink *pl,
|
|||||||
new_pause = MLO_PAUSE_TX | MLO_PAUSE_RX;
|
new_pause = MLO_PAUSE_TX | MLO_PAUSE_RX;
|
||||||
else if (pause & MLO_PAUSE_ASYM)
|
else if (pause & MLO_PAUSE_ASYM)
|
||||||
new_pause = state->pause & MLO_PAUSE_SYM ?
|
new_pause = state->pause & MLO_PAUSE_SYM ?
|
||||||
MLO_PAUSE_RX : MLO_PAUSE_TX;
|
MLO_PAUSE_TX : MLO_PAUSE_RX;
|
||||||
} else {
|
} else {
|
||||||
new_pause = pl->link_config.pause & MLO_PAUSE_TXRX_MASK;
|
new_pause = pl->link_config.pause & MLO_PAUSE_TXRX_MASK;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -801,7 +801,8 @@ static void tun_detach_all(struct net_device *dev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int tun_attach(struct tun_struct *tun, struct file *file,
|
static int tun_attach(struct tun_struct *tun, struct file *file,
|
||||||
bool skip_filter, bool napi, bool napi_frags)
|
bool skip_filter, bool napi, bool napi_frags,
|
||||||
|
bool publish_tun)
|
||||||
{
|
{
|
||||||
struct tun_file *tfile = file->private_data;
|
struct tun_file *tfile = file->private_data;
|
||||||
struct net_device *dev = tun->dev;
|
struct net_device *dev = tun->dev;
|
||||||
@@ -881,7 +882,8 @@ static int tun_attach(struct tun_struct *tun, struct file *file,
|
|||||||
* initialized tfile; otherwise we risk using half-initialized
|
* initialized tfile; otherwise we risk using half-initialized
|
||||||
* object.
|
* object.
|
||||||
*/
|
*/
|
||||||
rcu_assign_pointer(tfile->tun, tun);
|
if (publish_tun)
|
||||||
|
rcu_assign_pointer(tfile->tun, tun);
|
||||||
rcu_assign_pointer(tun->tfiles[tun->numqueues], tfile);
|
rcu_assign_pointer(tun->tfiles[tun->numqueues], tfile);
|
||||||
tun->numqueues++;
|
tun->numqueues++;
|
||||||
tun_set_real_num_queues(tun);
|
tun_set_real_num_queues(tun);
|
||||||
@@ -2557,7 +2559,7 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
|
|||||||
|
|
||||||
err = tun_attach(tun, file, ifr->ifr_flags & IFF_NOFILTER,
|
err = tun_attach(tun, file, ifr->ifr_flags & IFF_NOFILTER,
|
||||||
ifr->ifr_flags & IFF_NAPI,
|
ifr->ifr_flags & IFF_NAPI,
|
||||||
ifr->ifr_flags & IFF_NAPI_FRAGS);
|
ifr->ifr_flags & IFF_NAPI_FRAGS, true);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
@@ -2656,13 +2658,17 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
|
|||||||
|
|
||||||
INIT_LIST_HEAD(&tun->disabled);
|
INIT_LIST_HEAD(&tun->disabled);
|
||||||
err = tun_attach(tun, file, false, ifr->ifr_flags & IFF_NAPI,
|
err = tun_attach(tun, file, false, ifr->ifr_flags & IFF_NAPI,
|
||||||
ifr->ifr_flags & IFF_NAPI_FRAGS);
|
ifr->ifr_flags & IFF_NAPI_FRAGS, false);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto err_free_flow;
|
goto err_free_flow;
|
||||||
|
|
||||||
err = register_netdevice(tun->dev);
|
err = register_netdevice(tun->dev);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto err_detach;
|
goto err_detach;
|
||||||
|
/* free_netdev() won't check refcnt, to aovid race
|
||||||
|
* with dev_put() we need publish tun after registration.
|
||||||
|
*/
|
||||||
|
rcu_assign_pointer(tfile->tun, tun);
|
||||||
}
|
}
|
||||||
|
|
||||||
netif_carrier_on(tun->dev);
|
netif_carrier_on(tun->dev);
|
||||||
@@ -2806,7 +2812,7 @@ static int tun_set_queue(struct file *file, struct ifreq *ifr)
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto unlock;
|
goto unlock;
|
||||||
ret = tun_attach(tun, file, false, tun->flags & IFF_NAPI,
|
ret = tun_attach(tun, file, false, tun->flags & IFF_NAPI,
|
||||||
tun->flags & IFF_NAPI_FRAGS);
|
tun->flags & IFF_NAPI_FRAGS, true);
|
||||||
} else if (ifr->ifr_flags & IFF_DETACH_QUEUE) {
|
} else if (ifr->ifr_flags & IFF_DETACH_QUEUE) {
|
||||||
tun = rtnl_dereference(tfile->tun);
|
tun = rtnl_dereference(tfile->tun);
|
||||||
if (!tun || !(tun->flags & IFF_MULTI_QUEUE) || tfile->detached)
|
if (!tun || !(tun->flags & IFF_MULTI_QUEUE) || tfile->detached)
|
||||||
|
|||||||
@@ -221,9 +221,16 @@ int usbnet_generic_cdc_bind(struct usbnet *dev, struct usb_interface *intf)
|
|||||||
goto bad_desc;
|
goto bad_desc;
|
||||||
}
|
}
|
||||||
skip:
|
skip:
|
||||||
if ( rndis &&
|
/* Communcation class functions with bmCapabilities are not
|
||||||
header.usb_cdc_acm_descriptor &&
|
* RNDIS. But some Wireless class RNDIS functions use
|
||||||
header.usb_cdc_acm_descriptor->bmCapabilities) {
|
* bmCapabilities for their own purpose. The failsafe is
|
||||||
|
* therefore applied only to Communication class RNDIS
|
||||||
|
* functions. The rndis test is redundant, but a cheap
|
||||||
|
* optimization.
|
||||||
|
*/
|
||||||
|
if (rndis && is_rndis(&intf->cur_altsetting->desc) &&
|
||||||
|
header.usb_cdc_acm_descriptor &&
|
||||||
|
header.usb_cdc_acm_descriptor->bmCapabilities) {
|
||||||
dev_dbg(&intf->dev,
|
dev_dbg(&intf->dev,
|
||||||
"ACM capabilities %02x, not really RNDIS?\n",
|
"ACM capabilities %02x, not really RNDIS?\n",
|
||||||
header.usb_cdc_acm_descriptor->bmCapabilities);
|
header.usb_cdc_acm_descriptor->bmCapabilities);
|
||||||
|
|||||||
@@ -788,8 +788,11 @@ int get_registers(struct r8152 *tp, u16 value, u16 index, u16 size, void *data)
|
|||||||
ret = usb_control_msg(tp->udev, usb_rcvctrlpipe(tp->udev, 0),
|
ret = usb_control_msg(tp->udev, usb_rcvctrlpipe(tp->udev, 0),
|
||||||
RTL8152_REQ_GET_REGS, RTL8152_REQT_READ,
|
RTL8152_REQ_GET_REGS, RTL8152_REQT_READ,
|
||||||
value, index, tmp, size, 500);
|
value, index, tmp, size, 500);
|
||||||
|
if (ret < 0)
|
||||||
|
memset(data, 0xff, size);
|
||||||
|
else
|
||||||
|
memcpy(data, tmp, size);
|
||||||
|
|
||||||
memcpy(data, tmp, size);
|
|
||||||
kfree(tmp);
|
kfree(tmp);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
@@ -241,6 +241,9 @@ static int mwifiex_update_vs_ie(const u8 *ies, int ies_len,
|
|||||||
}
|
}
|
||||||
|
|
||||||
vs_ie = (struct ieee_types_header *)vendor_ie;
|
vs_ie = (struct ieee_types_header *)vendor_ie;
|
||||||
|
if (le16_to_cpu(ie->ie_length) + vs_ie->len + 2 >
|
||||||
|
IEEE_MAX_IE_SIZE)
|
||||||
|
return -EINVAL;
|
||||||
memcpy(ie->ie_buffer + le16_to_cpu(ie->ie_length),
|
memcpy(ie->ie_buffer + le16_to_cpu(ie->ie_length),
|
||||||
vs_ie, vs_ie->len + 2);
|
vs_ie, vs_ie->len + 2);
|
||||||
le16_unaligned_add_cpu(&ie->ie_length, vs_ie->len + 2);
|
le16_unaligned_add_cpu(&ie->ie_length, vs_ie->len + 2);
|
||||||
|
|||||||
@@ -265,6 +265,8 @@ mwifiex_set_uap_rates(struct mwifiex_uap_bss_param *bss_cfg,
|
|||||||
|
|
||||||
rate_ie = (void *)cfg80211_find_ie(WLAN_EID_SUPP_RATES, var_pos, len);
|
rate_ie = (void *)cfg80211_find_ie(WLAN_EID_SUPP_RATES, var_pos, len);
|
||||||
if (rate_ie) {
|
if (rate_ie) {
|
||||||
|
if (rate_ie->len > MWIFIEX_SUPPORTED_RATES)
|
||||||
|
return;
|
||||||
memcpy(bss_cfg->rates, rate_ie + 1, rate_ie->len);
|
memcpy(bss_cfg->rates, rate_ie + 1, rate_ie->len);
|
||||||
rate_len = rate_ie->len;
|
rate_len = rate_ie->len;
|
||||||
}
|
}
|
||||||
@@ -272,8 +274,11 @@ mwifiex_set_uap_rates(struct mwifiex_uap_bss_param *bss_cfg,
|
|||||||
rate_ie = (void *)cfg80211_find_ie(WLAN_EID_EXT_SUPP_RATES,
|
rate_ie = (void *)cfg80211_find_ie(WLAN_EID_EXT_SUPP_RATES,
|
||||||
params->beacon.tail,
|
params->beacon.tail,
|
||||||
params->beacon.tail_len);
|
params->beacon.tail_len);
|
||||||
if (rate_ie)
|
if (rate_ie) {
|
||||||
|
if (rate_ie->len > MWIFIEX_SUPPORTED_RATES - rate_len)
|
||||||
|
return;
|
||||||
memcpy(bss_cfg->rates + rate_len, rate_ie + 1, rate_ie->len);
|
memcpy(bss_cfg->rates + rate_len, rate_ie + 1, rate_ie->len);
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -391,6 +396,8 @@ mwifiex_set_wmm_params(struct mwifiex_private *priv,
|
|||||||
params->beacon.tail_len);
|
params->beacon.tail_len);
|
||||||
if (vendor_ie) {
|
if (vendor_ie) {
|
||||||
wmm_ie = vendor_ie;
|
wmm_ie = vendor_ie;
|
||||||
|
if (*(wmm_ie + 1) > sizeof(struct mwifiex_types_wmm_info))
|
||||||
|
return;
|
||||||
memcpy(&bss_cfg->wmm_info, wmm_ie +
|
memcpy(&bss_cfg->wmm_info, wmm_ie +
|
||||||
sizeof(struct ieee_types_header), *(wmm_ie + 1));
|
sizeof(struct ieee_types_header), *(wmm_ie + 1));
|
||||||
priv->wmm_enabled = 1;
|
priv->wmm_enabled = 1;
|
||||||
|
|||||||
@@ -643,7 +643,6 @@ static int rsi_init_usb_interface(struct rsi_hw *adapter,
|
|||||||
kfree(rsi_dev->tx_buffer);
|
kfree(rsi_dev->tx_buffer);
|
||||||
|
|
||||||
fail_eps:
|
fail_eps:
|
||||||
kfree(rsi_dev);
|
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -909,7 +909,7 @@ static RING_IDX xennet_fill_frags(struct netfront_queue *queue,
|
|||||||
__pskb_pull_tail(skb, pull_to - skb_headlen(skb));
|
__pskb_pull_tail(skb, pull_to - skb_headlen(skb));
|
||||||
}
|
}
|
||||||
if (unlikely(skb_shinfo(skb)->nr_frags >= MAX_SKB_FRAGS)) {
|
if (unlikely(skb_shinfo(skb)->nr_frags >= MAX_SKB_FRAGS)) {
|
||||||
queue->rx.rsp_cons = ++cons;
|
queue->rx.rsp_cons = ++cons + skb_queue_len(list);
|
||||||
kfree_skb(nskb);
|
kfree_skb(nskb);
|
||||||
return ~0U;
|
return ~0U;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -198,10 +198,17 @@ int nvmem_sysfs_setup_compat(struct nvmem_device *nvmem,
|
|||||||
if (!config->base_dev)
|
if (!config->base_dev)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (nvmem->read_only)
|
if (nvmem->read_only) {
|
||||||
nvmem->eeprom = bin_attr_ro_root_nvmem;
|
if (config->root_only)
|
||||||
else
|
nvmem->eeprom = bin_attr_ro_root_nvmem;
|
||||||
nvmem->eeprom = bin_attr_rw_root_nvmem;
|
else
|
||||||
|
nvmem->eeprom = bin_attr_ro_nvmem;
|
||||||
|
} else {
|
||||||
|
if (config->root_only)
|
||||||
|
nvmem->eeprom = bin_attr_rw_root_nvmem;
|
||||||
|
else
|
||||||
|
nvmem->eeprom = bin_attr_rw_nvmem;
|
||||||
|
}
|
||||||
nvmem->eeprom.attr.name = "eeprom";
|
nvmem->eeprom.attr.name = "eeprom";
|
||||||
nvmem->eeprom.size = nvmem->size;
|
nvmem->eeprom.size = nvmem->size;
|
||||||
#ifdef CONFIG_DEBUG_LOCK_ALLOC
|
#ifdef CONFIG_DEBUG_LOCK_ALLOC
|
||||||
|
|||||||
@@ -467,8 +467,8 @@ static int kirin_pcie_add_msi(struct dw_pcie *pci,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __init kirin_add_pcie_port(struct dw_pcie *pci,
|
static int kirin_add_pcie_port(struct dw_pcie *pci,
|
||||||
struct platform_device *pdev)
|
struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
|||||||
@@ -399,7 +399,8 @@ void __weak pcibios_free_irq(struct pci_dev *dev)
|
|||||||
#ifdef CONFIG_PCI_IOV
|
#ifdef CONFIG_PCI_IOV
|
||||||
static inline bool pci_device_can_probe(struct pci_dev *pdev)
|
static inline bool pci_device_can_probe(struct pci_dev *pdev)
|
||||||
{
|
{
|
||||||
return (!pdev->is_virtfn || pdev->physfn->sriov->drivers_autoprobe);
|
return (!pdev->is_virtfn || pdev->physfn->sriov->drivers_autoprobe ||
|
||||||
|
pdev->driver_override);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static inline bool pci_device_can_probe(struct pci_dev *pdev)
|
static inline bool pci_device_can_probe(struct pci_dev *pdev)
|
||||||
|
|||||||
@@ -66,6 +66,7 @@
|
|||||||
USB2_OBINT_IDDIGCHG)
|
USB2_OBINT_IDDIGCHG)
|
||||||
|
|
||||||
/* VBCTRL */
|
/* VBCTRL */
|
||||||
|
#define USB2_VBCTRL_OCCLREN BIT(16)
|
||||||
#define USB2_VBCTRL_DRVVBUSSEL BIT(8)
|
#define USB2_VBCTRL_DRVVBUSSEL BIT(8)
|
||||||
|
|
||||||
/* LINECTRL1 */
|
/* LINECTRL1 */
|
||||||
@@ -289,6 +290,7 @@ static void rcar_gen3_init_otg(struct rcar_gen3_chan *ch)
|
|||||||
u32 val;
|
u32 val;
|
||||||
|
|
||||||
val = readl(usb2_base + USB2_VBCTRL);
|
val = readl(usb2_base + USB2_VBCTRL);
|
||||||
|
val &= ~USB2_VBCTRL_OCCLREN;
|
||||||
writel(val | USB2_VBCTRL_DRVVBUSSEL, usb2_base + USB2_VBCTRL);
|
writel(val | USB2_VBCTRL_DRVVBUSSEL, usb2_base + USB2_VBCTRL);
|
||||||
writel(USB2_OBINT_BITS, usb2_base + USB2_OBINTSTA);
|
writel(USB2_OBINT_BITS, usb2_base + USB2_OBINTSTA);
|
||||||
val = readl(usb2_base + USB2_OBINTEN);
|
val = readl(usb2_base + USB2_OBINTEN);
|
||||||
|
|||||||
@@ -421,6 +421,14 @@ static const struct dmi_system_id critclk_systems[] = {
|
|||||||
DMI_MATCH(DMI_BOARD_NAME, "CB3163"),
|
DMI_MATCH(DMI_BOARD_NAME, "CB3163"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
/* pmc_plt_clk* - are used for ethernet controllers */
|
||||||
|
.ident = "Beckhoff CB4063",
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_SYS_VENDOR, "Beckhoff Automation"),
|
||||||
|
DMI_MATCH(DMI_BOARD_NAME, "CB4063"),
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
/* pmc_plt_clk* - are used for ethernet controllers */
|
/* pmc_plt_clk* - are used for ethernet controllers */
|
||||||
.ident = "Beckhoff CB6263",
|
.ident = "Beckhoff CB6263",
|
||||||
|
|||||||
@@ -1270,7 +1270,6 @@ atmel_handle_transmit(struct uart_port *port, unsigned int pending)
|
|||||||
|
|
||||||
atmel_port->hd_start_rx = false;
|
atmel_port->hd_start_rx = false;
|
||||||
atmel_start_rx(port);
|
atmel_start_rx(port);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
atmel_tasklet_schedule(atmel_port, &atmel_port->tasklet_tx);
|
atmel_tasklet_schedule(atmel_port, &atmel_port->tasklet_tx);
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ static inline void sprd_rx(struct uart_port *port)
|
|||||||
|
|
||||||
if (lsr & (SPRD_LSR_BI | SPRD_LSR_PE |
|
if (lsr & (SPRD_LSR_BI | SPRD_LSR_PE |
|
||||||
SPRD_LSR_FE | SPRD_LSR_OE))
|
SPRD_LSR_FE | SPRD_LSR_OE))
|
||||||
if (handle_lsr_errors(port, &lsr, &flag))
|
if (handle_lsr_errors(port, &flag, &lsr))
|
||||||
continue;
|
continue;
|
||||||
if (uart_handle_sysrq_char(port, ch))
|
if (uart_handle_sysrq_char(port, ch))
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -928,7 +928,7 @@ int usb_get_bos_descriptor(struct usb_device *dev)
|
|||||||
struct usb_bos_descriptor *bos;
|
struct usb_bos_descriptor *bos;
|
||||||
struct usb_dev_cap_header *cap;
|
struct usb_dev_cap_header *cap;
|
||||||
struct usb_ssp_cap_descriptor *ssp_cap;
|
struct usb_ssp_cap_descriptor *ssp_cap;
|
||||||
unsigned char *buffer;
|
unsigned char *buffer, *buffer0;
|
||||||
int length, total_len, num, i, ssac;
|
int length, total_len, num, i, ssac;
|
||||||
__u8 cap_type;
|
__u8 cap_type;
|
||||||
int ret;
|
int ret;
|
||||||
@@ -973,10 +973,12 @@ int usb_get_bos_descriptor(struct usb_device *dev)
|
|||||||
ret = -ENOMSG;
|
ret = -ENOMSG;
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
buffer0 = buffer;
|
||||||
total_len -= length;
|
total_len -= length;
|
||||||
|
buffer += length;
|
||||||
|
|
||||||
for (i = 0; i < num; i++) {
|
for (i = 0; i < num; i++) {
|
||||||
buffer += length;
|
|
||||||
cap = (struct usb_dev_cap_header *)buffer;
|
cap = (struct usb_dev_cap_header *)buffer;
|
||||||
|
|
||||||
if (total_len < sizeof(*cap) || total_len < cap->bLength) {
|
if (total_len < sizeof(*cap) || total_len < cap->bLength) {
|
||||||
@@ -990,8 +992,6 @@ int usb_get_bos_descriptor(struct usb_device *dev)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
total_len -= length;
|
|
||||||
|
|
||||||
if (cap->bDescriptorType != USB_DT_DEVICE_CAPABILITY) {
|
if (cap->bDescriptorType != USB_DT_DEVICE_CAPABILITY) {
|
||||||
dev_warn(ddev, "descriptor type invalid, skip\n");
|
dev_warn(ddev, "descriptor type invalid, skip\n");
|
||||||
continue;
|
continue;
|
||||||
@@ -1035,7 +1035,11 @@ int usb_get_bos_descriptor(struct usb_device *dev)
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
total_len -= length;
|
||||||
|
buffer += length;
|
||||||
}
|
}
|
||||||
|
dev->bos->desc->wTotalLength = cpu_to_le16(buffer - buffer0);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|||||||
@@ -1148,6 +1148,16 @@ static int tegra_xusb_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
tegra_xusb_ipfs_config(tegra, regs);
|
tegra_xusb_ipfs_config(tegra, regs);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The XUSB Falcon microcontroller can only address 40 bits, so set
|
||||||
|
* the DMA mask accordingly.
|
||||||
|
*/
|
||||||
|
err = dma_set_mask_and_coherent(tegra->dev, DMA_BIT_MASK(40));
|
||||||
|
if (err < 0) {
|
||||||
|
dev_err(&pdev->dev, "failed to set DMA mask: %d\n", err);
|
||||||
|
goto put_rpm;
|
||||||
|
}
|
||||||
|
|
||||||
err = tegra_xusb_load_firmware(tegra);
|
err = tegra_xusb_load_firmware(tegra);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
dev_err(&pdev->dev, "failed to load firmware: %d\n", err);
|
dev_err(&pdev->dev, "failed to load firmware: %d\n", err);
|
||||||
|
|||||||
@@ -1137,6 +1137,17 @@ static int load_elf_binary(struct linux_binprm *bprm)
|
|||||||
current->mm->start_stack = bprm->p;
|
current->mm->start_stack = bprm->p;
|
||||||
|
|
||||||
if ((current->flags & PF_RANDOMIZE) && (randomize_va_space > 1)) {
|
if ((current->flags & PF_RANDOMIZE) && (randomize_va_space > 1)) {
|
||||||
|
/*
|
||||||
|
* For architectures with ELF randomization, when executing
|
||||||
|
* a loader directly (i.e. no interpreter listed in ELF
|
||||||
|
* headers), move the brk area out of the mmap region
|
||||||
|
* (since it grows up, and may collide early with the stack
|
||||||
|
* growing down), and into the unused ELF_ET_DYN_BASE region.
|
||||||
|
*/
|
||||||
|
if (IS_ENABLED(CONFIG_ARCH_HAS_ELF_RANDOMIZE) && !interpreter)
|
||||||
|
current->mm->brk = current->mm->start_brk =
|
||||||
|
ELF_ET_DYN_BASE;
|
||||||
|
|
||||||
current->mm->brk = current->mm->start_brk =
|
current->mm->brk = current->mm->start_brk =
|
||||||
arch_randomize_brk(current->mm);
|
arch_randomize_brk(current->mm);
|
||||||
#ifdef compat_brk_randomized
|
#ifdef compat_brk_randomized
|
||||||
|
|||||||
@@ -5107,7 +5107,7 @@ static int btrfs_log_inode(struct btrfs_trans_handle *trans,
|
|||||||
BTRFS_I(other_inode),
|
BTRFS_I(other_inode),
|
||||||
LOG_OTHER_INODE, 0, LLONG_MAX,
|
LOG_OTHER_INODE, 0, LLONG_MAX,
|
||||||
ctx);
|
ctx);
|
||||||
iput(other_inode);
|
btrfs_add_delayed_iput(other_inode);
|
||||||
if (err)
|
if (err)
|
||||||
goto out_unlock;
|
goto out_unlock;
|
||||||
else
|
else
|
||||||
@@ -5519,7 +5519,7 @@ static int log_new_dir_dentries(struct btrfs_trans_handle *trans,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (btrfs_inode_in_log(BTRFS_I(di_inode), trans->transid)) {
|
if (btrfs_inode_in_log(BTRFS_I(di_inode), trans->transid)) {
|
||||||
iput(di_inode);
|
btrfs_add_delayed_iput(di_inode);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5531,7 +5531,7 @@ static int log_new_dir_dentries(struct btrfs_trans_handle *trans,
|
|||||||
if (!ret &&
|
if (!ret &&
|
||||||
btrfs_must_commit_transaction(trans, BTRFS_I(di_inode)))
|
btrfs_must_commit_transaction(trans, BTRFS_I(di_inode)))
|
||||||
ret = 1;
|
ret = 1;
|
||||||
iput(di_inode);
|
btrfs_add_delayed_iput(di_inode);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto next_dir_inode;
|
goto next_dir_inode;
|
||||||
if (ctx->log_new_dentries) {
|
if (ctx->log_new_dentries) {
|
||||||
@@ -5678,7 +5678,7 @@ static int btrfs_log_all_parents(struct btrfs_trans_handle *trans,
|
|||||||
if (!ret && ctx && ctx->log_new_dentries)
|
if (!ret && ctx && ctx->log_new_dentries)
|
||||||
ret = log_new_dir_dentries(trans, root,
|
ret = log_new_dir_dentries(trans, root,
|
||||||
BTRFS_I(dir_inode), ctx);
|
BTRFS_I(dir_inode), ctx);
|
||||||
iput(dir_inode);
|
btrfs_add_delayed_iput(dir_inode);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2756,6 +2756,7 @@ static int
|
|||||||
cifs_set_cifscreds(struct smb_vol *vol, struct cifs_ses *ses)
|
cifs_set_cifscreds(struct smb_vol *vol, struct cifs_ses *ses)
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
int is_domain = 0;
|
||||||
const char *delim, *payload;
|
const char *delim, *payload;
|
||||||
char *desc;
|
char *desc;
|
||||||
ssize_t len;
|
ssize_t len;
|
||||||
@@ -2803,6 +2804,7 @@ cifs_set_cifscreds(struct smb_vol *vol, struct cifs_ses *ses)
|
|||||||
rc = PTR_ERR(key);
|
rc = PTR_ERR(key);
|
||||||
goto out_err;
|
goto out_err;
|
||||||
}
|
}
|
||||||
|
is_domain = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
down_read(&key->sem);
|
down_read(&key->sem);
|
||||||
@@ -2860,6 +2862,26 @@ cifs_set_cifscreds(struct smb_vol *vol, struct cifs_ses *ses)
|
|||||||
goto out_key_put;
|
goto out_key_put;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If we have a domain key then we must set the domainName in the
|
||||||
|
* for the request.
|
||||||
|
*/
|
||||||
|
if (is_domain && ses->domainName) {
|
||||||
|
vol->domainname = kstrndup(ses->domainName,
|
||||||
|
strlen(ses->domainName),
|
||||||
|
GFP_KERNEL);
|
||||||
|
if (!vol->domainname) {
|
||||||
|
cifs_dbg(FYI, "Unable to allocate %zd bytes for "
|
||||||
|
"domain\n", len);
|
||||||
|
rc = -ENOMEM;
|
||||||
|
kfree(vol->username);
|
||||||
|
vol->username = NULL;
|
||||||
|
kzfree(vol->password);
|
||||||
|
vol->password = NULL;
|
||||||
|
goto out_key_put;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
out_key_put:
|
out_key_put:
|
||||||
up_read(&key->sem);
|
up_read(&key->sem);
|
||||||
key_put(key);
|
key_put(key);
|
||||||
|
|||||||
@@ -1487,7 +1487,7 @@ static int nfs_finish_open(struct nfs_open_context *ctx,
|
|||||||
if (S_ISREG(file->f_path.dentry->d_inode->i_mode))
|
if (S_ISREG(file->f_path.dentry->d_inode->i_mode))
|
||||||
nfs_file_set_open_context(file, ctx);
|
nfs_file_set_open_context(file, ctx);
|
||||||
else
|
else
|
||||||
err = -ESTALE;
|
err = -EOPENSTALE;
|
||||||
out:
|
out:
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,13 +73,13 @@ nfs4_file_open(struct inode *inode, struct file *filp)
|
|||||||
if (IS_ERR(inode)) {
|
if (IS_ERR(inode)) {
|
||||||
err = PTR_ERR(inode);
|
err = PTR_ERR(inode);
|
||||||
switch (err) {
|
switch (err) {
|
||||||
case -EPERM:
|
|
||||||
case -EACCES:
|
|
||||||
case -EDQUOT:
|
|
||||||
case -ENOSPC:
|
|
||||||
case -EROFS:
|
|
||||||
goto out_put_ctx;
|
|
||||||
default:
|
default:
|
||||||
|
goto out_put_ctx;
|
||||||
|
case -ENOENT:
|
||||||
|
case -ESTALE:
|
||||||
|
case -EISDIR:
|
||||||
|
case -ENOTDIR:
|
||||||
|
case -ELOOP:
|
||||||
goto out_drop;
|
goto out_drop;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -567,7 +567,7 @@ static void nfs_pgio_rpcsetup(struct nfs_pgio_header *hdr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
hdr->res.fattr = &hdr->fattr;
|
hdr->res.fattr = &hdr->fattr;
|
||||||
hdr->res.count = count;
|
hdr->res.count = 0;
|
||||||
hdr->res.eof = 0;
|
hdr->res.eof = 0;
|
||||||
hdr->res.verf = &hdr->verf;
|
hdr->res.verf = &hdr->verf;
|
||||||
nfs_fattr_init(&hdr->fattr);
|
nfs_fattr_init(&hdr->fattr);
|
||||||
|
|||||||
@@ -594,7 +594,8 @@ static int nfs_read_done(struct rpc_task *task, struct nfs_pgio_header *hdr)
|
|||||||
/* Emulate the eof flag, which isn't normally needed in NFSv2
|
/* Emulate the eof flag, which isn't normally needed in NFSv2
|
||||||
* as it is guaranteed to always return the file attributes
|
* as it is guaranteed to always return the file attributes
|
||||||
*/
|
*/
|
||||||
if (hdr->args.offset + hdr->res.count >= hdr->res.fattr->size)
|
if ((hdr->res.count == 0 && hdr->args.count > 0) ||
|
||||||
|
hdr->args.offset + hdr->res.count >= hdr->res.fattr->size)
|
||||||
hdr->res.eof = 1;
|
hdr->res.eof = 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@@ -615,8 +616,10 @@ static int nfs_proc_pgio_rpc_prepare(struct rpc_task *task,
|
|||||||
|
|
||||||
static int nfs_write_done(struct rpc_task *task, struct nfs_pgio_header *hdr)
|
static int nfs_write_done(struct rpc_task *task, struct nfs_pgio_header *hdr)
|
||||||
{
|
{
|
||||||
if (task->tk_status >= 0)
|
if (task->tk_status >= 0) {
|
||||||
|
hdr->res.count = hdr->args.count;
|
||||||
nfs_writeback_update_inode(hdr);
|
nfs_writeback_update_inode(hdr);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ struct ovl_fs {
|
|||||||
bool workdir_locked;
|
bool workdir_locked;
|
||||||
/* Traps in ovl inode cache */
|
/* Traps in ovl inode cache */
|
||||||
struct inode *upperdir_trap;
|
struct inode *upperdir_trap;
|
||||||
|
struct inode *workbasedir_trap;
|
||||||
struct inode *workdir_trap;
|
struct inode *workdir_trap;
|
||||||
struct inode *indexdir_trap;
|
struct inode *indexdir_trap;
|
||||||
/* Inode numbers in all layers do not use the high xino_bits */
|
/* Inode numbers in all layers do not use the high xino_bits */
|
||||||
|
|||||||
@@ -222,6 +222,7 @@ static void ovl_free_fs(struct ovl_fs *ofs)
|
|||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
||||||
|
iput(ofs->workbasedir_trap);
|
||||||
iput(ofs->indexdir_trap);
|
iput(ofs->indexdir_trap);
|
||||||
iput(ofs->workdir_trap);
|
iput(ofs->workdir_trap);
|
||||||
iput(ofs->upperdir_trap);
|
iput(ofs->upperdir_trap);
|
||||||
@@ -1046,6 +1047,25 @@ static int ovl_setup_trap(struct super_block *sb, struct dentry *dir,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Determine how we treat concurrent use of upperdir/workdir based on the
|
||||||
|
* index feature. This is papering over mount leaks of container runtimes,
|
||||||
|
* for example, an old overlay mount is leaked and now its upperdir is
|
||||||
|
* attempted to be used as a lower layer in a new overlay mount.
|
||||||
|
*/
|
||||||
|
static int ovl_report_in_use(struct ovl_fs *ofs, const char *name)
|
||||||
|
{
|
||||||
|
if (ofs->config.index) {
|
||||||
|
pr_err("overlayfs: %s is in-use as upperdir/workdir of another mount, mount with '-o index=off' to override exclusive upperdir protection.\n",
|
||||||
|
name);
|
||||||
|
return -EBUSY;
|
||||||
|
} else {
|
||||||
|
pr_warn("overlayfs: %s is in-use as upperdir/workdir of another mount, accessing files from both mounts will result in undefined behavior.\n",
|
||||||
|
name);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static int ovl_get_upper(struct super_block *sb, struct ovl_fs *ofs,
|
static int ovl_get_upper(struct super_block *sb, struct ovl_fs *ofs,
|
||||||
struct path *upperpath)
|
struct path *upperpath)
|
||||||
{
|
{
|
||||||
@@ -1083,14 +1103,12 @@ static int ovl_get_upper(struct super_block *sb, struct ovl_fs *ofs,
|
|||||||
upper_mnt->mnt_flags &= ~(MNT_NOATIME | MNT_NODIRATIME | MNT_RELATIME);
|
upper_mnt->mnt_flags &= ~(MNT_NOATIME | MNT_NODIRATIME | MNT_RELATIME);
|
||||||
ofs->upper_mnt = upper_mnt;
|
ofs->upper_mnt = upper_mnt;
|
||||||
|
|
||||||
err = -EBUSY;
|
|
||||||
if (ovl_inuse_trylock(ofs->upper_mnt->mnt_root)) {
|
if (ovl_inuse_trylock(ofs->upper_mnt->mnt_root)) {
|
||||||
ofs->upperdir_locked = true;
|
ofs->upperdir_locked = true;
|
||||||
} else if (ofs->config.index) {
|
|
||||||
pr_err("overlayfs: upperdir is in-use by another mount, mount with '-o index=off' to override exclusive upperdir protection.\n");
|
|
||||||
goto out;
|
|
||||||
} else {
|
} else {
|
||||||
pr_warn("overlayfs: upperdir is in-use by another mount, accessing files from both mounts will result in undefined behavior.\n");
|
err = ovl_report_in_use(ofs, "upperdir");
|
||||||
|
if (err)
|
||||||
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = 0;
|
err = 0;
|
||||||
@@ -1200,16 +1218,19 @@ static int ovl_get_workdir(struct super_block *sb, struct ovl_fs *ofs,
|
|||||||
|
|
||||||
ofs->workbasedir = dget(workpath.dentry);
|
ofs->workbasedir = dget(workpath.dentry);
|
||||||
|
|
||||||
err = -EBUSY;
|
|
||||||
if (ovl_inuse_trylock(ofs->workbasedir)) {
|
if (ovl_inuse_trylock(ofs->workbasedir)) {
|
||||||
ofs->workdir_locked = true;
|
ofs->workdir_locked = true;
|
||||||
} else if (ofs->config.index) {
|
|
||||||
pr_err("overlayfs: workdir is in-use by another mount, mount with '-o index=off' to override exclusive workdir protection.\n");
|
|
||||||
goto out;
|
|
||||||
} else {
|
} else {
|
||||||
pr_warn("overlayfs: workdir is in-use by another mount, accessing files from both mounts will result in undefined behavior.\n");
|
err = ovl_report_in_use(ofs, "workdir");
|
||||||
|
if (err)
|
||||||
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = ovl_setup_trap(sb, ofs->workbasedir, &ofs->workbasedir_trap,
|
||||||
|
"workdir");
|
||||||
|
if (err)
|
||||||
|
goto out;
|
||||||
|
|
||||||
err = ovl_make_workdir(sb, ofs, &workpath);
|
err = ovl_make_workdir(sb, ofs, &workpath);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
@@ -1328,16 +1349,16 @@ static int ovl_get_lower_layers(struct super_block *sb, struct ovl_fs *ofs,
|
|||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
err = -EBUSY;
|
|
||||||
if (ovl_is_inuse(stack[i].dentry)) {
|
|
||||||
pr_err("overlayfs: lowerdir is in-use as upperdir/workdir\n");
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
err = ovl_setup_trap(sb, stack[i].dentry, &trap, "lowerdir");
|
err = ovl_setup_trap(sb, stack[i].dentry, &trap, "lowerdir");
|
||||||
if (err)
|
if (err)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
if (ovl_is_inuse(stack[i].dentry)) {
|
||||||
|
err = ovl_report_in_use(ofs, "lowerdir");
|
||||||
|
if (err)
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
mnt = clone_private_mount(&stack[i]);
|
mnt = clone_private_mount(&stack[i]);
|
||||||
err = PTR_ERR(mnt);
|
err = PTR_ERR(mnt);
|
||||||
if (IS_ERR(mnt)) {
|
if (IS_ERR(mnt)) {
|
||||||
@@ -1484,8 +1505,8 @@ static struct ovl_entry *ovl_get_lowerstack(struct super_block *sb,
|
|||||||
* - another layer of this overlayfs instance
|
* - another layer of this overlayfs instance
|
||||||
* - upper/work dir of any overlayfs instance
|
* - upper/work dir of any overlayfs instance
|
||||||
*/
|
*/
|
||||||
static int ovl_check_layer(struct super_block *sb, struct dentry *dentry,
|
static int ovl_check_layer(struct super_block *sb, struct ovl_fs *ofs,
|
||||||
const char *name)
|
struct dentry *dentry, const char *name)
|
||||||
{
|
{
|
||||||
struct dentry *next = dentry, *parent;
|
struct dentry *next = dentry, *parent;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
@@ -1497,13 +1518,11 @@ static int ovl_check_layer(struct super_block *sb, struct dentry *dentry,
|
|||||||
|
|
||||||
/* Walk back ancestors to root (inclusive) looking for traps */
|
/* Walk back ancestors to root (inclusive) looking for traps */
|
||||||
while (!err && parent != next) {
|
while (!err && parent != next) {
|
||||||
if (ovl_is_inuse(parent)) {
|
if (ovl_lookup_trap_inode(sb, parent)) {
|
||||||
err = -EBUSY;
|
|
||||||
pr_err("overlayfs: %s path overlapping in-use upperdir/workdir\n",
|
|
||||||
name);
|
|
||||||
} else if (ovl_lookup_trap_inode(sb, parent)) {
|
|
||||||
err = -ELOOP;
|
err = -ELOOP;
|
||||||
pr_err("overlayfs: overlapping %s path\n", name);
|
pr_err("overlayfs: overlapping %s path\n", name);
|
||||||
|
} else if (ovl_is_inuse(parent)) {
|
||||||
|
err = ovl_report_in_use(ofs, name);
|
||||||
}
|
}
|
||||||
next = parent;
|
next = parent;
|
||||||
parent = dget_parent(next);
|
parent = dget_parent(next);
|
||||||
@@ -1524,7 +1543,8 @@ static int ovl_check_overlapping_layers(struct super_block *sb,
|
|||||||
int i, err;
|
int i, err;
|
||||||
|
|
||||||
if (ofs->upper_mnt) {
|
if (ofs->upper_mnt) {
|
||||||
err = ovl_check_layer(sb, ofs->upper_mnt->mnt_root, "upperdir");
|
err = ovl_check_layer(sb, ofs, ofs->upper_mnt->mnt_root,
|
||||||
|
"upperdir");
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
@@ -1535,13 +1555,14 @@ static int ovl_check_overlapping_layers(struct super_block *sb,
|
|||||||
* workbasedir. In that case, we already have their traps in
|
* workbasedir. In that case, we already have their traps in
|
||||||
* inode cache and we will catch that case on lookup.
|
* inode cache and we will catch that case on lookup.
|
||||||
*/
|
*/
|
||||||
err = ovl_check_layer(sb, ofs->workbasedir, "workdir");
|
err = ovl_check_layer(sb, ofs, ofs->workbasedir, "workdir");
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < ofs->numlower; i++) {
|
for (i = 0; i < ofs->numlower; i++) {
|
||||||
err = ovl_check_layer(sb, ofs->lower_layers[i].mnt->mnt_root,
|
err = ovl_check_layer(sb, ofs,
|
||||||
|
ofs->lower_layers[i].mnt->mnt_root,
|
||||||
"lowerdir");
|
"lowerdir");
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|||||||
@@ -1165,8 +1165,8 @@ static struct ubifs_znode *dirty_cow_bottom_up(struct ubifs_info *c,
|
|||||||
* o exact match, i.e. the found zero-level znode contains key @key, then %1
|
* o exact match, i.e. the found zero-level znode contains key @key, then %1
|
||||||
* is returned and slot number of the matched branch is stored in @n;
|
* is returned and slot number of the matched branch is stored in @n;
|
||||||
* o not exact match, which means that zero-level znode does not contain
|
* o not exact match, which means that zero-level znode does not contain
|
||||||
* @key, then %0 is returned and slot number of the closest branch is stored
|
* @key, then %0 is returned and slot number of the closest branch or %-1
|
||||||
* in @n;
|
* is stored in @n; In this case calling tnc_next() is mandatory.
|
||||||
* o @key is so small that it is even less than the lowest key of the
|
* o @key is so small that it is even less than the lowest key of the
|
||||||
* leftmost zero-level node, then %0 is returned and %0 is stored in @n.
|
* leftmost zero-level node, then %0 is returned and %0 is stored in @n.
|
||||||
*
|
*
|
||||||
@@ -1883,13 +1883,19 @@ int ubifs_tnc_lookup_nm(struct ubifs_info *c, const union ubifs_key *key,
|
|||||||
|
|
||||||
static int search_dh_cookie(struct ubifs_info *c, const union ubifs_key *key,
|
static int search_dh_cookie(struct ubifs_info *c, const union ubifs_key *key,
|
||||||
struct ubifs_dent_node *dent, uint32_t cookie,
|
struct ubifs_dent_node *dent, uint32_t cookie,
|
||||||
struct ubifs_znode **zn, int *n)
|
struct ubifs_znode **zn, int *n, int exact)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
struct ubifs_znode *znode = *zn;
|
struct ubifs_znode *znode = *zn;
|
||||||
struct ubifs_zbranch *zbr;
|
struct ubifs_zbranch *zbr;
|
||||||
union ubifs_key *dkey;
|
union ubifs_key *dkey;
|
||||||
|
|
||||||
|
if (!exact) {
|
||||||
|
err = tnc_next(c, &znode, n);
|
||||||
|
if (err)
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
zbr = &znode->zbranch[*n];
|
zbr = &znode->zbranch[*n];
|
||||||
dkey = &zbr->key;
|
dkey = &zbr->key;
|
||||||
@@ -1931,7 +1937,7 @@ static int do_lookup_dh(struct ubifs_info *c, const union ubifs_key *key,
|
|||||||
if (unlikely(err < 0))
|
if (unlikely(err < 0))
|
||||||
goto out_unlock;
|
goto out_unlock;
|
||||||
|
|
||||||
err = search_dh_cookie(c, key, dent, cookie, &znode, &n);
|
err = search_dh_cookie(c, key, dent, cookie, &znode, &n, err);
|
||||||
|
|
||||||
out_unlock:
|
out_unlock:
|
||||||
mutex_unlock(&c->tnc_mutex);
|
mutex_unlock(&c->tnc_mutex);
|
||||||
@@ -2718,7 +2724,7 @@ int ubifs_tnc_remove_dh(struct ubifs_info *c, const union ubifs_key *key,
|
|||||||
if (unlikely(err < 0))
|
if (unlikely(err < 0))
|
||||||
goto out_free;
|
goto out_free;
|
||||||
|
|
||||||
err = search_dh_cookie(c, key, dent, cookie, &znode, &n);
|
err = search_dh_cookie(c, key, dent, cookie, &znode, &n, err);
|
||||||
if (err)
|
if (err)
|
||||||
goto out_free;
|
goto out_free;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,8 @@ struct sock_reuseport {
|
|||||||
unsigned int synq_overflow_ts;
|
unsigned int synq_overflow_ts;
|
||||||
/* ID stays the same even after the size of socks[] grows. */
|
/* ID stays the same even after the size of socks[] grows. */
|
||||||
unsigned int reuseport_id;
|
unsigned int reuseport_id;
|
||||||
bool bind_inany;
|
unsigned int bind_inany:1;
|
||||||
|
unsigned int has_conns:1;
|
||||||
struct bpf_prog __rcu *prog; /* optional BPF sock selector */
|
struct bpf_prog __rcu *prog; /* optional BPF sock selector */
|
||||||
struct sock *socks[0]; /* array of sock pointers */
|
struct sock *socks[0]; /* array of sock pointers */
|
||||||
};
|
};
|
||||||
@@ -35,6 +36,24 @@ extern struct sock *reuseport_select_sock(struct sock *sk,
|
|||||||
struct sk_buff *skb,
|
struct sk_buff *skb,
|
||||||
int hdr_len);
|
int hdr_len);
|
||||||
extern int reuseport_attach_prog(struct sock *sk, struct bpf_prog *prog);
|
extern int reuseport_attach_prog(struct sock *sk, struct bpf_prog *prog);
|
||||||
|
|
||||||
|
static inline bool reuseport_has_conns(struct sock *sk, bool set)
|
||||||
|
{
|
||||||
|
struct sock_reuseport *reuse;
|
||||||
|
bool ret = false;
|
||||||
|
|
||||||
|
rcu_read_lock();
|
||||||
|
reuse = rcu_dereference(sk->sk_reuseport_cb);
|
||||||
|
if (reuse) {
|
||||||
|
if (set)
|
||||||
|
reuse->has_conns = 1;
|
||||||
|
ret = reuse->has_conns;
|
||||||
|
}
|
||||||
|
rcu_read_unlock();
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
int reuseport_get_id(struct sock_reuseport *reuse);
|
int reuseport_get_id(struct sock_reuseport *reuse);
|
||||||
|
|
||||||
#endif /* _SOCK_REUSEPORT_H */
|
#endif /* _SOCK_REUSEPORT_H */
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
#define CAPI_MSG_BASELEN 8
|
#define CAPI_MSG_BASELEN 8
|
||||||
#define CAPI_DATA_B3_REQ_LEN (CAPI_MSG_BASELEN+4+4+2+2+2)
|
#define CAPI_DATA_B3_REQ_LEN (CAPI_MSG_BASELEN+4+4+2+2+2)
|
||||||
#define CAPI_DATA_B3_RESP_LEN (CAPI_MSG_BASELEN+4+2)
|
#define CAPI_DATA_B3_RESP_LEN (CAPI_MSG_BASELEN+4+2)
|
||||||
|
#define CAPI_DISCONNECT_B3_RESP_LEN (CAPI_MSG_BASELEN+4)
|
||||||
|
|
||||||
/*----- CAPI commands -----*/
|
/*----- CAPI commands -----*/
|
||||||
#define CAPI_ALERT 0x01
|
#define CAPI_ALERT 0x01
|
||||||
|
|||||||
@@ -11,4 +11,9 @@ struct xt_nfacct_match_info {
|
|||||||
struct nf_acct *nfacct;
|
struct nf_acct *nfacct;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct xt_nfacct_match_info_v1 {
|
||||||
|
char name[NFACCT_NAME_MAX];
|
||||||
|
struct nf_acct *nfacct __attribute__((aligned(8)));
|
||||||
|
};
|
||||||
|
|
||||||
#endif /* _XT_NFACCT_MATCH_H */
|
#endif /* _XT_NFACCT_MATCH_H */
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ static void resend_irqs(unsigned long arg)
|
|||||||
irq = find_first_bit(irqs_resend, nr_irqs);
|
irq = find_first_bit(irqs_resend, nr_irqs);
|
||||||
clear_bit(irq, irqs_resend);
|
clear_bit(irq, irqs_resend);
|
||||||
desc = irq_to_desc(irq);
|
desc = irq_to_desc(irq);
|
||||||
|
if (!desc)
|
||||||
|
continue;
|
||||||
local_irq_disable();
|
local_irq_disable();
|
||||||
desc->handle_irq(desc);
|
desc->handle_irq(desc);
|
||||||
local_irq_enable();
|
local_irq_enable();
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user