Commit e573ebb0 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Haavard Skinnemoen

avr32: cleanup - use _AC macro to define PAGE_SIZE

PAGE_SIZE is used both from assembly and C code. We want to have type
specifiers when using it from C, but this will make the assembler
confused, so we need to make it conditional.

This is exactly what the _AC macro is for, so using it allows us to
get rid of a few lines of cpp noise.
Signed-off-by: default avatarCyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: default avatarHaavard Skinnemoen <hskinnemoen@atmel.com>
parent 3a4e832c
...@@ -8,13 +8,11 @@ ...@@ -8,13 +8,11 @@
#ifndef __ASM_AVR32_PAGE_H #ifndef __ASM_AVR32_PAGE_H
#define __ASM_AVR32_PAGE_H #define __ASM_AVR32_PAGE_H
#include <linux/const.h>
/* PAGE_SHIFT determines the page size */ /* PAGE_SHIFT determines the page size */
#define PAGE_SHIFT 12 #define PAGE_SHIFT 12
#ifdef __ASSEMBLY__ #define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
#define PAGE_SIZE (1 << PAGE_SHIFT)
#else
#define PAGE_SIZE (1UL << PAGE_SHIFT)
#endif
#define PAGE_MASK (~(PAGE_SIZE-1)) #define PAGE_MASK (~(PAGE_SIZE-1))
#define PTE_MASK PAGE_MASK #define PTE_MASK PAGE_MASK
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment