diff options
-rw-r--r-- | kernel/printk.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/kernel/printk.c b/kernel/printk.c index 572941d7e5f7..8b027bdf4606 100644 --- a/kernel/printk.c +++ b/kernel/printk.c | |||
@@ -227,8 +227,13 @@ static u32 clear_idx; | |||
227 | #define LOG_LINE_MAX 1024 | 227 | #define LOG_LINE_MAX 1024 |
228 | 228 | ||
229 | /* record buffer */ | 229 | /* record buffer */ |
230 | #if !defined(CONFIG_64BIT) || defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) | ||
231 | #define LOG_ALIGN 4 | ||
232 | #else | ||
233 | #define LOG_ALIGN 8 | ||
234 | #endif | ||
230 | #define __LOG_BUF_LEN (1 << CONFIG_LOG_BUF_SHIFT) | 235 | #define __LOG_BUF_LEN (1 << CONFIG_LOG_BUF_SHIFT) |
231 | static char __log_buf[__LOG_BUF_LEN]; | 236 | static char __log_buf[__LOG_BUF_LEN] __aligned(LOG_ALIGN); |
232 | static char *log_buf = __log_buf; | 237 | static char *log_buf = __log_buf; |
233 | static u32 log_buf_len = __LOG_BUF_LEN; | 238 | static u32 log_buf_len = __LOG_BUF_LEN; |
234 | 239 | ||
@@ -279,12 +284,6 @@ static u32 log_next(u32 idx) | |||
279 | return idx + msg->len; | 284 | return idx + msg->len; |
280 | } | 285 | } |
281 | 286 | ||
282 | #if !defined(CONFIG_64BIT) || defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) | ||
283 | #define LOG_ALIGN 4 | ||
284 | #else | ||
285 | #define LOG_ALIGN 8 | ||
286 | #endif | ||
287 | |||
288 | /* insert record into the buffer, discard old ones, update heads */ | 287 | /* insert record into the buffer, discard old ones, update heads */ |
289 | static void log_store(int facility, int level, | 288 | static void log_store(int facility, int level, |
290 | const char *dict, u16 dict_len, | 289 | const char *dict, u16 dict_len, |