Skip to contentSkip to conversation

: ftrace: Remove packed attribute on ftrace_page.

PATCH Applied David Miller 2 participants 2 messages May 14, 2008

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

PATCH 1/2 : ftrace: Remove packed attribute on ftrace_page.

It causes unaligned access traps on platforms like sparc (ftrace_page may be marked packed, but once we return a dyn_ftrace sub-object from this array to another piece of code, the "packed" part of the typing information doesn't propagate).

But also, it didn't serve any purpose either. Even if packed, on 64-bit or 32-bit, it didn't give us any more dyn_ftrace entries per-page.

---
 kernel/trace/ftrace.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
kernel/trace/ftrace.c +2 -2
index afd617b..5588c63 100644
@@ -177,9 +177,9 @@ static DEFINE_MUTEX(ftrace_filter_lock);
 
 struct ftrace_page {
 	struct ftrace_page	*next;
-	int			index;
+	unsigned long		index;
 	struct dyn_ftrace	records[];
-} __attribute__((packed));
+};
 
 #define ENTRIES_PER_PAGE \
   ((PAGE_SIZE - sizeof(struct ftrace_page)) / sizeof(struct dyn_ftrace))
Signature · 1 line
1.5.5.rc0.16.g02b00
Acked-by on v1 1/2
#1 lore raw
Quoted 11 lines · David Miller

It causes unaligned access traps on platforms like sparc (ftrace_page may be marked packed, but once we return a dyn_ftrace sub-object from this array to another piece of code, the "packed" part of the typing information doesn't propagate).

But also, it didn't serve any purpose either. Even if packed, on 64-bit or 32-bit, it didn't give us any more dyn_ftrace entries per-page.

-- Steve