[no subject]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Therefore, this should trigger a `dev_err()` and be considered a BIOS bug.

Thanks,
Shyam

> 
>>           return -EINVAL;
>>       }
>>   diff --git a/drivers/platform/x86/amd/pmf/pmf.h
>> b/drivers/platform/x86/amd/pmf/pmf.h
>> index 8ce8816da9c1..a79808fda1d8 100644
>> --- a/drivers/platform/x86/amd/pmf/pmf.h
>> +++ b/drivers/platform/x86/amd/pmf/pmf.h
>> @@ -13,6 +13,7 @@
>>     #include <linux/acpi.h>
>>   #include <linux/input.h>
>> +#include <linux/platform_device.h>
>>   #include <linux/platform_profile.h>
>>     #define POLICY_BUF_MAX_SZ        0x4b000
>> @@ -355,19 +356,20 @@ struct amd_pmf_dev {
>>       /* Smart PC solution builder */
>>       struct dentry *esbin;
>>       unsigned char *policy_buf;
>> -    u32 policy_sz;
>> +    resource_size_t policy_sz;
>>       struct tee_context *tee_ctx;
>>       struct tee_shm *fw_shm_pool;
>>       u32 session_id;
>>       void *shbuf;
>>       struct delayed_work pb_work;
>>       struct pmf_action_table *prev_data;
>> -    u64 policy_addr;
>> +    resource_size_t policy_addr;
>>       void __iomem *policy_base;
>>       bool smart_pc_enabled;
>>       u16 pmf_if_version;
>>       struct input_dev *pmf_idev;
>>       size_t mtable_size;
>> +    struct resource *res;
>>   };
>>     struct apmf_sps_prop_granular_v2 {
>> diff --git a/drivers/platform/x86/amd/pmf/tee-if.c
>> b/drivers/platform/x86/amd/pmf/tee-if.c
>> index 19c27b6e4666..555b8d6314e0 100644
>> --- a/drivers/platform/x86/amd/pmf/tee-if.c
>> +++ b/drivers/platform/x86/amd/pmf/tee-if.c
>> @@ -257,7 +257,7 @@ static int amd_pmf_invoke_cmd_init(struct
>> amd_pmf_dev *dev)
>>           return -ENODEV;
>>       }
>>   -    dev_dbg(dev->dev, "Policy Binary size: %u bytes\n",
>> dev->policy_sz);
>> +    dev_dbg(dev->dev, "Policy Binary size: %llu bytes\n",
>> dev->policy_sz);
>>       memset(dev->shbuf, 0, dev->policy_sz);
>>       ta_sm = dev->shbuf;
>>       in = &ta_sm->pmf_input.init_table;
>> @@ -512,9 +512,9 @@ int amd_pmf_init_smart_pc(struct amd_pmf_dev *dev)
>>       if (ret)
>>           goto error;
>>   -    dev->policy_base = devm_ioremap(dev->dev, dev->policy_addr,
>> dev->policy_sz);
>> -    if (!dev->policy_base) {
>> -        ret = -ENOMEM;
>> +    dev->policy_base = devm_ioremap_resource(dev->dev, dev->res);
>> +    if (IS_ERR(dev->policy_base)) {
>> +        ret = PTR_ERR(dev->policy_base);
>>           goto error;
>>       }
>>   
> 




[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux