Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a4b4f437 authored by Sam Ravnborg's avatar Sam Ravnborg Committed by David S. Miller
Browse files

sparc32: fix PAGE_SIZE definition



Use _AC() in definition of PAGE_SIZE so the same definition
can be used in C and assembler.
Also use PAGE_SIZE in definition of THREAD_SIZE.

This commit kill the following comment:

    "I have my suspicions... -DaveM"

I did not find any clue what this referred to anyway.

Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b2a1fa30
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -8,14 +8,10 @@
#ifndef _SPARC_PAGE_H
#define _SPARC_PAGE_H

#define PAGE_SHIFT   12
#include <linux/const.h>

#ifndef __ASSEMBLY__
/* I have my suspicions... -DaveM */
#define PAGE_SIZE    (1UL << PAGE_SHIFT)
#else
#define PAGE_SIZE    (1 << PAGE_SHIFT)
#endif
#define PAGE_SHIFT   12
#define PAGE_SIZE    (_AC(1, UL) << PAGE_SHIFT)
#define PAGE_MASK    (~(PAGE_SIZE-1))

#include <asm/btfixup.h>
+1 −1
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@ BTFIXUPDEF_CALL(void, free_thread_info, struct thread_info *)
 * Observe the order of get_free_pages() in alloc_thread_info_node().
 * The sun4 has 8K stack too, because it's short on memory, and 16K is a waste.
 */
#define THREAD_SIZE		8192
#define THREAD_SIZE		(2 * PAGE_SIZE)

/*
 * Offsets in thread_info structure, used in assembly code