Re: [RFC 2/2] soc: qcom_stats: Add dynamic debugfs entries for subsystems

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

 



Hi,

Thanks for the patch.
+static void qcom_register_subsystem_notifiers(struct qcom_stats_priv *stats)
+{
+	struct device *dev = &stats->dev;
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(subsystems); i++) {
+		const struct subsystem_data *subsystem = &subsystems[i];
+		struct subsystem_priv *ss_priv = &stats->ss_priv[i];
+
+		ss_priv->subsystem = subsystem;
+		ss_priv->root = stats->root;
+		ss_priv->nb.notifier_call = qcom_stats_subsys_ssr_notify;
+		ss_priv->notifier = qcom_register_ssr_notifier(subsystem->name, &ss_priv->nb);

The subsystem->name passed should match the subsystem name already registered with SSR.

The names in below table don't match as of now. for e.g. modem uses mpss name.

static const struct subsystem_data subsystems[] = {
        { "modem", 605, 1 },
        { "wpss", 605, 13 },
        { "adsp", 606, 2 },
        { "cdsp", 607, 5 },
        { "slpi", 608, 3 },
        { "gpu", 609, 0 },
        { "display", 610, 0 },
        { "adsp_island", 613, 2 },
        { "slpi_island", 613, 3 },
};

struct subsystem_data {
        const char *name;
        u32 smem_item;
        u32 pid;
+      const char *ssr_name;
};

Can you add one more entry in above struct with the 'ssr_name' for subsystem.

For the adsp_island stat you can re-use the lpass subsystem notification and create/destroy debugfs stats files for both adsp and adsp_island stats, similarly for slpi_island stats comes from slpi.

The gpu and display don't have any pil/ssr and hence same notification won't work for them, however today both of these are unused, so you may want to remove them from above table.

Note that In downstream we have 'apps' stats as well in above for which no registration with SSR is required. May be need to leave 'ssr_name' uninitialized for apps/gpu/display and skip register for them.

Thanks,
Maulik




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux