arm64: ptm: ignore PTM config file register reading
Chun XU [Fri, 13 Nov 2015 10:28:06 +0000 (18:28 +0800)]
Reading T210 A57 PTM registers causes kernel hang
when PTM has not been power.

This is a WAR.

Bug 200146743

Change-Id: I0c3d847c737eedfaacd600813a581c34bc819e51
Signed-off-by: Chun XU <chunx@nvidia.com>
Reviewed-on: http://git-master/r/833592
Reviewed-by: Allen Yu <alleny@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>

drivers/platform/tegra/tegra_ptm_t210.c

index 0027ef4..4deb97b 100644 (file)
@@ -1043,30 +1043,7 @@ static ssize_t trace_cycle_count_show(struct kobject *kobj,
 static ssize_t trace_config_show(struct kobject *kobj,
        struct kobj_attribute *attr, char *buf)
 {
-       u32 *data = (u32 *)buf;
-       struct tracectx *t = &tracer;
-       u32 id = raw_smp_processor_id();
-       int i = 0;
-
-       data[i++] = ptm_readl(t, id, TRCTRACEIDR);
-       data[i++] = ptm_readl(t, id, TRCCONFIGR);
-       data[i++] = ptm_readl(t, id, TRCACVR0);
-       data[i++] = ptm_readl(t, id, TRCACVR0 + 0x4);
-       data[i++] = ptm_readl(t, id, TRCACVR1);
-       data[i++] = ptm_readl(t, id, TRCACVR1 + 0x4);
-       data[i++] = ptm_readl(t, id, TRCACVR2);
-       data[i++] = ptm_readl(t, id, TRCACVR2 + 0x4);
-       data[i++] = ptm_readl(t, id, CXTMC_REGS_FFCR_0);
-       /* reserved for future use */
-       data[i++] = 0x00000000;
-       data[i++] = 0x00000000;
-       data[i++] = 0x00000000;
-       data[i++] = 0x00000000;
-       data[i++] = 0x00000000;
-       data[i++] = 0x00000000;
-       data[i++] = 0x00000000;
-
-       return 64;
+       return 0;
 }
 
 static ssize_t trace_config_store(struct kobject *kobj,