Skip to content

Commit

Permalink
avr32: cleanup - use _AC macro to define PAGE_SIZE
Browse files Browse the repository at this point in the history
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: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
  • Loading branch information
Cyrill Gorcunov authored and Haavard Skinnemoen committed Apr 20, 2008
1 parent 3a4e832 commit e573ebb
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions include/asm-avr32/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@
#ifndef __ASM_AVR32_PAGE_H
#define __ASM_AVR32_PAGE_H

#include <linux/const.h>

/* PAGE_SHIFT determines the page size */
#define PAGE_SHIFT 12
#ifdef __ASSEMBLY__
#define PAGE_SIZE (1 << PAGE_SHIFT)
#else
#define PAGE_SIZE (1UL << PAGE_SHIFT)
#endif
#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
#define PAGE_MASK (~(PAGE_SIZE-1))
#define PTE_MASK PAGE_MASK

Expand Down

0 comments on commit e573ebb

Please sign in to comment.