mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-26 08:55:05 +07:00
a5f6ea29f9
Commit bcf24e1daa
("mmc: omap_hsmmc: use the generic config for
omap2plus devices"), enabled the build for other platforms for compile
testing.
sh-allmodconfig now fails with:
include/linux/omap-dma.h:171:8: error: expected identifier before numeric constant
make[4]: *** [drivers/mmc/host/omap_hsmmc.o] Error 1
This happens because SuperH #defines "CCR", which is one of the enum
values in include/linux/omap-dma.h. There's a similar issue with "CCR2"
on sh2a.
As "CCR" and "CCR2" are too generic names for global #defines, prefix
them with "SH_" to fix this.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
45 lines
1.0 KiB
C
45 lines
1.0 KiB
C
/*
|
|
* arch/sh/mm/cache-shx3.c - SH-X3 optimized cache ops
|
|
*
|
|
* Copyright (C) 2010 Paul Mundt
|
|
*
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
|
* License. See the file "COPYING" in the main directory of this archive
|
|
* for more details.
|
|
*/
|
|
#include <linux/init.h>
|
|
#include <linux/kernel.h>
|
|
#include <linux/io.h>
|
|
#include <asm/cache.h>
|
|
|
|
#define CCR_CACHE_SNM 0x40000 /* Hardware-assisted synonym avoidance */
|
|
#define CCR_CACHE_IBE 0x1000000 /* ICBI broadcast */
|
|
|
|
void __init shx3_cache_init(void)
|
|
{
|
|
unsigned int ccr;
|
|
|
|
ccr = __raw_readl(SH_CCR);
|
|
|
|
/*
|
|
* If we've got cache aliases, resolve them in hardware.
|
|
*/
|
|
if (boot_cpu_data.dcache.n_aliases || boot_cpu_data.icache.n_aliases) {
|
|
ccr |= CCR_CACHE_SNM;
|
|
|
|
boot_cpu_data.icache.n_aliases = 0;
|
|
boot_cpu_data.dcache.n_aliases = 0;
|
|
|
|
pr_info("Enabling hardware synonym avoidance\n");
|
|
}
|
|
|
|
#ifdef CONFIG_SMP
|
|
/*
|
|
* Broadcast I-cache block invalidations by default.
|
|
*/
|
|
ccr |= CCR_CACHE_IBE;
|
|
#endif
|
|
|
|
writel_uncached(ccr, SH_CCR);
|
|
}
|