mirror of
https://github.com/Qortal/Brooklyn.git
synced 2025-02-11 17:55:54 +00:00
Pick me up in the school bus!
This commit is contained in:
parent
29d25fec93
commit
1ab1494c21
4
arch/.gitignore
vendored
4
arch/.gitignore
vendored
@ -1,3 +1,3 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
/i386/
|
||||
/x86_64/
|
||||
i386
|
||||
x86_64
|
||||
|
309
arch/Kconfig
309
arch/Kconfig
@ -33,6 +33,38 @@ config HOTPLUG_SMT
|
||||
config GENERIC_ENTRY
|
||||
bool
|
||||
|
||||
config OPROFILE
|
||||
tristate "OProfile system profiling"
|
||||
depends on PROFILING
|
||||
depends on HAVE_OPROFILE
|
||||
select RING_BUFFER
|
||||
select RING_BUFFER_ALLOW_SWAP
|
||||
help
|
||||
OProfile is a profiling system capable of profiling the
|
||||
whole system, include the kernel, kernel modules, libraries,
|
||||
and applications.
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
config OPROFILE_EVENT_MULTIPLEX
|
||||
bool "OProfile multiplexing support (EXPERIMENTAL)"
|
||||
default n
|
||||
depends on OPROFILE && X86
|
||||
help
|
||||
The number of hardware counters is limited. The multiplexing
|
||||
feature enables OProfile to gather more events than counters
|
||||
are provided by the hardware. This is realized by switching
|
||||
between events at a user specified time interval.
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
config HAVE_OPROFILE
|
||||
bool
|
||||
|
||||
config OPROFILE_NMI_TIMER
|
||||
def_bool y
|
||||
depends on PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !PPC64
|
||||
|
||||
config KPROBES
|
||||
bool "Kprobes"
|
||||
depends on MODULES
|
||||
@ -124,8 +156,8 @@ config HAVE_64BIT_ALIGNED_ACCESS
|
||||
accesses are required to be 64 bit aligned in this way even
|
||||
though it is not a 64 bit architecture.
|
||||
|
||||
See Documentation/core-api/unaligned-memory-access.rst for
|
||||
more information on the topic of unaligned memory accesses.
|
||||
See Documentation/unaligned-memory-access.txt for more
|
||||
information on the topic of unaligned memory accesses.
|
||||
|
||||
config HAVE_EFFICIENT_UNALIGNED_ACCESS
|
||||
bool
|
||||
@ -245,7 +277,7 @@ config ARCH_HAS_SET_DIRECT_MAP
|
||||
|
||||
#
|
||||
# Select if the architecture provides the arch_dma_set_uncached symbol to
|
||||
# either provide an uncached segment alias for a DMA allocation, or
|
||||
# either provide an uncached segement alias for a DMA allocation, or
|
||||
# to remap the page tables in place.
|
||||
#
|
||||
config ARCH_HAS_DMA_SET_UNCACHED
|
||||
@ -285,13 +317,6 @@ config ARCH_THREAD_STACK_ALLOCATOR
|
||||
config ARCH_WANTS_DYNAMIC_TASK_STRUCT
|
||||
bool
|
||||
|
||||
config ARCH_WANTS_NO_INSTR
|
||||
bool
|
||||
help
|
||||
An architecture should select this if the noinstr macro is being used on
|
||||
functions to denote that the toolchain should avoid instrumenting such
|
||||
functions and is required for correctness.
|
||||
|
||||
config ARCH_32BIT_OFF_T
|
||||
bool
|
||||
depends on !64BIT
|
||||
@ -302,21 +327,17 @@ config ARCH_32BIT_OFF_T
|
||||
still support 32-bit off_t. This option is enabled for all such
|
||||
architectures explicitly.
|
||||
|
||||
# Selected by 64 bit architectures which have a 32 bit f_tinode in struct ustat
|
||||
config ARCH_32BIT_USTAT_F_TINODE
|
||||
bool
|
||||
|
||||
config HAVE_ASM_MODVERSIONS
|
||||
bool
|
||||
help
|
||||
This symbol should be selected by an architecture if it provides
|
||||
This symbol should be selected by an architecure if it provides
|
||||
<asm/asm-prototypes.h> to support the module versioning for symbols
|
||||
exported from assembly code.
|
||||
|
||||
config HAVE_REGS_AND_STACK_ACCESS_API
|
||||
bool
|
||||
help
|
||||
This symbol should be selected by an architecture if it supports
|
||||
This symbol should be selected by an architecure if it supports
|
||||
the API needed to access registers and stack entries from pt_regs,
|
||||
declared in asm/ptrace.h
|
||||
For example the kprobes-based event tracer needs this API.
|
||||
@ -331,7 +352,7 @@ config HAVE_RSEQ
|
||||
config HAVE_FUNCTION_ARG_ACCESS_API
|
||||
bool
|
||||
help
|
||||
This symbol should be selected by an architecture if it supports
|
||||
This symbol should be selected by an architecure if it supports
|
||||
the API needed to access function arguments from pt_regs,
|
||||
declared in asm/ptrace.h
|
||||
|
||||
@ -481,9 +502,6 @@ config HAVE_ARCH_SECCOMP_FILTER
|
||||
- secure_computing return value is checked and a return value of -1
|
||||
results in the system call being skipped immediately.
|
||||
- seccomp syscall wired up
|
||||
- if !HAVE_SPARSE_SYSCALL_NR, have SECCOMP_ARCH_NATIVE,
|
||||
SECCOMP_ARCH_NATIVE_NR, SECCOMP_ARCH_NATIVE_NAME defined. If
|
||||
COMPAT is supported, have the SECCOMP_ARCH_COMPAT* defines too.
|
||||
|
||||
config SECCOMP
|
||||
prompt "Enable seccomp to safely execute untrusted bytecode"
|
||||
@ -512,20 +530,6 @@ config SECCOMP_FILTER
|
||||
|
||||
See Documentation/userspace-api/seccomp_filter.rst for details.
|
||||
|
||||
config SECCOMP_CACHE_DEBUG
|
||||
bool "Show seccomp filter cache status in /proc/pid/seccomp_cache"
|
||||
depends on SECCOMP_FILTER && !HAVE_SPARSE_SYSCALL_NR
|
||||
depends on PROC_FS
|
||||
help
|
||||
This enables the /proc/pid/seccomp_cache interface to monitor
|
||||
seccomp cache data. The file format is subject to change. Reading
|
||||
the file requires CAP_SYS_ADMIN.
|
||||
|
||||
This option is for debugging only. Enabling presents the risk that
|
||||
an adversary may be able to infer the seccomp filter logic.
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
config HAVE_ARCH_STACKLEAK
|
||||
bool
|
||||
help
|
||||
@ -610,139 +614,6 @@ config SHADOW_CALL_STACK
|
||||
reading and writing arbitrary memory may be able to locate them
|
||||
and hijack control flow by modifying the stacks.
|
||||
|
||||
config LTO
|
||||
bool
|
||||
help
|
||||
Selected if the kernel will be built using the compiler's LTO feature.
|
||||
|
||||
config LTO_CLANG
|
||||
bool
|
||||
select LTO
|
||||
help
|
||||
Selected if the kernel will be built using Clang's LTO feature.
|
||||
|
||||
config ARCH_SUPPORTS_LTO_CLANG
|
||||
bool
|
||||
help
|
||||
An architecture should select this option if it supports:
|
||||
- compiling with Clang,
|
||||
- compiling inline assembly with Clang's integrated assembler,
|
||||
- and linking with LLD.
|
||||
|
||||
config ARCH_SUPPORTS_LTO_CLANG_THIN
|
||||
bool
|
||||
help
|
||||
An architecture should select this option if it can support Clang's
|
||||
ThinLTO mode.
|
||||
|
||||
config HAS_LTO_CLANG
|
||||
def_bool y
|
||||
# Clang >= 11: https://github.com/ClangBuiltLinux/linux/issues/510
|
||||
depends on CC_IS_CLANG && CLANG_VERSION >= 110000 && LD_IS_LLD && AS_IS_LLVM
|
||||
depends on $(success,$(NM) --help | head -n 1 | grep -qi llvm)
|
||||
depends on $(success,$(AR) --help | head -n 1 | grep -qi llvm)
|
||||
depends on ARCH_SUPPORTS_LTO_CLANG
|
||||
depends on !FTRACE_MCOUNT_USE_RECORDMCOUNT
|
||||
depends on !KASAN || KASAN_HW_TAGS
|
||||
depends on !GCOV_KERNEL
|
||||
help
|
||||
The compiler and Kconfig options support building with Clang's
|
||||
LTO.
|
||||
|
||||
choice
|
||||
prompt "Link Time Optimization (LTO)"
|
||||
default LTO_NONE
|
||||
help
|
||||
This option enables Link Time Optimization (LTO), which allows the
|
||||
compiler to optimize binaries globally.
|
||||
|
||||
If unsure, select LTO_NONE. Note that LTO is very resource-intensive
|
||||
so it's disabled by default.
|
||||
|
||||
config LTO_NONE
|
||||
bool "None"
|
||||
help
|
||||
Build the kernel normally, without Link Time Optimization (LTO).
|
||||
|
||||
config LTO_CLANG_FULL
|
||||
bool "Clang Full LTO (EXPERIMENTAL)"
|
||||
depends on HAS_LTO_CLANG
|
||||
depends on !COMPILE_TEST
|
||||
select LTO_CLANG
|
||||
help
|
||||
This option enables Clang's full Link Time Optimization (LTO), which
|
||||
allows the compiler to optimize the kernel globally. If you enable
|
||||
this option, the compiler generates LLVM bitcode instead of ELF
|
||||
object files, and the actual compilation from bitcode happens at
|
||||
the LTO link step, which may take several minutes depending on the
|
||||
kernel configuration. More information can be found from LLVM's
|
||||
documentation:
|
||||
|
||||
https://llvm.org/docs/LinkTimeOptimization.html
|
||||
|
||||
During link time, this option can use a large amount of RAM, and
|
||||
may take much longer than the ThinLTO option.
|
||||
|
||||
config LTO_CLANG_THIN
|
||||
bool "Clang ThinLTO (EXPERIMENTAL)"
|
||||
depends on HAS_LTO_CLANG && ARCH_SUPPORTS_LTO_CLANG_THIN
|
||||
select LTO_CLANG
|
||||
help
|
||||
This option enables Clang's ThinLTO, which allows for parallel
|
||||
optimization and faster incremental compiles compared to the
|
||||
CONFIG_LTO_CLANG_FULL option. More information can be found
|
||||
from Clang's documentation:
|
||||
|
||||
https://clang.llvm.org/docs/ThinLTO.html
|
||||
|
||||
If unsure, say Y.
|
||||
endchoice
|
||||
|
||||
config ARCH_SUPPORTS_CFI_CLANG
|
||||
bool
|
||||
help
|
||||
An architecture should select this option if it can support Clang's
|
||||
Control-Flow Integrity (CFI) checking.
|
||||
|
||||
config CFI_CLANG
|
||||
bool "Use Clang's Control Flow Integrity (CFI)"
|
||||
depends on LTO_CLANG && ARCH_SUPPORTS_CFI_CLANG
|
||||
# Clang >= 12:
|
||||
# - https://bugs.llvm.org/show_bug.cgi?id=46258
|
||||
# - https://bugs.llvm.org/show_bug.cgi?id=47479
|
||||
depends on CLANG_VERSION >= 120000
|
||||
select KALLSYMS
|
||||
help
|
||||
This option enables Clang’s forward-edge Control Flow Integrity
|
||||
(CFI) checking, where the compiler injects a runtime check to each
|
||||
indirect function call to ensure the target is a valid function with
|
||||
the correct static type. This restricts possible call targets and
|
||||
makes it more difficult for an attacker to exploit bugs that allow
|
||||
the modification of stored function pointers. More information can be
|
||||
found from Clang's documentation:
|
||||
|
||||
https://clang.llvm.org/docs/ControlFlowIntegrity.html
|
||||
|
||||
config CFI_CLANG_SHADOW
|
||||
bool "Use CFI shadow to speed up cross-module checks"
|
||||
default y
|
||||
depends on CFI_CLANG && MODULES
|
||||
help
|
||||
If you select this option, the kernel builds a fast look-up table of
|
||||
CFI check functions in loaded modules to reduce performance overhead.
|
||||
|
||||
If unsure, say Y.
|
||||
|
||||
config CFI_PERMISSIVE
|
||||
bool "Use CFI in permissive mode"
|
||||
depends on CFI_CLANG
|
||||
help
|
||||
When selected, Control Flow Integrity (CFI) violations result in a
|
||||
warning instead of a kernel panic. This option should only be used
|
||||
for finding indirect call type mismatches during development.
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
config HAVE_ARCH_WITHIN_STACK_FRAMES
|
||||
bool
|
||||
help
|
||||
@ -763,23 +634,6 @@ config HAVE_CONTEXT_TRACKING
|
||||
protected inside rcu_irq_enter/rcu_irq_exit() but preemption or signal
|
||||
handling on irq exit still need to be protected.
|
||||
|
||||
config HAVE_CONTEXT_TRACKING_OFFSTACK
|
||||
bool
|
||||
help
|
||||
Architecture neither relies on exception_enter()/exception_exit()
|
||||
nor on schedule_user(). Also preempt_schedule_notrace() and
|
||||
preempt_schedule_irq() can't be called in a preemptible section
|
||||
while context tracking is CONTEXT_USER. This feature reflects a sane
|
||||
entry implementation where the following requirements are met on
|
||||
critical entry code, ie: before user_exit() or after user_enter():
|
||||
|
||||
- Critical entry code isn't preemptible (or better yet:
|
||||
not interruptible).
|
||||
- No use of RCU read side critical sections, unless rcu_nmi_enter()
|
||||
got called.
|
||||
- No use of instrumentation, unless instrumentation_begin() got
|
||||
called.
|
||||
|
||||
config HAVE_TIF_NOHZ
|
||||
bool
|
||||
help
|
||||
@ -789,12 +643,6 @@ config HAVE_TIF_NOHZ
|
||||
config HAVE_VIRT_CPU_ACCOUNTING
|
||||
bool
|
||||
|
||||
config HAVE_VIRT_CPU_ACCOUNTING_IDLE
|
||||
bool
|
||||
help
|
||||
Architecture has its own way to account idle CPU time and therefore
|
||||
doesn't implement vtime_account_idle().
|
||||
|
||||
config ARCH_HAS_SCALED_CPUTIME
|
||||
bool
|
||||
|
||||
@ -809,19 +657,13 @@ config HAVE_VIRT_CPU_ACCOUNTING_GEN
|
||||
some 32-bit arches may require multiple accesses, so proper
|
||||
locking is needed to protect against concurrent accesses.
|
||||
|
||||
|
||||
config HAVE_IRQ_TIME_ACCOUNTING
|
||||
bool
|
||||
help
|
||||
Archs need to ensure they use a high enough resolution clock to
|
||||
support irq time accounting and then call enable_sched_clock_irqtime().
|
||||
|
||||
config HAVE_MOVE_PUD
|
||||
bool
|
||||
help
|
||||
Architectures that select this are able to move page tables at the
|
||||
PUD level. If there are only 3 page table levels, the move effectively
|
||||
happens at the PGD level.
|
||||
|
||||
config HAVE_MOVE_PMD
|
||||
bool
|
||||
help
|
||||
@ -836,17 +678,6 @@ config HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD
|
||||
config HAVE_ARCH_HUGE_VMAP
|
||||
bool
|
||||
|
||||
#
|
||||
# Archs that select this would be capable of PMD-sized vmaps (i.e.,
|
||||
# arch_vmap_pmd_supported() returns true), and they must make no assumptions
|
||||
# that vmalloc memory is mapped with PAGE_SIZE ptes. The VM_NO_HUGE_VMAP flag
|
||||
# can be used to prohibit arch-specific allocations from using hugepages to
|
||||
# help with this (e.g., modules may require it).
|
||||
#
|
||||
config HAVE_ARCH_HUGE_VMALLOC
|
||||
depends on HAVE_ARCH_HUGE_VMAP
|
||||
bool
|
||||
|
||||
config ARCH_WANT_HUGE_PMD_SHARE
|
||||
bool
|
||||
|
||||
@ -882,12 +713,6 @@ config HAVE_IRQ_EXIT_ON_IRQ_STACK
|
||||
This spares a stack switch and improves cache usage on softirq
|
||||
processing.
|
||||
|
||||
config HAVE_SOFTIRQ_ON_OWN_STACK
|
||||
bool
|
||||
help
|
||||
Architecture provides a function to run __do_softirq() on a
|
||||
seperate stack.
|
||||
|
||||
config PGTABLE_LEVELS
|
||||
int
|
||||
default 2
|
||||
@ -1075,13 +900,6 @@ config COMPAT_32BIT_TIME
|
||||
config ARCH_NO_PREEMPT
|
||||
bool
|
||||
|
||||
config ARCH_EPHEMERAL_INODES
|
||||
def_bool n
|
||||
help
|
||||
An arch should select this symbol if it doesn't keep track of inode
|
||||
instances on its own, but instead relies on something else (e.g. the
|
||||
host kernel for an UML kernel).
|
||||
|
||||
config ARCH_SUPPORTS_RT
|
||||
bool
|
||||
|
||||
@ -1112,39 +930,16 @@ config VMAP_STACK
|
||||
default y
|
||||
bool "Use a virtually-mapped stack"
|
||||
depends on HAVE_ARCH_VMAP_STACK
|
||||
depends on !KASAN || KASAN_HW_TAGS || KASAN_VMALLOC
|
||||
depends on !KASAN || KASAN_VMALLOC
|
||||
help
|
||||
Enable this if you want the use virtually-mapped kernel stacks
|
||||
with guard pages. This causes kernel stack overflows to be
|
||||
caught immediately rather than causing difficult-to-diagnose
|
||||
corruption.
|
||||
|
||||
To use this with software KASAN modes, the architecture must support
|
||||
backing virtual mappings with real shadow memory, and KASAN_VMALLOC
|
||||
must be enabled.
|
||||
|
||||
config HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET
|
||||
def_bool n
|
||||
help
|
||||
An arch should select this symbol if it can support kernel stack
|
||||
offset randomization with calls to add_random_kstack_offset()
|
||||
during syscall entry and choose_random_kstack_offset() during
|
||||
syscall exit. Careful removal of -fstack-protector-strong and
|
||||
-fstack-protector should also be applied to the entry code and
|
||||
closely examined, as the artificial stack bump looks like an array
|
||||
to the compiler, so it will attempt to add canary checks regardless
|
||||
of the static branch state.
|
||||
|
||||
config RANDOMIZE_KSTACK_OFFSET_DEFAULT
|
||||
bool "Randomize kernel stack offset on syscall entry"
|
||||
depends on HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET
|
||||
help
|
||||
The kernel stack offset can be randomized (after pt_regs) by
|
||||
roughly 5 bits of entropy, frustrating memory corruption
|
||||
attacks that depend on stack address determinism or
|
||||
cross-syscall address exposures. This feature is controlled
|
||||
by kernel boot param "randomize_kstack_offset=on/off", and this
|
||||
config chooses the default boot state.
|
||||
To use this with KASAN, the architecture must support backing
|
||||
virtual mappings with real shadow memory, and KASAN_VMALLOC must
|
||||
be enabled.
|
||||
|
||||
config ARCH_OPTIONAL_KERNEL_RWX
|
||||
def_bool n
|
||||
@ -1249,15 +1044,6 @@ config HAVE_STATIC_CALL_INLINE
|
||||
bool
|
||||
depends on HAVE_STATIC_CALL
|
||||
|
||||
config HAVE_PREEMPT_DYNAMIC
|
||||
bool
|
||||
depends on HAVE_STATIC_CALL
|
||||
depends on GENERIC_ENTRY
|
||||
help
|
||||
Select this if the architecture support boot time preempt setting
|
||||
on top of static calls. It is strongly advised to support inline
|
||||
static call to avoid any overhead.
|
||||
|
||||
config ARCH_WANT_LD_ORPHAN_WARN
|
||||
bool
|
||||
help
|
||||
@ -1267,21 +1053,12 @@ config ARCH_WANT_LD_ORPHAN_WARN
|
||||
by the linker, since the locations of such sections can change between linker
|
||||
versions.
|
||||
|
||||
config HAVE_ARCH_PFN_VALID
|
||||
bool
|
||||
|
||||
config ARCH_SUPPORTS_DEBUG_PAGEALLOC
|
||||
bool
|
||||
|
||||
config ARCH_SPLIT_ARG64
|
||||
bool
|
||||
help
|
||||
If a 32-bit architecture requires 64-bit arguments to be split into
|
||||
pairs of 32-bit arguments, select this option.
|
||||
|
||||
config ARCH_HAS_ELFCORE_COMPAT
|
||||
bool
|
||||
|
||||
source "kernel/gcov/Kconfig"
|
||||
|
||||
source "scripts/gcc-plugins/Kconfig"
|
||||
|
@ -2,7 +2,6 @@
|
||||
config ALPHA
|
||||
bool
|
||||
default y
|
||||
select ARCH_32BIT_USTAT_F_TINODE
|
||||
select ARCH_MIGHT_HAVE_PC_PARPORT
|
||||
select ARCH_MIGHT_HAVE_PC_SERIO
|
||||
select ARCH_NO_PREEMPT
|
||||
@ -14,6 +13,8 @@ config ALPHA
|
||||
select PCI_SYSCALL if PCI
|
||||
select HAVE_AOUT
|
||||
select HAVE_ASM_MODVERSIONS
|
||||
select HAVE_IDE
|
||||
select HAVE_OPROFILE
|
||||
select HAVE_PCSPKR_PLATFORM
|
||||
select HAVE_PERF_EVENTS
|
||||
select NEED_DMA_MAP_STATE
|
||||
@ -26,6 +27,7 @@ config ALPHA
|
||||
select ARCH_WANT_IPC_PARSE_VERSION
|
||||
select ARCH_HAVE_NMI_SAFE_CMPXCHG
|
||||
select AUDIT_ARCH
|
||||
select GENERIC_CLOCKEVENTS
|
||||
select GENERIC_CPU_VULNERABILITIES
|
||||
select GENERIC_SMP_IDLE_THREAD
|
||||
select GENERIC_STRNCPY_FROM_USER
|
||||
@ -38,8 +40,6 @@ config ALPHA
|
||||
select CPU_NO_EFFICIENT_FFS if !ALPHA_EV67
|
||||
select MMU_GATHER_NO_RANGE
|
||||
select SET_FS
|
||||
select SPARSEMEM_EXTREME if SPARSEMEM
|
||||
select ZONE_DMA
|
||||
help
|
||||
The Alpha is a 64-bit general-purpose processor designed and
|
||||
marketed by the Digital Equipment Corporation of blessed memory,
|
||||
@ -65,6 +65,10 @@ config GENERIC_CALIBRATE_DELAY
|
||||
bool
|
||||
default y
|
||||
|
||||
config ZONE_DMA
|
||||
bool
|
||||
default y
|
||||
|
||||
config GENERIC_ISA_DMA
|
||||
bool
|
||||
default y
|
||||
@ -531,7 +535,7 @@ config SMP
|
||||
will run faster if you say N here.
|
||||
|
||||
See also the SMP-HOWTO available at
|
||||
<https://www.tldp.org/docs.html#howto>.
|
||||
<http://www.tldp.org/docs.html#howto>.
|
||||
|
||||
If you don't know what to do here, say N.
|
||||
|
||||
@ -545,11 +549,21 @@ config NR_CPUS
|
||||
MARVEL support can handle a maximum of 32 CPUs, all the others
|
||||
with working support have a maximum of 4 CPUs.
|
||||
|
||||
config ARCH_SPARSEMEM_ENABLE
|
||||
bool "Sparse Memory Support"
|
||||
config ARCH_DISCONTIGMEM_ENABLE
|
||||
bool "Discontiguous Memory Support"
|
||||
help
|
||||
Say Y to support efficient handling of discontiguous physical memory,
|
||||
for systems that have huge holes in the physical address space.
|
||||
for architectures which are either NUMA (Non-Uniform Memory Access)
|
||||
or have huge holes in the physical address space for other reasons.
|
||||
See <file:Documentation/vm/numa.rst> for more.
|
||||
|
||||
config NUMA
|
||||
bool "NUMA Support (EXPERIMENTAL)"
|
||||
depends on DISCONTIGMEM && BROKEN
|
||||
help
|
||||
Say Y to compile the kernel to support NUMA (Non-Uniform Memory
|
||||
Access). This option is for configuring high-end multiprocessor
|
||||
server machines. If in doubt, say N.
|
||||
|
||||
config ALPHA_WTINT
|
||||
bool "Use WTINT" if ALPHA_SRM || ALPHA_GENERIC
|
||||
@ -575,6 +589,11 @@ config ALPHA_WTINT
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
config NODES_SHIFT
|
||||
int
|
||||
default "7"
|
||||
depends on NEED_MULTIPLE_NODES
|
||||
|
||||
# LARGE_VMALLOC is racy, if you *really* need it then fix it first
|
||||
config ALPHA_LARGE_VMALLOC
|
||||
bool
|
||||
|
@ -38,6 +38,9 @@ KBUILD_CFLAGS += $(cflags-y) -Wa,-mev6
|
||||
|
||||
head-y := arch/alpha/kernel/head.o
|
||||
|
||||
core-y += arch/alpha/kernel/ arch/alpha/mm/
|
||||
core-$(CONFIG_MATHEMU) += arch/alpha/math-emu/
|
||||
drivers-$(CONFIG_OPROFILE) += arch/alpha/oprofile/
|
||||
libs-y += arch/alpha/lib/
|
||||
|
||||
# export what is needed by arch/alpha/boot/Makefile
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "ksize.h"
|
||||
|
||||
extern unsigned long switch_to_osf_pal(unsigned long nr,
|
||||
struct pcb_struct *pcb_va, struct pcb_struct *pcb_pa,
|
||||
struct pcb_struct * pcb_va, struct pcb_struct * pcb_pa,
|
||||
unsigned long *vptb);
|
||||
|
||||
extern void move_stack(unsigned long new_stack);
|
||||
|
@ -200,7 +200,7 @@ extern char _end;
|
||||
START_ADDR KSEG address of the entry point of kernel code.
|
||||
|
||||
ZERO_PGE KSEG address of page full of zeroes, but
|
||||
upon entry to kernel, it can be expected
|
||||
upon entry to kerne cvan be expected
|
||||
to hold the parameter list and possible
|
||||
INTRD information.
|
||||
|
||||
|
@ -30,7 +30,7 @@ extern long srm_printk(const char *, ...)
|
||||
__attribute__ ((format (printf, 1, 2)));
|
||||
|
||||
/*
|
||||
* gzip declarations
|
||||
* gzip delarations
|
||||
*/
|
||||
#define OF(args) args
|
||||
#define STATIC static
|
||||
|
@ -1,3 +1,4 @@
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_SYSVIPC=y
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
CONFIG_LOG_BUF_SHIFT=14
|
||||
@ -25,18 +26,19 @@ CONFIG_PNP=y
|
||||
CONFIG_ISAPNP=y
|
||||
CONFIG_BLK_DEV_FD=y
|
||||
CONFIG_BLK_DEV_LOOP=m
|
||||
CONFIG_IDE=y
|
||||
CONFIG_BLK_DEV_IDECD=y
|
||||
CONFIG_IDE_GENERIC=y
|
||||
CONFIG_BLK_DEV_GENERIC=y
|
||||
CONFIG_BLK_DEV_ALI15X3=y
|
||||
CONFIG_BLK_DEV_CMD64X=y
|
||||
CONFIG_BLK_DEV_CY82C693=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_BLK_DEV_SR=y
|
||||
CONFIG_SCSI_AIC7XXX=m
|
||||
CONFIG_AIC7XXX_CMDS_PER_DEVICE=253
|
||||
# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
|
||||
CONFIG_ATA=y
|
||||
# CONFIG_SATA_PMP is not set
|
||||
CONFIG_PATA_ALI=y
|
||||
CONFIG_PATA_CMD64X=y
|
||||
CONFIG_PATA_CYPRESS=y
|
||||
CONFIG_ATA_GENERIC=y
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_DUMMY=m
|
||||
CONFIG_NET_ETHERNET=y
|
||||
@ -70,4 +72,3 @@ CONFIG_DEBUG_INFO=y
|
||||
CONFIG_ALPHA_LEGACY_START_ADDRESS=y
|
||||
CONFIG_MATHEMU=y
|
||||
CONFIG_CRYPTO_HMAC=y
|
||||
CONFIG_DEVTMPFS=y
|
||||
|
@ -26,11 +26,11 @@
|
||||
|
||||
#define ATOMIC64_INIT(i) { (i) }
|
||||
|
||||
#define arch_atomic_read(v) READ_ONCE((v)->counter)
|
||||
#define arch_atomic64_read(v) READ_ONCE((v)->counter)
|
||||
#define atomic_read(v) READ_ONCE((v)->counter)
|
||||
#define atomic64_read(v) READ_ONCE((v)->counter)
|
||||
|
||||
#define arch_atomic_set(v,i) WRITE_ONCE((v)->counter, (i))
|
||||
#define arch_atomic64_set(v,i) WRITE_ONCE((v)->counter, (i))
|
||||
#define atomic_set(v,i) WRITE_ONCE((v)->counter, (i))
|
||||
#define atomic64_set(v,i) WRITE_ONCE((v)->counter, (i))
|
||||
|
||||
/*
|
||||
* To get proper branch prediction for the main line, we must branch
|
||||
@ -39,7 +39,7 @@
|
||||
*/
|
||||
|
||||
#define ATOMIC_OP(op, asm_op) \
|
||||
static __inline__ void arch_atomic_##op(int i, atomic_t * v) \
|
||||
static __inline__ void atomic_##op(int i, atomic_t * v) \
|
||||
{ \
|
||||
unsigned long temp; \
|
||||
__asm__ __volatile__( \
|
||||
@ -55,7 +55,7 @@ static __inline__ void arch_atomic_##op(int i, atomic_t * v) \
|
||||
} \
|
||||
|
||||
#define ATOMIC_OP_RETURN(op, asm_op) \
|
||||
static inline int arch_atomic_##op##_return_relaxed(int i, atomic_t *v) \
|
||||
static inline int atomic_##op##_return_relaxed(int i, atomic_t *v) \
|
||||
{ \
|
||||
long temp, result; \
|
||||
__asm__ __volatile__( \
|
||||
@ -74,7 +74,7 @@ static inline int arch_atomic_##op##_return_relaxed(int i, atomic_t *v) \
|
||||
}
|
||||
|
||||
#define ATOMIC_FETCH_OP(op, asm_op) \
|
||||
static inline int arch_atomic_fetch_##op##_relaxed(int i, atomic_t *v) \
|
||||
static inline int atomic_fetch_##op##_relaxed(int i, atomic_t *v) \
|
||||
{ \
|
||||
long temp, result; \
|
||||
__asm__ __volatile__( \
|
||||
@ -92,7 +92,7 @@ static inline int arch_atomic_fetch_##op##_relaxed(int i, atomic_t *v) \
|
||||
}
|
||||
|
||||
#define ATOMIC64_OP(op, asm_op) \
|
||||
static __inline__ void arch_atomic64_##op(s64 i, atomic64_t * v) \
|
||||
static __inline__ void atomic64_##op(s64 i, atomic64_t * v) \
|
||||
{ \
|
||||
s64 temp; \
|
||||
__asm__ __volatile__( \
|
||||
@ -108,8 +108,7 @@ static __inline__ void arch_atomic64_##op(s64 i, atomic64_t * v) \
|
||||
} \
|
||||
|
||||
#define ATOMIC64_OP_RETURN(op, asm_op) \
|
||||
static __inline__ s64 \
|
||||
arch_atomic64_##op##_return_relaxed(s64 i, atomic64_t * v) \
|
||||
static __inline__ s64 atomic64_##op##_return_relaxed(s64 i, atomic64_t * v) \
|
||||
{ \
|
||||
s64 temp, result; \
|
||||
__asm__ __volatile__( \
|
||||
@ -128,8 +127,7 @@ arch_atomic64_##op##_return_relaxed(s64 i, atomic64_t * v) \
|
||||
}
|
||||
|
||||
#define ATOMIC64_FETCH_OP(op, asm_op) \
|
||||
static __inline__ s64 \
|
||||
arch_atomic64_fetch_##op##_relaxed(s64 i, atomic64_t * v) \
|
||||
static __inline__ s64 atomic64_fetch_##op##_relaxed(s64 i, atomic64_t * v) \
|
||||
{ \
|
||||
s64 temp, result; \
|
||||
__asm__ __volatile__( \
|
||||
@ -157,18 +155,18 @@ arch_atomic64_fetch_##op##_relaxed(s64 i, atomic64_t * v) \
|
||||
ATOMIC_OPS(add)
|
||||
ATOMIC_OPS(sub)
|
||||
|
||||
#define arch_atomic_add_return_relaxed arch_atomic_add_return_relaxed
|
||||
#define arch_atomic_sub_return_relaxed arch_atomic_sub_return_relaxed
|
||||
#define arch_atomic_fetch_add_relaxed arch_atomic_fetch_add_relaxed
|
||||
#define arch_atomic_fetch_sub_relaxed arch_atomic_fetch_sub_relaxed
|
||||
#define atomic_add_return_relaxed atomic_add_return_relaxed
|
||||
#define atomic_sub_return_relaxed atomic_sub_return_relaxed
|
||||
#define atomic_fetch_add_relaxed atomic_fetch_add_relaxed
|
||||
#define atomic_fetch_sub_relaxed atomic_fetch_sub_relaxed
|
||||
|
||||
#define arch_atomic64_add_return_relaxed arch_atomic64_add_return_relaxed
|
||||
#define arch_atomic64_sub_return_relaxed arch_atomic64_sub_return_relaxed
|
||||
#define arch_atomic64_fetch_add_relaxed arch_atomic64_fetch_add_relaxed
|
||||
#define arch_atomic64_fetch_sub_relaxed arch_atomic64_fetch_sub_relaxed
|
||||
#define atomic64_add_return_relaxed atomic64_add_return_relaxed
|
||||
#define atomic64_sub_return_relaxed atomic64_sub_return_relaxed
|
||||
#define atomic64_fetch_add_relaxed atomic64_fetch_add_relaxed
|
||||
#define atomic64_fetch_sub_relaxed atomic64_fetch_sub_relaxed
|
||||
|
||||
#define arch_atomic_andnot arch_atomic_andnot
|
||||
#define arch_atomic64_andnot arch_atomic64_andnot
|
||||
#define atomic_andnot atomic_andnot
|
||||
#define atomic64_andnot atomic64_andnot
|
||||
|
||||
#undef ATOMIC_OPS
|
||||
#define ATOMIC_OPS(op, asm) \
|
||||
@ -182,15 +180,15 @@ ATOMIC_OPS(andnot, bic)
|
||||
ATOMIC_OPS(or, bis)
|
||||
ATOMIC_OPS(xor, xor)
|
||||
|
||||
#define arch_atomic_fetch_and_relaxed arch_atomic_fetch_and_relaxed
|
||||
#define arch_atomic_fetch_andnot_relaxed arch_atomic_fetch_andnot_relaxed
|
||||
#define arch_atomic_fetch_or_relaxed arch_atomic_fetch_or_relaxed
|
||||
#define arch_atomic_fetch_xor_relaxed arch_atomic_fetch_xor_relaxed
|
||||
#define atomic_fetch_and_relaxed atomic_fetch_and_relaxed
|
||||
#define atomic_fetch_andnot_relaxed atomic_fetch_andnot_relaxed
|
||||
#define atomic_fetch_or_relaxed atomic_fetch_or_relaxed
|
||||
#define atomic_fetch_xor_relaxed atomic_fetch_xor_relaxed
|
||||
|
||||
#define arch_atomic64_fetch_and_relaxed arch_atomic64_fetch_and_relaxed
|
||||
#define arch_atomic64_fetch_andnot_relaxed arch_atomic64_fetch_andnot_relaxed
|
||||
#define arch_atomic64_fetch_or_relaxed arch_atomic64_fetch_or_relaxed
|
||||
#define arch_atomic64_fetch_xor_relaxed arch_atomic64_fetch_xor_relaxed
|
||||
#define atomic64_fetch_and_relaxed atomic64_fetch_and_relaxed
|
||||
#define atomic64_fetch_andnot_relaxed atomic64_fetch_andnot_relaxed
|
||||
#define atomic64_fetch_or_relaxed atomic64_fetch_or_relaxed
|
||||
#define atomic64_fetch_xor_relaxed atomic64_fetch_xor_relaxed
|
||||
|
||||
#undef ATOMIC_OPS
|
||||
#undef ATOMIC64_FETCH_OP
|
||||
@ -200,18 +198,14 @@ ATOMIC_OPS(xor, xor)
|
||||
#undef ATOMIC_OP_RETURN
|
||||
#undef ATOMIC_OP
|
||||
|
||||
#define arch_atomic64_cmpxchg(v, old, new) \
|
||||
(arch_cmpxchg(&((v)->counter), old, new))
|
||||
#define arch_atomic64_xchg(v, new) \
|
||||
(arch_xchg(&((v)->counter), new))
|
||||
#define atomic64_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), old, new))
|
||||
#define atomic64_xchg(v, new) (xchg(&((v)->counter), new))
|
||||
|
||||
#define arch_atomic_cmpxchg(v, old, new) \
|
||||
(arch_cmpxchg(&((v)->counter), old, new))
|
||||
#define arch_atomic_xchg(v, new) \
|
||||
(arch_xchg(&((v)->counter), new))
|
||||
#define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), old, new))
|
||||
#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
|
||||
|
||||
/**
|
||||
* arch_atomic_fetch_add_unless - add unless the number is a given value
|
||||
* atomic_fetch_add_unless - add unless the number is a given value
|
||||
* @v: pointer of type atomic_t
|
||||
* @a: the amount to add to v...
|
||||
* @u: ...unless v is equal to u.
|
||||
@ -219,7 +213,7 @@ ATOMIC_OPS(xor, xor)
|
||||
* Atomically adds @a to @v, so long as it was not @u.
|
||||
* Returns the old value of @v.
|
||||
*/
|
||||
static __inline__ int arch_atomic_fetch_add_unless(atomic_t *v, int a, int u)
|
||||
static __inline__ int atomic_fetch_add_unless(atomic_t *v, int a, int u)
|
||||
{
|
||||
int c, new, old;
|
||||
smp_mb();
|
||||
@ -240,10 +234,10 @@ static __inline__ int arch_atomic_fetch_add_unless(atomic_t *v, int a, int u)
|
||||
smp_mb();
|
||||
return old;
|
||||
}
|
||||
#define arch_atomic_fetch_add_unless arch_atomic_fetch_add_unless
|
||||
#define atomic_fetch_add_unless atomic_fetch_add_unless
|
||||
|
||||
/**
|
||||
* arch_atomic64_fetch_add_unless - add unless the number is a given value
|
||||
* atomic64_fetch_add_unless - add unless the number is a given value
|
||||
* @v: pointer of type atomic64_t
|
||||
* @a: the amount to add to v...
|
||||
* @u: ...unless v is equal to u.
|
||||
@ -251,7 +245,7 @@ static __inline__ int arch_atomic_fetch_add_unless(atomic_t *v, int a, int u)
|
||||
* Atomically adds @a to @v, so long as it was not @u.
|
||||
* Returns the old value of @v.
|
||||
*/
|
||||
static __inline__ s64 arch_atomic64_fetch_add_unless(atomic64_t *v, s64 a, s64 u)
|
||||
static __inline__ s64 atomic64_fetch_add_unless(atomic64_t *v, s64 a, s64 u)
|
||||
{
|
||||
s64 c, new, old;
|
||||
smp_mb();
|
||||
@ -272,16 +266,16 @@ static __inline__ s64 arch_atomic64_fetch_add_unless(atomic64_t *v, s64 a, s64 u
|
||||
smp_mb();
|
||||
return old;
|
||||
}
|
||||
#define arch_atomic64_fetch_add_unless arch_atomic64_fetch_add_unless
|
||||
#define atomic64_fetch_add_unless atomic64_fetch_add_unless
|
||||
|
||||
/*
|
||||
* arch_atomic64_dec_if_positive - decrement by 1 if old value positive
|
||||
* atomic64_dec_if_positive - decrement by 1 if old value positive
|
||||
* @v: pointer of type atomic_t
|
||||
*
|
||||
* The function returns the old value of *v minus 1, even if
|
||||
* the atomic variable, v, was not decremented.
|
||||
*/
|
||||
static inline s64 arch_atomic64_dec_if_positive(atomic64_t *v)
|
||||
static inline s64 atomic64_dec_if_positive(atomic64_t *v)
|
||||
{
|
||||
s64 old, tmp;
|
||||
smp_mb();
|
||||
@ -301,6 +295,6 @@ static inline s64 arch_atomic64_dec_if_positive(atomic64_t *v)
|
||||
smp_mb();
|
||||
return old - 1;
|
||||
}
|
||||
#define arch_atomic64_dec_if_positive arch_atomic64_dec_if_positive
|
||||
#define atomic64_dec_if_positive atomic64_dec_if_positive
|
||||
|
||||
#endif /* _ALPHA_ATOMIC_H */
|
||||
|
@ -17,7 +17,7 @@
|
||||
sizeof(*(ptr))); \
|
||||
})
|
||||
|
||||
#define arch_cmpxchg_local(ptr, o, n) \
|
||||
#define cmpxchg_local(ptr, o, n) \
|
||||
({ \
|
||||
__typeof__(*(ptr)) _o_ = (o); \
|
||||
__typeof__(*(ptr)) _n_ = (n); \
|
||||
@ -26,7 +26,7 @@
|
||||
sizeof(*(ptr))); \
|
||||
})
|
||||
|
||||
#define arch_cmpxchg64_local(ptr, o, n) \
|
||||
#define cmpxchg64_local(ptr, o, n) \
|
||||
({ \
|
||||
BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
|
||||
cmpxchg_local((ptr), (o), (n)); \
|
||||
@ -42,7 +42,7 @@
|
||||
* The leading and the trailing memory barriers guarantee that these
|
||||
* operations are fully ordered.
|
||||
*/
|
||||
#define arch_xchg(ptr, x) \
|
||||
#define xchg(ptr, x) \
|
||||
({ \
|
||||
__typeof__(*(ptr)) __ret; \
|
||||
__typeof__(*(ptr)) _x_ = (x); \
|
||||
@ -53,7 +53,7 @@
|
||||
__ret; \
|
||||
})
|
||||
|
||||
#define arch_cmpxchg(ptr, o, n) \
|
||||
#define cmpxchg(ptr, o, n) \
|
||||
({ \
|
||||
__typeof__(*(ptr)) __ret; \
|
||||
__typeof__(*(ptr)) _o_ = (o); \
|
||||
@ -65,10 +65,10 @@
|
||||
__ret; \
|
||||
})
|
||||
|
||||
#define arch_cmpxchg64(ptr, o, n) \
|
||||
#define cmpxchg64(ptr, o, n) \
|
||||
({ \
|
||||
BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
|
||||
arch_cmpxchg((ptr), (o), (n)); \
|
||||
cmpxchg((ptr), (o), (n)); \
|
||||
})
|
||||
|
||||
#undef ____cmpxchg
|
||||
|
@ -4,4 +4,15 @@
|
||||
|
||||
#include <uapi/asm/compiler.h>
|
||||
|
||||
/* Some idiots over in <linux/compiler.h> thought inline should imply
|
||||
always_inline. This breaks stuff. We'll include this file whenever
|
||||
we run into such problems. */
|
||||
|
||||
#include <linux/compiler.h>
|
||||
#undef inline
|
||||
#undef __inline__
|
||||
#undef __inline
|
||||
#undef __always_inline
|
||||
#define __always_inline inline __attribute__((always_inline))
|
||||
|
||||
#endif /* __ALPHA_COMPILER_H */
|
||||
|
@ -602,6 +602,11 @@ extern void outsl (unsigned long port, const void *src, unsigned long count);
|
||||
*/
|
||||
#define xlate_dev_mem_ptr(p) __va(p)
|
||||
|
||||
/*
|
||||
* Convert a virtual cached pointer to an uncached pointer
|
||||
*/
|
||||
#define xlate_dev_kmem_ptr(p) p
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* __ALPHA_IO_H */
|
||||
|
15
arch/alpha/include/asm/kmap_types.h
Normal file
15
arch/alpha/include/asm/kmap_types.h
Normal file
@ -0,0 +1,15 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef _ASM_KMAP_TYPES_H
|
||||
#define _ASM_KMAP_TYPES_H
|
||||
|
||||
/* Dummy header just to define km_type. */
|
||||
|
||||
#ifdef CONFIG_DEBUG_HIGHMEM
|
||||
#define __WITH_KM_FENCE
|
||||
#endif
|
||||
|
||||
#include <asm-generic/kmap_types.h>
|
||||
|
||||
#undef __WITH_KM_FENCE
|
||||
|
||||
#endif
|
@ -99,6 +99,12 @@ struct alpha_machine_vector
|
||||
|
||||
const char *vector_name;
|
||||
|
||||
/* NUMA information */
|
||||
int (*pa_to_nid)(unsigned long);
|
||||
int (*cpuid_to_nid)(int);
|
||||
unsigned long (*node_mem_start)(int);
|
||||
unsigned long (*node_mem_size)(int);
|
||||
|
||||
/* System specific parameters. */
|
||||
union {
|
||||
struct {
|
||||
|
@ -214,6 +214,8 @@ ev4_activate_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm)
|
||||
tbiap();
|
||||
}
|
||||
|
||||
#define deactivate_mm(tsk,mm) do { } while (0)
|
||||
|
||||
#ifdef CONFIG_ALPHA_GENERIC
|
||||
# define switch_mm(a,b,c) alpha_mv.mv_switch_mm((a),(b),(c))
|
||||
# define activate_mm(x,y) alpha_mv.mv_activate_mm((x),(y))
|
||||
@ -227,7 +229,6 @@ ev4_activate_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define init_new_context init_new_context
|
||||
static inline int
|
||||
init_new_context(struct task_struct *tsk, struct mm_struct *mm)
|
||||
{
|
||||
@ -241,7 +242,12 @@ init_new_context(struct task_struct *tsk, struct mm_struct *mm)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define enter_lazy_tlb enter_lazy_tlb
|
||||
extern inline void
|
||||
destroy_context(struct mm_struct *mm)
|
||||
{
|
||||
/* Nothing to do. */
|
||||
}
|
||||
|
||||
static inline void
|
||||
enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
|
||||
{
|
||||
@ -249,8 +255,6 @@ enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
|
||||
= ((unsigned long)mm->pgd - IDENT_ADDR) >> PAGE_SHIFT;
|
||||
}
|
||||
|
||||
#include <asm-generic/mmu_context.h>
|
||||
|
||||
#ifdef __MMU_EXTERN_INLINE
|
||||
#undef __EXTERN_INLINE
|
||||
#undef __MMU_EXTERN_INLINE
|
||||
|
@ -6,8 +6,6 @@
|
||||
#ifndef _ASM_MMZONE_H_
|
||||
#define _ASM_MMZONE_H_
|
||||
|
||||
#ifdef CONFIG_DISCONTIGMEM
|
||||
|
||||
#include <asm/smp.h>
|
||||
|
||||
/*
|
||||
@ -47,6 +45,8 @@ PLAT_NODE_DATA_LOCALNR(unsigned long p, int n)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DISCONTIGMEM
|
||||
|
||||
/*
|
||||
* Following are macros that each numa implementation must define.
|
||||
*/
|
||||
@ -68,6 +68,11 @@ PLAT_NODE_DATA_LOCALNR(unsigned long p, int n)
|
||||
/* XXX: FIXME -- nyc */
|
||||
#define kern_addr_valid(kaddr) (0)
|
||||
|
||||
#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
|
||||
|
||||
#define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> 32))
|
||||
#define pte_pfn(pte) (pte_val(pte) >> 32)
|
||||
|
||||
#define mk_pte(page, pgprot) \
|
||||
({ \
|
||||
pte_t pte; \
|
||||
@ -90,11 +95,16 @@ PLAT_NODE_DATA_LOCALNR(unsigned long p, int n)
|
||||
__xx; \
|
||||
})
|
||||
|
||||
#define page_to_pa(page) \
|
||||
(page_to_pfn(page) << PAGE_SHIFT)
|
||||
|
||||
#define pfn_to_nid(pfn) pa_to_nid(((u64)(pfn) << PAGE_SHIFT))
|
||||
#define pfn_valid(pfn) \
|
||||
(((pfn) - node_start_pfn(pfn_to_nid(pfn))) < \
|
||||
node_spanned_pages(pfn_to_nid(pfn))) \
|
||||
|
||||
#define virt_addr_valid(kaddr) pfn_valid((__pa(kaddr) >> PAGE_SHIFT))
|
||||
|
||||
#endif /* CONFIG_DISCONTIGMEM */
|
||||
|
||||
#endif /* _ASM_MMZONE_H_ */
|
||||
|
@ -17,9 +17,9 @@
|
||||
extern void clear_page(void *page);
|
||||
#define clear_user_page(page, vaddr, pg) clear_page(page)
|
||||
|
||||
#define alloc_zeroed_user_highpage_movable(vma, vaddr) \
|
||||
alloc_page_vma(GFP_HIGHUSER_MOVABLE | __GFP_ZERO, vma, vmaddr)
|
||||
#define __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE_MOVABLE
|
||||
#define __alloc_zeroed_user_highpage(movableflags, vma, vaddr) \
|
||||
alloc_page_vma(GFP_HIGHUSER | __GFP_ZERO | movableflags, vma, vmaddr)
|
||||
#define __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE
|
||||
|
||||
extern void copy_page(void * _to, void * _from);
|
||||
#define copy_user_page(to, from, vaddr, pg) copy_page(to, from)
|
||||
@ -83,13 +83,12 @@ typedef struct page *pgtable_t;
|
||||
|
||||
#define __pa(x) ((unsigned long) (x) - PAGE_OFFSET)
|
||||
#define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET))
|
||||
|
||||
#ifndef CONFIG_DISCONTIGMEM
|
||||
#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
|
||||
#define virt_addr_valid(kaddr) pfn_valid((__pa(kaddr) >> PAGE_SHIFT))
|
||||
|
||||
#ifdef CONFIG_FLATMEM
|
||||
#define pfn_valid(pfn) ((pfn) < max_mapnr)
|
||||
#endif /* CONFIG_FLATMEM */
|
||||
#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
|
||||
#endif /* CONFIG_DISCONTIGMEM */
|
||||
|
||||
#include <asm-generic/memory_model.h>
|
||||
#include <asm-generic/getorder.h>
|
||||
|
@ -18,6 +18,7 @@ pmd_populate(struct mm_struct *mm, pmd_t *pmd, pgtable_t pte)
|
||||
{
|
||||
pmd_set(pmd, (pte_t *)(page_to_pa(pte) + PAGE_OFFSET));
|
||||
}
|
||||
#define pmd_pgtable(pmd) pmd_page(pmd)
|
||||
|
||||
static inline void
|
||||
pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte)
|
||||
|
@ -46,6 +46,7 @@ struct vm_area_struct;
|
||||
#define PTRS_PER_PMD (1UL << (PAGE_SHIFT-3))
|
||||
#define PTRS_PER_PGD (1UL << (PAGE_SHIFT-3))
|
||||
#define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE)
|
||||
#define FIRST_USER_ADDRESS 0UL
|
||||
|
||||
/* Number of pointers that fit on a page: this will go away. */
|
||||
#define PTRS_PER_PAGE (1UL << (PAGE_SHIFT-3))
|
||||
@ -202,9 +203,10 @@ extern unsigned long __zero_page(void);
|
||||
* Conversion functions: convert a page and protection to a page entry,
|
||||
* and a page entry and page directory to the page they refer to.
|
||||
*/
|
||||
#define page_to_pa(page) (page_to_pfn(page) << PAGE_SHIFT)
|
||||
#define pte_pfn(pte) (pte_val(pte) >> 32)
|
||||
#ifndef CONFIG_DISCONTIGMEM
|
||||
#define page_to_pa(page) (((page) - mem_map) << PAGE_SHIFT)
|
||||
|
||||
#define pte_pfn(pte) (pte_val(pte) >> 32)
|
||||
#define pte_page(pte) pfn_to_page(pte_pfn(pte))
|
||||
#define mk_pte(page, pgprot) \
|
||||
({ \
|
||||
@ -213,6 +215,7 @@ extern unsigned long __zero_page(void);
|
||||
pte_val(pte) = (page_to_pfn(page) << 32) | pgprot_val(pgprot); \
|
||||
pte; \
|
||||
})
|
||||
#endif
|
||||
|
||||
extern inline pte_t pfn_pte(unsigned long physpfn, pgprot_t pgprot)
|
||||
{ pte_t pte; pte_val(pte) = (PHYS_TWIDDLE(physpfn) << 32) | pgprot_val(pgprot); return pte; }
|
||||
@ -233,13 +236,13 @@ pmd_page_vaddr(pmd_t pmd)
|
||||
return ((pmd_val(pmd) & _PFN_MASK) >> (32-PAGE_SHIFT)) + PAGE_OFFSET;
|
||||
}
|
||||
|
||||
#define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> 32))
|
||||
#define pud_page(pud) (pfn_to_page(pud_val(pud) >> 32))
|
||||
#ifndef CONFIG_DISCONTIGMEM
|
||||
#define pmd_page(pmd) (mem_map + ((pmd_val(pmd) & _PFN_MASK) >> 32))
|
||||
#define pud_page(pud) (mem_map + ((pud_val(pud) & _PFN_MASK) >> 32))
|
||||
#endif
|
||||
|
||||
extern inline pmd_t *pud_pgtable(pud_t pgd)
|
||||
{
|
||||
return (pmd_t *)(PAGE_OFFSET + ((pud_val(pgd) & _PFN_MASK) >> (32-PAGE_SHIFT)));
|
||||
}
|
||||
extern inline unsigned long pud_page_vaddr(pud_t pgd)
|
||||
{ return PAGE_OFFSET + ((pud_val(pgd) & _PFN_MASK) >> (32-PAGE_SHIFT)); }
|
||||
|
||||
extern inline int pte_none(pte_t pte) { return !pte_val(pte); }
|
||||
extern inline int pte_present(pte_t pte) { return pte_val(pte) & _PAGE_VALID; }
|
||||
@ -289,7 +292,7 @@ extern inline pte_t pte_mkyoung(pte_t pte) { pte_val(pte) |= __ACCESS_BITS; retu
|
||||
/* Find an entry in the second-level page table.. */
|
||||
extern inline pmd_t * pmd_offset(pud_t * dir, unsigned long address)
|
||||
{
|
||||
pmd_t *ret = pud_pgtable(*dir) + ((address >> PMD_SHIFT) & (PTRS_PER_PAGE - 1));
|
||||
pmd_t *ret = (pmd_t *) pud_page_vaddr(*dir) + ((address >> PMD_SHIFT) & (PTRS_PER_PAGE - 1));
|
||||
smp_rmb(); /* see above */
|
||||
return ret;
|
||||
}
|
||||
@ -329,7 +332,9 @@ extern inline pte_t mk_swap_pte(unsigned long type, unsigned long offset)
|
||||
#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
|
||||
#define __swp_entry_to_pte(x) ((pte_t) { (x).val })
|
||||
|
||||
#ifndef CONFIG_DISCONTIGMEM
|
||||
#define kern_addr_valid(addr) (1)
|
||||
#endif
|
||||
|
||||
#define pte_ERROR(e) \
|
||||
printk("%s:%d: bad pte %016lx.\n", __FILE__, __LINE__, pte_val(e))
|
||||
|
@ -9,10 +9,4 @@ static inline int syscall_get_arch(struct task_struct *task)
|
||||
return AUDIT_ARCH_ALPHA;
|
||||
}
|
||||
|
||||
static inline long syscall_get_return_value(struct task_struct *task,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
return regs->r0;
|
||||
}
|
||||
|
||||
#endif /* _ASM_ALPHA_SYSCALL_H */
|
||||
|
@ -62,7 +62,6 @@ register struct thread_info *__current_thread_info __asm__("$8");
|
||||
#define TIF_SIGPENDING 2 /* signal pending */
|
||||
#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
|
||||
#define TIF_SYSCALL_AUDIT 4 /* syscall audit active */
|
||||
#define TIF_NOTIFY_SIGNAL 5 /* signal notifications exist */
|
||||
#define TIF_DIE_IF_KERNEL 9 /* dik recursion lock */
|
||||
#define TIF_MEMDIE 13 /* is terminating due to OOM killer */
|
||||
#define TIF_POLLING_NRFLAG 14 /* idle is polling for TIF_NEED_RESCHED */
|
||||
@ -72,7 +71,6 @@ register struct thread_info *__current_thread_info __asm__("$8");
|
||||
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
|
||||
#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
|
||||
#define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT)
|
||||
#define _TIF_NOTIFY_SIGNAL (1<<TIF_NOTIFY_SIGNAL)
|
||||
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
|
||||
|
||||
/* Work to do on interrupt/exception return. */
|
||||
|
@ -7,6 +7,45 @@
|
||||
#include <linux/numa.h>
|
||||
#include <asm/machvec.h>
|
||||
|
||||
#ifdef CONFIG_NUMA
|
||||
static inline int cpu_to_node(int cpu)
|
||||
{
|
||||
int node;
|
||||
|
||||
if (!alpha_mv.cpuid_to_nid)
|
||||
return 0;
|
||||
|
||||
node = alpha_mv.cpuid_to_nid(cpu);
|
||||
|
||||
#ifdef DEBUG_NUMA
|
||||
BUG_ON(node < 0);
|
||||
#endif
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
extern struct cpumask node_to_cpumask_map[];
|
||||
/* FIXME: This is dumb, recalculating every time. But simple. */
|
||||
static const struct cpumask *cpumask_of_node(int node)
|
||||
{
|
||||
int cpu;
|
||||
|
||||
if (node == NUMA_NO_NODE)
|
||||
return cpu_all_mask;
|
||||
|
||||
cpumask_clear(&node_to_cpumask_map[node]);
|
||||
|
||||
for_each_online_cpu(cpu) {
|
||||
if (cpu_to_node(cpu) == node)
|
||||
cpumask_set_cpu(cpu, node_to_cpumask_map[node]);
|
||||
}
|
||||
|
||||
return &node_to_cpumask_map[node];
|
||||
}
|
||||
|
||||
#define cpumask_of_pcibus(bus) (cpu_online_mask)
|
||||
|
||||
#endif /* !CONFIG_NUMA */
|
||||
# include <asm-generic/topology.h>
|
||||
|
||||
#endif /* _ASM_ALPHA_TOPOLOGY_H */
|
||||
|
@ -71,9 +71,6 @@
|
||||
#define MADV_COLD 20 /* deactivate these pages */
|
||||
#define MADV_PAGEOUT 21 /* reclaim these pages */
|
||||
|
||||
#define MADV_POPULATE_READ 22 /* populate (prefault) page tables readable */
|
||||
#define MADV_POPULATE_WRITE 23 /* populate (prefault) page tables writable */
|
||||
|
||||
/* compatibility flags */
|
||||
#define MAP_FILE 0
|
||||
|
||||
|
@ -60,6 +60,20 @@ typedef unsigned long sigset_t;
|
||||
#define SIGRTMIN 32
|
||||
#define SIGRTMAX _NSIG
|
||||
|
||||
/*
|
||||
* SA_FLAGS values:
|
||||
*
|
||||
* SA_ONSTACK indicates that a registered stack_t will be used.
|
||||
* SA_RESTART flag to get restarting signals (which were the default long ago)
|
||||
* SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
|
||||
* SA_RESETHAND clears the handler when the signal is delivered.
|
||||
* SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
|
||||
* SA_NODEFER prevents the current signal from being masked in the handler.
|
||||
*
|
||||
* SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
|
||||
* Unix names RESETHAND and NODEFER respectively.
|
||||
*/
|
||||
|
||||
#define SA_ONSTACK 0x00000001
|
||||
#define SA_RESTART 0x00000002
|
||||
#define SA_NOCLDSTOP 0x00000004
|
||||
|
@ -124,11 +124,6 @@
|
||||
|
||||
#define SO_DETACH_REUSEPORT_BPF 68
|
||||
|
||||
#define SO_PREFER_BUSY_POLL 69
|
||||
#define SO_BUSY_POLL_BUDGET 70
|
||||
|
||||
#define SO_NETNS_COOKIE 71
|
||||
|
||||
#if !defined(__KERNEL__)
|
||||
|
||||
#if __BITS_PER_LONG == 64
|
||||
|
@ -287,7 +287,8 @@ io7_init_hose(struct io7 *io7, int port)
|
||||
/*
|
||||
* Set up window 0 for scatter-gather 8MB at 8MB.
|
||||
*/
|
||||
hose->sg_isa = iommu_arena_new_node(0, hose, 0x00800000, 0x00800000, 0);
|
||||
hose->sg_isa = iommu_arena_new_node(marvel_cpuid_to_nid(io7->pe),
|
||||
hose, 0x00800000, 0x00800000, 0);
|
||||
hose->sg_isa->align_entry = 8; /* cache line boundary */
|
||||
csrs->POx_WBASE[0].csr =
|
||||
hose->sg_isa->dma_base | wbase_m_ena | wbase_m_sg;
|
||||
@ -304,7 +305,8 @@ io7_init_hose(struct io7 *io7, int port)
|
||||
/*
|
||||
* Set up window 2 for scatter-gather (up-to) 1GB at 3GB.
|
||||
*/
|
||||
hose->sg_pci = iommu_arena_new_node(0, hose, 0xc0000000, 0x40000000, 0);
|
||||
hose->sg_pci = iommu_arena_new_node(marvel_cpuid_to_nid(io7->pe),
|
||||
hose, 0xc0000000, 0x40000000, 0);
|
||||
hose->sg_pci->align_entry = 8; /* cache line boundary */
|
||||
csrs->POx_WBASE[2].csr =
|
||||
hose->sg_pci->dma_base | wbase_m_ena | wbase_m_sg;
|
||||
@ -841,8 +843,53 @@ EXPORT_SYMBOL(marvel_ioportmap);
|
||||
EXPORT_SYMBOL(marvel_ioread8);
|
||||
EXPORT_SYMBOL(marvel_iowrite8);
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* NUMA Support
|
||||
*/
|
||||
/**********
|
||||
* FIXME - for now each cpu is a node by itself
|
||||
* -- no real support for striped mode
|
||||
**********
|
||||
*/
|
||||
int
|
||||
marvel_pa_to_nid(unsigned long pa)
|
||||
{
|
||||
int cpuid;
|
||||
|
||||
if ((pa >> 43) & 1) /* I/O */
|
||||
cpuid = (~(pa >> 35) & 0xff);
|
||||
else /* mem */
|
||||
cpuid = ((pa >> 34) & 0x3) | ((pa >> (37 - 2)) & (0x1f << 2));
|
||||
|
||||
return marvel_cpuid_to_nid(cpuid);
|
||||
}
|
||||
|
||||
int
|
||||
marvel_cpuid_to_nid(int cpuid)
|
||||
{
|
||||
return cpuid;
|
||||
}
|
||||
|
||||
unsigned long
|
||||
marvel_node_mem_start(int nid)
|
||||
{
|
||||
unsigned long pa;
|
||||
|
||||
pa = (nid & 0x3) | ((nid & (0x1f << 2)) << 1);
|
||||
pa <<= 34;
|
||||
|
||||
return pa;
|
||||
}
|
||||
|
||||
unsigned long
|
||||
marvel_node_mem_size(int nid)
|
||||
{
|
||||
return 16UL * 1024 * 1024 * 1024; /* 16GB */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* AGP GART Support.
|
||||
*/
|
||||
#include <linux/agp_backend.h>
|
||||
|
@ -434,12 +434,39 @@ wildfire_write_config(struct pci_bus *bus, unsigned int devfn, int where,
|
||||
return PCIBIOS_SUCCESSFUL;
|
||||
}
|
||||
|
||||
struct pci_ops wildfire_pci_ops =
|
||||
struct pci_ops wildfire_pci_ops =
|
||||
{
|
||||
.read = wildfire_read_config,
|
||||
.write = wildfire_write_config,
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* NUMA Support
|
||||
*/
|
||||
int wildfire_pa_to_nid(unsigned long pa)
|
||||
{
|
||||
return pa >> 36;
|
||||
}
|
||||
|
||||
int wildfire_cpuid_to_nid(int cpuid)
|
||||
{
|
||||
/* assume 4 CPUs per node */
|
||||
return cpuid >> 2;
|
||||
}
|
||||
|
||||
unsigned long wildfire_node_mem_start(int nid)
|
||||
{
|
||||
/* 64GB per node */
|
||||
return (unsigned long)nid * (64UL * 1024 * 1024 * 1024);
|
||||
}
|
||||
|
||||
unsigned long wildfire_node_mem_size(int nid)
|
||||
{
|
||||
/* 64GB per node */
|
||||
return 64UL * 1024 * 1024 * 1024;
|
||||
}
|
||||
|
||||
#if DEBUG_DUMP_REGS
|
||||
|
||||
static void __init
|
||||
|
@ -544,7 +544,7 @@ $ret_success:
|
||||
.align 4
|
||||
.type work_pending, @function
|
||||
work_pending:
|
||||
and $17, _TIF_NOTIFY_RESUME | _TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL, $2
|
||||
and $17, _TIF_NOTIFY_RESUME | _TIF_SIGPENDING, $2
|
||||
bne $2, $work_notifysig
|
||||
|
||||
$work_resched:
|
||||
|
@ -834,7 +834,7 @@ SYSCALL_DEFINE5(osf_setsysinfo, unsigned long, op, void __user *, buffer,
|
||||
return -EFAULT;
|
||||
state = ¤t_thread_info()->ieee_state;
|
||||
|
||||
/* Update software trap enable bits. */
|
||||
/* Update softare trap enable bits. */
|
||||
*state = (*state & ~IEEE_SW_MASK) | (swcr & IEEE_SW_MASK);
|
||||
|
||||
/* Update the real fpcr. */
|
||||
@ -854,7 +854,7 @@ SYSCALL_DEFINE5(osf_setsysinfo, unsigned long, op, void __user *, buffer,
|
||||
state = ¤t_thread_info()->ieee_state;
|
||||
exc &= IEEE_STATUS_MASK;
|
||||
|
||||
/* Update software trap enable bits. */
|
||||
/* Update softare trap enable bits. */
|
||||
swcr = (*state & IEEE_SW_MASK) | exc;
|
||||
*state |= exc;
|
||||
|
||||
|
@ -13,12 +13,12 @@ static char *pc873xx_names[] = {
|
||||
static unsigned int base, model;
|
||||
|
||||
|
||||
unsigned int __init pc873xx_get_base(void)
|
||||
unsigned int __init pc873xx_get_base()
|
||||
{
|
||||
return base;
|
||||
}
|
||||
|
||||
char *__init pc873xx_get_model(void)
|
||||
char *__init pc873xx_get_model()
|
||||
{
|
||||
return pc873xx_names[model];
|
||||
}
|
||||
|
@ -71,6 +71,33 @@ iommu_arena_new_node(int nid, struct pci_controller *hose, dma_addr_t base,
|
||||
if (align < mem_size)
|
||||
align = mem_size;
|
||||
|
||||
|
||||
#ifdef CONFIG_DISCONTIGMEM
|
||||
|
||||
arena = memblock_alloc_node(sizeof(*arena), align, nid);
|
||||
if (!NODE_DATA(nid) || !arena) {
|
||||
printk("%s: couldn't allocate arena from node %d\n"
|
||||
" falling back to system-wide allocation\n",
|
||||
__func__, nid);
|
||||
arena = memblock_alloc(sizeof(*arena), SMP_CACHE_BYTES);
|
||||
if (!arena)
|
||||
panic("%s: Failed to allocate %zu bytes\n", __func__,
|
||||
sizeof(*arena));
|
||||
}
|
||||
|
||||
arena->ptes = memblock_alloc_node(sizeof(*arena), align, nid);
|
||||
if (!NODE_DATA(nid) || !arena->ptes) {
|
||||
printk("%s: couldn't allocate arena ptes from node %d\n"
|
||||
" falling back to system-wide allocation\n",
|
||||
__func__, nid);
|
||||
arena->ptes = memblock_alloc(mem_size, align);
|
||||
if (!arena->ptes)
|
||||
panic("%s: Failed to allocate %lu bytes align=0x%lx\n",
|
||||
__func__, mem_size, align);
|
||||
}
|
||||
|
||||
#else /* CONFIG_DISCONTIGMEM */
|
||||
|
||||
arena = memblock_alloc(sizeof(*arena), SMP_CACHE_BYTES);
|
||||
if (!arena)
|
||||
panic("%s: Failed to allocate %zu bytes\n", __func__,
|
||||
@ -80,6 +107,8 @@ iommu_arena_new_node(int nid, struct pci_controller *hose, dma_addr_t base,
|
||||
panic("%s: Failed to allocate %lu bytes align=0x%lx\n",
|
||||
__func__, mem_size, align);
|
||||
|
||||
#endif /* CONFIG_DISCONTIGMEM */
|
||||
|
||||
spin_lock_init(&arena->lock);
|
||||
arena->hose = hose;
|
||||
arena->dma_base = base;
|
||||
|
@ -574,7 +574,7 @@ static void alpha_pmu_start(struct perf_event *event, int flags)
|
||||
* Check that CPU performance counters are supported.
|
||||
* - currently support EV67 and later CPUs.
|
||||
* - actually some later revisions of the EV6 have the same PMC model as the
|
||||
* EV67 but we don't do sufficiently deep CPU detection to detect them.
|
||||
* EV67 but we don't do suffiently deep CPU detection to detect them.
|
||||
* Bad luck to the very few people who might have one, I guess.
|
||||
*/
|
||||
static int supported_cpu(void)
|
||||
|
@ -134,7 +134,7 @@ common_shutdown_1(void *generic_ptr)
|
||||
#ifdef CONFIG_DUMMY_CONSOLE
|
||||
/* If we've gotten here after SysRq-b, leave interrupt
|
||||
context before taking over the console. */
|
||||
if (in_irq())
|
||||
if (in_interrupt())
|
||||
irq_exit();
|
||||
/* This has the effect of resetting the VGA video origin. */
|
||||
console_lock();
|
||||
@ -249,7 +249,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
|
||||
childti->pcb.ksp = (unsigned long) childstack;
|
||||
childti->pcb.flags = 1; /* set FEN, clear everything else */
|
||||
|
||||
if (unlikely(p->flags & (PF_KTHREAD | PF_IO_WORKER))) {
|
||||
if (unlikely(p->flags & PF_KTHREAD)) {
|
||||
/* kernel thread */
|
||||
memset(childstack, 0,
|
||||
sizeof(struct switch_stack) + sizeof(struct pt_regs));
|
||||
@ -380,7 +380,7 @@ get_wchan(struct task_struct *p)
|
||||
{
|
||||
unsigned long schedule_frame;
|
||||
unsigned long pc;
|
||||
if (!p || p == current || task_is_running(p))
|
||||
if (!p || p == current || p->state == TASK_RUNNING)
|
||||
return 0;
|
||||
/*
|
||||
* This one depends on the frame size of schedule(). Do a
|
||||
|
@ -49,6 +49,10 @@ extern void marvel_init_arch(void);
|
||||
extern void marvel_kill_arch(int);
|
||||
extern void marvel_machine_check(unsigned long, unsigned long);
|
||||
extern void marvel_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
|
||||
extern int marvel_pa_to_nid(unsigned long);
|
||||
extern int marvel_cpuid_to_nid(int);
|
||||
extern unsigned long marvel_node_mem_start(int);
|
||||
extern unsigned long marvel_node_mem_size(int);
|
||||
extern struct _alpha_agp_info *marvel_agp_info(void);
|
||||
struct io7 *marvel_find_io7(int pe);
|
||||
struct io7 *marvel_next_io7(struct io7 *prev);
|
||||
@ -97,6 +101,10 @@ extern void wildfire_init_arch(void);
|
||||
extern void wildfire_kill_arch(int);
|
||||
extern void wildfire_machine_check(unsigned long vector, unsigned long la_ptr);
|
||||
extern void wildfire_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
|
||||
extern int wildfire_pa_to_nid(unsigned long);
|
||||
extern int wildfire_cpuid_to_nid(int);
|
||||
extern unsigned long wildfire_node_mem_start(int);
|
||||
extern unsigned long wildfire_node_mem_size(int);
|
||||
|
||||
/* console.c */
|
||||
#ifdef CONFIG_VGA_HOSE
|
||||
|
@ -216,6 +216,6 @@ alpha_rtc_init(void)
|
||||
rtc->ops = &remote_rtc_ops;
|
||||
#endif
|
||||
|
||||
return devm_rtc_register_device(rtc);
|
||||
return rtc_register_device(rtc);
|
||||
}
|
||||
device_initcall(alpha_rtc_init);
|
||||
|
@ -28,7 +28,6 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/panic_notifier.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/memblock.h>
|
||||
#include <linux/pci.h>
|
||||
@ -47,6 +46,7 @@
|
||||
#include <linux/log2.h>
|
||||
#include <linux/export.h>
|
||||
|
||||
extern struct atomic_notifier_head panic_notifier_list;
|
||||
static int alpha_panic_event(struct notifier_block *, unsigned long, void *);
|
||||
static struct notifier_block alpha_panic_block = {
|
||||
alpha_panic_event,
|
||||
@ -79,6 +79,11 @@ int alpha_l3_cacheshape;
|
||||
unsigned long alpha_verbose_mcheck = CONFIG_VERBOSE_MCHECK_ON;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NUMA
|
||||
struct cpumask node_to_cpumask_map[MAX_NUMNODES] __read_mostly;
|
||||
EXPORT_SYMBOL(node_to_cpumask_map);
|
||||
#endif
|
||||
|
||||
/* Which processor we booted from. */
|
||||
int boot_cpuid;
|
||||
|
||||
@ -300,6 +305,7 @@ move_initrd(unsigned long mem_limit)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_DISCONTIGMEM
|
||||
static void __init
|
||||
setup_memory(void *kernel_end)
|
||||
{
|
||||
@ -384,6 +390,9 @@ setup_memory(void *kernel_end)
|
||||
}
|
||||
#endif /* CONFIG_BLK_DEV_INITRD */
|
||||
}
|
||||
#else
|
||||
extern void setup_memory(void *);
|
||||
#endif /* !CONFIG_DISCONTIGMEM */
|
||||
|
||||
int __init
|
||||
page_is_ram(unsigned long pfn)
|
||||
@ -610,6 +619,13 @@ setup_arch(char **cmdline_p)
|
||||
"VERBOSE_MCHECK "
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DISCONTIGMEM
|
||||
"DISCONTIGMEM "
|
||||
#ifdef CONFIG_NUMA
|
||||
"NUMA "
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_SPINLOCK
|
||||
"DEBUG_SPINLOCK "
|
||||
#endif
|
||||
@ -633,7 +649,6 @@ setup_arch(char **cmdline_p)
|
||||
/* Find our memory. */
|
||||
setup_memory(kernel_end);
|
||||
memblock_set_bottom_up(true);
|
||||
sparse_init();
|
||||
|
||||
/* First guess at cpu cache sizes. Do this before init_arch. */
|
||||
determine_cpu_caches(cpu->type);
|
||||
|
@ -527,7 +527,7 @@ do_work_pending(struct pt_regs *regs, unsigned long thread_flags,
|
||||
schedule();
|
||||
} else {
|
||||
local_irq_enable();
|
||||
if (thread_flags & (_TIF_SIGPENDING|_TIF_NOTIFY_SIGNAL)) {
|
||||
if (thread_flags & _TIF_SIGPENDING) {
|
||||
do_signal(regs, r0, r19);
|
||||
r0 = 0;
|
||||
} else {
|
||||
|
@ -142,12 +142,18 @@ srmcons_write(struct tty_struct *tty,
|
||||
return count;
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
static int
|
||||
srmcons_write_room(struct tty_struct *tty)
|
||||
{
|
||||
return 512;
|
||||
}
|
||||
|
||||
static int
|
||||
srmcons_chars_in_buffer(struct tty_struct *tty)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
srmcons_open(struct tty_struct *tty, struct file *filp)
|
||||
{
|
||||
@ -194,6 +200,7 @@ static const struct tty_operations srmcons_ops = {
|
||||
.close = srmcons_close,
|
||||
.write = srmcons_write,
|
||||
.write_room = srmcons_write_room,
|
||||
.chars_in_buffer= srmcons_chars_in_buffer,
|
||||
};
|
||||
|
||||
static int __init
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
* Code supporting the Jensen.
|
||||
*/
|
||||
#include <linux/interrupt.h>
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/mm.h>
|
||||
|
@ -461,5 +461,10 @@ struct alpha_machine_vector marvel_ev7_mv __initmv = {
|
||||
.kill_arch = marvel_kill_arch,
|
||||
.pci_map_irq = marvel_map_irq,
|
||||
.pci_swizzle = common_swizzle,
|
||||
|
||||
.pa_to_nid = marvel_pa_to_nid,
|
||||
.cpuid_to_nid = marvel_cpuid_to_nid,
|
||||
.node_mem_start = marvel_node_mem_start,
|
||||
.node_mem_size = marvel_node_mem_size,
|
||||
};
|
||||
ALIAS_MV(marvel_ev7)
|
||||
|
@ -212,7 +212,7 @@ nautilus_init_pci(void)
|
||||
|
||||
/* Use default IO. */
|
||||
pci_add_resource(&bridge->windows, &ioport_resource);
|
||||
/* Irongate PCI memory aperture, calculate required size before
|
||||
/* Irongate PCI memory aperture, calculate requred size before
|
||||
setting it up. */
|
||||
pci_add_resource(&bridge->windows, &irongate_mem);
|
||||
|
||||
|
@ -337,5 +337,10 @@ struct alpha_machine_vector wildfire_mv __initmv = {
|
||||
.kill_arch = wildfire_kill_arch,
|
||||
.pci_map_irq = wildfire_map_irq,
|
||||
.pci_swizzle = common_swizzle,
|
||||
|
||||
.pa_to_nid = wildfire_pa_to_nid,
|
||||
.cpuid_to_nid = wildfire_cpuid_to_nid,
|
||||
.node_mem_start = wildfire_node_mem_start,
|
||||
.node_mem_size = wildfire_node_mem_size,
|
||||
};
|
||||
ALIAS_MV(wildfire)
|
||||
|
@ -5,29 +5,34 @@ uapi := arch/$(SRCARCH)/include/generated/uapi/asm
|
||||
_dummy := $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)') \
|
||||
$(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)')
|
||||
|
||||
syscall := $(src)/syscall.tbl
|
||||
syshdr := $(srctree)/scripts/syscallhdr.sh
|
||||
systbl := $(srctree)/scripts/syscalltbl.sh
|
||||
syscall := $(srctree)/$(src)/syscall.tbl
|
||||
syshdr := $(srctree)/$(src)/syscallhdr.sh
|
||||
systbl := $(srctree)/$(src)/syscalltbl.sh
|
||||
|
||||
quiet_cmd_syshdr = SYSHDR $@
|
||||
cmd_syshdr = $(CONFIG_SHELL) $(syshdr) --emit-nr $< $@
|
||||
cmd_syshdr = $(CONFIG_SHELL) '$(syshdr)' '$<' '$@' \
|
||||
'$(syshdr_abis_$(basetarget))' \
|
||||
'$(syshdr_pfx_$(basetarget))' \
|
||||
'$(syshdr_offset_$(basetarget))'
|
||||
|
||||
quiet_cmd_systbl = SYSTBL $@
|
||||
cmd_systbl = $(CONFIG_SHELL) $(systbl) $< $@
|
||||
cmd_systbl = $(CONFIG_SHELL) '$(systbl)' '$<' '$@' \
|
||||
'$(systbl_abis_$(basetarget))' \
|
||||
'$(systbl_abi_$(basetarget))' \
|
||||
'$(systbl_offset_$(basetarget))'
|
||||
|
||||
$(uapi)/unistd_32.h: $(syscall) $(syshdr) FORCE
|
||||
$(uapi)/unistd_32.h: $(syscall) $(syshdr)
|
||||
$(call if_changed,syshdr)
|
||||
|
||||
$(kapi)/syscall_table.h: $(syscall) $(systbl) FORCE
|
||||
$(kapi)/syscall_table.h: $(syscall) $(systbl)
|
||||
$(call if_changed,systbl)
|
||||
|
||||
uapisyshdr-y += unistd_32.h
|
||||
kapisyshdr-y += syscall_table.h
|
||||
|
||||
uapisyshdr-y := $(addprefix $(uapi)/, $(uapisyshdr-y))
|
||||
kapisyshdr-y := $(addprefix $(kapi)/, $(kapisyshdr-y))
|
||||
targets += $(addprefix ../../../../, $(uapisyshdr-y) $(kapisyshdr-y))
|
||||
targets += $(uapisyshdr-y) $(kapisyshdr-y)
|
||||
|
||||
PHONY += all
|
||||
all: $(uapisyshdr-y) $(kapisyshdr-y)
|
||||
all: $(addprefix $(uapi)/,$(uapisyshdr-y))
|
||||
all: $(addprefix $(kapi)/,$(kapisyshdr-y))
|
||||
@:
|
||||
|
@ -480,9 +480,3 @@
|
||||
548 common pidfd_getfd sys_pidfd_getfd
|
||||
549 common faccessat2 sys_faccessat2
|
||||
550 common process_madvise sys_process_madvise
|
||||
551 common epoll_pwait2 sys_epoll_pwait2
|
||||
552 common mount_setattr sys_mount_setattr
|
||||
553 common quotactl_fd sys_quotactl_fd
|
||||
554 common landlock_create_ruleset sys_landlock_create_ruleset
|
||||
555 common landlock_add_rule sys_landlock_add_rule
|
||||
556 common landlock_restrict_self sys_landlock_restrict_self
|
||||
|
@ -7,9 +7,10 @@
|
||||
|
||||
#include <asm/unistd.h>
|
||||
|
||||
#define __SYSCALL(nr, entry) .quad entry
|
||||
#define __SYSCALL(nr, entry, nargs) .quad entry
|
||||
.data
|
||||
.align 3
|
||||
.globl sys_call_table
|
||||
sys_call_table:
|
||||
#include <asm/syscall_table.h>
|
||||
#undef __SYSCALL
|
||||
|
@ -730,7 +730,7 @@ do_entUnaUser(void __user * va, unsigned long opcode,
|
||||
long error;
|
||||
|
||||
/* Check the UAC bits to decide what the user wants us to do
|
||||
with the unaligned access. */
|
||||
with the unaliged access. */
|
||||
|
||||
if (!(current_thread_info()->status & TS_UAC_NOPRINT)) {
|
||||
if (__ratelimit(&ratelimit)) {
|
||||
|
@ -13,7 +13,6 @@
|
||||
#include <linux/types.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <net/checksum.h>
|
||||
|
||||
|
||||
#define ldq_u(x,y) \
|
||||
|
@ -65,7 +65,7 @@ static long (*save_emul) (unsigned long pc);
|
||||
long do_alpha_fp_emul_imprecise(struct pt_regs *, unsigned long);
|
||||
long do_alpha_fp_emul(unsigned long);
|
||||
|
||||
static int alpha_fp_emul_init_module(void)
|
||||
int init_module(void)
|
||||
{
|
||||
save_emul_imprecise = alpha_fp_emul_imprecise;
|
||||
save_emul = alpha_fp_emul;
|
||||
@ -73,14 +73,12 @@ static int alpha_fp_emul_init_module(void)
|
||||
alpha_fp_emul = do_alpha_fp_emul;
|
||||
return 0;
|
||||
}
|
||||
module_init(alpha_fp_emul_init_module);
|
||||
|
||||
static void alpha_fp_emul_cleanup_module(void)
|
||||
void cleanup_module(void)
|
||||
{
|
||||
alpha_fp_emul_imprecise = save_emul_imprecise;
|
||||
alpha_fp_emul = save_emul;
|
||||
}
|
||||
module_exit(alpha_fp_emul_cleanup_module);
|
||||
|
||||
#undef alpha_fp_emul_imprecise
|
||||
#define alpha_fp_emul_imprecise do_alpha_fp_emul_imprecise
|
||||
@ -403,5 +401,3 @@ alpha_fp_emul_imprecise (struct pt_regs *regs, unsigned long write_mask)
|
||||
egress:
|
||||
return si_code;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(__udiv_qrnnd);
|
||||
|
@ -6,3 +6,5 @@
|
||||
ccflags-y := -Werror
|
||||
|
||||
obj-y := init.o fault.o
|
||||
|
||||
obj-$(CONFIG_DISCONTIGMEM) += numa.o
|
||||
|
@ -235,6 +235,8 @@ callback_init(void * kernel_end)
|
||||
return kernel_end;
|
||||
}
|
||||
|
||||
|
||||
#ifndef CONFIG_DISCONTIGMEM
|
||||
/*
|
||||
* paging_init() sets up the memory map.
|
||||
*/
|
||||
@ -255,6 +257,7 @@ void __init paging_init(void)
|
||||
/* Initialize the kernel's ZERO_PGE. */
|
||||
memset((void *)ZERO_PGE, 0, PAGE_SIZE);
|
||||
}
|
||||
#endif /* CONFIG_DISCONTIGMEM */
|
||||
|
||||
#if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_SRM)
|
||||
void
|
||||
@ -279,4 +282,5 @@ mem_init(void)
|
||||
set_max_mapnr(max_low_pfn);
|
||||
high_memory = (void *) __va(max_low_pfn * PAGE_SIZE);
|
||||
memblock_free_all();
|
||||
mem_init_print_info(NULL);
|
||||
}
|
||||
|
20
arch/alpha/oprofile/Makefile
Normal file
20
arch/alpha/oprofile/Makefile
Normal file
@ -0,0 +1,20 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
ccflags-y := -Werror -Wno-sign-compare
|
||||
|
||||
obj-$(CONFIG_OPROFILE) += oprofile.o
|
||||
|
||||
DRIVER_OBJS = $(addprefix ../../../drivers/oprofile/, \
|
||||
oprof.o cpu_buffer.o buffer_sync.o \
|
||||
event_buffer.o oprofile_files.o \
|
||||
oprofilefs.o oprofile_stats.o \
|
||||
timer_int.o )
|
||||
|
||||
oprofile-y := $(DRIVER_OBJS) common.o
|
||||
oprofile-$(CONFIG_ALPHA_GENERIC) += op_model_ev4.o \
|
||||
op_model_ev5.o \
|
||||
op_model_ev6.o \
|
||||
op_model_ev67.o
|
||||
oprofile-$(CONFIG_ALPHA_EV4) += op_model_ev4.o
|
||||
oprofile-$(CONFIG_ALPHA_EV5) += op_model_ev5.o
|
||||
oprofile-$(CONFIG_ALPHA_EV6) += op_model_ev6.o \
|
||||
op_model_ev67.o
|
189
arch/alpha/oprofile/common.c
Normal file
189
arch/alpha/oprofile/common.c
Normal file
@ -0,0 +1,189 @@
|
||||
/**
|
||||
* @file arch/alpha/oprofile/common.c
|
||||
*
|
||||
* @remark Copyright 2002 OProfile authors
|
||||
* @remark Read the file COPYING
|
||||
*
|
||||
* @author Richard Henderson <rth@twiddle.net>
|
||||
*/
|
||||
|
||||
#include <linux/oprofile.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/errno.h>
|
||||
#include <asm/ptrace.h>
|
||||
#include <asm/special_insns.h>
|
||||
|
||||
#include "op_impl.h"
|
||||
|
||||
extern struct op_axp_model op_model_ev4 __attribute__((weak));
|
||||
extern struct op_axp_model op_model_ev5 __attribute__((weak));
|
||||
extern struct op_axp_model op_model_pca56 __attribute__((weak));
|
||||
extern struct op_axp_model op_model_ev6 __attribute__((weak));
|
||||
extern struct op_axp_model op_model_ev67 __attribute__((weak));
|
||||
|
||||
static struct op_axp_model *model;
|
||||
|
||||
extern void (*perf_irq)(unsigned long, struct pt_regs *);
|
||||
static void (*save_perf_irq)(unsigned long, struct pt_regs *);
|
||||
|
||||
static struct op_counter_config ctr[20];
|
||||
static struct op_system_config sys;
|
||||
static struct op_register_config reg;
|
||||
|
||||
/* Called from do_entInt to handle the performance monitor interrupt. */
|
||||
|
||||
static void
|
||||
op_handle_interrupt(unsigned long which, struct pt_regs *regs)
|
||||
{
|
||||
model->handle_interrupt(which, regs, ctr);
|
||||
|
||||
/* If the user has selected an interrupt frequency that is
|
||||
not exactly the width of the counter, write a new value
|
||||
into the counter such that it'll overflow after N more
|
||||
events. */
|
||||
if ((reg.need_reset >> which) & 1)
|
||||
model->reset_ctr(®, which);
|
||||
}
|
||||
|
||||
static int
|
||||
op_axp_setup(void)
|
||||
{
|
||||
unsigned long i, e;
|
||||
|
||||
/* Install our interrupt handler into the existing hook. */
|
||||
save_perf_irq = perf_irq;
|
||||
perf_irq = op_handle_interrupt;
|
||||
|
||||
/* Compute the mask of enabled counters. */
|
||||
for (i = e = 0; i < model->num_counters; ++i)
|
||||
if (ctr[i].enabled)
|
||||
e |= 1 << i;
|
||||
reg.enable = e;
|
||||
|
||||
/* Pre-compute the values to stuff in the hardware registers. */
|
||||
model->reg_setup(®, ctr, &sys);
|
||||
|
||||
/* Configure the registers on all cpus. */
|
||||
smp_call_function(model->cpu_setup, ®, 1);
|
||||
model->cpu_setup(®);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
op_axp_shutdown(void)
|
||||
{
|
||||
/* Remove our interrupt handler. We may be removing this module. */
|
||||
perf_irq = save_perf_irq;
|
||||
}
|
||||
|
||||
static void
|
||||
op_axp_cpu_start(void *dummy)
|
||||
{
|
||||
wrperfmon(1, reg.enable);
|
||||
}
|
||||
|
||||
static int
|
||||
op_axp_start(void)
|
||||
{
|
||||
smp_call_function(op_axp_cpu_start, NULL, 1);
|
||||
op_axp_cpu_start(NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void
|
||||
op_axp_cpu_stop(void *dummy)
|
||||
{
|
||||
/* Disable performance monitoring for all counters. */
|
||||
wrperfmon(0, -1);
|
||||
}
|
||||
|
||||
static void
|
||||
op_axp_stop(void)
|
||||
{
|
||||
smp_call_function(op_axp_cpu_stop, NULL, 1);
|
||||
op_axp_cpu_stop(NULL);
|
||||
}
|
||||
|
||||
static int
|
||||
op_axp_create_files(struct dentry *root)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < model->num_counters; ++i) {
|
||||
struct dentry *dir;
|
||||
char buf[4];
|
||||
|
||||
snprintf(buf, sizeof buf, "%d", i);
|
||||
dir = oprofilefs_mkdir(root, buf);
|
||||
|
||||
oprofilefs_create_ulong(dir, "enabled", &ctr[i].enabled);
|
||||
oprofilefs_create_ulong(dir, "event", &ctr[i].event);
|
||||
oprofilefs_create_ulong(dir, "count", &ctr[i].count);
|
||||
/* Dummies. */
|
||||
oprofilefs_create_ulong(dir, "kernel", &ctr[i].kernel);
|
||||
oprofilefs_create_ulong(dir, "user", &ctr[i].user);
|
||||
oprofilefs_create_ulong(dir, "unit_mask", &ctr[i].unit_mask);
|
||||
}
|
||||
|
||||
if (model->can_set_proc_mode) {
|
||||
oprofilefs_create_ulong(root, "enable_pal",
|
||||
&sys.enable_pal);
|
||||
oprofilefs_create_ulong(root, "enable_kernel",
|
||||
&sys.enable_kernel);
|
||||
oprofilefs_create_ulong(root, "enable_user",
|
||||
&sys.enable_user);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int __init
|
||||
oprofile_arch_init(struct oprofile_operations *ops)
|
||||
{
|
||||
struct op_axp_model *lmodel = NULL;
|
||||
|
||||
switch (implver()) {
|
||||
case IMPLVER_EV4:
|
||||
lmodel = &op_model_ev4;
|
||||
break;
|
||||
case IMPLVER_EV5:
|
||||
/* 21164PC has a slightly different set of events.
|
||||
Recognize the chip by the presence of the MAX insns. */
|
||||
if (!amask(AMASK_MAX))
|
||||
lmodel = &op_model_pca56;
|
||||
else
|
||||
lmodel = &op_model_ev5;
|
||||
break;
|
||||
case IMPLVER_EV6:
|
||||
/* 21264A supports ProfileMe.
|
||||
Recognize the chip by the presence of the CIX insns. */
|
||||
if (!amask(AMASK_CIX))
|
||||
lmodel = &op_model_ev67;
|
||||
else
|
||||
lmodel = &op_model_ev6;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!lmodel)
|
||||
return -ENODEV;
|
||||
model = lmodel;
|
||||
|
||||
ops->create_files = op_axp_create_files;
|
||||
ops->setup = op_axp_setup;
|
||||
ops->shutdown = op_axp_shutdown;
|
||||
ops->start = op_axp_start;
|
||||
ops->stop = op_axp_stop;
|
||||
ops->cpu_type = lmodel->cpu_type;
|
||||
|
||||
printk(KERN_INFO "oprofile: using %s performance monitoring.\n",
|
||||
lmodel->cpu_type);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
oprofile_arch_exit(void)
|
||||
{
|
||||
}
|
55
arch/alpha/oprofile/op_impl.h
Normal file
55
arch/alpha/oprofile/op_impl.h
Normal file
@ -0,0 +1,55 @@
|
||||
/**
|
||||
* @file arch/alpha/oprofile/op_impl.h
|
||||
*
|
||||
* @remark Copyright 2002 OProfile authors
|
||||
* @remark Read the file COPYING
|
||||
*
|
||||
* @author Richard Henderson <rth@twiddle.net>
|
||||
*/
|
||||
|
||||
#ifndef OP_IMPL_H
|
||||
#define OP_IMPL_H 1
|
||||
|
||||
/* Per-counter configuration as set via oprofilefs. */
|
||||
struct op_counter_config {
|
||||
unsigned long enabled;
|
||||
unsigned long event;
|
||||
unsigned long count;
|
||||
/* Dummies because I am too lazy to hack the userspace tools. */
|
||||
unsigned long kernel;
|
||||
unsigned long user;
|
||||
unsigned long unit_mask;
|
||||
};
|
||||
|
||||
/* System-wide configuration as set via oprofilefs. */
|
||||
struct op_system_config {
|
||||
unsigned long enable_pal;
|
||||
unsigned long enable_kernel;
|
||||
unsigned long enable_user;
|
||||
};
|
||||
|
||||
/* Cached values for the various performance monitoring registers. */
|
||||
struct op_register_config {
|
||||
unsigned long enable;
|
||||
unsigned long mux_select;
|
||||
unsigned long proc_mode;
|
||||
unsigned long freq;
|
||||
unsigned long reset_values;
|
||||
unsigned long need_reset;
|
||||
};
|
||||
|
||||
/* Per-architecture configuration and hooks. */
|
||||
struct op_axp_model {
|
||||
void (*reg_setup) (struct op_register_config *,
|
||||
struct op_counter_config *,
|
||||
struct op_system_config *);
|
||||
void (*cpu_setup) (void *);
|
||||
void (*reset_ctr) (struct op_register_config *, unsigned long);
|
||||
void (*handle_interrupt) (unsigned long, struct pt_regs *,
|
||||
struct op_counter_config *);
|
||||
char *cpu_type;
|
||||
unsigned char num_counters;
|
||||
unsigned char can_set_proc_mode;
|
||||
};
|
||||
|
||||
#endif
|
114
arch/alpha/oprofile/op_model_ev4.c
Normal file
114
arch/alpha/oprofile/op_model_ev4.c
Normal file
@ -0,0 +1,114 @@
|
||||
/**
|
||||
* @file arch/alpha/oprofile/op_model_ev4.c
|
||||
*
|
||||
* @remark Copyright 2002 OProfile authors
|
||||
* @remark Read the file COPYING
|
||||
*
|
||||
* @author Richard Henderson <rth@twiddle.net>
|
||||
*/
|
||||
|
||||
#include <linux/oprofile.h>
|
||||
#include <linux/smp.h>
|
||||
#include <asm/ptrace.h>
|
||||
|
||||
#include "op_impl.h"
|
||||
|
||||
|
||||
/* Compute all of the registers in preparation for enabling profiling. */
|
||||
|
||||
static void
|
||||
ev4_reg_setup(struct op_register_config *reg,
|
||||
struct op_counter_config *ctr,
|
||||
struct op_system_config *sys)
|
||||
{
|
||||
unsigned long ctl = 0, count, hilo;
|
||||
|
||||
/* Select desired events. We've mapped the event numbers
|
||||
such that they fit directly into the event selection fields.
|
||||
|
||||
Note that there is no "off" setting. In both cases we select
|
||||
the EXTERNAL event source, hoping that it'll be the lowest
|
||||
frequency, and set the frequency counter to LOW. The interrupts
|
||||
for these "disabled" counter overflows are ignored by the
|
||||
interrupt handler.
|
||||
|
||||
This is most irritating, because the hardware *can* enable and
|
||||
disable the interrupts for these counters independently, but the
|
||||
wrperfmon interface doesn't allow it. */
|
||||
|
||||
ctl |= (ctr[0].enabled ? ctr[0].event << 8 : 14 << 8);
|
||||
ctl |= (ctr[1].enabled ? (ctr[1].event - 16) << 32 : 7ul << 32);
|
||||
|
||||
/* EV4 can not read or write its counter registers. The only
|
||||
thing one can do at all is see if you overflow and get an
|
||||
interrupt. We can set the width of the counters, to some
|
||||
extent. Take the interrupt count selected by the user,
|
||||
map it onto one of the possible values, and write it back. */
|
||||
|
||||
count = ctr[0].count;
|
||||
if (count <= 4096)
|
||||
count = 4096, hilo = 1;
|
||||
else
|
||||
count = 65536, hilo = 0;
|
||||
ctr[0].count = count;
|
||||
ctl |= (ctr[0].enabled && hilo) << 3;
|
||||
|
||||
count = ctr[1].count;
|
||||
if (count <= 256)
|
||||
count = 256, hilo = 1;
|
||||
else
|
||||
count = 4096, hilo = 0;
|
||||
ctr[1].count = count;
|
||||
ctl |= (ctr[1].enabled && hilo);
|
||||
|
||||
reg->mux_select = ctl;
|
||||
|
||||
/* Select performance monitoring options. */
|
||||
/* ??? Need to come up with some mechanism to trace only
|
||||
selected processes. EV4 does not have a mechanism to
|
||||
select kernel or user mode only. For now, enable always. */
|
||||
reg->proc_mode = 0;
|
||||
|
||||
/* Frequency is folded into mux_select for EV4. */
|
||||
reg->freq = 0;
|
||||
|
||||
/* See above regarding no writes. */
|
||||
reg->reset_values = 0;
|
||||
reg->need_reset = 0;
|
||||
|
||||
}
|
||||
|
||||
/* Program all of the registers in preparation for enabling profiling. */
|
||||
|
||||
static void
|
||||
ev4_cpu_setup(void *x)
|
||||
{
|
||||
struct op_register_config *reg = x;
|
||||
|
||||
wrperfmon(2, reg->mux_select);
|
||||
wrperfmon(3, reg->proc_mode);
|
||||
}
|
||||
|
||||
static void
|
||||
ev4_handle_interrupt(unsigned long which, struct pt_regs *regs,
|
||||
struct op_counter_config *ctr)
|
||||
{
|
||||
/* EV4 can't properly disable counters individually.
|
||||
Discard "disabled" events now. */
|
||||
if (!ctr[which].enabled)
|
||||
return;
|
||||
|
||||
/* Record the sample. */
|
||||
oprofile_add_sample(regs, which);
|
||||
}
|
||||
|
||||
|
||||
struct op_axp_model op_model_ev4 = {
|
||||
.reg_setup = ev4_reg_setup,
|
||||
.cpu_setup = ev4_cpu_setup,
|
||||
.reset_ctr = NULL,
|
||||
.handle_interrupt = ev4_handle_interrupt,
|
||||
.cpu_type = "alpha/ev4",
|
||||
.num_counters = 2,
|
||||
.can_set_proc_mode = 0,
|
||||
};
|
209
arch/alpha/oprofile/op_model_ev5.c
Normal file
209
arch/alpha/oprofile/op_model_ev5.c
Normal file
@ -0,0 +1,209 @@
|
||||
/**
|
||||
* @file arch/alpha/oprofile/op_model_ev5.c
|
||||
*
|
||||
* @remark Copyright 2002 OProfile authors
|
||||
* @remark Read the file COPYING
|
||||
*
|
||||
* @author Richard Henderson <rth@twiddle.net>
|
||||
*/
|
||||
|
||||
#include <linux/oprofile.h>
|
||||
#include <linux/smp.h>
|
||||
#include <asm/ptrace.h>
|
||||
|
||||
#include "op_impl.h"
|
||||
|
||||
|
||||
/* Compute all of the registers in preparation for enabling profiling.
|
||||
|
||||
The 21164 (EV5) and 21164PC (PCA65) vary in the bit placement and
|
||||
meaning of the "CBOX" events. Given that we don't care about meaning
|
||||
at this point, arrange for the difference in bit placement to be
|
||||
handled by common code. */
|
||||
|
||||
static void
|
||||
common_reg_setup(struct op_register_config *reg,
|
||||
struct op_counter_config *ctr,
|
||||
struct op_system_config *sys,
|
||||
int cbox1_ofs, int cbox2_ofs)
|
||||
{
|
||||
int i, ctl, reset, need_reset;
|
||||
|
||||
/* Select desired events. The event numbers are selected such
|
||||
that they map directly into the event selection fields:
|
||||
|
||||
PCSEL0: 0, 1
|
||||
PCSEL1: 24-39
|
||||
CBOX1: 40-47
|
||||
PCSEL2: 48-63
|
||||
CBOX2: 64-71
|
||||
|
||||
There are two special cases, in that CYCLES can be measured
|
||||
on PCSEL[02], and SCACHE_WRITE can be measured on CBOX[12].
|
||||
These event numbers are canonicalizes to their first appearance. */
|
||||
|
||||
ctl = 0;
|
||||
for (i = 0; i < 3; ++i) {
|
||||
unsigned long event = ctr[i].event;
|
||||
if (!ctr[i].enabled)
|
||||
continue;
|
||||
|
||||
/* Remap the duplicate events, as described above. */
|
||||
if (i == 2) {
|
||||
if (event == 0)
|
||||
event = 12+48;
|
||||
else if (event == 2+41)
|
||||
event = 4+65;
|
||||
}
|
||||
|
||||
/* Convert the event numbers onto mux_select bit mask. */
|
||||
if (event < 2)
|
||||
ctl |= event << 31;
|
||||
else if (event < 24)
|
||||
/* error */;
|
||||
else if (event < 40)
|
||||
ctl |= (event - 24) << 4;
|
||||
else if (event < 48)
|
||||
ctl |= (event - 40) << cbox1_ofs | 15 << 4;
|
||||
else if (event < 64)
|
||||
ctl |= event - 48;
|
||||
else if (event < 72)
|
||||
ctl |= (event - 64) << cbox2_ofs | 15;
|
||||
}
|
||||
reg->mux_select = ctl;
|
||||
|
||||
/* Select processor mode. */
|
||||
/* ??? Need to come up with some mechanism to trace only selected
|
||||
processes. For now select from pal, kernel and user mode. */
|
||||
ctl = 0;
|
||||
ctl |= !sys->enable_pal << 9;
|
||||
ctl |= !sys->enable_kernel << 8;
|
||||
ctl |= !sys->enable_user << 30;
|
||||
reg->proc_mode = ctl;
|
||||
|
||||
/* Select interrupt frequencies. Take the interrupt count selected
|
||||
by the user, and map it onto one of the possible counter widths.
|
||||
If the user value is in between, compute a value to which the
|
||||
counter is reset at each interrupt. */
|
||||
|
||||
ctl = reset = need_reset = 0;
|
||||
for (i = 0; i < 3; ++i) {
|
||||
unsigned long max, hilo, count = ctr[i].count;
|
||||
if (!ctr[i].enabled)
|
||||
continue;
|
||||
|
||||
if (count <= 256)
|
||||
count = 256, hilo = 3, max = 256;
|
||||
else {
|
||||
max = (i == 2 ? 16384 : 65536);
|
||||
hilo = 2;
|
||||
if (count > max)
|
||||
count = max;
|
||||
}
|
||||
ctr[i].count = count;
|
||||
|
||||
ctl |= hilo << (8 - i*2);
|
||||
reset |= (max - count) << (48 - 16*i);
|
||||
if (count != max)
|
||||
need_reset |= 1 << i;
|
||||
}
|
||||
reg->freq = ctl;
|
||||
reg->reset_values = reset;
|
||||
reg->need_reset = need_reset;
|
||||
}
|
||||
|
||||
static void
|
||||
ev5_reg_setup(struct op_register_config *reg,
|
||||
struct op_counter_config *ctr,
|
||||
struct op_system_config *sys)
|
||||
{
|
||||
common_reg_setup(reg, ctr, sys, 19, 22);
|
||||
}
|
||||
|
||||
static void
|
||||
pca56_reg_setup(struct op_register_config *reg,
|
||||
struct op_counter_config *ctr,
|
||||
struct op_system_config *sys)
|
||||
{
|
||||
common_reg_setup(reg, ctr, sys, 8, 11);
|
||||
}
|
||||
|
||||
/* Program all of the registers in preparation for enabling profiling. */
|
||||
|
||||
static void
|
||||
ev5_cpu_setup (void *x)
|
||||
{
|
||||
struct op_register_config *reg = x;
|
||||
|
||||
wrperfmon(2, reg->mux_select);
|
||||
wrperfmon(3, reg->proc_mode);
|
||||
wrperfmon(4, reg->freq);
|
||||
wrperfmon(6, reg->reset_values);
|
||||
}
|
||||
|
||||
/* CTR is a counter for which the user has requested an interrupt count
|
||||
in between one of the widths selectable in hardware. Reset the count
|
||||
for CTR to the value stored in REG->RESET_VALUES.
|
||||
|
||||
For EV5, this means disabling profiling, reading the current values,
|
||||
masking in the value for the desired register, writing, then turning
|
||||
profiling back on.
|
||||
|
||||
This can be streamlined if profiling is only enabled for user mode.
|
||||
In that case we know that the counters are not currently incrementing
|
||||
(due to being in kernel mode). */
|
||||
|
||||
static void
|
||||
ev5_reset_ctr(struct op_register_config *reg, unsigned long ctr)
|
||||
{
|
||||
unsigned long values, mask, not_pk, reset_values;
|
||||
|
||||
mask = (ctr == 0 ? 0xfffful << 48
|
||||
: ctr == 1 ? 0xfffful << 32
|
||||
: 0x3fff << 16);
|
||||
|
||||
not_pk = 1 << 9 | 1 << 8;
|
||||
|
||||
reset_values = reg->reset_values;
|
||||
|
||||
if ((reg->proc_mode & not_pk) == not_pk) {
|
||||
values = wrperfmon(5, 0);
|
||||
values = (reset_values & mask) | (values & ~mask & -2);
|
||||
wrperfmon(6, values);
|
||||
} else {
|
||||
wrperfmon(0, -1);
|
||||
values = wrperfmon(5, 0);
|
||||
values = (reset_values & mask) | (values & ~mask & -2);
|
||||
wrperfmon(6, values);
|
||||
wrperfmon(1, reg->enable);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
ev5_handle_interrupt(unsigned long which, struct pt_regs *regs,
|
||||
struct op_counter_config *ctr)
|
||||
{
|
||||
/* Record the sample. */
|
||||
oprofile_add_sample(regs, which);
|
||||
}
|
||||
|
||||
|
||||
struct op_axp_model op_model_ev5 = {
|
||||
.reg_setup = ev5_reg_setup,
|
||||
.cpu_setup = ev5_cpu_setup,
|
||||
.reset_ctr = ev5_reset_ctr,
|
||||
.handle_interrupt = ev5_handle_interrupt,
|
||||
.cpu_type = "alpha/ev5",
|
||||
.num_counters = 3,
|
||||
.can_set_proc_mode = 1,
|
||||
};
|
||||
|
||||
struct op_axp_model op_model_pca56 = {
|
||||
.reg_setup = pca56_reg_setup,
|
||||
.cpu_setup = ev5_cpu_setup,
|
||||
.reset_ctr = ev5_reset_ctr,
|
||||
.handle_interrupt = ev5_handle_interrupt,
|
||||
.cpu_type = "alpha/pca56",
|
||||
.num_counters = 3,
|
||||
.can_set_proc_mode = 1,
|
||||
};
|
101
arch/alpha/oprofile/op_model_ev6.c
Normal file
101
arch/alpha/oprofile/op_model_ev6.c
Normal file
@ -0,0 +1,101 @@
|
||||
/**
|
||||
* @file arch/alpha/oprofile/op_model_ev6.c
|
||||
*
|
||||
* @remark Copyright 2002 OProfile authors
|
||||
* @remark Read the file COPYING
|
||||
*
|
||||
* @author Richard Henderson <rth@twiddle.net>
|
||||
*/
|
||||
|
||||
#include <linux/oprofile.h>
|
||||
#include <linux/smp.h>
|
||||
#include <asm/ptrace.h>
|
||||
|
||||
#include "op_impl.h"
|
||||
|
||||
|
||||
/* Compute all of the registers in preparation for enabling profiling. */
|
||||
|
||||
static void
|
||||
ev6_reg_setup(struct op_register_config *reg,
|
||||
struct op_counter_config *ctr,
|
||||
struct op_system_config *sys)
|
||||
{
|
||||
unsigned long ctl, reset, need_reset, i;
|
||||
|
||||
/* Select desired events. We've mapped the event numbers
|
||||
such that they fit directly into the event selection fields. */
|
||||
ctl = 0;
|
||||
if (ctr[0].enabled && ctr[0].event)
|
||||
ctl |= (ctr[0].event & 1) << 4;
|
||||
if (ctr[1].enabled)
|
||||
ctl |= (ctr[1].event - 2) & 15;
|
||||
reg->mux_select = ctl;
|
||||
|
||||
/* Select logging options. */
|
||||
/* ??? Need to come up with some mechanism to trace only
|
||||
selected processes. EV6 does not have a mechanism to
|
||||
select kernel or user mode only. For now, enable always. */
|
||||
reg->proc_mode = 0;
|
||||
|
||||
/* EV6 cannot change the width of the counters as with the
|
||||
other implementations. But fortunately, we can write to
|
||||
the counters and set the value such that it will overflow
|
||||
at the right time. */
|
||||
reset = need_reset = 0;
|
||||
for (i = 0; i < 2; ++i) {
|
||||
unsigned long count = ctr[i].count;
|
||||
if (!ctr[i].enabled)
|
||||
continue;
|
||||
|
||||
if (count > 0x100000)
|
||||
count = 0x100000;
|
||||
ctr[i].count = count;
|
||||
reset |= (0x100000 - count) << (i ? 6 : 28);
|
||||
if (count != 0x100000)
|
||||
need_reset |= 1 << i;
|
||||
}
|
||||
reg->reset_values = reset;
|
||||
reg->need_reset = need_reset;
|
||||
}
|
||||
|
||||
/* Program all of the registers in preparation for enabling profiling. */
|
||||
|
||||
static void
|
||||
ev6_cpu_setup (void *x)
|
||||
{
|
||||
struct op_register_config *reg = x;
|
||||
|
||||
wrperfmon(2, reg->mux_select);
|
||||
wrperfmon(3, reg->proc_mode);
|
||||
wrperfmon(6, reg->reset_values | 3);
|
||||
}
|
||||
|
||||
/* CTR is a counter for which the user has requested an interrupt count
|
||||
in between one of the widths selectable in hardware. Reset the count
|
||||
for CTR to the value stored in REG->RESET_VALUES. */
|
||||
|
||||
static void
|
||||
ev6_reset_ctr(struct op_register_config *reg, unsigned long ctr)
|
||||
{
|
||||
wrperfmon(6, reg->reset_values | (1 << ctr));
|
||||
}
|
||||
|
||||
static void
|
||||
ev6_handle_interrupt(unsigned long which, struct pt_regs *regs,
|
||||
struct op_counter_config *ctr)
|
||||
{
|
||||
/* Record the sample. */
|
||||
oprofile_add_sample(regs, which);
|
||||
}
|
||||
|
||||
|
||||
struct op_axp_model op_model_ev6 = {
|
||||
.reg_setup = ev6_reg_setup,
|
||||
.cpu_setup = ev6_cpu_setup,
|
||||
.reset_ctr = ev6_reset_ctr,
|
||||
.handle_interrupt = ev6_handle_interrupt,
|
||||
.cpu_type = "alpha/ev6",
|
||||
.num_counters = 2,
|
||||
.can_set_proc_mode = 0,
|
||||
};
|
261
arch/alpha/oprofile/op_model_ev67.c
Normal file
261
arch/alpha/oprofile/op_model_ev67.c
Normal file
@ -0,0 +1,261 @@
|
||||
/**
|
||||
* @file arch/alpha/oprofile/op_model_ev67.c
|
||||
*
|
||||
* @remark Copyright 2002 OProfile authors
|
||||
* @remark Read the file COPYING
|
||||
*
|
||||
* @author Richard Henderson <rth@twiddle.net>
|
||||
* @author Falk Hueffner <falk@debian.org>
|
||||
*/
|
||||
|
||||
#include <linux/oprofile.h>
|
||||
#include <linux/smp.h>
|
||||
#include <asm/ptrace.h>
|
||||
|
||||
#include "op_impl.h"
|
||||
|
||||
|
||||
/* Compute all of the registers in preparation for enabling profiling. */
|
||||
|
||||
static void
|
||||
ev67_reg_setup(struct op_register_config *reg,
|
||||
struct op_counter_config *ctr,
|
||||
struct op_system_config *sys)
|
||||
{
|
||||
unsigned long ctl, reset, need_reset, i;
|
||||
|
||||
/* Select desired events. */
|
||||
ctl = 1UL << 4; /* Enable ProfileMe mode. */
|
||||
|
||||
/* The event numbers are chosen so we can use them directly if
|
||||
PCTR1 is enabled. */
|
||||
if (ctr[1].enabled) {
|
||||
ctl |= (ctr[1].event & 3) << 2;
|
||||
} else {
|
||||
if (ctr[0].event == 0) /* cycles */
|
||||
ctl |= 1UL << 2;
|
||||
}
|
||||
reg->mux_select = ctl;
|
||||
|
||||
/* Select logging options. */
|
||||
/* ??? Need to come up with some mechanism to trace only
|
||||
selected processes. EV67 does not have a mechanism to
|
||||
select kernel or user mode only. For now, enable always. */
|
||||
reg->proc_mode = 0;
|
||||
|
||||
/* EV67 cannot change the width of the counters as with the
|
||||
other implementations. But fortunately, we can write to
|
||||
the counters and set the value such that it will overflow
|
||||
at the right time. */
|
||||
reset = need_reset = 0;
|
||||
for (i = 0; i < 2; ++i) {
|
||||
unsigned long count = ctr[i].count;
|
||||
if (!ctr[i].enabled)
|
||||
continue;
|
||||
|
||||
if (count > 0x100000)
|
||||
count = 0x100000;
|
||||
ctr[i].count = count;
|
||||
reset |= (0x100000 - count) << (i ? 6 : 28);
|
||||
if (count != 0x100000)
|
||||
need_reset |= 1 << i;
|
||||
}
|
||||
reg->reset_values = reset;
|
||||
reg->need_reset = need_reset;
|
||||
}
|
||||
|
||||
/* Program all of the registers in preparation for enabling profiling. */
|
||||
|
||||
static void
|
||||
ev67_cpu_setup (void *x)
|
||||
{
|
||||
struct op_register_config *reg = x;
|
||||
|
||||
wrperfmon(2, reg->mux_select);
|
||||
wrperfmon(3, reg->proc_mode);
|
||||
wrperfmon(6, reg->reset_values | 3);
|
||||
}
|
||||
|
||||
/* CTR is a counter for which the user has requested an interrupt count
|
||||
in between one of the widths selectable in hardware. Reset the count
|
||||
for CTR to the value stored in REG->RESET_VALUES. */
|
||||
|
||||
static void
|
||||
ev67_reset_ctr(struct op_register_config *reg, unsigned long ctr)
|
||||
{
|
||||
wrperfmon(6, reg->reset_values | (1 << ctr));
|
||||
}
|
||||
|
||||
/* ProfileMe conditions which will show up as counters. We can also
|
||||
detect the following, but it seems unlikely that anybody is
|
||||
interested in counting them:
|
||||
* Reset
|
||||
* MT_FPCR (write to floating point control register)
|
||||
* Arithmetic trap
|
||||
* Dstream Fault
|
||||
* Machine Check (ECC fault, etc.)
|
||||
* OPCDEC (illegal opcode)
|
||||
* Floating point disabled
|
||||
* Differentiate between DTB single/double misses and 3 or 4 level
|
||||
page tables
|
||||
* Istream access violation
|
||||
* Interrupt
|
||||
* Icache Parity Error.
|
||||
* Instruction killed (nop, trapb)
|
||||
|
||||
Unfortunately, there seems to be no way to detect Dcache and Bcache
|
||||
misses; the latter could be approximated by making the counter
|
||||
count Bcache misses, but that is not precise.
|
||||
|
||||
We model this as 20 counters:
|
||||
* PCTR0
|
||||
* PCTR1
|
||||
* 9 ProfileMe events, induced by PCTR0
|
||||
* 9 ProfileMe events, induced by PCTR1
|
||||
*/
|
||||
|
||||
enum profileme_counters {
|
||||
PM_STALLED, /* Stalled for at least one cycle
|
||||
between the fetch and map stages */
|
||||
PM_TAKEN, /* Conditional branch taken */
|
||||
PM_MISPREDICT, /* Branch caused mispredict trap */
|
||||
PM_ITB_MISS, /* ITB miss */
|
||||
PM_DTB_MISS, /* DTB miss */
|
||||
PM_REPLAY, /* Replay trap */
|
||||
PM_LOAD_STORE, /* Load-store order trap */
|
||||
PM_ICACHE_MISS, /* Icache miss */
|
||||
PM_UNALIGNED, /* Unaligned Load/Store */
|
||||
PM_NUM_COUNTERS
|
||||
};
|
||||
|
||||
static inline void
|
||||
op_add_pm(unsigned long pc, int kern, unsigned long counter,
|
||||
struct op_counter_config *ctr, unsigned long event)
|
||||
{
|
||||
unsigned long fake_counter = 2 + event;
|
||||
if (counter == 1)
|
||||
fake_counter += PM_NUM_COUNTERS;
|
||||
if (ctr[fake_counter].enabled)
|
||||
oprofile_add_pc(pc, kern, fake_counter);
|
||||
}
|
||||
|
||||
static void
|
||||
ev67_handle_interrupt(unsigned long which, struct pt_regs *regs,
|
||||
struct op_counter_config *ctr)
|
||||
{
|
||||
unsigned long pmpc, pctr_ctl;
|
||||
int kern = !user_mode(regs);
|
||||
int mispredict = 0;
|
||||
union {
|
||||
unsigned long v;
|
||||
struct {
|
||||
unsigned reserved: 30; /* 0-29 */
|
||||
unsigned overcount: 3; /* 30-32 */
|
||||
unsigned icache_miss: 1; /* 33 */
|
||||
unsigned trap_type: 4; /* 34-37 */
|
||||
unsigned load_store: 1; /* 38 */
|
||||
unsigned trap: 1; /* 39 */
|
||||
unsigned mispredict: 1; /* 40 */
|
||||
} fields;
|
||||
} i_stat;
|
||||
|
||||
enum trap_types {
|
||||
TRAP_REPLAY,
|
||||
TRAP_INVALID0,
|
||||
TRAP_DTB_DOUBLE_MISS_3,
|
||||
TRAP_DTB_DOUBLE_MISS_4,
|
||||
TRAP_FP_DISABLED,
|
||||
TRAP_UNALIGNED,
|
||||
TRAP_DTB_SINGLE_MISS,
|
||||
TRAP_DSTREAM_FAULT,
|
||||
TRAP_OPCDEC,
|
||||
TRAP_INVALID1,
|
||||
TRAP_MACHINE_CHECK,
|
||||
TRAP_INVALID2,
|
||||
TRAP_ARITHMETIC,
|
||||
TRAP_INVALID3,
|
||||
TRAP_MT_FPCR,
|
||||
TRAP_RESET
|
||||
};
|
||||
|
||||
pmpc = wrperfmon(9, 0);
|
||||
/* ??? Don't know how to handle physical-mode PALcode address. */
|
||||
if (pmpc & 1)
|
||||
return;
|
||||
pmpc &= ~2; /* clear reserved bit */
|
||||
|
||||
i_stat.v = wrperfmon(8, 0);
|
||||
if (i_stat.fields.trap) {
|
||||
switch (i_stat.fields.trap_type) {
|
||||
case TRAP_INVALID1:
|
||||
case TRAP_INVALID2:
|
||||
case TRAP_INVALID3:
|
||||
/* Pipeline redirection occurred. PMPC points
|
||||
to PALcode. Recognize ITB miss by PALcode
|
||||
offset address, and get actual PC from
|
||||
EXC_ADDR. */
|
||||
oprofile_add_pc(regs->pc, kern, which);
|
||||
if ((pmpc & ((1 << 15) - 1)) == 581)
|
||||
op_add_pm(regs->pc, kern, which,
|
||||
ctr, PM_ITB_MISS);
|
||||
/* Most other bit and counter values will be
|
||||
those for the first instruction in the
|
||||
fault handler, so we're done. */
|
||||
return;
|
||||
case TRAP_REPLAY:
|
||||
op_add_pm(pmpc, kern, which, ctr,
|
||||
(i_stat.fields.load_store
|
||||
? PM_LOAD_STORE : PM_REPLAY));
|
||||
break;
|
||||
case TRAP_DTB_DOUBLE_MISS_3:
|
||||
case TRAP_DTB_DOUBLE_MISS_4:
|
||||
case TRAP_DTB_SINGLE_MISS:
|
||||
op_add_pm(pmpc, kern, which, ctr, PM_DTB_MISS);
|
||||
break;
|
||||
case TRAP_UNALIGNED:
|
||||
op_add_pm(pmpc, kern, which, ctr, PM_UNALIGNED);
|
||||
break;
|
||||
case TRAP_INVALID0:
|
||||
case TRAP_FP_DISABLED:
|
||||
case TRAP_DSTREAM_FAULT:
|
||||
case TRAP_OPCDEC:
|
||||
case TRAP_MACHINE_CHECK:
|
||||
case TRAP_ARITHMETIC:
|
||||
case TRAP_MT_FPCR:
|
||||
case TRAP_RESET:
|
||||
break;
|
||||
}
|
||||
|
||||
/* ??? JSR/JMP/RET/COR or HW_JSR/HW_JMP/HW_RET/HW_COR
|
||||
mispredicts do not set this bit but can be
|
||||
recognized by the presence of one of these
|
||||
instructions at the PMPC location with bit 39
|
||||
set. */
|
||||
if (i_stat.fields.mispredict) {
|
||||
mispredict = 1;
|
||||
op_add_pm(pmpc, kern, which, ctr, PM_MISPREDICT);
|
||||
}
|
||||
}
|
||||
|
||||
oprofile_add_pc(pmpc, kern, which);
|
||||
|
||||
pctr_ctl = wrperfmon(5, 0);
|
||||
if (pctr_ctl & (1UL << 27))
|
||||
op_add_pm(pmpc, kern, which, ctr, PM_STALLED);
|
||||
|
||||
/* Unfortunately, TAK is undefined on mispredicted branches.
|
||||
??? It is also undefined for non-cbranch insns, should
|
||||
check that. */
|
||||
if (!mispredict && pctr_ctl & (1UL << 0))
|
||||
op_add_pm(pmpc, kern, which, ctr, PM_TAKEN);
|
||||
}
|
||||
|
||||
struct op_axp_model op_model_ev67 = {
|
||||
.reg_setup = ev67_reg_setup,
|
||||
.cpu_setup = ev67_cpu_setup,
|
||||
.reset_ctr = ev67_reset_ctr,
|
||||
.handle_interrupt = ev67_handle_interrupt,
|
||||
.cpu_type = "alpha/ev67",
|
||||
.num_counters = 20,
|
||||
.can_set_proc_mode = 0,
|
||||
};
|
@ -6,7 +6,6 @@
|
||||
config ARC
|
||||
def_bool y
|
||||
select ARC_TIMERS
|
||||
select ARCH_HAS_CACHE_LINE_SIZE
|
||||
select ARCH_HAS_DEBUG_VM_PGTABLE
|
||||
select ARCH_HAS_DMA_PREP_COHERENT
|
||||
select ARCH_HAS_PTE_SPECIAL
|
||||
@ -20,6 +19,7 @@ config ARC
|
||||
select COMMON_CLK
|
||||
select DMA_DIRECT_REMAP
|
||||
select GENERIC_ATOMIC64 if !ISA_ARCV2 || !(ARC_HAS_LL64 && ARC_HAS_LLSC)
|
||||
select GENERIC_CLOCKEVENTS
|
||||
select GENERIC_FIND_FIRST_BIT
|
||||
# for now, we don't need GENERIC_IRQ_PROBE, CONFIG_GENERIC_IRQ_CHIP
|
||||
select GENERIC_IRQ_SHOW
|
||||
@ -29,7 +29,6 @@ config ARC
|
||||
select GENERIC_SMP_IDLE_THREAD
|
||||
select HAVE_ARCH_KGDB
|
||||
select HAVE_ARCH_TRACEHOOK
|
||||
select HAVE_ARCH_TRANSPARENT_HUGEPAGE if ARC_MMU_V4
|
||||
select HAVE_DEBUG_STACKOVERFLOW
|
||||
select HAVE_DEBUG_KMEMLEAK
|
||||
select HAVE_FUTEX_CMPXCHG if FUTEX
|
||||
@ -39,6 +38,7 @@ config ARC
|
||||
select HAVE_KPROBES
|
||||
select HAVE_KRETPROBES
|
||||
select HAVE_MOD_ARCH_SPECIFIC
|
||||
select HAVE_OPROFILE
|
||||
select HAVE_PERF_EVENTS
|
||||
select HANDLE_DOMAIN_IRQ
|
||||
select IRQ_DOMAIN
|
||||
@ -50,6 +50,9 @@ config ARC
|
||||
select HAVE_ARCH_JUMP_LABEL if ISA_ARCV2 && !CPU_ENDIAN_BE32
|
||||
select SET_FS
|
||||
|
||||
config ARCH_HAS_CACHE_LINE_SIZE
|
||||
def_bool y
|
||||
|
||||
config TRACE_IRQFLAGS_SUPPORT
|
||||
def_bool y
|
||||
|
||||
@ -62,6 +65,9 @@ config SCHED_OMIT_FRAME_POINTER
|
||||
config GENERIC_CSUM
|
||||
def_bool y
|
||||
|
||||
config ARCH_DISCONTIGMEM_ENABLE
|
||||
def_bool n
|
||||
|
||||
config ARCH_FLATMEM_ENABLE
|
||||
def_bool y
|
||||
|
||||
@ -81,6 +87,10 @@ config STACKTRACE_SUPPORT
|
||||
def_bool y
|
||||
select STACKTRACE
|
||||
|
||||
config HAVE_ARCH_TRANSPARENT_HUGEPAGE
|
||||
def_bool y
|
||||
depends on ARC_MMU_V4
|
||||
|
||||
menu "ARC Architecture Configuration"
|
||||
|
||||
menu "ARC Platform/SoC/Board"
|
||||
@ -340,6 +350,15 @@ config ARC_HUGEPAGE_16M
|
||||
|
||||
endchoice
|
||||
|
||||
config NODES_SHIFT
|
||||
int "Maximum NUMA Nodes (as a power of 2)"
|
||||
default "0" if !DISCONTIGMEM
|
||||
default "1" if DISCONTIGMEM
|
||||
depends on NEED_MULTIPLE_NODES
|
||||
help
|
||||
Accessing memory beyond 1GB (with or w/o PAE) requires 2 memory
|
||||
zones.
|
||||
|
||||
config ARC_COMPACT_IRQ_LEVELS
|
||||
depends on ISA_ARCOMPACT
|
||||
bool "Setup Timer IRQ as high Priority"
|
||||
@ -487,8 +506,7 @@ config LINUX_RAM_BASE
|
||||
|
||||
config HIGHMEM
|
||||
bool "High Memory Support"
|
||||
select HAVE_ARCH_PFN_VALID
|
||||
select KMAP_LOCAL
|
||||
select ARCH_DISCONTIGMEM_ENABLE
|
||||
help
|
||||
With ARC 2G:2G address split, only upper 2G is directly addressable by
|
||||
kernel. Enable this to potentially allow access to rest of 2G and PAE
|
||||
|
@ -31,7 +31,7 @@ endif
|
||||
|
||||
|
||||
ifdef CONFIG_ARC_CURR_IN_REG
|
||||
# For a global register definition, make sure it gets passed to every file
|
||||
# For a global register defintion, make sure it gets passed to every file
|
||||
# We had a customer reported bug where some code built in kernel was NOT using
|
||||
# any kernel headers, and missing the r25 global register
|
||||
# Can't do unconditionally because of recursive include issues
|
||||
@ -85,6 +85,9 @@ KBUILD_LDFLAGS += $(ldflags-y)
|
||||
|
||||
head-y := arch/arc/kernel/head.o
|
||||
|
||||
# See arch/arc/Kbuild for content of core part of the kernel
|
||||
core-y += arch/arc/
|
||||
|
||||
# w/o this dtb won't embed into kernel binary
|
||||
core-y += arch/arc/boot/dts/
|
||||
|
||||
@ -93,6 +96,8 @@ core-$(CONFIG_ARC_PLAT_TB10X) += arch/arc/plat-tb10x/
|
||||
core-$(CONFIG_ARC_PLAT_AXS10X) += arch/arc/plat-axs10x/
|
||||
core-$(CONFIG_ARC_SOC_HSDK) += arch/arc/plat-hsdk/
|
||||
|
||||
drivers-$(CONFIG_OPROFILE) += arch/arc/oprofile/
|
||||
|
||||
libs-y += arch/arc/lib/ $(LIBGCC)
|
||||
|
||||
boot := arch/arc/boot
|
||||
|
@ -1,4 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
targets := vmlinux.bin vmlinux.bin.gz
|
||||
|
||||
# uImage build relies on mkimage being availble on your host for ARC target
|
||||
# You will need to build u-boot for ARC, rename mkimage to arc-elf32-mkimage
|
||||
@ -6,18 +7,18 @@
|
||||
|
||||
OBJCOPYFLAGS= -O binary -R .note -R .note.gnu.build-id -R .comment -S
|
||||
|
||||
LINUX_START_TEXT = $$($(READELF) -h vmlinux | \
|
||||
LINUX_START_TEXT = $$(readelf -h vmlinux | \
|
||||
grep "Entry point address" | grep -o 0x.*)
|
||||
|
||||
UIMAGE_LOADADDR = $(CONFIG_LINUX_LINK_BASE)
|
||||
UIMAGE_ENTRYADDR = $(LINUX_START_TEXT)
|
||||
|
||||
targets += vmlinux.bin
|
||||
targets += vmlinux.bin.gz
|
||||
targets += vmlinux.bin.lzma
|
||||
targets += uImage.bin
|
||||
targets += uImage.gz
|
||||
targets += uImage.lzma
|
||||
extra-y += vmlinux.bin
|
||||
extra-y += vmlinux.bin.gz
|
||||
extra-y += vmlinux.bin.lzma
|
||||
|
||||
$(obj)/vmlinux.bin: vmlinux FORCE
|
||||
$(call if_changed,objcopy)
|
||||
|
@ -16,7 +16,7 @@ / {
|
||||
memory {
|
||||
device_type = "memory";
|
||||
/* CONFIG_LINUX_RAM_BASE needs to match low mem start */
|
||||
reg = <0x0 0x80000000 0x0 0x40000000 /* 1 GB low mem */
|
||||
reg = <0x0 0x80000000 0x0 0x20000000 /* 512 MB low mem */
|
||||
0x1 0x00000000 0x0 0x40000000>; /* 1 GB highmem */
|
||||
};
|
||||
|
||||
|
@ -14,14 +14,14 @@
|
||||
#include <asm/barrier.h>
|
||||
#include <asm/smp.h>
|
||||
|
||||
#define arch_atomic_read(v) READ_ONCE((v)->counter)
|
||||
#define atomic_read(v) READ_ONCE((v)->counter)
|
||||
|
||||
#ifdef CONFIG_ARC_HAS_LLSC
|
||||
|
||||
#define arch_atomic_set(v, i) WRITE_ONCE(((v)->counter), (i))
|
||||
#define atomic_set(v, i) WRITE_ONCE(((v)->counter), (i))
|
||||
|
||||
#define ATOMIC_OP(op, c_op, asm_op) \
|
||||
static inline void arch_atomic_##op(int i, atomic_t *v) \
|
||||
static inline void atomic_##op(int i, atomic_t *v) \
|
||||
{ \
|
||||
unsigned int val; \
|
||||
\
|
||||
@ -37,7 +37,7 @@ static inline void arch_atomic_##op(int i, atomic_t *v) \
|
||||
} \
|
||||
|
||||
#define ATOMIC_OP_RETURN(op, c_op, asm_op) \
|
||||
static inline int arch_atomic_##op##_return(int i, atomic_t *v) \
|
||||
static inline int atomic_##op##_return(int i, atomic_t *v) \
|
||||
{ \
|
||||
unsigned int val; \
|
||||
\
|
||||
@ -63,7 +63,7 @@ static inline int arch_atomic_##op##_return(int i, atomic_t *v) \
|
||||
}
|
||||
|
||||
#define ATOMIC_FETCH_OP(op, c_op, asm_op) \
|
||||
static inline int arch_atomic_fetch_##op(int i, atomic_t *v) \
|
||||
static inline int atomic_fetch_##op(int i, atomic_t *v) \
|
||||
{ \
|
||||
unsigned int val, orig; \
|
||||
\
|
||||
@ -94,11 +94,11 @@ static inline int arch_atomic_fetch_##op(int i, atomic_t *v) \
|
||||
#ifndef CONFIG_SMP
|
||||
|
||||
/* violating atomic_xxx API locking protocol in UP for optimization sake */
|
||||
#define arch_atomic_set(v, i) WRITE_ONCE(((v)->counter), (i))
|
||||
#define atomic_set(v, i) WRITE_ONCE(((v)->counter), (i))
|
||||
|
||||
#else
|
||||
|
||||
static inline void arch_atomic_set(atomic_t *v, int i)
|
||||
static inline void atomic_set(atomic_t *v, int i)
|
||||
{
|
||||
/*
|
||||
* Independent of hardware support, all of the atomic_xxx() APIs need
|
||||
@ -116,7 +116,7 @@ static inline void arch_atomic_set(atomic_t *v, int i)
|
||||
atomic_ops_unlock(flags);
|
||||
}
|
||||
|
||||
#define arch_atomic_set_release(v, i) arch_atomic_set((v), (i))
|
||||
#define atomic_set_release(v, i) atomic_set((v), (i))
|
||||
|
||||
#endif
|
||||
|
||||
@ -126,7 +126,7 @@ static inline void arch_atomic_set(atomic_t *v, int i)
|
||||
*/
|
||||
|
||||
#define ATOMIC_OP(op, c_op, asm_op) \
|
||||
static inline void arch_atomic_##op(int i, atomic_t *v) \
|
||||
static inline void atomic_##op(int i, atomic_t *v) \
|
||||
{ \
|
||||
unsigned long flags; \
|
||||
\
|
||||
@ -136,7 +136,7 @@ static inline void arch_atomic_##op(int i, atomic_t *v) \
|
||||
}
|
||||
|
||||
#define ATOMIC_OP_RETURN(op, c_op, asm_op) \
|
||||
static inline int arch_atomic_##op##_return(int i, atomic_t *v) \
|
||||
static inline int atomic_##op##_return(int i, atomic_t *v) \
|
||||
{ \
|
||||
unsigned long flags; \
|
||||
unsigned long temp; \
|
||||
@ -154,7 +154,7 @@ static inline int arch_atomic_##op##_return(int i, atomic_t *v) \
|
||||
}
|
||||
|
||||
#define ATOMIC_FETCH_OP(op, c_op, asm_op) \
|
||||
static inline int arch_atomic_fetch_##op(int i, atomic_t *v) \
|
||||
static inline int atomic_fetch_##op(int i, atomic_t *v) \
|
||||
{ \
|
||||
unsigned long flags; \
|
||||
unsigned long orig; \
|
||||
@ -180,6 +180,9 @@ static inline int arch_atomic_fetch_##op(int i, atomic_t *v) \
|
||||
ATOMIC_OPS(add, +=, add)
|
||||
ATOMIC_OPS(sub, -=, sub)
|
||||
|
||||
#define atomic_andnot atomic_andnot
|
||||
#define atomic_fetch_andnot atomic_fetch_andnot
|
||||
|
||||
#undef ATOMIC_OPS
|
||||
#define ATOMIC_OPS(op, c_op, asm_op) \
|
||||
ATOMIC_OP(op, c_op, asm_op) \
|
||||
@ -190,9 +193,6 @@ ATOMIC_OPS(andnot, &= ~, bic)
|
||||
ATOMIC_OPS(or, |=, or)
|
||||
ATOMIC_OPS(xor, ^=, xor)
|
||||
|
||||
#define arch_atomic_andnot arch_atomic_andnot
|
||||
#define arch_atomic_fetch_andnot arch_atomic_fetch_andnot
|
||||
|
||||
#undef ATOMIC_OPS
|
||||
#undef ATOMIC_FETCH_OP
|
||||
#undef ATOMIC_OP_RETURN
|
||||
@ -220,7 +220,7 @@ typedef struct {
|
||||
|
||||
#define ATOMIC64_INIT(a) { (a) }
|
||||
|
||||
static inline s64 arch_atomic64_read(const atomic64_t *v)
|
||||
static inline s64 atomic64_read(const atomic64_t *v)
|
||||
{
|
||||
s64 val;
|
||||
|
||||
@ -232,7 +232,7 @@ static inline s64 arch_atomic64_read(const atomic64_t *v)
|
||||
return val;
|
||||
}
|
||||
|
||||
static inline void arch_atomic64_set(atomic64_t *v, s64 a)
|
||||
static inline void atomic64_set(atomic64_t *v, s64 a)
|
||||
{
|
||||
/*
|
||||
* This could have been a simple assignment in "C" but would need
|
||||
@ -253,7 +253,7 @@ static inline void arch_atomic64_set(atomic64_t *v, s64 a)
|
||||
}
|
||||
|
||||
#define ATOMIC64_OP(op, op1, op2) \
|
||||
static inline void arch_atomic64_##op(s64 a, atomic64_t *v) \
|
||||
static inline void atomic64_##op(s64 a, atomic64_t *v) \
|
||||
{ \
|
||||
s64 val; \
|
||||
\
|
||||
@ -270,7 +270,7 @@ static inline void arch_atomic64_##op(s64 a, atomic64_t *v) \
|
||||
} \
|
||||
|
||||
#define ATOMIC64_OP_RETURN(op, op1, op2) \
|
||||
static inline s64 arch_atomic64_##op##_return(s64 a, atomic64_t *v) \
|
||||
static inline s64 atomic64_##op##_return(s64 a, atomic64_t *v) \
|
||||
{ \
|
||||
s64 val; \
|
||||
\
|
||||
@ -293,7 +293,7 @@ static inline s64 arch_atomic64_##op##_return(s64 a, atomic64_t *v) \
|
||||
}
|
||||
|
||||
#define ATOMIC64_FETCH_OP(op, op1, op2) \
|
||||
static inline s64 arch_atomic64_fetch_##op(s64 a, atomic64_t *v) \
|
||||
static inline s64 atomic64_fetch_##op(s64 a, atomic64_t *v) \
|
||||
{ \
|
||||
s64 val, orig; \
|
||||
\
|
||||
@ -320,6 +320,9 @@ static inline s64 arch_atomic64_fetch_##op(s64 a, atomic64_t *v) \
|
||||
ATOMIC64_OP_RETURN(op, op1, op2) \
|
||||
ATOMIC64_FETCH_OP(op, op1, op2)
|
||||
|
||||
#define atomic64_andnot atomic64_andnot
|
||||
#define atomic64_fetch_andnot atomic64_fetch_andnot
|
||||
|
||||
ATOMIC64_OPS(add, add.f, adc)
|
||||
ATOMIC64_OPS(sub, sub.f, sbc)
|
||||
ATOMIC64_OPS(and, and, and)
|
||||
@ -327,16 +330,13 @@ ATOMIC64_OPS(andnot, bic, bic)
|
||||
ATOMIC64_OPS(or, or, or)
|
||||
ATOMIC64_OPS(xor, xor, xor)
|
||||
|
||||
#define arch_atomic64_andnot arch_atomic64_andnot
|
||||
#define arch_atomic64_fetch_andnot arch_atomic64_fetch_andnot
|
||||
|
||||
#undef ATOMIC64_OPS
|
||||
#undef ATOMIC64_FETCH_OP
|
||||
#undef ATOMIC64_OP_RETURN
|
||||
#undef ATOMIC64_OP
|
||||
|
||||
static inline s64
|
||||
arch_atomic64_cmpxchg(atomic64_t *ptr, s64 expected, s64 new)
|
||||
atomic64_cmpxchg(atomic64_t *ptr, s64 expected, s64 new)
|
||||
{
|
||||
s64 prev;
|
||||
|
||||
@ -358,7 +358,7 @@ arch_atomic64_cmpxchg(atomic64_t *ptr, s64 expected, s64 new)
|
||||
return prev;
|
||||
}
|
||||
|
||||
static inline s64 arch_atomic64_xchg(atomic64_t *ptr, s64 new)
|
||||
static inline s64 atomic64_xchg(atomic64_t *ptr, s64 new)
|
||||
{
|
||||
s64 prev;
|
||||
|
||||
@ -379,14 +379,14 @@ static inline s64 arch_atomic64_xchg(atomic64_t *ptr, s64 new)
|
||||
}
|
||||
|
||||
/**
|
||||
* arch_atomic64_dec_if_positive - decrement by 1 if old value positive
|
||||
* atomic64_dec_if_positive - decrement by 1 if old value positive
|
||||
* @v: pointer of type atomic64_t
|
||||
*
|
||||
* The function returns the old value of *v minus 1, even if
|
||||
* the atomic variable, v, was not decremented.
|
||||
*/
|
||||
|
||||
static inline s64 arch_atomic64_dec_if_positive(atomic64_t *v)
|
||||
static inline s64 atomic64_dec_if_positive(atomic64_t *v)
|
||||
{
|
||||
s64 val;
|
||||
|
||||
@ -408,10 +408,10 @@ static inline s64 arch_atomic64_dec_if_positive(atomic64_t *v)
|
||||
|
||||
return val;
|
||||
}
|
||||
#define arch_atomic64_dec_if_positive arch_atomic64_dec_if_positive
|
||||
#define atomic64_dec_if_positive atomic64_dec_if_positive
|
||||
|
||||
/**
|
||||
* arch_atomic64_fetch_add_unless - add unless the number is a given value
|
||||
* atomic64_fetch_add_unless - add unless the number is a given value
|
||||
* @v: pointer of type atomic64_t
|
||||
* @a: the amount to add to v...
|
||||
* @u: ...unless v is equal to u.
|
||||
@ -419,7 +419,7 @@ static inline s64 arch_atomic64_dec_if_positive(atomic64_t *v)
|
||||
* Atomically adds @a to @v, if it was not @u.
|
||||
* Returns the old value of @v
|
||||
*/
|
||||
static inline s64 arch_atomic64_fetch_add_unless(atomic64_t *v, s64 a, s64 u)
|
||||
static inline s64 atomic64_fetch_add_unless(atomic64_t *v, s64 a, s64 u)
|
||||
{
|
||||
s64 old, temp;
|
||||
|
||||
@ -443,7 +443,7 @@ static inline s64 arch_atomic64_fetch_add_unless(atomic64_t *v, s64 a, s64 u)
|
||||
|
||||
return old;
|
||||
}
|
||||
#define arch_atomic64_fetch_add_unless arch_atomic64_fetch_add_unless
|
||||
#define atomic64_fetch_add_unless atomic64_fetch_add_unless
|
||||
|
||||
#endif /* !CONFIG_GENERIC_ATOMIC64 */
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
*/
|
||||
static inline __sum16 csum_fold(__wsum s)
|
||||
{
|
||||
unsigned int r = s << 16 | s >> 16; /* ror */
|
||||
unsigned r = s << 16 | s >> 16; /* ror */
|
||||
s = ~s;
|
||||
s -= r;
|
||||
return s >> 16;
|
||||
|
@ -63,7 +63,7 @@ __cmpxchg(volatile void *ptr, unsigned long expected, unsigned long new)
|
||||
|
||||
#endif
|
||||
|
||||
#define arch_cmpxchg(ptr, o, n) ({ \
|
||||
#define cmpxchg(ptr, o, n) ({ \
|
||||
(typeof(*(ptr)))__cmpxchg((ptr), \
|
||||
(unsigned long)(o), \
|
||||
(unsigned long)(n)); \
|
||||
@ -75,7 +75,7 @@ __cmpxchg(volatile void *ptr, unsigned long expected, unsigned long new)
|
||||
* !LLSC: cmpxchg() has to use an external lock atomic_ops_lock to guarantee
|
||||
* semantics, and this lock also happens to be used by atomic_*()
|
||||
*/
|
||||
#define arch_atomic_cmpxchg(v, o, n) ((int)arch_cmpxchg(&((v)->counter), (o), (n)))
|
||||
#define atomic_cmpxchg(v, o, n) ((int)cmpxchg(&((v)->counter), (o), (n)))
|
||||
|
||||
|
||||
/*
|
||||
@ -116,14 +116,14 @@ static inline unsigned long __xchg(unsigned long val, volatile void *ptr,
|
||||
*
|
||||
* Technically the lock is also needed for UP (boils down to irq save/restore)
|
||||
* but we can cheat a bit since cmpxchg() atomic_ops_lock() would cause irqs to
|
||||
* be disabled thus can't possibly be interrupted/preempted/clobbered by xchg()
|
||||
* be disabled thus can't possibly be interrpted/preempted/clobbered by xchg()
|
||||
* Other way around, xchg is one instruction anyways, so can't be interrupted
|
||||
* as such
|
||||
*/
|
||||
|
||||
#if !defined(CONFIG_ARC_HAS_LLSC) && defined(CONFIG_SMP)
|
||||
|
||||
#define arch_xchg(ptr, with) \
|
||||
#define xchg(ptr, with) \
|
||||
({ \
|
||||
unsigned long flags; \
|
||||
typeof(*(ptr)) old_val; \
|
||||
@ -136,14 +136,14 @@ static inline unsigned long __xchg(unsigned long val, volatile void *ptr,
|
||||
|
||||
#else
|
||||
|
||||
#define arch_xchg(ptr, with) _xchg(ptr, with)
|
||||
#define xchg(ptr, with) _xchg(ptr, with)
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* "atomic" variant of xchg()
|
||||
* REQ: It needs to follow the same serialization rules as other atomic_xxx()
|
||||
* Since xchg() doesn't always do that, it would seem that following definition
|
||||
* Since xchg() doesn't always do that, it would seem that following defintion
|
||||
* is incorrect. But here's the rationale:
|
||||
* SMP : Even xchg() takes the atomic_ops_lock, so OK.
|
||||
* LLSC: atomic_ops_lock are not relevant at all (even if SMP, since LLSC
|
||||
@ -153,6 +153,6 @@ static inline unsigned long __xchg(unsigned long val, volatile void *ptr,
|
||||
* can't be clobbered by others. Thus no serialization required when
|
||||
* atomic_xchg is involved.
|
||||
*/
|
||||
#define arch_atomic_xchg(v, new) (arch_xchg(&((v)->counter), new))
|
||||
#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
|
||||
|
||||
#endif
|
||||
|
@ -9,29 +9,17 @@
|
||||
#ifdef CONFIG_HIGHMEM
|
||||
|
||||
#include <uapi/asm/page.h>
|
||||
#include <asm/kmap_size.h>
|
||||
|
||||
#define FIXMAP_SIZE PGDIR_SIZE
|
||||
#define PKMAP_SIZE PGDIR_SIZE
|
||||
#include <asm/kmap_types.h>
|
||||
|
||||
/* start after vmalloc area */
|
||||
#define FIXMAP_BASE (PAGE_OFFSET - FIXMAP_SIZE - PKMAP_SIZE)
|
||||
|
||||
#define FIX_KMAP_SLOTS (KM_MAX_IDX * NR_CPUS)
|
||||
#define FIX_KMAP_BEGIN (0UL)
|
||||
#define FIX_KMAP_END ((FIX_KMAP_BEGIN + FIX_KMAP_SLOTS) - 1)
|
||||
|
||||
#define FIXADDR_TOP (FIXMAP_BASE + (FIX_KMAP_END << PAGE_SHIFT))
|
||||
|
||||
/*
|
||||
* This should be converted to the asm-generic version, but of course this
|
||||
* is needlessly different from all other architectures. Sigh - tglx
|
||||
*/
|
||||
#define __fix_to_virt(x) (FIXADDR_TOP - ((x) << PAGE_SHIFT))
|
||||
#define __virt_to_fix(x) (((FIXADDR_TOP - ((x) & PAGE_MASK))) >> PAGE_SHIFT)
|
||||
#define FIXMAP_SIZE PGDIR_SIZE /* only 1 PGD worth */
|
||||
#define KM_TYPE_NR ((FIXMAP_SIZE >> PAGE_SHIFT)/NR_CPUS)
|
||||
#define FIXMAP_ADDR(nr) (FIXMAP_BASE + ((nr) << PAGE_SHIFT))
|
||||
|
||||
/* start after fixmap area */
|
||||
#define PKMAP_BASE (FIXMAP_BASE + FIXMAP_SIZE)
|
||||
#define PKMAP_SIZE PGDIR_SIZE
|
||||
#define LAST_PKMAP (PKMAP_SIZE >> PAGE_SHIFT)
|
||||
#define LAST_PKMAP_MASK (LAST_PKMAP - 1)
|
||||
#define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT))
|
||||
@ -41,13 +29,11 @@
|
||||
|
||||
extern void kmap_init(void);
|
||||
|
||||
#define arch_kmap_local_post_unmap(vaddr) \
|
||||
local_flush_tlb_kernel_range(vaddr, vaddr + PAGE_SIZE)
|
||||
|
||||
static inline void flush_cache_kmaps(void)
|
||||
{
|
||||
flush_cache_all();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
14
arch/arc/include/asm/kmap_types.h
Normal file
14
arch/arc/include/asm/kmap_types.h
Normal file
@ -0,0 +1,14 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (C) 2015 Synopsys, Inc. (www.synopsys.com)
|
||||
*/
|
||||
|
||||
#ifndef _ASM_KMAP_TYPES_H
|
||||
#define _ASM_KMAP_TYPES_H
|
||||
|
||||
/*
|
||||
* We primarily need to define KM_TYPE_NR here but that in turn
|
||||
* is a function of PGDIR_SIZE etc.
|
||||
* To avoid circular deps issue, put everything in asm/highmem.h
|
||||
*/
|
||||
#endif
|
@ -102,7 +102,6 @@ static inline void get_new_mmu_context(struct mm_struct *mm)
|
||||
* Initialize the context related info for a new mm_struct
|
||||
* instance.
|
||||
*/
|
||||
#define init_new_context init_new_context
|
||||
static inline int
|
||||
init_new_context(struct task_struct *tsk, struct mm_struct *mm)
|
||||
{
|
||||
@ -114,7 +113,6 @@ init_new_context(struct task_struct *tsk, struct mm_struct *mm)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define destroy_context destroy_context
|
||||
static inline void destroy_context(struct mm_struct *mm)
|
||||
{
|
||||
unsigned long flags;
|
||||
@ -155,13 +153,13 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
|
||||
}
|
||||
|
||||
/*
|
||||
* activate_mm defaults (in asm-generic) to switch_mm and is called at the
|
||||
* time of execve() to get a new ASID Note the subtlety here:
|
||||
* get_new_mmu_context() behaves differently here vs. in switch_mm(). Here
|
||||
* it always returns a new ASID, because mm has an unallocated "initial"
|
||||
* value, while in latter, it moves to a new ASID, only if it was
|
||||
* unallocated
|
||||
* Called at the time of execve() to get a new ASID
|
||||
* Note the subtlety here: get_new_mmu_context() behaves differently here
|
||||
* vs. in switch_mm(). Here it always returns a new ASID, because mm has
|
||||
* an unallocated "initial" value, while in latter, it moves to a new ASID,
|
||||
* only if it was unallocated
|
||||
*/
|
||||
#define activate_mm(prev, next) switch_mm(prev, next, NULL)
|
||||
|
||||
/* it seemed that deactivate_mm( ) is a reasonable place to do book-keeping
|
||||
* for retiring-mm. However destroy_context( ) still needs to do that because
|
||||
@ -170,7 +168,8 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
|
||||
* there is a good chance that task gets sched-out/in, making it's ASID valid
|
||||
* again (this teased me for a whole day).
|
||||
*/
|
||||
#define deactivate_mm(tsk, mm) do { } while (0)
|
||||
|
||||
#include <asm-generic/mmu_context.h>
|
||||
#define enter_lazy_tlb(mm, tsk)
|
||||
|
||||
#endif /* __ASM_ARC_MMU_CONTEXT_H */
|
||||
|
@ -95,25 +95,11 @@ typedef pte_t * pgtable_t;
|
||||
*/
|
||||
#define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT)
|
||||
|
||||
/*
|
||||
* When HIGHMEM is enabled we have holes in the memory map so we need
|
||||
* pfn_valid() that takes into account the actual extents of the physical
|
||||
* memory
|
||||
*/
|
||||
#ifdef CONFIG_HIGHMEM
|
||||
|
||||
extern unsigned long arch_pfn_offset;
|
||||
#define ARCH_PFN_OFFSET arch_pfn_offset
|
||||
|
||||
extern int pfn_valid(unsigned long pfn);
|
||||
#define pfn_valid pfn_valid
|
||||
|
||||
#else /* CONFIG_HIGHMEM */
|
||||
|
||||
#define ARCH_PFN_OFFSET virt_to_pfn(CONFIG_LINUX_RAM_BASE)
|
||||
#define pfn_valid(pfn) (((pfn) - ARCH_PFN_OFFSET) < max_mapnr)
|
||||
|
||||
#endif /* CONFIG_HIGHMEM */
|
||||
#ifdef CONFIG_FLATMEM
|
||||
#define pfn_valid(pfn) (((pfn) - ARCH_PFN_OFFSET) < max_mapnr)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* __pa, __va, virt_to_page (ALERT: deprecated, don't use them)
|
||||
|
@ -123,7 +123,7 @@ static const char * const arc_pmu_ev_hw_map[] = {
|
||||
#define C(_x) PERF_COUNT_HW_CACHE_##_x
|
||||
#define CACHE_OP_UNSUPPORTED 0xffff
|
||||
|
||||
static const unsigned int arc_pmu_cache_map[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = {
|
||||
static const unsigned arc_pmu_cache_map[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = {
|
||||
[C(L1D)] = {
|
||||
[C(OP_READ)] = {
|
||||
[C(RESULT_ACCESS)] = PERF_COUNT_ARC_LDC,
|
||||
|
@ -129,4 +129,6 @@ static inline void pte_free(struct mm_struct *mm, pgtable_t ptep)
|
||||
|
||||
#define __pte_free_tlb(tlb, pte, addr) pte_free((tlb)->mm, pte)
|
||||
|
||||
#define pmd_pgtable(pmd) ((pgtable_t) pmd_page_vaddr(pmd))
|
||||
|
||||
#endif /* _ASM_ARC_PGALLOC_H */
|
||||
|
@ -222,6 +222,12 @@
|
||||
*/
|
||||
#define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE)
|
||||
|
||||
/*
|
||||
* No special requirements for lowest virtual address we permit any user space
|
||||
* mapping to be mapped at.
|
||||
*/
|
||||
#define FIRST_USER_ADDRESS 0UL
|
||||
|
||||
|
||||
/****************************************************************
|
||||
* Bucket load of VM Helpers
|
||||
@ -350,8 +356,6 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address,
|
||||
|
||||
#define kern_addr_valid(addr) (1)
|
||||
|
||||
#define pmd_pgtable(pmd) ((pgtable_t) pmd_page_vaddr(pmd))
|
||||
|
||||
/*
|
||||
* remap a physical page `pfn' of size `size' with page protection `prot'
|
||||
* into virtual address `from'
|
||||
|
@ -79,7 +79,6 @@ static inline __attribute_const__ struct thread_info *current_thread_info(void)
|
||||
#define TIF_SIGPENDING 2 /* signal pending */
|
||||
#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
|
||||
#define TIF_SYSCALL_AUDIT 4 /* syscall auditing active */
|
||||
#define TIF_NOTIFY_SIGNAL 5 /* signal notifications exist */
|
||||
#define TIF_SYSCALL_TRACE 15 /* syscall trace active */
|
||||
|
||||
/* true if poll_idle() is polling TIF_NEED_RESCHED */
|
||||
@ -90,12 +89,11 @@ static inline __attribute_const__ struct thread_info *current_thread_info(void)
|
||||
#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
|
||||
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
|
||||
#define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT)
|
||||
#define _TIF_NOTIFY_SIGNAL (1<<TIF_NOTIFY_SIGNAL)
|
||||
#define _TIF_MEMDIE (1<<TIF_MEMDIE)
|
||||
|
||||
/* work to do on interrupt/exception return */
|
||||
#define _TIF_WORK_MASK (_TIF_NEED_RESCHED | _TIF_SIGPENDING | \
|
||||
_TIF_NOTIFY_RESUME | _TIF_NOTIFY_SIGNAL)
|
||||
_TIF_NOTIFY_RESUME)
|
||||
|
||||
/*
|
||||
* _TIF_ALLWORK_MASK includes SYSCALL_TRACE, but we don't need it.
|
||||
|
@ -307,8 +307,7 @@ resume_user_mode_begin:
|
||||
mov r0, sp ; pt_regs for arg to do_signal()/do_notify_resume()
|
||||
|
||||
GET_CURR_THR_INFO_FLAGS r9
|
||||
and.f 0, r9, _TIF_SIGPENDING|_TIF_NOTIFY_SIGNAL
|
||||
bz .Lchk_notify_resume
|
||||
bbit0 r9, TIF_SIGPENDING, .Lchk_notify_resume
|
||||
|
||||
; Normal Trap/IRQ entry only saves Scratch (caller-saved) regs
|
||||
; in pt_reg since the "C" ABI (kernel code) will automatically
|
||||
|
@ -140,7 +140,6 @@ int kgdb_arch_handle_exception(int e_vector, int signo, int err_code,
|
||||
ptr = &remcomInBuffer[1];
|
||||
if (kgdb_hex2long(&ptr, &addr))
|
||||
regs->ret = addr;
|
||||
fallthrough;
|
||||
|
||||
case 'D':
|
||||
case 'k':
|
||||
|
@ -317,6 +317,22 @@ int __kprobes kprobe_fault_handler(struct pt_regs *regs, unsigned long trapnr)
|
||||
* caused the fault.
|
||||
*/
|
||||
|
||||
/* We increment the nmissed count for accounting,
|
||||
* we can also use npre/npostfault count for accounting
|
||||
* these specific fault cases.
|
||||
*/
|
||||
kprobes_inc_nmissed_count(cur);
|
||||
|
||||
/*
|
||||
* We come here because instructions in the pre/post
|
||||
* handler caused the page_fault, this could happen
|
||||
* if handler tries to access user space by
|
||||
* copy_from_user(), get_user() etc. Let the
|
||||
* user-specified handler try to fix it first.
|
||||
*/
|
||||
if (cur->fault_handler && cur->fault_handler(cur, regs, trapnr))
|
||||
return 1;
|
||||
|
||||
/*
|
||||
* In case the user-specified fault handler returned zero,
|
||||
* try to fix up.
|
||||
|
@ -50,14 +50,14 @@ SYSCALL_DEFINE3(arc_usr_cmpxchg, int *, uaddr, int, expected, int, new)
|
||||
int ret;
|
||||
|
||||
/*
|
||||
* This is only for old cores lacking LLOCK/SCOND, which by definition
|
||||
* This is only for old cores lacking LLOCK/SCOND, which by defintion
|
||||
* can't possibly be SMP. Thus doesn't need to be SMP safe.
|
||||
* And this also helps reduce the overhead for serializing in
|
||||
* the UP case
|
||||
*/
|
||||
WARN_ON_ONCE(IS_ENABLED(CONFIG_SMP));
|
||||
|
||||
/* Z indicates to userspace if operation succeeded */
|
||||
/* Z indicates to userspace if operation succeded */
|
||||
regs->status32 &= ~STATUS_Z_MASK;
|
||||
|
||||
ret = access_ok(uaddr, sizeof(*uaddr));
|
||||
@ -107,7 +107,7 @@ SYSCALL_DEFINE3(arc_usr_cmpxchg, int *, uaddr, int, expected, int, new)
|
||||
|
||||
void arch_cpu_idle(void)
|
||||
{
|
||||
/* Re-enable interrupts <= default irq priority before committing SLEEP */
|
||||
/* Re-enable interrupts <= default irq priority before commiting SLEEP */
|
||||
const unsigned int arg = 0x10 | ARCV2_IRQ_DEF_PRIO;
|
||||
|
||||
__asm__ __volatile__(
|
||||
@ -120,7 +120,7 @@ void arch_cpu_idle(void)
|
||||
|
||||
void arch_cpu_idle(void)
|
||||
{
|
||||
/* sleep, but enable both set E1/E2 (levels of interrupts) before committing */
|
||||
/* sleep, but enable both set E1/E2 (levels of interrutps) before committing */
|
||||
__asm__ __volatile__("sleep 0x3 \n");
|
||||
}
|
||||
|
||||
@ -191,7 +191,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
|
||||
childksp[0] = 0; /* fp */
|
||||
childksp[1] = (unsigned long)ret_from_fork; /* blink */
|
||||
|
||||
if (unlikely(p->flags & (PF_KTHREAD | PF_IO_WORKER))) {
|
||||
if (unlikely(p->flags & PF_KTHREAD)) {
|
||||
memset(c_regs, 0, sizeof(struct pt_regs));
|
||||
|
||||
c_callee->r13 = kthread_arg;
|
||||
|
@ -302,7 +302,7 @@ setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs)
|
||||
regs->r2 = (unsigned long)&sf->uc;
|
||||
|
||||
/*
|
||||
* small optim to avoid unconditionally calling do_sigaltstack
|
||||
* small optim to avoid unconditonally calling do_sigaltstack
|
||||
* in sigreturn path, now that we only have rt_sigreturn
|
||||
*/
|
||||
magic = MAGIC_SIGALTSTK;
|
||||
@ -405,7 +405,7 @@ void do_signal(struct pt_regs *regs)
|
||||
|
||||
restart_scall = in_syscall(regs) && syscall_restartable(regs);
|
||||
|
||||
if (test_thread_flag(TIF_SIGPENDING) && get_signal(&ksig)) {
|
||||
if (get_signal(&ksig)) {
|
||||
if (restart_scall) {
|
||||
arc_restart_syscall(&ksig.ka, regs);
|
||||
syscall_wont_restart(regs); /* No more restarts */
|
||||
@ -434,7 +434,7 @@ void do_signal(struct pt_regs *regs)
|
||||
void do_notify_resume(struct pt_regs *regs)
|
||||
{
|
||||
/*
|
||||
* ASM glue guarantees that this is only called when returning to
|
||||
* ASM glue gaurantees that this is only called when returning to
|
||||
* user mode
|
||||
*/
|
||||
if (test_thread_flag(TIF_NOTIFY_RESUME))
|
||||
|
@ -83,7 +83,7 @@ seed_unwind_frame_info(struct task_struct *tsk, struct pt_regs *regs,
|
||||
* is safe-kept and BLINK at a well known location in there
|
||||
*/
|
||||
|
||||
if (task_is_running(tsk))
|
||||
if (tsk->state == TASK_RUNNING)
|
||||
return -1;
|
||||
|
||||
frame_info->task = tsk;
|
||||
|
@ -83,12 +83,12 @@ static void show_faulting_vma(unsigned long address)
|
||||
* non-inclusive vma
|
||||
*/
|
||||
mmap_read_lock(active_mm);
|
||||
vma = vma_lookup(active_mm, address);
|
||||
vma = find_vma(active_mm, address);
|
||||
|
||||
/* Lookup the vma at the address and report if the container VMA is not
|
||||
* found
|
||||
/* check against the find_vma( ) behaviour which returns the next VMA
|
||||
* if the container VMA is not found
|
||||
*/
|
||||
if (vma) {
|
||||
if (vma && (vma->vm_start <= address)) {
|
||||
char buf[ARC_PATH_MAX];
|
||||
char *nm = "?";
|
||||
|
||||
|
@ -187,26 +187,25 @@ static void init_unwind_table(struct unwind_table *table, const char *name,
|
||||
const void *table_start, unsigned long table_size,
|
||||
const u8 *header_start, unsigned long header_size)
|
||||
{
|
||||
const u8 *ptr = header_start + 4;
|
||||
const u8 *end = header_start + header_size;
|
||||
|
||||
table->core.pc = (unsigned long)core_start;
|
||||
table->core.range = core_size;
|
||||
table->init.pc = (unsigned long)init_start;
|
||||
table->init.range = init_size;
|
||||
table->address = table_start;
|
||||
table->size = table_size;
|
||||
/* To avoid the pointer addition with NULL pointer.*/
|
||||
if (header_start != NULL) {
|
||||
const u8 *ptr = header_start + 4;
|
||||
const u8 *end = header_start + header_size;
|
||||
/* See if the linker provided table looks valid. */
|
||||
if (header_size <= 4
|
||||
|| header_start[0] != 1
|
||||
|| (void *)read_pointer(&ptr, end, header_start[1])
|
||||
!= table_start
|
||||
|| header_start[2] == DW_EH_PE_omit
|
||||
|| read_pointer(&ptr, end, header_start[2]) <= 0
|
||||
|| header_start[3] == DW_EH_PE_omit)
|
||||
header_start = NULL;
|
||||
}
|
||||
|
||||
/* See if the linker provided table looks valid. */
|
||||
if (header_size <= 4
|
||||
|| header_start[0] != 1
|
||||
|| (void *)read_pointer(&ptr, end, header_start[1]) != table_start
|
||||
|| header_start[2] == DW_EH_PE_omit
|
||||
|| read_pointer(&ptr, end, header_start[2]) <= 0
|
||||
|| header_start[3] == DW_EH_PE_omit)
|
||||
header_start = NULL;
|
||||
|
||||
table->hdrsz = header_size;
|
||||
smp_wmb();
|
||||
table->header = header_start;
|
||||
@ -260,7 +259,7 @@ static void init_unwind_hdr(struct unwind_table *table,
|
||||
{
|
||||
const u8 *ptr;
|
||||
unsigned long tableSize = table->size, hdrSize;
|
||||
unsigned int n;
|
||||
unsigned n;
|
||||
const u32 *fde;
|
||||
struct {
|
||||
u8 version;
|
||||
@ -462,7 +461,7 @@ static uleb128_t get_uleb128(const u8 **pcur, const u8 *end)
|
||||
{
|
||||
const u8 *cur = *pcur;
|
||||
uleb128_t value;
|
||||
unsigned int shift;
|
||||
unsigned shift;
|
||||
|
||||
for (shift = 0, value = 0; cur < end; shift += 7) {
|
||||
if (shift + 7 > 8 * sizeof(value)
|
||||
@ -483,7 +482,7 @@ static sleb128_t get_sleb128(const u8 **pcur, const u8 *end)
|
||||
{
|
||||
const u8 *cur = *pcur;
|
||||
sleb128_t value;
|
||||
unsigned int shift;
|
||||
unsigned shift;
|
||||
|
||||
for (shift = 0, value = 0; cur < end; shift += 7) {
|
||||
if (shift + 7 > 8 * sizeof(value)
|
||||
@ -609,7 +608,7 @@ static unsigned long read_pointer(const u8 **pLoc, const void *end,
|
||||
static signed fde_pointer_type(const u32 *cie)
|
||||
{
|
||||
const u8 *ptr = (const u8 *)(cie + 2);
|
||||
unsigned int version = *ptr;
|
||||
unsigned version = *ptr;
|
||||
|
||||
if (*++ptr) {
|
||||
const char *aug;
|
||||
@ -904,7 +903,7 @@ int arc_unwind(struct unwind_frame_info *frame)
|
||||
const u8 *ptr = NULL, *end = NULL;
|
||||
unsigned long pc = UNW_PC(frame) - frame->call_frame;
|
||||
unsigned long startLoc = 0, endLoc = 0, cfa;
|
||||
unsigned int i;
|
||||
unsigned i;
|
||||
signed ptrType = -1;
|
||||
uleb128_t retAddrReg = 0;
|
||||
const struct unwind_table *table;
|
||||
|
@ -57,6 +57,7 @@ SECTIONS
|
||||
.init.ramfs : { INIT_RAM_FS }
|
||||
|
||||
. = ALIGN(PAGE_SIZE);
|
||||
_stext = .;
|
||||
|
||||
HEAD_TEXT_SECTION
|
||||
INIT_TEXT_SECTION(L1_CACHE_BYTES)
|
||||
@ -82,7 +83,6 @@ SECTIONS
|
||||
|
||||
.text : {
|
||||
_text = .;
|
||||
_stext = .;
|
||||
TEXT_TEXT
|
||||
SCHED_TEXT
|
||||
CPUIDLE_TEXT
|
||||
|
@ -36,8 +36,9 @@
|
||||
* This means each only has 1 PGDIR_SIZE worth of kvaddr mappings, which means
|
||||
* 2M of kvaddr space for typical config (8K page and 11:8:13 traversal split)
|
||||
*
|
||||
* - The fixed KMAP slots for kmap_local/atomic() require KM_MAX_IDX slots per
|
||||
* CPU. So the number of CPUs sharing a single PTE page is limited.
|
||||
* - fixmap anyhow needs a limited number of mappings. So 2M kvaddr == 256 PTE
|
||||
* slots across NR_CPUS would be more than sufficient (generic code defines
|
||||
* KM_TYPE_NR as 20).
|
||||
*
|
||||
* - pkmap being preemptible, in theory could do with more than 256 concurrent
|
||||
* mappings. However, generic pkmap code: map_new_virtual(), doesn't traverse
|
||||
@ -46,6 +47,48 @@
|
||||
*/
|
||||
|
||||
extern pte_t * pkmap_page_table;
|
||||
static pte_t * fixmap_page_table;
|
||||
|
||||
void *kmap_atomic_high_prot(struct page *page, pgprot_t prot)
|
||||
{
|
||||
int idx, cpu_idx;
|
||||
unsigned long vaddr;
|
||||
|
||||
cpu_idx = kmap_atomic_idx_push();
|
||||
idx = cpu_idx + KM_TYPE_NR * smp_processor_id();
|
||||
vaddr = FIXMAP_ADDR(idx);
|
||||
|
||||
set_pte_at(&init_mm, vaddr, fixmap_page_table + idx,
|
||||
mk_pte(page, prot));
|
||||
|
||||
return (void *)vaddr;
|
||||
}
|
||||
EXPORT_SYMBOL(kmap_atomic_high_prot);
|
||||
|
||||
void kunmap_atomic_high(void *kv)
|
||||
{
|
||||
unsigned long kvaddr = (unsigned long)kv;
|
||||
|
||||
if (kvaddr >= FIXMAP_BASE && kvaddr < (FIXMAP_BASE + FIXMAP_SIZE)) {
|
||||
|
||||
/*
|
||||
* Because preemption is disabled, this vaddr can be associated
|
||||
* with the current allocated index.
|
||||
* But in case of multiple live kmap_atomic(), it still relies on
|
||||
* callers to unmap in right order.
|
||||
*/
|
||||
int cpu_idx = kmap_atomic_idx();
|
||||
int idx = cpu_idx + KM_TYPE_NR * smp_processor_id();
|
||||
|
||||
WARN_ON(kvaddr != FIXMAP_ADDR(idx));
|
||||
|
||||
pte_clear(&init_mm, kvaddr, fixmap_page_table + idx);
|
||||
local_flush_tlb_kernel_range(kvaddr, kvaddr + PAGE_SIZE);
|
||||
|
||||
kmap_atomic_idx_pop();
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(kunmap_atomic_high);
|
||||
|
||||
static noinline pte_t * __init alloc_kmap_pgtable(unsigned long kvaddr)
|
||||
{
|
||||
@ -65,9 +108,10 @@ void __init kmap_init(void)
|
||||
{
|
||||
/* Due to recursive include hell, we can't do this in processor.h */
|
||||
BUILD_BUG_ON(PAGE_OFFSET < (VMALLOC_END + FIXMAP_SIZE + PKMAP_SIZE));
|
||||
BUILD_BUG_ON(LAST_PKMAP > PTRS_PER_PTE);
|
||||
BUILD_BUG_ON(FIX_KMAP_SLOTS > PTRS_PER_PTE);
|
||||
|
||||
BUILD_BUG_ON(KM_TYPE_NR > PTRS_PER_PTE);
|
||||
pkmap_page_table = alloc_kmap_pgtable(PKMAP_BASE);
|
||||
alloc_kmap_pgtable(FIXMAP_BASE);
|
||||
|
||||
BUILD_BUG_ON(LAST_PKMAP > PTRS_PER_PTE);
|
||||
fixmap_page_table = alloc_kmap_pgtable(FIXMAP_BASE);
|
||||
}
|
||||
|
@ -28,8 +28,11 @@ static unsigned long low_mem_sz;
|
||||
static unsigned long min_high_pfn, max_high_pfn;
|
||||
static phys_addr_t high_mem_start;
|
||||
static phys_addr_t high_mem_sz;
|
||||
unsigned long arch_pfn_offset;
|
||||
EXPORT_SYMBOL(arch_pfn_offset);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DISCONTIGMEM
|
||||
struct pglist_data node_data[MAX_NUMNODES] __read_mostly;
|
||||
EXPORT_SYMBOL(node_data);
|
||||
#endif
|
||||
|
||||
long __init arc_get_mem_sz(void)
|
||||
@ -89,14 +92,22 @@ void __init setup_arch_memory(void)
|
||||
{
|
||||
unsigned long max_zone_pfn[MAX_NR_ZONES] = { 0 };
|
||||
|
||||
setup_initial_init_mm(_text, _etext, _edata, _end);
|
||||
init_mm.start_code = (unsigned long)_text;
|
||||
init_mm.end_code = (unsigned long)_etext;
|
||||
init_mm.end_data = (unsigned long)_edata;
|
||||
init_mm.brk = (unsigned long)_end;
|
||||
|
||||
/* first page of system - kernel .vector starts here */
|
||||
min_low_pfn = virt_to_pfn(CONFIG_LINUX_RAM_BASE);
|
||||
min_low_pfn = ARCH_PFN_OFFSET;
|
||||
|
||||
/* Last usable page of low mem */
|
||||
max_low_pfn = max_pfn = PFN_DOWN(low_mem_start + low_mem_sz);
|
||||
|
||||
#ifdef CONFIG_FLATMEM
|
||||
/* pfn_valid() uses this */
|
||||
max_mapnr = max_low_pfn - min_low_pfn;
|
||||
#endif
|
||||
|
||||
/*------------- bootmem allocator setup -----------------------*/
|
||||
|
||||
/*
|
||||
@ -131,14 +142,18 @@ void __init setup_arch_memory(void)
|
||||
|
||||
#ifdef CONFIG_HIGHMEM
|
||||
/*
|
||||
* Populate a new node with highmem
|
||||
*
|
||||
* On ARC (w/o PAE) HIGHMEM addresses are actually smaller (0 based)
|
||||
* than addresses in normal aka low memory (0x8000_0000 based).
|
||||
* than addresses in normal ala low memory (0x8000_0000 based).
|
||||
* Even with PAE, the huge peripheral space hole would waste a lot of
|
||||
* mem with single contiguous mem_map[].
|
||||
* Thus when HIGHMEM on ARC is enabled the memory map corresponding
|
||||
* to the hole is freed and ARC specific version of pfn_valid()
|
||||
* handles the hole in the memory map.
|
||||
* mem with single mem_map[]. This warrants a mem_map per region design.
|
||||
* Thus HIGHMEM on ARC is imlemented with DISCONTIGMEM.
|
||||
*
|
||||
* DISCONTIGMEM in turns requires multiple nodes. node 0 above is
|
||||
* populated with normal memory zone while node 1 only has highmem
|
||||
*/
|
||||
node_set_online(1);
|
||||
|
||||
min_high_pfn = PFN_DOWN(high_mem_start);
|
||||
max_high_pfn = PFN_DOWN(high_mem_start + high_mem_sz);
|
||||
@ -155,15 +170,8 @@ void __init setup_arch_memory(void)
|
||||
max_zone_pfn[ZONE_HIGHMEM] = max_high_pfn;
|
||||
|
||||
high_memory = (void *)(min_high_pfn << PAGE_SHIFT);
|
||||
|
||||
arch_pfn_offset = min(min_low_pfn, min_high_pfn);
|
||||
kmap_init();
|
||||
|
||||
#else /* CONFIG_HIGHMEM */
|
||||
/* pfn_valid() uses this when FLATMEM=y and HIGHMEM=n */
|
||||
max_mapnr = max_low_pfn - min_low_pfn;
|
||||
|
||||
#endif /* CONFIG_HIGHMEM */
|
||||
#endif
|
||||
|
||||
free_area_init(max_zone_pfn);
|
||||
}
|
||||
@ -189,13 +197,5 @@ void __init mem_init(void)
|
||||
{
|
||||
memblock_free_all();
|
||||
highmem_init();
|
||||
mem_init_print_info(NULL);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_HIGHMEM
|
||||
int pfn_valid(unsigned long pfn)
|
||||
{
|
||||
return (pfn >= min_high_pfn && pfn <= max_high_pfn) ||
|
||||
(pfn >= min_low_pfn && pfn <= max_low_pfn);
|
||||
}
|
||||
EXPORT_SYMBOL(pfn_valid);
|
||||
#endif
|
||||
|
10
arch/arc/oprofile/Makefile
Normal file
10
arch/arc/oprofile/Makefile
Normal file
@ -0,0 +1,10 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
obj-$(CONFIG_OPROFILE) += oprofile.o
|
||||
|
||||
DRIVER_OBJS = $(addprefix ../../../drivers/oprofile/, \
|
||||
oprof.o cpu_buffer.o buffer_sync.o \
|
||||
event_buffer.o oprofile_files.o \
|
||||
oprofilefs.o oprofile_stats.o \
|
||||
timer_int.o )
|
||||
|
||||
oprofile-y := $(DRIVER_OBJS) common.o
|
23
arch/arc/oprofile/common.c
Normal file
23
arch/arc/oprofile/common.c
Normal file
@ -0,0 +1,23 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
|
||||
*
|
||||
* Based on orig code from @author John Levon <levon@movementarian.org>
|
||||
*/
|
||||
|
||||
#include <linux/oprofile.h>
|
||||
#include <linux/perf_event.h>
|
||||
|
||||
int __init oprofile_arch_init(struct oprofile_operations *ops)
|
||||
{
|
||||
/*
|
||||
* A failure here, forces oprofile core to switch to Timer based PC
|
||||
* sampling, which will happen if say perf is not enabled/available
|
||||
*/
|
||||
return oprofile_perf_init(ops);
|
||||
}
|
||||
|
||||
void oprofile_arch_exit(void)
|
||||
{
|
||||
oprofile_perf_exit();
|
||||
}
|
@ -7,7 +7,6 @@ menuconfig ARC_SOC_HSDK
|
||||
depends on ISA_ARCV2
|
||||
select ARC_HAS_ACCL_REGS
|
||||
select ARC_IRQ_NO_AUTOSAVE
|
||||
select ARC_FPU_SAVE_RESTORE
|
||||
select CLK_HSDK
|
||||
select RESET_CONTROLLER
|
||||
select RESET_HSDK
|
||||
|
127
arch/arm/Kconfig
127
arch/arm/Kconfig
@ -5,6 +5,7 @@ config ARM
|
||||
select ARCH_32BIT_OFF_T
|
||||
select ARCH_HAS_BINFMT_FLAT
|
||||
select ARCH_HAS_DEBUG_VIRTUAL if MMU
|
||||
select ARCH_HAS_DEVMEM_IS_ALLOWED
|
||||
select ARCH_HAS_DMA_WRITE_COMBINE if !ARM_DMA_MEM_BUFFERABLE
|
||||
select ARCH_HAS_ELF_RANDOMIZE
|
||||
select ARCH_HAS_FORTIFY_SOURCE
|
||||
@ -23,18 +24,15 @@ config ARM
|
||||
select ARCH_HAS_TEARDOWN_DMA_OPS if MMU
|
||||
select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
|
||||
select ARCH_HAVE_CUSTOM_GPIO_H
|
||||
select ARCH_HAVE_NMI_SAFE_CMPXCHG if CPU_V7 || CPU_V7M || CPU_V6K
|
||||
select ARCH_HAS_GCOV_PROFILE_ALL
|
||||
select ARCH_KEEP_MEMBLOCK
|
||||
select ARCH_KEEP_MEMBLOCK if HAVE_ARCH_PFN_VALID || KEXEC
|
||||
select ARCH_MIGHT_HAVE_PC_PARPORT
|
||||
select ARCH_NO_SG_CHAIN if !ARM_HAS_SG_CHAIN
|
||||
select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX
|
||||
select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT if CPU_V7
|
||||
select ARCH_SUPPORTS_ATOMIC_RMW
|
||||
select ARCH_SUPPORTS_HUGETLBFS if ARM_LPAE
|
||||
select ARCH_USE_BUILTIN_BSWAP
|
||||
select ARCH_USE_CMPXCHG_LOCKREF
|
||||
select ARCH_USE_MEMTEST
|
||||
select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU
|
||||
select ARCH_WANT_IPC_PARSE_VERSION
|
||||
select ARCH_WANT_LD_ORPHAN_WARN
|
||||
@ -59,7 +57,6 @@ config ARM
|
||||
select GENERIC_IRQ_PROBE
|
||||
select GENERIC_IRQ_SHOW
|
||||
select GENERIC_IRQ_SHOW_LEVEL
|
||||
select GENERIC_LIB_DEVMEM_IS_ALLOWED
|
||||
select GENERIC_PCI_IOMAP
|
||||
select GENERIC_SCHED_CLOCK
|
||||
select GENERIC_SMP_IDLE_THREAD
|
||||
@ -71,14 +68,11 @@ config ARM
|
||||
select HAVE_ARCH_BITREVERSE if (CPU_32v7M || CPU_32v7) && !CPU_32v6
|
||||
select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL && !CPU_ENDIAN_BE32 && MMU
|
||||
select HAVE_ARCH_KGDB if !CPU_ENDIAN_BE32 && MMU
|
||||
select HAVE_ARCH_KASAN if MMU && !XIP_KERNEL
|
||||
select HAVE_ARCH_MMAP_RND_BITS if MMU
|
||||
select HAVE_ARCH_PFN_VALID
|
||||
select HAVE_ARCH_SECCOMP
|
||||
select HAVE_ARCH_SECCOMP_FILTER if AEABI && !OABI_COMPAT
|
||||
select HAVE_ARCH_THREAD_STRUCT_WHITELIST
|
||||
select HAVE_ARCH_TRACEHOOK
|
||||
select HAVE_ARCH_TRANSPARENT_HUGEPAGE if ARM_LPAE
|
||||
select HAVE_ARM_SMCCC if CPU_V7
|
||||
select HAVE_EBPF_JIT if !CPU_ENDIAN_BE32
|
||||
select HAVE_CONTEXT_TRACKING
|
||||
@ -95,6 +89,7 @@ config ARM
|
||||
select HAVE_FUNCTION_TRACER if !XIP_KERNEL
|
||||
select HAVE_GCC_PLUGINS
|
||||
select HAVE_HW_BREAKPOINT if PERF_EVENTS && (CPU_V6 || CPU_V6K || CPU_V7)
|
||||
select HAVE_IDE if PCI || ISA || PCMCIA
|
||||
select HAVE_IRQ_TIME_ACCOUNTING
|
||||
select HAVE_KERNEL_GZIP
|
||||
select HAVE_KERNEL_LZ4
|
||||
@ -105,6 +100,7 @@ config ARM
|
||||
select HAVE_KRETPROBES if HAVE_KPROBES
|
||||
select HAVE_MOD_ARCH_SPECIFIC
|
||||
select HAVE_NMI
|
||||
select HAVE_OPROFILE if HAVE_PERF_EVENTS
|
||||
select HAVE_OPTPROBES if !THUMB2_KERNEL
|
||||
select HAVE_PERF_EVENTS
|
||||
select HAVE_PERF_REGS
|
||||
@ -217,6 +213,9 @@ config GENERIC_CALIBRATE_DELAY
|
||||
config ARCH_MAY_HAVE_PC_FDC
|
||||
bool
|
||||
|
||||
config ZONE_DMA
|
||||
bool
|
||||
|
||||
config ARCH_SUPPORTS_UPROBES
|
||||
def_bool y
|
||||
|
||||
@ -245,7 +244,7 @@ config ARM_PATCH_PHYS_VIRT
|
||||
kernel in system memory.
|
||||
|
||||
This can only be used with non-XIP MMU kernels where the base
|
||||
of physical memory is at a 2 MiB boundary.
|
||||
of physical memory is at a 16MB boundary.
|
||||
|
||||
Only disable this option if you know that you do not require
|
||||
this feature (eg, building a kernel for a single machine) and
|
||||
@ -269,7 +268,8 @@ config PHYS_OFFSET
|
||||
hex "Physical address of main memory" if MMU
|
||||
depends on !ARM_PATCH_PHYS_VIRT
|
||||
default DRAM_BASE if !MMU
|
||||
default 0x00000000 if ARCH_FOOTBRIDGE
|
||||
default 0x00000000 if ARCH_EBSA110 || \
|
||||
ARCH_FOOTBRIDGE
|
||||
default 0x10000000 if ARCH_OMAP1 || ARCH_RPC
|
||||
default 0x20000000 if ARCH_S5PV210
|
||||
default 0xc0000000 if ARCH_SA1100
|
||||
@ -323,6 +323,7 @@ config ARCH_MULTIPLATFORM
|
||||
select AUTO_ZRELADDR
|
||||
select TIMER_OF
|
||||
select COMMON_CLK
|
||||
select GENERIC_CLOCKEVENTS
|
||||
select GENERIC_IRQ_MULTI_HANDLER
|
||||
select HAVE_PCI
|
||||
select PCI_DOMAINS_GENERIC if PCI
|
||||
@ -337,20 +338,36 @@ config ARM_SINGLE_ARMV7M
|
||||
select TIMER_OF
|
||||
select COMMON_CLK
|
||||
select CPU_V7M
|
||||
select GENERIC_CLOCKEVENTS
|
||||
select NO_IOPORT_MAP
|
||||
select SPARSE_IRQ
|
||||
select USE_OF
|
||||
|
||||
config ARCH_EBSA110
|
||||
bool "EBSA-110"
|
||||
select ARCH_USES_GETTIMEOFFSET
|
||||
select CPU_SA110
|
||||
select ISA
|
||||
select NEED_MACH_IO_H
|
||||
select NEED_MACH_MEMORY_H
|
||||
select NO_IOPORT_MAP
|
||||
help
|
||||
This is an evaluation board for the StrongARM processor available
|
||||
from Digital. It has limited hardware on-board, including an
|
||||
Ethernet interface, two PCMCIA sockets, two serial ports and a
|
||||
parallel port.
|
||||
|
||||
config ARCH_EP93XX
|
||||
bool "EP93xx-based"
|
||||
select ARCH_SPARSEMEM_ENABLE
|
||||
select ARM_AMBA
|
||||
imply ARM_PATCH_PHYS_VIRT
|
||||
select ARM_VIC
|
||||
select GENERIC_IRQ_MULTI_HANDLER
|
||||
select AUTO_ZRELADDR
|
||||
select CLKDEV_LOOKUP
|
||||
select CLKSRC_MMIO
|
||||
select CPU_ARM920T
|
||||
select GENERIC_CLOCKEVENTS
|
||||
select GPIOLIB
|
||||
select HAVE_LEGACY_CLK
|
||||
help
|
||||
@ -360,6 +377,8 @@ config ARCH_FOOTBRIDGE
|
||||
bool "FootBridge"
|
||||
select CPU_SA110
|
||||
select FOOTBRIDGE
|
||||
select GENERIC_CLOCKEVENTS
|
||||
select HAVE_IDE
|
||||
select NEED_MACH_IO_H if !MMU
|
||||
select NEED_MACH_MEMORY_H
|
||||
help
|
||||
@ -386,14 +405,14 @@ config ARCH_IXP4XX
|
||||
select ARCH_SUPPORTS_BIG_ENDIAN
|
||||
select CPU_XSCALE
|
||||
select DMABOUNCE if PCI
|
||||
select GENERIC_CLOCKEVENTS
|
||||
select GENERIC_IRQ_MULTI_HANDLER
|
||||
select GPIO_IXP4XX
|
||||
select GPIOLIB
|
||||
select HAVE_PCI
|
||||
select IXP4XX_IRQ
|
||||
select IXP4XX_TIMER
|
||||
# With the new PCI driver this is not needed
|
||||
select NEED_MACH_IO_H if IXP4XX_PCI_LEGACY
|
||||
select NEED_MACH_IO_H
|
||||
select USB_EHCI_BIG_ENDIAN_DESC
|
||||
select USB_EHCI_BIG_ENDIAN_MMIO
|
||||
help
|
||||
@ -402,6 +421,7 @@ config ARCH_IXP4XX
|
||||
config ARCH_DOVE
|
||||
bool "Marvell Dove"
|
||||
select CPU_PJ4
|
||||
select GENERIC_CLOCKEVENTS
|
||||
select GENERIC_IRQ_MULTI_HANDLER
|
||||
select GPIOLIB
|
||||
select HAVE_PCI
|
||||
@ -425,9 +445,11 @@ config ARCH_PXA
|
||||
select CLKSRC_MMIO
|
||||
select TIMER_OF
|
||||
select CPU_XSCALE if !CPU_XSC3
|
||||
select GENERIC_CLOCKEVENTS
|
||||
select GENERIC_IRQ_MULTI_HANDLER
|
||||
select GPIO_PXA
|
||||
select GPIOLIB
|
||||
select HAVE_IDE
|
||||
select IRQ_DOMAIN
|
||||
select PLAT_PXA
|
||||
select SPARSE_IRQ
|
||||
@ -443,9 +465,9 @@ config ARCH_RPC
|
||||
select ARM_HAS_SG_CHAIN
|
||||
select CPU_SA110
|
||||
select FIQ
|
||||
select HAVE_IDE
|
||||
select HAVE_PATA_PLATFORM
|
||||
select ISA_DMA_API
|
||||
select LEGACY_TIMER_TICK
|
||||
select NEED_MACH_IO_H
|
||||
select NEED_MACH_MEMORY_H
|
||||
select NO_IOPORT_MAP
|
||||
@ -463,8 +485,10 @@ config ARCH_SA1100
|
||||
select COMMON_CLK
|
||||
select CPU_FREQ
|
||||
select CPU_SA1100
|
||||
select GENERIC_CLOCKEVENTS
|
||||
select GENERIC_IRQ_MULTI_HANDLER
|
||||
select GPIOLIB
|
||||
select HAVE_IDE
|
||||
select IRQ_DOMAIN
|
||||
select ISA
|
||||
select NEED_MACH_MEMORY_H
|
||||
@ -476,6 +500,7 @@ config ARCH_S3C24XX
|
||||
bool "Samsung S3C24XX SoCs"
|
||||
select ATAGS
|
||||
select CLKSRC_SAMSUNG_PWM
|
||||
select GENERIC_CLOCKEVENTS
|
||||
select GPIO_SAMSUNG
|
||||
select GPIOLIB
|
||||
select GENERIC_IRQ_MULTI_HANDLER
|
||||
@ -495,11 +520,15 @@ config ARCH_S3C24XX
|
||||
config ARCH_OMAP1
|
||||
bool "TI OMAP1"
|
||||
depends on MMU
|
||||
select ARCH_HAS_HOLES_MEMORYMODEL
|
||||
select ARCH_OMAP
|
||||
select CLKDEV_LOOKUP
|
||||
select CLKSRC_MMIO
|
||||
select GENERIC_CLOCKEVENTS
|
||||
select GENERIC_IRQ_CHIP
|
||||
select GENERIC_IRQ_MULTI_HANDLER
|
||||
select GPIOLIB
|
||||
select HAVE_IDE
|
||||
select HAVE_LEGACY_CLK
|
||||
select IRQ_DOMAIN
|
||||
select NEED_MACH_IO_H if PCCARD
|
||||
@ -665,6 +694,10 @@ source "arch/arm/mach-orion5x/Kconfig"
|
||||
|
||||
source "arch/arm/mach-oxnas/Kconfig"
|
||||
|
||||
source "arch/arm/mach-picoxcell/Kconfig"
|
||||
|
||||
source "arch/arm/mach-prima2/Kconfig"
|
||||
|
||||
source "arch/arm/mach-pxa/Kconfig"
|
||||
source "arch/arm/plat-pxa/Kconfig"
|
||||
|
||||
@ -696,8 +729,12 @@ source "arch/arm/mach-stm32/Kconfig"
|
||||
|
||||
source "arch/arm/mach-sunxi/Kconfig"
|
||||
|
||||
source "arch/arm/mach-tango/Kconfig"
|
||||
|
||||
source "arch/arm/mach-tegra/Kconfig"
|
||||
|
||||
source "arch/arm/mach-u300/Kconfig"
|
||||
|
||||
source "arch/arm/mach-uniphier/Kconfig"
|
||||
|
||||
source "arch/arm/mach-ux500/Kconfig"
|
||||
@ -708,9 +745,19 @@ source "arch/arm/mach-vexpress/Kconfig"
|
||||
|
||||
source "arch/arm/mach-vt8500/Kconfig"
|
||||
|
||||
source "arch/arm/mach-zx/Kconfig"
|
||||
|
||||
source "arch/arm/mach-zynq/Kconfig"
|
||||
|
||||
# ARMv7-M architecture
|
||||
config ARCH_EFM32
|
||||
bool "Energy Micro efm32"
|
||||
depends on ARM_SINGLE_ARMV7M
|
||||
select GPIOLIB
|
||||
help
|
||||
Support for Energy Micro's (now Silicon Labs) efm32 Giant Gecko
|
||||
processors.
|
||||
|
||||
config ARCH_LPC18XX
|
||||
bool "NXP LPC18xx/LPC43xx"
|
||||
depends on ARM_SINGLE_ARMV7M
|
||||
@ -740,6 +787,7 @@ config ARCH_ACORN
|
||||
|
||||
config PLAT_IOP
|
||||
bool
|
||||
select GENERIC_CLOCKEVENTS
|
||||
|
||||
config PLAT_ORION
|
||||
bool
|
||||
@ -1130,6 +1178,7 @@ config HAVE_SMP
|
||||
config SMP
|
||||
bool "Symmetric Multi-Processing"
|
||||
depends on CPU_V6K || CPU_V7
|
||||
depends on GENERIC_CLOCKEVENTS
|
||||
depends on HAVE_SMP
|
||||
depends on MMU || ARM_MPU
|
||||
select IRQ_WORK
|
||||
@ -1275,26 +1324,11 @@ config PAGE_OFFSET
|
||||
default 0xB0000000 if VMSPLIT_3G_OPT
|
||||
default 0xC0000000
|
||||
|
||||
config KASAN_SHADOW_OFFSET
|
||||
hex
|
||||
depends on KASAN
|
||||
default 0x1f000000 if PAGE_OFFSET=0x40000000
|
||||
default 0x5f000000 if PAGE_OFFSET=0x80000000
|
||||
default 0x9f000000 if PAGE_OFFSET=0xC0000000
|
||||
default 0x8f000000 if PAGE_OFFSET=0xB0000000
|
||||
default 0xffffffff
|
||||
|
||||
config NR_CPUS
|
||||
int "Maximum number of CPUs (2-32)"
|
||||
range 2 16 if DEBUG_KMAP_LOCAL
|
||||
range 2 32 if !DEBUG_KMAP_LOCAL
|
||||
range 2 32
|
||||
depends on SMP
|
||||
default "4"
|
||||
help
|
||||
The maximum number of CPUs that the kernel can support.
|
||||
Up to 32 CPUs can be supported, or up to 16 if kmap_local()
|
||||
debugging is enabled, which uses half of the per-CPU fixmap
|
||||
slots as guard regions.
|
||||
|
||||
config HOTPLUG_CPU
|
||||
bool "Support for hot-pluggable CPUs"
|
||||
@ -1320,7 +1354,7 @@ config ARM_PSCI
|
||||
# selected platforms.
|
||||
config ARCH_NR_GPIO
|
||||
int
|
||||
default 2048 if ARCH_INTEL_SOCFPGA
|
||||
default 2048 if ARCH_SOCFPGA
|
||||
default 1024 if ARCH_BRCMSTB || ARCH_RENESAS || ARCH_TEGRA || \
|
||||
ARCH_ZYNQ || ARCH_ASPEED
|
||||
default 512 if ARCH_EXYNOS || ARCH_KEYSTONE || SOC_OMAP5 || \
|
||||
@ -1338,6 +1372,7 @@ config ARCH_NR_GPIO
|
||||
|
||||
config HZ_FIXED
|
||||
int
|
||||
default 200 if ARCH_EBSA110
|
||||
default 128 if SOC_AT91RM9200
|
||||
default 0
|
||||
|
||||
@ -1445,6 +1480,9 @@ config OABI_COMPAT
|
||||
UNPREDICTABLE (in fact it can be predicted that it won't work
|
||||
at all). If in doubt say N.
|
||||
|
||||
config ARCH_HAS_HOLES_MEMORYMODEL
|
||||
bool
|
||||
|
||||
config ARCH_SELECT_MEMORY_MODEL
|
||||
bool
|
||||
|
||||
@ -1455,10 +1493,12 @@ config ARCH_SPARSEMEM_ENABLE
|
||||
bool
|
||||
select SPARSEMEM_STATIC if SPARSEMEM
|
||||
|
||||
config HAVE_ARCH_PFN_VALID
|
||||
def_bool ARCH_HAS_HOLES_MEMORYMODEL || !SPARSEMEM
|
||||
|
||||
config HIGHMEM
|
||||
bool "High Memory Support"
|
||||
depends on MMU
|
||||
select KMAP_LOCAL
|
||||
help
|
||||
The address space of ARM processors is only 4 Gigabytes large
|
||||
and it has to accommodate user address space, kernel address
|
||||
@ -1503,6 +1543,14 @@ config HW_PERF_EVENTS
|
||||
def_bool y
|
||||
depends on ARM_PMU
|
||||
|
||||
config SYS_SUPPORTS_HUGETLBFS
|
||||
def_bool y
|
||||
depends on ARM_LPAE
|
||||
|
||||
config HAVE_ARCH_TRANSPARENT_HUGEPAGE
|
||||
def_bool y
|
||||
depends on ARM_LPAE
|
||||
|
||||
config ARCH_WANT_GENERAL_HUGETLB
|
||||
def_bool y
|
||||
|
||||
@ -1526,7 +1574,7 @@ config ARM_MODULE_PLTS
|
||||
config FORCE_MAX_ZONEORDER
|
||||
int "Maximum zone order"
|
||||
default "12" if SOC_AM33XX
|
||||
default "9" if SA1111
|
||||
default "9" if SA1111 || ARCH_EFM32
|
||||
default "11"
|
||||
help
|
||||
The kernel memory allocator divides physically contiguous memory
|
||||
@ -1540,7 +1588,9 @@ config FORCE_MAX_ZONEORDER
|
||||
a value of 11 means that the largest free memory block is 2^10 pages.
|
||||
|
||||
config ALIGNMENT_TRAP
|
||||
def_bool CPU_CP15_MMU
|
||||
bool
|
||||
depends on CPU_CP15_MMU
|
||||
default y if !ARCH_EBSA110
|
||||
select HAVE_PROC_CPU if PROC_FS
|
||||
help
|
||||
ARM processors cannot fetch/store information which is not
|
||||
@ -1735,7 +1785,7 @@ config CMDLINE
|
||||
string "Default kernel command string"
|
||||
default ""
|
||||
help
|
||||
On some architectures (e.g. CATS), there is currently no way
|
||||
On some architectures (EBSA110 and CATS), there is currently no way
|
||||
for the boot loader to pass arguments to the kernel. For these
|
||||
architectures, you should supply some command-line options at build
|
||||
time by entering them here. As a minimum, you should specify the
|
||||
@ -1849,10 +1899,9 @@ config AUTO_ZRELADDR
|
||||
help
|
||||
ZRELADDR is the physical address where the decompressed kernel
|
||||
image will be placed. If AUTO_ZRELADDR is selected, the address
|
||||
will be determined at run-time, either by masking the current IP
|
||||
with 0xf8000000, or, if invalid, from the DTB passed in r2.
|
||||
This assumes the zImage being placed in the first 128MB from
|
||||
start of memory.
|
||||
will be determined at run-time by masking the current IP with
|
||||
0xf8000000. This assumes the zImage being placed in the first 128MB
|
||||
from start of memory.
|
||||
|
||||
config EFI_STUB
|
||||
bool
|
||||
|
@ -66,8 +66,6 @@ config UNWINDER_FRAME_POINTER
|
||||
config UNWINDER_ARM
|
||||
bool "ARM EABI stack unwinder"
|
||||
depends on AEABI && !FUNCTION_GRAPH_TRACER
|
||||
# https://github.com/ClangBuiltLinux/linux/issues/732
|
||||
depends on !LD_IS_LLD || LLD_VERSION >= 110000
|
||||
select ARM_UNWIND
|
||||
help
|
||||
This option enables stack unwinding support in the kernel
|
||||
@ -609,14 +607,6 @@ choice
|
||||
when u-boot hands over to the kernel, the system
|
||||
silently crashes, with no serial output at all.
|
||||
|
||||
config DEBUG_MSTARV7_PMUART
|
||||
bool "Kernel low-level debugging messages via MSTARV7 PM UART"
|
||||
depends on ARCH_MSTARV7
|
||||
select DEBUG_UART_8250
|
||||
help
|
||||
Say Y here if you want kernel low-level debugging support
|
||||
for MSTAR ARMv7-based platforms on PM UART.
|
||||
|
||||
config DEBUG_MT6589_UART0
|
||||
bool "Mediatek mt6589 UART0"
|
||||
depends on ARCH_MEDIATEK
|
||||
@ -780,6 +770,14 @@ choice
|
||||
depends on ARCH_OMAP2PLUS
|
||||
select DEBUG_OMAP2PLUS_UART
|
||||
|
||||
config DEBUG_PICOXCELL_UART
|
||||
depends on ARCH_PICOXCELL
|
||||
bool "Use PicoXcell UART for low-level debug"
|
||||
select DEBUG_UART_8250
|
||||
help
|
||||
Say Y here if you want kernel low-level debugging support
|
||||
on PicoXcell based platforms.
|
||||
|
||||
config DEBUG_PXA_UART1
|
||||
depends on ARCH_PXA
|
||||
bool "Use PXA UART1 for low-level debug"
|
||||
@ -1097,7 +1095,7 @@ choice
|
||||
on SD5203 UART.
|
||||
|
||||
config DEBUG_SOCFPGA_UART0
|
||||
depends on ARCH_INTEL_SOCFPGA
|
||||
depends on ARCH_SOCFPGA
|
||||
bool "Use SOCFPGA UART0 for low-level debug"
|
||||
select DEBUG_UART_8250
|
||||
help
|
||||
@ -1105,7 +1103,7 @@ choice
|
||||
on SOCFPGA(Cyclone 5 and Arria 5) based platforms.
|
||||
|
||||
config DEBUG_SOCFPGA_ARRIA10_UART1
|
||||
depends on ARCH_INTEL_SOCFPGA
|
||||
depends on ARCH_SOCFPGA
|
||||
bool "Use SOCFPGA Arria10 UART1 for low-level debug"
|
||||
select DEBUG_UART_8250
|
||||
help
|
||||
@ -1113,7 +1111,7 @@ choice
|
||||
on SOCFPGA(Arria 10) based platforms.
|
||||
|
||||
config DEBUG_SOCFPGA_CYCLONE5_UART1
|
||||
depends on ARCH_INTEL_SOCFPGA
|
||||
depends on ARCH_SOCFPGA
|
||||
bool "Use SOCFPGA Cyclone 5 UART1 for low-level debug"
|
||||
select DEBUG_UART_8250
|
||||
help
|
||||
@ -1152,6 +1150,32 @@ choice
|
||||
Say Y here if you want kernel low-level debugging support
|
||||
on Allwinner A31/A23 based platforms on the R_UART.
|
||||
|
||||
config DEBUG_SIRFPRIMA2_UART1
|
||||
bool "Kernel low-level debugging messages via SiRFprimaII UART1"
|
||||
depends on ARCH_PRIMA2
|
||||
select DEBUG_SIRFSOC_UART
|
||||
help
|
||||
Say Y here if you want the debug print routines to direct
|
||||
their output to the uart1 port on SiRFprimaII devices.
|
||||
|
||||
config DEBUG_SIRFATLAS7_UART0
|
||||
bool "Kernel low-level debugging messages via SiRFatlas7 UART0"
|
||||
depends on ARCH_ATLAS7
|
||||
select DEBUG_SIRFSOC_UART
|
||||
help
|
||||
Say Y here if you want the debug print routines to direct
|
||||
their output to the uart0 port on SiRFATLAS7 devices.The uart0
|
||||
is used on SiRFATLAS7 as a extra debug port.sometimes an extra
|
||||
debug port can be very useful.
|
||||
|
||||
config DEBUG_SIRFATLAS7_UART1
|
||||
bool "Kernel low-level debugging messages via SiRFatlas7 UART1"
|
||||
depends on ARCH_ATLAS7
|
||||
select DEBUG_SIRFSOC_UART
|
||||
help
|
||||
Say Y here if you want the debug print routines to direct
|
||||
their output to the uart1 port on SiRFATLAS7 devices.
|
||||
|
||||
config DEBUG_SPEAR3XX
|
||||
bool "Kernel low-level debugging messages via ST SPEAr 3xx/6xx UART"
|
||||
depends on ARCH_SPEAR3XX || ARCH_SPEAR6XX
|
||||
@ -1168,9 +1192,10 @@ choice
|
||||
Say Y here if you want kernel low-level debugging support
|
||||
on ST SPEAr13xx based platforms.
|
||||
|
||||
config DEBUG_STIH41X_ASC2
|
||||
config STIH41X_DEBUG_ASC2
|
||||
bool "Use StiH415/416 ASC2 UART for low-level debug"
|
||||
depends on ARCH_STI
|
||||
select DEBUG_STI_UART
|
||||
help
|
||||
Say Y here if you want kernel low-level debugging support
|
||||
on STiH415/416 based platforms like b2000, which has
|
||||
@ -1178,9 +1203,10 @@ choice
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
config DEBUG_STIH41X_SBC_ASC1
|
||||
config STIH41X_DEBUG_SBC_ASC1
|
||||
bool "Use StiH415/416 SBC ASC1 UART for low-level debug"
|
||||
depends on ARCH_STI
|
||||
select DEBUG_STI_UART
|
||||
help
|
||||
Say Y here if you want kernel low-level debugging support
|
||||
on STiH415/416 based platforms like b2020. which has
|
||||
@ -1188,16 +1214,6 @@ choice
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
config DEBUG_STIH418_SBC_ASC0
|
||||
bool "Use StiH418 SBC ASC0 UART for low-level debug"
|
||||
depends on ARCH_STI
|
||||
help
|
||||
Say Y here if you want kernel low-level debugging support
|
||||
on STiH418 based platforms which has default UART wired
|
||||
up to SBC ASC0.
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
config STM32F4_DEBUG_UART
|
||||
bool "Use STM32F4 UART for low-level debug"
|
||||
depends on MACH_STM32F429 || MACH_STM32F469
|
||||
@ -1298,6 +1314,14 @@ choice
|
||||
Say Y here if you want kernel low-level debugging support
|
||||
on Tegra based platforms.
|
||||
|
||||
config DEBUG_U300_UART
|
||||
bool "Kernel low-level debugging messages via U300 UART0"
|
||||
depends on ARCH_U300
|
||||
select DEBUG_UART_PL01X
|
||||
help
|
||||
Say Y here if you want the debug print routines to direct
|
||||
their output to the uart port on U300 devices.
|
||||
|
||||
config DEBUG_UX500_UART
|
||||
depends on ARCH_U8500
|
||||
bool "Use Ux500 UART for low-level debug"
|
||||
@ -1363,6 +1387,18 @@ choice
|
||||
This option selects UART0 on VIA/Wondermedia System-on-a-chip
|
||||
devices, including VT8500, WM8505, WM8650 and WM8850.
|
||||
|
||||
config DEBUG_ZTE_ZX
|
||||
bool "Use ZTE ZX UART"
|
||||
select DEBUG_UART_PL01X
|
||||
depends on ARCH_ZX
|
||||
help
|
||||
Say Y here if you are enabling ZTE ZX296702 SOC and need
|
||||
debug uart support.
|
||||
|
||||
This option is preferred over the platform specific
|
||||
options; the platform specific options are deprecated
|
||||
and will be soon removed.
|
||||
|
||||
config DEBUG_ZYNQ_UART0
|
||||
bool "Kernel low-level debugging on Xilinx Zynq using UART0"
|
||||
depends on ARCH_ZYNQ
|
||||
@ -1420,6 +1456,20 @@ choice
|
||||
options; the platform specific options are deprecated
|
||||
and will be soon removed.
|
||||
|
||||
config DEBUG_LL_UART_EFM32
|
||||
bool "Kernel low-level debugging via efm32 UART"
|
||||
depends on ARCH_EFM32
|
||||
help
|
||||
Say Y here if you want the debug print routines to direct
|
||||
their output to an UART or USART port on efm32 based
|
||||
machines. Use the following addresses for DEBUG_UART_PHYS:
|
||||
|
||||
0x4000c000 | USART0
|
||||
0x4000c400 | USART1
|
||||
0x4000c800 | USART2
|
||||
0x4000e000 | UART0
|
||||
0x4000e400 | UART1
|
||||
|
||||
config DEBUG_LL_UART_PL01X
|
||||
bool "Kernel low-level debugging via ARM Ltd PL01x Primecell UART"
|
||||
help
|
||||
@ -1502,14 +1552,22 @@ config DEBUG_TEGRA_UART
|
||||
bool
|
||||
depends on ARCH_TEGRA
|
||||
|
||||
config DEBUG_STI_UART
|
||||
bool
|
||||
depends on ARCH_STI
|
||||
|
||||
config DEBUG_STM32_UART
|
||||
bool
|
||||
depends on ARCH_STM32
|
||||
|
||||
config DEBUG_SIRFSOC_UART
|
||||
bool
|
||||
depends on ARCH_SIRF
|
||||
|
||||
config DEBUG_UART_FLOW_CONTROL
|
||||
bool "Enable flow control (CTS) for the debug UART"
|
||||
depends on DEBUG_LL
|
||||
default y if DEBUG_FOOTBRIDGE_COM1 || DEBUG_GEMINI || ARCH_RPC
|
||||
default y if ARCH_EBSA110 || DEBUG_FOOTBRIDGE_COM1 || DEBUG_GEMINI || ARCH_RPC
|
||||
help
|
||||
Some UART ports are connected to terminals that will use modem
|
||||
control signals to indicate whether they are ready to receive text.
|
||||
@ -1529,6 +1587,7 @@ config DEBUG_LL_INCLUDE
|
||||
default "debug/meson.S" if DEBUG_MESON_UARTAO
|
||||
default "debug/pl01x.S" if DEBUG_LL_UART_PL01X || DEBUG_UART_PL01X
|
||||
default "debug/exynos.S" if DEBUG_EXYNOS_UART
|
||||
default "debug/efm32.S" if DEBUG_LL_UART_EFM32
|
||||
default "debug/icedcc.S" if DEBUG_ICEDCC
|
||||
default "debug/imx.S" if DEBUG_IMX1_UART || \
|
||||
DEBUG_IMX25_UART || \
|
||||
@ -1560,9 +1619,8 @@ config DEBUG_LL_INCLUDE
|
||||
default "debug/renesas-scif.S" if DEBUG_RMOBILE_SCIFA4
|
||||
default "debug/s3c24xx.S" if DEBUG_S3C24XX_UART || DEBUG_S3C64XX_UART
|
||||
default "debug/s5pv210.S" if DEBUG_S5PV210_UART
|
||||
default "debug/sti.S" if DEBUG_STIH41X_ASC2
|
||||
default "debug/sti.S" if DEBUG_STIH41X_SBC_ASC1
|
||||
default "debug/sti.S" if DEBUG_STIH418_SBC_ASC0
|
||||
default "debug/sirf.S" if DEBUG_SIRFSOC_UART
|
||||
default "debug/sti.S" if DEBUG_STI_UART
|
||||
default "debug/stm32.S" if DEBUG_STM32_UART
|
||||
default "debug/tegra.S" if DEBUG_TEGRA_UART
|
||||
default "debug/ux500.S" if DEBUG_UX500_UART
|
||||
@ -1581,7 +1639,7 @@ config DEBUG_UART_PL01X
|
||||
|
||||
# Compatibility options for 8250
|
||||
config DEBUG_UART_8250
|
||||
def_bool ARCH_IOP32X || ARCH_IXP4XX || ARCH_RPC
|
||||
def_bool ARCH_EBSA110 || ARCH_IOP32X || ARCH_IXP4XX || ARCH_RPC
|
||||
|
||||
config DEBUG_UART_PHYS
|
||||
hex "Physical base address of debug UART"
|
||||
@ -1595,7 +1653,7 @@ config DEBUG_UART_PHYS
|
||||
default 0x02531000 if DEBUG_KEYSTONE_UART1
|
||||
default 0x03010fe0 if ARCH_RPC
|
||||
default 0x07000000 if DEBUG_SUN9I_UART0
|
||||
default 0x09530000 if DEBUG_STIH418_SBC_ASC0
|
||||
default 0x09405000 if DEBUG_ZTE_ZX
|
||||
default 0x10009000 if DEBUG_REALVIEW_STD_PORT || \
|
||||
DEBUG_VEXPRESS_UART0_CA9
|
||||
default 0x1010c000 if DEBUG_REALVIEW_PB1176_PORT
|
||||
@ -1613,9 +1671,10 @@ config DEBUG_UART_PHYS
|
||||
default 0x1600d000 if DEBUG_SD5203_UART
|
||||
default 0x18000300 if DEBUG_BCM_5301X
|
||||
default 0x18000400 if DEBUG_BCM_HR2
|
||||
default 0x18010000 if DEBUG_SIRFATLAS7_UART0
|
||||
default 0x18020000 if DEBUG_SIRFATLAS7_UART1
|
||||
default 0x18023000 if DEBUG_BCM_IPROC_UART3
|
||||
default 0x1c090000 if DEBUG_VEXPRESS_UART0_RS1
|
||||
default 0x1f221000 if DEBUG_MSTARV7_PMUART
|
||||
default 0x20001000 if DEBUG_HIP01_UART
|
||||
default 0x20060000 if DEBUG_RK29_UART0
|
||||
default 0x20064000 if DEBUG_RK29_UART1 || DEBUG_RK3X_UART2
|
||||
@ -1623,6 +1682,7 @@ config DEBUG_UART_PHYS
|
||||
default 0x20201000 if DEBUG_BCM2835
|
||||
default 0x3e000000 if DEBUG_BCM_KONA_UART
|
||||
default 0x3f201000 if DEBUG_BCM2836
|
||||
default 0x4000e400 if DEBUG_LL_UART_EFM32
|
||||
default 0x40010000 if STM32MP1_DEBUG_UART
|
||||
default 0x40011000 if STM32F4_DEBUG_UART || STM32F7_DEBUG_UART || \
|
||||
STM32H7_DEBUG_UART
|
||||
@ -1657,9 +1717,12 @@ config DEBUG_UART_PHYS
|
||||
default 0x80010000 if DEBUG_ASM9260_UART
|
||||
default 0x80070000 if DEBUG_IMX23_UART
|
||||
default 0x80074000 if DEBUG_IMX28_UART
|
||||
default 0x80230000 if DEBUG_PICOXCELL_UART
|
||||
default 0x808c0000 if DEBUG_EP93XX || ARCH_EP93XX
|
||||
default 0x90020000 if DEBUG_NSPIRE_CLASSIC_UART || DEBUG_NSPIRE_CX_UART
|
||||
default 0xb0060000 if DEBUG_SIRFPRIMA2_UART1
|
||||
default 0xb0090000 if DEBUG_VEXPRESS_UART0_CRX
|
||||
default 0xc0013000 if DEBUG_U300_UART
|
||||
default 0xc8000000 if ARCH_IXP4XX && !CPU_BIG_ENDIAN
|
||||
default 0xc8000003 if ARCH_IXP4XX && CPU_BIG_ENDIAN
|
||||
default 0xd0000000 if DEBUG_SPEAR3XX
|
||||
@ -1680,6 +1743,7 @@ config DEBUG_UART_PHYS
|
||||
default 0xe8008000 if DEBUG_R7S72100_SCIF2 || DEBUG_R7S9210_SCIF2
|
||||
default 0xe8009000 if DEBUG_R7S9210_SCIF4
|
||||
default 0xf0000000 if DEBUG_DIGICOLOR_UA0
|
||||
default 0xf0000be0 if ARCH_EBSA110
|
||||
default 0xf1012000 if DEBUG_MVEBU_UART0_ALTERNATE
|
||||
default 0xf1012100 if DEBUG_MVEBU_UART1_ALTERNATE
|
||||
default 0xf7fc9000 if DEBUG_BERLIN_UART
|
||||
@ -1689,9 +1753,7 @@ config DEBUG_UART_PHYS
|
||||
default 0xfc00c000 if DEBUG_AT91_SAMA5D4_USART3
|
||||
default 0xfcb00000 if DEBUG_HI3620_UART
|
||||
default 0xfd883000 if DEBUG_ALPINE_UART0
|
||||
default 0xfe531000 if DEBUG_STIH41X_SBC_ASC1
|
||||
default 0xfe800000 if ARCH_IOP32X
|
||||
default 0xfed32000 if DEBUG_STIH41X_ASC2
|
||||
default 0xff690000 if DEBUG_RK32_UART2
|
||||
default 0xffc02000 if DEBUG_SOCFPGA_UART0
|
||||
default 0xffc02100 if DEBUG_SOCFPGA_ARRIA10_UART1
|
||||
@ -1707,6 +1769,7 @@ config DEBUG_UART_PHYS
|
||||
default 0xfffff200 if DEBUG_AT91_RM9200_DBGU
|
||||
depends on ARCH_EP93XX || \
|
||||
DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \
|
||||
DEBUG_LL_UART_EFM32 || \
|
||||
DEBUG_UART_8250 || DEBUG_UART_PL01X || DEBUG_MESON_UARTAO || \
|
||||
DEBUG_QCOM_UARTDM || DEBUG_R7S72100_SCIF2 || \
|
||||
DEBUG_R7S9210_SCIF2 || DEBUG_R7S9210_SCIF4 || \
|
||||
@ -1718,10 +1781,8 @@ config DEBUG_UART_PHYS
|
||||
DEBUG_RMOBILE_SCIFA4 || DEBUG_S3C24XX_UART || \
|
||||
DEBUG_S3C64XX_UART || \
|
||||
DEBUG_BCM63XX_UART || DEBUG_ASM9260_UART || \
|
||||
DEBUG_DIGICOLOR_UA0 || \
|
||||
DEBUG_AT91_UART || DEBUG_STM32_UART || \
|
||||
DEBUG_STIH41X_ASC2 || DEBUG_STIH41X_SBC_ASC1 || \
|
||||
DEBUG_STIH418_SBC_ASC0
|
||||
DEBUG_SIRFSOC_UART || DEBUG_DIGICOLOR_UA0 || \
|
||||
DEBUG_AT91_UART || DEBUG_STM32_UART
|
||||
|
||||
config DEBUG_UART_VIRT
|
||||
hex "Virtual base address of debug UART"
|
||||
@ -1729,11 +1790,11 @@ config DEBUG_UART_VIRT
|
||||
default 0xc8821000 if DEBUG_RV1108_UART1
|
||||
default 0xc8912000 if DEBUG_RV1108_UART0
|
||||
default 0xe0010fe0 if ARCH_RPC
|
||||
default 0xf0000be0 if ARCH_EBSA110
|
||||
default 0xf0010000 if DEBUG_ASM9260_UART
|
||||
default 0xf0100000 if DEBUG_DIGICOLOR_UA0
|
||||
default 0xf01fb000 if DEBUG_NOMADIK_UART
|
||||
default 0xf0201000 if DEBUG_BCM2835 || DEBUG_BCM2836
|
||||
default 0xf0221000 if DEBUG_MSTARV7_PMUART
|
||||
default 0xf1000300 if DEBUG_BCM_5301X
|
||||
default 0xf1000400 if DEBUG_BCM_HR2
|
||||
default 0xf1002000 if DEBUG_MT8127_UART0
|
||||
@ -1767,7 +1828,6 @@ config DEBUG_UART_VIRT
|
||||
default 0xf8090000 if DEBUG_VEXPRESS_UART0_RS1
|
||||
default 0xf8ffee00 if DEBUG_AT91_SAM9263_DBGU
|
||||
default 0xf8fff200 if DEBUG_AT91_RM9200_DBGU
|
||||
default 0xf9530000 if DEBUG_STIH418_SBC_ASC0
|
||||
default 0xf9e09000 if DEBUG_AM33XXUART1
|
||||
default 0xfa020000 if DEBUG_OMAP4UART3 || DEBUG_TI81XXUART1
|
||||
default 0xfa022000 if DEBUG_TI81XXUART2
|
||||
@ -1784,15 +1844,15 @@ config DEBUG_UART_VIRT
|
||||
default 0xfb020000 if DEBUG_OMAP3UART3
|
||||
default 0xfb042000 if DEBUG_OMAP3UART4
|
||||
default 0xfb10c000 if DEBUG_REALVIEW_PB1176_PORT
|
||||
default 0xfc705000 if DEBUG_ZTE_ZX
|
||||
default 0xfcfe8600 if DEBUG_BCM63XX_UART
|
||||
default 0xfd000000 if DEBUG_SPEAR3XX || DEBUG_SPEAR13XX
|
||||
default 0xfd531000 if DEBUG_STIH41X_SBC_ASC1
|
||||
default 0xfd883000 if DEBUG_ALPINE_UART0
|
||||
default 0xfdd32000 if DEBUG_STIH41X_ASC2
|
||||
default 0xfe010000 if STM32MP1_DEBUG_UART
|
||||
default 0xfe017000 if DEBUG_MMP_UART2
|
||||
default 0xfe018000 if DEBUG_MMP_UART3
|
||||
default 0xfe100000 if DEBUG_IMX23_UART || DEBUG_IMX28_UART
|
||||
default 0xfe230000 if DEBUG_PICOXCELL_UART
|
||||
default 0xfe300000 if DEBUG_BCM_KONA_UART
|
||||
default 0xfe800000 if ARCH_IOP32X
|
||||
default 0xfeb00000 if DEBUG_HI3620_UART || DEBUG_HIX5HD2_UART
|
||||
@ -1805,7 +1865,10 @@ config DEBUG_UART_VIRT
|
||||
default 0xfec03000 if DEBUG_SOCFPGA_CYCLONE5_UART1
|
||||
default 0xfec12000 if DEBUG_MVEBU_UART0 || DEBUG_MVEBU_UART0_ALTERNATE
|
||||
default 0xfec12100 if DEBUG_MVEBU_UART1_ALTERNATE
|
||||
default 0xfec10000 if DEBUG_SIRFATLAS7_UART0
|
||||
default 0xfec20000 if DEBUG_DAVINCI_DMx_UART0
|
||||
default 0xfec20000 if DEBUG_SIRFATLAS7_UART1
|
||||
default 0xfec60000 if DEBUG_SIRFPRIMA2_UART1
|
||||
default 0xfec90000 if DEBUG_RK32_UART2
|
||||
default 0xfed0c000 if DEBUG_DAVINCI_DA8XX_UART1
|
||||
default 0xfed0d000 if DEBUG_DAVINCI_DA8XX_UART2 || DEBUG_SD5203_UART
|
||||
@ -1815,12 +1878,13 @@ config DEBUG_UART_VIRT
|
||||
default 0xfedc0000 if DEBUG_EP93XX
|
||||
default 0xfee003f8 if DEBUG_FOOTBRIDGE_COM1
|
||||
default 0xfee20000 if DEBUG_NSPIRE_CLASSIC_UART || DEBUG_NSPIRE_CX_UART
|
||||
default 0xfec00000 if ARCH_IXP4XX && !CPU_BIG_ENDIAN
|
||||
default 0xfec00003 if ARCH_IXP4XX && CPU_BIG_ENDIAN
|
||||
default 0xfef00000 if ARCH_IXP4XX && !CPU_BIG_ENDIAN
|
||||
default 0xfef00003 if ARCH_IXP4XX && CPU_BIG_ENDIAN
|
||||
default 0xfef36000 if DEBUG_HIGHBANK_UART
|
||||
default 0xfefb0000 if DEBUG_OMAP1UART1 || DEBUG_OMAP7XXUART1
|
||||
default 0xfefb0800 if DEBUG_OMAP1UART2 || DEBUG_OMAP7XXUART2
|
||||
default 0xfefb9800 if DEBUG_OMAP1UART3 || DEBUG_OMAP7XXUART3
|
||||
default 0xff003000 if DEBUG_U300_UART
|
||||
default 0xffd01000 if DEBUG_HIP01_UART
|
||||
default DEBUG_UART_PHYS if !MMU
|
||||
depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \
|
||||
@ -1828,10 +1892,8 @@ config DEBUG_UART_VIRT
|
||||
DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART || \
|
||||
DEBUG_S3C64XX_UART || \
|
||||
DEBUG_BCM63XX_UART || DEBUG_ASM9260_UART || \
|
||||
DEBUG_DIGICOLOR_UA0 || \
|
||||
DEBUG_AT91_UART || DEBUG_STM32_UART || \
|
||||
DEBUG_STIH41X_ASC2 || DEBUG_STIH41X_SBC_ASC1 || \
|
||||
DEBUG_STIH418_SBC_ASC0
|
||||
DEBUG_SIRFSOC_UART || DEBUG_DIGICOLOR_UA0 || \
|
||||
DEBUG_AT91_UART || DEBUG_STM32_UART
|
||||
|
||||
config DEBUG_UART_8250_SHIFT
|
||||
int "Register offset shift for the 8250 debug UART"
|
||||
@ -1839,14 +1901,14 @@ config DEBUG_UART_8250_SHIFT
|
||||
default 0 if DEBUG_FOOTBRIDGE_COM1 || ARCH_IOP32X || DEBUG_BCM_5301X || \
|
||||
DEBUG_BCM_HR2 || DEBUG_OMAP7XXUART1 || DEBUG_OMAP7XXUART2 || \
|
||||
DEBUG_OMAP7XXUART3
|
||||
default 3 if DEBUG_MSTARV7_PMUART
|
||||
default 2
|
||||
|
||||
config DEBUG_UART_8250_WORD
|
||||
bool "Use 32-bit accesses for 8250 UART"
|
||||
depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250
|
||||
depends on DEBUG_UART_8250_SHIFT >= 2
|
||||
default y if DEBUG_SOCFPGA_UART0 || DEBUG_SOCFPGA_ARRIA10_UART1 || \
|
||||
default y if DEBUG_PICOXCELL_UART || \
|
||||
DEBUG_SOCFPGA_UART0 || DEBUG_SOCFPGA_ARRIA10_UART1 || \
|
||||
DEBUG_SOCFPGA_CYCLONE5_UART1 || DEBUG_KEYSTONE_UART0 || \
|
||||
DEBUG_KEYSTONE_UART1 || DEBUG_ALPINE_UART0 || \
|
||||
DEBUG_DAVINCI_DMx_UART0 || DEBUG_DAVINCI_DA8XX_UART1 || \
|
||||
@ -1866,7 +1928,7 @@ config DEBUG_UNCOMPRESS
|
||||
depends on ARCH_MULTIPLATFORM || PLAT_SAMSUNG || ARM_SINGLE_ARMV7M
|
||||
depends on DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \
|
||||
(!DEBUG_TEGRA_UART || !ZBOOT_ROM) && \
|
||||
!DEBUG_BRCMSTB_UART && !DEBUG_SEMIHOSTING
|
||||
!DEBUG_BRCMSTB_UART
|
||||
help
|
||||
This option influences the normal decompressor output for
|
||||
multiplatform kernels. Normally, multiplatform kernels disable
|
||||
|
@ -10,7 +10,7 @@
|
||||
#
|
||||
# Copyright (C) 1995-2001 by Russell King
|
||||
|
||||
LDFLAGS_vmlinux := --no-undefined -X --pic-veneer -z norelro
|
||||
LDFLAGS_vmlinux := --no-undefined -X --pic-veneer
|
||||
ifeq ($(CONFIG_CPU_ENDIAN_BE8),y)
|
||||
LDFLAGS_vmlinux += --be8
|
||||
KBUILD_LDFLAGS_MODULE += --be8
|
||||
@ -168,6 +168,8 @@ machine-$(CONFIG_ARCH_CNS3XXX) += cns3xxx
|
||||
machine-$(CONFIG_ARCH_DAVINCI) += davinci
|
||||
machine-$(CONFIG_ARCH_DIGICOLOR) += digicolor
|
||||
machine-$(CONFIG_ARCH_DOVE) += dove
|
||||
machine-$(CONFIG_ARCH_EBSA110) += ebsa110
|
||||
machine-$(CONFIG_ARCH_EFM32) += efm32
|
||||
machine-$(CONFIG_ARCH_EP93XX) += ep93xx
|
||||
machine-$(CONFIG_ARCH_EXYNOS) += exynos
|
||||
machine-$(CONFIG_ARCH_FOOTBRIDGE) += footbridge
|
||||
@ -198,6 +200,7 @@ machine-$(CONFIG_ARCH_OXNAS) += oxnas
|
||||
machine-$(CONFIG_ARCH_OMAP1) += omap1
|
||||
machine-$(CONFIG_ARCH_OMAP2PLUS) += omap2
|
||||
machine-$(CONFIG_ARCH_ORION5X) += orion5x
|
||||
machine-$(CONFIG_ARCH_PICOXCELL) += picoxcell
|
||||
machine-$(CONFIG_ARCH_PXA) += pxa
|
||||
machine-$(CONFIG_ARCH_QCOM) += qcom
|
||||
machine-$(CONFIG_ARCH_RDA) += rda
|
||||
@ -209,15 +212,19 @@ machine-$(CONFIG_PLAT_SAMSUNG) += s3c
|
||||
machine-$(CONFIG_ARCH_S5PV210) += s5pv210
|
||||
machine-$(CONFIG_ARCH_SA1100) += sa1100
|
||||
machine-$(CONFIG_ARCH_RENESAS) += shmobile
|
||||
machine-$(CONFIG_ARCH_INTEL_SOCFPGA) += socfpga
|
||||
machine-$(CONFIG_ARCH_SIRF) += prima2
|
||||
machine-$(CONFIG_ARCH_SOCFPGA) += socfpga
|
||||
machine-$(CONFIG_ARCH_STI) += sti
|
||||
machine-$(CONFIG_ARCH_STM32) += stm32
|
||||
machine-$(CONFIG_ARCH_SUNXI) += sunxi
|
||||
machine-$(CONFIG_ARCH_TANGO) += tango
|
||||
machine-$(CONFIG_ARCH_TEGRA) += tegra
|
||||
machine-$(CONFIG_ARCH_U300) += u300
|
||||
machine-$(CONFIG_ARCH_U8500) += ux500
|
||||
machine-$(CONFIG_ARCH_VERSATILE) += versatile
|
||||
machine-$(CONFIG_ARCH_VEXPRESS) += vexpress
|
||||
machine-$(CONFIG_ARCH_VT8500) += vt8500
|
||||
machine-$(CONFIG_ARCH_ZX) += zx
|
||||
machine-$(CONFIG_ARCH_ZYNQ) += zynq
|
||||
machine-$(CONFIG_PLAT_SPEAR) += spear
|
||||
|
||||
@ -228,6 +235,13 @@ plat-$(CONFIG_PLAT_ORION) += orion
|
||||
plat-$(CONFIG_PLAT_PXA) += pxa
|
||||
plat-$(CONFIG_PLAT_VERSATILE) += versatile
|
||||
|
||||
ifeq ($(CONFIG_ARCH_EBSA110),y)
|
||||
# This is what happens if you forget the IOCS16 line.
|
||||
# PCMCIA cards stop working.
|
||||
CFLAGS_3c589_cs.o :=-DISA_SIXTEEN_BIT_PERIPHERAL
|
||||
export CFLAGS_3c589_cs.o
|
||||
endif
|
||||
|
||||
# The byte offset of the kernel image in RAM from the start of RAM.
|
||||
TEXT_OFFSET := $(textofs-y)
|
||||
|
||||
@ -252,6 +266,7 @@ endif
|
||||
|
||||
export TEXT_OFFSET GZFLAGS MMUEXT
|
||||
|
||||
core-y += arch/arm/
|
||||
# If we have a machine-specific directory, then include it in the build.
|
||||
core-y += $(machdirs) $(platdirs)
|
||||
|
||||
@ -259,6 +274,8 @@ core-y += $(machdirs) $(platdirs)
|
||||
core- += $(patsubst %,arch/arm/mach-%/, $(machine-))
|
||||
core- += $(patsubst %,arch/arm/plat-%/, $(plat-))
|
||||
|
||||
drivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/
|
||||
|
||||
libs-y := arch/arm/lib/ $(libs-y)
|
||||
|
||||
# Default target when executing plain make
|
||||
|
@ -24,7 +24,6 @@ OBJS += hyp-stub.o
|
||||
endif
|
||||
|
||||
GCOV_PROFILE := n
|
||||
KASAN_SANITIZE := n
|
||||
|
||||
# Prevents link failures: __sanitizer_cov_trace_pc() is not linked in.
|
||||
KCOV_INSTRUMENT := n
|
||||
@ -87,20 +86,24 @@ libfdt_objs := fdt_rw.o fdt_ro.o fdt_wip.o fdt.o
|
||||
ifeq ($(CONFIG_ARM_ATAG_DTB_COMPAT),y)
|
||||
OBJS += $(libfdt_objs) atags_to_fdt.o
|
||||
endif
|
||||
ifeq ($(CONFIG_USE_OF),y)
|
||||
OBJS += $(libfdt_objs) fdt_check_mem_start.o
|
||||
endif
|
||||
|
||||
# -fstack-protector-strong triggers protection checks in this code,
|
||||
# but it is being used too early to link to meaningful stack_chk logic.
|
||||
$(foreach o, $(libfdt_objs) atags_to_fdt.o fdt_check_mem_start.o, \
|
||||
$(foreach o, $(libfdt_objs) atags_to_fdt.o, \
|
||||
$(eval CFLAGS_$(o) := -I $(srctree)/scripts/dtc/libfdt -fno-stack-protector))
|
||||
|
||||
# These were previously generated C files. When you are building the kernel
|
||||
# with O=, make sure to remove the stale files in the output tree. Otherwise,
|
||||
# the build system wrongly compiles the stale ones.
|
||||
ifdef building_out_of_srctree
|
||||
$(shell rm -f $(addprefix $(obj)/, fdt_rw.c fdt_ro.c fdt_wip.c fdt.c))
|
||||
endif
|
||||
|
||||
targets := vmlinux vmlinux.lds piggy_data piggy.o \
|
||||
lib1funcs.o ashldi3.o bswapsdi2.o \
|
||||
head.o $(OBJS)
|
||||
|
||||
clean-files += lib1funcs.S ashldi3.S bswapsdi2.S hyp-stub.S
|
||||
clean-files += piggy_data lib1funcs.S ashldi3.S bswapsdi2.S hyp-stub.S
|
||||
|
||||
KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
|
||||
|
||||
|
@ -11,12 +11,6 @@
|
||||
|
||||
#include "efi-header.S"
|
||||
|
||||
#ifdef __ARMEB__
|
||||
#define OF_DT_MAGIC 0xd00dfeed
|
||||
#else
|
||||
#define OF_DT_MAGIC 0xedfe0dd0
|
||||
#endif
|
||||
|
||||
AR_CLASS( .arch armv7-a )
|
||||
M_CLASS( .arch armv7-m )
|
||||
|
||||
@ -171,13 +165,6 @@
|
||||
orr \res, \res, \tmp1, lsl #24
|
||||
.endm
|
||||
|
||||
.macro be32tocpu, val, tmp
|
||||
#ifndef __ARMEB__
|
||||
/* convert to little endian */
|
||||
rev_l \val, \tmp
|
||||
#endif
|
||||
.endm
|
||||
|
||||
.section ".start", "ax"
|
||||
/*
|
||||
* sort out different calling conventions
|
||||
@ -279,40 +266,10 @@ not_angel:
|
||||
* are already placing their zImage in (eg) the top 64MB
|
||||
* of this range.
|
||||
*/
|
||||
mov r0, pc
|
||||
and r0, r0, #0xf8000000
|
||||
#ifdef CONFIG_USE_OF
|
||||
adr r1, LC1
|
||||
#ifdef CONFIG_ARM_APPENDED_DTB
|
||||
/*
|
||||
* Look for an appended DTB. If found, we cannot use it to
|
||||
* validate the calculated start of physical memory, as its
|
||||
* memory nodes may need to be augmented by ATAGS stored at
|
||||
* an offset from the same start of physical memory.
|
||||
*/
|
||||
ldr r2, [r1, #4] @ get &_edata
|
||||
add r2, r2, r1 @ relocate it
|
||||
ldr r2, [r2] @ get DTB signature
|
||||
ldr r3, =OF_DT_MAGIC
|
||||
cmp r2, r3 @ do we have a DTB there?
|
||||
beq 1f @ if yes, skip validation
|
||||
#endif /* CONFIG_ARM_APPENDED_DTB */
|
||||
|
||||
/*
|
||||
* Make sure we have some stack before calling C code.
|
||||
* No GOT fixup has occurred yet, but none of the code we're
|
||||
* about to call uses any global variables.
|
||||
*/
|
||||
ldr sp, [r1] @ get stack location
|
||||
add sp, sp, r1 @ apply relocation
|
||||
|
||||
/* Validate calculated start against passed DTB */
|
||||
mov r1, r8
|
||||
bl fdt_check_mem_start
|
||||
1:
|
||||
#endif /* CONFIG_USE_OF */
|
||||
mov r4, pc
|
||||
and r4, r4, #0xf8000000
|
||||
/* Determine final kernel image address. */
|
||||
add r4, r0, #TEXT_OFFSET
|
||||
add r4, r4, #TEXT_OFFSET
|
||||
#else
|
||||
ldr r4, =zreladdr
|
||||
#endif
|
||||
@ -368,7 +325,11 @@ restart: adr r0, LC1
|
||||
*/
|
||||
|
||||
ldr lr, [r6, #0]
|
||||
ldr r1, =OF_DT_MAGIC
|
||||
#ifndef __ARMEB__
|
||||
ldr r1, =0xedfe0dd0 @ sig is 0xd00dfeed big endian
|
||||
#else
|
||||
ldr r1, =0xd00dfeed
|
||||
#endif
|
||||
cmp lr, r1
|
||||
bne dtb_check_done @ not found
|
||||
|
||||
@ -384,7 +345,13 @@ restart: adr r0, LC1
|
||||
|
||||
/* Get the initial DTB size */
|
||||
ldr r5, [r6, #4]
|
||||
be32tocpu r5, r1
|
||||
#ifndef __ARMEB__
|
||||
/* convert to little endian */
|
||||
eor r1, r5, r5, ror #16
|
||||
bic r1, r1, #0x00ff0000
|
||||
mov r5, r5, ror #8
|
||||
eor r5, r5, r1, lsr #8
|
||||
#endif
|
||||
dbgadtb r6, r5
|
||||
/* 50% DTB growth should be good enough */
|
||||
add r5, r5, r5, lsr #1
|
||||
@ -436,7 +403,13 @@ restart: adr r0, LC1
|
||||
|
||||
/* Get the current DTB size */
|
||||
ldr r5, [r6, #4]
|
||||
be32tocpu r5, r1
|
||||
#ifndef __ARMEB__
|
||||
/* convert r5 (dtb size) to little endian */
|
||||
eor r1, r5, r5, ror #16
|
||||
bic r1, r1, #0x00ff0000
|
||||
mov r5, r5, ror #8
|
||||
eor r5, r5, r1, lsr #8
|
||||
#endif
|
||||
|
||||
/* preserve 64-bit alignment */
|
||||
add r5, r5, #7
|
||||
@ -495,10 +468,15 @@ dtb_check_done:
|
||||
|
||||
/*
|
||||
* Compute the address of the hyp vectors after relocation.
|
||||
* This requires some arithmetic since we cannot directly
|
||||
* reference __hyp_stub_vectors in a PC-relative way.
|
||||
* Call __hyp_set_vectors with the new address so that we
|
||||
* can HVC again after the copy.
|
||||
*/
|
||||
adr_l r0, __hyp_stub_vectors
|
||||
0: adr r0, 0b
|
||||
movw r1, #:lower16:__hyp_stub_vectors - 0b
|
||||
movt r1, #:upper16:__hyp_stub_vectors - 0b
|
||||
add r0, r0, r1
|
||||
sub r0, r0, r5
|
||||
add r0, r0, r10
|
||||
bl __hyp_set_vectors
|
||||
@ -649,11 +627,17 @@ not_relocated: mov r0, #0
|
||||
cmp r0, #HYP_MODE @ if not booted in HYP mode...
|
||||
bne __enter_kernel @ boot kernel directly
|
||||
|
||||
adr_l r0, __hyp_reentry_vectors
|
||||
adr r12, .L__hyp_reentry_vectors_offset
|
||||
ldr r0, [r12]
|
||||
add r0, r0, r12
|
||||
|
||||
bl __hyp_set_vectors
|
||||
__HVC(0) @ otherwise bounce to hyp mode
|
||||
|
||||
b . @ should never be reached
|
||||
|
||||
.align 2
|
||||
.L__hyp_reentry_vectors_offset: .long __hyp_reentry_vectors - .
|
||||
#else
|
||||
b __enter_kernel
|
||||
#endif
|
||||
|
@ -7,25 +7,6 @@
|
||||
|
||||
#include <linux/string.h>
|
||||
|
||||
/*
|
||||
* The decompressor is built without KASan but uses the same redirects as the
|
||||
* rest of the kernel when CONFIG_KASAN is enabled, defining e.g. memcpy()
|
||||
* to __memcpy() but since we are not linking with the main kernel string
|
||||
* library in the decompressor, that will lead to link failures.
|
||||
*
|
||||
* Undefine KASan's versions, define the wrapped functions and alias them to
|
||||
* the right names so that when e.g. __memcpy() appear in the code, it will
|
||||
* still be linked to this local version of memcpy().
|
||||
*/
|
||||
#ifdef CONFIG_KASAN
|
||||
#undef memcpy
|
||||
#undef memmove
|
||||
#undef memset
|
||||
void *__memcpy(void *__dest, __const void *__src, size_t __n) __alias(memcpy);
|
||||
void *__memmove(void *__dest, __const void *__src, size_t count) __alias(memmove);
|
||||
void *__memset(void *s, int c, size_t count) __alias(memset);
|
||||
#endif
|
||||
|
||||
void *memcpy(void *__dest, __const void *__src, size_t __n)
|
||||
{
|
||||
int i = 0;
|
||||
|
@ -1,8 +1,18 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
dtb-$(CONFIG_ARCH_BCM2835) += \
|
||||
bcm2708-rpi-b.dtb \
|
||||
bcm2708-rpi-b-rev1.dtb \
|
||||
bcm2708-rpi-b-plus.dtb \
|
||||
bcm2708-rpi-cm.dtb \
|
||||
bcm2708-rpi-zero.dtb \
|
||||
bcm2708-rpi-zero-w.dtb \
|
||||
bcm2709-rpi-2-b.dtb \
|
||||
bcm2710-rpi-2-b.dtb \
|
||||
bcm2710-rpi-3-b.dtb \
|
||||
bcm2710-rpi-3-b-plus.dtb \
|
||||
bcm2711-rpi-4-b.dtb \
|
||||
bcm2711-rpi-400.dtb \
|
||||
bcm2710-rpi-cm3.dtb \
|
||||
bcm2711-rpi-cm4.dtb
|
||||
|
||||
@ -81,6 +91,10 @@ dtb-$(CONFIG_SOC_SAM_V7) += \
|
||||
at91-sama5d4_xplained.dtb \
|
||||
at91-sama5d4ek.dtb \
|
||||
at91-vinco.dtb
|
||||
dtb-$(CONFIG_ARCH_ATLAS6) += \
|
||||
atlas6-evb.dtb
|
||||
dtb-$(CONFIG_ARCH_ATLAS7) += \
|
||||
atlas7-evb.dtb
|
||||
dtb-$(CONFIG_ARCH_AXXIA) += \
|
||||
axm5516-amarillo.dtb
|
||||
dtb-$(CONFIG_ARCH_BCM2835) += \
|
||||
@ -95,8 +109,6 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
|
||||
bcm2837-rpi-3-b.dtb \
|
||||
bcm2837-rpi-3-b-plus.dtb \
|
||||
bcm2837-rpi-cm3-io3.dtb \
|
||||
bcm2711-rpi-400.dtb \
|
||||
bcm2711-rpi-4-b.dtb \
|
||||
bcm2835-rpi-zero.dtb \
|
||||
bcm2835-rpi-zero-w.dtb
|
||||
dtb-$(CONFIG_ARCH_BCM_5301X) += \
|
||||
@ -181,6 +193,8 @@ dtb-$(CONFIG_ARCH_DAVINCI) += \
|
||||
da850-lego-ev3.dtb
|
||||
dtb-$(CONFIG_ARCH_DIGICOLOR) += \
|
||||
cx92755_equinox.dtb
|
||||
dtb-$(CONFIG_ARCH_EFM32) += \
|
||||
efm32gg-dk3750.dtb
|
||||
dtb-$(CONFIG_ARCH_EXYNOS3) += \
|
||||
exynos3250-artik5-eval.dtb \
|
||||
exynos3250-monk.dtb \
|
||||
@ -199,7 +213,6 @@ dtb-$(CONFIG_ARCH_EXYNOS4) += \
|
||||
exynos4412-odroidx.dtb \
|
||||
exynos4412-odroidx2.dtb \
|
||||
exynos4412-origen.dtb \
|
||||
exynos4412-p4note-n8010.dtb \
|
||||
exynos4412-smdk4412.dtb \
|
||||
exynos4412-tiny4412.dtb \
|
||||
exynos4412-trats2.dtb
|
||||
@ -248,7 +261,6 @@ dtb-$(CONFIG_ARCH_INTEGRATOR) += \
|
||||
integratorcp.dtb
|
||||
dtb-$(CONFIG_ARCH_IXP4XX) += \
|
||||
intel-ixp42x-linksys-nslu2.dtb \
|
||||
intel-ixp42x-welltech-epbx100.dtb \
|
||||
intel-ixp43x-gateworks-gw2358.dtb
|
||||
dtb-$(CONFIG_ARCH_KEYSTONE) += \
|
||||
keystone-k2hk-evm.dtb \
|
||||
@ -342,14 +354,8 @@ dtb-$(CONFIG_ARCH_LPC18XX) += \
|
||||
dtb-$(CONFIG_ARCH_LPC32XX) += \
|
||||
lpc3250-ea3250.dtb \
|
||||
lpc3250-phy3250.dtb
|
||||
dtb-$(CONFIG_ARCH_WPCM450) += \
|
||||
nuvoton-wpcm450-supermicro-x9sci-ln4f.dtb
|
||||
dtb-$(CONFIG_ARCH_NPCM7XX) += \
|
||||
nuvoton-npcm730-gsj.dtb \
|
||||
nuvoton-npcm730-gbs.dtb \
|
||||
nuvoton-npcm730-kudo.dtb \
|
||||
nuvoton-npcm750-evb.dtb \
|
||||
nuvoton-npcm750-runbmc-olympus.dtb
|
||||
nuvoton-npcm750-evb.dtb
|
||||
dtb-$(CONFIG_MACH_MESON6) += \
|
||||
meson6-atv1200.dtb
|
||||
dtb-$(CONFIG_MACH_MESON8) += \
|
||||
@ -424,7 +430,6 @@ dtb-$(CONFIG_SOC_IMX53) += \
|
||||
imx53-usbarmory.dtb \
|
||||
imx53-voipac-bsb.dtb
|
||||
dtb-$(CONFIG_SOC_IMX6Q) += \
|
||||
imx6dl-alti6p.dtb \
|
||||
imx6dl-apf6dev.dtb \
|
||||
imx6dl-aristainetos_4.dtb \
|
||||
imx6dl-aristainetos_7.dtb \
|
||||
@ -461,7 +466,6 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
|
||||
imx6dl-icore.dtb \
|
||||
imx6dl-icore-mipi.dtb \
|
||||
imx6dl-icore-rqs.dtb \
|
||||
imx6dl-lanmcu.dtb \
|
||||
imx6dl-mamoj.dtb \
|
||||
imx6dl-nit6xlite.dtb \
|
||||
imx6dl-nitrogen6x.dtb \
|
||||
@ -471,9 +475,6 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
|
||||
imx6dl-pico-hobbit.dtb \
|
||||
imx6dl-pico-nymph.dtb \
|
||||
imx6dl-pico-pi.dtb \
|
||||
imx6dl-plybas.dtb \
|
||||
imx6dl-plym2m.dtb \
|
||||
imx6dl-prtmvt.dtb \
|
||||
imx6dl-prtrvt.dtb \
|
||||
imx6dl-prtvt7.dtb \
|
||||
imx6dl-rex-basic.dtb \
|
||||
@ -496,8 +497,6 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
|
||||
imx6dl-tx6u-811x.dtb \
|
||||
imx6dl-tx6u-81xx-mb7.dtb \
|
||||
imx6dl-udoo.dtb \
|
||||
imx6dl-victgo.dtb \
|
||||
imx6dl-vicut1.dtb \
|
||||
imx6dl-wandboard.dtb \
|
||||
imx6dl-wandboard-revb1.dtb \
|
||||
imx6dl-wandboard-revd1.dtb \
|
||||
@ -522,14 +521,8 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
|
||||
imx6q-display5-tianma-tm070-1280x768.dtb \
|
||||
imx6q-dmo-edmqmx6.dtb \
|
||||
imx6q-dms-ba16.dtb \
|
||||
imx6q-ds.dtb \
|
||||
imx6q-emcon-avari.dtb \
|
||||
imx6q-evi.dtb \
|
||||
imx6dl-b105pv2.dtb \
|
||||
imx6dl-b105v2.dtb \
|
||||
imx6dl-b125v2.dtb \
|
||||
imx6dl-b125pv2.dtb \
|
||||
imx6dl-b155v2.dtb \
|
||||
imx6q-gk802.dtb \
|
||||
imx6q-gw51xx.dtb \
|
||||
imx6q-gw52xx.dtb \
|
||||
@ -597,7 +590,6 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
|
||||
imx6q-udoo.dtb \
|
||||
imx6q-utilite-pro.dtb \
|
||||
imx6q-var-dt6customboard.dtb \
|
||||
imx6q-vicut1.dtb \
|
||||
imx6q-wandboard.dtb \
|
||||
imx6q-wandboard-revb1.dtb \
|
||||
imx6q-wandboard-revd1.dtb \
|
||||
@ -605,14 +597,12 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
|
||||
imx6qp-nitrogen6_max.dtb \
|
||||
imx6qp-nitrogen6_som2.dtb \
|
||||
imx6qp-phytec-mira-rdk-nand.dtb \
|
||||
imx6qp-prtwd3.dtb \
|
||||
imx6qp-sabreauto.dtb \
|
||||
imx6qp-sabresd.dtb \
|
||||
imx6qp-tx6qp-8037.dtb \
|
||||
imx6qp-tx6qp-8037-mb7.dtb \
|
||||
imx6qp-tx6qp-8137.dtb \
|
||||
imx6qp-tx6qp-8137-mb7.dtb \
|
||||
imx6qp-vicutp.dtb \
|
||||
imx6qp-wandboard-revd1.dtb \
|
||||
imx6qp-zii-rdu2.dtb
|
||||
dtb-$(CONFIG_SOC_IMX6SL) += \
|
||||
@ -648,9 +638,7 @@ dtb-$(CONFIG_SOC_IMX6UL) += \
|
||||
imx6ul-pico-dwarf.dtb \
|
||||
imx6ul-pico-hobbit.dtb \
|
||||
imx6ul-pico-pi.dtb \
|
||||
imx6ul-phytec-segin-ff-rdk-emmc.dtb \
|
||||
imx6ul-phytec-segin-ff-rdk-nand.dtb \
|
||||
imx6ul-prti6g.dtb \
|
||||
imx6ul-tx6ul-0010.dtb \
|
||||
imx6ul-tx6ul-0011.dtb \
|
||||
imx6ul-tx6ul-mainboard.dtb \
|
||||
@ -669,8 +657,6 @@ dtb-$(CONFIG_SOC_IMX7D) += \
|
||||
imx7d-colibri-emmc-aster.dtb \
|
||||
imx7d-colibri-emmc-eval-v3.dtb \
|
||||
imx7d-colibri-eval-v3.dtb \
|
||||
imx7d-flex-concentrator.dtb \
|
||||
imx7d-flex-concentrator-mfg.dtb \
|
||||
imx7d-mba7.dtb \
|
||||
imx7d-meerkat96.dtb \
|
||||
imx7d-nitrogen7.dtb \
|
||||
@ -678,7 +664,6 @@ dtb-$(CONFIG_SOC_IMX7D) += \
|
||||
imx7d-pico-hobbit.dtb \
|
||||
imx7d-pico-nymph.dtb \
|
||||
imx7d-pico-pi.dtb \
|
||||
imx7d-remarkable2.dtb \
|
||||
imx7d-sbc-imx7.dtb \
|
||||
imx7d-sdb.dtb \
|
||||
imx7d-sdb-reva.dtb \
|
||||
@ -740,8 +725,7 @@ dtb-$(CONFIG_ARCH_MXS) += \
|
||||
imx28-m28evk.dtb \
|
||||
imx28-sps1.dtb \
|
||||
imx28-ts4600.dtb \
|
||||
imx28-tx28.dtb \
|
||||
imx28-xea.dtb
|
||||
imx28-tx28.dtb
|
||||
dtb-$(CONFIG_ARCH_NOMADIK) += \
|
||||
ste-nomadik-s8815.dtb \
|
||||
ste-nomadik-nhk15.dtb
|
||||
@ -839,7 +823,6 @@ dtb-$(CONFIG_SOC_AM33XX) += \
|
||||
am335x-lxm.dtb \
|
||||
am335x-moxa-uc-2101.dtb \
|
||||
am335x-moxa-uc-8100-me-t.dtb \
|
||||
am335x-myirtech-myd.dtb \
|
||||
am335x-nano.dtb \
|
||||
am335x-netcan-plus-1xx.dtb \
|
||||
am335x-netcom-plus-2xx.dtb \
|
||||
@ -911,6 +894,11 @@ dtb-$(CONFIG_ARCH_ACTIONS) += \
|
||||
owl-s500-labrador-base-m.dtb \
|
||||
owl-s500-roseapplepi.dtb \
|
||||
owl-s500-sparky.dtb
|
||||
dtb-$(CONFIG_ARCH_PICOXCELL) += \
|
||||
picoxcell-pc7302-pc3x2.dtb \
|
||||
picoxcell-pc7302-pc3x3.dtb
|
||||
dtb-$(CONFIG_ARCH_PRIMA2) += \
|
||||
prima2-evb.dtb
|
||||
dtb-$(CONFIG_ARCH_PXA) += \
|
||||
pxa300-raumfeld-connector.dtb \
|
||||
pxa300-raumfeld-controller.dtb \
|
||||
@ -930,9 +918,6 @@ dtb-$(CONFIG_ARCH_QCOM) += \
|
||||
qcom-apq8074-dragonboard.dtb \
|
||||
qcom-apq8084-ifc6540.dtb \
|
||||
qcom-apq8084-mtp.dtb \
|
||||
qcom-ipq4018-ap120c-ac.dtb \
|
||||
qcom-ipq4018-ap120c-ac-bit.dtb \
|
||||
qcom-ipq4018-jalapeno.dtb \
|
||||
qcom-ipq4019-ap.dk01.1-c1.dtb \
|
||||
qcom-ipq4019-ap.dk04.1-c1.dtb \
|
||||
qcom-ipq4019-ap.dk04.1-c3.dtb \
|
||||
@ -948,10 +933,7 @@ dtb-$(CONFIG_ARCH_QCOM) += \
|
||||
qcom-msm8974-sony-xperia-amami.dtb \
|
||||
qcom-msm8974-sony-xperia-castor.dtb \
|
||||
qcom-msm8974-sony-xperia-honami.dtb \
|
||||
qcom-mdm9615-wp8548-mangoh-green.dtb \
|
||||
qcom-sdx55-mtp.dtb \
|
||||
qcom-sdx55-t55.dtb \
|
||||
qcom-sdx55-telit-fn980-tlb.dtb
|
||||
qcom-mdm9615-wp8548-mangoh-green.dtb
|
||||
dtb-$(CONFIG_ARCH_RDA) += \
|
||||
rda8810pl-orangepi-2g-iot.dtb \
|
||||
rda8810pl-orangepi-i96.dtb
|
||||
@ -1055,7 +1037,7 @@ dtb-$(CONFIG_ARCH_S5PV210) += \
|
||||
s5pv210-smdkc110.dtb \
|
||||
s5pv210-smdkv210.dtb \
|
||||
s5pv210-torbreck.dtb
|
||||
dtb-$(CONFIG_ARCH_INTEL_SOCFPGA) += \
|
||||
dtb-$(CONFIG_ARCH_SOCFPGA) += \
|
||||
socfpga_arria5_socdk.dtb \
|
||||
socfpga_arria10_socdk_nand.dtb \
|
||||
socfpga_arria10_socdk_qspi.dtb \
|
||||
@ -1093,19 +1075,13 @@ dtb-$(CONFIG_ARCH_STM32) += \
|
||||
stm32746g-eval.dtb \
|
||||
stm32h743i-eval.dtb \
|
||||
stm32h743i-disco.dtb \
|
||||
stm32h750i-art-pi.dtb \
|
||||
stm32mp153c-dhcom-drc02.dtb \
|
||||
stm32mp157a-avenger96.dtb \
|
||||
stm32mp157a-dhcor-avenger96.dtb \
|
||||
stm32mp157a-dk1.dtb \
|
||||
stm32mp157a-iot-box.dtb \
|
||||
stm32mp157a-microgea-stm32mp1-microdev2.0.dtb \
|
||||
stm32mp157a-microgea-stm32mp1-microdev2.0-of7.dtb \
|
||||
stm32mp157a-icore-stm32mp1-ctouch2.dtb \
|
||||
stm32mp157a-icore-stm32mp1-edimm2.2.dtb \
|
||||
stm32mp157a-stinger96.dtb \
|
||||
stm32mp157c-dhcom-pdk2.dtb \
|
||||
stm32mp157c-dhcom-picoitx.dtb \
|
||||
stm32mp157c-dk2.dtb \
|
||||
stm32mp157c-ed1.dtb \
|
||||
stm32mp157c-ev1.dtb \
|
||||
@ -1132,8 +1108,7 @@ dtb-$(CONFIG_MACH_SUN4I) += \
|
||||
sun4i-a10-olinuxino-lime.dtb \
|
||||
sun4i-a10-pcduino.dtb \
|
||||
sun4i-a10-pcduino2.dtb \
|
||||
sun4i-a10-pov-protab2-ips9.dtb \
|
||||
sun4i-a10-topwise-a721.dtb
|
||||
sun4i-a10-pov-protab2-ips9.dtb
|
||||
dtb-$(CONFIG_MACH_SUN5I) += \
|
||||
sun5i-a10s-auxtek-t003.dtb \
|
||||
sun5i-a10s-auxtek-t004.dtb \
|
||||
@ -1233,7 +1208,6 @@ dtb-$(CONFIG_MACH_SUN8I) += \
|
||||
sun8i-h3-nanopi-m1-plus.dtb \
|
||||
sun8i-h3-nanopi-neo.dtb \
|
||||
sun8i-h3-nanopi-neo-air.dtb \
|
||||
sun8i-h3-nanopi-r1.dtb \
|
||||
sun8i-h3-orangepi-2.dtb \
|
||||
sun8i-h3-orangepi-lite.dtb \
|
||||
sun8i-h3-orangepi-one.dtb \
|
||||
@ -1243,19 +1217,15 @@ dtb-$(CONFIG_MACH_SUN8I) += \
|
||||
sun8i-h3-orangepi-plus2e.dtb \
|
||||
sun8i-h3-orangepi-zero-plus2.dtb \
|
||||
sun8i-h3-rervision-dvk.dtb \
|
||||
sun8i-h3-zeropi.dtb \
|
||||
sun8i-h3-emlid-neutis-n5h3-devboard.dtb \
|
||||
sun8i-r16-bananapi-m2m.dtb \
|
||||
sun8i-r16-nintendo-nes-classic.dtb \
|
||||
sun8i-r16-nintendo-super-nes-classic.dtb \
|
||||
sun8i-r16-parrot.dtb \
|
||||
sun8i-r40-bananapi-m2-ultra.dtb \
|
||||
sun8i-r40-oka40i-c.dtb \
|
||||
sun8i-s3-elimo-initium.dtb \
|
||||
sun8i-s3-lichee-zero-plus.dtb \
|
||||
sun8i-s3-pinecube.dtb \
|
||||
sun8i-t3-cqa3t-bv3.dtb \
|
||||
sun8i-v3-sl631-imx179.dtb \
|
||||
sun8i-v3s-licheepi-zero.dtb \
|
||||
sun8i-v3s-licheepi-zero-dock.dtb \
|
||||
sun8i-v40-bananapi-m2-berry.dtb
|
||||
@ -1264,6 +1234,8 @@ dtb-$(CONFIG_MACH_SUN9I) += \
|
||||
sun9i-a80-cubieboard4.dtb
|
||||
dtb-$(CONFIG_MACH_SUNIV) += \
|
||||
suniv-f1c100s-licheepi-nano.dtb
|
||||
dtb-$(CONFIG_ARCH_TANGO) += \
|
||||
tango4-vantage-1172.dtb
|
||||
dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += \
|
||||
tegra20-acer-a500-picasso.dtb \
|
||||
tegra20-harmony.dtb \
|
||||
@ -1285,8 +1257,7 @@ dtb-$(CONFIG_ARCH_TEGRA_3x_SOC) += \
|
||||
tegra30-beaver.dtb \
|
||||
tegra30-cardhu-a02.dtb \
|
||||
tegra30-cardhu-a04.dtb \
|
||||
tegra30-colibri-eval-v3.dtb \
|
||||
tegra30-ouya.dtb
|
||||
tegra30-colibri-eval-v3.dtb
|
||||
dtb-$(CONFIG_ARCH_TEGRA_114_SOC) += \
|
||||
tegra114-dalmore.dtb \
|
||||
tegra114-roth.dtb \
|
||||
@ -1298,6 +1269,8 @@ dtb-$(CONFIG_ARCH_TEGRA_124_SOC) += \
|
||||
tegra124-nyan-big.dtb \
|
||||
tegra124-nyan-blaze.dtb \
|
||||
tegra124-venice2.dtb
|
||||
dtb-$(CONFIG_ARCH_U300) += \
|
||||
ste-u300.dtb
|
||||
dtb-$(CONFIG_ARCH_U8500) += \
|
||||
ste-snowball.dtb \
|
||||
ste-hrefprev60-stuib.dtb \
|
||||
@ -1306,7 +1279,6 @@ dtb-$(CONFIG_ARCH_U8500) += \
|
||||
ste-hrefv60plus-tvk.dtb \
|
||||
ste-href520-tvk.dtb \
|
||||
ste-ux500-samsung-golden.dtb \
|
||||
ste-ux500-samsung-janice.dtb \
|
||||
ste-ux500-samsung-skomer.dtb
|
||||
dtb-$(CONFIG_ARCH_UNIPHIER) += \
|
||||
uniphier-ld4-ref.dtb \
|
||||
@ -1336,7 +1308,6 @@ dtb-$(CONFIG_ARCH_VT8500) += \
|
||||
wm8850-w70v2.dtb
|
||||
dtb-$(CONFIG_ARCH_ZYNQ) += \
|
||||
zynq-cc108.dtb \
|
||||
zynq-ebaz4205.dtb \
|
||||
zynq-microzed.dtb \
|
||||
zynq-parallella.dtb \
|
||||
zynq-zc702.dtb \
|
||||
@ -1347,7 +1318,6 @@ dtb-$(CONFIG_ARCH_ZYNQ) += \
|
||||
zynq-zc770-xm013.dtb \
|
||||
zynq-zed.dtb \
|
||||
zynq-zturn.dtb \
|
||||
zynq-zturn-v5.dtb \
|
||||
zynq-zybo.dtb \
|
||||
zynq-zybo-z7.dtb
|
||||
dtb-$(CONFIG_MACH_ARMADA_370) += \
|
||||
@ -1365,8 +1335,6 @@ dtb-$(CONFIG_MACH_ARMADA_370) += \
|
||||
dtb-$(CONFIG_MACH_ARMADA_375) += \
|
||||
armada-375-db.dtb
|
||||
dtb-$(CONFIG_MACH_ARMADA_38X) += \
|
||||
armada-382-rd-ac3x-48g4x2xl.dtb \
|
||||
armada-385-atl-x530.dtb\
|
||||
armada-385-clearfog-gtr-s4.dtb \
|
||||
armada-385-clearfog-gtr-l8.dtb \
|
||||
armada-385-db-88f6820-amc.dtb \
|
||||
@ -1388,12 +1356,6 @@ dtb-$(CONFIG_MACH_ARMADA_39X) += \
|
||||
armada-398-db.dtb
|
||||
dtb-$(CONFIG_MACH_ARMADA_XP) += \
|
||||
armada-xp-axpwifiap.dtb \
|
||||
armada-xp-crs305-1g-4s.dtb \
|
||||
armada-xp-crs305-1g-4s-bit.dtb \
|
||||
armada-xp-crs326-24g-2s.dtb \
|
||||
armada-xp-crs326-24g-2s-bit.dtb \
|
||||
armada-xp-crs328-4c-20s-4s.dtb \
|
||||
armada-xp-crs328-4c-20s-4s-bit.dtb \
|
||||
armada-xp-db.dtb \
|
||||
armada-xp-db-dxbc2.dtb \
|
||||
armada-xp-db-xc3-24g4xg.dtb \
|
||||
@ -1426,22 +1388,16 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
|
||||
dtb-$(CONFIG_ARCH_MILBEAUT) += milbeaut-m10v-evb.dtb
|
||||
dtb-$(CONFIG_ARCH_MSTARV7) += \
|
||||
mstar-infinity-msc313-breadbee_crust.dtb \
|
||||
mstar-infinity2m-ssd202d-ssd201htv2.dtb \
|
||||
mstar-infinity2m-ssd202d-unitv2.dtb \
|
||||
mstar-infinity3-msc313e-breadbee.dtb \
|
||||
mstar-mercury5-ssc8336n-midrived08.dtb
|
||||
dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb
|
||||
dtb-$(CONFIG_ARCH_ASPEED) += \
|
||||
aspeed-ast2500-evb.dtb \
|
||||
aspeed-ast2600-evb-a1.dtb \
|
||||
aspeed-ast2600-evb.dtb \
|
||||
aspeed-bmc-amd-ethanolx.dtb \
|
||||
aspeed-bmc-ampere-mtjade.dtb \
|
||||
aspeed-bmc-arm-centriq2400-rep.dtb \
|
||||
aspeed-bmc-arm-stardragon4800-rep2.dtb \
|
||||
aspeed-bmc-asrock-e3c246d4i.dtb \
|
||||
aspeed-bmc-bytedance-g220a.dtb \
|
||||
aspeed-bmc-facebook-cmm.dtb \
|
||||
aspeed-bmc-facebook-galaxy100.dtb \
|
||||
aspeed-bmc-facebook-minipack.dtb \
|
||||
aspeed-bmc-facebook-tiogapass.dtb \
|
||||
aspeed-bmc-facebook-wedge40.dtb \
|
||||
@ -1449,10 +1405,7 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
|
||||
aspeed-bmc-facebook-wedge400.dtb \
|
||||
aspeed-bmc-facebook-yamp.dtb \
|
||||
aspeed-bmc-facebook-yosemitev2.dtb \
|
||||
aspeed-bmc-ibm-everest.dtb \
|
||||
aspeed-bmc-ibm-rainier.dtb \
|
||||
aspeed-bmc-ibm-rainier-1s4u.dtb \
|
||||
aspeed-bmc-ibm-rainier-4u.dtb \
|
||||
aspeed-bmc-intel-s2600wf.dtb \
|
||||
aspeed-bmc-inspur-fp5280g2.dtb \
|
||||
aspeed-bmc-lenovo-hr630.dtb \
|
||||
@ -1470,8 +1423,7 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
|
||||
aspeed-bmc-opp-witherspoon.dtb \
|
||||
aspeed-bmc-opp-zaius.dtb \
|
||||
aspeed-bmc-portwell-neptune.dtb \
|
||||
aspeed-bmc-quanta-q71l.dtb \
|
||||
aspeed-bmc-supermicro-x11spi.dtb
|
||||
aspeed-bmc-quanta-q71l.dtb
|
||||
|
||||
targets += dtbs dtbs_install
|
||||
targets += $(dtb-y)
|
||||
@ -1480,5 +1432,5 @@ subdir-y := overlays
|
||||
|
||||
# Enable fixups to support overlays on BCM2835 platforms
|
||||
ifeq ($(CONFIG_ARCH_BCM2835),y)
|
||||
DTC_FLAGS ?= -@
|
||||
DTC_FLAGS += -@
|
||||
endif
|
||||
|
@ -101,7 +101,7 @@ bluetooth {
|
||||
};
|
||||
|
||||
&gpio3 {
|
||||
ls-buf-en-hog {
|
||||
ls_buf_en {
|
||||
gpio-hog;
|
||||
gpios = <10 GPIO_ACTIVE_HIGH>;
|
||||
output-high;
|
||||
|
@ -26,54 +26,54 @@ oppnitro-1000000000 {
|
||||
|
||||
&gpio0 {
|
||||
gpio-line-names =
|
||||
"[mdio_data]",
|
||||
"[mdio_clk]",
|
||||
"[ethernet]",
|
||||
"[ethernet]",
|
||||
"P9_22 [spi0_sclk]",
|
||||
"P9_21 [spi0_d0]",
|
||||
"P9_18 [spi0_d1]",
|
||||
"P9_17 [spi0_cs0]",
|
||||
"[mmc0_cd]",
|
||||
"P8_42A [ecappwm0]",
|
||||
"P8_35 [lcd d12]",
|
||||
"P8_33 [lcd d13]",
|
||||
"P8_31 [lcd d14]",
|
||||
"P8_32 [lcd d15]",
|
||||
"[sd card]",
|
||||
"P9_42A [ecappwm0]",
|
||||
"P8_35 [hdmi]",
|
||||
"P8_33 [hdmi]",
|
||||
"P8_31 [hdmi]",
|
||||
"P8_32 [hdmi]",
|
||||
"P9_20 [i2c2_sda]",
|
||||
"P9_19 [i2c2_scl]",
|
||||
"P9_26 [uart1_rxd]",
|
||||
"P9_24 [uart1_txd]",
|
||||
"[rmii1_txd3]",
|
||||
"[rmii1_txd2]",
|
||||
"[usb0_drvvbus]",
|
||||
"[hdmi cec]",
|
||||
"[ethernet]",
|
||||
"[ethernet]",
|
||||
"[usb]",
|
||||
"[hdmi]",
|
||||
"P9_41B",
|
||||
"[rmii1_txd1]",
|
||||
"[ethernet]",
|
||||
"P8_19 [ehrpwm2a]",
|
||||
"P8_13 [ehrpwm2b]",
|
||||
"NC",
|
||||
"NC",
|
||||
"[NC]",
|
||||
"[NC]",
|
||||
"P8_14",
|
||||
"P8_17",
|
||||
"[rmii1_txd0]",
|
||||
"[rmii1_refclk]",
|
||||
"[ethernet]",
|
||||
"[ethernet]",
|
||||
"P9_11 [uart4_rxd]",
|
||||
"P9_13 [uart4_txd]";
|
||||
};
|
||||
|
||||
&gpio1 {
|
||||
gpio-line-names =
|
||||
"P8_25 [mmc1_dat0]",
|
||||
"[mmc1_dat1]",
|
||||
"P8_5 [mmc1_dat2]",
|
||||
"P8_6 [mmc1_dat3]",
|
||||
"P8_23 [mmc1_dat4]",
|
||||
"P8_22 [mmc1_dat5]",
|
||||
"P8_3 [mmc1_dat6]",
|
||||
"P8_4 [mmc1_dat7]",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"P8_25 [emmc]",
|
||||
"[emmc]",
|
||||
"P8_5 [emmc]",
|
||||
"P8_6 [emmc]",
|
||||
"P8_23 [emmc]",
|
||||
"P8_22 [emmc]",
|
||||
"P8_3 [emmc]",
|
||||
"P8_4 [emmc]",
|
||||
"[NC]",
|
||||
"[NC]",
|
||||
"[NC]",
|
||||
"[NC]",
|
||||
"P8_12",
|
||||
"P8_11",
|
||||
"P8_16",
|
||||
@ -82,13 +82,13 @@ &gpio1 {
|
||||
"P9_23",
|
||||
"P9_14 [ehrpwm1a]",
|
||||
"P9_16 [ehrpwm1b]",
|
||||
"[emmc rst]",
|
||||
"[emmc]",
|
||||
"[usr0 led]",
|
||||
"[usr1 led]",
|
||||
"[usr2 led]",
|
||||
"[usr3 led]",
|
||||
"[hdmi irq]",
|
||||
"[usb vbus oc]",
|
||||
"[hdmi]",
|
||||
"[usb]",
|
||||
"[hdmi audio]",
|
||||
"P9_12",
|
||||
"P8_26",
|
||||
@ -116,38 +116,38 @@ &gpio2 {
|
||||
"P8_38 [hdmi]",
|
||||
"P8_36 [hdmi]",
|
||||
"P8_34 [hdmi]",
|
||||
"[rmii1_rxd3]",
|
||||
"[rmii1_rxd2]",
|
||||
"[rmii1_rxd1]",
|
||||
"[rmii1_rxd0]",
|
||||
"[ethernet]",
|
||||
"[ethernet]",
|
||||
"[ethernet]",
|
||||
"[ethernet]",
|
||||
"P8_27 [hdmi]",
|
||||
"P8_29 [hdmi]",
|
||||
"P8_28 [hdmi]",
|
||||
"P8_30 [hdmi]",
|
||||
"[mmc0_dat3]",
|
||||
"[mmc0_dat2]",
|
||||
"[mmc0_dat1]",
|
||||
"[mmc0_dat0]",
|
||||
"[mmc0_clk]",
|
||||
"[mmc0_cmd]";
|
||||
"[emmc]",
|
||||
"[emmc]",
|
||||
"[emmc]",
|
||||
"[emmc]",
|
||||
"[emmc]",
|
||||
"[emmc]";
|
||||
};
|
||||
|
||||
&gpio3 {
|
||||
gpio-line-names =
|
||||
"[mii col]",
|
||||
"[mii crs]",
|
||||
"[mii rx err]",
|
||||
"[mii tx en]",
|
||||
"[mii rx dv]",
|
||||
"[i2c0 sda]",
|
||||
"[i2c0 scl]",
|
||||
"[jtag emu0]",
|
||||
"[jtag emu1]",
|
||||
"[mii tx clk]",
|
||||
"[mii rx clk]",
|
||||
"NC",
|
||||
"NC",
|
||||
"[usb vbus en]",
|
||||
"[ethernet]",
|
||||
"[ethernet]",
|
||||
"[ethernet]",
|
||||
"[ethernet]",
|
||||
"[ethernet]",
|
||||
"[i2c0]",
|
||||
"[i2c0]",
|
||||
"[emu]",
|
||||
"[emu]",
|
||||
"[ethernet]",
|
||||
"[ethernet]",
|
||||
"[NC]",
|
||||
"[NC]",
|
||||
"[usb]",
|
||||
"P9_31 [spi1_sclk]",
|
||||
"P9_29 [spi1_d0]",
|
||||
"P9_30 [spi1_d1]",
|
||||
@ -156,14 +156,14 @@ &gpio3 {
|
||||
"P9_27",
|
||||
"P9_41A",
|
||||
"P9_25",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC",
|
||||
"NC";
|
||||
"[NC]",
|
||||
"[NC]",
|
||||
"[NC]",
|
||||
"[NC]",
|
||||
"[NC]",
|
||||
"[NC]",
|
||||
"[NC]",
|
||||
"[NC]",
|
||||
"[NC]",
|
||||
"[NC]";
|
||||
};
|
||||
|
@ -241,30 +241,6 @@ AM33XX_PADCONF(AM335X_PIN_UART0_CTSN, PIN_OUTPUT, MUX_MODE2) /* (E18) uart0_cts
|
||||
AM33XX_PADCONF(AM335X_PIN_MII1_RXD0, PIN_OUTPUT, MUX_MODE7) /* (M16) gmii1_rxd0.gpio2[21] */
|
||||
>;
|
||||
};
|
||||
|
||||
/* E1 */
|
||||
eqep0_pins: pinmux_eqep0_pins {
|
||||
pinctrl-single,pins = <
|
||||
AM33XX_PADCONF(AM335X_PIN_MCASP0_AXR0, PIN_INPUT, MUX_MODE1) /* (B12) mcasp0_aclkr.eQEP0A_in */
|
||||
AM33XX_PADCONF(AM335X_PIN_MCASP0_FSR, PIN_INPUT, MUX_MODE1) /* (C13) mcasp0_fsr.eQEP0B_in */
|
||||
>;
|
||||
};
|
||||
|
||||
/* E2 */
|
||||
eqep1_pins: pinmux_eqep1_pins {
|
||||
pinctrl-single,pins = <
|
||||
AM33XX_PADCONF(AM335X_PIN_LCD_DATA12, PIN_INPUT, MUX_MODE2) /* (V2) lcd_data12.eQEP1A_in */
|
||||
AM33XX_PADCONF(AM335X_PIN_LCD_DATA13, PIN_INPUT, MUX_MODE2) /* (V3) lcd_data13.eQEP1B_in */
|
||||
>;
|
||||
};
|
||||
|
||||
/* E3 */
|
||||
eqep2_pins: pinmux_eqep2_pins {
|
||||
pinctrl-single,pins = <
|
||||
AM33XX_PADCONF(AM335X_PIN_GPMC_AD12, PIN_INPUT, MUX_MODE4) /* (T12) gpmc_ad12.eQEP2A_in */
|
||||
AM33XX_PADCONF(AM335X_PIN_GPMC_AD13, PIN_INPUT, MUX_MODE4) /* (R12) gpmc_ad13.eQEP2B_in */
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
@ -436,40 +412,10 @@ &dcan1 {
|
||||
};
|
||||
|
||||
&gpio3 {
|
||||
ls-buf-en-hog {
|
||||
ls_buf_en {
|
||||
gpio-hog;
|
||||
gpios = <10 GPIO_ACTIVE_HIGH>;
|
||||
output-high;
|
||||
line-name = "LS_BUF_EN";
|
||||
};
|
||||
};
|
||||
|
||||
&epwmss0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&eqep0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&eqep0_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&epwmss1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&eqep1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&eqep1_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&epwmss2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&eqep2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&eqep2_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
@ -101,7 +101,7 @@ bluetooth {
|
||||
};
|
||||
|
||||
&gpio1 {
|
||||
ls-buf-en-hog {
|
||||
ls_buf_en {
|
||||
gpio-hog;
|
||||
gpios = <29 GPIO_ACTIVE_HIGH>;
|
||||
output-high;
|
||||
@ -118,7 +118,7 @@ ls-buf-en-hog {
|
||||
/* an external pulldown on U21 pin 4. */
|
||||
|
||||
&gpio3 {
|
||||
bt-aud-in-hog {
|
||||
bt_aud_in {
|
||||
gpio-hog;
|
||||
gpios = <16 GPIO_ACTIVE_HIGH>;
|
||||
output-low;
|
||||
|
@ -122,7 +122,7 @@ AM33XX_PADCONF(AM335X_PIN_GPMC_AD5, PIN_INPUT_PULLUP, MUX_MODE0)
|
||||
AM33XX_PADCONF(AM335X_PIN_GPMC_AD6, PIN_INPUT_PULLUP, MUX_MODE0)
|
||||
AM33XX_PADCONF(AM335X_PIN_GPMC_AD7, PIN_INPUT_PULLUP, MUX_MODE0)
|
||||
AM33XX_PADCONF(AM335X_PIN_GPMC_WAIT0, PIN_INPUT_PULLUP, MUX_MODE0)
|
||||
/* gpmc_wpn.gpio0_31 */
|
||||
/* gpmc_wpn.gpio0_30 */
|
||||
AM33XX_PADCONF(AM335X_PIN_GPMC_WPN, PIN_INPUT_PULLUP, MUX_MODE7)
|
||||
AM33XX_PADCONF(AM335X_PIN_GPMC_CSN0, PIN_OUTPUT, MUX_MODE0)
|
||||
AM33XX_PADCONF(AM335X_PIN_GPMC_ADVN_ALE, PIN_OUTPUT, MUX_MODE0)
|
||||
@ -333,7 +333,7 @@ tlv320aic23: codec@1a {
|
||||
&epwmss0 {
|
||||
status = "okay";
|
||||
|
||||
ecap0: pwm@100 {
|
||||
ecap0: ecap@100 {
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ecap0_pins>;
|
||||
|
@ -229,7 +229,7 @@ AM33XX_PADCONF(AM335X_PIN_GPMC_AD5, PIN_INPUT_PULLUP, MUX_MODE0)
|
||||
AM33XX_PADCONF(AM335X_PIN_GPMC_AD6, PIN_INPUT_PULLUP, MUX_MODE0)
|
||||
AM33XX_PADCONF(AM335X_PIN_GPMC_AD7, PIN_INPUT_PULLUP, MUX_MODE0)
|
||||
AM33XX_PADCONF(AM335X_PIN_GPMC_WAIT0, PIN_INPUT_PULLUP, MUX_MODE0)
|
||||
AM33XX_PADCONF(AM335X_PIN_GPMC_WPN, PIN_INPUT_PULLUP, MUX_MODE7) /* gpmc_wpn.gpio0_31 */
|
||||
AM33XX_PADCONF(AM335X_PIN_GPMC_WPN, PIN_INPUT_PULLUP, MUX_MODE7) /* gpmc_wpn.gpio0_30 */
|
||||
AM33XX_PADCONF(AM335X_PIN_GPMC_CSN0, PIN_OUTPUT, MUX_MODE0)
|
||||
AM33XX_PADCONF(AM335X_PIN_GPMC_ADVN_ALE, PIN_OUTPUT, MUX_MODE0)
|
||||
AM33XX_PADCONF(AM335X_PIN_GPMC_OEN_REN, PIN_OUTPUT, MUX_MODE0)
|
||||
@ -495,7 +495,7 @@ &elm {
|
||||
&epwmss0 {
|
||||
status = "okay";
|
||||
|
||||
ecap0: pwm@100 {
|
||||
ecap0: ecap@100 {
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ecap0_pins>;
|
||||
@ -684,31 +684,28 @@ vmmc_reg: regulator@12 {
|
||||
};
|
||||
};
|
||||
|
||||
&mac_sw {
|
||||
&mac {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&cpsw_default>;
|
||||
pinctrl-1 = <&cpsw_sleep>;
|
||||
status = "okay";
|
||||
slaves = <1>;
|
||||
};
|
||||
|
||||
&davinci_mdio_sw {
|
||||
&davinci_mdio {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&davinci_mdio_default>;
|
||||
pinctrl-1 = <&davinci_mdio_sleep>;
|
||||
status = "okay";
|
||||
|
||||
ethphy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
&cpsw_port1 {
|
||||
&cpsw_emac0 {
|
||||
phy-handle = <ðphy0>;
|
||||
phy-mode = "rgmii-id";
|
||||
ti,dual-emac-pvid = <1>;
|
||||
};
|
||||
|
||||
&cpsw_port2 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&tscadc {
|
||||
|
@ -510,7 +510,7 @@ &usb1 {
|
||||
&epwmss2 {
|
||||
status = "okay";
|
||||
|
||||
ecap2: pwm@100 {
|
||||
ecap2: ecap@100 {
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ecap2_pins>;
|
||||
@ -596,17 +596,19 @@ vmmc_reg: regulator@12 {
|
||||
};
|
||||
};
|
||||
|
||||
&mac_sw {
|
||||
&mac {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&cpsw_default>;
|
||||
pinctrl-1 = <&cpsw_sleep>;
|
||||
dual_emac = <1>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&davinci_mdio_sw {
|
||||
&davinci_mdio {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&davinci_mdio_default>;
|
||||
pinctrl-1 = <&davinci_mdio_sleep>;
|
||||
status = "okay";
|
||||
|
||||
ethphy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
@ -617,16 +619,16 @@ ethphy1: ethernet-phy@1 {
|
||||
};
|
||||
};
|
||||
|
||||
&cpsw_port1 {
|
||||
&cpsw_emac0 {
|
||||
phy-handle = <ðphy0>;
|
||||
phy-mode = "rgmii-id";
|
||||
ti,dual-emac-pvid = <1>;
|
||||
dual_emac_res_vlan = <1>;
|
||||
};
|
||||
|
||||
&cpsw_port2 {
|
||||
&cpsw_emac1 {
|
||||
phy-handle = <ðphy1>;
|
||||
phy-mode = "rgmii-id";
|
||||
ti,dual-emac-pvid = <2>;
|
||||
dual_emac_res_vlan = <2>;
|
||||
};
|
||||
|
||||
&mmc1 {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user