From 9dd3a1dfee3ff441f11445bbaf2fa1432bec479b Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Thu, 10 May 2012 16:14:33 -0600 Subject: [PATCH] --- yaml --- r: 304100 b: refs/heads/master c: f8450fca6ecdea38b5a882fdf6cd097e3ec8651c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/kernel/printk.c | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index c0746b27a056..9344f7399814 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: af4681097b23fe9c63a03d774de7c742fa3a920e +refs/heads/master: f8450fca6ecdea38b5a882fdf6cd097e3ec8651c diff --git a/trunk/kernel/printk.c b/trunk/kernel/printk.c index 572941d7e5f7..8b027bdf4606 100644 --- a/trunk/kernel/printk.c +++ b/trunk/kernel/printk.c @@ -227,8 +227,13 @@ static u32 clear_idx; #define LOG_LINE_MAX 1024 /* record buffer */ +#if !defined(CONFIG_64BIT) || defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) +#define LOG_ALIGN 4 +#else +#define LOG_ALIGN 8 +#endif #define __LOG_BUF_LEN (1 << CONFIG_LOG_BUF_SHIFT) -static char __log_buf[__LOG_BUF_LEN]; +static char __log_buf[__LOG_BUF_LEN] __aligned(LOG_ALIGN); static char *log_buf = __log_buf; static u32 log_buf_len = __LOG_BUF_LEN; @@ -279,12 +284,6 @@ static u32 log_next(u32 idx) return idx + msg->len; } -#if !defined(CONFIG_64BIT) || defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) -#define LOG_ALIGN 4 -#else -#define LOG_ALIGN 8 -#endif - /* insert record into the buffer, discard old ones, update heads */ static void log_store(int facility, int level, const char *dict, u16 dict_len,