Merge remote-tracking branch 'torvalds/master' into perf/core
To get in sync with upstream to help people developing in this branch. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
commit
5e9cfa71af
@ -228,6 +228,23 @@ before posting to the mailing list. The patchwork build bot instance
|
||||
gets overloaded very easily and netdev@vger really doesn't need more
|
||||
traffic if we can help it.
|
||||
|
||||
netdevsim is great, can I extend it for my out-of-tree tests?
|
||||
-------------------------------------------------------------
|
||||
|
||||
No, `netdevsim` is a test vehicle solely for upstream tests.
|
||||
(Please add your tests under tools/testing/selftests/.)
|
||||
|
||||
We also give no guarantees that `netdevsim` won't change in the future
|
||||
in a way which would break what would normally be considered uAPI.
|
||||
|
||||
Is netdevsim considered a "user" of an API?
|
||||
-------------------------------------------
|
||||
|
||||
Linux kernel has a long standing rule that no API should be added unless
|
||||
it has a real, in-tree user. Mock-ups and tests based on `netdevsim` are
|
||||
strongly encouraged when adding new APIs, but `netdevsim` in itself
|
||||
is **not** considered a use case/user.
|
||||
|
||||
Any other tips to help ensure my net/net-next patch gets OK'd?
|
||||
--------------------------------------------------------------
|
||||
Attention to detail. Re-read your own work as if you were the
|
||||
|
@ -73,7 +73,9 @@ IF_OPER_LOWERLAYERDOWN (3):
|
||||
state (f.e. VLAN).
|
||||
|
||||
IF_OPER_TESTING (4):
|
||||
Unused in current kernel.
|
||||
Interface is in testing mode, for example executing driver self-tests
|
||||
or media (cable) test. It can't be used for normal traffic until tests
|
||||
complete.
|
||||
|
||||
IF_OPER_DORMANT (5):
|
||||
Interface is L1 up, but waiting for an external event, f.e. for a
|
||||
@ -111,7 +113,7 @@ it as lower layer.
|
||||
|
||||
Note that for certain kind of soft-devices, which are not managing any
|
||||
real hardware, it is possible to set this bit from userspace. One
|
||||
should use TVL IFLA_CARRIER to do so.
|
||||
should use TLV IFLA_CARRIER to do so.
|
||||
|
||||
netif_carrier_ok() can be used to query that bit.
|
||||
|
||||
|
@ -17815,7 +17815,7 @@ F: include/linux/sync_file.h
|
||||
F: include/uapi/linux/sync_file.h
|
||||
|
||||
SYNOPSYS ARC ARCHITECTURE
|
||||
M: Vineet Gupta <vgupta@synopsys.com>
|
||||
M: Vineet Gupta <vgupta@kernel.org>
|
||||
L: linux-snps-arc@lists.infradead.org
|
||||
S: Supported
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc.git
|
||||
|
13
Makefile
13
Makefile
@ -2,7 +2,7 @@
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 14
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc4
|
||||
EXTRAVERSION = -rc5
|
||||
NAME = Opossums on Parade
|
||||
|
||||
# *DOCUMENTATION*
|
||||
@ -546,7 +546,6 @@ export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \
|
||||
PHONY += scripts_basic
|
||||
scripts_basic:
|
||||
$(Q)$(MAKE) $(build)=scripts/basic
|
||||
$(Q)rm -f .tmp_quiet_recordmcount
|
||||
|
||||
PHONY += outputmakefile
|
||||
ifdef building_out_of_srctree
|
||||
@ -1317,6 +1316,16 @@ PHONY += scripts_unifdef
|
||||
scripts_unifdef: scripts_basic
|
||||
$(Q)$(MAKE) $(build)=scripts scripts/unifdef
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Install
|
||||
|
||||
# Many distributions have the custom install script, /sbin/installkernel.
|
||||
# If DKMS is installed, 'make install' will eventually recuses back
|
||||
# to the this Makefile to build and install external modules.
|
||||
# Cancel sub_make_done so that options such as M=, V=, etc. are parsed.
|
||||
|
||||
install: sub_make_done :=
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Tools
|
||||
|
||||
|
@ -409,7 +409,7 @@ choice
|
||||
help
|
||||
Depending on the configuration, CPU can contain DSP registers
|
||||
(ACC0_GLO, ACC0_GHI, DSP_BFLY0, DSP_CTRL, DSP_FFT_CTRL).
|
||||
Bellow is options describing how to handle these registers in
|
||||
Below are options describing how to handle these registers in
|
||||
interrupt entry / exit and in context switch.
|
||||
|
||||
config ARC_DSP_NONE
|
||||
|
@ -24,7 +24,7 @@
|
||||
*/
|
||||
static inline __sum16 csum_fold(__wsum s)
|
||||
{
|
||||
unsigned r = s << 16 | s >> 16; /* ror */
|
||||
unsigned int r = s << 16 | s >> 16; /* ror */
|
||||
s = ~s;
|
||||
s -= r;
|
||||
return s >> 16;
|
||||
|
@ -123,7 +123,7 @@ static const char * const arc_pmu_ev_hw_map[] = {
|
||||
#define C(_x) PERF_COUNT_HW_CACHE_##_x
|
||||
#define CACHE_OP_UNSUPPORTED 0xffff
|
||||
|
||||
static const unsigned arc_pmu_cache_map[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = {
|
||||
static const unsigned int arc_pmu_cache_map[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = {
|
||||
[C(L1D)] = {
|
||||
[C(OP_READ)] = {
|
||||
[C(RESULT_ACCESS)] = PERF_COUNT_ARC_LDC,
|
||||
|
@ -57,23 +57,26 @@ void fpu_save_restore(struct task_struct *prev, struct task_struct *next)
|
||||
|
||||
void fpu_init_task(struct pt_regs *regs)
|
||||
{
|
||||
const unsigned int fwe = 0x80000000;
|
||||
|
||||
/* default rounding mode */
|
||||
write_aux_reg(ARC_REG_FPU_CTRL, 0x100);
|
||||
|
||||
/* set "Write enable" to allow explicit write to exception flags */
|
||||
write_aux_reg(ARC_REG_FPU_STATUS, 0x80000000);
|
||||
/* Initialize to zero: setting requires FWE be set */
|
||||
write_aux_reg(ARC_REG_FPU_STATUS, fwe);
|
||||
}
|
||||
|
||||
void fpu_save_restore(struct task_struct *prev, struct task_struct *next)
|
||||
{
|
||||
struct arc_fpu *save = &prev->thread.fpu;
|
||||
struct arc_fpu *restore = &next->thread.fpu;
|
||||
const unsigned int fwe = 0x80000000;
|
||||
|
||||
save->ctrl = read_aux_reg(ARC_REG_FPU_CTRL);
|
||||
save->status = read_aux_reg(ARC_REG_FPU_STATUS);
|
||||
|
||||
write_aux_reg(ARC_REG_FPU_CTRL, restore->ctrl);
|
||||
write_aux_reg(ARC_REG_FPU_STATUS, restore->status);
|
||||
write_aux_reg(ARC_REG_FPU_STATUS, (fwe | restore->status));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -260,7 +260,7 @@ static void init_unwind_hdr(struct unwind_table *table,
|
||||
{
|
||||
const u8 *ptr;
|
||||
unsigned long tableSize = table->size, hdrSize;
|
||||
unsigned n;
|
||||
unsigned int n;
|
||||
const u32 *fde;
|
||||
struct {
|
||||
u8 version;
|
||||
@ -462,7 +462,7 @@ static uleb128_t get_uleb128(const u8 **pcur, const u8 *end)
|
||||
{
|
||||
const u8 *cur = *pcur;
|
||||
uleb128_t value;
|
||||
unsigned shift;
|
||||
unsigned int shift;
|
||||
|
||||
for (shift = 0, value = 0; cur < end; shift += 7) {
|
||||
if (shift + 7 > 8 * sizeof(value)
|
||||
@ -483,7 +483,7 @@ static sleb128_t get_sleb128(const u8 **pcur, const u8 *end)
|
||||
{
|
||||
const u8 *cur = *pcur;
|
||||
sleb128_t value;
|
||||
unsigned shift;
|
||||
unsigned int shift;
|
||||
|
||||
for (shift = 0, value = 0; cur < end; shift += 7) {
|
||||
if (shift + 7 > 8 * sizeof(value)
|
||||
@ -609,7 +609,7 @@ static unsigned long read_pointer(const u8 **pLoc, const void *end,
|
||||
static signed fde_pointer_type(const u32 *cie)
|
||||
{
|
||||
const u8 *ptr = (const u8 *)(cie + 2);
|
||||
unsigned version = *ptr;
|
||||
unsigned int version = *ptr;
|
||||
|
||||
if (*++ptr) {
|
||||
const char *aug;
|
||||
@ -904,7 +904,7 @@ int arc_unwind(struct unwind_frame_info *frame)
|
||||
const u8 *ptr = NULL, *end = NULL;
|
||||
unsigned long pc = UNW_PC(frame) - frame->call_frame;
|
||||
unsigned long startLoc = 0, endLoc = 0, cfa;
|
||||
unsigned i;
|
||||
unsigned int i;
|
||||
signed ptrType = -1;
|
||||
uleb128_t retAddrReg = 0;
|
||||
const struct unwind_table *table;
|
||||
|
@ -88,6 +88,8 @@ SECTIONS
|
||||
CPUIDLE_TEXT
|
||||
LOCK_TEXT
|
||||
KPROBES_TEXT
|
||||
IRQENTRY_TEXT
|
||||
SOFTIRQENTRY_TEXT
|
||||
*(.fixup)
|
||||
*(.gnu.warning)
|
||||
}
|
||||
|
@ -1595,7 +1595,7 @@
|
||||
compatible = "ti,am4372-d_can", "ti,am3352-d_can";
|
||||
reg = <0x0 0x2000>;
|
||||
clocks = <&dcan1_fck>;
|
||||
clock-name = "fck";
|
||||
clock-names = "fck";
|
||||
syscon-raminit = <&scm_conf 0x644 1>;
|
||||
interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
|
||||
status = "disabled";
|
||||
|
@ -582,7 +582,7 @@
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c0_pins>;
|
||||
clock-frequency = <400000>;
|
||||
clock-frequency = <100000>;
|
||||
|
||||
tps65218: tps65218@24 {
|
||||
reg = <0x24>;
|
||||
|
@ -388,13 +388,13 @@
|
||||
|
||||
pinctrl_power_button: powerbutgrp {
|
||||
fsl,pins = <
|
||||
MX53_PAD_SD2_DATA2__GPIO1_13 0x1e4
|
||||
MX53_PAD_SD2_DATA0__GPIO1_15 0x1e4
|
||||
>;
|
||||
};
|
||||
|
||||
pinctrl_power_out: poweroutgrp {
|
||||
fsl,pins = <
|
||||
MX53_PAD_SD2_DATA0__GPIO1_15 0x1e4
|
||||
MX53_PAD_SD2_DATA2__GPIO1_13 0x1e4
|
||||
>;
|
||||
};
|
||||
|
||||
|
@ -54,7 +54,13 @@
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_microsom_enet_ar8035>;
|
||||
phy-mode = "rgmii-id";
|
||||
phy-reset-duration = <2>;
|
||||
|
||||
/*
|
||||
* The PHY seems to require a long-enough reset duration to avoid
|
||||
* some rare issues where the PHY gets stuck in an inconsistent and
|
||||
* non-functional state at boot-up. 10ms proved to be fine .
|
||||
*/
|
||||
phy-reset-duration = <10>;
|
||||
phy-reset-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;
|
||||
status = "okay";
|
||||
|
||||
|
@ -43,6 +43,7 @@
|
||||
assigned-clock-rates = <0>, <198000000>;
|
||||
cap-power-off-card;
|
||||
keep-power-in-suspend;
|
||||
max-frequency = <25000000>;
|
||||
mmc-pwrseq = <&wifi_pwrseq>;
|
||||
no-1-8-v;
|
||||
non-removable;
|
||||
|
@ -30,14 +30,6 @@
|
||||
regulator-max-microvolt = <5000000>;
|
||||
};
|
||||
|
||||
vdds_1v8_main: fixedregulator-vdds_1v8_main {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vdds_1v8_main";
|
||||
vin-supply = <&smps7_reg>;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
};
|
||||
|
||||
vmmcsd_fixed: fixedregulator-mmcsd {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vmmcsd_fixed";
|
||||
@ -487,6 +479,7 @@
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
vdds_1v8_main:
|
||||
smps7_reg: smps7 {
|
||||
/* VDDS_1v8_OMAP over VDDS_1v8_MAIN */
|
||||
regulator-name = "smps7";
|
||||
|
@ -755,14 +755,14 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
vica: intc@10140000 {
|
||||
vica: interrupt-controller@10140000 {
|
||||
compatible = "arm,versatile-vic";
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <1>;
|
||||
reg = <0x10140000 0x20>;
|
||||
};
|
||||
|
||||
vicb: intc@10140020 {
|
||||
vicb: interrupt-controller@10140020 {
|
||||
compatible = "arm,versatile-vic";
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <1>;
|
||||
|
@ -37,7 +37,7 @@
|
||||
poll-interval = <20>;
|
||||
|
||||
/*
|
||||
* The EXTi IRQ line 3 is shared with touchscreen and ethernet,
|
||||
* The EXTi IRQ line 3 is shared with ethernet,
|
||||
* so mark this as polled GPIO key.
|
||||
*/
|
||||
button-0 {
|
||||
@ -46,6 +46,16 @@
|
||||
gpios = <&gpiof 3 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
/*
|
||||
* The EXTi IRQ line 6 is shared with touchscreen,
|
||||
* so mark this as polled GPIO key.
|
||||
*/
|
||||
button-1 {
|
||||
label = "TA2-GPIO-B";
|
||||
linux,code = <KEY_B>;
|
||||
gpios = <&gpiod 6 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
/*
|
||||
* The EXTi IRQ line 0 is shared with PMIC,
|
||||
* so mark this as polled GPIO key.
|
||||
@ -60,13 +70,6 @@
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
button-1 {
|
||||
label = "TA2-GPIO-B";
|
||||
linux,code = <KEY_B>;
|
||||
gpios = <&gpiod 6 GPIO_ACTIVE_LOW>;
|
||||
wakeup-source;
|
||||
};
|
||||
|
||||
button-3 {
|
||||
label = "TA4-GPIO-D";
|
||||
linux,code = <KEY_D>;
|
||||
@ -82,6 +85,7 @@
|
||||
label = "green:led5";
|
||||
gpios = <&gpioc 6 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "off";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
led-1 {
|
||||
@ -185,8 +189,8 @@
|
||||
touchscreen@38 {
|
||||
compatible = "edt,edt-ft5406";
|
||||
reg = <0x38>;
|
||||
interrupt-parent = <&gpiog>;
|
||||
interrupts = <2 IRQ_TYPE_EDGE_FALLING>; /* GPIO E */
|
||||
interrupt-parent = <&gpioc>;
|
||||
interrupts = <6 IRQ_TYPE_EDGE_FALLING>; /* GPIO E */
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -12,6 +12,8 @@
|
||||
aliases {
|
||||
ethernet0 = ðernet0;
|
||||
ethernet1 = &ksz8851;
|
||||
rtc0 = &hwrtc;
|
||||
rtc1 = &rtc;
|
||||
};
|
||||
|
||||
memory@c0000000 {
|
||||
@ -138,6 +140,7 @@
|
||||
reset-gpios = <&gpioh 3 GPIO_ACTIVE_LOW>;
|
||||
reset-assert-us = <500>;
|
||||
reset-deassert-us = <500>;
|
||||
smsc,disable-energy-detect;
|
||||
interrupt-parent = <&gpioi>;
|
||||
interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
|
||||
};
|
||||
@ -248,7 +251,7 @@
|
||||
/delete-property/dmas;
|
||||
/delete-property/dma-names;
|
||||
|
||||
rtc@32 {
|
||||
hwrtc: rtc@32 {
|
||||
compatible = "microcrystal,rv8803";
|
||||
reg = <0x32>;
|
||||
};
|
||||
|
@ -68,7 +68,6 @@ void imx_set_cpu_arg(int cpu, u32 arg);
|
||||
void v7_secondary_startup(void);
|
||||
void imx_scu_map_io(void);
|
||||
void imx_smp_prepare(void);
|
||||
void imx_gpcv2_set_core1_pdn_pup_by_software(bool pdn);
|
||||
#else
|
||||
static inline void imx_scu_map_io(void) {}
|
||||
static inline void imx_smp_prepare(void) {}
|
||||
@ -81,6 +80,7 @@ void imx_gpc_mask_all(void);
|
||||
void imx_gpc_restore_all(void);
|
||||
void imx_gpc_hwirq_mask(unsigned int hwirq);
|
||||
void imx_gpc_hwirq_unmask(unsigned int hwirq);
|
||||
void imx_gpcv2_set_core1_pdn_pup_by_software(bool pdn);
|
||||
void imx_anatop_init(void);
|
||||
void imx_anatop_pre_suspend(void);
|
||||
void imx_anatop_post_resume(void);
|
||||
|
@ -103,6 +103,7 @@ struct mmdc_pmu {
|
||||
struct perf_event *mmdc_events[MMDC_NUM_COUNTERS];
|
||||
struct hlist_node node;
|
||||
struct fsl_mmdc_devtype_data *devtype_data;
|
||||
struct clk *mmdc_ipg_clk;
|
||||
};
|
||||
|
||||
/*
|
||||
@ -462,11 +463,14 @@ static int imx_mmdc_remove(struct platform_device *pdev)
|
||||
|
||||
cpuhp_state_remove_instance_nocalls(cpuhp_mmdc_state, &pmu_mmdc->node);
|
||||
perf_pmu_unregister(&pmu_mmdc->pmu);
|
||||
iounmap(pmu_mmdc->mmdc_base);
|
||||
clk_disable_unprepare(pmu_mmdc->mmdc_ipg_clk);
|
||||
kfree(pmu_mmdc);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int imx_mmdc_perf_init(struct platform_device *pdev, void __iomem *mmdc_base)
|
||||
static int imx_mmdc_perf_init(struct platform_device *pdev, void __iomem *mmdc_base,
|
||||
struct clk *mmdc_ipg_clk)
|
||||
{
|
||||
struct mmdc_pmu *pmu_mmdc;
|
||||
char *name;
|
||||
@ -494,6 +498,7 @@ static int imx_mmdc_perf_init(struct platform_device *pdev, void __iomem *mmdc_b
|
||||
}
|
||||
|
||||
mmdc_num = mmdc_pmu_init(pmu_mmdc, mmdc_base, &pdev->dev);
|
||||
pmu_mmdc->mmdc_ipg_clk = mmdc_ipg_clk;
|
||||
if (mmdc_num == 0)
|
||||
name = "mmdc";
|
||||
else
|
||||
@ -529,7 +534,7 @@ pmu_free:
|
||||
|
||||
#else
|
||||
#define imx_mmdc_remove NULL
|
||||
#define imx_mmdc_perf_init(pdev, mmdc_base) 0
|
||||
#define imx_mmdc_perf_init(pdev, mmdc_base, mmdc_ipg_clk) 0
|
||||
#endif
|
||||
|
||||
static int imx_mmdc_probe(struct platform_device *pdev)
|
||||
@ -567,7 +572,13 @@ static int imx_mmdc_probe(struct platform_device *pdev)
|
||||
val &= ~(1 << BP_MMDC_MAPSR_PSD);
|
||||
writel_relaxed(val, reg);
|
||||
|
||||
return imx_mmdc_perf_init(pdev, mmdc_base);
|
||||
err = imx_mmdc_perf_init(pdev, mmdc_base, mmdc_ipg_clk);
|
||||
if (err) {
|
||||
iounmap(mmdc_base);
|
||||
clk_disable_unprepare(mmdc_ipg_clk);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
int imx_mmdc_get_ddr_type(void)
|
||||
|
@ -91,6 +91,7 @@ config MACH_IXDP465
|
||||
|
||||
config MACH_GORAMO_MLR
|
||||
bool "GORAMO Multi Link Router"
|
||||
depends on IXP4XX_PCI_LEGACY
|
||||
help
|
||||
Say 'Y' here if you want your kernel to support GORAMO
|
||||
MultiLink router.
|
||||
|
@ -3776,6 +3776,7 @@ struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh)
|
||||
struct omap_hwmod_ocp_if *oi;
|
||||
struct clockdomain *clkdm;
|
||||
struct clk_hw_omap *clk;
|
||||
struct clk_hw *hw;
|
||||
|
||||
if (!oh)
|
||||
return NULL;
|
||||
@ -3792,7 +3793,14 @@ struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh)
|
||||
c = oi->_clk;
|
||||
}
|
||||
|
||||
clk = to_clk_hw_omap(__clk_get_hw(c));
|
||||
hw = __clk_get_hw(c);
|
||||
if (!hw)
|
||||
return NULL;
|
||||
|
||||
clk = to_clk_hw_omap(hw);
|
||||
if (!clk)
|
||||
return NULL;
|
||||
|
||||
clkdm = clk->clkdm;
|
||||
if (!clkdm)
|
||||
return NULL;
|
||||
|
@ -1800,11 +1800,11 @@ config RANDOMIZE_BASE
|
||||
If unsure, say N.
|
||||
|
||||
config RANDOMIZE_MODULE_REGION_FULL
|
||||
bool "Randomize the module region over a 4 GB range"
|
||||
bool "Randomize the module region over a 2 GB range"
|
||||
depends on RANDOMIZE_BASE
|
||||
default y
|
||||
help
|
||||
Randomizes the location of the module region inside a 4 GB window
|
||||
Randomizes the location of the module region inside a 2 GB window
|
||||
covering the core kernel. This way, it is less likely for modules
|
||||
to leak information about the location of core kernel data structures
|
||||
but it does imply that function calls between modules and the core
|
||||
@ -1812,7 +1812,10 @@ config RANDOMIZE_MODULE_REGION_FULL
|
||||
|
||||
When this option is not set, the module region will be randomized over
|
||||
a limited range that contains the [_stext, _etext] interval of the
|
||||
core kernel, so branch relocations are always in range.
|
||||
core kernel, so branch relocations are almost always in range unless
|
||||
ARM64_MODULE_PLTS is enabled and the region is exhausted. In this
|
||||
particular case of region exhaustion, modules might be able to fall
|
||||
back to a larger 2GB area.
|
||||
|
||||
config CC_HAVE_STACKPROTECTOR_SYSREG
|
||||
def_bool $(cc-option,-mstack-protector-guard=sysreg -mstack-protector-guard-reg=sp_el0 -mstack-protector-guard-offset=0)
|
||||
|
@ -21,19 +21,11 @@ LDFLAGS_vmlinux += -shared -Bsymbolic -z notext \
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARM64_ERRATUM_843419),y)
|
||||
ifneq ($(CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419),y)
|
||||
$(warning ld does not support --fix-cortex-a53-843419; kernel may be susceptible to erratum)
|
||||
else
|
||||
ifeq ($(CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419),y)
|
||||
LDFLAGS_vmlinux += --fix-cortex-a53-843419
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARM64_USE_LSE_ATOMICS), y)
|
||||
ifneq ($(CONFIG_ARM64_LSE_ATOMICS), y)
|
||||
$(warning LSE atomics not supported by binutils)
|
||||
endif
|
||||
endif
|
||||
|
||||
cc_has_k_constraint := $(call try-run,echo \
|
||||
'int main(void) { \
|
||||
asm volatile("and w0, w0, %w0" :: "K" (4294967295)); \
|
||||
@ -176,6 +168,17 @@ vdso_install:
|
||||
|
||||
archprepare:
|
||||
$(Q)$(MAKE) $(build)=arch/arm64/tools kapi
|
||||
ifeq ($(CONFIG_ARM64_ERRATUM_843419),y)
|
||||
ifneq ($(CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419),y)
|
||||
@echo "warning: ld does not support --fix-cortex-a53-843419; kernel may be susceptible to erratum" >&2
|
||||
endif
|
||||
endif
|
||||
ifeq ($(CONFIG_ARM64_USE_LSE_ATOMICS),y)
|
||||
ifneq ($(CONFIG_ARM64_LSE_ATOMICS),y)
|
||||
@echo "warning: LSE atomics not supported by binutils" >&2
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
# We use MRPROPER_FILES and CLEAN_FILES now
|
||||
archclean:
|
||||
|
@ -54,6 +54,7 @@
|
||||
|
||||
&mscc_felix_port0 {
|
||||
label = "swp0";
|
||||
managed = "in-band-status";
|
||||
phy-handle = <&phy0>;
|
||||
phy-mode = "sgmii";
|
||||
status = "okay";
|
||||
@ -61,6 +62,7 @@
|
||||
|
||||
&mscc_felix_port1 {
|
||||
label = "swp1";
|
||||
managed = "in-band-status";
|
||||
phy-handle = <&phy1>;
|
||||
phy-mode = "sgmii";
|
||||
status = "okay";
|
||||
|
@ -66,7 +66,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
sysclk: clock-sysclk {
|
||||
sysclk: sysclk {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <100000000>;
|
||||
|
@ -19,6 +19,8 @@
|
||||
aliases {
|
||||
spi0 = &spi0;
|
||||
ethernet1 = ð1;
|
||||
mmc0 = &sdhci0;
|
||||
mmc1 = &sdhci1;
|
||||
};
|
||||
|
||||
chosen {
|
||||
@ -119,6 +121,7 @@
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c1_pins>;
|
||||
clock-frequency = <100000>;
|
||||
/delete-property/ mrvl,i2c-fast-mode;
|
||||
status = "okay";
|
||||
|
||||
rtc@6f {
|
||||
|
@ -1840,7 +1840,11 @@
|
||||
|
||||
interconnects = <&mc TEGRA194_MEMORY_CLIENT_PCIE1R &emc>,
|
||||
<&mc TEGRA194_MEMORY_CLIENT_PCIE1W &emc>;
|
||||
interconnect-names = "read", "write";
|
||||
interconnect-names = "dma-mem", "write";
|
||||
iommus = <&smmu TEGRA194_SID_PCIE1>;
|
||||
iommu-map = <0x0 &smmu TEGRA194_SID_PCIE1 0x1000>;
|
||||
iommu-map-mask = <0x0>;
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
pcie@14120000 {
|
||||
@ -1890,7 +1894,11 @@
|
||||
|
||||
interconnects = <&mc TEGRA194_MEMORY_CLIENT_PCIE2AR &emc>,
|
||||
<&mc TEGRA194_MEMORY_CLIENT_PCIE2AW &emc>;
|
||||
interconnect-names = "read", "write";
|
||||
interconnect-names = "dma-mem", "write";
|
||||
iommus = <&smmu TEGRA194_SID_PCIE2>;
|
||||
iommu-map = <0x0 &smmu TEGRA194_SID_PCIE2 0x1000>;
|
||||
iommu-map-mask = <0x0>;
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
pcie@14140000 {
|
||||
@ -1940,7 +1948,11 @@
|
||||
|
||||
interconnects = <&mc TEGRA194_MEMORY_CLIENT_PCIE3R &emc>,
|
||||
<&mc TEGRA194_MEMORY_CLIENT_PCIE3W &emc>;
|
||||
interconnect-names = "read", "write";
|
||||
interconnect-names = "dma-mem", "write";
|
||||
iommus = <&smmu TEGRA194_SID_PCIE3>;
|
||||
iommu-map = <0x0 &smmu TEGRA194_SID_PCIE3 0x1000>;
|
||||
iommu-map-mask = <0x0>;
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
pcie@14160000 {
|
||||
@ -1990,7 +2002,11 @@
|
||||
|
||||
interconnects = <&mc TEGRA194_MEMORY_CLIENT_PCIE4R &emc>,
|
||||
<&mc TEGRA194_MEMORY_CLIENT_PCIE4W &emc>;
|
||||
interconnect-names = "read", "write";
|
||||
interconnect-names = "dma-mem", "write";
|
||||
iommus = <&smmu TEGRA194_SID_PCIE4>;
|
||||
iommu-map = <0x0 &smmu TEGRA194_SID_PCIE4 0x1000>;
|
||||
iommu-map-mask = <0x0>;
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
pcie@14180000 {
|
||||
@ -2040,7 +2056,11 @@
|
||||
|
||||
interconnects = <&mc TEGRA194_MEMORY_CLIENT_PCIE0R &emc>,
|
||||
<&mc TEGRA194_MEMORY_CLIENT_PCIE0W &emc>;
|
||||
interconnect-names = "read", "write";
|
||||
interconnect-names = "dma-mem", "write";
|
||||
iommus = <&smmu TEGRA194_SID_PCIE0>;
|
||||
iommu-map = <0x0 &smmu TEGRA194_SID_PCIE0 0x1000>;
|
||||
iommu-map-mask = <0x0>;
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
pcie@141a0000 {
|
||||
@ -2094,7 +2114,11 @@
|
||||
|
||||
interconnects = <&mc TEGRA194_MEMORY_CLIENT_PCIE5R &emc>,
|
||||
<&mc TEGRA194_MEMORY_CLIENT_PCIE5W &emc>;
|
||||
interconnect-names = "read", "write";
|
||||
interconnect-names = "dma-mem", "write";
|
||||
iommus = <&smmu TEGRA194_SID_PCIE5>;
|
||||
iommu-map = <0x0 &smmu TEGRA194_SID_PCIE5 0x1000>;
|
||||
iommu-map-mask = <0x0>;
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
pcie_ep@14160000 {
|
||||
@ -2127,6 +2151,14 @@
|
||||
nvidia,aspm-cmrt-us = <60>;
|
||||
nvidia,aspm-pwr-on-t-us = <20>;
|
||||
nvidia,aspm-l0s-entrance-latency-us = <3>;
|
||||
|
||||
interconnects = <&mc TEGRA194_MEMORY_CLIENT_PCIE4R &emc>,
|
||||
<&mc TEGRA194_MEMORY_CLIENT_PCIE4W &emc>;
|
||||
interconnect-names = "dma-mem", "write";
|
||||
iommus = <&smmu TEGRA194_SID_PCIE4>;
|
||||
iommu-map = <0x0 &smmu TEGRA194_SID_PCIE4 0x1000>;
|
||||
iommu-map-mask = <0x0>;
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
pcie_ep@14180000 {
|
||||
@ -2159,6 +2191,14 @@
|
||||
nvidia,aspm-cmrt-us = <60>;
|
||||
nvidia,aspm-pwr-on-t-us = <20>;
|
||||
nvidia,aspm-l0s-entrance-latency-us = <3>;
|
||||
|
||||
interconnects = <&mc TEGRA194_MEMORY_CLIENT_PCIE0R &emc>,
|
||||
<&mc TEGRA194_MEMORY_CLIENT_PCIE0W &emc>;
|
||||
interconnect-names = "dma-mem", "write";
|
||||
iommus = <&smmu TEGRA194_SID_PCIE0>;
|
||||
iommu-map = <0x0 &smmu TEGRA194_SID_PCIE0 0x1000>;
|
||||
iommu-map-mask = <0x0>;
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
pcie_ep@141a0000 {
|
||||
@ -2194,6 +2234,14 @@
|
||||
nvidia,aspm-cmrt-us = <60>;
|
||||
nvidia,aspm-pwr-on-t-us = <20>;
|
||||
nvidia,aspm-l0s-entrance-latency-us = <3>;
|
||||
|
||||
interconnects = <&mc TEGRA194_MEMORY_CLIENT_PCIE5R &emc>,
|
||||
<&mc TEGRA194_MEMORY_CLIENT_PCIE5W &emc>;
|
||||
interconnect-names = "dma-mem", "write";
|
||||
iommus = <&smmu TEGRA194_SID_PCIE5>;
|
||||
iommu-map = <0x0 &smmu TEGRA194_SID_PCIE5 0x1000>;
|
||||
iommu-map-mask = <0x0>;
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
sram@40000000 {
|
||||
|
@ -320,7 +320,17 @@ static inline unsigned long kernel_stack_pointer(struct pt_regs *regs)
|
||||
|
||||
static inline unsigned long regs_return_value(struct pt_regs *regs)
|
||||
{
|
||||
return regs->regs[0];
|
||||
unsigned long val = regs->regs[0];
|
||||
|
||||
/*
|
||||
* Audit currently uses regs_return_value() instead of
|
||||
* syscall_get_return_value(). Apply the same sign-extension here until
|
||||
* audit is updated to use syscall_get_return_value().
|
||||
*/
|
||||
if (compat_user_mode(regs))
|
||||
val = sign_extend64(val, 31);
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
static inline void regs_set_return_value(struct pt_regs *regs, unsigned long rc)
|
||||
|
@ -35,7 +35,7 @@ struct stack_info {
|
||||
* accounting information necessary for robust unwinding.
|
||||
*
|
||||
* @fp: The fp value in the frame record (or the real fp)
|
||||
* @pc: The fp value in the frame record (or the real lr)
|
||||
* @pc: The lr value in the frame record (or the real lr)
|
||||
*
|
||||
* @stacks_done: Stacks which have been entirely unwound, for which it is no
|
||||
* longer valid to unwind to.
|
||||
|
@ -29,24 +29,25 @@ static inline void syscall_rollback(struct task_struct *task,
|
||||
regs->regs[0] = regs->orig_x0;
|
||||
}
|
||||
|
||||
static inline long syscall_get_return_value(struct task_struct *task,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
unsigned long val = regs->regs[0];
|
||||
|
||||
if (is_compat_thread(task_thread_info(task)))
|
||||
val = sign_extend64(val, 31);
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
static inline long syscall_get_error(struct task_struct *task,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
unsigned long error = regs->regs[0];
|
||||
|
||||
if (is_compat_thread(task_thread_info(task)))
|
||||
error = sign_extend64(error, 31);
|
||||
unsigned long error = syscall_get_return_value(task, regs);
|
||||
|
||||
return IS_ERR_VALUE(error) ? error : 0;
|
||||
}
|
||||
|
||||
static inline long syscall_get_return_value(struct task_struct *task,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
return regs->regs[0];
|
||||
}
|
||||
|
||||
static inline void syscall_set_return_value(struct task_struct *task,
|
||||
struct pt_regs *regs,
|
||||
int error, long val)
|
||||
|
@ -162,7 +162,9 @@ u64 __init kaslr_early_init(void)
|
||||
* a PAGE_SIZE multiple in the range [_etext - MODULES_VSIZE,
|
||||
* _stext) . This guarantees that the resulting region still
|
||||
* covers [_stext, _etext], and that all relative branches can
|
||||
* be resolved without veneers.
|
||||
* be resolved without veneers unless this region is exhausted
|
||||
* and we fall back to a larger 2GB window in module_alloc()
|
||||
* when ARM64_MODULE_PLTS is enabled.
|
||||
*/
|
||||
module_range = MODULES_VSIZE - (u64)(_etext - _stext);
|
||||
module_alloc_base = (u64)_etext + offset - MODULES_VSIZE;
|
||||
|
@ -1862,7 +1862,7 @@ void syscall_trace_exit(struct pt_regs *regs)
|
||||
audit_syscall_exit(regs);
|
||||
|
||||
if (flags & _TIF_SYSCALL_TRACEPOINT)
|
||||
trace_sys_exit(regs, regs_return_value(regs));
|
||||
trace_sys_exit(regs, syscall_get_return_value(current, regs));
|
||||
|
||||
if (flags & (_TIF_SYSCALL_TRACE | _TIF_SINGLESTEP))
|
||||
tracehook_report_syscall(regs, PTRACE_SYSCALL_EXIT);
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include <asm/unistd.h>
|
||||
#include <asm/fpsimd.h>
|
||||
#include <asm/ptrace.h>
|
||||
#include <asm/syscall.h>
|
||||
#include <asm/signal32.h>
|
||||
#include <asm/traps.h>
|
||||
#include <asm/vdso.h>
|
||||
@ -890,7 +891,7 @@ static void do_signal(struct pt_regs *regs)
|
||||
retval == -ERESTART_RESTARTBLOCK ||
|
||||
(retval == -ERESTARTSYS &&
|
||||
!(ksig.ka.sa.sa_flags & SA_RESTART)))) {
|
||||
regs->regs[0] = -EINTR;
|
||||
syscall_set_return_value(current, regs, -EINTR, 0);
|
||||
regs->pc = continue_addr;
|
||||
}
|
||||
|
||||
|
@ -218,7 +218,7 @@ void show_stack(struct task_struct *tsk, unsigned long *sp, const char *loglvl)
|
||||
|
||||
#ifdef CONFIG_STACKTRACE
|
||||
|
||||
noinline void arch_stack_walk(stack_trace_consume_fn consume_entry,
|
||||
noinline notrace void arch_stack_walk(stack_trace_consume_fn consume_entry,
|
||||
void *cookie, struct task_struct *task,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
|
@ -54,10 +54,7 @@ static void invoke_syscall(struct pt_regs *regs, unsigned int scno,
|
||||
ret = do_ni_syscall(regs, scno);
|
||||
}
|
||||
|
||||
if (is_compat_task())
|
||||
ret = lower_32_bits(ret);
|
||||
|
||||
regs->regs[0] = ret;
|
||||
syscall_set_return_value(current, regs, 0, ret);
|
||||
|
||||
/*
|
||||
* Ultimately, this value will get limited by KSTACK_OFFSET_MAX(),
|
||||
@ -115,7 +112,7 @@ static void el0_svc_common(struct pt_regs *regs, int scno, int sc_nr,
|
||||
* syscall. do_notify_resume() will send a signal to userspace
|
||||
* before the syscall is restarted.
|
||||
*/
|
||||
regs->regs[0] = -ERESTARTNOINTR;
|
||||
syscall_set_return_value(current, regs, -ERESTARTNOINTR, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -136,7 +133,7 @@ static void el0_svc_common(struct pt_regs *regs, int scno, int sc_nr,
|
||||
* anyway.
|
||||
*/
|
||||
if (scno == NO_SYSCALL)
|
||||
regs->regs[0] = -ENOSYS;
|
||||
syscall_set_return_value(current, regs, -ENOSYS, 0);
|
||||
scno = syscall_trace_enter(regs);
|
||||
if (scno == NO_SYSCALL)
|
||||
goto trace_exit;
|
||||
|
@ -321,7 +321,7 @@ KBUILD_LDFLAGS += -m $(ld-emul)
|
||||
|
||||
ifdef CONFIG_MIPS
|
||||
CHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -x c /dev/null | \
|
||||
egrep -vw '__GNUC_(|MINOR_|PATCHLEVEL_)_' | \
|
||||
egrep -vw '__GNUC_(MINOR_|PATCHLEVEL_)?_' | \
|
||||
sed -e "s/^\#define /-D'/" -e "s/ /'='/" -e "s/$$/'/" -e 's/\$$/&&/g')
|
||||
endif
|
||||
|
||||
|
@ -58,15 +58,20 @@ do { \
|
||||
|
||||
static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address)
|
||||
{
|
||||
pmd_t *pmd = NULL;
|
||||
pmd_t *pmd;
|
||||
struct page *pg;
|
||||
|
||||
pg = alloc_pages(GFP_KERNEL | __GFP_ACCOUNT, PMD_ORDER);
|
||||
if (pg) {
|
||||
pgtable_pmd_page_ctor(pg);
|
||||
pmd = (pmd_t *)page_address(pg);
|
||||
pmd_init((unsigned long)pmd, (unsigned long)invalid_pte_table);
|
||||
pg = alloc_pages(GFP_KERNEL_ACCOUNT, PMD_ORDER);
|
||||
if (!pg)
|
||||
return NULL;
|
||||
|
||||
if (!pgtable_pmd_page_ctor(pg)) {
|
||||
__free_pages(pg, PMD_ORDER);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pmd = (pmd_t *)page_address(pg);
|
||||
pmd_init((unsigned long)pmd, (unsigned long)invalid_pte_table);
|
||||
return pmd;
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,8 @@ static struct plat_serial8250_port uart8250_data[] = {
|
||||
.mapbase = 0x1f000900, /* The CBUS UART */
|
||||
.irq = MIPS_CPU_IRQ_BASE + MIPSCPU_INT_MB2,
|
||||
.uartclk = 3686400, /* Twice the usual clk! */
|
||||
.iotype = UPIO_MEM32,
|
||||
.iotype = IS_ENABLED(CONFIG_CPU_BIG_ENDIAN) ?
|
||||
UPIO_MEM32BE : UPIO_MEM32,
|
||||
.flags = CBUS_UART_FLAGS,
|
||||
.regshift = 3,
|
||||
},
|
||||
|
@ -492,10 +492,16 @@ config CC_HAVE_STACKPROTECTOR_TLS
|
||||
|
||||
config STACKPROTECTOR_PER_TASK
|
||||
def_bool y
|
||||
depends on !GCC_PLUGIN_RANDSTRUCT
|
||||
depends on STACKPROTECTOR && CC_HAVE_STACKPROTECTOR_TLS
|
||||
|
||||
config PHYS_RAM_BASE_FIXED
|
||||
bool "Explicitly specified physical RAM address"
|
||||
default n
|
||||
|
||||
config PHYS_RAM_BASE
|
||||
hex "Platform Physical RAM address"
|
||||
depends on PHYS_RAM_BASE_FIXED
|
||||
default "0x80000000"
|
||||
help
|
||||
This is the physical address of RAM in the system. It has to be
|
||||
@ -508,6 +514,7 @@ config XIP_KERNEL
|
||||
# This prevents XIP from being enabled by all{yes,mod}config, which
|
||||
# fail to build since XIP doesn't support large kernels.
|
||||
depends on !COMPILE_TEST
|
||||
select PHYS_RAM_BASE_FIXED
|
||||
help
|
||||
Execute-In-Place allows the kernel to run from non-volatile storage
|
||||
directly addressable by the CPU, such as NOR flash. This saves RAM
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
memory@80000000 {
|
||||
device_type = "memory";
|
||||
reg = <0x0 0x80000000 0x2 0x00000000>;
|
||||
reg = <0x0 0x80000000 0x4 0x00000000>;
|
||||
};
|
||||
|
||||
soc {
|
||||
|
@ -103,6 +103,7 @@ struct kernel_mapping {
|
||||
};
|
||||
|
||||
extern struct kernel_mapping kernel_map;
|
||||
extern phys_addr_t phys_ram_base;
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
#define is_kernel_mapping(x) \
|
||||
@ -113,9 +114,9 @@ extern struct kernel_mapping kernel_map;
|
||||
#define linear_mapping_pa_to_va(x) ((void *)((unsigned long)(x) + kernel_map.va_pa_offset))
|
||||
#define kernel_mapping_pa_to_va(y) ({ \
|
||||
unsigned long _y = y; \
|
||||
(_y >= CONFIG_PHYS_RAM_BASE) ? \
|
||||
(void *)((unsigned long)(_y) + kernel_map.va_kernel_pa_offset + XIP_OFFSET) : \
|
||||
(void *)((unsigned long)(_y) + kernel_map.va_kernel_xip_pa_offset); \
|
||||
(IS_ENABLED(CONFIG_XIP_KERNEL) && _y < phys_ram_base) ? \
|
||||
(void *)((unsigned long)(_y) + kernel_map.va_kernel_xip_pa_offset) : \
|
||||
(void *)((unsigned long)(_y) + kernel_map.va_kernel_pa_offset + XIP_OFFSET); \
|
||||
})
|
||||
#define __pa_to_va_nodebug(x) linear_mapping_pa_to_va(x)
|
||||
|
||||
|
@ -27,7 +27,7 @@ void notrace walk_stackframe(struct task_struct *task, struct pt_regs *regs,
|
||||
fp = frame_pointer(regs);
|
||||
sp = user_stack_pointer(regs);
|
||||
pc = instruction_pointer(regs);
|
||||
} else if (task == current) {
|
||||
} else if (task == NULL || task == current) {
|
||||
fp = (unsigned long)__builtin_frame_address(1);
|
||||
sp = (unsigned long)__builtin_frame_address(0);
|
||||
pc = (unsigned long)__builtin_return_address(0);
|
||||
|
@ -36,6 +36,9 @@ EXPORT_SYMBOL(kernel_map);
|
||||
#define kernel_map (*(struct kernel_mapping *)XIP_FIXUP(&kernel_map))
|
||||
#endif
|
||||
|
||||
phys_addr_t phys_ram_base __ro_after_init;
|
||||
EXPORT_SYMBOL(phys_ram_base);
|
||||
|
||||
#ifdef CONFIG_XIP_KERNEL
|
||||
extern char _xiprom[], _exiprom[];
|
||||
#endif
|
||||
@ -160,7 +163,7 @@ static void __init setup_bootmem(void)
|
||||
phys_addr_t vmlinux_end = __pa_symbol(&_end);
|
||||
phys_addr_t vmlinux_start = __pa_symbol(&_start);
|
||||
phys_addr_t __maybe_unused max_mapped_addr;
|
||||
phys_addr_t dram_end;
|
||||
phys_addr_t phys_ram_end;
|
||||
|
||||
#ifdef CONFIG_XIP_KERNEL
|
||||
vmlinux_start = __pa_symbol(&_sdata);
|
||||
@ -181,9 +184,12 @@ static void __init setup_bootmem(void)
|
||||
#endif
|
||||
memblock_reserve(vmlinux_start, vmlinux_end - vmlinux_start);
|
||||
|
||||
dram_end = memblock_end_of_DRAM();
|
||||
|
||||
phys_ram_end = memblock_end_of_DRAM();
|
||||
#ifndef CONFIG_64BIT
|
||||
#ifndef CONFIG_XIP_KERNEL
|
||||
phys_ram_base = memblock_start_of_DRAM();
|
||||
#endif
|
||||
/*
|
||||
* memblock allocator is not aware of the fact that last 4K bytes of
|
||||
* the addressable memory can not be mapped because of IS_ERR_VALUE
|
||||
@ -194,12 +200,12 @@ static void __init setup_bootmem(void)
|
||||
* be done in create_kernel_page_table.
|
||||
*/
|
||||
max_mapped_addr = __pa(~(ulong)0);
|
||||
if (max_mapped_addr == (dram_end - 1))
|
||||
if (max_mapped_addr == (phys_ram_end - 1))
|
||||
memblock_set_current_limit(max_mapped_addr - 4096);
|
||||
#endif
|
||||
|
||||
min_low_pfn = PFN_UP(memblock_start_of_DRAM());
|
||||
max_low_pfn = max_pfn = PFN_DOWN(dram_end);
|
||||
min_low_pfn = PFN_UP(phys_ram_base);
|
||||
max_low_pfn = max_pfn = PFN_DOWN(phys_ram_end);
|
||||
|
||||
dma32_phys_limit = min(4UL * SZ_1G, (unsigned long)PFN_PHYS(max_low_pfn));
|
||||
set_max_mapnr(max_low_pfn - ARCH_PFN_OFFSET);
|
||||
@ -558,6 +564,7 @@ asmlinkage void __init setup_vm(uintptr_t dtb_pa)
|
||||
kernel_map.xiprom = (uintptr_t)CONFIG_XIP_PHYS_ADDR;
|
||||
kernel_map.xiprom_sz = (uintptr_t)(&_exiprom) - (uintptr_t)(&_xiprom);
|
||||
|
||||
phys_ram_base = CONFIG_PHYS_RAM_BASE;
|
||||
kernel_map.phys_addr = (uintptr_t)CONFIG_PHYS_RAM_BASE;
|
||||
kernel_map.size = (uintptr_t)(&_end) - (uintptr_t)(&_sdata);
|
||||
|
||||
|
@ -11,6 +11,7 @@ UBSAN_SANITIZE := n
|
||||
KASAN_SANITIZE := n
|
||||
|
||||
obj-y := $(if $(CONFIG_KERNEL_UNCOMPRESSED),,decompressor.o) info.o
|
||||
obj-$(CONFIG_KERNEL_ZSTD) += clz_ctz.o
|
||||
obj-all := $(obj-y) piggy.o syms.o
|
||||
targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2
|
||||
targets += vmlinux.bin.xz vmlinux.bin.lzma vmlinux.bin.lzo vmlinux.bin.lz4
|
||||
|
2
arch/s390/boot/compressed/clz_ctz.c
Normal file
2
arch/s390/boot/compressed/clz_ctz.c
Normal file
@ -0,0 +1,2 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include "../../../../lib/clz_ctz.c"
|
@ -335,7 +335,7 @@ CONFIG_L2TP_DEBUGFS=m
|
||||
CONFIG_L2TP_V3=y
|
||||
CONFIG_L2TP_IP=m
|
||||
CONFIG_L2TP_ETH=m
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_BRIDGE=y
|
||||
CONFIG_BRIDGE_MRP=y
|
||||
CONFIG_VLAN_8021Q=m
|
||||
CONFIG_VLAN_8021Q_GVRP=y
|
||||
|
@ -325,7 +325,7 @@ CONFIG_L2TP_DEBUGFS=m
|
||||
CONFIG_L2TP_V3=y
|
||||
CONFIG_L2TP_IP=m
|
||||
CONFIG_L2TP_ETH=m
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_BRIDGE=y
|
||||
CONFIG_BRIDGE_MRP=y
|
||||
CONFIG_VLAN_8021Q=m
|
||||
CONFIG_VLAN_8021Q_GVRP=y
|
||||
|
@ -51,6 +51,7 @@ SECTIONS
|
||||
|
||||
.rela.dyn ALIGN(8) : { *(.rela.dyn) }
|
||||
.got ALIGN(8) : { *(.got .toc) }
|
||||
.got.plt ALIGN(8) : { *(.got.plt) }
|
||||
|
||||
_end = .;
|
||||
PROVIDE(end = .);
|
||||
|
@ -51,6 +51,7 @@ SECTIONS
|
||||
|
||||
.rela.dyn ALIGN(8) : { *(.rela.dyn) }
|
||||
.got ALIGN(8) : { *(.got .toc) }
|
||||
.got.plt ALIGN(8) : { *(.got.plt) }
|
||||
|
||||
_end = .;
|
||||
PROVIDE(end = .);
|
||||
|
@ -2489,13 +2489,15 @@ void perf_clear_dirty_counters(void)
|
||||
return;
|
||||
|
||||
for_each_set_bit(i, cpuc->dirty, X86_PMC_IDX_MAX) {
|
||||
/* Metrics and fake events don't have corresponding HW counters. */
|
||||
if (is_metric_idx(i) || (i == INTEL_PMC_IDX_FIXED_VLBR))
|
||||
continue;
|
||||
else if (i >= INTEL_PMC_IDX_FIXED)
|
||||
if (i >= INTEL_PMC_IDX_FIXED) {
|
||||
/* Metrics and fake events don't have corresponding HW counters. */
|
||||
if ((i - INTEL_PMC_IDX_FIXED) >= hybrid(cpuc->pmu, num_counters_fixed))
|
||||
continue;
|
||||
|
||||
wrmsrl(MSR_ARCH_PERFMON_FIXED_CTR0 + (i - INTEL_PMC_IDX_FIXED), 0);
|
||||
else
|
||||
} else {
|
||||
wrmsrl(x86_pmu_event_addr(i), 0);
|
||||
}
|
||||
}
|
||||
|
||||
bitmap_zero(cpuc->dirty, X86_PMC_IDX_MAX);
|
||||
|
@ -2904,24 +2904,28 @@ static int handle_pmi_common(struct pt_regs *regs, u64 status)
|
||||
*/
|
||||
static int intel_pmu_handle_irq(struct pt_regs *regs)
|
||||
{
|
||||
struct cpu_hw_events *cpuc;
|
||||
struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
|
||||
bool late_ack = hybrid_bit(cpuc->pmu, late_ack);
|
||||
bool mid_ack = hybrid_bit(cpuc->pmu, mid_ack);
|
||||
int loops;
|
||||
u64 status;
|
||||
int handled;
|
||||
int pmu_enabled;
|
||||
|
||||
cpuc = this_cpu_ptr(&cpu_hw_events);
|
||||
|
||||
/*
|
||||
* Save the PMU state.
|
||||
* It needs to be restored when leaving the handler.
|
||||
*/
|
||||
pmu_enabled = cpuc->enabled;
|
||||
/*
|
||||
* No known reason to not always do late ACK,
|
||||
* but just in case do it opt-in.
|
||||
* In general, the early ACK is only applied for old platforms.
|
||||
* For the big core starts from Haswell, the late ACK should be
|
||||
* applied.
|
||||
* For the small core after Tremont, we have to do the ACK right
|
||||
* before re-enabling counters, which is in the middle of the
|
||||
* NMI handler.
|
||||
*/
|
||||
if (!x86_pmu.late_ack)
|
||||
if (!late_ack && !mid_ack)
|
||||
apic_write(APIC_LVTPC, APIC_DM_NMI);
|
||||
intel_bts_disable_local();
|
||||
cpuc->enabled = 0;
|
||||
@ -2958,6 +2962,8 @@ again:
|
||||
goto again;
|
||||
|
||||
done:
|
||||
if (mid_ack)
|
||||
apic_write(APIC_LVTPC, APIC_DM_NMI);
|
||||
/* Only restore PMU state when it's active. See x86_pmu_disable(). */
|
||||
cpuc->enabled = pmu_enabled;
|
||||
if (pmu_enabled)
|
||||
@ -2969,7 +2975,7 @@ done:
|
||||
* have been reset. This avoids spurious NMIs on
|
||||
* Haswell CPUs.
|
||||
*/
|
||||
if (x86_pmu.late_ack)
|
||||
if (late_ack)
|
||||
apic_write(APIC_LVTPC, APIC_DM_NMI);
|
||||
return handled;
|
||||
}
|
||||
@ -6129,7 +6135,6 @@ __init int intel_pmu_init(void)
|
||||
static_branch_enable(&perf_is_hybrid);
|
||||
x86_pmu.num_hybrid_pmus = X86_HYBRID_NUM_PMUS;
|
||||
|
||||
x86_pmu.late_ack = true;
|
||||
x86_pmu.pebs_aliases = NULL;
|
||||
x86_pmu.pebs_prec_dist = true;
|
||||
x86_pmu.pebs_block = true;
|
||||
@ -6167,6 +6172,7 @@ __init int intel_pmu_init(void)
|
||||
pmu = &x86_pmu.hybrid_pmu[X86_HYBRID_PMU_CORE_IDX];
|
||||
pmu->name = "cpu_core";
|
||||
pmu->cpu_type = hybrid_big;
|
||||
pmu->late_ack = true;
|
||||
if (cpu_feature_enabled(X86_FEATURE_HYBRID_CPU)) {
|
||||
pmu->num_counters = x86_pmu.num_counters + 2;
|
||||
pmu->num_counters_fixed = x86_pmu.num_counters_fixed + 1;
|
||||
@ -6192,6 +6198,7 @@ __init int intel_pmu_init(void)
|
||||
pmu = &x86_pmu.hybrid_pmu[X86_HYBRID_PMU_ATOM_IDX];
|
||||
pmu->name = "cpu_atom";
|
||||
pmu->cpu_type = hybrid_small;
|
||||
pmu->mid_ack = true;
|
||||
pmu->num_counters = x86_pmu.num_counters;
|
||||
pmu->num_counters_fixed = x86_pmu.num_counters_fixed;
|
||||
pmu->max_pebs_events = x86_pmu.max_pebs_events;
|
||||
|
@ -656,6 +656,10 @@ struct x86_hybrid_pmu {
|
||||
struct event_constraint *event_constraints;
|
||||
struct event_constraint *pebs_constraints;
|
||||
struct extra_reg *extra_regs;
|
||||
|
||||
unsigned int late_ack :1,
|
||||
mid_ack :1,
|
||||
enabled_ack :1;
|
||||
};
|
||||
|
||||
static __always_inline struct x86_hybrid_pmu *hybrid_pmu(struct pmu *pmu)
|
||||
@ -686,6 +690,16 @@ extern struct static_key_false perf_is_hybrid;
|
||||
__Fp; \
|
||||
}))
|
||||
|
||||
#define hybrid_bit(_pmu, _field) \
|
||||
({ \
|
||||
bool __Fp = x86_pmu._field; \
|
||||
\
|
||||
if (is_hybrid() && (_pmu)) \
|
||||
__Fp = hybrid_pmu(_pmu)->_field; \
|
||||
\
|
||||
__Fp; \
|
||||
})
|
||||
|
||||
enum hybrid_pmu_type {
|
||||
hybrid_big = 0x40,
|
||||
hybrid_small = 0x20,
|
||||
@ -755,6 +769,7 @@ struct x86_pmu {
|
||||
|
||||
/* PMI handler bits */
|
||||
unsigned int late_ack :1,
|
||||
mid_ack :1,
|
||||
enabled_ack :1;
|
||||
/*
|
||||
* sysfs attrs
|
||||
@ -1115,9 +1130,10 @@ void x86_pmu_stop(struct perf_event *event, int flags);
|
||||
|
||||
static inline void x86_pmu_disable_event(struct perf_event *event)
|
||||
{
|
||||
u64 disable_mask = __this_cpu_read(cpu_hw_events.perf_ctr_virt_mask);
|
||||
struct hw_perf_event *hwc = &event->hw;
|
||||
|
||||
wrmsrl(hwc->config_base, hwc->config);
|
||||
wrmsrl(hwc->config_base, hwc->config & ~disable_mask);
|
||||
|
||||
if (is_counter_pair(hwc))
|
||||
wrmsrl(x86_pmu_config_addr(hwc->idx + 1), 0);
|
||||
|
@ -2016,6 +2016,7 @@ static void kvm_hv_hypercall_set_result(struct kvm_vcpu *vcpu, u64 result)
|
||||
|
||||
static int kvm_hv_hypercall_complete(struct kvm_vcpu *vcpu, u64 result)
|
||||
{
|
||||
trace_kvm_hv_hypercall_done(result);
|
||||
kvm_hv_hypercall_set_result(vcpu, result);
|
||||
++vcpu->stat.hypercalls;
|
||||
return kvm_skip_emulated_instruction(vcpu);
|
||||
@ -2139,6 +2140,7 @@ static bool hv_check_hypercall_access(struct kvm_vcpu_hv *hv_vcpu, u16 code)
|
||||
|
||||
int kvm_hv_hypercall(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
struct kvm_vcpu_hv *hv_vcpu = to_hv_vcpu(vcpu);
|
||||
struct kvm_hv_hcall hc;
|
||||
u64 ret = HV_STATUS_SUCCESS;
|
||||
|
||||
@ -2173,17 +2175,25 @@ int kvm_hv_hypercall(struct kvm_vcpu *vcpu)
|
||||
hc.rep_idx = (hc.param >> HV_HYPERCALL_REP_START_OFFSET) & 0xfff;
|
||||
hc.rep = !!(hc.rep_cnt || hc.rep_idx);
|
||||
|
||||
if (hc.fast && is_xmm_fast_hypercall(&hc))
|
||||
kvm_hv_hypercall_read_xmm(&hc);
|
||||
|
||||
trace_kvm_hv_hypercall(hc.code, hc.fast, hc.rep_cnt, hc.rep_idx,
|
||||
hc.ingpa, hc.outgpa);
|
||||
|
||||
if (unlikely(!hv_check_hypercall_access(to_hv_vcpu(vcpu), hc.code))) {
|
||||
if (unlikely(!hv_check_hypercall_access(hv_vcpu, hc.code))) {
|
||||
ret = HV_STATUS_ACCESS_DENIED;
|
||||
goto hypercall_complete;
|
||||
}
|
||||
|
||||
if (hc.fast && is_xmm_fast_hypercall(&hc)) {
|
||||
if (unlikely(hv_vcpu->enforce_cpuid &&
|
||||
!(hv_vcpu->cpuid_cache.features_edx &
|
||||
HV_X64_HYPERCALL_XMM_INPUT_AVAILABLE))) {
|
||||
kvm_queue_exception(vcpu, UD_VECTOR);
|
||||
return 1;
|
||||
}
|
||||
|
||||
kvm_hv_hypercall_read_xmm(&hc);
|
||||
}
|
||||
|
||||
switch (hc.code) {
|
||||
case HVCALL_NOTIFY_LONG_SPIN_WAIT:
|
||||
if (unlikely(hc.rep)) {
|
||||
|
@ -1644,7 +1644,7 @@ static int is_empty_shadow_page(u64 *spt)
|
||||
* aggregate version in order to make the slab shrinker
|
||||
* faster
|
||||
*/
|
||||
static inline void kvm_mod_used_mmu_pages(struct kvm *kvm, unsigned long nr)
|
||||
static inline void kvm_mod_used_mmu_pages(struct kvm *kvm, long nr)
|
||||
{
|
||||
kvm->arch.n_used_mmu_pages += nr;
|
||||
percpu_counter_add(&kvm_total_used_mmu_pages, nr);
|
||||
|
@ -64,6 +64,7 @@ static DEFINE_MUTEX(sev_bitmap_lock);
|
||||
unsigned int max_sev_asid;
|
||||
static unsigned int min_sev_asid;
|
||||
static unsigned long sev_me_mask;
|
||||
static unsigned int nr_asids;
|
||||
static unsigned long *sev_asid_bitmap;
|
||||
static unsigned long *sev_reclaim_asid_bitmap;
|
||||
|
||||
@ -78,11 +79,11 @@ struct enc_region {
|
||||
/* Called with the sev_bitmap_lock held, or on shutdown */
|
||||
static int sev_flush_asids(int min_asid, int max_asid)
|
||||
{
|
||||
int ret, pos, error = 0;
|
||||
int ret, asid, error = 0;
|
||||
|
||||
/* Check if there are any ASIDs to reclaim before performing a flush */
|
||||
pos = find_next_bit(sev_reclaim_asid_bitmap, max_asid, min_asid);
|
||||
if (pos >= max_asid)
|
||||
asid = find_next_bit(sev_reclaim_asid_bitmap, nr_asids, min_asid);
|
||||
if (asid > max_asid)
|
||||
return -EBUSY;
|
||||
|
||||
/*
|
||||
@ -115,15 +116,15 @@ static bool __sev_recycle_asids(int min_asid, int max_asid)
|
||||
|
||||
/* The flush process will flush all reclaimable SEV and SEV-ES ASIDs */
|
||||
bitmap_xor(sev_asid_bitmap, sev_asid_bitmap, sev_reclaim_asid_bitmap,
|
||||
max_sev_asid);
|
||||
bitmap_zero(sev_reclaim_asid_bitmap, max_sev_asid);
|
||||
nr_asids);
|
||||
bitmap_zero(sev_reclaim_asid_bitmap, nr_asids);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static int sev_asid_new(struct kvm_sev_info *sev)
|
||||
{
|
||||
int pos, min_asid, max_asid, ret;
|
||||
int asid, min_asid, max_asid, ret;
|
||||
bool retry = true;
|
||||
enum misc_res_type type;
|
||||
|
||||
@ -143,11 +144,11 @@ static int sev_asid_new(struct kvm_sev_info *sev)
|
||||
* SEV-enabled guests must use asid from min_sev_asid to max_sev_asid.
|
||||
* SEV-ES-enabled guest can use from 1 to min_sev_asid - 1.
|
||||
*/
|
||||
min_asid = sev->es_active ? 0 : min_sev_asid - 1;
|
||||
min_asid = sev->es_active ? 1 : min_sev_asid;
|
||||
max_asid = sev->es_active ? min_sev_asid - 1 : max_sev_asid;
|
||||
again:
|
||||
pos = find_next_zero_bit(sev_asid_bitmap, max_sev_asid, min_asid);
|
||||
if (pos >= max_asid) {
|
||||
asid = find_next_zero_bit(sev_asid_bitmap, max_asid + 1, min_asid);
|
||||
if (asid > max_asid) {
|
||||
if (retry && __sev_recycle_asids(min_asid, max_asid)) {
|
||||
retry = false;
|
||||
goto again;
|
||||
@ -157,11 +158,11 @@ again:
|
||||
goto e_uncharge;
|
||||
}
|
||||
|
||||
__set_bit(pos, sev_asid_bitmap);
|
||||
__set_bit(asid, sev_asid_bitmap);
|
||||
|
||||
mutex_unlock(&sev_bitmap_lock);
|
||||
|
||||
return pos + 1;
|
||||
return asid;
|
||||
e_uncharge:
|
||||
misc_cg_uncharge(type, sev->misc_cg, 1);
|
||||
put_misc_cg(sev->misc_cg);
|
||||
@ -179,17 +180,16 @@ static int sev_get_asid(struct kvm *kvm)
|
||||
static void sev_asid_free(struct kvm_sev_info *sev)
|
||||
{
|
||||
struct svm_cpu_data *sd;
|
||||
int cpu, pos;
|
||||
int cpu;
|
||||
enum misc_res_type type;
|
||||
|
||||
mutex_lock(&sev_bitmap_lock);
|
||||
|
||||
pos = sev->asid - 1;
|
||||
__set_bit(pos, sev_reclaim_asid_bitmap);
|
||||
__set_bit(sev->asid, sev_reclaim_asid_bitmap);
|
||||
|
||||
for_each_possible_cpu(cpu) {
|
||||
sd = per_cpu(svm_data, cpu);
|
||||
sd->sev_vmcbs[pos] = NULL;
|
||||
sd->sev_vmcbs[sev->asid] = NULL;
|
||||
}
|
||||
|
||||
mutex_unlock(&sev_bitmap_lock);
|
||||
@ -1857,12 +1857,17 @@ void __init sev_hardware_setup(void)
|
||||
min_sev_asid = edx;
|
||||
sev_me_mask = 1UL << (ebx & 0x3f);
|
||||
|
||||
/* Initialize SEV ASID bitmaps */
|
||||
sev_asid_bitmap = bitmap_zalloc(max_sev_asid, GFP_KERNEL);
|
||||
/*
|
||||
* Initialize SEV ASID bitmaps. Allocate space for ASID 0 in the bitmap,
|
||||
* even though it's never used, so that the bitmap is indexed by the
|
||||
* actual ASID.
|
||||
*/
|
||||
nr_asids = max_sev_asid + 1;
|
||||
sev_asid_bitmap = bitmap_zalloc(nr_asids, GFP_KERNEL);
|
||||
if (!sev_asid_bitmap)
|
||||
goto out;
|
||||
|
||||
sev_reclaim_asid_bitmap = bitmap_zalloc(max_sev_asid, GFP_KERNEL);
|
||||
sev_reclaim_asid_bitmap = bitmap_zalloc(nr_asids, GFP_KERNEL);
|
||||
if (!sev_reclaim_asid_bitmap) {
|
||||
bitmap_free(sev_asid_bitmap);
|
||||
sev_asid_bitmap = NULL;
|
||||
@ -1907,7 +1912,7 @@ void sev_hardware_teardown(void)
|
||||
return;
|
||||
|
||||
/* No need to take sev_bitmap_lock, all VMs have been destroyed. */
|
||||
sev_flush_asids(0, max_sev_asid);
|
||||
sev_flush_asids(1, max_sev_asid);
|
||||
|
||||
bitmap_free(sev_asid_bitmap);
|
||||
bitmap_free(sev_reclaim_asid_bitmap);
|
||||
@ -1921,7 +1926,7 @@ int sev_cpu_init(struct svm_cpu_data *sd)
|
||||
if (!sev_enabled)
|
||||
return 0;
|
||||
|
||||
sd->sev_vmcbs = kcalloc(max_sev_asid + 1, sizeof(void *), GFP_KERNEL);
|
||||
sd->sev_vmcbs = kcalloc(nr_asids, sizeof(void *), GFP_KERNEL);
|
||||
if (!sd->sev_vmcbs)
|
||||
return -ENOMEM;
|
||||
|
||||
|
@ -92,6 +92,21 @@ TRACE_EVENT(kvm_hv_hypercall,
|
||||
__entry->outgpa)
|
||||
);
|
||||
|
||||
TRACE_EVENT(kvm_hv_hypercall_done,
|
||||
TP_PROTO(u64 result),
|
||||
TP_ARGS(result),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(__u64, result)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->result = result;
|
||||
),
|
||||
|
||||
TP_printk("result 0x%llx", __entry->result)
|
||||
);
|
||||
|
||||
/*
|
||||
* Tracepoint for Xen hypercall.
|
||||
*/
|
||||
|
@ -4358,8 +4358,17 @@ static int kvm_cpu_accept_dm_intr(struct kvm_vcpu *vcpu)
|
||||
|
||||
static int kvm_vcpu_ready_for_interrupt_injection(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
return kvm_arch_interrupt_allowed(vcpu) &&
|
||||
kvm_cpu_accept_dm_intr(vcpu);
|
||||
/*
|
||||
* Do not cause an interrupt window exit if an exception
|
||||
* is pending or an event needs reinjection; userspace
|
||||
* might want to inject the interrupt manually using KVM_SET_REGS
|
||||
* or KVM_SET_SREGS. For that to work, we must be at an
|
||||
* instruction boundary and with no events half-injected.
|
||||
*/
|
||||
return (kvm_arch_interrupt_allowed(vcpu) &&
|
||||
kvm_cpu_accept_dm_intr(vcpu) &&
|
||||
!kvm_event_needs_reinjection(vcpu) &&
|
||||
!vcpu->arch.exception.pending);
|
||||
}
|
||||
|
||||
static int kvm_vcpu_ioctl_interrupt(struct kvm_vcpu *vcpu,
|
||||
|
@ -57,12 +57,12 @@ static const char * const sym_regex_kernel[S_NSYMTYPES] = {
|
||||
[S_REL] =
|
||||
"^(__init_(begin|end)|"
|
||||
"__x86_cpu_dev_(start|end)|"
|
||||
"(__parainstructions|__alt_instructions)(|_end)|"
|
||||
"(__iommu_table|__apicdrivers|__smp_locks)(|_end)|"
|
||||
"(__parainstructions|__alt_instructions)(_end)?|"
|
||||
"(__iommu_table|__apicdrivers|__smp_locks)(_end)?|"
|
||||
"__(start|end)_pci_.*|"
|
||||
"__(start|end)_builtin_fw|"
|
||||
"__(start|stop)___ksymtab(|_gpl)|"
|
||||
"__(start|stop)___kcrctab(|_gpl)|"
|
||||
"__(start|stop)___ksymtab(_gpl)?|"
|
||||
"__(start|stop)___kcrctab(_gpl)?|"
|
||||
"__(start|stop)___param|"
|
||||
"__(start|stop)___modver|"
|
||||
"__(start|stop)___bug_table|"
|
||||
|
@ -790,6 +790,7 @@ static void blkcg_rstat_flush(struct cgroup_subsys_state *css, int cpu)
|
||||
struct blkcg_gq *parent = blkg->parent;
|
||||
struct blkg_iostat_set *bisc = per_cpu_ptr(blkg->iostat_cpu, cpu);
|
||||
struct blkg_iostat cur, delta;
|
||||
unsigned long flags;
|
||||
unsigned int seq;
|
||||
|
||||
/* fetch the current per-cpu values */
|
||||
@ -799,21 +800,21 @@ static void blkcg_rstat_flush(struct cgroup_subsys_state *css, int cpu)
|
||||
} while (u64_stats_fetch_retry(&bisc->sync, seq));
|
||||
|
||||
/* propagate percpu delta to global */
|
||||
u64_stats_update_begin(&blkg->iostat.sync);
|
||||
flags = u64_stats_update_begin_irqsave(&blkg->iostat.sync);
|
||||
blkg_iostat_set(&delta, &cur);
|
||||
blkg_iostat_sub(&delta, &bisc->last);
|
||||
blkg_iostat_add(&blkg->iostat.cur, &delta);
|
||||
blkg_iostat_add(&bisc->last, &delta);
|
||||
u64_stats_update_end(&blkg->iostat.sync);
|
||||
u64_stats_update_end_irqrestore(&blkg->iostat.sync, flags);
|
||||
|
||||
/* propagate global delta to parent (unless that's root) */
|
||||
if (parent && parent->parent) {
|
||||
u64_stats_update_begin(&parent->iostat.sync);
|
||||
flags = u64_stats_update_begin_irqsave(&parent->iostat.sync);
|
||||
blkg_iostat_set(&delta, &blkg->iostat.cur);
|
||||
blkg_iostat_sub(&delta, &blkg->iostat.last);
|
||||
blkg_iostat_add(&parent->iostat.cur, &delta);
|
||||
blkg_iostat_add(&blkg->iostat.last, &delta);
|
||||
u64_stats_update_end(&parent->iostat.sync);
|
||||
u64_stats_update_end_irqrestore(&parent->iostat.sync, flags);
|
||||
}
|
||||
}
|
||||
|
||||
@ -848,6 +849,7 @@ static void blkcg_fill_root_iostats(void)
|
||||
memset(&tmp, 0, sizeof(tmp));
|
||||
for_each_possible_cpu(cpu) {
|
||||
struct disk_stats *cpu_dkstats;
|
||||
unsigned long flags;
|
||||
|
||||
cpu_dkstats = per_cpu_ptr(bdev->bd_stats, cpu);
|
||||
tmp.ios[BLKG_IOSTAT_READ] +=
|
||||
@ -864,9 +866,9 @@ static void blkcg_fill_root_iostats(void)
|
||||
tmp.bytes[BLKG_IOSTAT_DISCARD] +=
|
||||
cpu_dkstats->sectors[STAT_DISCARD] << 9;
|
||||
|
||||
u64_stats_update_begin(&blkg->iostat.sync);
|
||||
flags = u64_stats_update_begin_irqsave(&blkg->iostat.sync);
|
||||
blkg_iostat_set(&blkg->iostat.cur, &tmp);
|
||||
u64_stats_update_end(&blkg->iostat.sync);
|
||||
u64_stats_update_end_irqrestore(&blkg->iostat.sync, flags);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -833,7 +833,11 @@ static ssize_t iolatency_set_limit(struct kernfs_open_file *of, char *buf,
|
||||
|
||||
enable = iolatency_set_min_lat_nsec(blkg, lat_val);
|
||||
if (enable) {
|
||||
WARN_ON_ONCE(!blk_get_queue(blkg->q));
|
||||
if (!blk_get_queue(blkg->q)) {
|
||||
ret = -ENODEV;
|
||||
goto out;
|
||||
}
|
||||
|
||||
blkg_get(blkg);
|
||||
}
|
||||
|
||||
|
@ -596,13 +596,13 @@ static void kyber_insert_requests(struct blk_mq_hw_ctx *hctx,
|
||||
struct list_head *head = &kcq->rq_list[sched_domain];
|
||||
|
||||
spin_lock(&kcq->lock);
|
||||
trace_block_rq_insert(rq);
|
||||
if (at_head)
|
||||
list_move(&rq->queuelist, head);
|
||||
else
|
||||
list_move_tail(&rq->queuelist, head);
|
||||
sbitmap_set_bit(&khd->kcq_map[sched_domain],
|
||||
rq->mq_ctx->index_hw[hctx->type]);
|
||||
trace_block_rq_insert(rq);
|
||||
spin_unlock(&kcq->lock);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
/**
|
||||
/*
|
||||
* ldm - Support for Windows Logical Disk Manager (Dynamic Disks)
|
||||
*
|
||||
* Copyright (C) 2001,2002 Richard Russon <ldm@flatcap.org>
|
||||
|
@ -379,13 +379,6 @@ acpi_ns_repair_CID(struct acpi_evaluate_info *info,
|
||||
|
||||
(*element_ptr)->common.reference_count =
|
||||
original_ref_count;
|
||||
|
||||
/*
|
||||
* The original_element holds a reference from the package object
|
||||
* that represents _HID. Since a new element was created by _HID,
|
||||
* remove the reference from the _CID package.
|
||||
*/
|
||||
acpi_ut_remove_reference(original_element);
|
||||
}
|
||||
|
||||
element_ptr++;
|
||||
|
@ -653,8 +653,6 @@ dev_groups_failed:
|
||||
else if (drv->remove)
|
||||
drv->remove(dev);
|
||||
probe_failed:
|
||||
kfree(dev->dma_range_map);
|
||||
dev->dma_range_map = NULL;
|
||||
if (dev->bus)
|
||||
blocking_notifier_call_chain(&dev->bus->p->bus_notifier,
|
||||
BUS_NOTIFY_DRIVER_NOT_BOUND, dev);
|
||||
@ -662,6 +660,8 @@ pinctrl_bind_failed:
|
||||
device_links_no_driver(dev);
|
||||
devres_release_all(dev);
|
||||
arch_teardown_dma_ops(dev);
|
||||
kfree(dev->dma_range_map);
|
||||
dev->dma_range_map = NULL;
|
||||
driver_sysfs_remove(dev);
|
||||
dev->driver = NULL;
|
||||
dev_set_drvdata(dev, NULL);
|
||||
|
@ -89,12 +89,11 @@ static void __fw_load_abort(struct fw_priv *fw_priv)
|
||||
{
|
||||
/*
|
||||
* There is a small window in which user can write to 'loading'
|
||||
* between loading done and disappearance of 'loading'
|
||||
* between loading done/aborted and disappearance of 'loading'
|
||||
*/
|
||||
if (fw_sysfs_done(fw_priv))
|
||||
if (fw_state_is_aborted(fw_priv) || fw_sysfs_done(fw_priv))
|
||||
return;
|
||||
|
||||
list_del_init(&fw_priv->pending_list);
|
||||
fw_state_aborted(fw_priv);
|
||||
}
|
||||
|
||||
@ -280,7 +279,6 @@ static ssize_t firmware_loading_store(struct device *dev,
|
||||
* Same logic as fw_load_abort, only the DONE bit
|
||||
* is ignored and we set ABORT only on failure.
|
||||
*/
|
||||
list_del_init(&fw_priv->pending_list);
|
||||
if (rc) {
|
||||
fw_state_aborted(fw_priv);
|
||||
written = rc;
|
||||
@ -513,6 +511,11 @@ static int fw_load_sysfs_fallback(struct fw_sysfs *fw_sysfs, long timeout)
|
||||
}
|
||||
|
||||
mutex_lock(&fw_lock);
|
||||
if (fw_state_is_aborted(fw_priv)) {
|
||||
mutex_unlock(&fw_lock);
|
||||
retval = -EINTR;
|
||||
goto out;
|
||||
}
|
||||
list_add(&fw_priv->pending_list, &pending_fw_head);
|
||||
mutex_unlock(&fw_lock);
|
||||
|
||||
@ -535,11 +538,10 @@ static int fw_load_sysfs_fallback(struct fw_sysfs *fw_sysfs, long timeout)
|
||||
if (fw_state_is_aborted(fw_priv)) {
|
||||
if (retval == -ERESTARTSYS)
|
||||
retval = -EINTR;
|
||||
else
|
||||
retval = -EAGAIN;
|
||||
} else if (fw_priv->is_paged_buf && !fw_priv->data)
|
||||
retval = -ENOMEM;
|
||||
|
||||
out:
|
||||
device_del(f_dev);
|
||||
err_put_dev:
|
||||
put_device(f_dev);
|
||||
|
@ -117,8 +117,16 @@ static inline void __fw_state_set(struct fw_priv *fw_priv,
|
||||
|
||||
WRITE_ONCE(fw_st->status, status);
|
||||
|
||||
if (status == FW_STATUS_DONE || status == FW_STATUS_ABORTED)
|
||||
if (status == FW_STATUS_DONE || status == FW_STATUS_ABORTED) {
|
||||
#ifdef CONFIG_FW_LOADER_USER_HELPER
|
||||
/*
|
||||
* Doing this here ensures that the fw_priv is deleted from
|
||||
* the pending list in all abort/done paths.
|
||||
*/
|
||||
list_del_init(&fw_priv->pending_list);
|
||||
#endif
|
||||
complete_all(&fw_st->completion);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void fw_state_aborted(struct fw_priv *fw_priv)
|
||||
|
@ -783,8 +783,10 @@ static void fw_abort_batch_reqs(struct firmware *fw)
|
||||
return;
|
||||
|
||||
fw_priv = fw->priv;
|
||||
mutex_lock(&fw_lock);
|
||||
if (!fw_state_is_aborted(fw_priv))
|
||||
fw_state_aborted(fw_priv);
|
||||
mutex_unlock(&fw_lock);
|
||||
}
|
||||
|
||||
/* called from request_firmware() and request_firmware_work_func() */
|
||||
|
@ -74,7 +74,7 @@ static bool n64cart_do_bvec(struct device *dev, struct bio_vec *bv, u32 pos)
|
||||
|
||||
n64cart_wait_dma();
|
||||
|
||||
n64cart_write_reg(PI_DRAM_REG, dma_addr + bv->bv_offset);
|
||||
n64cart_write_reg(PI_DRAM_REG, dma_addr);
|
||||
n64cart_write_reg(PI_CART_REG, (bstart | CART_DOMAIN) & CART_MAX);
|
||||
n64cart_write_reg(PI_WRITE_REG, bv->bv_len - 1);
|
||||
|
||||
|
@ -682,7 +682,7 @@ void mhi_rddm_prepare(struct mhi_controller *mhi_cntrl,
|
||||
struct image_info *img_info);
|
||||
void mhi_fw_load_handler(struct mhi_controller *mhi_cntrl);
|
||||
int mhi_prepare_channel(struct mhi_controller *mhi_cntrl,
|
||||
struct mhi_chan *mhi_chan);
|
||||
struct mhi_chan *mhi_chan, unsigned int flags);
|
||||
int mhi_init_chan_ctxt(struct mhi_controller *mhi_cntrl,
|
||||
struct mhi_chan *mhi_chan);
|
||||
void mhi_deinit_chan_ctxt(struct mhi_controller *mhi_cntrl,
|
||||
|
@ -1430,7 +1430,7 @@ exit_unprepare_channel:
|
||||
}
|
||||
|
||||
int mhi_prepare_channel(struct mhi_controller *mhi_cntrl,
|
||||
struct mhi_chan *mhi_chan)
|
||||
struct mhi_chan *mhi_chan, unsigned int flags)
|
||||
{
|
||||
int ret = 0;
|
||||
struct device *dev = &mhi_chan->mhi_dev->dev;
|
||||
@ -1455,6 +1455,9 @@ int mhi_prepare_channel(struct mhi_controller *mhi_cntrl,
|
||||
if (ret)
|
||||
goto error_pm_state;
|
||||
|
||||
if (mhi_chan->dir == DMA_FROM_DEVICE)
|
||||
mhi_chan->pre_alloc = !!(flags & MHI_CH_INBOUND_ALLOC_BUFS);
|
||||
|
||||
/* Pre-allocate buffer for xfer ring */
|
||||
if (mhi_chan->pre_alloc) {
|
||||
int nr_el = get_nr_avail_ring_elements(mhi_cntrl,
|
||||
@ -1610,7 +1613,7 @@ void mhi_reset_chan(struct mhi_controller *mhi_cntrl, struct mhi_chan *mhi_chan)
|
||||
}
|
||||
|
||||
/* Move channel to start state */
|
||||
int mhi_prepare_for_transfer(struct mhi_device *mhi_dev)
|
||||
int mhi_prepare_for_transfer(struct mhi_device *mhi_dev, unsigned int flags)
|
||||
{
|
||||
int ret, dir;
|
||||
struct mhi_controller *mhi_cntrl = mhi_dev->mhi_cntrl;
|
||||
@ -1621,7 +1624,7 @@ int mhi_prepare_for_transfer(struct mhi_device *mhi_dev)
|
||||
if (!mhi_chan)
|
||||
continue;
|
||||
|
||||
ret = mhi_prepare_channel(mhi_cntrl, mhi_chan);
|
||||
ret = mhi_prepare_channel(mhi_cntrl, mhi_chan, flags);
|
||||
if (ret)
|
||||
goto error_open_chan;
|
||||
}
|
||||
|
@ -100,6 +100,7 @@ static const char * const clock_names[SYSC_MAX_CLOCKS] = {
|
||||
* @cookie: data used by legacy platform callbacks
|
||||
* @name: name if available
|
||||
* @revision: interconnect target module revision
|
||||
* @reserved: target module is reserved and already in use
|
||||
* @enabled: sysc runtime enabled status
|
||||
* @needs_resume: runtime resume needed on resume from suspend
|
||||
* @child_needs_resume: runtime resume needed for child on resume from suspend
|
||||
@ -130,6 +131,7 @@ struct sysc {
|
||||
struct ti_sysc_cookie cookie;
|
||||
const char *name;
|
||||
u32 revision;
|
||||
unsigned int reserved:1;
|
||||
unsigned int enabled:1;
|
||||
unsigned int needs_resume:1;
|
||||
unsigned int child_needs_resume:1;
|
||||
@ -2951,6 +2953,8 @@ static int sysc_init_soc(struct sysc *ddata)
|
||||
case SOC_3430 ... SOC_3630:
|
||||
sysc_add_disabled(0x48304000); /* timer12 */
|
||||
break;
|
||||
case SOC_AM3:
|
||||
sysc_add_disabled(0x48310000); /* rng */
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -3093,8 +3097,8 @@ static int sysc_probe(struct platform_device *pdev)
|
||||
return error;
|
||||
|
||||
error = sysc_check_active_timer(ddata);
|
||||
if (error)
|
||||
return error;
|
||||
if (error == -EBUSY)
|
||||
ddata->reserved = true;
|
||||
|
||||
error = sysc_get_clocks(ddata);
|
||||
if (error)
|
||||
@ -3130,11 +3134,15 @@ static int sysc_probe(struct platform_device *pdev)
|
||||
sysc_show_registers(ddata);
|
||||
|
||||
ddata->dev->type = &sysc_device_type;
|
||||
error = of_platform_populate(ddata->dev->of_node, sysc_match_table,
|
||||
pdata ? pdata->auxdata : NULL,
|
||||
ddata->dev);
|
||||
if (error)
|
||||
goto err;
|
||||
|
||||
if (!ddata->reserved) {
|
||||
error = of_platform_populate(ddata->dev->of_node,
|
||||
sysc_match_table,
|
||||
pdata ? pdata->auxdata : NULL,
|
||||
ddata->dev);
|
||||
if (error)
|
||||
goto err;
|
||||
}
|
||||
|
||||
INIT_DELAYED_WORK(&ddata->idle_work, ti_sysc_idle);
|
||||
|
||||
|
@ -254,11 +254,11 @@ static int ftpm_tee_probe(struct device *dev)
|
||||
pvt_data->session = sess_arg.session;
|
||||
|
||||
/* Allocate dynamic shared memory with fTPM TA */
|
||||
pvt_data->shm = tee_shm_alloc(pvt_data->ctx,
|
||||
MAX_COMMAND_SIZE + MAX_RESPONSE_SIZE,
|
||||
TEE_SHM_MAPPED | TEE_SHM_DMA_BUF);
|
||||
pvt_data->shm = tee_shm_alloc_kernel_buf(pvt_data->ctx,
|
||||
MAX_COMMAND_SIZE +
|
||||
MAX_RESPONSE_SIZE);
|
||||
if (IS_ERR(pvt_data->shm)) {
|
||||
dev_err(dev, "%s: tee_shm_alloc failed\n", __func__);
|
||||
dev_err(dev, "%s: tee_shm_alloc_kernel_buf failed\n", __func__);
|
||||
rc = -ENOMEM;
|
||||
goto out_shm_alloc;
|
||||
}
|
||||
|
@ -92,13 +92,20 @@ int __must_check devm_clk_bulk_get_optional(struct device *dev, int num_clks,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(devm_clk_bulk_get_optional);
|
||||
|
||||
static void devm_clk_bulk_release_all(struct device *dev, void *res)
|
||||
{
|
||||
struct clk_bulk_devres *devres = res;
|
||||
|
||||
clk_bulk_put_all(devres->num_clks, devres->clks);
|
||||
}
|
||||
|
||||
int __must_check devm_clk_bulk_get_all(struct device *dev,
|
||||
struct clk_bulk_data **clks)
|
||||
{
|
||||
struct clk_bulk_devres *devres;
|
||||
int ret;
|
||||
|
||||
devres = devres_alloc(devm_clk_bulk_release,
|
||||
devres = devres_alloc(devm_clk_bulk_release_all,
|
||||
sizeof(*devres), GFP_KERNEL);
|
||||
if (!devres)
|
||||
return -ENOMEM;
|
||||
|
@ -526,7 +526,7 @@ struct stm32f4_pll {
|
||||
|
||||
struct stm32f4_pll_post_div_data {
|
||||
int idx;
|
||||
u8 pll_num;
|
||||
int pll_idx;
|
||||
const char *name;
|
||||
const char *parent;
|
||||
u8 flag;
|
||||
@ -557,13 +557,13 @@ static const struct clk_div_table post_divr_table[] = {
|
||||
|
||||
#define MAX_POST_DIV 3
|
||||
static const struct stm32f4_pll_post_div_data post_div_data[MAX_POST_DIV] = {
|
||||
{ CLK_I2SQ_PDIV, PLL_I2S, "plli2s-q-div", "plli2s-q",
|
||||
{ CLK_I2SQ_PDIV, PLL_VCO_I2S, "plli2s-q-div", "plli2s-q",
|
||||
CLK_SET_RATE_PARENT, STM32F4_RCC_DCKCFGR, 0, 5, 0, NULL},
|
||||
|
||||
{ CLK_SAIQ_PDIV, PLL_SAI, "pllsai-q-div", "pllsai-q",
|
||||
{ CLK_SAIQ_PDIV, PLL_VCO_SAI, "pllsai-q-div", "pllsai-q",
|
||||
CLK_SET_RATE_PARENT, STM32F4_RCC_DCKCFGR, 8, 5, 0, NULL },
|
||||
|
||||
{ NO_IDX, PLL_SAI, "pllsai-r-div", "pllsai-r", CLK_SET_RATE_PARENT,
|
||||
{ NO_IDX, PLL_VCO_SAI, "pllsai-r-div", "pllsai-r", CLK_SET_RATE_PARENT,
|
||||
STM32F4_RCC_DCKCFGR, 16, 2, 0, post_divr_table },
|
||||
};
|
||||
|
||||
@ -1774,7 +1774,7 @@ static void __init stm32f4_rcc_init(struct device_node *np)
|
||||
post_div->width,
|
||||
post_div->flag_div,
|
||||
post_div->div_table,
|
||||
clks[post_div->pll_num],
|
||||
clks[post_div->pll_idx],
|
||||
&stm32f4_clk_lock);
|
||||
|
||||
if (post_div->idx != NO_IDX)
|
||||
|
@ -18,6 +18,7 @@ config COMMON_CLK_HI3519
|
||||
config COMMON_CLK_HI3559A
|
||||
bool "Hi3559A Clock Driver"
|
||||
depends on ARCH_HISI || COMPILE_TEST
|
||||
select RESET_HISI
|
||||
default ARCH_HISI
|
||||
help
|
||||
Build the clock driver for hi3559a.
|
||||
|
@ -467,7 +467,7 @@ DEFINE_CLK_SMD_RPM(msm8936, sysmmnoc_clk, sysmmnoc_a_clk, QCOM_SMD_RPM_BUS_CLK,
|
||||
|
||||
static struct clk_smd_rpm *msm8936_clks[] = {
|
||||
[RPM_SMD_PCNOC_CLK] = &msm8916_pcnoc_clk,
|
||||
[RPM_SMD_PCNOC_A_CLK] = &msm8916_pcnoc_clk,
|
||||
[RPM_SMD_PCNOC_A_CLK] = &msm8916_pcnoc_a_clk,
|
||||
[RPM_SMD_SNOC_CLK] = &msm8916_snoc_clk,
|
||||
[RPM_SMD_SNOC_A_CLK] = &msm8916_snoc_a_clk,
|
||||
[RPM_SMD_BIMC_CLK] = &msm8916_bimc_clk,
|
||||
|
@ -194,6 +194,15 @@ static void clk_sdmmc_mux_disable(struct clk_hw *hw)
|
||||
gate_ops->disable(gate_hw);
|
||||
}
|
||||
|
||||
static void clk_sdmmc_mux_disable_unused(struct clk_hw *hw)
|
||||
{
|
||||
struct tegra_sdmmc_mux *sdmmc_mux = to_clk_sdmmc_mux(hw);
|
||||
const struct clk_ops *gate_ops = sdmmc_mux->gate_ops;
|
||||
struct clk_hw *gate_hw = &sdmmc_mux->gate.hw;
|
||||
|
||||
gate_ops->disable_unused(gate_hw);
|
||||
}
|
||||
|
||||
static void clk_sdmmc_mux_restore_context(struct clk_hw *hw)
|
||||
{
|
||||
struct clk_hw *parent = clk_hw_get_parent(hw);
|
||||
@ -218,6 +227,7 @@ static const struct clk_ops tegra_clk_sdmmc_mux_ops = {
|
||||
.is_enabled = clk_sdmmc_mux_is_enabled,
|
||||
.enable = clk_sdmmc_mux_enable,
|
||||
.disable = clk_sdmmc_mux_disable,
|
||||
.disable_unused = clk_sdmmc_mux_disable_unused,
|
||||
.restore_context = clk_sdmmc_mux_restore_context,
|
||||
};
|
||||
|
||||
|
@ -382,8 +382,8 @@ static int teo_select(struct cpuidle_driver *drv, struct cpuidle_device *dev,
|
||||
alt_intercepts = 2 * idx_intercept_sum > cpu_data->total - idx_hit_sum;
|
||||
alt_recent = idx_recent_sum > NR_RECENT / 2;
|
||||
if (alt_recent || alt_intercepts) {
|
||||
s64 last_enabled_span_ns = duration_ns;
|
||||
int last_enabled_idx = idx;
|
||||
s64 first_suitable_span_ns = duration_ns;
|
||||
int first_suitable_idx = idx;
|
||||
|
||||
/*
|
||||
* Look for the deepest idle state whose target residency had
|
||||
@ -397,37 +397,51 @@ static int teo_select(struct cpuidle_driver *drv, struct cpuidle_device *dev,
|
||||
intercept_sum = 0;
|
||||
recent_sum = 0;
|
||||
|
||||
for (i = idx - 1; i >= idx0; i--) {
|
||||
for (i = idx - 1; i >= 0; i--) {
|
||||
struct teo_bin *bin = &cpu_data->state_bins[i];
|
||||
s64 span_ns;
|
||||
|
||||
intercept_sum += bin->intercepts;
|
||||
recent_sum += bin->recent;
|
||||
|
||||
if (dev->states_usage[i].disable)
|
||||
continue;
|
||||
|
||||
span_ns = teo_middle_of_bin(i, drv);
|
||||
if (!teo_time_ok(span_ns)) {
|
||||
/*
|
||||
* The current state is too shallow, so select
|
||||
* the first enabled deeper state.
|
||||
*/
|
||||
duration_ns = last_enabled_span_ns;
|
||||
idx = last_enabled_idx;
|
||||
break;
|
||||
}
|
||||
|
||||
if ((!alt_recent || 2 * recent_sum > idx_recent_sum) &&
|
||||
(!alt_intercepts ||
|
||||
2 * intercept_sum > idx_intercept_sum)) {
|
||||
idx = i;
|
||||
duration_ns = span_ns;
|
||||
if (teo_time_ok(span_ns) &&
|
||||
!dev->states_usage[i].disable) {
|
||||
idx = i;
|
||||
duration_ns = span_ns;
|
||||
} else {
|
||||
/*
|
||||
* The current state is too shallow or
|
||||
* disabled, so take the first enabled
|
||||
* deeper state with suitable time span.
|
||||
*/
|
||||
idx = first_suitable_idx;
|
||||
duration_ns = first_suitable_span_ns;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
last_enabled_span_ns = span_ns;
|
||||
last_enabled_idx = i;
|
||||
if (dev->states_usage[i].disable)
|
||||
continue;
|
||||
|
||||
if (!teo_time_ok(span_ns)) {
|
||||
/*
|
||||
* The current state is too shallow, but if an
|
||||
* alternative candidate state has been found,
|
||||
* it may still turn out to be a better choice.
|
||||
*/
|
||||
if (first_suitable_idx != idx)
|
||||
continue;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
first_suitable_span_ns = span_ns;
|
||||
first_suitable_idx = i;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -294,6 +294,14 @@ struct idxd_desc {
|
||||
struct idxd_wq *wq;
|
||||
};
|
||||
|
||||
/*
|
||||
* This is software defined error for the completion status. We overload the error code
|
||||
* that will never appear in completion status and only SWERR register.
|
||||
*/
|
||||
enum idxd_completion_status {
|
||||
IDXD_COMP_DESC_ABORT = 0xff,
|
||||
};
|
||||
|
||||
#define confdev_to_idxd(dev) container_of(dev, struct idxd_device, conf_dev)
|
||||
#define confdev_to_wq(dev) container_of(dev, struct idxd_wq, conf_dev)
|
||||
|
||||
@ -482,4 +490,10 @@ static inline void perfmon_init(void) {}
|
||||
static inline void perfmon_exit(void) {}
|
||||
#endif
|
||||
|
||||
static inline void complete_desc(struct idxd_desc *desc, enum idxd_complete_type reason)
|
||||
{
|
||||
idxd_dma_complete_txd(desc, reason);
|
||||
idxd_free_desc(desc->wq, desc);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -102,6 +102,8 @@ static int idxd_setup_interrupts(struct idxd_device *idxd)
|
||||
spin_lock_init(&idxd->irq_entries[i].list_lock);
|
||||
}
|
||||
|
||||
idxd_msix_perm_setup(idxd);
|
||||
|
||||
irq_entry = &idxd->irq_entries[0];
|
||||
rc = request_threaded_irq(irq_entry->vector, NULL, idxd_misc_thread,
|
||||
0, "idxd-misc", irq_entry);
|
||||
@ -148,7 +150,6 @@ static int idxd_setup_interrupts(struct idxd_device *idxd)
|
||||
}
|
||||
|
||||
idxd_unmask_error_interrupts(idxd);
|
||||
idxd_msix_perm_setup(idxd);
|
||||
return 0;
|
||||
|
||||
err_wq_irqs:
|
||||
@ -162,6 +163,7 @@ static int idxd_setup_interrupts(struct idxd_device *idxd)
|
||||
err_misc_irq:
|
||||
/* Disable error interrupt generation */
|
||||
idxd_mask_error_interrupts(idxd);
|
||||
idxd_msix_perm_clear(idxd);
|
||||
err_irq_entries:
|
||||
pci_free_irq_vectors(pdev);
|
||||
dev_err(dev, "No usable interrupts\n");
|
||||
@ -758,32 +760,40 @@ static void idxd_shutdown(struct pci_dev *pdev)
|
||||
for (i = 0; i < msixcnt; i++) {
|
||||
irq_entry = &idxd->irq_entries[i];
|
||||
synchronize_irq(irq_entry->vector);
|
||||
free_irq(irq_entry->vector, irq_entry);
|
||||
if (i == 0)
|
||||
continue;
|
||||
idxd_flush_pending_llist(irq_entry);
|
||||
idxd_flush_work_list(irq_entry);
|
||||
}
|
||||
|
||||
idxd_msix_perm_clear(idxd);
|
||||
idxd_release_int_handles(idxd);
|
||||
pci_free_irq_vectors(pdev);
|
||||
pci_iounmap(pdev, idxd->reg_base);
|
||||
pci_disable_device(pdev);
|
||||
destroy_workqueue(idxd->wq);
|
||||
flush_workqueue(idxd->wq);
|
||||
}
|
||||
|
||||
static void idxd_remove(struct pci_dev *pdev)
|
||||
{
|
||||
struct idxd_device *idxd = pci_get_drvdata(pdev);
|
||||
struct idxd_irq_entry *irq_entry;
|
||||
int msixcnt = pci_msix_vec_count(pdev);
|
||||
int i;
|
||||
|
||||
dev_dbg(&pdev->dev, "%s called\n", __func__);
|
||||
idxd_shutdown(pdev);
|
||||
if (device_pasid_enabled(idxd))
|
||||
idxd_disable_system_pasid(idxd);
|
||||
idxd_unregister_devices(idxd);
|
||||
perfmon_pmu_remove(idxd);
|
||||
|
||||
for (i = 0; i < msixcnt; i++) {
|
||||
irq_entry = &idxd->irq_entries[i];
|
||||
free_irq(irq_entry->vector, irq_entry);
|
||||
}
|
||||
idxd_msix_perm_clear(idxd);
|
||||
idxd_release_int_handles(idxd);
|
||||
pci_free_irq_vectors(pdev);
|
||||
pci_iounmap(pdev, idxd->reg_base);
|
||||
iommu_dev_disable_feature(&pdev->dev, IOMMU_DEV_FEAT_SVA);
|
||||
pci_disable_device(pdev);
|
||||
destroy_workqueue(idxd->wq);
|
||||
perfmon_pmu_remove(idxd);
|
||||
device_unregister(&idxd->conf_dev);
|
||||
}
|
||||
|
||||
static struct pci_driver idxd_pci_driver = {
|
||||
|
@ -245,12 +245,6 @@ static inline bool match_fault(struct idxd_desc *desc, u64 fault_addr)
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline void complete_desc(struct idxd_desc *desc, enum idxd_complete_type reason)
|
||||
{
|
||||
idxd_dma_complete_txd(desc, reason);
|
||||
idxd_free_desc(desc->wq, desc);
|
||||
}
|
||||
|
||||
static int irq_process_pending_llist(struct idxd_irq_entry *irq_entry,
|
||||
enum irq_work_type wtype,
|
||||
int *processed, u64 data)
|
||||
@ -272,8 +266,16 @@ static int irq_process_pending_llist(struct idxd_irq_entry *irq_entry,
|
||||
reason = IDXD_COMPLETE_DEV_FAIL;
|
||||
|
||||
llist_for_each_entry_safe(desc, t, head, llnode) {
|
||||
if (desc->completion->status) {
|
||||
if ((desc->completion->status & DSA_COMP_STATUS_MASK) != DSA_COMP_SUCCESS)
|
||||
u8 status = desc->completion->status & DSA_COMP_STATUS_MASK;
|
||||
|
||||
if (status) {
|
||||
if (unlikely(status == IDXD_COMP_DESC_ABORT)) {
|
||||
complete_desc(desc, IDXD_COMPLETE_ABORT);
|
||||
(*processed)++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (unlikely(status != DSA_COMP_SUCCESS))
|
||||
match_fault(desc, data);
|
||||
complete_desc(desc, reason);
|
||||
(*processed)++;
|
||||
@ -329,7 +331,14 @@ static int irq_process_work_list(struct idxd_irq_entry *irq_entry,
|
||||
spin_unlock_irqrestore(&irq_entry->list_lock, flags);
|
||||
|
||||
list_for_each_entry(desc, &flist, list) {
|
||||
if ((desc->completion->status & DSA_COMP_STATUS_MASK) != DSA_COMP_SUCCESS)
|
||||
u8 status = desc->completion->status & DSA_COMP_STATUS_MASK;
|
||||
|
||||
if (unlikely(status == IDXD_COMP_DESC_ABORT)) {
|
||||
complete_desc(desc, IDXD_COMPLETE_ABORT);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (unlikely(status != DSA_COMP_SUCCESS))
|
||||
match_fault(desc, data);
|
||||
complete_desc(desc, reason);
|
||||
}
|
||||
|
@ -25,11 +25,10 @@ static struct idxd_desc *__get_desc(struct idxd_wq *wq, int idx, int cpu)
|
||||
* Descriptor completion vectors are 1...N for MSIX. We will round
|
||||
* robin through the N vectors.
|
||||
*/
|
||||
wq->vec_ptr = (wq->vec_ptr % idxd->num_wq_irqs) + 1;
|
||||
wq->vec_ptr = desc->vector = (wq->vec_ptr % idxd->num_wq_irqs) + 1;
|
||||
if (!idxd->int_handles) {
|
||||
desc->hw->int_handle = wq->vec_ptr;
|
||||
} else {
|
||||
desc->vector = wq->vec_ptr;
|
||||
/*
|
||||
* int_handles are only for descriptor completion. However for device
|
||||
* MSIX enumeration, vec 0 is used for misc interrupts. Therefore even
|
||||
@ -88,9 +87,64 @@ void idxd_free_desc(struct idxd_wq *wq, struct idxd_desc *desc)
|
||||
sbitmap_queue_clear(&wq->sbq, desc->id, cpu);
|
||||
}
|
||||
|
||||
static struct idxd_desc *list_abort_desc(struct idxd_wq *wq, struct idxd_irq_entry *ie,
|
||||
struct idxd_desc *desc)
|
||||
{
|
||||
struct idxd_desc *d, *n;
|
||||
|
||||
lockdep_assert_held(&ie->list_lock);
|
||||
list_for_each_entry_safe(d, n, &ie->work_list, list) {
|
||||
if (d == desc) {
|
||||
list_del(&d->list);
|
||||
return d;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* At this point, the desc needs to be aborted is held by the completion
|
||||
* handler where it has taken it off the pending list but has not added to the
|
||||
* work list. It will be cleaned up by the interrupt handler when it sees the
|
||||
* IDXD_COMP_DESC_ABORT for completion status.
|
||||
*/
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void llist_abort_desc(struct idxd_wq *wq, struct idxd_irq_entry *ie,
|
||||
struct idxd_desc *desc)
|
||||
{
|
||||
struct idxd_desc *d, *t, *found = NULL;
|
||||
struct llist_node *head;
|
||||
unsigned long flags;
|
||||
|
||||
desc->completion->status = IDXD_COMP_DESC_ABORT;
|
||||
/*
|
||||
* Grab the list lock so it will block the irq thread handler. This allows the
|
||||
* abort code to locate the descriptor need to be aborted.
|
||||
*/
|
||||
spin_lock_irqsave(&ie->list_lock, flags);
|
||||
head = llist_del_all(&ie->pending_llist);
|
||||
if (head) {
|
||||
llist_for_each_entry_safe(d, t, head, llnode) {
|
||||
if (d == desc) {
|
||||
found = desc;
|
||||
continue;
|
||||
}
|
||||
list_add_tail(&desc->list, &ie->work_list);
|
||||
}
|
||||
}
|
||||
|
||||
if (!found)
|
||||
found = list_abort_desc(wq, ie, desc);
|
||||
spin_unlock_irqrestore(&ie->list_lock, flags);
|
||||
|
||||
if (found)
|
||||
complete_desc(found, IDXD_COMPLETE_ABORT);
|
||||
}
|
||||
|
||||
int idxd_submit_desc(struct idxd_wq *wq, struct idxd_desc *desc)
|
||||
{
|
||||
struct idxd_device *idxd = wq->idxd;
|
||||
struct idxd_irq_entry *ie = NULL;
|
||||
void __iomem *portal;
|
||||
int rc;
|
||||
|
||||
@ -108,6 +162,16 @@ int idxd_submit_desc(struct idxd_wq *wq, struct idxd_desc *desc)
|
||||
* even on UP because the recipient is a device.
|
||||
*/
|
||||
wmb();
|
||||
|
||||
/*
|
||||
* Pending the descriptor to the lockless list for the irq_entry
|
||||
* that we designated the descriptor to.
|
||||
*/
|
||||
if (desc->hw->flags & IDXD_OP_FLAG_RCI) {
|
||||
ie = &idxd->irq_entries[desc->vector];
|
||||
llist_add(&desc->llnode, &ie->pending_llist);
|
||||
}
|
||||
|
||||
if (wq_dedicated(wq)) {
|
||||
iosubmit_cmds512(portal, desc->hw, 1);
|
||||
} else {
|
||||
@ -118,29 +182,13 @@ int idxd_submit_desc(struct idxd_wq *wq, struct idxd_desc *desc)
|
||||
* device is not accepting descriptor at all.
|
||||
*/
|
||||
rc = enqcmds(portal, desc->hw);
|
||||
if (rc < 0)
|
||||
if (rc < 0) {
|
||||
if (ie)
|
||||
llist_abort_desc(wq, ie, desc);
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
||||
percpu_ref_put(&wq->wq_active);
|
||||
|
||||
/*
|
||||
* Pending the descriptor to the lockless list for the irq_entry
|
||||
* that we designated the descriptor to.
|
||||
*/
|
||||
if (desc->hw->flags & IDXD_OP_FLAG_RCI) {
|
||||
int vec;
|
||||
|
||||
/*
|
||||
* If the driver is on host kernel, it would be the value
|
||||
* assigned to interrupt handle, which is index for MSIX
|
||||
* vector. If it's guest then can't use the int_handle since
|
||||
* that is the index to IMS for the entire device. The guest
|
||||
* device local index will be used.
|
||||
*/
|
||||
vec = !idxd->int_handles ? desc->hw->int_handle : desc->vector;
|
||||
llist_add(&desc->llnode, &idxd->irq_entries[vec].pending_llist);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1744,8 +1744,6 @@ void idxd_unregister_devices(struct idxd_device *idxd)
|
||||
|
||||
device_unregister(&group->conf_dev);
|
||||
}
|
||||
|
||||
device_unregister(&idxd->conf_dev);
|
||||
}
|
||||
|
||||
int idxd_register_bus_type(void)
|
||||
|
@ -812,6 +812,8 @@ static struct dma_async_tx_descriptor *imxdma_prep_slave_sg(
|
||||
dma_length += sg_dma_len(sg);
|
||||
}
|
||||
|
||||
imxdma_config_write(chan, &imxdmac->config, direction);
|
||||
|
||||
switch (imxdmac->word_size) {
|
||||
case DMA_SLAVE_BUSWIDTH_4_BYTES:
|
||||
if (sg_dma_len(sgl) & 3 || sgl->dma_address & 3)
|
||||
|
@ -67,8 +67,12 @@ static struct dma_chan *of_dma_router_xlate(struct of_phandle_args *dma_spec,
|
||||
return NULL;
|
||||
|
||||
ofdma_target = of_dma_find_controller(&dma_spec_target);
|
||||
if (!ofdma_target)
|
||||
return NULL;
|
||||
if (!ofdma_target) {
|
||||
ofdma->dma_router->route_free(ofdma->dma_router->dev,
|
||||
route_data);
|
||||
chan = ERR_PTR(-EPROBE_DEFER);
|
||||
goto err;
|
||||
}
|
||||
|
||||
chan = ofdma_target->of_dma_xlate(&dma_spec_target, ofdma_target);
|
||||
if (IS_ERR_OR_NULL(chan)) {
|
||||
@ -89,6 +93,7 @@ static struct dma_chan *of_dma_router_xlate(struct of_phandle_args *dma_spec,
|
||||
}
|
||||
}
|
||||
|
||||
err:
|
||||
/*
|
||||
* Need to put the node back since the ofdma->of_dma_route_allocate
|
||||
* has taken it for generating the new, translated dma_spec
|
||||
|
@ -855,8 +855,8 @@ static int usb_dmac_probe(struct platform_device *pdev)
|
||||
|
||||
error:
|
||||
of_dma_controller_free(pdev->dev.of_node);
|
||||
pm_runtime_put(&pdev->dev);
|
||||
error_pm:
|
||||
pm_runtime_put(&pdev->dev);
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
return ret;
|
||||
}
|
||||
|
@ -1200,7 +1200,7 @@ static int stm32_dma_alloc_chan_resources(struct dma_chan *c)
|
||||
|
||||
chan->config_init = false;
|
||||
|
||||
ret = pm_runtime_get_sync(dmadev->ddev.dev);
|
||||
ret = pm_runtime_resume_and_get(dmadev->ddev.dev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
@ -1470,7 +1470,7 @@ static int stm32_dma_suspend(struct device *dev)
|
||||
struct stm32_dma_device *dmadev = dev_get_drvdata(dev);
|
||||
int id, ret, scr;
|
||||
|
||||
ret = pm_runtime_get_sync(dev);
|
||||
ret = pm_runtime_resume_and_get(dev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
@ -137,7 +137,7 @@ static void *stm32_dmamux_route_allocate(struct of_phandle_args *dma_spec,
|
||||
|
||||
/* Set dma request */
|
||||
spin_lock_irqsave(&dmamux->lock, flags);
|
||||
ret = pm_runtime_get_sync(&pdev->dev);
|
||||
ret = pm_runtime_resume_and_get(&pdev->dev);
|
||||
if (ret < 0) {
|
||||
spin_unlock_irqrestore(&dmamux->lock, flags);
|
||||
goto error;
|
||||
@ -336,7 +336,7 @@ static int stm32_dmamux_suspend(struct device *dev)
|
||||
struct stm32_dmamux_data *stm32_dmamux = platform_get_drvdata(pdev);
|
||||
int i, ret;
|
||||
|
||||
ret = pm_runtime_get_sync(dev);
|
||||
ret = pm_runtime_resume_and_get(dev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
@ -361,7 +361,7 @@ static int stm32_dmamux_resume(struct device *dev)
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
ret = pm_runtime_get_sync(dev);
|
||||
ret = pm_runtime_resume_and_get(dev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
@ -209,8 +209,8 @@ static int uniphier_xdmac_chan_stop(struct uniphier_xdmac_chan *xc)
|
||||
writel(0, xc->reg_ch_base + XDMAC_TSS);
|
||||
|
||||
/* wait until transfer is stopped */
|
||||
return readl_poll_timeout(xc->reg_ch_base + XDMAC_STAT, val,
|
||||
!(val & XDMAC_STAT_TENF), 100, 1000);
|
||||
return readl_poll_timeout_atomic(xc->reg_ch_base + XDMAC_STAT, val,
|
||||
!(val & XDMAC_STAT_TENF), 100, 1000);
|
||||
}
|
||||
|
||||
/* xc->vc.lock must be held by caller */
|
||||
|
@ -394,6 +394,7 @@ struct xilinx_dma_tx_descriptor {
|
||||
* @genlock: Support genlock mode
|
||||
* @err: Channel has errors
|
||||
* @idle: Check for channel idle
|
||||
* @terminating: Check for channel being synchronized by user
|
||||
* @tasklet: Cleanup work after irq
|
||||
* @config: Device configuration info
|
||||
* @flush_on_fsync: Flush on Frame sync
|
||||
@ -431,6 +432,7 @@ struct xilinx_dma_chan {
|
||||
bool genlock;
|
||||
bool err;
|
||||
bool idle;
|
||||
bool terminating;
|
||||
struct tasklet_struct tasklet;
|
||||
struct xilinx_vdma_config config;
|
||||
bool flush_on_fsync;
|
||||
@ -1049,6 +1051,13 @@ static void xilinx_dma_chan_desc_cleanup(struct xilinx_dma_chan *chan)
|
||||
/* Run any dependencies, then free the descriptor */
|
||||
dma_run_dependencies(&desc->async_tx);
|
||||
xilinx_dma_free_tx_descriptor(chan, desc);
|
||||
|
||||
/*
|
||||
* While we ran a callback the user called a terminate function,
|
||||
* which takes care of cleaning up any remaining descriptors
|
||||
*/
|
||||
if (chan->terminating)
|
||||
break;
|
||||
}
|
||||
|
||||
spin_unlock_irqrestore(&chan->lock, flags);
|
||||
@ -1965,6 +1974,8 @@ static dma_cookie_t xilinx_dma_tx_submit(struct dma_async_tx_descriptor *tx)
|
||||
if (desc->cyclic)
|
||||
chan->cyclic = true;
|
||||
|
||||
chan->terminating = false;
|
||||
|
||||
spin_unlock_irqrestore(&chan->lock, flags);
|
||||
|
||||
return cookie;
|
||||
@ -2436,6 +2447,7 @@ static int xilinx_dma_terminate_all(struct dma_chan *dchan)
|
||||
|
||||
xilinx_dma_chan_reset(chan);
|
||||
/* Remove and free all of the descriptors in the lists */
|
||||
chan->terminating = true;
|
||||
xilinx_dma_free_descriptors(chan);
|
||||
chan->idle = true;
|
||||
|
||||
|
@ -212,10 +212,9 @@ static int tee_bnxt_fw_probe(struct device *dev)
|
||||
|
||||
pvt_data.dev = dev;
|
||||
|
||||
fw_shm_pool = tee_shm_alloc(pvt_data.ctx, MAX_SHM_MEM_SZ,
|
||||
TEE_SHM_MAPPED | TEE_SHM_DMA_BUF);
|
||||
fw_shm_pool = tee_shm_alloc_kernel_buf(pvt_data.ctx, MAX_SHM_MEM_SZ);
|
||||
if (IS_ERR(fw_shm_pool)) {
|
||||
dev_err(pvt_data.dev, "tee_shm_alloc failed\n");
|
||||
dev_err(pvt_data.dev, "tee_shm_alloc_kernel_buf failed\n");
|
||||
err = PTR_ERR(fw_shm_pool);
|
||||
goto out_sess;
|
||||
}
|
||||
@ -242,6 +241,14 @@ static int tee_bnxt_fw_remove(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void tee_bnxt_fw_shutdown(struct device *dev)
|
||||
{
|
||||
tee_shm_free(pvt_data.fw_shm_pool);
|
||||
tee_client_close_session(pvt_data.ctx, pvt_data.session_id);
|
||||
tee_client_close_context(pvt_data.ctx);
|
||||
pvt_data.ctx = NULL;
|
||||
}
|
||||
|
||||
static const struct tee_client_device_id tee_bnxt_fw_id_table[] = {
|
||||
{UUID_INIT(0x6272636D, 0x2019, 0x0716,
|
||||
0x42, 0x43, 0x4D, 0x5F, 0x53, 0x43, 0x48, 0x49)},
|
||||
@ -257,6 +264,7 @@ static struct tee_client_driver tee_bnxt_fw_driver = {
|
||||
.bus = &tee_bus_type,
|
||||
.probe = tee_bnxt_fw_probe,
|
||||
.remove = tee_bnxt_fw_remove,
|
||||
.shutdown = tee_bnxt_fw_shutdown,
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -953,6 +953,8 @@ static int fme_perf_offline_cpu(unsigned int cpu, struct hlist_node *node)
|
||||
return 0;
|
||||
|
||||
priv->cpu = target;
|
||||
perf_pmu_migrate_context(&priv->pmu, cpu, target);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -405,7 +405,7 @@ static int mpc8xxx_probe(struct platform_device *pdev)
|
||||
|
||||
ret = devm_request_irq(&pdev->dev, mpc8xxx_gc->irqn,
|
||||
mpc8xxx_gpio_irq_cascade,
|
||||
IRQF_SHARED, "gpio-cascade",
|
||||
IRQF_NO_THREAD | IRQF_SHARED, "gpio-cascade",
|
||||
mpc8xxx_gc);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev,
|
||||
|
@ -238,8 +238,8 @@ static int tqmx86_gpio_probe(struct platform_device *pdev)
|
||||
struct resource *res;
|
||||
int ret, irq;
|
||||
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (irq < 0)
|
||||
irq = platform_get_irq_optional(pdev, 0);
|
||||
if (irq < 0 && irq != -ENXIO)
|
||||
return irq;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_IO, 0);
|
||||
@ -278,7 +278,7 @@ static int tqmx86_gpio_probe(struct platform_device *pdev)
|
||||
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
|
||||
if (irq) {
|
||||
if (irq > 0) {
|
||||
struct irq_chip *irq_chip = &gpio->irq_chip;
|
||||
u8 irq_status;
|
||||
|
||||
|
@ -1040,7 +1040,7 @@ void amdgpu_acpi_detect(void)
|
||||
*/
|
||||
bool amdgpu_acpi_is_s0ix_supported(struct amdgpu_device *adev)
|
||||
{
|
||||
#if defined(CONFIG_AMD_PMC) || defined(CONFIG_AMD_PMC_MODULE)
|
||||
#if IS_ENABLED(CONFIG_AMD_PMC) && IS_ENABLED(CONFIG_PM_SLEEP)
|
||||
if (acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0) {
|
||||
if (adev->flags & AMD_IS_APU)
|
||||
return pm_suspend_target_state == PM_SUSPEND_TO_IDLE;
|
||||
|
@ -1213,6 +1213,13 @@ static const struct pci_device_id pciidlist[] = {
|
||||
{0x1002, 0x740F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ALDEBARAN|AMD_EXP_HW_SUPPORT},
|
||||
{0x1002, 0x7410, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ALDEBARAN|AMD_EXP_HW_SUPPORT},
|
||||
|
||||
/* BEIGE_GOBY */
|
||||
{0x1002, 0x7420, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BEIGE_GOBY},
|
||||
{0x1002, 0x7421, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BEIGE_GOBY},
|
||||
{0x1002, 0x7422, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BEIGE_GOBY},
|
||||
{0x1002, 0x7423, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BEIGE_GOBY},
|
||||
{0x1002, 0x743F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BEIGE_GOBY},
|
||||
|
||||
{0, 0, 0}
|
||||
};
|
||||
|
||||
|
@ -54,11 +54,12 @@ static inline void amdgpu_res_first(struct ttm_resource *res,
|
||||
{
|
||||
struct drm_mm_node *node;
|
||||
|
||||
if (!res) {
|
||||
if (!res || res->mem_type == TTM_PL_SYSTEM) {
|
||||
cur->start = start;
|
||||
cur->size = size;
|
||||
cur->remaining = size;
|
||||
cur->node = NULL;
|
||||
WARN_ON(res && start + size > res->num_pages << PAGE_SHIFT);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1295,6 +1295,16 @@ static bool is_raven_kicker(struct amdgpu_device *adev)
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool check_if_enlarge_doorbell_range(struct amdgpu_device *adev)
|
||||
{
|
||||
if ((adev->asic_type == CHIP_RENOIR) &&
|
||||
(adev->gfx.me_fw_version >= 0x000000a5) &&
|
||||
(adev->gfx.me_feature_version >= 52))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
static void gfx_v9_0_check_if_need_gfxoff(struct amdgpu_device *adev)
|
||||
{
|
||||
if (gfx_v9_0_should_disable_gfxoff(adev->pdev))
|
||||
@ -3675,7 +3685,16 @@ static int gfx_v9_0_kiq_init_register(struct amdgpu_ring *ring)
|
||||
if (ring->use_doorbell) {
|
||||
WREG32_SOC15(GC, 0, mmCP_MEC_DOORBELL_RANGE_LOWER,
|
||||
(adev->doorbell_index.kiq * 2) << 2);
|
||||
WREG32_SOC15(GC, 0, mmCP_MEC_DOORBELL_RANGE_UPPER,
|
||||
/* If GC has entered CGPG, ringing doorbell > first page
|
||||
* doesn't wakeup GC. Enlarge CP_MEC_DOORBELL_RANGE_UPPER to
|
||||
* workaround this issue. And this change has to align with firmware
|
||||
* update.
|
||||
*/
|
||||
if (check_if_enlarge_doorbell_range(adev))
|
||||
WREG32_SOC15(GC, 0, mmCP_MEC_DOORBELL_RANGE_UPPER,
|
||||
(adev->doorbell.size - 4));
|
||||
else
|
||||
WREG32_SOC15(GC, 0, mmCP_MEC_DOORBELL_RANGE_UPPER,
|
||||
(adev->doorbell_index.userqueue_end * 2) << 2);
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user