mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 10:30:52 +07:00
[MIPS] Gcc 3.3 build fixes.
Work around gcc 3.3's unability to evaluate that certain expressions indeed are constant. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
parent
bdd3ede0e1
commit
9975e77df5
@ -26,6 +26,7 @@
|
|||||||
#include <linux/proc_fs.h>
|
#include <linux/proc_fs.h>
|
||||||
#include <linux/pfn.h>
|
#include <linux/pfn.h>
|
||||||
|
|
||||||
|
#include <asm/asm-offsets.h>
|
||||||
#include <asm/bootinfo.h>
|
#include <asm/bootinfo.h>
|
||||||
#include <asm/cachectl.h>
|
#include <asm/cachectl.h>
|
||||||
#include <asm/cpu.h>
|
#include <asm/cpu.h>
|
||||||
@ -498,7 +499,13 @@ unsigned long pgd_current[NR_CPUS];
|
|||||||
* different layout ...
|
* different layout ...
|
||||||
*/
|
*/
|
||||||
#define __page_aligned(order) __attribute__((__aligned__(PAGE_SIZE<<order)))
|
#define __page_aligned(order) __attribute__((__aligned__(PAGE_SIZE<<order)))
|
||||||
pgd_t swapper_pg_dir[PTRS_PER_PGD] __page_aligned(PGD_ORDER);
|
|
||||||
|
/*
|
||||||
|
* gcc 3.3 and older have trouble determining that PTRS_PER_PGD and PGD_ORDER
|
||||||
|
* are constants. So we use the variants from asm-offset.h until that gcc
|
||||||
|
* will officially be retired.
|
||||||
|
*/
|
||||||
|
pgd_t swapper_pg_dir[_PTRS_PER_PGD] __page_aligned(_PGD_ORDER);
|
||||||
#ifdef CONFIG_64BIT
|
#ifdef CONFIG_64BIT
|
||||||
#ifdef MODULE_START
|
#ifdef MODULE_START
|
||||||
pgd_t module_pg_dir[PTRS_PER_PGD] __page_aligned(PGD_ORDER);
|
pgd_t module_pg_dir[PTRS_PER_PGD] __page_aligned(PGD_ORDER);
|
||||||
|
@ -172,7 +172,11 @@ static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *pt
|
|||||||
#define PMD_T_LOG2 (__builtin_ffs(sizeof(pmd_t)) - 1)
|
#define PMD_T_LOG2 (__builtin_ffs(sizeof(pmd_t)) - 1)
|
||||||
#define PTE_T_LOG2 (__builtin_ffs(sizeof(pte_t)) - 1)
|
#define PTE_T_LOG2 (__builtin_ffs(sizeof(pte_t)) - 1)
|
||||||
|
|
||||||
extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
|
/*
|
||||||
|
* We used to declare this array with size but gcc 3.3 and older are not able
|
||||||
|
* to find that this expression is a constant, so the size is dropped.
|
||||||
|
*/
|
||||||
|
extern pgd_t swapper_pg_dir[];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The following only work if pte_present() is true.
|
* The following only work if pte_present() is true.
|
||||||
|
Loading…
Reference in New Issue
Block a user