linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kernel/profile: remove setup_profiling_timer
@ 2026-08-21  9:17 Anthony Iliopoulos
  2026-08-22 22:53 ` Bradley Morgan
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Anthony Iliopoulos @ 2026-08-21  9:17 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

No architecture uses setup_profiling_timer() at this point for setting a
multiplier, so it can be safely removed. This allows arch-specific stub
functions to be cleaned up in subsequent commits.

There are no functional changes, as writing to /proc/profile will still
reset the counters.

Signed-off-by: Anthony Iliopoulos <ailiop@suse.com>
---
 include/linux/profile.h |  1 -
 kernel/profile.c        | 20 --------------------
 2 files changed, 21 deletions(-)

diff --git a/include/linux/profile.h b/include/linux/profile.h
index 3f53cdb0c27c..68edf60173b9 100644
--- a/include/linux/profile.h
+++ b/include/linux/profile.h
@@ -32,7 +32,6 @@ extern int prof_on __read_mostly;
 int profile_init(void);
 int profile_setup(char *str);
 void profile_tick(int type);
-int setup_profiling_timer(unsigned int multiplier);
 
 /*
  * Add multiple profiler hits to a given address:
diff --git a/kernel/profile.c b/kernel/profile.c
index 1fcf1adcf4eb..5002ea558951 100644
--- a/kernel/profile.c
+++ b/kernel/profile.c
@@ -177,32 +177,12 @@ read_profile(struct file *file, char __user *buf, size_t count, loff_t *ppos)
 	return read;
 }
 
-/* default is to not implement this call */
-int __weak setup_profiling_timer(unsigned mult)
-{
-	return -EINVAL;
-}
-
 /*
  * Writing to /proc/profile resets the counters
- *
- * Writing a 'profiling multiplier' value into it also re-sets the profiling
- * interrupt frequency, on architectures that support this.
  */
 static ssize_t write_profile(struct file *file, const char __user *buf,
 			     size_t count, loff_t *ppos)
 {
-#ifdef CONFIG_SMP
-	if (count == sizeof(int)) {
-		unsigned int multiplier;
-
-		if (copy_from_user(&multiplier, buf, sizeof(int)))
-			return -EFAULT;
-
-		if (setup_profiling_timer(multiplier))
-			return -EINVAL;
-	}
-#endif
 	memset(prof_buffer, 0, prof_len * sizeof(atomic_t));
 	return count;
 }
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-08-24 10:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-21  9:17 [PATCH] kernel/profile: remove setup_profiling_timer Anthony Iliopoulos
2026-08-22 22:53 ` Bradley Morgan
2026-08-23 12:08 ` [PATCH] profile: remove setup_profiling_timer() Nick Huang
2026-08-23 13:23 ` [PATCH] kernel/profile: remove setup_profiling_timer kernel test robot
2026-08-24 10:46 ` Nick Huang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).