Merge 1487b29030
("ACPI: processor: Fix evaluating _PDC method when running as Xen dom0") into android12-5.10-lts
Steps on the way to 5.10.180 Change-Id: I7ff36de2cd04657e3f9e7c688fe1555823564e10 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
commit
c83bfc082b
@ -414,8 +414,8 @@ pcie0: pci@40000000 {
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
|
||||
ranges = <0x81000000 0 0x40200000 0x40200000 0 0x00100000>,
|
||||
<0x82000000 0 0x40300000 0x40300000 0 0x00d00000>;
|
||||
ranges = <0x81000000 0x0 0x00000000 0x40200000 0x0 0x00100000>,
|
||||
<0x82000000 0x0 0x40300000 0x40300000 0x0 0x00d00000>;
|
||||
|
||||
interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "msi";
|
||||
|
@ -465,8 +465,8 @@ pcie0: pci@1b500000 {
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
|
||||
ranges = <0x81000000 0 0x0fe00000 0x0fe00000 0 0x00100000 /* downstream I/O */
|
||||
0x82000000 0 0x08000000 0x08000000 0 0x07e00000>; /* non-prefetchable memory */
|
||||
ranges = <0x81000000 0x0 0x00000000 0x0fe00000 0x0 0x00010000 /* I/O */
|
||||
0x82000000 0x0 0x08000000 0x08000000 0x0 0x07e00000>; /* MEM */
|
||||
|
||||
interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "msi";
|
||||
@ -516,8 +516,8 @@ pcie1: pci@1b700000 {
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
|
||||
ranges = <0x81000000 0 0x31e00000 0x31e00000 0 0x00100000 /* downstream I/O */
|
||||
0x82000000 0 0x2e000000 0x2e000000 0 0x03e00000>; /* non-prefetchable memory */
|
||||
ranges = <0x81000000 0x0 0x00000000 0x31e00000 0x0 0x00010000 /* I/O */
|
||||
0x82000000 0x0 0x2e000000 0x2e000000 0x0 0x03e00000>; /* MEM */
|
||||
|
||||
interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "msi";
|
||||
@ -567,8 +567,8 @@ pcie2: pci@1b900000 {
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
|
||||
ranges = <0x81000000 0 0x35e00000 0x35e00000 0 0x00100000 /* downstream I/O */
|
||||
0x82000000 0 0x32000000 0x32000000 0 0x03e00000>; /* non-prefetchable memory */
|
||||
ranges = <0x81000000 0x0 0x00000000 0x35e00000 0x0 0x00010000 /* I/O */
|
||||
0x82000000 0x0 0x32000000 0x32000000 0x0 0x03e00000>; /* MEM */
|
||||
|
||||
interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "msi";
|
||||
|
@ -607,10 +607,8 @@ pcie1: pci@10000000 {
|
||||
phys = <&pcie_phy1>;
|
||||
phy-names = "pciephy";
|
||||
|
||||
ranges = <0x81000000 0 0x10200000 0x10200000
|
||||
0 0x10000>, /* downstream I/O */
|
||||
<0x82000000 0 0x10220000 0x10220000
|
||||
0 0xfde0000>; /* non-prefetchable memory */
|
||||
ranges = <0x81000000 0x0 0x00000000 0x10200000 0x0 0x10000>, /* I/O */
|
||||
<0x82000000 0x0 0x10220000 0x10220000 0x0 0xfde0000>; /* MEM */
|
||||
|
||||
interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "msi";
|
||||
@ -671,10 +669,8 @@ pcie0: pci@20000000 {
|
||||
phys = <&pcie_phy0>;
|
||||
phy-names = "pciephy";
|
||||
|
||||
ranges = <0x81000000 0 0x20200000 0x20200000
|
||||
0 0x10000>, /* downstream I/O */
|
||||
<0x82000000 0 0x20220000 0x20220000
|
||||
0 0xfde0000>; /* non-prefetchable memory */
|
||||
ranges = <0x81000000 0x0 0x00000000 0x20200000 0x0 0x10000>, /* I/O */
|
||||
<0x82000000 0x0 0x20220000 0x20220000 0x0 0xfde0000>; /* MEM */
|
||||
|
||||
interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "msi";
|
||||
|
@ -744,8 +744,8 @@ pcie0: pcie@600000 {
|
||||
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges = <0x01000000 0x0 0x0c200000 0x0c200000 0x0 0x100000>,
|
||||
<0x02000000 0x0 0x0c300000 0x0c300000 0x0 0xd00000>;
|
||||
ranges = <0x01000000 0x0 0x00000000 0x0c200000 0x0 0x100000>,
|
||||
<0x02000000 0x0 0x0c300000 0x0c300000 0x0 0xd00000>;
|
||||
|
||||
interrupts = <GIC_SPI 405 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "msi";
|
||||
@ -796,8 +796,8 @@ pcie1: pcie@608000 {
|
||||
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges = <0x01000000 0x0 0x0d200000 0x0d200000 0x0 0x100000>,
|
||||
<0x02000000 0x0 0x0d300000 0x0d300000 0x0 0xd00000>;
|
||||
ranges = <0x01000000 0x0 0x00000000 0x0d200000 0x0 0x100000>,
|
||||
<0x02000000 0x0 0x0d300000 0x0d300000 0x0 0xd00000>;
|
||||
|
||||
interrupts = <GIC_SPI 413 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "msi";
|
||||
@ -845,8 +845,8 @@ pcie2: pcie@610000 {
|
||||
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges = <0x01000000 0x0 0x0e200000 0x0e200000 0x0 0x100000>,
|
||||
<0x02000000 0x0 0x0e300000 0x0e300000 0x0 0x1d00000>;
|
||||
ranges = <0x01000000 0x0 0x00000000 0x0e200000 0x0 0x100000>,
|
||||
<0x02000000 0x0 0x0e300000 0x0e300000 0x0 0x1d00000>;
|
||||
|
||||
device_type = "pci";
|
||||
|
||||
|
@ -942,7 +942,7 @@ pcie0: pci@1c00000 {
|
||||
phys = <&pciephy>;
|
||||
phy-names = "pciephy";
|
||||
|
||||
ranges = <0x01000000 0x0 0x1b200000 0x1b200000 0x0 0x100000>,
|
||||
ranges = <0x01000000 0x0 0x00000000 0x1b200000 0x0 0x100000>,
|
||||
<0x02000000 0x0 0x1b300000 0x1b300000 0x0 0xd00000>;
|
||||
|
||||
#interrupt-cells = <1>;
|
||||
@ -1187,7 +1187,7 @@ stm: stm@6002000 {
|
||||
compatible = "arm,coresight-stm", "arm,primecell";
|
||||
reg = <0x06002000 0x1000>,
|
||||
<0x16280000 0x180000>;
|
||||
reg-names = "stm-base", "stm-data-base";
|
||||
reg-names = "stm-base", "stm-stimulus-base";
|
||||
status = "disabled";
|
||||
|
||||
clocks = <&rpmcc RPM_SMD_QDSS_CLK>, <&rpmcc RPM_SMD_QDSS_A_CLK>;
|
||||
|
@ -196,8 +196,8 @@ CPU0: cpu@0 {
|
||||
cpu-idle-states = <&LITTLE_CPU_SLEEP_0
|
||||
&LITTLE_CPU_SLEEP_1
|
||||
&CLUSTER_SLEEP_0>;
|
||||
capacity-dmips-mhz = <607>;
|
||||
dynamic-power-coefficient = <100>;
|
||||
capacity-dmips-mhz = <611>;
|
||||
dynamic-power-coefficient = <290>;
|
||||
qcom,freq-domain = <&cpufreq_hw 0>;
|
||||
operating-points-v2 = <&cpu0_opp_table>;
|
||||
interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,
|
||||
@ -221,8 +221,8 @@ CPU1: cpu@100 {
|
||||
cpu-idle-states = <&LITTLE_CPU_SLEEP_0
|
||||
&LITTLE_CPU_SLEEP_1
|
||||
&CLUSTER_SLEEP_0>;
|
||||
capacity-dmips-mhz = <607>;
|
||||
dynamic-power-coefficient = <100>;
|
||||
capacity-dmips-mhz = <611>;
|
||||
dynamic-power-coefficient = <290>;
|
||||
qcom,freq-domain = <&cpufreq_hw 0>;
|
||||
operating-points-v2 = <&cpu0_opp_table>;
|
||||
interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,
|
||||
@ -243,8 +243,8 @@ CPU2: cpu@200 {
|
||||
cpu-idle-states = <&LITTLE_CPU_SLEEP_0
|
||||
&LITTLE_CPU_SLEEP_1
|
||||
&CLUSTER_SLEEP_0>;
|
||||
capacity-dmips-mhz = <607>;
|
||||
dynamic-power-coefficient = <100>;
|
||||
capacity-dmips-mhz = <611>;
|
||||
dynamic-power-coefficient = <290>;
|
||||
qcom,freq-domain = <&cpufreq_hw 0>;
|
||||
operating-points-v2 = <&cpu0_opp_table>;
|
||||
interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,
|
||||
@ -265,8 +265,8 @@ CPU3: cpu@300 {
|
||||
cpu-idle-states = <&LITTLE_CPU_SLEEP_0
|
||||
&LITTLE_CPU_SLEEP_1
|
||||
&CLUSTER_SLEEP_0>;
|
||||
capacity-dmips-mhz = <607>;
|
||||
dynamic-power-coefficient = <100>;
|
||||
capacity-dmips-mhz = <611>;
|
||||
dynamic-power-coefficient = <290>;
|
||||
qcom,freq-domain = <&cpufreq_hw 0>;
|
||||
operating-points-v2 = <&cpu0_opp_table>;
|
||||
interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,
|
||||
@ -288,7 +288,7 @@ CPU4: cpu@400 {
|
||||
cpu-idle-states = <&BIG_CPU_SLEEP_0
|
||||
&BIG_CPU_SLEEP_1
|
||||
&CLUSTER_SLEEP_0>;
|
||||
dynamic-power-coefficient = <396>;
|
||||
dynamic-power-coefficient = <442>;
|
||||
qcom,freq-domain = <&cpufreq_hw 1>;
|
||||
operating-points-v2 = <&cpu4_opp_table>;
|
||||
interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,
|
||||
@ -310,7 +310,7 @@ CPU5: cpu@500 {
|
||||
cpu-idle-states = <&BIG_CPU_SLEEP_0
|
||||
&BIG_CPU_SLEEP_1
|
||||
&CLUSTER_SLEEP_0>;
|
||||
dynamic-power-coefficient = <396>;
|
||||
dynamic-power-coefficient = <442>;
|
||||
qcom,freq-domain = <&cpufreq_hw 1>;
|
||||
operating-points-v2 = <&cpu4_opp_table>;
|
||||
interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,
|
||||
@ -332,7 +332,7 @@ CPU6: cpu@600 {
|
||||
cpu-idle-states = <&BIG_CPU_SLEEP_0
|
||||
&BIG_CPU_SLEEP_1
|
||||
&CLUSTER_SLEEP_0>;
|
||||
dynamic-power-coefficient = <396>;
|
||||
dynamic-power-coefficient = <442>;
|
||||
qcom,freq-domain = <&cpufreq_hw 1>;
|
||||
operating-points-v2 = <&cpu4_opp_table>;
|
||||
interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,
|
||||
@ -354,7 +354,7 @@ CPU7: cpu@700 {
|
||||
cpu-idle-states = <&BIG_CPU_SLEEP_0
|
||||
&BIG_CPU_SLEEP_1
|
||||
&CLUSTER_SLEEP_0>;
|
||||
dynamic-power-coefficient = <396>;
|
||||
dynamic-power-coefficient = <442>;
|
||||
qcom,freq-domain = <&cpufreq_hw 1>;
|
||||
operating-points-v2 = <&cpu4_opp_table>;
|
||||
interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,
|
||||
@ -1816,8 +1816,8 @@ pcie0: pci@1c00000 {
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
|
||||
ranges = <0x01000000 0x0 0x60200000 0 0x60200000 0x0 0x100000>,
|
||||
<0x02000000 0x0 0x60300000 0 0x60300000 0x0 0xd00000>;
|
||||
ranges = <0x01000000 0x0 0x00000000 0x0 0x60200000 0x0 0x100000>,
|
||||
<0x02000000 0x0 0x60300000 0x0 0x60300000 0x0 0xd00000>;
|
||||
|
||||
interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "msi";
|
||||
@ -1920,7 +1920,7 @@ pcie1: pci@1c08000 {
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
|
||||
ranges = <0x01000000 0x0 0x40200000 0x0 0x40200000 0x0 0x100000>,
|
||||
ranges = <0x01000000 0x0 0x00000000 0x0 0x40200000 0x0 0x100000>,
|
||||
<0x02000000 0x0 0x40300000 0x0 0x40300000 0x0 0x1fd00000>;
|
||||
|
||||
interrupts = <GIC_SPI 307 IRQ_TYPE_EDGE_RISING>;
|
||||
|
@ -49,17 +49,14 @@ cluster1_opp: opp_table10 {
|
||||
opp-shared;
|
||||
opp-800000000 {
|
||||
opp-hz = /bits/ 64 <800000000>;
|
||||
opp-microvolt = <820000>;
|
||||
clock-latency-ns = <300000>;
|
||||
};
|
||||
opp-1000000000 {
|
||||
opp-hz = /bits/ 64 <1000000000>;
|
||||
opp-microvolt = <820000>;
|
||||
clock-latency-ns = <300000>;
|
||||
};
|
||||
opp-1200000000 {
|
||||
opp-hz = /bits/ 64 <1200000000>;
|
||||
opp-microvolt = <820000>;
|
||||
clock-latency-ns = <300000>;
|
||||
opp-suspend;
|
||||
};
|
||||
|
@ -60,17 +60,14 @@ cluster1_opp: opp_table10 {
|
||||
opp-shared;
|
||||
opp-800000000 {
|
||||
opp-hz = /bits/ 64 <800000000>;
|
||||
opp-microvolt = <820000>;
|
||||
clock-latency-ns = <300000>;
|
||||
};
|
||||
opp-1000000000 {
|
||||
opp-hz = /bits/ 64 <1000000000>;
|
||||
opp-microvolt = <820000>;
|
||||
clock-latency-ns = <300000>;
|
||||
};
|
||||
opp-1200000000 {
|
||||
opp-hz = /bits/ 64 <1200000000>;
|
||||
opp-microvolt = <820000>;
|
||||
clock-latency-ns = <300000>;
|
||||
opp-suspend;
|
||||
};
|
||||
|
@ -197,10 +197,10 @@ static DEFINE_PER_CPU(struct threshold_bank **, threshold_banks);
|
||||
* A list of the banks enabled on each logical CPU. Controls which respective
|
||||
* descriptors to initialize later in mce_threshold_create_device().
|
||||
*/
|
||||
static DEFINE_PER_CPU(unsigned int, bank_map);
|
||||
static DEFINE_PER_CPU(u64, bank_map);
|
||||
|
||||
/* Map of banks that have more than MCA_MISC0 available. */
|
||||
static DEFINE_PER_CPU(u32, smca_misc_banks_map);
|
||||
static DEFINE_PER_CPU(u64, smca_misc_banks_map);
|
||||
|
||||
static void amd_threshold_interrupt(void);
|
||||
static void amd_deferred_error_interrupt(void);
|
||||
@ -229,7 +229,7 @@ static void smca_set_misc_banks_map(unsigned int bank, unsigned int cpu)
|
||||
return;
|
||||
|
||||
if (low & MASK_BLKPTR_LO)
|
||||
per_cpu(smca_misc_banks_map, cpu) |= BIT(bank);
|
||||
per_cpu(smca_misc_banks_map, cpu) |= BIT_ULL(bank);
|
||||
|
||||
}
|
||||
|
||||
@ -492,7 +492,7 @@ static u32 smca_get_block_address(unsigned int bank, unsigned int block,
|
||||
if (!block)
|
||||
return MSR_AMD64_SMCA_MCx_MISC(bank);
|
||||
|
||||
if (!(per_cpu(smca_misc_banks_map, cpu) & BIT(bank)))
|
||||
if (!(per_cpu(smca_misc_banks_map, cpu) & BIT_ULL(bank)))
|
||||
return 0;
|
||||
|
||||
return MSR_AMD64_SMCA_MCx_MISCy(bank, block - 1);
|
||||
@ -536,7 +536,7 @@ prepare_threshold_block(unsigned int bank, unsigned int block, u32 addr,
|
||||
int new;
|
||||
|
||||
if (!block)
|
||||
per_cpu(bank_map, cpu) |= (1 << bank);
|
||||
per_cpu(bank_map, cpu) |= BIT_ULL(bank);
|
||||
|
||||
memset(&b, 0, sizeof(b));
|
||||
b.cpu = cpu;
|
||||
@ -1048,7 +1048,7 @@ static void amd_threshold_interrupt(void)
|
||||
return;
|
||||
|
||||
for (bank = 0; bank < this_cpu_read(mce_num_banks); ++bank) {
|
||||
if (!(per_cpu(bank_map, cpu) & (1 << bank)))
|
||||
if (!(per_cpu(bank_map, cpu) & BIT_ULL(bank)))
|
||||
continue;
|
||||
|
||||
first_block = bp[bank]->blocks;
|
||||
@ -1525,7 +1525,7 @@ int mce_threshold_create_device(unsigned int cpu)
|
||||
return -ENOMEM;
|
||||
|
||||
for (bank = 0; bank < numbanks; ++bank) {
|
||||
if (!(this_cpu_read(bank_map) & (1 << bank)))
|
||||
if (!(this_cpu_read(bank_map) & BIT_ULL(bank)))
|
||||
continue;
|
||||
err = threshold_create_bank(bp, cpu, bank);
|
||||
if (err) {
|
||||
|
@ -14,6 +14,8 @@
|
||||
#include <linux/acpi.h>
|
||||
#include <acpi/processor.h>
|
||||
|
||||
#include <xen/xen.h>
|
||||
|
||||
#include "internal.h"
|
||||
|
||||
#define _COMPONENT ACPI_PROCESSOR_COMPONENT
|
||||
@ -50,6 +52,15 @@ static bool __init processor_physically_present(acpi_handle handle)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (xen_initial_domain())
|
||||
/*
|
||||
* When running as a Xen dom0 the number of processors Linux
|
||||
* sees can be different from the real number of processors on
|
||||
* the system, and we still need to execute _PDC for all of
|
||||
* them.
|
||||
*/
|
||||
return xen_processor_present(acpi_id);
|
||||
|
||||
type = (acpi_type == ACPI_TYPE_DEVICE) ? 1 : 0;
|
||||
cpuid = acpi_get_cpuid(handle, type, acpi_id);
|
||||
|
||||
|
@ -136,16 +136,27 @@ static bool check_locality(struct tpm_chip *chip, int l)
|
||||
return false;
|
||||
}
|
||||
|
||||
static int release_locality(struct tpm_chip *chip, int l)
|
||||
static int __tpm_tis_relinquish_locality(struct tpm_tis_data *priv, int l)
|
||||
{
|
||||
struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev);
|
||||
|
||||
tpm_tis_write8(priv, TPM_ACCESS(l), TPM_ACCESS_ACTIVE_LOCALITY);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int request_locality(struct tpm_chip *chip, int l)
|
||||
static int tpm_tis_relinquish_locality(struct tpm_chip *chip, int l)
|
||||
{
|
||||
struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev);
|
||||
|
||||
mutex_lock(&priv->locality_count_mutex);
|
||||
priv->locality_count--;
|
||||
if (priv->locality_count == 0)
|
||||
__tpm_tis_relinquish_locality(priv, l);
|
||||
mutex_unlock(&priv->locality_count_mutex);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __tpm_tis_request_locality(struct tpm_chip *chip, int l)
|
||||
{
|
||||
struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev);
|
||||
unsigned long stop, timeout;
|
||||
@ -186,6 +197,20 @@ static int request_locality(struct tpm_chip *chip, int l)
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int tpm_tis_request_locality(struct tpm_chip *chip, int l)
|
||||
{
|
||||
struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev);
|
||||
int ret = 0;
|
||||
|
||||
mutex_lock(&priv->locality_count_mutex);
|
||||
if (priv->locality_count == 0)
|
||||
ret = __tpm_tis_request_locality(chip, l);
|
||||
if (!ret)
|
||||
priv->locality_count++;
|
||||
mutex_unlock(&priv->locality_count_mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static u8 tpm_tis_status(struct tpm_chip *chip)
|
||||
{
|
||||
struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev);
|
||||
@ -638,7 +663,7 @@ static int probe_itpm(struct tpm_chip *chip)
|
||||
if (vendor != TPM_VID_INTEL)
|
||||
return 0;
|
||||
|
||||
if (request_locality(chip, 0) != 0)
|
||||
if (tpm_tis_request_locality(chip, 0) != 0)
|
||||
return -EBUSY;
|
||||
|
||||
rc = tpm_tis_send_data(chip, cmd_getticks, len);
|
||||
@ -659,7 +684,7 @@ static int probe_itpm(struct tpm_chip *chip)
|
||||
|
||||
out:
|
||||
tpm_tis_ready(chip);
|
||||
release_locality(chip, priv->locality);
|
||||
tpm_tis_relinquish_locality(chip, priv->locality);
|
||||
|
||||
return rc;
|
||||
}
|
||||
@ -714,25 +739,17 @@ static irqreturn_t tis_int_handler(int dummy, void *dev_id)
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static int tpm_tis_gen_interrupt(struct tpm_chip *chip)
|
||||
static void tpm_tis_gen_interrupt(struct tpm_chip *chip)
|
||||
{
|
||||
const char *desc = "attempting to generate an interrupt";
|
||||
u32 cap2;
|
||||
cap_t cap;
|
||||
int ret;
|
||||
|
||||
ret = request_locality(chip, 0);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
if (chip->flags & TPM_CHIP_FLAG_TPM2)
|
||||
ret = tpm2_get_tpm_pt(chip, 0x100, &cap2, desc);
|
||||
else
|
||||
ret = tpm1_getcap(chip, TPM_CAP_PROP_TIS_TIMEOUT, &cap, desc, 0);
|
||||
|
||||
release_locality(chip, 0);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Register the IRQ and issue a command that will cause an interrupt. If an
|
||||
@ -755,52 +772,55 @@ static int tpm_tis_probe_irq_single(struct tpm_chip *chip, u32 intmask,
|
||||
}
|
||||
priv->irq = irq;
|
||||
|
||||
rc = tpm_tis_read8(priv, TPM_INT_VECTOR(priv->locality),
|
||||
&original_int_vec);
|
||||
rc = tpm_tis_request_locality(chip, 0);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
rc = tpm_tis_read8(priv, TPM_INT_VECTOR(priv->locality),
|
||||
&original_int_vec);
|
||||
if (rc < 0) {
|
||||
tpm_tis_relinquish_locality(chip, priv->locality);
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = tpm_tis_write8(priv, TPM_INT_VECTOR(priv->locality), irq);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
goto restore_irqs;
|
||||
|
||||
rc = tpm_tis_read32(priv, TPM_INT_STATUS(priv->locality), &int_status);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
goto restore_irqs;
|
||||
|
||||
/* Clear all existing */
|
||||
rc = tpm_tis_write32(priv, TPM_INT_STATUS(priv->locality), int_status);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
goto restore_irqs;
|
||||
/* Turn on */
|
||||
rc = tpm_tis_write32(priv, TPM_INT_ENABLE(priv->locality),
|
||||
intmask | TPM_GLOBAL_INT_ENABLE);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
goto restore_irqs;
|
||||
|
||||
priv->irq_tested = false;
|
||||
|
||||
/* Generate an interrupt by having the core call through to
|
||||
* tpm_tis_send
|
||||
*/
|
||||
rc = tpm_tis_gen_interrupt(chip);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
tpm_tis_gen_interrupt(chip);
|
||||
|
||||
restore_irqs:
|
||||
/* tpm_tis_send will either confirm the interrupt is working or it
|
||||
* will call disable_irq which undoes all of the above.
|
||||
*/
|
||||
if (!(chip->flags & TPM_CHIP_FLAG_IRQ)) {
|
||||
rc = tpm_tis_write8(priv, original_int_vec,
|
||||
TPM_INT_VECTOR(priv->locality));
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
return 1;
|
||||
tpm_tis_write8(priv, original_int_vec,
|
||||
TPM_INT_VECTOR(priv->locality));
|
||||
rc = -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
tpm_tis_relinquish_locality(chip, priv->locality);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* Try to find the IRQ the TPM is using. This is for legacy x86 systems that
|
||||
@ -914,8 +934,8 @@ static const struct tpm_class_ops tpm_tis = {
|
||||
.req_complete_mask = TPM_STS_DATA_AVAIL | TPM_STS_VALID,
|
||||
.req_complete_val = TPM_STS_DATA_AVAIL | TPM_STS_VALID,
|
||||
.req_canceled = tpm_tis_req_canceled,
|
||||
.request_locality = request_locality,
|
||||
.relinquish_locality = release_locality,
|
||||
.request_locality = tpm_tis_request_locality,
|
||||
.relinquish_locality = tpm_tis_relinquish_locality,
|
||||
.clk_enable = tpm_tis_clkrun_enable,
|
||||
};
|
||||
|
||||
@ -949,6 +969,8 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
|
||||
priv->timeout_min = TPM_TIMEOUT_USECS_MIN;
|
||||
priv->timeout_max = TPM_TIMEOUT_USECS_MAX;
|
||||
priv->phy_ops = phy_ops;
|
||||
priv->locality_count = 0;
|
||||
mutex_init(&priv->locality_count_mutex);
|
||||
|
||||
dev_set_drvdata(&chip->dev, priv);
|
||||
|
||||
@ -995,14 +1017,14 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
|
||||
TPM_INTF_DATA_AVAIL_INT | TPM_INTF_STS_VALID_INT;
|
||||
intmask &= ~TPM_GLOBAL_INT_ENABLE;
|
||||
|
||||
rc = request_locality(chip, 0);
|
||||
rc = tpm_tis_request_locality(chip, 0);
|
||||
if (rc < 0) {
|
||||
rc = -ENODEV;
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
tpm_tis_write32(priv, TPM_INT_ENABLE(priv->locality), intmask);
|
||||
release_locality(chip, 0);
|
||||
tpm_tis_relinquish_locality(chip, 0);
|
||||
|
||||
rc = tpm_chip_start(chip);
|
||||
if (rc)
|
||||
@ -1062,13 +1084,13 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
|
||||
* proper timeouts for the driver.
|
||||
*/
|
||||
|
||||
rc = request_locality(chip, 0);
|
||||
rc = tpm_tis_request_locality(chip, 0);
|
||||
if (rc < 0)
|
||||
goto out_err;
|
||||
|
||||
rc = tpm_get_timeouts(chip);
|
||||
|
||||
release_locality(chip, 0);
|
||||
tpm_tis_relinquish_locality(chip, 0);
|
||||
|
||||
if (rc) {
|
||||
dev_err(dev, "Could not get TPM timeouts and durations\n");
|
||||
@ -1076,17 +1098,21 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
if (irq) {
|
||||
if (irq)
|
||||
tpm_tis_probe_irq_single(chip, intmask, IRQF_SHARED,
|
||||
irq);
|
||||
if (!(chip->flags & TPM_CHIP_FLAG_IRQ)) {
|
||||
dev_err(&chip->dev, FW_BUG
|
||||
else
|
||||
tpm_tis_probe_irq(chip, intmask);
|
||||
|
||||
if (!(chip->flags & TPM_CHIP_FLAG_IRQ)) {
|
||||
dev_err(&chip->dev, FW_BUG
|
||||
"TPM interrupt not working, polling instead\n");
|
||||
|
||||
disable_interrupts(chip);
|
||||
}
|
||||
} else {
|
||||
tpm_tis_probe_irq(chip, intmask);
|
||||
rc = tpm_tis_request_locality(chip, 0);
|
||||
if (rc < 0)
|
||||
goto out_err;
|
||||
disable_interrupts(chip);
|
||||
tpm_tis_relinquish_locality(chip, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1147,28 +1173,27 @@ int tpm_tis_resume(struct device *dev)
|
||||
struct tpm_chip *chip = dev_get_drvdata(dev);
|
||||
int ret;
|
||||
|
||||
ret = tpm_tis_request_locality(chip, 0);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
if (chip->flags & TPM_CHIP_FLAG_IRQ)
|
||||
tpm_tis_reenable_interrupts(chip);
|
||||
|
||||
ret = tpm_pm_resume(dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto out;
|
||||
|
||||
/*
|
||||
* TPM 1.2 requires self-test on resume. This function actually returns
|
||||
* an error code but for unknown reason it isn't handled.
|
||||
*/
|
||||
if (!(chip->flags & TPM_CHIP_FLAG_TPM2)) {
|
||||
ret = request_locality(chip, 0);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
if (!(chip->flags & TPM_CHIP_FLAG_TPM2))
|
||||
tpm1_do_selftest(chip);
|
||||
out:
|
||||
tpm_tis_relinquish_locality(chip, 0);
|
||||
|
||||
release_locality(chip, 0);
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(tpm_tis_resume);
|
||||
#endif
|
||||
|
@ -90,6 +90,8 @@ enum tpm_tis_flags {
|
||||
|
||||
struct tpm_tis_data {
|
||||
u16 manufacturer_id;
|
||||
struct mutex locality_count_mutex;
|
||||
unsigned int locality_count;
|
||||
int locality;
|
||||
int irq;
|
||||
bool irq_tested;
|
||||
|
@ -1261,7 +1261,7 @@ static struct rockchip_clk_branch rk3399_clk_branches[] __initdata = {
|
||||
RK3399_CLKSEL_CON(56), 6, 2, MFLAGS,
|
||||
RK3399_CLKGATE_CON(10), 7, GFLAGS),
|
||||
|
||||
COMPOSITE_NOGATE(SCLK_CIF_OUT, "clk_cifout", mux_clk_cif_p, 0,
|
||||
COMPOSITE_NOGATE(SCLK_CIF_OUT, "clk_cifout", mux_clk_cif_p, CLK_SET_RATE_PARENT,
|
||||
RK3399_CLKSEL_CON(56), 5, 1, MFLAGS, 0, 5, DFLAGS),
|
||||
|
||||
/* gic */
|
||||
|
@ -509,7 +509,7 @@ static bool skx_rir_decode(struct decoded_addr *res)
|
||||
}
|
||||
|
||||
static u8 skx_close_row[] = {
|
||||
15, 16, 17, 18, 20, 21, 22, 28, 10, 11, 12, 13, 29, 30, 31, 32, 33
|
||||
15, 16, 17, 18, 20, 21, 22, 28, 10, 11, 12, 13, 29, 30, 31, 32, 33, 34
|
||||
};
|
||||
|
||||
static u8 skx_close_column[] = {
|
||||
@ -517,7 +517,7 @@ static u8 skx_close_column[] = {
|
||||
};
|
||||
|
||||
static u8 skx_open_row[] = {
|
||||
14, 15, 16, 20, 28, 21, 22, 23, 24, 25, 26, 27, 29, 30, 31, 32, 33
|
||||
14, 15, 16, 20, 28, 21, 22, 23, 24, 25, 26, 27, 29, 30, 31, 32, 33, 34
|
||||
};
|
||||
|
||||
static u8 skx_open_column[] = {
|
||||
|
@ -1262,8 +1262,7 @@ static int qcom_scm_probe(struct platform_device *pdev)
|
||||
static void qcom_scm_shutdown(struct platform_device *pdev)
|
||||
{
|
||||
/* Clean shutdown, disable download mode to allow normal restart */
|
||||
if (download_mode)
|
||||
qcom_scm_set_download_mode(false);
|
||||
qcom_scm_set_download_mode(false);
|
||||
}
|
||||
|
||||
static const struct of_device_id qcom_scm_dt_match[] = {
|
||||
|
@ -103,22 +103,19 @@ void adv7533_dsi_power_off(struct adv7511 *adv)
|
||||
enum drm_mode_status adv7533_mode_valid(struct adv7511 *adv,
|
||||
const struct drm_display_mode *mode)
|
||||
{
|
||||
int lanes;
|
||||
unsigned long max_lane_freq;
|
||||
struct mipi_dsi_device *dsi = adv->dsi;
|
||||
u8 bpp = mipi_dsi_pixel_format_to_bpp(dsi->format);
|
||||
|
||||
if (mode->clock > 80000)
|
||||
lanes = 4;
|
||||
else
|
||||
lanes = 3;
|
||||
/* Check max clock for either 7533 or 7535 */
|
||||
if (mode->clock > (adv->type == ADV7533 ? 80000 : 148500))
|
||||
return MODE_CLOCK_HIGH;
|
||||
|
||||
/*
|
||||
* TODO: add support for dynamic switching of lanes
|
||||
* by using the bridge pre_enable() op . Till then filter
|
||||
* out the modes which shall need different number of lanes
|
||||
* than what was configured in the device tree.
|
||||
*/
|
||||
if (lanes != dsi->lanes)
|
||||
return MODE_BAD;
|
||||
/* Check max clock for each lane */
|
||||
max_lane_freq = (adv->type == ADV7533 ? 800000 : 891000);
|
||||
|
||||
if (mode->clock * bpp > max_lane_freq * adv->num_dsi_lanes)
|
||||
return MODE_CLOCK_HIGH;
|
||||
|
||||
return MODE_OK;
|
||||
}
|
||||
|
@ -488,8 +488,9 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
|
||||
*/
|
||||
dev->mode_config.delayed_event = true;
|
||||
if (dev->mode_config.poll_enabled)
|
||||
schedule_delayed_work(&dev->mode_config.output_poll_work,
|
||||
0);
|
||||
mod_delayed_work(system_wq,
|
||||
&dev->mode_config.output_poll_work,
|
||||
0);
|
||||
}
|
||||
|
||||
/* Re-enable polling in case the global poll config changed. */
|
||||
|
@ -1569,6 +1569,7 @@ struct msm_gpu *a5xx_gpu_init(struct drm_device *dev)
|
||||
struct a5xx_gpu *a5xx_gpu = NULL;
|
||||
struct adreno_gpu *adreno_gpu;
|
||||
struct msm_gpu *gpu;
|
||||
unsigned int nr_rings;
|
||||
int ret;
|
||||
|
||||
if (!pdev) {
|
||||
@ -1589,7 +1590,12 @@ struct msm_gpu *a5xx_gpu_init(struct drm_device *dev)
|
||||
|
||||
check_speed_bin(&pdev->dev);
|
||||
|
||||
ret = adreno_gpu_init(dev, pdev, adreno_gpu, &funcs, 4);
|
||||
nr_rings = 4;
|
||||
|
||||
if (adreno_is_a510(adreno_gpu))
|
||||
nr_rings = 1;
|
||||
|
||||
ret = adreno_gpu_init(dev, pdev, adreno_gpu, &funcs, nr_rings);
|
||||
if (ret) {
|
||||
a5xx_destroy(&(a5xx_gpu->base.base));
|
||||
return ERR_PTR(ret);
|
||||
|
@ -301,8 +301,11 @@ struct msm_gpu *adreno_load_gpu(struct drm_device *dev)
|
||||
if (ret)
|
||||
return NULL;
|
||||
|
||||
/* Make sure pm runtime is active and reset any previous errors */
|
||||
pm_runtime_set_active(&pdev->dev);
|
||||
/*
|
||||
* Now that we have firmware loaded, and are ready to begin
|
||||
* booting the gpu, go ahead and enable runpm:
|
||||
*/
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
|
||||
ret = pm_runtime_get_sync(&pdev->dev);
|
||||
if (ret < 0) {
|
||||
|
@ -916,7 +916,6 @@ int adreno_gpu_init(struct drm_device *drm, struct platform_device *pdev,
|
||||
pm_runtime_set_autosuspend_delay(dev,
|
||||
adreno_gpu->info->inactive_period);
|
||||
pm_runtime_use_autosuspend(dev);
|
||||
pm_runtime_enable(dev);
|
||||
|
||||
ret = msm_gpu_init(drm, pdev, &adreno_gpu->base, &funcs->base,
|
||||
adreno_gpu->info->name, &adreno_gpu_config);
|
||||
|
@ -634,7 +634,7 @@ static int dpu_encoder_virt_atomic_check(
|
||||
if (drm_atomic_crtc_needs_modeset(crtc_state)) {
|
||||
dpu_rm_release(global_state, drm_enc);
|
||||
|
||||
if (!crtc_state->active_changed || crtc_state->active)
|
||||
if (!crtc_state->active_changed || crtc_state->enable)
|
||||
ret = dpu_rm_reserve(&dpu_kms->rm, global_state,
|
||||
drm_enc, crtc_state, topology);
|
||||
}
|
||||
|
@ -250,9 +250,6 @@ static int rockchip_drm_gem_object_mmap(struct drm_gem_object *obj,
|
||||
else
|
||||
ret = rockchip_drm_gem_object_mmap_dma(obj, vma);
|
||||
|
||||
if (ret)
|
||||
drm_gem_vm_close(vma);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -249,4 +249,5 @@ void vgem_fence_close(struct vgem_file *vfile)
|
||||
{
|
||||
idr_for_each(&vfile->fence_idr, __vgem_fence_idr_fini, vfile);
|
||||
idr_destroy(&vfile->fence_idr);
|
||||
mutex_destroy(&vfile->fence_mutex);
|
||||
}
|
||||
|
@ -899,6 +899,7 @@ static int max9286_v4l2_register(struct max9286_priv *priv)
|
||||
static void max9286_v4l2_unregister(struct max9286_priv *priv)
|
||||
{
|
||||
fwnode_handle_put(priv->sd.fwnode);
|
||||
v4l2_ctrl_handler_free(&priv->ctrls);
|
||||
v4l2_async_unregister_subdev(&priv->sd);
|
||||
max9286_v4l2_notifier_unregister(priv);
|
||||
}
|
||||
|
@ -1310,6 +1310,8 @@ static int bdisp_probe(struct platform_device *pdev)
|
||||
init_waitqueue_head(&bdisp->irq_queue);
|
||||
INIT_DELAYED_WORK(&bdisp->timeout_work, bdisp_irq_timeout);
|
||||
bdisp->work_queue = create_workqueue(BDISP_NAME);
|
||||
if (!bdisp->work_queue)
|
||||
return -ENOMEM;
|
||||
|
||||
spin_lock_init(&bdisp->slock);
|
||||
mutex_init(&bdisp->lock);
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/platform_data/pm33xx.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/rtc.h>
|
||||
#include <linux/rtc/rtc-omap.h>
|
||||
#include <linux/sizes.h>
|
||||
@ -528,7 +529,7 @@ static int am33xx_pm_probe(struct platform_device *pdev)
|
||||
|
||||
ret = am33xx_pm_alloc_sram();
|
||||
if (ret)
|
||||
return ret;
|
||||
goto err_wkup_m3_ipc_put;
|
||||
|
||||
ret = am33xx_pm_rtc_setup();
|
||||
if (ret)
|
||||
@ -555,28 +556,41 @@ static int am33xx_pm_probe(struct platform_device *pdev)
|
||||
suspend_wfi_flags |= WFI_FLAG_WAKE_M3;
|
||||
#endif /* CONFIG_SUSPEND */
|
||||
|
||||
pm_runtime_enable(dev);
|
||||
ret = pm_runtime_get_sync(dev);
|
||||
if (ret < 0) {
|
||||
pm_runtime_put_noidle(dev);
|
||||
goto err_pm_runtime_disable;
|
||||
}
|
||||
|
||||
ret = pm_ops->init(am33xx_do_sram_idle);
|
||||
if (ret) {
|
||||
dev_err(dev, "Unable to call core pm init!\n");
|
||||
ret = -ENODEV;
|
||||
goto err_put_wkup_m3_ipc;
|
||||
goto err_pm_runtime_put;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
err_put_wkup_m3_ipc:
|
||||
wkup_m3_ipc_put(m3_ipc);
|
||||
err_pm_runtime_put:
|
||||
pm_runtime_put_sync(dev);
|
||||
err_pm_runtime_disable:
|
||||
pm_runtime_disable(dev);
|
||||
err_unsetup_rtc:
|
||||
iounmap(rtc_base_virt);
|
||||
clk_put(rtc_fck);
|
||||
err_free_sram:
|
||||
am33xx_pm_free_sram();
|
||||
pm33xx_dev = NULL;
|
||||
err_wkup_m3_ipc_put:
|
||||
wkup_m3_ipc_put(m3_ipc);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int am33xx_pm_remove(struct platform_device *pdev)
|
||||
{
|
||||
pm_runtime_put_sync(&pdev->dev);
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
if (pm_ops->deinit)
|
||||
pm_ops->deinit();
|
||||
suspend_set_ops(NULL);
|
||||
|
@ -58,6 +58,7 @@ struct pcpu {
|
||||
struct list_head list;
|
||||
struct device dev;
|
||||
uint32_t cpu_id;
|
||||
uint32_t acpi_id;
|
||||
uint32_t flags;
|
||||
};
|
||||
|
||||
@ -249,6 +250,7 @@ static struct pcpu *create_and_register_pcpu(struct xenpf_pcpuinfo *info)
|
||||
|
||||
INIT_LIST_HEAD(&pcpu->list);
|
||||
pcpu->cpu_id = info->xen_cpuid;
|
||||
pcpu->acpi_id = info->acpi_id;
|
||||
pcpu->flags = info->flags;
|
||||
|
||||
/* Need hold on xen_pcpu_lock before pcpu list manipulations */
|
||||
@ -416,3 +418,21 @@ static int __init xen_pcpu_init(void)
|
||||
return ret;
|
||||
}
|
||||
arch_initcall(xen_pcpu_init);
|
||||
|
||||
#ifdef CONFIG_ACPI
|
||||
bool __init xen_processor_present(uint32_t acpi_id)
|
||||
{
|
||||
const struct pcpu *pcpu;
|
||||
bool online = false;
|
||||
|
||||
mutex_lock(&xen_pcpu_lock);
|
||||
list_for_each_entry(pcpu, &xen_pcpus, list)
|
||||
if (pcpu->acpi_id == acpi_id) {
|
||||
online = pcpu->flags & XEN_PCPU_FLAGS_ONLINE;
|
||||
break;
|
||||
}
|
||||
mutex_unlock(&xen_pcpu_lock);
|
||||
|
||||
return online;
|
||||
}
|
||||
#endif
|
||||
|
@ -251,7 +251,7 @@ struct erofs_inode {
|
||||
|
||||
unsigned char datalayout;
|
||||
unsigned char inode_isize;
|
||||
unsigned short xattr_isize;
|
||||
unsigned int xattr_isize;
|
||||
|
||||
unsigned int xattr_shared_count;
|
||||
unsigned int *xattr_shared_xattrs;
|
||||
|
@ -192,6 +192,10 @@ static int legacy_load_cluster_from_disk(struct z_erofs_maprecorder *m,
|
||||
case Z_EROFS_VLE_CLUSTER_TYPE_PLAIN:
|
||||
case Z_EROFS_VLE_CLUSTER_TYPE_HEAD:
|
||||
m->clusterofs = le16_to_cpu(di->di_clusterofs);
|
||||
if (m->clusterofs >= 1 << vi->z_logical_clusterbits) {
|
||||
DBG_BUGON(1);
|
||||
return -EFSCORRUPTED;
|
||||
}
|
||||
m->pblk = le32_to_cpu(di->di_u.blkaddr);
|
||||
break;
|
||||
default:
|
||||
|
@ -368,7 +368,8 @@ TRACE_EVENT(itimer_expire,
|
||||
tick_dep_name(PERF_EVENTS) \
|
||||
tick_dep_name(SCHED) \
|
||||
tick_dep_name(CLOCK_UNSTABLE) \
|
||||
tick_dep_name_end(RCU)
|
||||
tick_dep_name(RCU) \
|
||||
tick_dep_name_end(RCU_EXP)
|
||||
|
||||
#undef tick_dep_name
|
||||
#undef tick_dep_mask_name
|
||||
|
@ -61,4 +61,15 @@ void xen_free_unpopulated_pages(unsigned int nr_pages, struct page **pages);
|
||||
#include <xen/balloon.h>
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_XEN_DOM0) && defined(CONFIG_ACPI) && defined(CONFIG_X86)
|
||||
bool __init xen_processor_present(uint32_t acpi_id);
|
||||
#else
|
||||
#include <linux/bug.h>
|
||||
static inline bool xen_processor_present(uint32_t acpi_id)
|
||||
{
|
||||
BUG();
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _XEN_XEN_H */
|
||||
|
@ -216,6 +216,11 @@ static bool check_tick_dependency(atomic_t *dep)
|
||||
return true;
|
||||
}
|
||||
|
||||
if (val & TICK_DEP_MASK_RCU_EXP) {
|
||||
trace_tick_stop(0, TICK_DEP_MASK_RCU_EXP);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -23,8 +23,8 @@ ccflags-y := -I$(srctree)/security/selinux -I$(srctree)/security/selinux/include
|
||||
$(addprefix $(obj)/,$(selinux-y)): $(obj)/flask.h
|
||||
|
||||
quiet_cmd_flask = GEN $(obj)/flask.h $(obj)/av_permissions.h
|
||||
cmd_flask = scripts/selinux/genheaders/genheaders $(obj)/flask.h $(obj)/av_permissions.h
|
||||
cmd_flask = $< $(obj)/flask.h $(obj)/av_permissions.h
|
||||
|
||||
targets += flask.h av_permissions.h
|
||||
$(obj)/flask.h: $(src)/include/classmap.h FORCE
|
||||
$(obj)/flask.h $(obj)/av_permissions.h &: scripts/selinux/genheaders/genheaders FORCE
|
||||
$(call if_changed,flask)
|
||||
|
@ -68,6 +68,8 @@ static void *malloc_and_init_memory(size_t s)
|
||||
size_t s64;
|
||||
|
||||
void *p = memalign(PAGE_SIZE, s);
|
||||
if (!p)
|
||||
return NULL;
|
||||
|
||||
p64 = (uint64_t *)p;
|
||||
s64 = s / sizeof(uint64_t);
|
||||
|
@ -28,6 +28,7 @@ static int mba_setup(int num, ...)
|
||||
struct resctrl_val_param *p;
|
||||
char allocation_str[64];
|
||||
va_list param;
|
||||
int ret;
|
||||
|
||||
va_start(param, num);
|
||||
p = va_arg(param, struct resctrl_val_param *);
|
||||
@ -45,7 +46,11 @@ static int mba_setup(int num, ...)
|
||||
|
||||
sprintf(allocation_str, "%d", allocation);
|
||||
|
||||
write_schemata(p->ctrlgrp, allocation_str, p->cpu_no, p->resctrl_val);
|
||||
ret = write_schemata(p->ctrlgrp, allocation_str, p->cpu_no,
|
||||
p->resctrl_val);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
allocation -= ALLOCATION_STEP;
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user