mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 06:25:52 +02:00
Merge 69f637c335 ("Merge tag 'for-5.11/drivers-2020-12-14' of git://git.kernel.dk/linux-block") into android-mainline
Steps on the way to 5.11-rc1 Resolves conflicts in: arch/arm64/include/asm/thread_info.h fs/proc/base.c Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Ibc53e7c14fc0953a95f89af81b0e0373ddad986a
This commit is contained in:
commit
a14ed4197e
2
.mailmap
2
.mailmap
|
|
@ -122,6 +122,8 @@ Henk Vergonet <Henk.Vergonet@gmail.com>
|
|||
Henrik Kretzschmar <henne@nachtwindheim.de>
|
||||
Henrik Rydberg <rydberg@bitmath.org>
|
||||
Herbert Xu <herbert@gondor.apana.org.au>
|
||||
Huacai Chen <chenhuacai@kernel.org> <chenhc@lemote.com>
|
||||
Huacai Chen <chenhuacai@kernel.org> <chenhuacai@loongson.cn>
|
||||
Jacob Shin <Jacob.Shin@amd.com>
|
||||
Jaegeuk Kim <jaegeuk@kernel.org> <jaegeuk@google.com>
|
||||
Jaegeuk Kim <jaegeuk@kernel.org> <jaegeuk.kim@samsung.com>
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ Description: Expected format is the following::
|
|||
The rnbd_server prepends the <device_path> received from client
|
||||
with <dev_search_path> and tries to open the
|
||||
<dev_search_path>/<device_path> block device. On success,
|
||||
a /dev/rnbd<N> device file, a /sys/block/rnbd_client/rnbd<N>/
|
||||
a /dev/rnbd<N> device file, a /sys/block/rnbd<N>/
|
||||
directory and an entry in /sys/class/rnbd-client/ctl/devices
|
||||
will be created.
|
||||
|
||||
|
|
@ -95,12 +95,12 @@ Description: Expected format is the following::
|
|||
---------------------------------
|
||||
|
||||
After mapping, the device file can be found by:
|
||||
o The symlink /sys/class/rnbd-client/ctl/devices/<device_id>
|
||||
o The symlink /sys/class/rnbd-client/ctl/devices/<device_id>@<session_name>
|
||||
points to /sys/block/<dev-name>. The last part of the symlink destination
|
||||
is the same as the device name. By extracting the last part of the
|
||||
path the path to the device /dev/<dev-name> can be build.
|
||||
|
||||
* /dev/block/$(cat /sys/class/rnbd-client/ctl/devices/<device_id>/dev)
|
||||
* /dev/block/$(cat /sys/class/rnbd-client/ctl/devices/<device_id>@<session_name>/dev)
|
||||
|
||||
How to find the <device_id> of the device is described on the next
|
||||
section.
|
||||
|
|
@ -110,7 +110,7 @@ Date: Feb 2020
|
|||
KernelVersion: 5.7
|
||||
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
|
||||
Description: For each device mapped on the client a new symbolic link is created as
|
||||
/sys/class/rnbd-client/ctl/devices/<device_id>, which points
|
||||
/sys/class/rnbd-client/ctl/devices/<device_id>@<session_name>, which points
|
||||
to the block device created by rnbd (/sys/block/rnbd<N>/).
|
||||
The <device_id> of each device is created as follows:
|
||||
|
||||
|
|
|
|||
|
|
@ -48,3 +48,11 @@ Date: Feb 2020
|
|||
KernelVersion: 5.7
|
||||
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
|
||||
Description: Contains the device access mode: ro, rw or migration.
|
||||
|
||||
What: /sys/class/rnbd-server/ctl/devices/<device_name>/sessions/<session-name>/force_close
|
||||
Date: Nov 2020
|
||||
KernelVersion: 5.10
|
||||
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
|
||||
Description: Write "1" to the file to close the device on server side. Please
|
||||
note that the client side device will not be closed, read or
|
||||
write to the device will get -ENOTCONN.
|
||||
|
|
|
|||
35
Documentation/ABI/testing/sysfs-firmware-lefi-boardinfo
Normal file
35
Documentation/ABI/testing/sysfs-firmware-lefi-boardinfo
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
What: /sys/firmware/lefi/boardinfo
|
||||
Date: October 2020
|
||||
Contact: Tiezhu Yang <yangtiezhu@loongson.cn>
|
||||
Description:
|
||||
Get mainboard and BIOS info easily on the Loongson platform,
|
||||
this is useful to point out the current used mainboard type
|
||||
and BIOS version when there exists problems related with
|
||||
hardware or firmware.
|
||||
|
||||
The related structures are already defined in the interface
|
||||
specification about firmware and kernel which are common
|
||||
requirement and specific for Loongson64, so only add a new
|
||||
boardinfo.c file in arch/mips/loongson64.
|
||||
|
||||
For example:
|
||||
|
||||
[loongson@linux ~]$ cat /sys/firmware/lefi/boardinfo
|
||||
Board Info
|
||||
Manufacturer : LEMOTE
|
||||
Board Name : LEMOTE-LS3A4000-7A1000-1w-V01-pc
|
||||
Family : LOONGSON3
|
||||
|
||||
BIOS Info
|
||||
Vendor : Kunlun
|
||||
Version : Kunlun-A1901-V4.1.3-20200414093938
|
||||
ROM Size : 4 KB
|
||||
Release Date : 2020-04-14
|
||||
|
||||
By the way, using dmidecode command can get the similar info if there
|
||||
exists SMBIOS in firmware, but the fact is that there is no SMBIOS on
|
||||
some machines, we can see nothing when execute dmidecode, like this:
|
||||
|
||||
[root@linux loongson]# dmidecode
|
||||
# dmidecode 2.12
|
||||
# No SMBIOS nor DMI entry point found, sorry.
|
||||
|
|
@ -35,7 +35,7 @@ module parameters have priority over Kconfig.
|
|||
|
||||
Here is an example for module parameters::
|
||||
|
||||
pstore_blk.blkdev=179:7 pstore_blk.kmsg_size=64
|
||||
pstore_blk.blkdev=/dev/mmcblk0p7 pstore_blk.kmsg_size=64 best_effort=y
|
||||
|
||||
The detail of each configurations may be of interest to you.
|
||||
|
||||
|
|
@ -151,10 +151,7 @@ otherwise KMSG_DUMP_MAX.
|
|||
Configurations for driver
|
||||
-------------------------
|
||||
|
||||
Only a block device driver cares about these configurations. A block device
|
||||
driver uses ``register_pstore_blk`` to register to pstore/blk.
|
||||
|
||||
A non-block device driver uses ``register_pstore_device`` with
|
||||
A device driver uses ``register_pstore_device`` with
|
||||
``struct pstore_device_info`` to register to pstore/blk.
|
||||
|
||||
.. kernel-doc:: fs/pstore/blk.c
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Boards with a SoC of the Microsemi MIPS family shall have the following
|
|||
properties:
|
||||
|
||||
Required properties:
|
||||
- compatible: "mscc,ocelot"
|
||||
- compatible: "mscc,ocelot", "mscc,luton", "mscc,serval" or "mscc,jr2"
|
||||
|
||||
|
||||
* Other peripherals:
|
||||
|
|
|
|||
|
|
@ -0,0 +1,37 @@
|
|||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: "http://devicetree.org/schemas/reset/brcm,bcm6345-reset.yaml#"
|
||||
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
|
||||
|
||||
title: BCM6345 reset controller
|
||||
|
||||
description: This document describes the BCM6345 reset controller.
|
||||
|
||||
maintainers:
|
||||
- Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: brcm,bcm6345-reset
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
"#reset-cells":
|
||||
const: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- "#reset-cells"
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
reset-controller@10000010 {
|
||||
compatible = "brcm,bcm6345-reset";
|
||||
reg = <0x10000010 0x4>;
|
||||
#reset-cells = <1>;
|
||||
};
|
||||
12
MAINTAINERS
12
MAINTAINERS
|
|
@ -7339,7 +7339,6 @@ F: drivers/staging/gasket/
|
|||
|
||||
GCC PLUGINS
|
||||
M: Kees Cook <keescook@chromium.org>
|
||||
R: Emese Revfy <re.emese@gmail.com>
|
||||
L: linux-hardening@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/kbuild/gcc-plugins.rst
|
||||
|
|
@ -8744,19 +8743,16 @@ F: include/uapi/rdma/
|
|||
F: samples/bpf/ibumad_kern.c
|
||||
F: samples/bpf/ibumad_user.c
|
||||
|
||||
INGENIC JZ4780 DMA Driver
|
||||
M: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
|
||||
S: Maintained
|
||||
F: drivers/dma/dma-jz4780.c
|
||||
|
||||
INGENIC JZ4780 NAND DRIVER
|
||||
M: Harvey Hunt <harveyhuntnexus@gmail.com>
|
||||
L: linux-mtd@lists.infradead.org
|
||||
L: linux-mips@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/mtd/nand/raw/ingenic/
|
||||
|
||||
INGENIC JZ47xx SoCs
|
||||
M: Paul Cercueil <paul@crapouillou.net>
|
||||
L: linux-mips@vger.kernel.org
|
||||
S: Maintained
|
||||
F: arch/mips/boot/dts/ingenic/
|
||||
F: arch/mips/generic/board-ingenic.c
|
||||
|
|
@ -9718,7 +9714,7 @@ F: arch/arm64/kvm/
|
|||
F: include/kvm/arm_*
|
||||
|
||||
KERNEL VIRTUAL MACHINE FOR MIPS (KVM/mips)
|
||||
M: Huacai Chen <chenhc@lemote.com>
|
||||
M: Huacai Chen <chenhuacai@kernel.org>
|
||||
M: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>
|
||||
L: linux-mips@vger.kernel.org
|
||||
L: kvm@vger.kernel.org
|
||||
|
|
@ -11860,7 +11856,7 @@ F: drivers/*/*/*loongson2*
|
|||
F: drivers/*/*loongson2*
|
||||
|
||||
MIPS/LOONGSON64 ARCHITECTURE
|
||||
M: Huacai Chen <chenhc@lemote.com>
|
||||
M: Huacai Chen <chenhuacai@kernel.org>
|
||||
M: Jiaxun Yang <jiaxun.yang@flygoat.com>
|
||||
L: linux-mips@vger.kernel.org
|
||||
S: Maintained
|
||||
|
|
|
|||
17
arch/Kconfig
17
arch/Kconfig
|
|
@ -486,6 +486,9 @@ 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"
|
||||
|
|
@ -514,6 +517,20 @@ 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
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ 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 */
|
||||
|
|
@ -71,6 +72,7 @@ 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. */
|
||||
|
|
|
|||
|
|
@ -544,7 +544,7 @@ $ret_success:
|
|||
.align 4
|
||||
.type work_pending, @function
|
||||
work_pending:
|
||||
and $17, _TIF_NOTIFY_RESUME | _TIF_SIGPENDING, $2
|
||||
and $17, _TIF_NOTIFY_RESUME | _TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL, $2
|
||||
bne $2, $work_notifysig
|
||||
|
||||
$work_resched:
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
if (thread_flags & (_TIF_SIGPENDING|_TIF_NOTIFY_SIGNAL)) {
|
||||
do_signal(regs, r0, r19);
|
||||
r0 = 0;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ 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 */
|
||||
|
|
@ -89,11 +90,12 @@ 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_RESUME | _TIF_NOTIFY_SIGNAL)
|
||||
|
||||
/*
|
||||
* _TIF_ALLWORK_MASK includes SYSCALL_TRACE, but we don't need it.
|
||||
|
|
|
|||
|
|
@ -307,7 +307,8 @@ resume_user_mode_begin:
|
|||
mov r0, sp ; pt_regs for arg to do_signal()/do_notify_resume()
|
||||
|
||||
GET_CURR_THR_INFO_FLAGS r9
|
||||
bbit0 r9, TIF_SIGPENDING, .Lchk_notify_resume
|
||||
and.f 0, r9, TIF_SIGPENDING|TIF_NOTIFY_SIGNAL
|
||||
bz .Lchk_notify_resume
|
||||
|
||||
; Normal Trap/IRQ entry only saves Scratch (caller-saved) regs
|
||||
; in pt_reg since the "C" ABI (kernel code) will automatically
|
||||
|
|
|
|||
|
|
@ -362,7 +362,7 @@ void do_signal(struct pt_regs *regs)
|
|||
|
||||
restart_scall = in_syscall(regs) && syscall_restartable(regs);
|
||||
|
||||
if (get_signal(&ksig)) {
|
||||
if (test_thread_flag(TIF_SIGPENDING) && get_signal(&ksig)) {
|
||||
if (restart_scall) {
|
||||
arc_restart_syscall(&ksig.ka, regs);
|
||||
syscall_wont_restart(regs); /* No more restarts */
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ generic-y += extable.h
|
|||
generic-y += flat.h
|
||||
generic-y += local64.h
|
||||
generic-y += parport.h
|
||||
generic-y += seccomp.h
|
||||
|
||||
generated-y += mach-types.h
|
||||
generated-y += unistd-nr.h
|
||||
|
|
|
|||
11
arch/arm/include/asm/seccomp.h
Normal file
11
arch/arm/include/asm/seccomp.h
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef _ASM_SECCOMP_H
|
||||
#define _ASM_SECCOMP_H
|
||||
|
||||
#include <asm-generic/seccomp.h>
|
||||
|
||||
#define SECCOMP_ARCH_NATIVE AUDIT_ARCH_ARM
|
||||
#define SECCOMP_ARCH_NATIVE_NR NR_syscalls
|
||||
#define SECCOMP_ARCH_NATIVE_NAME "arm"
|
||||
|
||||
#endif /* _ASM_SECCOMP_H */
|
||||
|
|
@ -126,6 +126,8 @@ extern int vfp_restore_user_hwstate(struct user_vfp *,
|
|||
* thread information flags:
|
||||
* TIF_USEDFPU - FPU was used by this task this quantum (SMP)
|
||||
* TIF_POLLING_NRFLAG - true if poll_idle() is polling TIF_NEED_RESCHED
|
||||
*
|
||||
* Any bit in the range of 0..15 will cause do_work_pending() to be invoked.
|
||||
*/
|
||||
#define TIF_SIGPENDING 0 /* signal pending */
|
||||
#define TIF_NEED_RESCHED 1 /* rescheduling necessary */
|
||||
|
|
@ -135,6 +137,7 @@ extern int vfp_restore_user_hwstate(struct user_vfp *,
|
|||
#define TIF_SYSCALL_AUDIT 5 /* syscall auditing active */
|
||||
#define TIF_SYSCALL_TRACEPOINT 6 /* syscall tracepoint instrumentation */
|
||||
#define TIF_SECCOMP 7 /* seccomp syscall filtering active */
|
||||
#define TIF_NOTIFY_SIGNAL 8 /* signal notifications exist */
|
||||
|
||||
#define TIF_USING_IWMMXT 17
|
||||
#define TIF_MEMDIE 18 /* is terminating due to OOM killer */
|
||||
|
|
@ -148,6 +151,7 @@ extern int vfp_restore_user_hwstate(struct user_vfp *,
|
|||
#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
|
||||
#define _TIF_SYSCALL_TRACEPOINT (1 << TIF_SYSCALL_TRACEPOINT)
|
||||
#define _TIF_SECCOMP (1 << TIF_SECCOMP)
|
||||
#define _TIF_NOTIFY_SIGNAL (1 << TIF_NOTIFY_SIGNAL)
|
||||
#define _TIF_USING_IWMMXT (1 << TIF_USING_IWMMXT)
|
||||
|
||||
/* Checks for any syscall work in entry-common.S */
|
||||
|
|
@ -158,7 +162,8 @@ extern int vfp_restore_user_hwstate(struct user_vfp *,
|
|||
* Change these and you break ASM code in entry-common.S
|
||||
*/
|
||||
#define _TIF_WORK_MASK (_TIF_NEED_RESCHED | _TIF_SIGPENDING | \
|
||||
_TIF_NOTIFY_RESUME | _TIF_UPROBE)
|
||||
_TIF_NOTIFY_RESUME | _TIF_UPROBE | \
|
||||
_TIF_NOTIFY_SIGNAL)
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* __ASM_ARM_THREAD_INFO_H */
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ __ret_fast_syscall:
|
|||
cmp r2, #TASK_SIZE
|
||||
blne addr_limit_check_failed
|
||||
ldr r1, [tsk, #TI_FLAGS] @ re-check for syscall tracing
|
||||
tst r1, #_TIF_SYSCALL_WORK | _TIF_WORK_MASK
|
||||
movs r1, r1, lsl #16
|
||||
bne fast_work_pending
|
||||
|
||||
|
||||
|
|
@ -90,7 +90,7 @@ __ret_fast_syscall:
|
|||
cmp r2, #TASK_SIZE
|
||||
blne addr_limit_check_failed
|
||||
ldr r1, [tsk, #TI_FLAGS] @ re-check for syscall tracing
|
||||
tst r1, #_TIF_SYSCALL_WORK | _TIF_WORK_MASK
|
||||
movs r1, r1, lsl #16
|
||||
beq no_work_pending
|
||||
UNWIND(.fnend )
|
||||
ENDPROC(ret_fast_syscall)
|
||||
|
|
@ -131,7 +131,7 @@ ENTRY(ret_to_user_from_irq)
|
|||
cmp r2, #TASK_SIZE
|
||||
blne addr_limit_check_failed
|
||||
ldr r1, [tsk, #TI_FLAGS]
|
||||
tst r1, #_TIF_WORK_MASK
|
||||
movs r1, r1, lsl #16
|
||||
bne slow_work_pending
|
||||
no_work_pending:
|
||||
asm_trace_hardirqs_on save = 0
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ __irq_entry:
|
|||
|
||||
get_thread_info tsk
|
||||
ldr r2, [tsk, #TI_FLAGS]
|
||||
tst r2, #_TIF_WORK_MASK
|
||||
movs r2, r2, lsl #16
|
||||
beq 2f @ no work pending
|
||||
mov r0, #V7M_SCB_ICSR_PENDSVSET
|
||||
str r0, [r1, V7M_SCB_ICSR] @ raise PendSV
|
||||
|
|
|
|||
|
|
@ -655,7 +655,7 @@ do_work_pending(struct pt_regs *regs, unsigned int thread_flags, int syscall)
|
|||
if (unlikely(!user_mode(regs)))
|
||||
return 0;
|
||||
local_irq_enable();
|
||||
if (thread_flags & _TIF_SIGPENDING) {
|
||||
if (thread_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL)) {
|
||||
int restart = do_signal(regs, syscall);
|
||||
if (unlikely(restart)) {
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -19,4 +19,13 @@
|
|||
|
||||
#include <asm-generic/seccomp.h>
|
||||
|
||||
#define SECCOMP_ARCH_NATIVE AUDIT_ARCH_AARCH64
|
||||
#define SECCOMP_ARCH_NATIVE_NR NR_syscalls
|
||||
#define SECCOMP_ARCH_NATIVE_NAME "aarch64"
|
||||
#ifdef CONFIG_COMPAT
|
||||
# define SECCOMP_ARCH_COMPAT AUDIT_ARCH_ARM
|
||||
# define SECCOMP_ARCH_COMPAT_NR __NR_compat_syscalls
|
||||
# define SECCOMP_ARCH_COMPAT_NAME "arm"
|
||||
#endif
|
||||
|
||||
#endif /* _ASM_SECCOMP_H */
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ void arch_release_task_struct(struct task_struct *tsk);
|
|||
#define TIF_UPROBE 4 /* uprobe breakpoint or singlestep */
|
||||
#define TIF_MTE_ASYNC_FAULT 5 /* MTE Asynchronous Tag Check Fault */
|
||||
#define TIF_CHECK_32BIT_AFFINITY 6 /* Check thread affinity for asymmetric AArch32 */
|
||||
#define TIF_NOTIFY_SIGNAL 7 /* signal notifications exist */
|
||||
#define TIF_SYSCALL_TRACE 8 /* syscall trace active */
|
||||
#define TIF_SYSCALL_AUDIT 9 /* syscall auditing */
|
||||
#define TIF_SYSCALL_TRACEPOINT 10 /* syscall tracepoint for ftrace */
|
||||
|
|
@ -95,10 +96,12 @@ void arch_release_task_struct(struct task_struct *tsk);
|
|||
#define _TIF_CHECK_32BIT_AFFINITY (1 << TIF_CHECK_32BIT_AFFINITY)
|
||||
#define _TIF_SVE (1 << TIF_SVE)
|
||||
#define _TIF_MTE_ASYNC_FAULT (1 << TIF_MTE_ASYNC_FAULT)
|
||||
#define _TIF_NOTIFY_SIGNAL (1 << TIF_NOTIFY_SIGNAL)
|
||||
|
||||
#define _TIF_WORK_MASK (_TIF_NEED_RESCHED | _TIF_SIGPENDING | \
|
||||
_TIF_NOTIFY_RESUME | _TIF_FOREIGN_FPSTATE | \
|
||||
_TIF_UPROBE | _TIF_MTE_ASYNC_FAULT | \
|
||||
_TIF_NOTIFY_SIGNAL | \
|
||||
_TIF_CHECK_32BIT_AFFINITY)
|
||||
|
||||
#define _TIF_SYSCALL_WORK (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | \
|
||||
|
|
|
|||
|
|
@ -978,7 +978,7 @@ asmlinkage void do_notify_resume(struct pt_regs *regs,
|
|||
(void __user *)NULL, current);
|
||||
}
|
||||
|
||||
if (thread_flags & _TIF_SIGPENDING)
|
||||
if (thread_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL))
|
||||
do_signal(regs);
|
||||
|
||||
if (thread_flags & _TIF_NOTIFY_RESUME) {
|
||||
|
|
|
|||
|
|
@ -82,6 +82,7 @@ struct thread_info *current_thread_info(void)
|
|||
#define TIF_SIGPENDING 2 /* signal pending */
|
||||
#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
|
||||
#define TIF_RESTORE_SIGMASK 4 /* restore signal mask in do_signal() */
|
||||
#define TIF_NOTIFY_SIGNAL 5 /* signal notifications exist */
|
||||
|
||||
#define TIF_MEMDIE 17 /* OOM killer killed process */
|
||||
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@ void foo(void)
|
|||
DEFINE(_TIF_NOTIFY_RESUME, (1<<TIF_NOTIFY_RESUME));
|
||||
DEFINE(_TIF_SIGPENDING, (1<<TIF_SIGPENDING));
|
||||
DEFINE(_TIF_NEED_RESCHED, (1<<TIF_NEED_RESCHED));
|
||||
DEFINE(_TIF_NOTIFY_SIGNAL, (1<<TIF_NOTIFY_SIGNAL));
|
||||
|
||||
DEFINE(_TIF_ALLWORK_MASK, TIF_ALLWORK_MASK);
|
||||
DEFINE(_TIF_WORK_MASK, TIF_WORK_MASK);
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
#include <linux/syscalls.h>
|
||||
#include <linux/tracehook.h>
|
||||
|
||||
#include <asm/asm-offsets.h>
|
||||
#include <asm/ucontext.h>
|
||||
#include <asm/cacheflush.h>
|
||||
|
||||
|
|
@ -313,7 +314,7 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, u32 thread_info_flags,
|
|||
int syscall)
|
||||
{
|
||||
/* deal with pending signal delivery */
|
||||
if (thread_info_flags & (1 << TIF_SIGPENDING))
|
||||
if (thread_info_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL))
|
||||
do_signal(regs, syscall);
|
||||
|
||||
if (thread_info_flags & (1 << TIF_NOTIFY_RESUME))
|
||||
|
|
|
|||
|
|
@ -4,6 +4,5 @@ generic-y += gpio.h
|
|||
generic-y += kvm_para.h
|
||||
generic-y += local64.h
|
||||
generic-y += qrwlock.h
|
||||
generic-y += seccomp.h
|
||||
generic-y += user.h
|
||||
generic-y += vmlinux.lds.h
|
||||
|
|
|
|||
11
arch/csky/include/asm/seccomp.h
Normal file
11
arch/csky/include/asm/seccomp.h
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef _ASM_SECCOMP_H
|
||||
#define _ASM_SECCOMP_H
|
||||
|
||||
#include <asm-generic/seccomp.h>
|
||||
|
||||
#define SECCOMP_ARCH_NATIVE AUDIT_ARCH_CSKY
|
||||
#define SECCOMP_ARCH_NATIVE_NR NR_syscalls
|
||||
#define SECCOMP_ARCH_NATIVE_NAME "csky"
|
||||
|
||||
#endif /* _ASM_SECCOMP_H */
|
||||
|
|
@ -64,6 +64,7 @@ static inline struct thread_info *current_thread_info(void)
|
|||
#define TIF_SYSCALL_TRACE 4 /* syscall trace active */
|
||||
#define TIF_SYSCALL_TRACEPOINT 5 /* syscall tracepoint instrumentation */
|
||||
#define TIF_SYSCALL_AUDIT 6 /* syscall auditing */
|
||||
#define TIF_NOTIFY_SIGNAL 7 /* signal notifications exist */
|
||||
#define TIF_POLLING_NRFLAG 16 /* poll_idle() is TIF_NEED_RESCHED */
|
||||
#define TIF_MEMDIE 18 /* is terminating due to OOM killer */
|
||||
#define TIF_RESTORE_SIGMASK 20 /* restore signal mask in do_signal() */
|
||||
|
|
@ -75,6 +76,7 @@ static inline struct thread_info *current_thread_info(void)
|
|||
#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
|
||||
#define _TIF_SYSCALL_TRACEPOINT (1 << TIF_SYSCALL_TRACEPOINT)
|
||||
#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
|
||||
#define _TIF_NOTIFY_SIGNAL (1 << TIF_NOTIFY_SIGNAL)
|
||||
#define _TIF_UPROBE (1 << TIF_UPROBE)
|
||||
#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
|
||||
#define _TIF_MEMDIE (1 << TIF_MEMDIE)
|
||||
|
|
@ -82,7 +84,8 @@ static inline struct thread_info *current_thread_info(void)
|
|||
#define _TIF_SECCOMP (1 << TIF_SECCOMP)
|
||||
|
||||
#define _TIF_WORK_MASK (_TIF_NEED_RESCHED | _TIF_SIGPENDING | \
|
||||
_TIF_NOTIFY_RESUME | _TIF_UPROBE)
|
||||
_TIF_NOTIFY_RESUME | _TIF_UPROBE | \
|
||||
_TIF_NOTIFY_SIGNAL)
|
||||
|
||||
#define _TIF_SYSCALL_WORK (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | \
|
||||
_TIF_SYSCALL_TRACEPOINT | _TIF_SECCOMP)
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ asmlinkage void do_notify_resume(struct pt_regs *regs,
|
|||
uprobe_notify_resume(regs);
|
||||
|
||||
/* Handle pending signal delivery */
|
||||
if (thread_info_flags & _TIF_SIGPENDING)
|
||||
if (thread_info_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL))
|
||||
do_signal(regs);
|
||||
|
||||
if (thread_info_flags & _TIF_NOTIFY_RESUME) {
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ static inline struct thread_info *current_thread_info(void)
|
|||
#define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */
|
||||
#define TIF_SYSCALL_TRACEPOINT 8 /* for ftrace syscall instrumentation */
|
||||
#define TIF_POLLING_NRFLAG 9 /* true if poll_idle() is polling TIF_NEED_RESCHED */
|
||||
#define TIF_NOTIFY_SIGNAL 10 /* signal notifications exist */
|
||||
|
||||
/* as above, but as bit values */
|
||||
#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
|
||||
|
|
@ -83,6 +84,7 @@ static inline struct thread_info *current_thread_info(void)
|
|||
#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
|
||||
#define _TIF_SYSCALL_TRACEPOINT (1 << TIF_SYSCALL_TRACEPOINT)
|
||||
#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
|
||||
#define _TIF_NOTIFY_SIGNAL (1 << TIF_NOTIFY_SIGNAL)
|
||||
|
||||
/* work to do in syscall trace */
|
||||
#define _TIF_WORK_SYSCALL_MASK (_TIF_SYSCALL_TRACE | _TIF_SINGLESTEP | \
|
||||
|
|
@ -92,7 +94,7 @@ static inline struct thread_info *current_thread_info(void)
|
|||
#define _TIF_ALLWORK_MASK (_TIF_SYSCALL_TRACE | _TIF_SIGPENDING | \
|
||||
_TIF_NEED_RESCHED | _TIF_SYSCALL_AUDIT | \
|
||||
_TIF_SINGLESTEP | _TIF_NOTIFY_RESUME | \
|
||||
_TIF_SYSCALL_TRACEPOINT)
|
||||
_TIF_SYSCALL_TRACEPOINT | _TIF_NOTIFY_SIGNAL)
|
||||
|
||||
/* work to do on interrupt/exception return */
|
||||
#define _TIF_WORK_MASK (_TIF_ALLWORK_MASK & ~(_TIF_SYSCALL_TRACE | \
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@ static void do_signal(struct pt_regs *regs)
|
|||
|
||||
asmlinkage void do_notify_resume(struct pt_regs *regs, u32 thread_info_flags)
|
||||
{
|
||||
if (thread_info_flags & _TIF_SIGPENDING)
|
||||
if (thread_info_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL))
|
||||
do_signal(regs);
|
||||
|
||||
if (thread_info_flags & _TIF_NOTIFY_RESUME)
|
||||
|
|
|
|||
|
|
@ -95,6 +95,7 @@ register struct thread_info *__current_thread_info asm(QUOTED_THREADINFO_REG);
|
|||
#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
|
||||
#define TIF_SINGLESTEP 4 /* restore ss @ return to usr mode */
|
||||
#define TIF_RESTORE_SIGMASK 6 /* restore sig mask in do_signal() */
|
||||
#define TIF_NOTIFY_SIGNAL 7 /* signal notifications exist */
|
||||
/* true if poll_idle() is polling TIF_NEED_RESCHED */
|
||||
#define TIF_MEMDIE 17 /* OOM killer killed process */
|
||||
|
||||
|
|
@ -103,6 +104,7 @@ register struct thread_info *__current_thread_info asm(QUOTED_THREADINFO_REG);
|
|||
#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
|
||||
#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
|
||||
#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP)
|
||||
#define _TIF_NOTIFY_SIGNAL (1 << TIF_NOTIFY_SIGNAL)
|
||||
|
||||
/* work to do on interrupt/exception return - All but TIF_SYSCALL_TRACE */
|
||||
#define _TIF_WORK_MASK (0x0000FFFF & ~_TIF_SYSCALL_TRACE)
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ int do_work_pending(struct pt_regs *regs, u32 thread_info_flags)
|
|||
return 1;
|
||||
}
|
||||
|
||||
if (thread_info_flags & _TIF_SIGPENDING) {
|
||||
if (thread_info_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL)) {
|
||||
do_signal(regs);
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -103,6 +103,7 @@ struct thread_info {
|
|||
#define TIF_SYSCALL_TRACE 2 /* syscall trace active */
|
||||
#define TIF_SYSCALL_AUDIT 3 /* syscall auditing active */
|
||||
#define TIF_SINGLESTEP 4 /* restore singlestep on return to user mode */
|
||||
#define TIF_NOTIFY_SIGNAL 5 /* signal notification exist */
|
||||
#define TIF_NOTIFY_RESUME 6 /* resumption notification requested */
|
||||
#define TIF_MEMDIE 17 /* is terminating due to OOM killer */
|
||||
#define TIF_MCA_INIT 18 /* this task is processing MCA or INIT */
|
||||
|
|
@ -115,6 +116,7 @@ struct thread_info {
|
|||
#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP)
|
||||
#define _TIF_SYSCALL_TRACEAUDIT (_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP)
|
||||
#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME)
|
||||
#define _TIF_NOTIFY_SIGNAL (1 << TIF_NOTIFY_SIGNAL)
|
||||
#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
|
||||
#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
|
||||
#define _TIF_MCA_INIT (1 << TIF_MCA_INIT)
|
||||
|
|
@ -124,7 +126,7 @@ struct thread_info {
|
|||
|
||||
/* "work to do on user-return" bits */
|
||||
#define TIF_ALLWORK_MASK (_TIF_SIGPENDING|_TIF_NOTIFY_RESUME|_TIF_SYSCALL_AUDIT|\
|
||||
_TIF_NEED_RESCHED|_TIF_SYSCALL_TRACE)
|
||||
_TIF_NEED_RESCHED|_TIF_SYSCALL_TRACE|_TIF_NOTIFY_SIGNAL)
|
||||
/* like TIF_ALLWORK_BITS but sans TIF_SYSCALL_TRACE or TIF_SYSCALL_AUDIT */
|
||||
#define TIF_WORK_MASK (TIF_ALLWORK_MASK&~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT))
|
||||
|
||||
|
|
|
|||
|
|
@ -171,7 +171,8 @@ do_notify_resume_user(sigset_t *unused, struct sigscratch *scr, long in_syscall)
|
|||
}
|
||||
|
||||
/* deal with pending signal delivery */
|
||||
if (test_thread_flag(TIF_SIGPENDING)) {
|
||||
if (test_thread_flag(TIF_SIGPENDING) ||
|
||||
test_thread_flag(TIF_NOTIFY_SIGNAL)) {
|
||||
local_irq_enable(); /* force interrupt enable */
|
||||
ia64_do_signal(scr, in_syscall);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ static inline struct thread_info *current_thread_info(void)
|
|||
* bits 0-7 are tested at every exception exit
|
||||
* bits 8-15 are also tested at syscall exit
|
||||
*/
|
||||
#define TIF_NOTIFY_SIGNAL 4
|
||||
#define TIF_NOTIFY_RESUME 5 /* callback before returning to user */
|
||||
#define TIF_SIGPENDING 6 /* signal pending */
|
||||
#define TIF_NEED_RESCHED 7 /* rescheduling necessary */
|
||||
|
|
|
|||
|
|
@ -1133,7 +1133,8 @@ static void do_signal(struct pt_regs *regs)
|
|||
|
||||
void do_notify_resume(struct pt_regs *regs)
|
||||
{
|
||||
if (test_thread_flag(TIF_SIGPENDING))
|
||||
if (test_thread_flag(TIF_NOTIFY_SIGNAL) ||
|
||||
test_thread_flag(TIF_SIGPENDING))
|
||||
do_signal(regs);
|
||||
|
||||
if (test_thread_flag(TIF_NOTIFY_RESUME))
|
||||
|
|
|
|||
|
|
@ -3,19 +3,17 @@ config MICROBLAZE
|
|||
def_bool y
|
||||
select ARCH_32BIT_OFF_T
|
||||
select ARCH_NO_SWAP
|
||||
select ARCH_HAS_BINFMT_FLAT if !MMU
|
||||
select ARCH_HAS_DMA_PREP_COHERENT
|
||||
select ARCH_HAS_GCOV_PROFILE_ALL
|
||||
select ARCH_HAS_SYNC_DMA_FOR_CPU
|
||||
select ARCH_HAS_SYNC_DMA_FOR_DEVICE
|
||||
select ARCH_HAS_DMA_SET_UNCACHED if !MMU
|
||||
select ARCH_MIGHT_HAVE_PC_PARPORT
|
||||
select ARCH_WANT_IPC_PARSE_VERSION
|
||||
select BUILDTIME_TABLE_SORT
|
||||
select TIMER_OF
|
||||
select CLONE_BACKWARDS3
|
||||
select COMMON_CLK
|
||||
select DMA_DIRECT_REMAP if MMU
|
||||
select DMA_DIRECT_REMAP
|
||||
select GENERIC_ATOMIC64
|
||||
select GENERIC_CPU_DEVICES
|
||||
select GENERIC_IDLE_POLL_SETUP
|
||||
|
|
@ -44,7 +42,7 @@ config MICROBLAZE
|
|||
select TRACING_SUPPORT
|
||||
select VIRT_TO_BUS
|
||||
select CPU_NO_EFFICIENT_FFS
|
||||
select MMU_GATHER_NO_RANGE if MMU
|
||||
select MMU_GATHER_NO_RANGE
|
||||
select SPARSE_IRQ
|
||||
select SET_FS
|
||||
|
||||
|
|
@ -95,8 +93,7 @@ menu "Processor type and features"
|
|||
source "kernel/Kconfig.hz"
|
||||
|
||||
config MMU
|
||||
bool "MMU support"
|
||||
default n
|
||||
def_bool y
|
||||
|
||||
comment "Boot options"
|
||||
|
||||
|
|
@ -142,18 +139,8 @@ config ADVANCED_OPTIONS
|
|||
comment "Default settings for advanced configuration options are used"
|
||||
depends on !ADVANCED_OPTIONS
|
||||
|
||||
config XILINX_UNCACHED_SHADOW
|
||||
bool "Are you using uncached shadow for RAM ?"
|
||||
depends on ADVANCED_OPTIONS && !MMU
|
||||
default n
|
||||
help
|
||||
This is needed to be able to allocate uncachable memory regions.
|
||||
The feature requires the design to define the RAM memory controller
|
||||
window to be twice as large as the actual physical memory.
|
||||
|
||||
config HIGHMEM
|
||||
bool "High memory support"
|
||||
depends on MMU
|
||||
select KMAP_LOCAL
|
||||
help
|
||||
The address space of Microblaze processors is only 4 Gigabytes large
|
||||
|
|
@ -167,7 +154,7 @@ config HIGHMEM
|
|||
|
||||
config LOWMEM_SIZE_BOOL
|
||||
bool "Set maximum low memory"
|
||||
depends on ADVANCED_OPTIONS && MMU
|
||||
depends on ADVANCED_OPTIONS
|
||||
help
|
||||
This option allows you to set the maximum amount of memory which
|
||||
will be used as "low memory", that is, memory which the kernel can
|
||||
|
|
@ -205,12 +192,11 @@ config KERNEL_START_BOOL
|
|||
|
||||
config KERNEL_START
|
||||
hex "Virtual address of kernel base" if KERNEL_START_BOOL
|
||||
default "0xc0000000" if MMU
|
||||
default KERNEL_BASE_ADDR if !MMU
|
||||
default "0xc0000000"
|
||||
|
||||
config TASK_SIZE_BOOL
|
||||
bool "Set custom user task size"
|
||||
depends on ADVANCED_OPTIONS && MMU
|
||||
depends on ADVANCED_OPTIONS
|
||||
help
|
||||
This option allows you to set the amount of virtual address space
|
||||
allocated to user tasks. This can be useful in optimizing the
|
||||
|
|
@ -222,33 +208,6 @@ config TASK_SIZE
|
|||
hex "Size of user task space" if TASK_SIZE_BOOL
|
||||
default "0x80000000"
|
||||
|
||||
choice
|
||||
prompt "Page size"
|
||||
default MICROBLAZE_4K_PAGES
|
||||
depends on ADVANCED_OPTIONS && !MMU
|
||||
help
|
||||
Select the kernel logical page size. Increasing the page size
|
||||
will reduce software overhead at each page boundary, allow
|
||||
hardware prefetch mechanisms to be more effective, and allow
|
||||
larger dma transfers increasing IO efficiency and reducing
|
||||
overhead. However the utilization of memory will increase.
|
||||
For example, each cached file will using a multiple of the
|
||||
page size to hold its contents and the difference between the
|
||||
end of file and the end of page is wasted.
|
||||
|
||||
If unsure, choose 4K_PAGES.
|
||||
|
||||
config MICROBLAZE_4K_PAGES
|
||||
bool "4k page size"
|
||||
|
||||
config MICROBLAZE_16K_PAGES
|
||||
bool "16k page size"
|
||||
|
||||
config MICROBLAZE_64K_PAGES
|
||||
bool "64k page size"
|
||||
|
||||
endchoice
|
||||
|
||||
endmenu
|
||||
|
||||
menu "Bus Options"
|
||||
|
|
|
|||
|
|
@ -1,11 +1,7 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
KBUILD_DEFCONFIG := mmu_defconfig
|
||||
|
||||
ifeq ($(CONFIG_MMU),y)
|
||||
UTS_SYSNAME = -DUTS_SYSNAME=\"Linux\"
|
||||
else
|
||||
UTS_SYSNAME = -DUTS_SYSNAME=\"uClinux\"
|
||||
endif
|
||||
|
||||
# What CPU vesion are we building for, and crack it open
|
||||
# as major.minor.rev
|
||||
|
|
@ -67,12 +63,7 @@ DTB:=$(subst simpleImage.,,$(filter simpleImage.%, $(MAKECMDGOALS)))
|
|||
|
||||
core-y += $(boot)/dts/
|
||||
|
||||
# defines filename extension depending memory management type
|
||||
ifeq ($(CONFIG_MMU),)
|
||||
MMU := -nommu
|
||||
endif
|
||||
|
||||
export MMU DTB
|
||||
export DTB
|
||||
|
||||
all: linux.bin
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ CONFIG_XILINX_MICROBLAZE0_USE_DIV=1
|
|||
CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL=2
|
||||
CONFIG_XILINX_MICROBLAZE0_USE_FPU=2
|
||||
CONFIG_HZ_100=y
|
||||
CONFIG_MMU=y
|
||||
CONFIG_CMDLINE_BOOL=y
|
||||
CONFIG_CMDLINE_FORCE=y
|
||||
CONFIG_HIGHMEM=y
|
||||
|
|
|
|||
|
|
@ -1,90 +0,0 @@
|
|||
CONFIG_SYSVIPC=y
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
CONFIG_AUDIT=y
|
||||
CONFIG_BSD_PROCESS_ACCT=y
|
||||
CONFIG_BSD_PROCESS_ACCT_V3=y
|
||||
CONFIG_IKCONFIG=y
|
||||
CONFIG_IKCONFIG_PROC=y
|
||||
CONFIG_SYSFS_DEPRECATED=y
|
||||
CONFIG_SYSFS_DEPRECATED_V2=y
|
||||
# CONFIG_BASE_FULL is not set
|
||||
CONFIG_KALLSYMS_ALL=y
|
||||
CONFIG_EMBEDDED=y
|
||||
CONFIG_SLAB=y
|
||||
CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1
|
||||
CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR=1
|
||||
CONFIG_XILINX_MICROBLAZE0_USE_BARREL=1
|
||||
CONFIG_XILINX_MICROBLAZE0_USE_DIV=1
|
||||
CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL=2
|
||||
CONFIG_XILINX_MICROBLAZE0_USE_FPU=2
|
||||
CONFIG_HZ_100=y
|
||||
CONFIG_CMDLINE_BOOL=y
|
||||
CONFIG_CMDLINE_FORCE=y
|
||||
CONFIG_PCI_XILINX=y
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
CONFIG_PARTITION_ADVANCED=y
|
||||
# CONFIG_EFI_PARTITION is not set
|
||||
CONFIG_NET=y
|
||||
CONFIG_PACKET=y
|
||||
CONFIG_UNIX=y
|
||||
CONFIG_INET=y
|
||||
# CONFIG_IPV6 is not set
|
||||
CONFIG_PCI=y
|
||||
CONFIG_MTD=y
|
||||
CONFIG_MTD_CMDLINE_PARTS=y
|
||||
CONFIG_MTD_BLOCK=y
|
||||
CONFIG_MTD_CFI=y
|
||||
CONFIG_MTD_CFI_INTELEXT=y
|
||||
CONFIG_MTD_CFI_AMDSTD=y
|
||||
CONFIG_MTD_RAM=y
|
||||
CONFIG_MTD_UCLINUX=y
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_BLK_DEV_RAM_SIZE=8192
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_XILINX_EMACLITE=y
|
||||
CONFIG_XILINX_LL_TEMAC=y
|
||||
# CONFIG_INPUT is not set
|
||||
# CONFIG_SERIO is not set
|
||||
# CONFIG_VT is not set
|
||||
CONFIG_SERIAL_8250=y
|
||||
CONFIG_SERIAL_8250_CONSOLE=y
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_SERIAL_UARTLITE=y
|
||||
CONFIG_SERIAL_UARTLITE_CONSOLE=y
|
||||
# CONFIG_HW_RANDOM is not set
|
||||
CONFIG_XILINX_HWICAP=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_XILINX=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_XILINX=y
|
||||
CONFIG_GPIOLIB=y
|
||||
CONFIG_GPIO_SYSFS=y
|
||||
CONFIG_GPIO_XILINX=y
|
||||
CONFIG_POWER_RESET=y
|
||||
CONFIG_POWER_RESET_GPIO_RESTART=y
|
||||
# CONFIG_HWMON is not set
|
||||
CONFIG_WATCHDOG=y
|
||||
CONFIG_XILINX_WATCHDOG=y
|
||||
CONFIG_FB=y
|
||||
CONFIG_FB_XILINX=y
|
||||
# CONFIG_USB_SUPPORT is not set
|
||||
CONFIG_EXT3_FS=y
|
||||
# CONFIG_DNOTIFY is not set
|
||||
CONFIG_CRAMFS=y
|
||||
CONFIG_ROMFS_FS=y
|
||||
CONFIG_NFS_FS=y
|
||||
CONFIG_NFS_V3_ACL=y
|
||||
CONFIG_NLS=y
|
||||
CONFIG_KEYS=y
|
||||
CONFIG_ENCRYPTED_KEYS=y
|
||||
CONFIG_CRYPTO_ECB=y
|
||||
CONFIG_CRYPTO_MD4=y
|
||||
CONFIG_CRYPTO_MD5=y
|
||||
CONFIG_CRYPTO_ARC4=y
|
||||
CONFIG_CRYPTO_DES=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
CONFIG_DEBUG_SLAB=y
|
||||
CONFIG_DETECT_HUNG_TASK=y
|
||||
CONFIG_DEBUG_SPINLOCK=y
|
||||
|
|
@ -6,14 +6,8 @@
|
|||
#ifndef _ASM_MICROBLAZE_DMA_H
|
||||
#define _ASM_MICROBLAZE_DMA_H
|
||||
|
||||
#ifndef CONFIG_MMU
|
||||
/* we don't have dma address limit. define it as zero to be
|
||||
* unlimited. */
|
||||
#define MAX_DMA_ADDRESS (0)
|
||||
#else
|
||||
/* Virtual address corresponding to last available physical memory address. */
|
||||
#define MAX_DMA_ADDRESS (CONFIG_KERNEL_START + memory_size - 1)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
extern int isa_dma_bridge_buggy;
|
||||
|
|
|
|||
|
|
@ -11,11 +11,6 @@
|
|||
#define _ASM_MICROBLAZE_EXCEPTIONS_H
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#ifndef CONFIG_MMU
|
||||
#define EX_HANDLER_STACK_SIZ (4*19)
|
||||
#endif
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/* Macros to enable and disable HW exceptions in the MSR */
|
||||
|
|
|
|||
|
|
@ -30,15 +30,12 @@ extern resource_size_t isa_mem_base;
|
|||
#define PCI_IOBASE ((void __iomem *)_IO_BASE)
|
||||
#define IO_SPACE_LIMIT (0xFFFFFFFF)
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
#define page_to_bus(page) (page_to_phys(page))
|
||||
|
||||
extern void iounmap(volatile void __iomem *addr);
|
||||
|
||||
extern void __iomem *ioremap(phys_addr_t address, unsigned long size);
|
||||
|
||||
#endif /* CONFIG_MMU */
|
||||
|
||||
/* Big Endian */
|
||||
#define out_be32(a, v) __raw_writel((v), (void __iomem __force *)(a))
|
||||
#define out_be16(a, v) __raw_writew((v), (a))
|
||||
|
|
|
|||
|
|
@ -8,9 +8,6 @@
|
|||
#ifndef _ASM_MICROBLAZE_MMU_H
|
||||
#define _ASM_MICROBLAZE_MMU_H
|
||||
|
||||
# ifndef CONFIG_MMU
|
||||
# include <asm-generic/mmu.h>
|
||||
# else /* CONFIG_MMU */
|
||||
# ifdef __KERNEL__
|
||||
# ifndef __ASSEMBLY__
|
||||
|
||||
|
|
@ -119,5 +116,4 @@ extern u32 tlb_skip;
|
|||
# define TLB_G 0x00000001 /* Memory is guarded from prefetch */
|
||||
|
||||
# endif /* __KERNEL__ */
|
||||
# endif /* CONFIG_MMU */
|
||||
#endif /* _ASM_MICROBLAZE_MMU_H */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,2 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifdef CONFIG_MMU
|
||||
# include <asm/mmu_context_mm.h>
|
||||
#else
|
||||
# include <asm-generic/nommu_context.h>
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -20,13 +20,7 @@
|
|||
#ifdef __KERNEL__
|
||||
|
||||
/* PAGE_SHIFT determines the page size */
|
||||
#if defined(CONFIG_MICROBLAZE_64K_PAGES)
|
||||
#define PAGE_SHIFT 16
|
||||
#elif defined(CONFIG_MICROBLAZE_16K_PAGES)
|
||||
#define PAGE_SHIFT 14
|
||||
#else
|
||||
#define PAGE_SHIFT 12
|
||||
#endif
|
||||
#define PAGE_SIZE (ASM_CONST(1) << PAGE_SHIFT)
|
||||
#define PAGE_MASK (~(PAGE_SIZE-1))
|
||||
|
||||
|
|
@ -44,17 +38,6 @@
|
|||
#define PAGE_UP(addr) (((addr)+((PAGE_SIZE)-1))&(~((PAGE_SIZE)-1)))
|
||||
#define PAGE_DOWN(addr) ((addr)&(~((PAGE_SIZE)-1)))
|
||||
|
||||
#ifndef CONFIG_MMU
|
||||
/*
|
||||
* PAGE_OFFSET -- the first address of the first page of memory. When not
|
||||
* using MMU this corresponds to the first free page in physical memory (aligned
|
||||
* on a page boundary).
|
||||
*/
|
||||
extern unsigned int __page_offset;
|
||||
#define PAGE_OFFSET __page_offset
|
||||
|
||||
#else /* CONFIG_MMU */
|
||||
|
||||
/*
|
||||
* PAGE_OFFSET -- the first address of the first page of memory. With MMU
|
||||
* it is set to the kernel start address (aligned on a page boundary).
|
||||
|
|
@ -70,8 +53,6 @@ extern unsigned int __page_offset;
|
|||
typedef unsigned long pte_basic_t;
|
||||
#define PTE_FMT "%.8lx"
|
||||
|
||||
#endif /* CONFIG_MMU */
|
||||
|
||||
# define copy_page(to, from) memcpy((to), (from), PAGE_SIZE)
|
||||
# define clear_page(pgaddr) memset((pgaddr), 0, PAGE_SIZE)
|
||||
|
||||
|
|
@ -86,25 +67,12 @@ typedef struct page *pgtable_t;
|
|||
typedef struct { unsigned long pte; } pte_t;
|
||||
typedef struct { unsigned long pgprot; } pgprot_t;
|
||||
/* FIXME this can depend on linux kernel version */
|
||||
# ifdef CONFIG_MMU
|
||||
typedef struct { unsigned long pgd; } pgd_t;
|
||||
# else /* CONFIG_MMU */
|
||||
typedef struct { unsigned long ste[64]; } pmd_t;
|
||||
typedef struct { pmd_t pue[1]; } pud_t;
|
||||
typedef struct { pud_t p4e[1]; } p4d_t;
|
||||
typedef struct { p4d_t pge[1]; } pgd_t;
|
||||
# endif /* CONFIG_MMU */
|
||||
|
||||
# define pte_val(x) ((x).pte)
|
||||
# define pgprot_val(x) ((x).pgprot)
|
||||
|
||||
# ifdef CONFIG_MMU
|
||||
# define pgd_val(x) ((x).pgd)
|
||||
# else /* CONFIG_MMU */
|
||||
# define pmd_val(x) ((x).ste[0])
|
||||
# define pud_val(x) ((x).pue[0])
|
||||
# define pgd_val(x) ((x).pge[0])
|
||||
# endif /* CONFIG_MMU */
|
||||
|
||||
# define __pte(x) ((pte_t) { (x) })
|
||||
# define __pgd(x) ((pgd_t) { (x) })
|
||||
|
|
@ -142,28 +110,12 @@ extern int page_is_ram(unsigned long pfn);
|
|||
# define virt_to_pfn(vaddr) (phys_to_pfn((__pa(vaddr))))
|
||||
# define pfn_to_virt(pfn) __va(pfn_to_phys((pfn)))
|
||||
|
||||
# ifdef CONFIG_MMU
|
||||
|
||||
# define virt_to_page(kaddr) (pfn_to_page(__pa(kaddr) >> PAGE_SHIFT))
|
||||
# define page_to_virt(page) __va(page_to_pfn(page) << PAGE_SHIFT)
|
||||
# define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
|
||||
|
||||
# else /* CONFIG_MMU */
|
||||
# define virt_to_page(vaddr) (pfn_to_page(virt_to_pfn(vaddr)))
|
||||
# define page_to_virt(page) (pfn_to_virt(page_to_pfn(page)))
|
||||
# define page_to_phys(page) (pfn_to_phys(page_to_pfn(page)))
|
||||
# define page_to_bus(page) (page_to_phys(page))
|
||||
# define phys_to_page(paddr) (pfn_to_page(phys_to_pfn(paddr)))
|
||||
# endif /* CONFIG_MMU */
|
||||
|
||||
# ifndef CONFIG_MMU
|
||||
# define pfn_valid(pfn) (((pfn) >= min_low_pfn) && \
|
||||
((pfn) <= (min_low_pfn + max_mapnr)))
|
||||
# define ARCH_PFN_OFFSET (PAGE_OFFSET >> PAGE_SHIFT)
|
||||
# else /* CONFIG_MMU */
|
||||
# define ARCH_PFN_OFFSET (memory_start >> PAGE_SHIFT)
|
||||
# define pfn_valid(pfn) ((pfn) < (max_mapnr + ARCH_PFN_OFFSET))
|
||||
# endif /* CONFIG_MMU */
|
||||
|
||||
# endif /* __ASSEMBLY__ */
|
||||
|
||||
|
|
@ -174,12 +126,6 @@ extern int page_is_ram(unsigned long pfn);
|
|||
|
||||
/* Convert between virtual and physical address for MMU. */
|
||||
/* Handle MicroBlaze processor with virtual memory. */
|
||||
#ifndef CONFIG_MMU
|
||||
#define __virt_to_phys(addr) addr
|
||||
#define __phys_to_virt(addr) addr
|
||||
#define tophys(rd, rs) addik rd, rs, 0
|
||||
#define tovirt(rd, rs) addik rd, rs, 0
|
||||
#else
|
||||
#define __virt_to_phys(addr) \
|
||||
((addr) + CONFIG_KERNEL_BASE_ADDR - CONFIG_KERNEL_START)
|
||||
#define __phys_to_virt(addr) \
|
||||
|
|
@ -188,14 +134,9 @@ extern int page_is_ram(unsigned long pfn);
|
|||
addik rd, rs, (CONFIG_KERNEL_BASE_ADDR - CONFIG_KERNEL_START)
|
||||
#define tovirt(rd, rs) \
|
||||
addik rd, rs, (CONFIG_KERNEL_START - CONFIG_KERNEL_BASE_ADDR)
|
||||
#endif /* CONFIG_MMU */
|
||||
|
||||
#define TOPHYS(addr) __virt_to_phys(addr)
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
|
||||
#endif /* CONFIG_MMU */
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#include <asm-generic/memory_model.h>
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
#ifndef _ASM_MICROBLAZE_PGALLOC_H
|
||||
#define _ASM_MICROBLAZE_PGALLOC_H
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
|
||||
#include <linux/kernel.h> /* For min/max macros */
|
||||
#include <linux/highmem.h>
|
||||
#include <linux/pgtable.h>
|
||||
|
|
@ -42,6 +40,4 @@ extern pte_t *pte_alloc_one_kernel(struct mm_struct *mm);
|
|||
#define pmd_populate_kernel(mm, pmd, pte) \
|
||||
(pmd_val(*(pmd)) = (unsigned long) (pte))
|
||||
|
||||
#endif /* CONFIG_MMU */
|
||||
|
||||
#endif /* _ASM_MICROBLAZE_PGALLOC_H */
|
||||
|
|
|
|||
|
|
@ -14,47 +14,6 @@
|
|||
extern int mem_init_done;
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_MMU
|
||||
|
||||
#define pgd_present(pgd) (1) /* pages are always present on non MMU */
|
||||
#define pgd_none(pgd) (0)
|
||||
#define pgd_bad(pgd) (0)
|
||||
#define pgd_clear(pgdp)
|
||||
#define kern_addr_valid(addr) (1)
|
||||
|
||||
#define PAGE_NONE __pgprot(0) /* these mean nothing to non MMU */
|
||||
#define PAGE_SHARED __pgprot(0) /* these mean nothing to non MMU */
|
||||
#define PAGE_COPY __pgprot(0) /* these mean nothing to non MMU */
|
||||
#define PAGE_READONLY __pgprot(0) /* these mean nothing to non MMU */
|
||||
#define PAGE_KERNEL __pgprot(0) /* these mean nothing to non MMU */
|
||||
|
||||
#define pgprot_noncached(x) (x)
|
||||
#define pgprot_writecombine pgprot_noncached
|
||||
#define pgprot_device pgprot_noncached
|
||||
|
||||
#define __swp_type(x) (0)
|
||||
#define __swp_offset(x) (0)
|
||||
#define __swp_entry(typ, off) ((swp_entry_t) { ((typ) | ((off) << 7)) })
|
||||
#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
|
||||
#define __swp_entry_to_pte(x) ((pte_t) { (x).val })
|
||||
|
||||
#define ZERO_PAGE(vaddr) ({ BUG(); NULL; })
|
||||
|
||||
#define swapper_pg_dir ((pgd_t *) NULL)
|
||||
|
||||
#define arch_enter_lazy_cpu_mode() do {} while (0)
|
||||
|
||||
#define pgprot_noncached_wc(prot) prot
|
||||
|
||||
/*
|
||||
* All 32bit addresses are effectively valid for vmalloc...
|
||||
* Sort of meaningless for non-VM targets.
|
||||
*/
|
||||
#define VMALLOC_START 0
|
||||
#define VMALLOC_END 0xffffffff
|
||||
|
||||
#else /* CONFIG_MMU */
|
||||
|
||||
#include <asm-generic/pgtable-nopmd.h>
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
|
@ -491,8 +450,6 @@ void __init *early_get_page(void);
|
|||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* CONFIG_MMU */
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
extern unsigned long ioremap_bot, ioremap_base;
|
||||
|
||||
|
|
|
|||
|
|
@ -31,42 +31,6 @@ extern void ret_from_kernel_thread(void);
|
|||
|
||||
# endif /* __ASSEMBLY__ */
|
||||
|
||||
# ifndef CONFIG_MMU
|
||||
/*
|
||||
* User space process size: memory size
|
||||
*
|
||||
* TASK_SIZE on MMU cpu is usually 1GB. However, on no-MMU arch, both
|
||||
* user processes and the kernel is on the same memory region. They
|
||||
* both share the memory space and that is limited by the amount of
|
||||
* physical memory. thus, we set TASK_SIZE == amount of total memory.
|
||||
*/
|
||||
# define TASK_SIZE (0x81000000 - 0x80000000)
|
||||
|
||||
/*
|
||||
* This decides where the kernel will search for a free chunk of vm
|
||||
* space during mmap's. We won't be using it
|
||||
*/
|
||||
# define TASK_UNMAPPED_BASE 0
|
||||
|
||||
/* definition in include/linux/sched.h */
|
||||
struct task_struct;
|
||||
|
||||
/* thread_struct is gone. use thread_info instead. */
|
||||
struct thread_struct { };
|
||||
# define INIT_THREAD { }
|
||||
|
||||
/* Free all resources held by a thread. */
|
||||
static inline void release_thread(struct task_struct *dead_task)
|
||||
{
|
||||
}
|
||||
|
||||
extern unsigned long get_wchan(struct task_struct *p);
|
||||
|
||||
# define KSTK_EIP(tsk) (0)
|
||||
# define KSTK_ESP(tsk) (0)
|
||||
|
||||
# else /* CONFIG_MMU */
|
||||
|
||||
/*
|
||||
* This is used to define STACK_TOP, and with MMU it must be below
|
||||
* kernel base to select the correct PGD when handling MMU exceptions.
|
||||
|
|
@ -130,5 +94,4 @@ extern struct dentry *of_debugfs_root;
|
|||
#endif
|
||||
|
||||
# endif /* __ASSEMBLY__ */
|
||||
# endif /* CONFIG_MMU */
|
||||
#endif /* _ASM_MICROBLAZE_PROCESSOR_H */
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@
|
|||
#define FSR_UF (1<<1) /* Underflow */
|
||||
#define FSR_DO (1<<0) /* Denormalized operand error */
|
||||
|
||||
# ifdef CONFIG_MMU
|
||||
/* Machine State Register (MSR) Fields */
|
||||
# define MSR_UM (1<<11) /* User Mode */
|
||||
# define MSR_UMS (1<<12) /* User Mode Save */
|
||||
|
|
@ -43,5 +42,4 @@
|
|||
# define ESR_DIZ (1<<11) /* Zone Protection */
|
||||
# define ESR_S (1<<10) /* Store instruction */
|
||||
|
||||
# endif /* CONFIG_MMU */
|
||||
#endif /* _ASM_MICROBLAZE_REGISTERS_H */
|
||||
|
|
|
|||
|
|
@ -14,9 +14,7 @@ extern char cmd_line[COMMAND_LINE_SIZE];
|
|||
|
||||
extern char *klimit;
|
||||
|
||||
# ifdef CONFIG_MMU
|
||||
extern void mmu_reset(void);
|
||||
# endif /* CONFIG_MMU */
|
||||
|
||||
void time_init(void);
|
||||
void init_IRQ(void);
|
||||
|
|
|
|||
|
|
@ -107,6 +107,7 @@ static inline struct thread_info *current_thread_info(void)
|
|||
#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
|
||||
/* restore singlestep on return to user mode */
|
||||
#define TIF_SINGLESTEP 4
|
||||
#define TIF_NOTIFY_SIGNAL 5 /* signal notifications exist */
|
||||
#define TIF_MEMDIE 6 /* is terminating due to OOM killer */
|
||||
#define TIF_SYSCALL_AUDIT 9 /* syscall auditing active */
|
||||
#define TIF_SECCOMP 10 /* secure computing */
|
||||
|
|
@ -119,6 +120,7 @@ static inline struct thread_info *current_thread_info(void)
|
|||
#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
|
||||
#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
|
||||
#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP)
|
||||
#define _TIF_NOTIFY_SIGNAL (1 << TIF_NOTIFY_SIGNAL)
|
||||
#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
|
||||
#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
|
||||
#define _TIF_SECCOMP (1 << TIF_SECCOMP)
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
#ifndef _ASM_MICROBLAZE_TLBFLUSH_H
|
||||
#define _ASM_MICROBLAZE_TLBFLUSH_H
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
|
||||
#include <linux/sched.h>
|
||||
#include <linux/threads.h>
|
||||
#include <asm/processor.h> /* For TASK_SIZE */
|
||||
|
|
@ -50,16 +48,4 @@ static inline void local_flush_tlb_range(struct vm_area_struct *vma,
|
|||
static inline void flush_tlb_pgtables(struct mm_struct *mm,
|
||||
unsigned long start, unsigned long end) { }
|
||||
|
||||
#else /* CONFIG_MMU */
|
||||
|
||||
#define flush_tlb() BUG()
|
||||
#define flush_tlb_all() BUG()
|
||||
#define flush_tlb_mm(mm) BUG()
|
||||
#define flush_tlb_page(vma, addr) BUG()
|
||||
#define flush_tlb_range(mm, start, end) BUG()
|
||||
#define flush_tlb_pgtables(mm, start, end) BUG()
|
||||
#define flush_tlb_kernel_range(start, end) BUG()
|
||||
|
||||
#endif /* CONFIG_MMU */
|
||||
|
||||
#endif /* _ASM_MICROBLAZE_TLBFLUSH_H */
|
||||
|
|
|
|||
|
|
@ -30,35 +30,14 @@
|
|||
*/
|
||||
# define MAKE_MM_SEG(s) ((mm_segment_t) { (s) })
|
||||
|
||||
# ifndef CONFIG_MMU
|
||||
# define KERNEL_DS MAKE_MM_SEG(0)
|
||||
# define USER_DS KERNEL_DS
|
||||
# else
|
||||
# define KERNEL_DS MAKE_MM_SEG(0xFFFFFFFF)
|
||||
# define USER_DS MAKE_MM_SEG(TASK_SIZE - 1)
|
||||
# endif
|
||||
|
||||
# define get_fs() (current_thread_info()->addr_limit)
|
||||
# define set_fs(val) (current_thread_info()->addr_limit = (val))
|
||||
|
||||
# define uaccess_kernel() (get_fs().seg == KERNEL_DS.seg)
|
||||
|
||||
#ifndef CONFIG_MMU
|
||||
|
||||
/* Check against bounds of physical memory */
|
||||
static inline int ___range_ok(unsigned long addr, unsigned long size)
|
||||
{
|
||||
return ((addr < memory_start) ||
|
||||
((addr + size - 1) > (memory_start + memory_size - 1)));
|
||||
}
|
||||
|
||||
#define __range_ok(addr, size) \
|
||||
___range_ok((unsigned long)(addr), (unsigned long)(size))
|
||||
|
||||
#define access_ok(addr, size) (__range_ok((addr), (size)) == 0)
|
||||
|
||||
#else
|
||||
|
||||
static inline int access_ok(const void __user *addr, unsigned long size)
|
||||
{
|
||||
if (!size)
|
||||
|
|
@ -77,15 +56,9 @@ static inline int access_ok(const void __user *addr, unsigned long size)
|
|||
(u32)get_fs().seg);
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
# define __FIXUP_SECTION ".section .fixup,\"ax\"\n"
|
||||
# define __EX_TABLE_SECTION ".section __ex_table,\"a\"\n"
|
||||
#else
|
||||
# define __FIXUP_SECTION ".section .discard,\"ax\"\n"
|
||||
# define __EX_TABLE_SECTION ".section .discard,\"ax\"\n"
|
||||
#endif
|
||||
|
||||
extern unsigned long __copy_tofrom_user(void __user *to,
|
||||
const void __user *from, unsigned long size);
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@ obj-y += dma.o exceptions.o \
|
|||
obj-y += cpu/
|
||||
|
||||
obj-$(CONFIG_MODULES) += microblaze_ksyms.o module.o
|
||||
obj-$(CONFIG_MMU) += misc.o
|
||||
obj-y += misc.o
|
||||
obj-$(CONFIG_STACKTRACE) += stacktrace.o
|
||||
obj-$(CONFIG_FUNCTION_TRACER) += ftrace.o mcount.o
|
||||
obj-$(CONFIG_KGDB) += kgdb.o
|
||||
|
||||
obj-y += entry$(MMU).o
|
||||
obj-y += entry.o
|
||||
|
|
|
|||
|
|
@ -70,7 +70,6 @@ int main(int argc, char *argv[])
|
|||
|
||||
/* struct task_struct */
|
||||
DEFINE(TS_THREAD_INFO, offsetof(struct task_struct, stack));
|
||||
#ifdef CONFIG_MMU
|
||||
DEFINE(TASK_STATE, offsetof(struct task_struct, state));
|
||||
DEFINE(TASK_FLAGS, offsetof(struct task_struct, flags));
|
||||
DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace));
|
||||
|
|
@ -84,7 +83,6 @@ int main(int argc, char *argv[])
|
|||
|
||||
DEFINE(PGDIR, offsetof(struct thread_struct, pgdir));
|
||||
BLANK();
|
||||
#endif
|
||||
|
||||
/* struct thread_info */
|
||||
DEFINE(TI_TASK, offsetof(struct thread_info, task));
|
||||
|
|
|
|||
|
|
@ -1,622 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2009 Michal Simek <monstr@monstr.eu>
|
||||
* Copyright (C) 2007-2009 PetaLogix
|
||||
* Copyright (C) 2006 Atmark Techno, Inc.
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*/
|
||||
|
||||
#include <linux/linkage.h>
|
||||
#include <asm/thread_info.h>
|
||||
#include <linux/errno.h>
|
||||
#include <asm/entry.h>
|
||||
#include <asm/asm-offsets.h>
|
||||
#include <asm/registers.h>
|
||||
#include <asm/unistd.h>
|
||||
#include <asm/percpu.h>
|
||||
#include <asm/signal.h>
|
||||
|
||||
#if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR
|
||||
.macro disable_irq
|
||||
msrclr r0, MSR_IE
|
||||
.endm
|
||||
|
||||
.macro enable_irq
|
||||
msrset r0, MSR_IE
|
||||
.endm
|
||||
|
||||
.macro clear_bip
|
||||
msrclr r0, MSR_BIP
|
||||
.endm
|
||||
#else
|
||||
.macro disable_irq
|
||||
mfs r11, rmsr
|
||||
andi r11, r11, ~MSR_IE
|
||||
mts rmsr, r11
|
||||
.endm
|
||||
|
||||
.macro enable_irq
|
||||
mfs r11, rmsr
|
||||
ori r11, r11, MSR_IE
|
||||
mts rmsr, r11
|
||||
.endm
|
||||
|
||||
.macro clear_bip
|
||||
mfs r11, rmsr
|
||||
andi r11, r11, ~MSR_BIP
|
||||
mts rmsr, r11
|
||||
.endm
|
||||
#endif
|
||||
|
||||
ENTRY(_interrupt)
|
||||
swi r1, r0, PER_CPU(ENTRY_SP) /* save the current sp */
|
||||
swi r11, r0, PER_CPU(R11_SAVE) /* temporarily save r11 */
|
||||
lwi r11, r0, PER_CPU(KM) /* load mode indicator */
|
||||
beqid r11, 1f
|
||||
nop
|
||||
brid 2f /* jump over */
|
||||
addik r1, r1, (-PT_SIZE) /* room for pt_regs (delay slot) */
|
||||
1: /* switch to kernel stack */
|
||||
lwi r1, r0, PER_CPU(CURRENT_SAVE) /* get the saved current */
|
||||
lwi r1, r1, TS_THREAD_INFO /* get the thread info */
|
||||
/* calculate kernel stack pointer */
|
||||
addik r1, r1, THREAD_SIZE - PT_SIZE
|
||||
2:
|
||||
swi r11, r1, PT_MODE /* store the mode */
|
||||
lwi r11, r0, PER_CPU(R11_SAVE) /* reload r11 */
|
||||
swi r2, r1, PT_R2
|
||||
swi r3, r1, PT_R3
|
||||
swi r4, r1, PT_R4
|
||||
swi r5, r1, PT_R5
|
||||
swi r6, r1, PT_R6
|
||||
swi r7, r1, PT_R7
|
||||
swi r8, r1, PT_R8
|
||||
swi r9, r1, PT_R9
|
||||
swi r10, r1, PT_R10
|
||||
swi r11, r1, PT_R11
|
||||
swi r12, r1, PT_R12
|
||||
swi r13, r1, PT_R13
|
||||
swi r14, r1, PT_R14
|
||||
swi r14, r1, PT_PC
|
||||
swi r15, r1, PT_R15
|
||||
swi r16, r1, PT_R16
|
||||
swi r17, r1, PT_R17
|
||||
swi r18, r1, PT_R18
|
||||
swi r19, r1, PT_R19
|
||||
swi r20, r1, PT_R20
|
||||
swi r21, r1, PT_R21
|
||||
swi r22, r1, PT_R22
|
||||
swi r23, r1, PT_R23
|
||||
swi r24, r1, PT_R24
|
||||
swi r25, r1, PT_R25
|
||||
swi r26, r1, PT_R26
|
||||
swi r27, r1, PT_R27
|
||||
swi r28, r1, PT_R28
|
||||
swi r29, r1, PT_R29
|
||||
swi r30, r1, PT_R30
|
||||
swi r31, r1, PT_R31
|
||||
/* special purpose registers */
|
||||
mfs r11, rmsr
|
||||
swi r11, r1, PT_MSR
|
||||
mfs r11, rear
|
||||
swi r11, r1, PT_EAR
|
||||
mfs r11, resr
|
||||
swi r11, r1, PT_ESR
|
||||
mfs r11, rfsr
|
||||
swi r11, r1, PT_FSR
|
||||
/* reload original stack pointer and save it */
|
||||
lwi r11, r0, PER_CPU(ENTRY_SP)
|
||||
swi r11, r1, PT_R1
|
||||
/* update mode indicator we are in kernel mode */
|
||||
addik r11, r0, 1
|
||||
swi r11, r0, PER_CPU(KM)
|
||||
/* restore r31 */
|
||||
lwi r31, r0, PER_CPU(CURRENT_SAVE)
|
||||
/* prepare the link register, the argument and jump */
|
||||
addik r15, r0, ret_from_intr - 8
|
||||
addk r6, r0, r15
|
||||
braid do_IRQ
|
||||
add r5, r0, r1
|
||||
|
||||
ret_from_intr:
|
||||
lwi r11, r1, PT_MODE
|
||||
bneid r11, no_intr_resched
|
||||
|
||||
3:
|
||||
lwi r6, r31, TS_THREAD_INFO /* get thread info */
|
||||
lwi r19, r6, TI_FLAGS /* get flags in thread info */
|
||||
/* do an extra work if any bits are set */
|
||||
|
||||
andi r11, r19, _TIF_NEED_RESCHED
|
||||
beqi r11, 1f
|
||||
bralid r15, schedule
|
||||
nop
|
||||
bri 3b
|
||||
1: andi r11, r19, _TIF_SIGPENDING | _TIF_NOTIFY_RESUME
|
||||
beqid r11, no_intr_resched
|
||||
addk r5, r1, r0
|
||||
bralid r15, do_notify_resume
|
||||
addk r6, r0, r0
|
||||
bri 3b
|
||||
|
||||
no_intr_resched:
|
||||
/* Disable interrupts, we are now committed to the state restore */
|
||||
disable_irq
|
||||
|
||||
/* save mode indicator */
|
||||
lwi r11, r1, PT_MODE
|
||||
swi r11, r0, PER_CPU(KM)
|
||||
|
||||
/* save r31 */
|
||||
swi r31, r0, PER_CPU(CURRENT_SAVE)
|
||||
restore_context:
|
||||
/* special purpose registers */
|
||||
lwi r11, r1, PT_FSR
|
||||
mts rfsr, r11
|
||||
lwi r11, r1, PT_ESR
|
||||
mts resr, r11
|
||||
lwi r11, r1, PT_EAR
|
||||
mts rear, r11
|
||||
lwi r11, r1, PT_MSR
|
||||
mts rmsr, r11
|
||||
|
||||
lwi r31, r1, PT_R31
|
||||
lwi r30, r1, PT_R30
|
||||
lwi r29, r1, PT_R29
|
||||
lwi r28, r1, PT_R28
|
||||
lwi r27, r1, PT_R27
|
||||
lwi r26, r1, PT_R26
|
||||
lwi r25, r1, PT_R25
|
||||
lwi r24, r1, PT_R24
|
||||
lwi r23, r1, PT_R23
|
||||
lwi r22, r1, PT_R22
|
||||
lwi r21, r1, PT_R21
|
||||
lwi r20, r1, PT_R20
|
||||
lwi r19, r1, PT_R19
|
||||
lwi r18, r1, PT_R18
|
||||
lwi r17, r1, PT_R17
|
||||
lwi r16, r1, PT_R16
|
||||
lwi r15, r1, PT_R15
|
||||
lwi r14, r1, PT_PC
|
||||
lwi r13, r1, PT_R13
|
||||
lwi r12, r1, PT_R12
|
||||
lwi r11, r1, PT_R11
|
||||
lwi r10, r1, PT_R10
|
||||
lwi r9, r1, PT_R9
|
||||
lwi r8, r1, PT_R8
|
||||
lwi r7, r1, PT_R7
|
||||
lwi r6, r1, PT_R6
|
||||
lwi r5, r1, PT_R5
|
||||
lwi r4, r1, PT_R4
|
||||
lwi r3, r1, PT_R3
|
||||
lwi r2, r1, PT_R2
|
||||
lwi r1, r1, PT_R1
|
||||
rtid r14, 0
|
||||
nop
|
||||
|
||||
ENTRY(_reset)
|
||||
brai 0;
|
||||
|
||||
ENTRY(_user_exception)
|
||||
swi r1, r0, PER_CPU(ENTRY_SP) /* save the current sp */
|
||||
swi r11, r0, PER_CPU(R11_SAVE) /* temporarily save r11 */
|
||||
lwi r11, r0, PER_CPU(KM) /* load mode indicator */
|
||||
beqid r11, 1f /* Already in kernel mode? */
|
||||
nop
|
||||
brid 2f /* jump over */
|
||||
addik r1, r1, (-PT_SIZE) /* Room for pt_regs (delay slot) */
|
||||
1: /* Switch to kernel stack */
|
||||
lwi r1, r0, PER_CPU(CURRENT_SAVE) /* get the saved current */
|
||||
lwi r1, r1, TS_THREAD_INFO /* get the thread info */
|
||||
/* calculate kernel stack pointer */
|
||||
addik r1, r1, THREAD_SIZE - PT_SIZE
|
||||
2:
|
||||
swi r11, r1, PT_MODE /* store the mode */
|
||||
lwi r11, r0, PER_CPU(R11_SAVE) /* reload r11 */
|
||||
/* save them on stack */
|
||||
swi r2, r1, PT_R2
|
||||
swi r3, r1, PT_R3 /* r3: _always_ in clobber list; see unistd.h */
|
||||
swi r4, r1, PT_R4 /* r4: _always_ in clobber list; see unistd.h */
|
||||
swi r5, r1, PT_R5
|
||||
swi r6, r1, PT_R6
|
||||
swi r7, r1, PT_R7
|
||||
swi r8, r1, PT_R8
|
||||
swi r9, r1, PT_R9
|
||||
swi r10, r1, PT_R10
|
||||
swi r11, r1, PT_R11
|
||||
/* r12: _always_ in clobber list; see unistd.h */
|
||||
swi r12, r1, PT_R12
|
||||
swi r13, r1, PT_R13
|
||||
/* r14: _always_ in clobber list; see unistd.h */
|
||||
swi r14, r1, PT_R14
|
||||
/* but we want to return to the next inst. */
|
||||
addik r14, r14, 0x4
|
||||
swi r14, r1, PT_PC /* increment by 4 and store in pc */
|
||||
swi r15, r1, PT_R15
|
||||
swi r16, r1, PT_R16
|
||||
swi r17, r1, PT_R17
|
||||
swi r18, r1, PT_R18
|
||||
swi r19, r1, PT_R19
|
||||
swi r20, r1, PT_R20
|
||||
swi r21, r1, PT_R21
|
||||
swi r22, r1, PT_R22
|
||||
swi r23, r1, PT_R23
|
||||
swi r24, r1, PT_R24
|
||||
swi r25, r1, PT_R25
|
||||
swi r26, r1, PT_R26
|
||||
swi r27, r1, PT_R27
|
||||
swi r28, r1, PT_R28
|
||||
swi r29, r1, PT_R29
|
||||
swi r30, r1, PT_R30
|
||||
swi r31, r1, PT_R31
|
||||
|
||||
disable_irq
|
||||
nop /* make sure IE bit is in effect */
|
||||
clear_bip /* once IE is in effect it is safe to clear BIP */
|
||||
nop
|
||||
|
||||
/* special purpose registers */
|
||||
mfs r11, rmsr
|
||||
swi r11, r1, PT_MSR
|
||||
mfs r11, rear
|
||||
swi r11, r1, PT_EAR
|
||||
mfs r11, resr
|
||||
swi r11, r1, PT_ESR
|
||||
mfs r11, rfsr
|
||||
swi r11, r1, PT_FSR
|
||||
/* reload original stack pointer and save it */
|
||||
lwi r11, r0, PER_CPU(ENTRY_SP)
|
||||
swi r11, r1, PT_R1
|
||||
/* update mode indicator we are in kernel mode */
|
||||
addik r11, r0, 1
|
||||
swi r11, r0, PER_CPU(KM)
|
||||
/* restore r31 */
|
||||
lwi r31, r0, PER_CPU(CURRENT_SAVE)
|
||||
/* re-enable interrupts now we are in kernel mode */
|
||||
enable_irq
|
||||
|
||||
/* See if the system call number is valid. */
|
||||
addi r11, r12, -__NR_syscalls
|
||||
bgei r11, 1f /* return to user if not valid */
|
||||
/* Figure out which function to use for this system call. */
|
||||
/* Note Microblaze barrel shift is optional, so don't rely on it */
|
||||
add r12, r12, r12 /* convert num -> ptr */
|
||||
addik r30, r0, 1 /* restarts allowed */
|
||||
add r12, r12, r12
|
||||
lwi r12, r12, sys_call_table /* Get function pointer */
|
||||
addik r15, r0, ret_to_user-8 /* set return address */
|
||||
bra r12 /* Make the system call. */
|
||||
bri 0 /* won't reach here */
|
||||
1:
|
||||
brid ret_to_user /* jump to syscall epilogue */
|
||||
addi r3, r0, -ENOSYS /* set errno in delay slot */
|
||||
|
||||
/*
|
||||
* Debug traps are like a system call, but entered via brki r14, 0x60
|
||||
* All we need to do is send the SIGTRAP signal to current, ptrace and
|
||||
* do_notify_resume will handle the rest
|
||||
*/
|
||||
ENTRY(_debug_exception)
|
||||
swi r1, r0, PER_CPU(ENTRY_SP) /* save the current sp */
|
||||
lwi r1, r0, PER_CPU(CURRENT_SAVE) /* get the saved current */
|
||||
lwi r1, r1, TS_THREAD_INFO /* get the thread info */
|
||||
addik r1, r1, THREAD_SIZE - PT_SIZE /* get the kernel stack */
|
||||
swi r11, r0, PER_CPU(R11_SAVE) /* temporarily save r11 */
|
||||
lwi r11, r0, PER_CPU(KM) /* load mode indicator */
|
||||
//save_context:
|
||||
swi r11, r1, PT_MODE /* store the mode */
|
||||
lwi r11, r0, PER_CPU(R11_SAVE) /* reload r11 */
|
||||
/* save them on stack */
|
||||
swi r2, r1, PT_R2
|
||||
swi r3, r1, PT_R3 /* r3: _always_ in clobber list; see unistd.h */
|
||||
swi r4, r1, PT_R4 /* r4: _always_ in clobber list; see unistd.h */
|
||||
swi r5, r1, PT_R5
|
||||
swi r6, r1, PT_R6
|
||||
swi r7, r1, PT_R7
|
||||
swi r8, r1, PT_R8
|
||||
swi r9, r1, PT_R9
|
||||
swi r10, r1, PT_R10
|
||||
swi r11, r1, PT_R11
|
||||
/* r12: _always_ in clobber list; see unistd.h */
|
||||
swi r12, r1, PT_R12
|
||||
swi r13, r1, PT_R13
|
||||
/* r14: _always_ in clobber list; see unistd.h */
|
||||
swi r14, r1, PT_R14
|
||||
swi r14, r1, PT_PC /* Will return to interrupted instruction */
|
||||
swi r15, r1, PT_R15
|
||||
swi r16, r1, PT_R16
|
||||
swi r17, r1, PT_R17
|
||||
swi r18, r1, PT_R18
|
||||
swi r19, r1, PT_R19
|
||||
swi r20, r1, PT_R20
|
||||
swi r21, r1, PT_R21
|
||||
swi r22, r1, PT_R22
|
||||
swi r23, r1, PT_R23
|
||||
swi r24, r1, PT_R24
|
||||
swi r25, r1, PT_R25
|
||||
swi r26, r1, PT_R26
|
||||
swi r27, r1, PT_R27
|
||||
swi r28, r1, PT_R28
|
||||
swi r29, r1, PT_R29
|
||||
swi r30, r1, PT_R30
|
||||
swi r31, r1, PT_R31
|
||||
|
||||
disable_irq
|
||||
nop /* make sure IE bit is in effect */
|
||||
clear_bip /* once IE is in effect it is safe to clear BIP */
|
||||
nop
|
||||
|
||||
/* special purpose registers */
|
||||
mfs r11, rmsr
|
||||
swi r11, r1, PT_MSR
|
||||
mfs r11, rear
|
||||
swi r11, r1, PT_EAR
|
||||
mfs r11, resr
|
||||
swi r11, r1, PT_ESR
|
||||
mfs r11, rfsr
|
||||
swi r11, r1, PT_FSR
|
||||
/* reload original stack pointer and save it */
|
||||
lwi r11, r0, PER_CPU(ENTRY_SP)
|
||||
swi r11, r1, PT_R1
|
||||
/* update mode indicator we are in kernel mode */
|
||||
addik r11, r0, 1
|
||||
swi r11, r0, PER_CPU(KM)
|
||||
/* restore r31 */
|
||||
lwi r31, r0, PER_CPU(CURRENT_SAVE)
|
||||
/* re-enable interrupts now we are in kernel mode */
|
||||
enable_irq
|
||||
|
||||
addi r5, r0, SIGTRAP /* sending the trap signal */
|
||||
add r6, r0, r31 /* to current */
|
||||
bralid r15, send_sig
|
||||
add r7, r0, r0 /* 3rd param zero */
|
||||
|
||||
addik r30, r0, 1 /* restarts allowed ??? */
|
||||
/* Restore r3/r4 to work around how ret_to_user works */
|
||||
lwi r3, r1, PT_R3
|
||||
lwi r4, r1, PT_R4
|
||||
bri ret_to_user
|
||||
|
||||
ENTRY(_break)
|
||||
bri 0
|
||||
|
||||
/* struct task_struct *_switch_to(struct thread_info *prev,
|
||||
struct thread_info *next); */
|
||||
ENTRY(_switch_to)
|
||||
/* prepare return value */
|
||||
addk r3, r0, r31
|
||||
|
||||
/* save registers in cpu_context */
|
||||
/* use r11 and r12, volatile registers, as temp register */
|
||||
addik r11, r5, TI_CPU_CONTEXT
|
||||
swi r1, r11, CC_R1
|
||||
swi r2, r11, CC_R2
|
||||
/* skip volatile registers.
|
||||
* they are saved on stack when we jumped to _switch_to() */
|
||||
/* dedicated registers */
|
||||
swi r13, r11, CC_R13
|
||||
swi r14, r11, CC_R14
|
||||
swi r15, r11, CC_R15
|
||||
swi r16, r11, CC_R16
|
||||
swi r17, r11, CC_R17
|
||||
swi r18, r11, CC_R18
|
||||
/* save non-volatile registers */
|
||||
swi r19, r11, CC_R19
|
||||
swi r20, r11, CC_R20
|
||||
swi r21, r11, CC_R21
|
||||
swi r22, r11, CC_R22
|
||||
swi r23, r11, CC_R23
|
||||
swi r24, r11, CC_R24
|
||||
swi r25, r11, CC_R25
|
||||
swi r26, r11, CC_R26
|
||||
swi r27, r11, CC_R27
|
||||
swi r28, r11, CC_R28
|
||||
swi r29, r11, CC_R29
|
||||
swi r30, r11, CC_R30
|
||||
/* special purpose registers */
|
||||
mfs r12, rmsr
|
||||
swi r12, r11, CC_MSR
|
||||
mfs r12, rear
|
||||
swi r12, r11, CC_EAR
|
||||
mfs r12, resr
|
||||
swi r12, r11, CC_ESR
|
||||
mfs r12, rfsr
|
||||
swi r12, r11, CC_FSR
|
||||
|
||||
/* update r31, the current */
|
||||
lwi r31, r6, TI_TASK
|
||||
swi r31, r0, PER_CPU(CURRENT_SAVE)
|
||||
|
||||
/* get new process' cpu context and restore */
|
||||
addik r11, r6, TI_CPU_CONTEXT
|
||||
|
||||
/* special purpose registers */
|
||||
lwi r12, r11, CC_FSR
|
||||
mts rfsr, r12
|
||||
lwi r12, r11, CC_ESR
|
||||
mts resr, r12
|
||||
lwi r12, r11, CC_EAR
|
||||
mts rear, r12
|
||||
lwi r12, r11, CC_MSR
|
||||
mts rmsr, r12
|
||||
/* non-volatile registers */
|
||||
lwi r30, r11, CC_R30
|
||||
lwi r29, r11, CC_R29
|
||||
lwi r28, r11, CC_R28
|
||||
lwi r27, r11, CC_R27
|
||||
lwi r26, r11, CC_R26
|
||||
lwi r25, r11, CC_R25
|
||||
lwi r24, r11, CC_R24
|
||||
lwi r23, r11, CC_R23
|
||||
lwi r22, r11, CC_R22
|
||||
lwi r21, r11, CC_R21
|
||||
lwi r20, r11, CC_R20
|
||||
lwi r19, r11, CC_R19
|
||||
/* dedicated registers */
|
||||
lwi r18, r11, CC_R18
|
||||
lwi r17, r11, CC_R17
|
||||
lwi r16, r11, CC_R16
|
||||
lwi r15, r11, CC_R15
|
||||
lwi r14, r11, CC_R14
|
||||
lwi r13, r11, CC_R13
|
||||
/* skip volatile registers */
|
||||
lwi r2, r11, CC_R2
|
||||
lwi r1, r11, CC_R1
|
||||
|
||||
rtsd r15, 8
|
||||
nop
|
||||
|
||||
ENTRY(ret_from_fork)
|
||||
addk r5, r0, r3
|
||||
brlid r15, schedule_tail
|
||||
nop
|
||||
swi r31, r1, PT_R31 /* save r31 in user context. */
|
||||
/* will soon be restored to r31 in ret_to_user */
|
||||
addk r3, r0, r0
|
||||
brid ret_to_user
|
||||
nop
|
||||
|
||||
ENTRY(ret_from_kernel_thread)
|
||||
brlid r15, schedule_tail
|
||||
addk r5, r0, r3
|
||||
brald r15, r20
|
||||
addk r5, r0, r19
|
||||
brid ret_to_user
|
||||
addk r3, r0, r0
|
||||
|
||||
work_pending:
|
||||
lwi r11, r1, PT_MODE
|
||||
bneid r11, 2f
|
||||
3:
|
||||
enable_irq
|
||||
andi r11, r19, _TIF_NEED_RESCHED
|
||||
beqi r11, 1f
|
||||
bralid r15, schedule
|
||||
nop
|
||||
bri 4f
|
||||
1: andi r11, r19, _TIF_SIGPENDING | _TIF_NOTIFY_RESUME
|
||||
beqi r11, no_work_pending
|
||||
addk r5, r30, r0
|
||||
bralid r15, do_notify_resume
|
||||
addik r6, r0, 1
|
||||
addk r30, r0, r0 /* no restarts from now on */
|
||||
4:
|
||||
disable_irq
|
||||
lwi r6, r31, TS_THREAD_INFO /* get thread info */
|
||||
lwi r19, r6, TI_FLAGS /* get flags in thread info */
|
||||
bri 3b
|
||||
|
||||
ENTRY(ret_to_user)
|
||||
disable_irq
|
||||
|
||||
swi r4, r1, PT_R4 /* return val */
|
||||
swi r3, r1, PT_R3 /* return val */
|
||||
|
||||
lwi r6, r31, TS_THREAD_INFO /* get thread info */
|
||||
lwi r19, r6, TI_FLAGS /* get flags in thread info */
|
||||
bnei r19, work_pending /* do an extra work if any bits are set */
|
||||
no_work_pending:
|
||||
disable_irq
|
||||
|
||||
2:
|
||||
/* save r31 */
|
||||
swi r31, r0, PER_CPU(CURRENT_SAVE)
|
||||
/* save mode indicator */
|
||||
lwi r18, r1, PT_MODE
|
||||
swi r18, r0, PER_CPU(KM)
|
||||
//restore_context:
|
||||
/* special purpose registers */
|
||||
lwi r18, r1, PT_FSR
|
||||
mts rfsr, r18
|
||||
lwi r18, r1, PT_ESR
|
||||
mts resr, r18
|
||||
lwi r18, r1, PT_EAR
|
||||
mts rear, r18
|
||||
lwi r18, r1, PT_MSR
|
||||
mts rmsr, r18
|
||||
|
||||
lwi r31, r1, PT_R31
|
||||
lwi r30, r1, PT_R30
|
||||
lwi r29, r1, PT_R29
|
||||
lwi r28, r1, PT_R28
|
||||
lwi r27, r1, PT_R27
|
||||
lwi r26, r1, PT_R26
|
||||
lwi r25, r1, PT_R25
|
||||
lwi r24, r1, PT_R24
|
||||
lwi r23, r1, PT_R23
|
||||
lwi r22, r1, PT_R22
|
||||
lwi r21, r1, PT_R21
|
||||
lwi r20, r1, PT_R20
|
||||
lwi r19, r1, PT_R19
|
||||
lwi r18, r1, PT_R18
|
||||
lwi r17, r1, PT_R17
|
||||
lwi r16, r1, PT_R16
|
||||
lwi r15, r1, PT_R15
|
||||
lwi r14, r1, PT_PC
|
||||
lwi r13, r1, PT_R13
|
||||
lwi r12, r1, PT_R12
|
||||
lwi r11, r1, PT_R11
|
||||
lwi r10, r1, PT_R10
|
||||
lwi r9, r1, PT_R9
|
||||
lwi r8, r1, PT_R8
|
||||
lwi r7, r1, PT_R7
|
||||
lwi r6, r1, PT_R6
|
||||
lwi r5, r1, PT_R5
|
||||
lwi r4, r1, PT_R4 /* return val */
|
||||
lwi r3, r1, PT_R3 /* return val */
|
||||
lwi r2, r1, PT_R2
|
||||
lwi r1, r1, PT_R1
|
||||
|
||||
rtid r14, 0
|
||||
nop
|
||||
|
||||
sys_rt_sigreturn_wrapper:
|
||||
addk r30, r0, r0 /* no restarts for this one */
|
||||
brid sys_rt_sigreturn
|
||||
addk r5, r1, r0
|
||||
|
||||
/* Interrupt vector table */
|
||||
.section .init.ivt, "ax"
|
||||
.org 0x0
|
||||
brai _reset
|
||||
brai _user_exception
|
||||
brai _interrupt
|
||||
brai _break
|
||||
brai _hw_exception_handler
|
||||
.org 0x60
|
||||
brai _debug_exception
|
||||
|
||||
.section .rodata,"a"
|
||||
#include "syscall_table.S"
|
||||
|
||||
syscall_table_size=(.-sys_call_table)
|
||||
|
||||
type_SYSCALL:
|
||||
.ascii "SYSCALL\0"
|
||||
type_IRQ:
|
||||
.ascii "IRQ\0"
|
||||
type_IRQ_PREEMPT:
|
||||
.ascii "IRQ (PREEMPTED)\0"
|
||||
type_SYSCALL_PREEMPT:
|
||||
.ascii " SYSCALL (PREEMPTED)\0"
|
||||
|
||||
/*
|
||||
* Trap decoding for stack unwinder
|
||||
* Tuples are (start addr, end addr, string)
|
||||
* If return address lies on [start addr, end addr],
|
||||
* unwinder displays 'string'
|
||||
*/
|
||||
|
||||
.align 4
|
||||
.global microblaze_trap_handlers
|
||||
microblaze_trap_handlers:
|
||||
/* Exact matches come first */
|
||||
.word ret_to_user ; .word ret_to_user ; .word type_SYSCALL
|
||||
.word ret_from_intr; .word ret_from_intr ; .word type_IRQ
|
||||
/* Fuzzy matches go here */
|
||||
.word ret_from_intr; .word no_intr_resched; .word type_IRQ_PREEMPT
|
||||
.word work_pending ; .word no_work_pending; .word type_SYSCALL_PREEMPT
|
||||
/* End of table */
|
||||
.word 0 ; .word 0 ; .word 0
|
||||
|
|
@ -69,9 +69,7 @@ void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr)
|
|||
asmlinkage void full_exception(struct pt_regs *regs, unsigned int type,
|
||||
int fsr, int addr)
|
||||
{
|
||||
#ifdef CONFIG_MMU
|
||||
addr = regs->pc;
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
pr_warn("Exception %02x in %s mode, FSR=%08x PC=%08x ESR=%08x\n",
|
||||
|
|
@ -132,13 +130,10 @@ asmlinkage void full_exception(struct pt_regs *regs, unsigned int type,
|
|||
fsr = FPE_FLTRES;
|
||||
_exception(SIGFPE, regs, fsr, addr);
|
||||
break;
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
case MICROBLAZE_PRIVILEGED_EXCEPTION:
|
||||
pr_debug("Privileged exception\n");
|
||||
_exception(SIGILL, regs, ILL_PRVOPC, addr);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
/* FIXME what to do in unexpected exception */
|
||||
pr_warn("Unexpected exception %02x PC=%08x in %s mode\n",
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@
|
|||
#include <asm/page.h>
|
||||
#include <linux/of_fdt.h> /* for OF_DT_HEADER */
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
#include <asm/setup.h> /* COMMAND_LINE_SIZE */
|
||||
#include <asm/mmu.h>
|
||||
#include <asm/processor.h>
|
||||
|
|
@ -48,8 +47,6 @@ empty_zero_page:
|
|||
swapper_pg_dir:
|
||||
.space PAGE_SIZE
|
||||
|
||||
#endif /* CONFIG_MMU */
|
||||
|
||||
.section .rodata
|
||||
.align 4
|
||||
endian_check:
|
||||
|
|
@ -108,8 +105,6 @@ _copy_fdt:
|
|||
addik r3, r3, -4 /* descrement loop */
|
||||
no_fdt_arg:
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
|
||||
#ifndef CONFIG_CMDLINE_BOOL
|
||||
/*
|
||||
* handling command line
|
||||
|
|
@ -329,7 +324,6 @@ turn_on_mmu:
|
|||
nop
|
||||
|
||||
start_here:
|
||||
#endif /* CONFIG_MMU */
|
||||
|
||||
/* Initialize small data anchors */
|
||||
addik r13, r0, _KERNEL_SDA_BASE_
|
||||
|
|
@ -345,11 +339,6 @@ start_here:
|
|||
brald r15, r11
|
||||
nop
|
||||
|
||||
#ifndef CONFIG_MMU
|
||||
addik r15, r0, machine_halt
|
||||
braid start_kernel
|
||||
nop
|
||||
#else
|
||||
/*
|
||||
* Initialize the MMU.
|
||||
*/
|
||||
|
|
@ -383,4 +372,3 @@ kernel_load_context:
|
|||
nop
|
||||
rted r17, 0 /* enable MMU and jump to start_kernel */
|
||||
nop
|
||||
#endif /* CONFIG_MMU */
|
||||
|
|
|
|||
|
|
@ -80,7 +80,6 @@
|
|||
/* Helpful Macros */
|
||||
#define NUM_TO_REG(num) r ## num
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
#define RESTORE_STATE \
|
||||
lwi r5, r1, 0; \
|
||||
mts rmsr, r5; \
|
||||
|
|
@ -92,7 +91,6 @@
|
|||
lwi r11, r1, PT_R11; \
|
||||
lwi r31, r1, PT_R31; \
|
||||
lwi r1, r1, PT_R1;
|
||||
#endif /* CONFIG_MMU */
|
||||
|
||||
#define LWREG_NOP \
|
||||
bri ex_handler_unhandled; \
|
||||
|
|
@ -102,10 +100,6 @@
|
|||
bri ex_handler_unhandled; \
|
||||
nop;
|
||||
|
||||
/* FIXME this is weird - for noMMU kernel is not possible to use brid
|
||||
* instruction which can shorten executed time
|
||||
*/
|
||||
|
||||
/* r3 is the source */
|
||||
#define R3_TO_LWREG_V(regnum) \
|
||||
swi r3, r1, 4 * regnum; \
|
||||
|
|
@ -126,7 +120,6 @@
|
|||
or r3, r0, NUM_TO_REG (regnum); \
|
||||
bri ex_sw_tail;
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
#define R3_TO_LWREG_VM_V(regnum) \
|
||||
brid ex_lw_end_vm; \
|
||||
swi r3, r7, 4 * regnum;
|
||||
|
|
@ -193,7 +186,6 @@
|
|||
.endm
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_MMU */
|
||||
|
||||
.extern other_exception_handler /* Defined in exception.c */
|
||||
|
||||
|
|
@ -251,7 +243,6 @@
|
|||
*/
|
||||
|
||||
/* wrappers to restore state before coming to entry.S */
|
||||
#ifdef CONFIG_MMU
|
||||
.section .data
|
||||
.align 4
|
||||
pt_pool_space:
|
||||
|
|
@ -316,31 +307,24 @@ _MB_HW_ExceptionVectorTable:
|
|||
.long TOPHYS(ex_handler_unhandled)
|
||||
.long TOPHYS(ex_handler_unhandled)
|
||||
.long TOPHYS(ex_handler_unhandled)
|
||||
#endif
|
||||
|
||||
.global _hw_exception_handler
|
||||
.section .text
|
||||
.align 4
|
||||
.ent _hw_exception_handler
|
||||
_hw_exception_handler:
|
||||
#ifndef CONFIG_MMU
|
||||
addik r1, r1, -(EX_HANDLER_STACK_SIZ); /* Create stack frame */
|
||||
#else
|
||||
swi r1, r0, TOPHYS(pt_pool_space + PT_R1); /* GET_SP */
|
||||
/* Save date to kernel memory. Here is the problem
|
||||
* when you came from user space */
|
||||
ori r1, r0, TOPHYS(pt_pool_space);
|
||||
#endif
|
||||
swi r3, r1, PT_R3
|
||||
swi r4, r1, PT_R4
|
||||
swi r5, r1, PT_R5
|
||||
swi r6, r1, PT_R6
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
swi r11, r1, PT_R11
|
||||
swi r31, r1, PT_R31
|
||||
lwi r31, r0, TOPHYS(PER_CPU(CURRENT_SAVE)) /* get saved current */
|
||||
#endif
|
||||
|
||||
mfs r5, rmsr;
|
||||
nop
|
||||
|
|
@ -350,18 +334,8 @@ _hw_exception_handler:
|
|||
mfs r3, rear;
|
||||
nop
|
||||
|
||||
#ifndef CONFIG_MMU
|
||||
andi r5, r4, 0x1000; /* Check ESR[DS] */
|
||||
beqi r5, not_in_delay_slot; /* Branch if ESR[DS] not set */
|
||||
mfs r17, rbtr; /* ESR[DS] set - return address in BTR */
|
||||
nop
|
||||
not_in_delay_slot:
|
||||
swi r17, r1, PT_R17
|
||||
#endif
|
||||
|
||||
andi r5, r4, 0x1F; /* Extract ESR[EXC] */
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
/* Calculate exception vector offset = r5 << 2 */
|
||||
addk r6, r5, r5; /* << 1 */
|
||||
addk r6, r6, r6; /* << 2 */
|
||||
|
|
@ -383,73 +357,6 @@ not_in_delay_slot:
|
|||
full_exception_trapw:
|
||||
RESTORE_STATE
|
||||
bri full_exception_trap
|
||||
#else
|
||||
/* Exceptions enabled here. This will allow nested exceptions */
|
||||
mfs r6, rmsr;
|
||||
nop
|
||||
swi r6, r1, 0; /* RMSR_OFFSET */
|
||||
ori r6, r6, 0x100; /* Turn ON the EE bit */
|
||||
andi r6, r6, ~2; /* Disable interrupts */
|
||||
mts rmsr, r6;
|
||||
nop
|
||||
|
||||
xori r6, r5, 1; /* 00001 = Unaligned Exception */
|
||||
/* Jump to unalignment exception handler */
|
||||
beqi r6, handle_unaligned_ex;
|
||||
|
||||
handle_other_ex: /* Handle Other exceptions here */
|
||||
/* Save other volatiles before we make procedure calls below */
|
||||
swi r7, r1, PT_R7
|
||||
swi r8, r1, PT_R8
|
||||
swi r9, r1, PT_R9
|
||||
swi r10, r1, PT_R10
|
||||
swi r11, r1, PT_R11
|
||||
swi r12, r1, PT_R12
|
||||
swi r14, r1, PT_R14
|
||||
swi r15, r1, PT_R15
|
||||
swi r18, r1, PT_R18
|
||||
|
||||
or r5, r1, r0
|
||||
andi r6, r4, 0x1F; /* Load ESR[EC] */
|
||||
lwi r7, r0, PER_CPU(KM) /* MS: saving current kernel mode to regs */
|
||||
swi r7, r1, PT_MODE
|
||||
mfs r7, rfsr
|
||||
nop
|
||||
addk r8, r17, r0; /* Load exception address */
|
||||
bralid r15, full_exception; /* Branch to the handler */
|
||||
nop;
|
||||
mts rfsr, r0; /* Clear sticky fsr */
|
||||
nop
|
||||
|
||||
/*
|
||||
* Trigger execution of the signal handler by enabling
|
||||
* interrupts and calling an invalid syscall.
|
||||
*/
|
||||
mfs r5, rmsr;
|
||||
nop
|
||||
ori r5, r5, 2;
|
||||
mts rmsr, r5; /* enable interrupt */
|
||||
nop
|
||||
addi r12, r0, __NR_syscalls;
|
||||
brki r14, 0x08;
|
||||
mfs r5, rmsr; /* disable interrupt */
|
||||
nop
|
||||
andi r5, r5, ~2;
|
||||
mts rmsr, r5;
|
||||
nop
|
||||
|
||||
lwi r7, r1, PT_R7
|
||||
lwi r8, r1, PT_R8
|
||||
lwi r9, r1, PT_R9
|
||||
lwi r10, r1, PT_R10
|
||||
lwi r11, r1, PT_R11
|
||||
lwi r12, r1, PT_R12
|
||||
lwi r14, r1, PT_R14
|
||||
lwi r15, r1, PT_R15
|
||||
lwi r18, r1, PT_R18
|
||||
|
||||
bri ex_handler_done; /* Complete exception handling */
|
||||
#endif
|
||||
|
||||
/* 0x01 - Unaligned data access exception
|
||||
* This occurs when a word access is not aligned on a word boundary,
|
||||
|
|
@ -463,7 +370,6 @@ handle_unaligned_ex:
|
|||
* R4 = ESR
|
||||
* R3 = EAR
|
||||
*/
|
||||
#ifdef CONFIG_MMU
|
||||
andi r6, r4, 0x1000 /* Check ESR[DS] */
|
||||
beqi r6, _no_delayslot /* Branch if ESR[DS] not set */
|
||||
mfs r17, rbtr; /* ESR[DS] set - return address in BTR */
|
||||
|
|
@ -472,7 +378,7 @@ _no_delayslot:
|
|||
/* jump to high level unaligned handler */
|
||||
RESTORE_STATE;
|
||||
bri unaligned_data_trap
|
||||
#endif
|
||||
|
||||
andi r6, r4, 0x3E0; /* Mask and extract the register operand */
|
||||
srl r6, r6; /* r6 >> 5 */
|
||||
srl r6, r6;
|
||||
|
|
@ -558,25 +464,10 @@ ex_shw:
|
|||
ex_sw_end: /* Exception handling of store word, ends. */
|
||||
|
||||
ex_handler_done:
|
||||
#ifndef CONFIG_MMU
|
||||
lwi r5, r1, 0 /* RMSR */
|
||||
mts rmsr, r5
|
||||
nop
|
||||
lwi r3, r1, PT_R3
|
||||
lwi r4, r1, PT_R4
|
||||
lwi r5, r1, PT_R5
|
||||
lwi r6, r1, PT_R6
|
||||
lwi r17, r1, PT_R17
|
||||
|
||||
rted r17, 0
|
||||
addik r1, r1, (EX_HANDLER_STACK_SIZ); /* Restore stack frame */
|
||||
#else
|
||||
RESTORE_STATE;
|
||||
rted r17, 0
|
||||
nop
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
/* Exception vector entry code. This code runs with address translation
|
||||
* turned off (i.e. using physical addresses). */
|
||||
|
||||
|
|
@ -882,13 +773,7 @@ ex_handler_done:
|
|||
* bits 20 and 21 are zero.
|
||||
*/
|
||||
andi r3, r3, PAGE_MASK
|
||||
#ifdef CONFIG_MICROBLAZE_64K_PAGES
|
||||
ori r3, r3, TLB_VALID | TLB_PAGESZ(PAGESZ_64K)
|
||||
#elif CONFIG_MICROBLAZE_16K_PAGES
|
||||
ori r3, r3, TLB_VALID | TLB_PAGESZ(PAGESZ_16K)
|
||||
#else
|
||||
ori r3, r3, TLB_VALID | TLB_PAGESZ(PAGESZ_4K)
|
||||
#endif
|
||||
mts rtlbhi, r3 /* Load TLB HI */
|
||||
nop
|
||||
|
||||
|
|
@ -926,10 +811,8 @@ ex_handler_done:
|
|||
rtsd r15,8
|
||||
nop
|
||||
|
||||
#endif
|
||||
.end _hw_exception_handler
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
/* Unaligned data access exception last on a 4k page for MMU.
|
||||
* When this is called, we are in virtual mode with exceptions enabled
|
||||
* and registers 1-13,15,17,18 saved.
|
||||
|
|
@ -1044,7 +927,6 @@ ex_unaligned_fixup:
|
|||
.word store6,ex_unaligned_fixup;
|
||||
.previous;
|
||||
.end _unaligned_data_exception
|
||||
#endif /* CONFIG_MMU */
|
||||
|
||||
.global ex_handler_unhandled
|
||||
ex_handler_unhandled:
|
||||
|
|
@ -1093,11 +975,7 @@ lw_r27: R3_TO_LWREG (27);
|
|||
lw_r28: R3_TO_LWREG (28);
|
||||
lw_r29: R3_TO_LWREG (29);
|
||||
lw_r30: R3_TO_LWREG (30);
|
||||
#ifdef CONFIG_MMU
|
||||
lw_r31: R3_TO_LWREG_V (31);
|
||||
#else
|
||||
lw_r31: R3_TO_LWREG (31);
|
||||
#endif
|
||||
|
||||
sw_table:
|
||||
sw_r0: SWREG_TO_R3 (0);
|
||||
|
|
@ -1131,13 +1009,8 @@ sw_r27: SWREG_TO_R3 (27);
|
|||
sw_r28: SWREG_TO_R3 (28);
|
||||
sw_r29: SWREG_TO_R3 (29);
|
||||
sw_r30: SWREG_TO_R3 (30);
|
||||
#ifdef CONFIG_MMU
|
||||
sw_r31: SWREG_TO_R3_V (31);
|
||||
#else
|
||||
sw_r31: SWREG_TO_R3 (31);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
lw_table_vm:
|
||||
lw_r0_vm: R3_TO_LWREG_VM (0);
|
||||
lw_r1_vm: R3_TO_LWREG_VM_V (1);
|
||||
|
|
@ -1205,7 +1078,6 @@ sw_r28_vm: SWREG_TO_R3_VM_V (28);
|
|||
sw_r29_vm: SWREG_TO_R3_VM_V (29);
|
||||
sw_r30_vm: SWREG_TO_R3_VM_V (30);
|
||||
sw_r31_vm: SWREG_TO_R3_VM_V (31);
|
||||
#endif /* CONFIG_MMU */
|
||||
|
||||
/* Temporary data structures used in the handler */
|
||||
.section .data
|
||||
|
|
|
|||
|
|
@ -33,9 +33,7 @@ EXPORT_SYMBOL(memcpy);
|
|||
EXPORT_SYMBOL(memmove);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
EXPORT_SYMBOL(empty_zero_page);
|
||||
#endif
|
||||
|
||||
EXPORT_SYMBOL(mbc);
|
||||
|
||||
|
|
|
|||
|
|
@ -69,9 +69,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, unsigned long arg,
|
|||
ti->cpu_context.r19 = (unsigned long)arg;
|
||||
childregs->pt_mode = 1;
|
||||
local_save_flags(childregs->msr);
|
||||
#ifdef CONFIG_MMU
|
||||
ti->cpu_context.msr = childregs->msr & ~MSR_IE;
|
||||
#endif
|
||||
ti->cpu_context.r15 = (unsigned long)ret_from_kernel_thread - 8;
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -81,9 +79,6 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, unsigned long arg,
|
|||
|
||||
memset(&ti->cpu_context, 0, sizeof(struct cpu_context));
|
||||
ti->cpu_context.r1 = (unsigned long)childregs;
|
||||
#ifndef CONFIG_MMU
|
||||
ti->cpu_context.msr = (unsigned long)childregs->msr;
|
||||
#else
|
||||
childregs->msr |= MSR_UMS;
|
||||
|
||||
/* we should consider the fact that childregs is a copy of the parent
|
||||
|
|
@ -105,7 +100,6 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, unsigned long arg,
|
|||
ti->cpu_context.msr = (childregs->msr|MSR_VM);
|
||||
ti->cpu_context.msr &= ~MSR_UMS; /* switch_to to kernel mode */
|
||||
ti->cpu_context.msr &= ~MSR_IE;
|
||||
#endif
|
||||
ti->cpu_context.r15 = (unsigned long)ret_from_fork - 8;
|
||||
|
||||
/*
|
||||
|
|
@ -130,13 +124,10 @@ void start_thread(struct pt_regs *regs, unsigned long pc, unsigned long usp)
|
|||
regs->pc = pc;
|
||||
regs->r1 = usp;
|
||||
regs->pt_mode = 0;
|
||||
#ifdef CONFIG_MMU
|
||||
regs->msr |= MSR_UMS;
|
||||
regs->msr &= ~MSR_VM;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
#include <linux/elfcore.h>
|
||||
/*
|
||||
* Set up a thread for executing a new program
|
||||
|
|
@ -145,7 +136,6 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpregs)
|
|||
{
|
||||
return 0; /* MicroBlaze has no separate FPU registers */
|
||||
}
|
||||
#endif /* CONFIG_MMU */
|
||||
|
||||
void arch_cpu_idle(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/of_clk.h>
|
||||
#include <linux/clocksource.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/seq_file.h>
|
||||
|
|
@ -190,12 +190,10 @@ static int microblaze_debugfs_init(void)
|
|||
}
|
||||
arch_initcall(microblaze_debugfs_init);
|
||||
|
||||
# ifdef CONFIG_MMU
|
||||
static int __init debugfs_tlb(void)
|
||||
{
|
||||
debugfs_create_u32("tlb_skip", S_IRUGO, of_debugfs_root, &tlb_skip);
|
||||
return 0;
|
||||
}
|
||||
device_initcall(debugfs_tlb);
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -157,10 +157,8 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
|
|||
struct rt_sigframe __user *frame;
|
||||
int err = 0, sig = ksig->sig;
|
||||
unsigned long address = 0;
|
||||
#ifdef CONFIG_MMU
|
||||
pmd_t *pmdp;
|
||||
pte_t *ptep;
|
||||
#endif
|
||||
|
||||
frame = get_sigframe(ksig, regs, sizeof(*frame));
|
||||
|
||||
|
|
@ -192,7 +190,6 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
|
|||
regs->r15 = ((unsigned long)frame->tramp)-8;
|
||||
|
||||
address = ((unsigned long)frame->tramp);
|
||||
#ifdef CONFIG_MMU
|
||||
pmdp = pmd_off(current->mm, address);
|
||||
|
||||
preempt_disable();
|
||||
|
|
@ -208,10 +205,6 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
|
|||
}
|
||||
pte_unmap(ptep);
|
||||
preempt_enable();
|
||||
#else
|
||||
flush_icache_range(address, address + 8);
|
||||
flush_dcache_range(address, address + 8);
|
||||
#endif
|
||||
if (err)
|
||||
return -EFAULT;
|
||||
|
||||
|
|
@ -313,7 +306,8 @@ static void do_signal(struct pt_regs *regs, int in_syscall)
|
|||
|
||||
asmlinkage void do_notify_resume(struct pt_regs *regs, int in_syscall)
|
||||
{
|
||||
if (test_thread_flag(TIF_SIGPENDING))
|
||||
if (test_thread_flag(TIF_SIGPENDING) ||
|
||||
test_thread_flag(TIF_NOTIFY_SIGNAL))
|
||||
do_signal(regs, in_syscall);
|
||||
|
||||
if (test_thread_flag(TIF_NOTIFY_RESUME))
|
||||
|
|
|
|||
|
|
@ -161,22 +161,12 @@ static void microblaze_unwind_inner(struct task_struct *task,
|
|||
* unwind_trap - Unwind through a system trap, that stored previous state
|
||||
* on the stack.
|
||||
*/
|
||||
#ifdef CONFIG_MMU
|
||||
static inline void unwind_trap(struct task_struct *task, unsigned long pc,
|
||||
unsigned long fp, struct stack_trace *trace,
|
||||
const char *loglvl)
|
||||
{
|
||||
/* To be implemented */
|
||||
}
|
||||
#else
|
||||
static inline void unwind_trap(struct task_struct *task, unsigned long pc,
|
||||
unsigned long fp, struct stack_trace *trace,
|
||||
const char *loglvl)
|
||||
{
|
||||
const struct pt_regs *regs = (const struct pt_regs *) fp;
|
||||
microblaze_unwind_inner(task, regs->pc, regs->r1, regs->r15, trace, loglvl);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* microblaze_unwind_inner - Unwind the stack from the specified point
|
||||
|
|
@ -215,16 +205,7 @@ static void microblaze_unwind_inner(struct task_struct *task,
|
|||
* HW exception handler doesn't save all registers,
|
||||
* so we open-code a special case of unwind_trap()
|
||||
*/
|
||||
#ifndef CONFIG_MMU
|
||||
const struct pt_regs *regs =
|
||||
(const struct pt_regs *) fp;
|
||||
#endif
|
||||
printk("%sHW EXCEPTION\n", loglvl);
|
||||
#ifndef CONFIG_MMU
|
||||
microblaze_unwind_inner(task, regs->r17 - 4,
|
||||
fp + EX_HANDLER_STACK_SIZ,
|
||||
regs->r15, trace, loglvl);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,4 @@
|
|||
# Makefile
|
||||
#
|
||||
|
||||
obj-y := consistent.o init.o
|
||||
|
||||
obj-$(CONFIG_MMU) += pgtable.o mmu_context.o fault.o
|
||||
obj-y := consistent.o init.o pgtable.o mmu_context.o fault.o
|
||||
|
|
|
|||
|
|
@ -21,32 +21,3 @@ void arch_dma_prep_coherent(struct page *page, size_t size)
|
|||
|
||||
flush_dcache_range(paddr, paddr + size);
|
||||
}
|
||||
|
||||
#ifndef CONFIG_MMU
|
||||
/*
|
||||
* Consistent memory allocators. Used for DMA devices that want to share
|
||||
* uncached memory with the processor core. My crufty no-MMU approach is
|
||||
* simple. In the HW platform we can optionally mirror the DDR up above the
|
||||
* processor cacheable region. So, memory accessed in this mirror region will
|
||||
* not be cached. It's alloced from the same pool as normal memory, but the
|
||||
* handle we return is shifted up into the uncached region. This will no doubt
|
||||
* cause big problems if memory allocated here is not also freed properly. -- JW
|
||||
*
|
||||
* I have to use dcache values because I can't relate on ram size:
|
||||
*/
|
||||
#ifdef CONFIG_XILINX_UNCACHED_SHADOW
|
||||
#define UNCACHED_SHADOW_MASK (cpuinfo.dcache_high - cpuinfo.dcache_base + 1)
|
||||
#else
|
||||
#define UNCACHED_SHADOW_MASK 0
|
||||
#endif /* CONFIG_XILINX_UNCACHED_SHADOW */
|
||||
|
||||
void *arch_dma_set_uncached(void *ptr, size_t size)
|
||||
{
|
||||
unsigned long addr = (unsigned long)ptr;
|
||||
|
||||
addr |= UNCACHED_SHADOW_MASK;
|
||||
if (addr > cpuinfo.dcache_base && addr < cpuinfo.dcache_high)
|
||||
pr_warn("ERROR: Your cache coherent area is CACHED!!!\n");
|
||||
return (void *)addr;
|
||||
}
|
||||
#endif /* CONFIG_MMU */
|
||||
|
|
|
|||
|
|
@ -29,11 +29,6 @@
|
|||
/* Use for MMU and noMMU because of PCI generic code */
|
||||
int mem_init_done;
|
||||
|
||||
#ifndef CONFIG_MMU
|
||||
unsigned int __page_offset;
|
||||
EXPORT_SYMBOL(__page_offset);
|
||||
#endif /* CONFIG_MMU */
|
||||
|
||||
char *klimit = _end;
|
||||
|
||||
/*
|
||||
|
|
@ -77,13 +72,11 @@ static void highmem_setup(void)
|
|||
static void __init paging_init(void)
|
||||
{
|
||||
unsigned long zones_size[MAX_NR_ZONES];
|
||||
#ifdef CONFIG_MMU
|
||||
int idx;
|
||||
|
||||
/* Setup fixmaps */
|
||||
for (idx = 0; idx < __end_of_fixed_addresses; idx++)
|
||||
clear_fixmap(idx);
|
||||
#endif
|
||||
|
||||
/* Clean every zones */
|
||||
memset(zones_size, 0, sizeof(zones_size));
|
||||
|
|
@ -103,40 +96,6 @@ static void __init paging_init(void)
|
|||
|
||||
void __init setup_memory(void)
|
||||
{
|
||||
#ifndef CONFIG_MMU
|
||||
u32 kernel_align_start, kernel_align_size;
|
||||
phys_addr_t start, end;
|
||||
u64 i;
|
||||
|
||||
/* Find main memory where is the kernel */
|
||||
for_each_mem_range(i, &start, &end) {
|
||||
memory_start = start;
|
||||
lowmem_size = end - start;
|
||||
if ((memory_start <= (u32)_text) &&
|
||||
((u32)_text <= (memory_start + lowmem_size - 1))) {
|
||||
memory_size = lowmem_size;
|
||||
PAGE_OFFSET = memory_start;
|
||||
pr_info("%s: Main mem: 0x%x, size 0x%08x\n",
|
||||
__func__, (u32) memory_start,
|
||||
(u32) memory_size);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!memory_start || !memory_size) {
|
||||
panic("%s: Missing memory setting 0x%08x, size=0x%08x\n",
|
||||
__func__, (u32) memory_start, (u32) memory_size);
|
||||
}
|
||||
|
||||
/* reservation of region where is the kernel */
|
||||
kernel_align_start = PAGE_DOWN((u32)_text);
|
||||
/* ALIGN can be remove because _end in vmlinux.lds.S is align */
|
||||
kernel_align_size = PAGE_UP((u32)klimit) - kernel_align_start;
|
||||
pr_info("%s: kernel addr:0x%08x-0x%08x size=0x%08x\n",
|
||||
__func__, kernel_align_start, kernel_align_start
|
||||
+ kernel_align_size, kernel_align_size);
|
||||
memblock_reserve(kernel_align_start, kernel_align_size);
|
||||
#endif
|
||||
/*
|
||||
* Kernel:
|
||||
* start: base phys address of kernel - page align
|
||||
|
|
@ -176,12 +135,6 @@ void __init mem_init(void)
|
|||
mem_init_done = 1;
|
||||
}
|
||||
|
||||
#ifndef CONFIG_MMU
|
||||
int page_is_ram(unsigned long pfn)
|
||||
{
|
||||
return __range_ok(pfn, 0);
|
||||
}
|
||||
#else
|
||||
int page_is_ram(unsigned long pfn)
|
||||
{
|
||||
return pfn < max_low_pfn;
|
||||
|
|
@ -325,8 +278,6 @@ void __init *early_get_page(void)
|
|||
NUMA_NO_NODE);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_MMU */
|
||||
|
||||
void * __ref zalloc_maybe_bootmem(size_t size, gfp_t mask)
|
||||
{
|
||||
void *p;
|
||||
|
|
|
|||
|
|
@ -325,12 +325,10 @@ int pci_mmap_legacy_page_range(struct pci_bus *bus,
|
|||
* memory, effectively behaving just like /dev/zero
|
||||
*/
|
||||
if ((offset + size) > hose->isa_mem_size) {
|
||||
#ifdef CONFIG_MMU
|
||||
pr_debug("Process %s (pid:%d) mapped non-existing PCI",
|
||||
current->comm, current->pid);
|
||||
pr_debug("legacy memory for 0%04x:%02x\n",
|
||||
pci_domain_nr(bus), bus->number);
|
||||
#endif
|
||||
if (vma->vm_flags & VM_SHARED)
|
||||
return shmem_zero_setup(vma);
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ config MIPS
|
|||
select ARCH_HAS_PTE_SPECIAL if !(32BIT && CPU_HAS_RIXI)
|
||||
select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
|
||||
select ARCH_HAS_UBSAN_SANITIZE_ALL
|
||||
select ARCH_HAS_GCOV_PROFILE_ALL
|
||||
select ARCH_KEEP_MEMBLOCK if DEBUG_KERNEL
|
||||
select ARCH_SUPPORTS_UPROBES
|
||||
select ARCH_USE_BUILTIN_BSWAP
|
||||
select ARCH_USE_CMPXCHG_LOCKREF if 64BIT
|
||||
|
|
@ -248,6 +250,7 @@ config ATH79
|
|||
|
||||
config BMIPS_GENERIC
|
||||
bool "Broadcom Generic BMIPS kernel"
|
||||
select ARCH_HAS_RESET_CONTROLLER
|
||||
select ARCH_HAS_SYNC_DMA_FOR_CPU_ALL
|
||||
select ARCH_HAS_PHYS_TO_DMA
|
||||
select BOOT_RAW
|
||||
|
|
@ -486,6 +489,7 @@ config MACH_LOONGSON64
|
|||
select SYS_SUPPORTS_HIGHMEM
|
||||
select SYS_SUPPORTS_LITTLE_ENDIAN
|
||||
select SYS_SUPPORTS_ZBOOT
|
||||
select SYS_SUPPORTS_RELOCATABLE
|
||||
select ZONE_DMA32
|
||||
select NUMA
|
||||
select SMP
|
||||
|
|
@ -2484,6 +2488,7 @@ config MIPS_CPS
|
|||
select SYS_SUPPORTS_SCHED_SMT if CPU_MIPSR6
|
||||
select SYS_SUPPORTS_SMP
|
||||
select WEAK_ORDERING
|
||||
select GENERIC_IRQ_MIGRATION if HOTPLUG_CPU
|
||||
help
|
||||
Select this if you wish to run an SMP kernel across multiple cores
|
||||
within a MIPS Coherent Processing System. When this option is
|
||||
|
|
@ -2644,7 +2649,7 @@ config WAR_R4600_V1_INDEX_ICACHEOP
|
|||
# 18. The CACHE instructions Hit_Writeback_Invalidate_D, Hit_Writeback_D,
|
||||
# Hit_Invalidate_D and Create_Dirty_Excl_D should only be
|
||||
# executed if there is no other dcache activity. If the dcache is
|
||||
# accessed for another instruction immeidately preceding when these
|
||||
# accessed for another instruction immediately preceding when these
|
||||
# cache instructions are executing, it is possible that the dcache
|
||||
# tag match outputs used by these cache instructions will be
|
||||
# incorrect. These cache instructions should be preceded by at least
|
||||
|
|
@ -2777,7 +2782,8 @@ config RELOCATABLE
|
|||
depends on CPU_MIPS32_R2 || CPU_MIPS64_R2 || \
|
||||
CPU_MIPS32_R5 || CPU_MIPS64_R5 || \
|
||||
CPU_MIPS32_R6 || CPU_MIPS64_R6 || \
|
||||
CPU_P5600 || CAVIUM_OCTEON_SOC
|
||||
CPU_P5600 || CAVIUM_OCTEON_SOC || \
|
||||
CPU_LOONGSON64
|
||||
help
|
||||
This builds a kernel image that retains relocation information
|
||||
so it can be loaded someplace besides the default 1MB.
|
||||
|
|
@ -2788,6 +2794,7 @@ config RELOCATION_TABLE_SIZE
|
|||
hex "Relocation table size"
|
||||
depends on RELOCATABLE
|
||||
range 0x0 0x01000000
|
||||
default "0x00200000" if CPU_LOONGSON64
|
||||
default "0x00100000"
|
||||
help
|
||||
A table of relocation data will be appended to the kernel binary
|
||||
|
|
@ -3086,7 +3093,7 @@ config MIPS_O32_FP64_SUPPORT
|
|||
|
||||
Although binutils currently supports use of this flag the details
|
||||
concerning its effect upon the O32 ABI in userland are still being
|
||||
worked on. In order to avoid userland becoming dependant upon current
|
||||
worked on. In order to avoid userland becoming dependent upon current
|
||||
behaviour before the details have been finalised, this option should
|
||||
be considered experimental and only enabled by those working upon
|
||||
said details.
|
||||
|
|
@ -3124,7 +3131,7 @@ choice
|
|||
|
||||
objcopy --update-section .appended_dtb=<filename>.dtb vmlinux
|
||||
|
||||
This is meant as a backward compatiblity convenience for those
|
||||
This is meant as a backward compatibility convenience for those
|
||||
systems with a bootloader that can't be upgraded to accommodate
|
||||
the documented boot protocol using a device tree.
|
||||
|
||||
|
|
|
|||
|
|
@ -347,6 +347,7 @@ bootz-y += vmlinuz.srec
|
|||
ifeq ($(shell expr $(zload-y) \< 0xffffffff80000000 2> /dev/null), 0)
|
||||
bootz-y += uzImage.bin
|
||||
endif
|
||||
bootz-y += vmlinuz.itb
|
||||
|
||||
#
|
||||
# Some machines like the Indy need 32-bit ELF binaries for booting purposes.
|
||||
|
|
@ -378,7 +379,7 @@ ifdef CONFIG_SYS_SUPPORTS_ZBOOT
|
|||
# boot/compressed
|
||||
$(bootz-y): $(vmlinux-32) FORCE
|
||||
$(Q)$(MAKE) $(build)=arch/mips/boot/compressed \
|
||||
$(bootvars-y) 32bit-bfd=$(32bit-bfd) $@
|
||||
$(bootvars-y) 32bit-bfd=$(32bit-bfd) arch/mips/boot/$@
|
||||
else
|
||||
vmlinuz: FORCE
|
||||
@echo ' CONFIG_SYS_SUPPORTS_ZBOOT is not enabled'
|
||||
|
|
|
|||
|
|
@ -319,6 +319,7 @@ int __init ar7_gpio_init(void)
|
|||
if (ret) {
|
||||
printk(KERN_ERR "%s: failed to add gpiochip\n",
|
||||
gpch->chip.label);
|
||||
iounmap(gpch->regs);
|
||||
return ret;
|
||||
}
|
||||
printk(KERN_INFO "%s: registered %d GPIOs\n",
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ config BCM47XX_SSB
|
|||
select SSB_DRIVER_MIPS
|
||||
select SSB_DRIVER_EXTIF
|
||||
select SSB_EMBEDDED
|
||||
select SSB_PCIHOST if PCI
|
||||
select SSB_B43_PCI_BRIDGE if PCI
|
||||
select SSB_DRIVER_PCICORE if PCI
|
||||
select SSB_PCICORE_HOSTMODE if PCI
|
||||
|
|
@ -27,6 +28,7 @@ config BCM47XX_BCMA
|
|||
select BCMA
|
||||
select BCMA_HOST_SOC
|
||||
select BCMA_DRIVER_MIPS
|
||||
select BCMA_DRIVER_PCI if PCI
|
||||
select BCMA_DRIVER_PCI_HOSTMODE if PCI
|
||||
select BCMA_DRIVER_GPIO
|
||||
default y
|
||||
|
|
|
|||
1
arch/mips/boot/.gitignore
vendored
1
arch/mips/boot/.gitignore
vendored
|
|
@ -2,6 +2,7 @@
|
|||
mkboot
|
||||
elf2ecoff
|
||||
vmlinux.*
|
||||
vmlinuz.*
|
||||
zImage
|
||||
zImage.tmp
|
||||
calc_vmlinuz_load_addr
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ KBUILD_AFLAGS := $(KBUILD_AFLAGS) -D__ASSEMBLY__ \
|
|||
|
||||
# Prevents link failures: __sanitizer_cov_trace_pc() is not linked in.
|
||||
KCOV_INSTRUMENT := n
|
||||
GCOV_PROFILE := n
|
||||
|
||||
# decompressor objects (linked with vmlinuz)
|
||||
vmlinuzobjs-y := $(obj)/head.o $(obj)/decompress.o $(obj)/string.o
|
||||
|
|
@ -65,7 +66,9 @@ $(obj)/bswapsi.c: $(obj)/%.c: $(srctree)/arch/mips/lib/%.c FORCE
|
|||
targets := $(notdir $(vmlinuzobjs-y))
|
||||
|
||||
targets += vmlinux.bin
|
||||
|
||||
OBJCOPYFLAGS_vmlinux.bin := $(OBJCOPYFLAGS) -O binary -R .comment -S
|
||||
|
||||
$(obj)/vmlinux.bin: $(KBUILD_IMAGE) FORCE
|
||||
$(call if_changed,objcopy)
|
||||
|
||||
|
|
@ -78,12 +81,15 @@ tool_$(CONFIG_KERNEL_XZ) = xzkern
|
|||
tool_$(CONFIG_KERNEL_ZSTD) = zstd22
|
||||
|
||||
targets += vmlinux.bin.z
|
||||
|
||||
$(obj)/vmlinux.bin.z: $(obj)/vmlinux.bin FORCE
|
||||
$(call if_changed,$(tool_y))
|
||||
|
||||
targets += piggy.o dummy.o
|
||||
|
||||
OBJCOPYFLAGS_piggy.o := --add-section=.image=$(obj)/vmlinux.bin.z \
|
||||
--set-section-flags=.image=contents,alloc,load,readonly,data
|
||||
|
||||
$(obj)/piggy.o: $(obj)/dummy.o $(obj)/vmlinux.bin.z FORCE
|
||||
$(call if_changed,objcopy)
|
||||
|
||||
|
|
@ -102,14 +108,21 @@ UIMAGE_LOADADDR = $(VMLINUZ_LOAD_ADDRESS)
|
|||
|
||||
vmlinuzobjs-y += $(obj)/piggy.o
|
||||
|
||||
targets += ../../../../vmlinuz
|
||||
|
||||
quiet_cmd_zld = LD $@
|
||||
cmd_zld = $(LD) $(KBUILD_LDFLAGS) -Ttext $(VMLINUZ_LOAD_ADDRESS) -T $< $(vmlinuzobjs-y) -o $@
|
||||
quiet_cmd_strip = STRIP $@
|
||||
quiet_cmd_strip = STRIP $@
|
||||
cmd_strip = $(STRIP) -s $@
|
||||
vmlinuz: $(src)/ld.script $(vmlinuzobjs-y) $(obj)/calc_vmlinuz_load_addr
|
||||
|
||||
$(objtree)/vmlinuz: $(src)/ld.script $(vmlinuzobjs-y) $(obj)/calc_vmlinuz_load_addr
|
||||
$(call cmd,zld)
|
||||
$(call cmd,strip)
|
||||
|
||||
objboot := $(objtree)/arch/mips/boot
|
||||
|
||||
$(objboot)/vmlinuz: $(objtree)/vmlinuz FORCE
|
||||
|
||||
#
|
||||
# Some DECstations need all possible sections of an ECOFF executable
|
||||
#
|
||||
|
|
@ -121,34 +134,90 @@ endif
|
|||
hostprogs += ../elf2ecoff
|
||||
|
||||
ifdef CONFIG_32BIT
|
||||
VMLINUZ = vmlinuz
|
||||
VMLINUZ = $(objtree)/vmlinuz
|
||||
else
|
||||
VMLINUZ = vmlinuz.32
|
||||
VMLINUZ = $(objboot)/vmlinuz.32
|
||||
endif
|
||||
|
||||
targets += ../vmlinuz.32
|
||||
|
||||
quiet_cmd_32 = OBJCOPY $@
|
||||
cmd_32 = $(OBJCOPY) -O $(32bit-bfd) $(OBJCOPYFLAGS) $< $@
|
||||
vmlinuz.32: vmlinuz
|
||||
|
||||
$(objboot)/vmlinuz.32: $(objtree)/vmlinuz
|
||||
$(call cmd,32)
|
||||
|
||||
targets += ../vmlinuz.ecoff
|
||||
|
||||
quiet_cmd_ecoff = ECOFF $@
|
||||
cmd_ecoff = $< $(VMLINUZ) $@ $(e2eflag)
|
||||
vmlinuz.ecoff: $(obj)/../elf2ecoff $(VMLINUZ)
|
||||
|
||||
$(objboot)/vmlinuz.ecoff: $(objboot)/elf2ecoff $(VMLINUZ)
|
||||
$(call cmd,ecoff)
|
||||
|
||||
targets += ../vmlinuz.bin
|
||||
|
||||
OBJCOPYFLAGS_vmlinuz.bin := $(OBJCOPYFLAGS) -O binary
|
||||
vmlinuz.bin: vmlinuz
|
||||
|
||||
$(objboot)/vmlinuz.bin: $(objtree)/vmlinuz
|
||||
$(call cmd,objcopy)
|
||||
|
||||
targets += ../vmlinuz.srec
|
||||
|
||||
OBJCOPYFLAGS_vmlinuz.srec := $(OBJCOPYFLAGS) -S -O srec
|
||||
vmlinuz.srec: vmlinuz
|
||||
|
||||
$(objboot)/vmlinuz.srec: $(objtree)/vmlinuz
|
||||
$(call cmd,objcopy)
|
||||
|
||||
uzImage.bin: vmlinuz.bin FORCE
|
||||
targets += ../uzImage.bin
|
||||
|
||||
$(objboot)/uzImage.bin: $(objboot)/vmlinuz.bin FORCE
|
||||
$(call if_changed,uimage,none)
|
||||
|
||||
clean-files += $(objtree)/vmlinuz
|
||||
clean-files += $(objtree)/vmlinuz.32
|
||||
clean-files += $(objtree)/vmlinuz.ecoff
|
||||
clean-files += $(objtree)/vmlinuz.bin
|
||||
clean-files += $(objtree)/vmlinuz.srec
|
||||
#
|
||||
# Flattened Image Tree (.itb) image
|
||||
#
|
||||
|
||||
ifeq ($(ADDR_BITS),32)
|
||||
itb_addr_cells = 1
|
||||
endif
|
||||
ifeq ($(ADDR_BITS),64)
|
||||
itb_addr_cells = 2
|
||||
endif
|
||||
|
||||
targets += ../vmlinuz.its.S
|
||||
|
||||
quiet_cmd_its_cat = CAT $@
|
||||
cmd_its_cat = cat $(real-prereqs) >$@
|
||||
|
||||
$(objboot)/vmlinuz.its.S: $(addprefix $(srctree)/arch/mips/$(PLATFORM)/,$(ITS_INPUTS)) FORCE
|
||||
$(call if_changed,its_cat)
|
||||
|
||||
targets += ../vmlinuz.its
|
||||
|
||||
quiet_cmd_cpp_its_S = ITS $@
|
||||
cmd_cpp_its_S = $(CPP) -P -C -o $@ $< \
|
||||
-DKERNEL_NAME="\"Linux $(KERNELRELEASE)\"" \
|
||||
-DVMLINUX_BINARY="\"$(2)\"" \
|
||||
-DVMLINUX_COMPRESSION="\"none\"" \
|
||||
-DVMLINUX_LOAD_ADDRESS=$(VMLINUZ_LOAD_ADDRESS) \
|
||||
-DVMLINUX_ENTRY_ADDRESS=$(VMLINUZ_LOAD_ADDRESS) \
|
||||
-DADDR_BITS=$(ADDR_BITS) \
|
||||
-DADDR_CELLS=$(itb_addr_cells)
|
||||
|
||||
$(objboot)/vmlinuz.its: $(objboot)/vmlinuz.its.S FORCE
|
||||
$(call if_changed,cpp_its_S,vmlinuz.bin)
|
||||
|
||||
targets += ../vmlinuz.itb
|
||||
|
||||
quiet_cmd_itb-image = ITB $@
|
||||
cmd_itb-image = \
|
||||
env PATH="$(objtree)/scripts/dtc:$(PATH)" \
|
||||
$(BASH) $(MKIMAGE) \
|
||||
-D "-I dts -O dtb -p 500 \
|
||||
--include $(objtree)/arch/mips \
|
||||
--warning no-unit_address_vs_reg" \
|
||||
-f $(2) $@
|
||||
|
||||
$(objboot)/vmlinuz.itb: $(objboot)/vmlinuz.its $(objboot)/vmlinuz.bin FORCE
|
||||
$(call if_changed,itb-image,$<)
|
||||
|
|
|
|||
|
|
@ -31,9 +31,12 @@ SECTIONS
|
|||
CONSTRUCTORS
|
||||
. = ALIGN(16);
|
||||
}
|
||||
__appended_dtb = .;
|
||||
/* leave space for appended DTB */
|
||||
. += 0x100000;
|
||||
|
||||
.appended_dtb : {
|
||||
__appended_dtb = .;
|
||||
/* leave space for appended DTB */
|
||||
. += 0x100000;
|
||||
}
|
||||
|
||||
_edata = .;
|
||||
/* End of data section */
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ subdir-$(CONFIG_FIT_IMAGE_FDT_BOSTON) += img
|
|||
subdir-$(CONFIG_MACH_INGENIC) += ingenic
|
||||
subdir-$(CONFIG_LANTIQ) += lantiq
|
||||
subdir-$(CONFIG_MACH_LOONGSON64) += loongson
|
||||
subdir-$(CONFIG_MSCC_OCELOT) += mscc
|
||||
subdir-$(CONFIG_SOC_VCOREIII) += mscc
|
||||
subdir-$(CONFIG_MIPS_MALTA) += mti
|
||||
subdir-$(CONFIG_LEGACY_BOARD_SEAD3) += mti
|
||||
subdir-$(CONFIG_NLM_XLP_BOARD) += netlogic
|
||||
|
|
|
|||
|
|
@ -70,6 +70,12 @@ reboot: syscon-reboot@10000008 {
|
|||
mask = <0x1>;
|
||||
};
|
||||
|
||||
periph_rst: reset-controller@10000010 {
|
||||
compatible = "brcm,bcm6345-reset";
|
||||
reg = <0x10000010 0x4>;
|
||||
#reset-cells = <1>;
|
||||
};
|
||||
|
||||
periph_intc: interrupt-controller@10000020 {
|
||||
compatible = "brcm,bcm6345-l1-intc";
|
||||
reg = <0x10000020 0x20>,
|
||||
|
|
|
|||
|
|
@ -57,6 +57,12 @@ clkctl: clock-controller@10000004 {
|
|||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
periph_rst: reset-controller@10000010 {
|
||||
compatible = "brcm,bcm6345-reset";
|
||||
reg = <0x10000010 0x4>;
|
||||
#reset-cells = <1>;
|
||||
};
|
||||
|
||||
periph_intc: interrupt-controller@10000020 {
|
||||
compatible = "brcm,bcm6345-l1-intc";
|
||||
reg = <0x10000020 0x10>,
|
||||
|
|
|
|||
|
|
@ -82,6 +82,12 @@ periph_intc: interrupt-controller@fffe000c {
|
|||
interrupts = <2>, <3>;
|
||||
};
|
||||
|
||||
periph_rst: reset-controller@fffe0034 {
|
||||
compatible = "brcm,bcm6345-reset";
|
||||
reg = <0xfffe0034 0x4>;
|
||||
#reset-cells = <1>;
|
||||
};
|
||||
|
||||
leds0: led-controller@fffe00d0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
|
|
|||
|
|
@ -70,6 +70,12 @@ reboot: syscon-reboot@10000008 {
|
|||
mask = <0x1>;
|
||||
};
|
||||
|
||||
periph_rst: reset-controller@10000010 {
|
||||
compatible = "brcm,bcm6345-reset";
|
||||
reg = <0x10000010 0x4>;
|
||||
#reset-cells = <1>;
|
||||
};
|
||||
|
||||
periph_intc: interrupt-controller@10000020 {
|
||||
compatible = "brcm,bcm6345-l1-intc";
|
||||
reg = <0x10000020 0x10>,
|
||||
|
|
|
|||
|
|
@ -70,6 +70,12 @@ reboot: syscon-reboot@10000008 {
|
|||
mask = <0x1>;
|
||||
};
|
||||
|
||||
periph_rst: reset-controller@10000010 {
|
||||
compatible = "brcm,bcm6345-reset";
|
||||
reg = <0x10000010 0x4>;
|
||||
#reset-cells = <1>;
|
||||
};
|
||||
|
||||
periph_intc: interrupt-controller@10000020 {
|
||||
compatible = "brcm,bcm6345-l1-intc";
|
||||
reg = <0x10000020 0x10>,
|
||||
|
|
|
|||
|
|
@ -46,9 +46,10 @@ internal_dac_supply: internal-dac-supply {
|
|||
regulator-max-microvolt = <1800000>;
|
||||
};
|
||||
|
||||
leds {
|
||||
led-controller {
|
||||
compatible = "pwm-leds";
|
||||
heartbeat {
|
||||
|
||||
led-1 {
|
||||
label = "marduk:red:heartbeat";
|
||||
pwms = <&pwm 3 300000>;
|
||||
max-brightness = <255>;
|
||||
|
|
|
|||
|
|
@ -69,9 +69,11 @@ led3 {
|
|||
|
||||
eth0_power: fixedregulator@0 {
|
||||
compatible = "regulator-fixed";
|
||||
|
||||
regulator-name = "eth0_power";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
|
||||
gpio = <&gpb 25 GPIO_ACTIVE_LOW>;
|
||||
enable-active-high;
|
||||
};
|
||||
|
|
@ -83,16 +85,39 @@ ir: ir {
|
|||
|
||||
wlan0_power: fixedregulator@1 {
|
||||
compatible = "regulator-fixed";
|
||||
|
||||
regulator-name = "wlan0_power";
|
||||
|
||||
gpio = <&gpb 19 GPIO_ACTIVE_LOW>;
|
||||
enable-active-high;
|
||||
};
|
||||
|
||||
otg_power: fixedregulator@2 {
|
||||
compatible = "regulator-fixed";
|
||||
|
||||
regulator-name = "otg_power";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
|
||||
gpio = <&gpf 14 GPIO_ACTIVE_LOW>;
|
||||
enable-active-high;
|
||||
};
|
||||
};
|
||||
|
||||
&ext {
|
||||
clock-frequency = <48000000>;
|
||||
};
|
||||
|
||||
&cgu {
|
||||
/*
|
||||
* Use the 32.768 kHz oscillator as the parent of the RTC for a higher
|
||||
* precision.
|
||||
*/
|
||||
assigned-clocks = <&cgu JZ4780_CLK_OTGPHY>, <&cgu JZ4780_CLK_RTC>;
|
||||
assigned-clock-parents = <0>, <&cgu JZ4780_CLK_RTCLK>;
|
||||
assigned-clock-rates = <48000000>;
|
||||
};
|
||||
|
||||
&mmc0 {
|
||||
status = "okay";
|
||||
|
||||
|
|
@ -396,6 +421,16 @@ &bch {
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&otg_phy {
|
||||
status = "okay";
|
||||
|
||||
vcc-supply = <&otg_power>;
|
||||
};
|
||||
|
||||
&otg {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
pins_uart0: uart0 {
|
||||
function = "uart0";
|
||||
|
|
@ -489,7 +524,11 @@ pins_mmc1: mmc1 {
|
|||
};
|
||||
|
||||
&tcu {
|
||||
/* 3 MHz for the system timer and clocksource */
|
||||
assigned-clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER1>;
|
||||
assigned-clock-rates = <3000000>, <3000000>;
|
||||
/*
|
||||
* 750 kHz for the system timer and 3 MHz for the clocksource,
|
||||
* use channel #0 for the system timer, #1 for the clocksource.
|
||||
*/
|
||||
assigned-clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER1>,
|
||||
<&tcu TCU_CLK_OST>;
|
||||
assigned-clock-rates = <750000>, <3000000>, <3000000>;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "x1000.dtsi"
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/clock/ingenic,tcu.h>
|
||||
#include <dt-bindings/clock/ingenic,sysost.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
/ {
|
||||
|
|
@ -31,6 +31,42 @@ led-0 {
|
|||
};
|
||||
};
|
||||
|
||||
ssi: spi-gpio {
|
||||
compatible = "spi-gpio";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
num-chipselects = <1>;
|
||||
|
||||
mosi-gpios = <&gpd 2 GPIO_ACTIVE_HIGH>;
|
||||
miso-gpios = <&gpd 3 GPIO_ACTIVE_HIGH>;
|
||||
sck-gpios = <&gpd 0 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&gpd 1 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
status = "okay";
|
||||
|
||||
spi-max-frequency = <50000000>;
|
||||
|
||||
sc16is752: expander@0 {
|
||||
compatible = "nxp,sc16is752";
|
||||
reg = <0>; /* CE0 */
|
||||
spi-max-frequency = <4000000>;
|
||||
|
||||
clocks = <&exclk_sc16is752>;
|
||||
|
||||
interrupt-parent = <&gpc>;
|
||||
interrupts = <6 IRQ_TYPE_EDGE_FALLING>;
|
||||
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
|
||||
exclk_sc16is752: sc16is752 {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <48000000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
wlan_pwrseq: msc1-pwrseq {
|
||||
compatible = "mmc-pwrseq-simple";
|
||||
|
||||
|
|
@ -43,13 +79,19 @@ &exclk {
|
|||
clock-frequency = <24000000>;
|
||||
};
|
||||
|
||||
&tcu {
|
||||
/* 1500 kHz for the system timer and clocksource */
|
||||
assigned-clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER2>;
|
||||
assigned-clock-rates = <1500000>, <1500000>;
|
||||
&cgu {
|
||||
/*
|
||||
* Use the 32.768 kHz oscillator as the parent of the RTC for a higher
|
||||
* precision.
|
||||
*/
|
||||
assigned-clocks = <&cgu X1000_CLK_RTC>;
|
||||
assigned-clock-parents = <&cgu X1000_CLK_RTCLK>;
|
||||
};
|
||||
|
||||
/* Use channel #0 for the system timer channel #2 for the clocksource */
|
||||
ingenic,pwm-channels-mask = <0xfa>;
|
||||
&ost {
|
||||
/* 1500 kHz for the system timer and clocksource */
|
||||
assigned-clocks = <&ost OST_CLK_PERCPU_TIMER>, <&ost OST_CLK_GLOBAL_TIMER>;
|
||||
assigned-clock-rates = <1500000>, <1500000>;
|
||||
};
|
||||
|
||||
&uart2 {
|
||||
|
|
@ -135,6 +177,14 @@ lan8720a: ethernet-phy@0 {
|
|||
};
|
||||
};
|
||||
|
||||
&otg_phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&otg {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
pins_uart2: uart2 {
|
||||
function = "uart2";
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "x1830.dtsi"
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/clock/ingenic,tcu.h>
|
||||
#include <dt-bindings/clock/ingenic,sysost.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
/ {
|
||||
|
|
@ -31,6 +31,42 @@ led-0 {
|
|||
};
|
||||
};
|
||||
|
||||
ssi0: spi-gpio {
|
||||
compatible = "spi-gpio";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
num-chipselects = <1>;
|
||||
|
||||
mosi-gpios = <&gpc 12 GPIO_ACTIVE_HIGH>;
|
||||
miso-gpios = <&gpc 11 GPIO_ACTIVE_HIGH>;
|
||||
sck-gpios = <&gpc 15 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&gpc 16 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
status = "okay";
|
||||
|
||||
spi-max-frequency = <50000000>;
|
||||
|
||||
sc16is752: expander@0 {
|
||||
compatible = "nxp,sc16is752";
|
||||
reg = <0>; /* CE0 */
|
||||
spi-max-frequency = <4000000>;
|
||||
|
||||
clocks = <&exclk_sc16is752>;
|
||||
|
||||
interrupt-parent = <&gpb>;
|
||||
interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
|
||||
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
|
||||
exclk_sc16is752: sc16is752 {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <48000000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
wlan_pwrseq: msc1-pwrseq {
|
||||
compatible = "mmc-pwrseq-simple";
|
||||
|
||||
|
|
@ -43,13 +79,19 @@ &exclk {
|
|||
clock-frequency = <24000000>;
|
||||
};
|
||||
|
||||
&tcu {
|
||||
/* 1500 kHz for the system timer and clocksource */
|
||||
assigned-clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER2>;
|
||||
assigned-clock-rates = <1500000>, <1500000>;
|
||||
&cgu {
|
||||
/*
|
||||
* Use the 32.768 kHz oscillator as the parent of the RTC for a higher
|
||||
* precision.
|
||||
*/
|
||||
assigned-clocks = <&cgu X1830_CLK_RTC>;
|
||||
assigned-clock-parents = <&cgu X1830_CLK_RTCLK>;
|
||||
};
|
||||
|
||||
/* Use channel #0 for the system timer channel #2 for the clocksource */
|
||||
ingenic,pwm-channels-mask = <0xfa>;
|
||||
&ost {
|
||||
/* 1500 kHz for the system timer and clocksource */
|
||||
assigned-clocks = <&ost OST_CLK_PERCPU_TIMER>, <&ost OST_CLK_GLOBAL_TIMER>;
|
||||
assigned-clock-rates = <1500000>, <1500000>;
|
||||
};
|
||||
|
||||
&uart1 {
|
||||
|
|
@ -73,6 +115,10 @@ ads7830: adc@48 {
|
|||
};
|
||||
};
|
||||
|
||||
&dtrng {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&msc0 {
|
||||
status = "okay";
|
||||
|
||||
|
|
@ -135,6 +181,14 @@ ip101gr: ethernet-phy@0 {
|
|||
};
|
||||
};
|
||||
|
||||
&otg_phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&otg {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
pins_uart1: uart1 {
|
||||
function = "uart1";
|
||||
|
|
|
|||
|
|
@ -295,7 +295,7 @@ dmac: dma-controller@13020000 {
|
|||
clocks = <&cgu JZ4740_CLK_DMA>;
|
||||
};
|
||||
|
||||
uhc: uhc@13030000 {
|
||||
uhc: usb@13030000 {
|
||||
compatible = "ingenic,jz4740-ohci", "generic-ohci";
|
||||
reg = <0x13030000 0x1000>;
|
||||
|
||||
|
|
|
|||
|
|
@ -430,7 +430,7 @@ dmac1: dma-controller@13420100 {
|
|||
interrupts = <23>;
|
||||
};
|
||||
|
||||
uhc: uhc@13430000 {
|
||||
uhc: usb@13430000 {
|
||||
compatible = "generic-ohci";
|
||||
reg = <0x13430000 0x1000>;
|
||||
|
||||
|
|
|
|||
|
|
@ -61,13 +61,34 @@ rtc: rtc {
|
|||
};
|
||||
|
||||
cgu: jz4780-cgu@10000000 {
|
||||
compatible = "ingenic,jz4780-cgu";
|
||||
compatible = "ingenic,jz4780-cgu", "simple-mfd";
|
||||
reg = <0x10000000 0x100>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0x0 0x10000000 0x100>;
|
||||
|
||||
#clock-cells = <1>;
|
||||
|
||||
clocks = <&ext>, <&rtc>;
|
||||
clock-names = "ext", "rtc";
|
||||
|
||||
#clock-cells = <1>;
|
||||
otg_phy: usb-phy@3c {
|
||||
compatible = "ingenic,jz4780-phy";
|
||||
reg = <0x3c 0x10>;
|
||||
|
||||
clocks = <&cgu JZ4780_CLK_OTG1>;
|
||||
|
||||
#phy-cells = <0>;
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
rng: rng@d8 {
|
||||
compatible = "ingenic,jz4780-rng";
|
||||
reg = <0xd8 0x8>;
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
tcu: timer@10002000 {
|
||||
|
|
@ -494,4 +515,24 @@ bch: bch@134d0000 {
|
|||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
otg: usb@13500000 {
|
||||
compatible = "ingenic,jz4780-otg", "snps,dwc2";
|
||||
reg = <0x13500000 0x40000>;
|
||||
|
||||
interrupt-parent = <&intc>;
|
||||
interrupts = <21>;
|
||||
|
||||
clocks = <&cgu JZ4780_CLK_UHC>;
|
||||
clock-names = "otg";
|
||||
|
||||
phys = <&otg_phy>;
|
||||
phy-names = "usb2-phy";
|
||||
|
||||
g-rx-fifo-size = <768>;
|
||||
g-np-tx-fifo-size = <256>;
|
||||
g-tx-fifo-size = <256 256 256 256 256 256 256 512>;
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -52,13 +52,47 @@ rtclk: rtc {
|
|||
};
|
||||
|
||||
cgu: x1000-cgu@10000000 {
|
||||
compatible = "ingenic,x1000-cgu";
|
||||
compatible = "ingenic,x1000-cgu", "simple-mfd";
|
||||
reg = <0x10000000 0x100>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0x0 0x10000000 0x100>;
|
||||
|
||||
#clock-cells = <1>;
|
||||
|
||||
clocks = <&exclk>, <&rtclk>;
|
||||
clock-names = "ext", "rtc";
|
||||
|
||||
otg_phy: usb-phy@3c {
|
||||
compatible = "ingenic,x1000-phy";
|
||||
reg = <0x3c 0x10>;
|
||||
|
||||
clocks = <&cgu X1000_CLK_OTGPHY>;
|
||||
|
||||
#phy-cells = <0>;
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
rng: rng@d8 {
|
||||
compatible = "ingenic,x1000-rng";
|
||||
reg = <0xd8 0x8>;
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
ost: timer@12000000 {
|
||||
compatible = "ingenic,x1000-ost";
|
||||
reg = <0x12000000 0x3c>;
|
||||
|
||||
#clock-cells = <1>;
|
||||
|
||||
clocks = <&cgu X1000_CLK_OST>;
|
||||
clock-names = "ost";
|
||||
|
||||
interrupt-parent = <&cpuintc>;
|
||||
interrupts = <3>;
|
||||
};
|
||||
|
||||
tcu: timer@10002000 {
|
||||
|
|
@ -323,4 +357,24 @@ mdio: mdio {
|
|||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
otg: usb@13500000 {
|
||||
compatible = "ingenic,x1000-otg", "snps,dwc2";
|
||||
reg = <0x13500000 0x40000>;
|
||||
|
||||
interrupt-parent = <&intc>;
|
||||
interrupts = <21>;
|
||||
|
||||
clocks = <&cgu X1000_CLK_OTG>;
|
||||
clock-names = "otg";
|
||||
|
||||
phys = <&otg_phy>;
|
||||
phy-names = "usb2-phy";
|
||||
|
||||
g-rx-fifo-size = <768>;
|
||||
g-np-tx-fifo-size = <256>;
|
||||
g-tx-fifo-size = <256 256 256 256 256 256 256 512>;
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -52,13 +52,40 @@ rtclk: rtc {
|
|||
};
|
||||
|
||||
cgu: x1830-cgu@10000000 {
|
||||
compatible = "ingenic,x1830-cgu";
|
||||
compatible = "ingenic,x1830-cgu", "simple-mfd";
|
||||
reg = <0x10000000 0x100>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0x0 0x10000000 0x100>;
|
||||
|
||||
#clock-cells = <1>;
|
||||
|
||||
clocks = <&exclk>, <&rtclk>;
|
||||
clock-names = "ext", "rtc";
|
||||
|
||||
otg_phy: usb-phy@3c {
|
||||
compatible = "ingenic,x1830-phy";
|
||||
reg = <0x3c 0x10>;
|
||||
|
||||
clocks = <&cgu X1830_CLK_OTGPHY>;
|
||||
|
||||
#phy-cells = <0>;
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
ost: timer@12000000 {
|
||||
compatible = "ingenic,x1830-ost", "ingenic,x1000-ost";
|
||||
reg = <0x12000000 0x3c>;
|
||||
|
||||
#clock-cells = <1>;
|
||||
|
||||
clocks = <&cgu X1830_CLK_OST>;
|
||||
clock-names = "ost";
|
||||
|
||||
interrupt-parent = <&cpuintc>;
|
||||
interrupts = <4>;
|
||||
};
|
||||
|
||||
tcu: timer@10002000 {
|
||||
|
|
@ -236,6 +263,15 @@ i2c2: i2c-controller@10052000 {
|
|||
status = "disabled";
|
||||
};
|
||||
|
||||
dtrng: trng@10072000 {
|
||||
compatible = "ingenic,x1830-dtrng";
|
||||
reg = <0x10072000 0xc>;
|
||||
|
||||
clocks = <&cgu X1830_CLK_DTRNG>;
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pdma: dma-controller@13420000 {
|
||||
compatible = "ingenic,x1830-dma";
|
||||
reg = <0x13420000 0x400
|
||||
|
|
@ -311,4 +347,24 @@ mdio: mdio {
|
|||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
otg: usb@13500000 {
|
||||
compatible = "ingenic,x1830-otg", "snps,dwc2";
|
||||
reg = <0x13500000 0x40000>;
|
||||
|
||||
interrupt-parent = <&intc>;
|
||||
interrupts = <21>;
|
||||
|
||||
clocks = <&cgu X1830_CLK_OTG>;
|
||||
clock-names = "otg";
|
||||
|
||||
phys = <&otg_phy>;
|
||||
phy-names = "usb2-phy";
|
||||
|
||||
g-rx-fifo-size = <768>;
|
||||
g-np-tx-fifo-size = <256>;
|
||||
g-tx-fifo-size = <256 256 256 256 256 256 256 512>;
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,4 +1,13 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
dtb-$(CONFIG_MSCC_OCELOT) += ocelot_pcb123.dtb ocelot_pcb120.dtb
|
||||
dtb-$(CONFIG_SOC_VCOREIII) += \
|
||||
jaguar2_pcb110.dtb \
|
||||
jaguar2_pcb111.dtb \
|
||||
jaguar2_pcb118.dtb \
|
||||
luton_pcb091.dtb \
|
||||
ocelot_pcb120.dtb \
|
||||
ocelot_pcb123.dtb \
|
||||
serval_pcb105.dtb \
|
||||
serval_pcb106.dtb
|
||||
|
||||
|
||||
obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y))
|
||||
|
|
|
|||
167
arch/mips/boot/dts/mscc/jaguar2.dtsi
Normal file
167
arch/mips/boot/dts/mscc/jaguar2.dtsi
Normal file
|
|
@ -0,0 +1,167 @@
|
|||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
/*
|
||||
* Copyright (c) 2020 Microsemi Corporation
|
||||
*/
|
||||
|
||||
/ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "mscc,jr2";
|
||||
|
||||
aliases {
|
||||
serial0 = &uart0;
|
||||
serial1 = &uart2;
|
||||
gpio0 = &gpio;
|
||||
};
|
||||
|
||||
cpus {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
cpu@0 {
|
||||
compatible = "mips,mips24KEc";
|
||||
device_type = "cpu";
|
||||
clocks = <&cpu_clk>;
|
||||
reg = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
cpuintc: interrupt-controller {
|
||||
#address-cells = <0>;
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-controller;
|
||||
compatible = "mti,cpu-interrupt-controller";
|
||||
};
|
||||
|
||||
cpu_clk: cpu-clock {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <500000000>;
|
||||
};
|
||||
|
||||
ahb_clk: ahb-clk {
|
||||
compatible = "fixed-factor-clock";
|
||||
#clock-cells = <0>;
|
||||
clocks = <&cpu_clk>;
|
||||
clock-div = <2>;
|
||||
clock-mult = <1>;
|
||||
};
|
||||
|
||||
ahb: ahb {
|
||||
compatible = "simple-bus";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges;
|
||||
|
||||
interrupt-parent = <&intc>;
|
||||
|
||||
cpu_ctrl: syscon@70000000 {
|
||||
compatible = "mscc,ocelot-cpu-syscon", "syscon";
|
||||
reg = <0x70000000 0x2c>;
|
||||
};
|
||||
|
||||
intc: interrupt-controller@70000070 {
|
||||
compatible = "mscc,jaguar2-icpu-intr";
|
||||
reg = <0x70000070 0x94>;
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-controller;
|
||||
interrupt-parent = <&cpuintc>;
|
||||
interrupts = <2>;
|
||||
};
|
||||
|
||||
uart0: serial@70100000 {
|
||||
pinctrl-0 = <&uart_pins>;
|
||||
pinctrl-names = "default";
|
||||
compatible = "ns16550a";
|
||||
reg = <0x70100000 0x20>;
|
||||
interrupts = <6>;
|
||||
clocks = <&ahb_clk>;
|
||||
reg-io-width = <4>;
|
||||
reg-shift = <2>;
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uart2: serial@70100800 {
|
||||
pinctrl-0 = <&uart2_pins>;
|
||||
pinctrl-names = "default";
|
||||
compatible = "ns16550a";
|
||||
reg = <0x70100800 0x20>;
|
||||
interrupts = <7>;
|
||||
clocks = <&ahb_clk>;
|
||||
reg-io-width = <4>;
|
||||
reg-shift = <2>;
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpio: pinctrl@71010038 {
|
||||
compatible = "mscc,jaguar2-pinctrl";
|
||||
reg = <0x71010038 0x90>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
gpio-ranges = <&gpio 0 0 64>;
|
||||
|
||||
uart_pins: uart-pins {
|
||||
pins = "GPIO_10", "GPIO_11";
|
||||
function = "uart";
|
||||
};
|
||||
|
||||
uart2_pins: uart2-pins {
|
||||
pins = "GPIO_24", "GPIO_25";
|
||||
function = "uart2";
|
||||
};
|
||||
|
||||
cs1_pins: cs1-pins {
|
||||
pins = "GPIO_16";
|
||||
function = "si";
|
||||
};
|
||||
|
||||
cs2_pins: cs2-pins {
|
||||
pins = "GPIO_17";
|
||||
function = "si";
|
||||
};
|
||||
|
||||
cs3_pins: cs3-pins {
|
||||
pins = "GPIO_18";
|
||||
function = "si";
|
||||
};
|
||||
|
||||
i2c_pins: i2c-pins {
|
||||
pins = "GPIO_14", "GPIO_15";
|
||||
function = "twi";
|
||||
};
|
||||
|
||||
i2c2_pins: i2c2-pins {
|
||||
pins = "GPIO_28", "GPIO_29";
|
||||
function = "twi2";
|
||||
};
|
||||
};
|
||||
|
||||
i2c0: i2c@70100400 {
|
||||
compatible = "mscc,ocelot-i2c", "snps,designware-i2c";
|
||||
status = "disabled";
|
||||
pinctrl-0 = <&i2c_pins>;
|
||||
pinctrl-names = "default";
|
||||
reg = <0x70100400 0x100>, <0x700001b8 0x8>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
interrupts = <8>;
|
||||
clock-frequency = <100000>;
|
||||
clocks = <&ahb_clk>;
|
||||
};
|
||||
|
||||
i2c2: i2c@70100c00 {
|
||||
compatible = "mscc,ocelot-i2c", "snps,designware-i2c";
|
||||
status = "disabled";
|
||||
pinctrl-0 = <&i2c2_pins>;
|
||||
pinctrl-names = "default";
|
||||
reg = <0x70100c00 0x100>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
interrupts = <8>;
|
||||
clock-frequency = <100000>;
|
||||
clocks = <&ahb_clk>;
|
||||
};
|
||||
};
|
||||
};
|
||||
25
arch/mips/boot/dts/mscc/jaguar2_common.dtsi
Normal file
25
arch/mips/boot/dts/mscc/jaguar2_common.dtsi
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
/*
|
||||
* Copyright (c) 2020 Microsemi Corporation
|
||||
*/
|
||||
|
||||
#include "jaguar2.dtsi"
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
status = "okay";
|
||||
i2c-sda-hold-time-ns = <300>;
|
||||
};
|
||||
267
arch/mips/boot/dts/mscc/jaguar2_pcb110.dts
Normal file
267
arch/mips/boot/dts/mscc/jaguar2_pcb110.dts
Normal file
|
|
@ -0,0 +1,267 @@
|
|||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
/*
|
||||
* Copyright (c) 2020 Microsemi Corporation
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include "jaguar2_common.dtsi"
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
|
||||
/ {
|
||||
model = "Jaguar2 Cu8-Sfp16 PCB110 Reference Board";
|
||||
compatible = "mscc,jr2-pcb110", "mscc,jr2";
|
||||
|
||||
aliases {
|
||||
i2c0 = &i2c0;
|
||||
i2c108 = &i2c108;
|
||||
i2c109 = &i2c109;
|
||||
i2c110 = &i2c110;
|
||||
i2c111 = &i2c111;
|
||||
i2c112 = &i2c112;
|
||||
i2c113 = &i2c113;
|
||||
i2c114 = &i2c114;
|
||||
i2c115 = &i2c115;
|
||||
i2c116 = &i2c116;
|
||||
i2c117 = &i2c117;
|
||||
i2c118 = &i2c118;
|
||||
i2c119 = &i2c119;
|
||||
i2c120 = &i2c120;
|
||||
i2c121 = &i2c121;
|
||||
i2c122 = &i2c122;
|
||||
i2c123 = &i2c123;
|
||||
i2c124 = &i2c124;
|
||||
i2c125 = &i2c125;
|
||||
i2c126 = &i2c126;
|
||||
i2c127 = &i2c127;
|
||||
i2c128 = &i2c128;
|
||||
i2c129 = &i2c129;
|
||||
i2c130 = &i2c130;
|
||||
i2c131 = &i2c131;
|
||||
i2c149 = &i2c149;
|
||||
i2c150 = &i2c150;
|
||||
i2c151 = &i2c151;
|
||||
i2c152 = &i2c152;
|
||||
};
|
||||
i2c0_imux: i2c0-imux {
|
||||
compatible = "i2c-mux-pinctrl";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
i2c-parent = <&i2c0>;
|
||||
pinctrl-names =
|
||||
"i2c149", "i2c150", "i2c151", "i2c152", "idle";
|
||||
pinctrl-0 = <&i2cmux_0>;
|
||||
pinctrl-1 = <&i2cmux_1>;
|
||||
pinctrl-2 = <&i2cmux_2>;
|
||||
pinctrl-3 = <&i2cmux_3>;
|
||||
pinctrl-4 = <&i2cmux_pins_i>;
|
||||
i2c149: i2c@0 {
|
||||
reg = <0x0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
i2c150: i2c@1 {
|
||||
reg = <0x1>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
i2c151: i2c@2 {
|
||||
reg = <0x2>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
i2c152: i2c@3 {
|
||||
reg = <0x3>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
};
|
||||
i2c0_emux: i2c0-emux {
|
||||
compatible = "i2c-mux-gpio";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
i2c-parent = <&i2c0>;
|
||||
mux-gpios = <&gpio 51 GPIO_ACTIVE_HIGH
|
||||
&gpio 52 GPIO_ACTIVE_HIGH
|
||||
&gpio 53 GPIO_ACTIVE_HIGH
|
||||
&gpio 58 GPIO_ACTIVE_HIGH
|
||||
&gpio 59 GPIO_ACTIVE_HIGH>;
|
||||
idle-state = <0x0>;
|
||||
i2c108: i2c@10 {
|
||||
reg = <0x10>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
i2c109: i2c@11 {
|
||||
reg = <0x11>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
i2c110: i2c@12 {
|
||||
reg = <0x12>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
i2c111: i2c@13 {
|
||||
reg = <0x13>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
i2c112: i2c@14 {
|
||||
reg = <0x14>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
i2c113: i2c@15 {
|
||||
reg = <0x15>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
i2c114: i2c@16 {
|
||||
reg = <0x16>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
i2c115: i2c@17 {
|
||||
reg = <0x17>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
i2c116: i2c@8 {
|
||||
reg = <0x8>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
i2c117: i2c@9 {
|
||||
reg = <0x9>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
i2c118: i2c@a {
|
||||
reg = <0xa>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
i2c119: i2c@b {
|
||||
reg = <0xb>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
i2c120: i2c@c {
|
||||
reg = <0xc>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
i2c121: i2c@d {
|
||||
reg = <0xd>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
i2c122: i2c@e {
|
||||
reg = <0xe>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
i2c123: i2c@f {
|
||||
reg = <0xf>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gpio {
|
||||
synce_pins: synce-pins {
|
||||
// GPIO 16 == SI_nCS1
|
||||
pins = "GPIO_16";
|
||||
function = "si";
|
||||
};
|
||||
synce_builtin_pins: synce-builtin-pins {
|
||||
// GPIO 49 == SI_nCS13
|
||||
pins = "GPIO_49";
|
||||
function = "si";
|
||||
};
|
||||
i2cmux_pins_i: i2cmux-pins-i {
|
||||
pins = "GPIO_17", "GPIO_18", "GPIO_20", "GPIO_21";
|
||||
function = "twi_scl_m";
|
||||
output-low;
|
||||
};
|
||||
i2cmux_0: i2cmux-0 {
|
||||
pins = "GPIO_17";
|
||||
function = "twi_scl_m";
|
||||
output-high;
|
||||
};
|
||||
i2cmux_1: i2cmux-1 {
|
||||
pins = "GPIO_18";
|
||||
function = "twi_scl_m";
|
||||
output-high;
|
||||
};
|
||||
i2cmux_2: i2cmux-2 {
|
||||
pins = "GPIO_20";
|
||||
function = "twi_scl_m";
|
||||
output-high;
|
||||
};
|
||||
i2cmux_3: i2cmux-3 {
|
||||
pins = "GPIO_21";
|
||||
function = "twi_scl_m";
|
||||
output-high;
|
||||
};
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
pca9545@70 {
|
||||
compatible = "nxp,pca9545";
|
||||
reg = <0x70>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
i2c-mux-idle-disconnect;
|
||||
i2c124: i2c@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0>;
|
||||
};
|
||||
i2c125: i2c@1 {
|
||||
/* FMC B */
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <1>;
|
||||
};
|
||||
i2c126: i2c@2 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <2>;
|
||||
};
|
||||
i2c127: i2c@3 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <3>;
|
||||
};
|
||||
};
|
||||
pca9545@71 {
|
||||
compatible = "nxp,pca9545";
|
||||
reg = <0x71>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
i2c-mux-idle-disconnect;
|
||||
i2c128: i2c@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0>;
|
||||
};
|
||||
i2c129: i2c@1 {
|
||||
/* FMC B */
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <1>;
|
||||
};
|
||||
i2c130: i2c@2 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <2>;
|
||||
};
|
||||
i2c131: i2c@3 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <3>;
|
||||
};
|
||||
};
|
||||
};
|
||||
107
arch/mips/boot/dts/mscc/jaguar2_pcb111.dts
Normal file
107
arch/mips/boot/dts/mscc/jaguar2_pcb111.dts
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
/*
|
||||
* Copyright (c) 2018 Microsemi Corporation
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include "jaguar2_common.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Jaguar2 Cu48 PCB111 Reference Board";
|
||||
compatible = "mscc,jr2-pcb111", "mscc,jr2";
|
||||
|
||||
aliases {
|
||||
i2c0 = &i2c0;
|
||||
i2c149 = &i2c149;
|
||||
i2c150 = &i2c150;
|
||||
i2c151 = &i2c151;
|
||||
i2c152 = &i2c152;
|
||||
i2c203 = &i2c203;
|
||||
};
|
||||
|
||||
i2c0_imux: i2c0-imux {
|
||||
compatible = "i2c-mux-pinctrl";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
i2c-parent = <&i2c0>;
|
||||
pinctrl-names =
|
||||
"i2c149", "i2c150", "i2c151", "i2c152", "i2c203", "idle";
|
||||
pinctrl-0 = <&i2cmux_0>;
|
||||
pinctrl-1 = <&i2cmux_1>;
|
||||
pinctrl-2 = <&i2cmux_2>;
|
||||
pinctrl-3 = <&i2cmux_3>;
|
||||
pinctrl-4 = <&i2cmux_pins_i>; // Added by convention for PoE
|
||||
pinctrl-5 = <&i2cmux_pins_i>;
|
||||
i2c149: i2c@0 {
|
||||
reg = <0x0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
i2c150: i2c@1 {
|
||||
reg = <0x1>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
i2c151: i2c@2 {
|
||||
reg = <0x2>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
i2c152: i2c@3 {
|
||||
reg = <0x3>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
i2c203: i2c@4 {
|
||||
reg = <0x4>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gpio {
|
||||
synce_builtin_pins: synce-builtin-pins {
|
||||
// GPIO 49 == SI_nCS13
|
||||
pins = "GPIO_49";
|
||||
function = "si";
|
||||
};
|
||||
cpld_pins: cpld-pins {
|
||||
// GPIO 50 == SI_nCS14
|
||||
pins = "GPIO_50";
|
||||
function = "si";
|
||||
};
|
||||
cpld_fifo_pins: synce-builtin-pins {
|
||||
// GPIO 51 == SI_nCS15
|
||||
pins = "GPIO_51";
|
||||
function = "si";
|
||||
};
|
||||
};
|
||||
|
||||
&gpio {
|
||||
i2cmux_pins_i: i2cmux-pins-i {
|
||||
pins = "GPIO_17", "GPIO_18";
|
||||
function = "twi_scl_m";
|
||||
output-low;
|
||||
};
|
||||
i2cmux_0: i2cmux-0 {
|
||||
pins = "GPIO_17";
|
||||
function = "twi_scl_m";
|
||||
output-high;
|
||||
};
|
||||
i2cmux_1: i2cmux-1 {
|
||||
pins = "GPIO_18";
|
||||
function = "twi_scl_m";
|
||||
output-high;
|
||||
};
|
||||
i2cmux_2: i2cmux-2 {
|
||||
pins = "GPIO_20";
|
||||
function = "twi_scl_m";
|
||||
output-high;
|
||||
};
|
||||
i2cmux_3: i2cmux-3 {
|
||||
pins = "GPIO_21";
|
||||
function = "twi_scl_m";
|
||||
output-high;
|
||||
};
|
||||
};
|
||||
57
arch/mips/boot/dts/mscc/jaguar2_pcb118.dts
Normal file
57
arch/mips/boot/dts/mscc/jaguar2_pcb118.dts
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
/*
|
||||
* Copyright (c) 2018 Microsemi Corporation
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include "jaguar2_common.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Jaguar2/Aquantia PCB118 Reference Board";
|
||||
compatible = "mscc,jr2-pcb118", "mscc,jr2";
|
||||
|
||||
aliases {
|
||||
i2c150 = &i2c150;
|
||||
i2c151 = &i2c151;
|
||||
};
|
||||
|
||||
i2c0_imux: i2c0-imux {
|
||||
compatible = "i2c-mux-pinctrl";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
i2c-parent = <&i2c0>;
|
||||
pinctrl-names =
|
||||
"i2c150", "i2c151", "idle";
|
||||
pinctrl-0 = <&i2cmux_0>;
|
||||
pinctrl-1 = <&i2cmux_1>;
|
||||
pinctrl-2 = <&i2cmux_pins_i>;
|
||||
i2c150: i2c@0 {
|
||||
reg = <0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
i2c151: i2c@1 {
|
||||
reg = <1>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gpio {
|
||||
i2cmux_pins_i: i2cmux-pins-i {
|
||||
pins = "GPIO_17", "GPIO_16";
|
||||
function = "twi_scl_m";
|
||||
output-low;
|
||||
};
|
||||
i2cmux_0: i2cmux-0 {
|
||||
pins = "GPIO_17";
|
||||
function = "twi_scl_m";
|
||||
output-high;
|
||||
};
|
||||
i2cmux_1: i2cmux-1 {
|
||||
pins = "GPIO_16";
|
||||
function = "twi_scl_m";
|
||||
output-high;
|
||||
};
|
||||
};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user