Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this organization
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mariux64
/
linux
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
2
Pull requests
0
Actions
Projects
0
Wiki
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Files
d9cb5bf
Documentation
arch
alpha
arc
arm
arm64
avr32
blackfin
c6x
cris
frv
h8300
hexagon
ia64
m32r
m68k
metag
microblaze
mips
mn10300
nios2
openrisc
parisc
powerpc
s390
score
sh
sparc
tile
configs
gxio
include
arch
asm
Kbuild
asm-offsets.h
atomic.h
atomic_32.h
atomic_64.h
backtrace.h
barrier.h
bitops.h
bitops_32.h
bitops_64.h
cache.h
cacheflush.h
checksum.h
cmpxchg.h
compat.h
current.h
delay.h
device.h
dma-mapping.h
dma.h
elf.h
fixmap.h
ftrace.h
futex.h
hardirq.h
hardwall.h
highmem.h
homecache.h
hugetlb.h
hv_driver.h
ide.h
insn.h
io.h
irq.h
irq_work.h
irqflags.h
jump_label.h
kdebug.h
kexec.h
kgdb.h
kmap_types.h
kprobes.h
linkage.h
mmu.h
mmu_context.h
mmzone.h
module.h
page.h
pci.h
percpu.h
perf_event.h
pgalloc.h
pgtable.h
pgtable_32.h
pgtable_64.h
pmc.h
processor.h
ptrace.h
sections.h
setup.h
sigframe.h
signal.h
smp.h
spinlock.h
spinlock_32.h
spinlock_64.h
spinlock_types.h
stack.h
string.h
switch_to.h
syscall.h
syscalls.h
thread_info.h
tile-desc.h
tile-desc_32.h
tile-desc_64.h
timex.h
tlb.h
tlbflush.h
topology.h
traps.h
uaccess.h
unaligned.h
unistd.h
user.h
vdso.h
vga.h
word-at-a-time.h
gxio
hv
uapi
kernel
kvm
lib
mm
Kbuild
Kconfig
Kconfig.debug
Makefile
um
unicore32
x86
xtensa
.gitignore
Kconfig
block
certs
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
Breadcrumbs
linux
/
arch
/
tile
/
include
/
asm
/
cache.h
Blame
Blame
Latest commit
History
History
64 lines (55 loc) · 2.6 KB
Breadcrumbs
linux
/
arch
/
tile
/
include
/
asm
/
cache.h
Top
File metadata and controls
Code
Blame
64 lines (55 loc) · 2.6 KB
Raw
/* * Copyright 2010 Tilera Corporation. All Rights Reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation, version 2. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or * NON INFRINGEMENT. See the GNU General Public License for * more details. */ #ifndef _ASM_TILE_CACHE_H #define _ASM_TILE_CACHE_H #include <arch/chip.h> /* bytes per L1 data cache line */ #define L1_CACHE_SHIFT CHIP_L1D_LOG_LINE_SIZE() #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) /* bytes per L2 cache line */ #define L2_CACHE_SHIFT CHIP_L2_LOG_LINE_SIZE() #define L2_CACHE_BYTES (1 << L2_CACHE_SHIFT) #define L2_CACHE_ALIGN(x) (((x)+(L2_CACHE_BYTES-1)) & -L2_CACHE_BYTES) /* * TILEPro I/O is not always coherent (networking typically uses coherent * I/O, but PCI traffic does not) and setting ARCH_DMA_MINALIGN to the * L2 cacheline size helps ensure that kernel heap allocations are aligned. * TILE-Gx I/O is always coherent when used on hash-for-home pages. * * However, it's possible at runtime to request not to use hash-for-home * for the kernel heap, in which case the kernel will use flush-and-inval * to manage coherence. As a result, we use L2_CACHE_BYTES for the * DMA minimum alignment to avoid false sharing in the kernel heap. */ #define ARCH_DMA_MINALIGN L2_CACHE_BYTES /* use the cache line size for the L2, which is where it counts */ #define SMP_CACHE_BYTES_SHIFT L2_CACHE_SHIFT #define SMP_CACHE_BYTES L2_CACHE_BYTES #define INTERNODE_CACHE_SHIFT L2_CACHE_SHIFT #define INTERNODE_CACHE_BYTES L2_CACHE_BYTES /* Group together read-mostly things to avoid cache false sharing */ #define __read_mostly __attribute__((__section__(".data..read_mostly"))) /* * Originally we used small TLB pages for kernel data and grouped some * things together as ro-after-init, enforcing the property at the end * of initialization by making those pages read-only and non-coherent. * This allowed better cache utilization since cache inclusion did not * need to be maintained. However, to do this requires an extra TLB * entry, which on balance is more of a performance hit than the * non-coherence is a performance gain, so we now just make "read * mostly" and "ro-after-init" be synonyms. We keep the attribute * separate in case we change our minds at a future date. */ #define __ro_after_init __read_mostly #endif /* _ASM_TILE_CACHE_H */
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
You can’t perform that action at this time.