Skip to contentSkip to conversation

ARM: tegra114: add speedo-based process identification

PATCH In review Danny Huang 2 participants 4 messages Mar 18, 2013 – Mar 20, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ARM: tegra114: add speedo-based process identification

Add speedo-based process identifictaion for Tegra114.

Based on the work by:
Alex Frid <[email protected]>

---
 arch/arm/mach-tegra/Makefile          |   1 +
 arch/arm/mach-tegra/fuse.c            |   4 ++
 arch/arm/mach-tegra/fuse.h            |   7 +++
 arch/arm/mach-tegra/tegra114_speedo.c | 103 ++++++++++++++++++++++++++++++++++
 4 files changed, 115 insertions(+)
 create mode 100644 arch/arm/mach-tegra/tegra114_speedo.c
arch/arm/mach-tegra/Makefile +1 -0
index 92703f9..e40326d 100644
@@ -28,6 +28,7 @@ obj-$(CONFIG_HOTPLUG_CPU)               += hotplug.o
 obj-$(CONFIG_CPU_FREQ)                  += cpu-tegra.o
 obj-$(CONFIG_TEGRA_PCI)			+= pcie.o
 
+obj-$(CONFIG_ARCH_TEGRA_114_SOC)	+= tegra114_speedo.o
 ifeq ($(CONFIG_CPU_IDLE),y)
 obj-$(CONFIG_ARCH_TEGRA_114_SOC)	+= cpuidle-tegra114.o
 endif
arch/arm/mach-tegra/fuse.c +4 -0
index f7db078..e035cd2 100644
@@ -2,6 +2,7 @@
  * arch/arm/mach-tegra/fuse.c
  *
  * Copyright (C) 2010 Google, Inc.
+ * Copyright (c) 2013, NVIDIA CORPORATION.  All rights reserved.
  *
  * Author:
  *	Colin Cross <[email protected]>
@@ -137,6 +138,9 @@ void tegra_init_fuse(void)
 		tegra_fuse_spare_bit = TEGRA30_FUSE_SPARE_BIT;
 		tegra_init_speedo_data = &tegra30_init_speedo_data;
 		break;
+	case TEGRA114:
+		tegra_init_speedo_data = &tegra114_init_speedo_data;
+		break;
 	default:
 		pr_warn("Tegra: unknown chip id %d\n", tegra_chip_id);
 		tegra_fuse_spare_bit = TEGRA20_FUSE_SPARE_BIT;
arch/arm/mach-tegra/fuse.h +7 -0
index da78434..aacc00d 100644
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2010 Google, Inc.
+ * Copyright (c) 2013, NVIDIA CORPORATION.  All rights reserved.
  *
  * Author:
  *	Colin Cross <[email protected]>
@@ -66,4 +67,10 @@ void tegra30_init_speedo_data(void);
 static inline void tegra30_init_speedo_data(void) {}
 #endif
 
+#ifdef CONFIG_ARCH_TEGRA_114_SOC
+void tegra114_init_speedo_data(void);
+#else
+static inline void tegra114_init_speedo_data(void) {}
+#endif
+
 #endif
arch/arm/mach-tegra/tegra114_speedo.c new file +103 -0

103 lines not on this page · raw message

Signature · 1 line
1.8.2
#1 lore raw
Quoted 1 line · Danny Huang

Add speedo-based process identifictaion for Tegra114.

I have applied this to Tegra's for-3.10/soc branch, with one addition below:

arch/arm/mach-tegra/tegra114_speedo.c

Quoted 3 lines
arch/arm/mach-tegra/tegra114_speedo.c +1 -0
 
+#include <linux/kernel.h>

Here, I also added:

#include <linux/bug.h>

That's not needed in the Tegra for-next branch (which is based on 3.9-rc1), but is needed when merged into linux-next, and hence will presumably be needed once this is submitted into 3.10.

#2 lore raw
Quoted 9 lines · Stephen Warren
Quoted 1 line · Danny Huang

Add speedo-based process identifictaion for Tegra114.

I have applied this to Tegra's for-3.10/soc branch, with one addition below:

arch/arm/mach-tegra/tegra114_speedo.c

Quoted 3 lines
arch/arm/mach-tegra/tegra114_speedo.c +1 -0
 
+#include <linux/kernel.h>
Quoted 7 lines

Here, I also added:

#include <linux/bug.h>

That's not needed in the Tegra for-next branch (which is based on 3.9-rc1), but is needed when merged into linux-next, and hence will presumably be needed once this is submitted into 3.10.

Thanks. Does it mean that we have to include the bug.h for all newly created file for 3.10?

#3 lore raw
Quoted 12 lines · Danny Huang
Quoted 11 lines · Stephen Warren
Quoted 1 line · Danny Huang

Add speedo-based process identifictaion for Tegra114.

I have applied this to Tegra's for-3.10/soc branch, with one addition below:

arch/arm/mach-tegra/tegra114_speedo.c

Quoted 3 lines
arch/arm/mach-tegra/tegra114_speedo.c +1 -0
 
+#include <linux/kernel.h>

Here, I also added:

Quoted 8 lines
Quoted 5 lines

#include <linux/bug.h>

That's not needed in the Tegra for-next branch (which is based on 3.9-rc1), but is needed when merged into linux-next, and hence will presumably be needed once this is submitted into 3.10.

Thanks. Does it mean that we have to include the bug.h for all newly created file for 3.10?

It's only needed in files that use its contents.