mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-29 17:25:38 +00:00
Quite a lot of kexec work this time around. Many singleton patches in
many places. The notable patch series are: - nilfs2 folio conversion from Matthew Wilcox in "nilfs2: Folio conversions for file paths". - Additional nilfs2 folio conversion from Ryusuke Konishi in "nilfs2: Folio conversions for directory paths". - IA64 remnant removal in Heiko Carstens's "Remove unused code after IA-64 removal". - Arnd Bergmann has enabled the -Wmissing-prototypes warning everywhere in "Treewide: enable -Wmissing-prototypes". This had some followup fixes: - Nathan Chancellor has cleaned up the hexagon build in the series "hexagon: Fix up instances of -Wmissing-prototypes". - Nathan also addressed some s390 warnings in "s390: A couple of fixes for -Wmissing-prototypes". - Arnd Bergmann addresses the same warnings for MIPS in his series "mips: address -Wmissing-prototypes warnings". - Baoquan He has made kexec_file operate in a top-down-fitting manner similar to kexec_load in the series "kexec_file: Load kernel at top of system RAM if required" - Baoquan He has also added the self-explanatory "kexec_file: print out debugging message if required". - Some checkstack maintenance work from Tiezhu Yang in the series "Modify some code about checkstack". - Douglas Anderson has disentangled the watchdog code's logging when multiple reports are occurring simultaneously. The series is "watchdog: Better handling of concurrent lockups". - Yuntao Wang has contributed some maintenance work on the crash code in "crash: Some cleanups and fixes". -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQTTMBEPP41GrTpTJgfdBJ7gKXxAjgUCZZ2R6AAKCRDdBJ7gKXxA juCVAP4t76qUISDOSKugB/Dn5E4Nt9wvPY9PcufnmD+xoPsgkQD+JVl4+jd9+gAV vl6wkJDiJO5JZ3FVtBtC3DFA/xHtVgk= =kQw+ -----END PGP SIGNATURE----- Merge tag 'mm-nonmm-stable-2024-01-09-10-33' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull non-MM updates from Andrew Morton: "Quite a lot of kexec work this time around. Many singleton patches in many places. The notable patch series are: - nilfs2 folio conversion from Matthew Wilcox in 'nilfs2: Folio conversions for file paths'. - Additional nilfs2 folio conversion from Ryusuke Konishi in 'nilfs2: Folio conversions for directory paths'. - IA64 remnant removal in Heiko Carstens's 'Remove unused code after IA-64 removal'. - Arnd Bergmann has enabled the -Wmissing-prototypes warning everywhere in 'Treewide: enable -Wmissing-prototypes'. This had some followup fixes: - Nathan Chancellor has cleaned up the hexagon build in the series 'hexagon: Fix up instances of -Wmissing-prototypes'. - Nathan also addressed some s390 warnings in 's390: A couple of fixes for -Wmissing-prototypes'. - Arnd Bergmann addresses the same warnings for MIPS in his series 'mips: address -Wmissing-prototypes warnings'. - Baoquan He has made kexec_file operate in a top-down-fitting manner similar to kexec_load in the series 'kexec_file: Load kernel at top of system RAM if required' - Baoquan He has also added the self-explanatory 'kexec_file: print out debugging message if required'. - Some checkstack maintenance work from Tiezhu Yang in the series 'Modify some code about checkstack'. - Douglas Anderson has disentangled the watchdog code's logging when multiple reports are occurring simultaneously. The series is 'watchdog: Better handling of concurrent lockups'. - Yuntao Wang has contributed some maintenance work on the crash code in 'crash: Some cleanups and fixes'" * tag 'mm-nonmm-stable-2024-01-09-10-33' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (157 commits) crash_core: fix and simplify the logic of crash_exclude_mem_range() x86/crash: use SZ_1M macro instead of hardcoded value x86/crash: remove the unused image parameter from prepare_elf_headers() kdump: remove redundant DEFAULT_CRASH_KERNEL_LOW_SIZE scripts/decode_stacktrace.sh: strip unexpected CR from lines watchdog: if panicking and we dumped everything, don't re-enable dumping watchdog/hardlockup: use printk_cpu_sync_get_irqsave() to serialize reporting watchdog/softlockup: use printk_cpu_sync_get_irqsave() to serialize reporting watchdog/hardlockup: adopt softlockup logic avoiding double-dumps kexec_core: fix the assignment to kimage->control_page x86/kexec: fix incorrect end address passed to kernel_ident_mapping_init() lib/trace_readwrite.c:: replace asm-generic/io with linux/io nilfs2: cpfile: fix some kernel-doc warnings stacktrace: fix kernel-doc typo scripts/checkstack.pl: fix no space expression between sp and offset x86/kexec: fix incorrect argument passed to kexec_dprintk() x86/kexec: use pr_err() instead of kexec_dprintk() when an error occurs nilfs2: add missing set_freezable() for freezable kthread kernel: relay: remove relay_file_splice_read dead code, doesn't work docs: submit-checklist: remove all of "make namespacecheck" ...
This commit is contained in:
commit
9f2a635235
3
CREDITS
3
CREDITS
@ -319,6 +319,9 @@ N: Ohad Ben Cohen
|
||||
E: ohad@wizery.com
|
||||
D: Remote Processor (remoteproc) subsystem
|
||||
D: Remote Processor Messaging (rpmsg) subsystem
|
||||
D: Hardware spinlock (hwspinlock) subsystem
|
||||
D: OMAP hwspinlock driver
|
||||
D: OMAP remoteproc driver
|
||||
|
||||
N: Krzysztof Benedyczak
|
||||
E: golbi@mat.uni.torun.pl
|
||||
|
@ -39,7 +39,7 @@ Note that the standard disclaimer for this subsystem also applies to this
|
||||
document: All of this has been reverse-engineered and may thus be erroneous
|
||||
and/or incomplete.
|
||||
|
||||
All CRCs used in the following are two-byte ``crc_ccitt_false(0xffff, ...)``.
|
||||
All CRCs used in the following are two-byte ``crc_itu_t(0xffff, ...)``.
|
||||
All multi-byte values are little-endian, there is no implicit padding between
|
||||
values.
|
||||
|
||||
|
@ -64,6 +64,66 @@ obtained from this site also.
|
||||
The squashfs-tools development tree is now located on kernel.org
|
||||
git://git.kernel.org/pub/scm/fs/squashfs/squashfs-tools.git
|
||||
|
||||
2.1 Mount options
|
||||
-----------------
|
||||
=================== =========================================================
|
||||
errors=%s Specify whether squashfs errors trigger a kernel panic
|
||||
or not
|
||||
|
||||
========== =============================================
|
||||
continue errors don't trigger a panic (default)
|
||||
panic trigger a panic when errors are encountered,
|
||||
similar to several other filesystems (e.g.
|
||||
btrfs, ext4, f2fs, GFS2, jfs, ntfs, ubifs)
|
||||
|
||||
This allows a kernel dump to be saved,
|
||||
useful for analyzing and debugging the
|
||||
corruption.
|
||||
========== =============================================
|
||||
threads=%s Select the decompression mode or the number of threads
|
||||
|
||||
If SQUASHFS_CHOICE_DECOMP_BY_MOUNT is set:
|
||||
|
||||
========== =============================================
|
||||
single use single-threaded decompression (default)
|
||||
|
||||
Only one block (data or metadata) can be
|
||||
decompressed at any one time. This limits
|
||||
CPU and memory usage to a minimum, but it
|
||||
also gives poor performance on parallel I/O
|
||||
workloads when using multiple CPU machines
|
||||
due to waiting on decompressor availability.
|
||||
multi use up to two parallel decompressors per core
|
||||
|
||||
If you have a parallel I/O workload and your
|
||||
system has enough memory, using this option
|
||||
may improve overall I/O performance. It
|
||||
dynamically allocates decompressors on a
|
||||
demand basis.
|
||||
percpu use a maximum of one decompressor per core
|
||||
|
||||
It uses percpu variables to ensure
|
||||
decompression is load-balanced across the
|
||||
cores.
|
||||
1|2|3|... configure the number of threads used for
|
||||
decompression
|
||||
|
||||
The upper limit is num_online_cpus() * 2.
|
||||
========== =============================================
|
||||
|
||||
If SQUASHFS_CHOICE_DECOMP_BY_MOUNT is **not** set and
|
||||
SQUASHFS_DECOMP_MULTI, SQUASHFS_MOUNT_DECOMP_THREADS are
|
||||
both set:
|
||||
|
||||
========== =============================================
|
||||
2|3|... configure the number of threads used for
|
||||
decompression
|
||||
|
||||
The upper limit is num_online_cpus() * 2.
|
||||
========== =============================================
|
||||
|
||||
=================== =========================================================
|
||||
|
||||
3. Squashfs Filesystem Design
|
||||
-----------------------------
|
||||
|
||||
|
@ -56,8 +56,8 @@ Linux カーネルパッチ投稿者向けチェックリスト
|
||||
|
||||
9: sparseを利用してちゃんとしたコードチェックをしてください。
|
||||
|
||||
10: 'make checkstack' と 'make namespacecheck' を利用し、問題が発見されたら
|
||||
修正してください。'make checkstack' は明示的に問題を示しませんが、どれか
|
||||
10: 'make checkstack' を利用し、問題が発見されたら修正してください。
|
||||
'make checkstack' は明示的に問題を示しませんが、どれか
|
||||
1つの関数が512バイトより大きいスタックを使っていれば、修正すべき候補と
|
||||
なります。
|
||||
|
||||
|
@ -53,8 +53,7 @@ Linux内核补丁提交检查单
|
||||
9) 通过 sparse 清查。
|
||||
(参见 Documentation/translations/zh_CN/dev-tools/sparse.rst )
|
||||
|
||||
10) 使用 ``make checkstack`` 和 ``make namespacecheck`` 并修复他们发现的任何
|
||||
问题。
|
||||
10) 使用 ``make checkstack`` 并修复他们发现的任何问题。
|
||||
|
||||
.. note::
|
||||
|
||||
|
@ -56,8 +56,7 @@ Linux內核補丁提交檢查單
|
||||
9) 通過 sparse 清查。
|
||||
(參見 Documentation/translations/zh_CN/dev-tools/sparse.rst )
|
||||
|
||||
10) 使用 ``make checkstack`` 和 ``make namespacecheck`` 並修復他們發現的任何
|
||||
問題。
|
||||
10) 使用 ``make checkstack`` 並修復他們發現的任何問題。
|
||||
|
||||
.. note::
|
||||
|
||||
|
@ -9283,7 +9283,6 @@ F: drivers/char/hw_random/
|
||||
F: include/linux/hw_random.h
|
||||
|
||||
HARDWARE SPINLOCK CORE
|
||||
M: Ohad Ben-Cohen <ohad@wizery.com>
|
||||
M: Bjorn Andersson <andersson@kernel.org>
|
||||
R: Baolin Wang <baolin.wang7@gmail.com>
|
||||
L: linux-remoteproc@vger.kernel.org
|
||||
@ -15715,9 +15714,8 @@ F: Documentation/devicetree/bindings/gpio/ti,omap-gpio.yaml
|
||||
F: drivers/gpio/gpio-omap.c
|
||||
|
||||
OMAP HARDWARE SPINLOCK SUPPORT
|
||||
M: Ohad Ben-Cohen <ohad@wizery.com>
|
||||
L: linux-omap@vger.kernel.org
|
||||
S: Maintained
|
||||
S: Orphan
|
||||
F: drivers/hwspinlock/omap_hwspinlock.c
|
||||
|
||||
OMAP HS MMC SUPPORT
|
||||
|
6
Makefile
6
Makefile
@ -1576,7 +1576,8 @@ help:
|
||||
echo ' (default: $(INSTALL_HDR_PATH))'; \
|
||||
echo ''
|
||||
@echo 'Static analysers:'
|
||||
@echo ' checkstack - Generate a list of stack hogs'
|
||||
@echo ' checkstack - Generate a list of stack hogs and consider all functions'
|
||||
@echo ' with a stack size larger than MINSTACKSIZE (default: 100)'
|
||||
@echo ' versioncheck - Sanity check on version.h usage'
|
||||
@echo ' includecheck - Check for duplicate included header files'
|
||||
@echo ' export_report - List the usages of all exported symbols'
|
||||
@ -2016,9 +2017,10 @@ CHECKSTACK_ARCH := $(SUBARCH)
|
||||
else
|
||||
CHECKSTACK_ARCH := $(ARCH)
|
||||
endif
|
||||
MINSTACKSIZE ?= 100
|
||||
checkstack:
|
||||
$(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \
|
||||
$(PERL) $(srctree)/scripts/checkstack.pl $(CHECKSTACK_ARCH)
|
||||
$(PERL) $(srctree)/scripts/checkstack.pl $(CHECKSTACK_ARCH) $(MINSTACKSIZE)
|
||||
|
||||
kernelrelease:
|
||||
@$(filechk_kernel.release)
|
||||
|
13
arch/Kconfig
13
arch/Kconfig
@ -301,17 +301,8 @@ config ARCH_HAS_DMA_CLEAR_UNCACHED
|
||||
config ARCH_HAS_CPU_FINALIZE_INIT
|
||||
bool
|
||||
|
||||
# Select if arch init_task must go in the __init_task_data section
|
||||
config ARCH_TASK_STRUCT_ON_STACK
|
||||
bool
|
||||
|
||||
# Select if arch has its private alloc_task_struct() function
|
||||
config ARCH_TASK_STRUCT_ALLOCATOR
|
||||
bool
|
||||
|
||||
config HAVE_ARCH_THREAD_STRUCT_WHITELIST
|
||||
bool
|
||||
depends on !ARCH_TASK_STRUCT_ALLOCATOR
|
||||
help
|
||||
An architecture should select this to provide hardened usercopy
|
||||
knowledge about what region of the thread_struct should be
|
||||
@ -320,10 +311,6 @@ config HAVE_ARCH_THREAD_STRUCT_WHITELIST
|
||||
should be implemented. Without this, the entire thread_struct
|
||||
field in task_struct will be left whitelisted.
|
||||
|
||||
# Select if arch has its private alloc_thread_stack() function
|
||||
config ARCH_THREAD_STACK_ALLOCATOR
|
||||
bool
|
||||
|
||||
# Select if arch wants to size task_struct dynamically via arch_task_struct_size:
|
||||
config ARCH_WANTS_DYNAMIC_TASK_STRUCT
|
||||
bool
|
||||
|
@ -4,7 +4,6 @@
|
||||
#
|
||||
|
||||
asflags-y := $(KBUILD_CFLAGS)
|
||||
ccflags-y := -Werror
|
||||
|
||||
# Many of these routines have implementations tuned for ev6.
|
||||
# Choose them iff we're targeting ev6 specifically.
|
||||
|
@ -3,6 +3,4 @@
|
||||
# Makefile for the linux alpha-specific parts of the memory manager.
|
||||
#
|
||||
|
||||
ccflags-y := -Werror
|
||||
|
||||
obj-y := init.o fault.o
|
||||
|
@ -122,7 +122,7 @@ static void *image_load(struct kimage *image,
|
||||
kernel_segment->memsz -= text_offset;
|
||||
image->start = kernel_segment->mem;
|
||||
|
||||
pr_debug("Loaded kernel at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
|
||||
kexec_dprintk("Loaded kernel at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
|
||||
kernel_segment->mem, kbuf.bufsz,
|
||||
kernel_segment->memsz);
|
||||
|
||||
|
@ -32,26 +32,12 @@
|
||||
static void _kexec_image_info(const char *func, int line,
|
||||
const struct kimage *kimage)
|
||||
{
|
||||
unsigned long i;
|
||||
|
||||
pr_debug("%s:%d:\n", func, line);
|
||||
pr_debug(" kexec kimage info:\n");
|
||||
pr_debug(" type: %d\n", kimage->type);
|
||||
pr_debug(" start: %lx\n", kimage->start);
|
||||
pr_debug(" head: %lx\n", kimage->head);
|
||||
pr_debug(" nr_segments: %lu\n", kimage->nr_segments);
|
||||
pr_debug(" dtb_mem: %pa\n", &kimage->arch.dtb_mem);
|
||||
pr_debug(" kern_reloc: %pa\n", &kimage->arch.kern_reloc);
|
||||
pr_debug(" el2_vectors: %pa\n", &kimage->arch.el2_vectors);
|
||||
|
||||
for (i = 0; i < kimage->nr_segments; i++) {
|
||||
pr_debug(" segment[%lu]: %016lx - %016lx, 0x%lx bytes, %lu pages\n",
|
||||
i,
|
||||
kimage->segment[i].mem,
|
||||
kimage->segment[i].mem + kimage->segment[i].memsz,
|
||||
kimage->segment[i].memsz,
|
||||
kimage->segment[i].memsz / PAGE_SIZE);
|
||||
}
|
||||
kexec_dprintk("%s:%d:\n", func, line);
|
||||
kexec_dprintk(" kexec kimage info:\n");
|
||||
kexec_dprintk(" type: %d\n", kimage->type);
|
||||
kexec_dprintk(" head: %lx\n", kimage->head);
|
||||
kexec_dprintk(" kern_reloc: %pa\n", &kimage->arch.kern_reloc);
|
||||
kexec_dprintk(" el2_vectors: %pa\n", &kimage->arch.el2_vectors);
|
||||
}
|
||||
|
||||
void machine_kexec_cleanup(struct kimage *kimage)
|
||||
|
@ -127,7 +127,7 @@ int load_other_segments(struct kimage *image,
|
||||
image->elf_load_addr = kbuf.mem;
|
||||
image->elf_headers_sz = headers_sz;
|
||||
|
||||
pr_debug("Loaded elf core header at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
|
||||
kexec_dprintk("Loaded elf core header at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
|
||||
image->elf_load_addr, kbuf.bufsz, kbuf.memsz);
|
||||
}
|
||||
|
||||
@ -148,7 +148,7 @@ int load_other_segments(struct kimage *image,
|
||||
goto out_err;
|
||||
initrd_load_addr = kbuf.mem;
|
||||
|
||||
pr_debug("Loaded initrd at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
|
||||
kexec_dprintk("Loaded initrd at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
|
||||
initrd_load_addr, kbuf.bufsz, kbuf.memsz);
|
||||
}
|
||||
|
||||
@ -179,7 +179,7 @@ int load_other_segments(struct kimage *image,
|
||||
image->arch.dtb = dtb;
|
||||
image->arch.dtb_mem = kbuf.mem;
|
||||
|
||||
pr_debug("Loaded dtb at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
|
||||
kexec_dprintk("Loaded dtb at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
|
||||
kbuf.mem, kbuf.bufsz, kbuf.memsz);
|
||||
|
||||
return 0;
|
||||
|
@ -20,4 +20,7 @@
|
||||
|
||||
#include <asm-generic/irq.h>
|
||||
|
||||
struct pt_regs;
|
||||
void arch_do_IRQ(struct pt_regs *);
|
||||
|
||||
#endif
|
||||
|
@ -5,6 +5,7 @@
|
||||
* Copyright (c) 2010-2012, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/cpu.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/sched/debug.h>
|
||||
#include <linux/sched/task.h>
|
||||
@ -152,6 +153,7 @@ unsigned long __get_wchan(struct task_struct *p)
|
||||
* Returns 0 if there's no need to re-check for more work.
|
||||
*/
|
||||
|
||||
int do_work_pending(struct pt_regs *regs, u32 thread_info_flags);
|
||||
int do_work_pending(struct pt_regs *regs, u32 thread_info_flags)
|
||||
{
|
||||
if (!(thread_info_flags & _TIF_WORK_MASK)) {
|
||||
|
@ -3,6 +3,7 @@
|
||||
* Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/reboot.h>
|
||||
#include <linux/smp.h>
|
||||
#include <asm/hexagon_vm.h>
|
||||
|
||||
|
@ -220,7 +220,7 @@ void do_signal(struct pt_regs *regs)
|
||||
* Architecture-specific wrappers for signal-related system calls
|
||||
*/
|
||||
|
||||
asmlinkage int sys_rt_sigreturn(void)
|
||||
SYSCALL_DEFINE0(rt_sigreturn)
|
||||
{
|
||||
struct pt_regs *regs = current_pt_regs();
|
||||
struct rt_sigframe __user *frame;
|
||||
|
@ -79,7 +79,7 @@ void smp_vm_unmask_irq(void *info)
|
||||
* Specifically, first arg is irq, second is the irq_desc.
|
||||
*/
|
||||
|
||||
irqreturn_t handle_ipi(int irq, void *desc)
|
||||
static irqreturn_t handle_ipi(int irq, void *desc)
|
||||
{
|
||||
int cpu = smp_processor_id();
|
||||
struct ipi_data *ipi = &per_cpu(ipi_data, cpu);
|
||||
@ -124,7 +124,7 @@ void __init smp_prepare_boot_cpu(void)
|
||||
* to point to current thread info
|
||||
*/
|
||||
|
||||
void start_secondary(void)
|
||||
static void start_secondary(void)
|
||||
{
|
||||
unsigned long thread_ptr;
|
||||
unsigned int cpu, irq;
|
||||
|
@ -17,7 +17,9 @@
|
||||
#include <linux/of_irq.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
#include <asm/delay.h>
|
||||
#include <asm/hexagon_vm.h>
|
||||
#include <asm/time.h>
|
||||
|
||||
#define TIMER_ENABLE BIT(0)
|
||||
|
||||
@ -160,7 +162,7 @@ static irqreturn_t timer_interrupt(int irq, void *devid)
|
||||
* This runs just before the delay loop is calibrated, and
|
||||
* is used for delay calibration.
|
||||
*/
|
||||
void __init time_init_deferred(void)
|
||||
static void __init time_init_deferred(void)
|
||||
{
|
||||
struct resource *resource = NULL;
|
||||
struct clock_event_device *ce_dev = &hexagon_clockevent_dev;
|
||||
|
@ -281,6 +281,7 @@ static void cache_error(struct pt_regs *regs)
|
||||
/*
|
||||
* General exception handler
|
||||
*/
|
||||
void do_genex(struct pt_regs *regs);
|
||||
void do_genex(struct pt_regs *regs)
|
||||
{
|
||||
/*
|
||||
@ -331,13 +332,7 @@ void do_genex(struct pt_regs *regs)
|
||||
}
|
||||
}
|
||||
|
||||
/* Indirect system call dispatch */
|
||||
long sys_syscall(void)
|
||||
{
|
||||
printk(KERN_ERR "sys_syscall invoked!\n");
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
void do_trap0(struct pt_regs *regs);
|
||||
void do_trap0(struct pt_regs *regs)
|
||||
{
|
||||
syscall_fn syscall;
|
||||
@ -415,6 +410,7 @@ void do_trap0(struct pt_regs *regs)
|
||||
/*
|
||||
* Machine check exception handler
|
||||
*/
|
||||
void do_machcheck(struct pt_regs *regs);
|
||||
void do_machcheck(struct pt_regs *regs)
|
||||
{
|
||||
/* Halt and catch fire */
|
||||
@ -425,6 +421,7 @@ void do_machcheck(struct pt_regs *regs)
|
||||
* Treat this like the old 0xdb trap.
|
||||
*/
|
||||
|
||||
void do_debug_exception(struct pt_regs *regs);
|
||||
void do_debug_exception(struct pt_regs *regs)
|
||||
{
|
||||
regs->hvmer.vmest &= ~HVM_VMEST_CAUSE_MSK;
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/binfmts.h>
|
||||
|
||||
#include <asm/elf.h>
|
||||
#include <asm/vdso.h>
|
||||
|
||||
static struct page *vdso_page;
|
||||
|
@ -73,13 +73,6 @@ void show_regs(struct pt_regs *regs)
|
||||
pt_psp(regs), pt_badva(regs), ints_enabled(regs));
|
||||
}
|
||||
|
||||
void dummy_handler(struct pt_regs *regs)
|
||||
{
|
||||
unsigned int elr = pt_elr(regs);
|
||||
printk(KERN_ERR "Unimplemented handler; ELR=0x%08x\n", elr);
|
||||
}
|
||||
|
||||
|
||||
void arch_do_IRQ(struct pt_regs *regs)
|
||||
{
|
||||
int irq = pt_cause(regs);
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include <linux/highmem.h>
|
||||
#include <asm/tlb.h>
|
||||
#include <asm/sections.h>
|
||||
#include <asm/setup.h>
|
||||
#include <asm/vm_mmu.h>
|
||||
|
||||
/*
|
||||
@ -86,7 +87,7 @@ void sync_icache_dcache(pte_t pte)
|
||||
* In this mode, we only have one pg_data_t
|
||||
* structure: contig_mem_data.
|
||||
*/
|
||||
void __init paging_init(void)
|
||||
static void __init paging_init(void)
|
||||
{
|
||||
unsigned long max_zone_pfn[MAX_NR_ZONES] = {0, };
|
||||
|
||||
|
@ -35,11 +35,3 @@ __kernel_size_t __clear_user_hexagon(void __user *dest, unsigned long count)
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
unsigned long clear_user_hexagon(void __user *dest, unsigned long count)
|
||||
{
|
||||
if (!access_ok(dest, count))
|
||||
return count;
|
||||
else
|
||||
return __clear_user_hexagon(dest, count);
|
||||
}
|
||||
|
@ -12,6 +12,7 @@
|
||||
*/
|
||||
|
||||
#include <asm/traps.h>
|
||||
#include <asm/vm_fault.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/sched/signal.h>
|
||||
@ -33,7 +34,7 @@
|
||||
/*
|
||||
* Canonical page fault handler
|
||||
*/
|
||||
void do_page_fault(unsigned long address, long cause, struct pt_regs *regs)
|
||||
static void do_page_fault(unsigned long address, long cause, struct pt_regs *regs)
|
||||
{
|
||||
struct vm_area_struct *vma;
|
||||
struct mm_struct *mm = current->mm;
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include <linux/sched.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/hexagon_vm.h>
|
||||
#include <asm/tlbflush.h>
|
||||
|
||||
/*
|
||||
* Initial VM implementation has only one map active at a time, with
|
||||
|
@ -1,10 +1,4 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Fail on warnings - also for files referenced in subdirs
|
||||
# -Werror can be disabled for specific files using:
|
||||
# CFLAGS_<file.o> := -Wno-error
|
||||
ifeq ($(W),)
|
||||
subdir-ccflags-y := -Werror
|
||||
endif
|
||||
|
||||
# platform specific definitions
|
||||
include $(srctree)/arch/mips/Kbuild.platforms
|
||||
|
@ -9,6 +9,8 @@
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#include "decompress.h"
|
||||
|
||||
void __weak putc(char c)
|
||||
{
|
||||
}
|
||||
|
@ -19,6 +19,8 @@
|
||||
#include <asm/unaligned.h>
|
||||
#include <asm-generic/vmlinux.lds.h>
|
||||
|
||||
#include "decompress.h"
|
||||
|
||||
/*
|
||||
* These two variables specify the free mem region
|
||||
* that can be used for temporary malloc area
|
||||
@ -26,20 +28,6 @@
|
||||
unsigned long free_mem_ptr;
|
||||
unsigned long free_mem_end_ptr;
|
||||
|
||||
/* The linker tells us where the image is. */
|
||||
extern unsigned char __image_begin[], __image_end[];
|
||||
|
||||
/* debug interfaces */
|
||||
#ifdef CONFIG_DEBUG_ZBOOT
|
||||
extern void puts(const char *s);
|
||||
extern void puthex(unsigned long long val);
|
||||
#else
|
||||
#define puts(s) do {} while (0)
|
||||
#define puthex(val) do {} while (0)
|
||||
#endif
|
||||
|
||||
extern char __appended_dtb[];
|
||||
|
||||
void error(char *x)
|
||||
{
|
||||
puts("\n\n");
|
||||
|
24
arch/mips/boot/compressed/decompress.h
Normal file
24
arch/mips/boot/compressed/decompress.h
Normal file
@ -0,0 +1,24 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
#ifndef _DECOMPRESSOR_H
|
||||
#define _DECOMPRESSOR_H
|
||||
|
||||
/* The linker tells us where the image is. */
|
||||
extern unsigned char __image_begin[], __image_end[];
|
||||
|
||||
/* debug interfaces */
|
||||
#ifdef CONFIG_DEBUG_ZBOOT
|
||||
extern void putc(char c);
|
||||
extern void puts(const char *s);
|
||||
extern void puthex(unsigned long long val);
|
||||
#else
|
||||
#define putc(s) do {} while (0)
|
||||
#define puts(s) do {} while (0)
|
||||
#define puthex(val) do {} while (0)
|
||||
#endif
|
||||
|
||||
extern char __appended_dtb[];
|
||||
|
||||
void error(char *x);
|
||||
void decompress_kernel(unsigned long boot_heap_start);
|
||||
|
||||
#endif
|
@ -7,6 +7,7 @@
|
||||
|
||||
#include <linux/compiler_attributes.h>
|
||||
#include <linux/types.h>
|
||||
#include <asm/string.h>
|
||||
|
||||
void *memcpy(void *dest, const void *src, size_t n)
|
||||
{
|
||||
|
@ -17,5 +17,11 @@
|
||||
#define __read_mostly __section(".data..read_mostly")
|
||||
|
||||
extern void cache_noop(void);
|
||||
extern void r3k_cache_init(void);
|
||||
extern unsigned long r3k_cache_size(unsigned long);
|
||||
extern unsigned long r3k_cache_lsize(unsigned long);
|
||||
extern void r4k_cache_init(void);
|
||||
extern void octeon_cache_init(void);
|
||||
extern void au1x00_fixup_config_od(void);
|
||||
|
||||
#endif /* _ASM_CACHE_H */
|
||||
|
@ -15,6 +15,9 @@
|
||||
#include <linux/types.h>
|
||||
#include <asm/isa-rev.h>
|
||||
|
||||
struct module;
|
||||
extern void jump_label_apply_nops(struct module *mod);
|
||||
|
||||
#define JUMP_LABEL_NOP_SIZE 4
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
|
@ -18,7 +18,6 @@ extern struct pglist_data *__node_data[];
|
||||
|
||||
#define NODE_DATA(n) (__node_data[n])
|
||||
|
||||
extern void setup_zero_pages(void);
|
||||
extern void __init prom_init_numa_memory(void);
|
||||
|
||||
#endif /* _ASM_MACH_MMZONE_H */
|
||||
|
@ -20,4 +20,6 @@
|
||||
#define nid_to_addrbase(nid) 0
|
||||
#endif
|
||||
|
||||
extern void setup_zero_pages(void);
|
||||
|
||||
#endif /* _ASM_MMZONE_H_ */
|
||||
|
@ -402,4 +402,6 @@ extern int mips_set_process_fp_mode(struct task_struct *task,
|
||||
#define GET_FP_MODE(task) mips_get_process_fp_mode(task)
|
||||
#define SET_FP_MODE(task,value) mips_set_process_fp_mode(task, value)
|
||||
|
||||
void show_registers(struct pt_regs *regs);
|
||||
|
||||
#endif /* _ASM_PROCESSOR_H */
|
||||
|
@ -24,6 +24,10 @@
|
||||
#include <asm/mmzone.h>
|
||||
#include <asm/unroll.h>
|
||||
|
||||
extern void r5k_sc_init(void);
|
||||
extern void rm7k_sc_init(void);
|
||||
extern int mips_sc_init(void);
|
||||
|
||||
extern void (*r4k_blast_dcache)(void);
|
||||
extern void (*r4k_blast_icache)(void);
|
||||
|
||||
|
@ -27,5 +27,6 @@ extern unsigned long ebase;
|
||||
extern unsigned int hwrena;
|
||||
extern void per_cpu_trap_init(bool);
|
||||
extern void cpu_cache_init(void);
|
||||
extern void tlb_init(void);
|
||||
|
||||
#endif /* __SETUP_H */
|
||||
|
@ -31,5 +31,6 @@ extern struct mips_abi mips_abi_32;
|
||||
|
||||
extern int protected_save_fp_context(void __user *sc);
|
||||
extern int protected_restore_fp_context(void __user *sc);
|
||||
void do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags);
|
||||
|
||||
#endif /* _ASM_SIGNAL_H */
|
||||
|
@ -63,6 +63,8 @@ extern asmlinkage void smp_bootstrap(void);
|
||||
|
||||
extern void calculate_cpu_foreign_map(void);
|
||||
|
||||
asmlinkage void start_secondary(void);
|
||||
|
||||
/*
|
||||
* this function sends a 'reschedule' IPI to another CPU.
|
||||
* it goes straight through and wastes no time serializing
|
||||
|
@ -3,7 +3,7 @@
|
||||
#define _MIPS_SPRAM_H
|
||||
|
||||
#if defined(CONFIG_MIPS_SPRAM)
|
||||
extern __init void spram_config(void);
|
||||
extern void spram_config(void);
|
||||
#else
|
||||
static inline void spram_config(void) { }
|
||||
#endif /* CONFIG_MIPS_SPRAM */
|
||||
|
33
arch/mips/include/asm/syscalls.h
Normal file
33
arch/mips/include/asm/syscalls.h
Normal file
@ -0,0 +1,33 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef _ASM_MIPS_SYSCALLS_H
|
||||
#define _ASM_MIPS_SYSCALLS_H
|
||||
|
||||
#include <linux/linkage.h>
|
||||
#include <linux/compat.h>
|
||||
|
||||
asmlinkage void sys_sigreturn(void);
|
||||
asmlinkage void sys_rt_sigreturn(void);
|
||||
asmlinkage int sysm_pipe(void);
|
||||
asmlinkage long mipsmt_sys_sched_setaffinity(pid_t pid, unsigned int len,
|
||||
unsigned long __user *user_mask_ptr);
|
||||
asmlinkage long mipsmt_sys_sched_getaffinity(pid_t pid, unsigned int len,
|
||||
unsigned long __user *user_mask_ptr);
|
||||
asmlinkage long sys32_fallocate(int fd, int mode, unsigned offset_a2,
|
||||
unsigned offset_a3, unsigned len_a4,
|
||||
unsigned len_a5);
|
||||
asmlinkage long sys32_fadvise64_64(int fd, int __pad,
|
||||
unsigned long a2, unsigned long a3,
|
||||
unsigned long a4, unsigned long a5,
|
||||
int flags);
|
||||
asmlinkage ssize_t sys32_readahead(int fd, u32 pad0, u64 a2, u64 a3,
|
||||
size_t count);
|
||||
asmlinkage long sys32_sync_file_range(int fd, int __pad,
|
||||
unsigned long a2, unsigned long a3,
|
||||
unsigned long a4, unsigned long a5,
|
||||
int flags);
|
||||
asmlinkage void sys32_rt_sigreturn(void);
|
||||
asmlinkage void sys32_sigreturn(void);
|
||||
asmlinkage int sys32_sigsuspend(compat_sigset_t __user *uset);
|
||||
asmlinkage void sysn32_rt_sigreturn(void);
|
||||
|
||||
#endif
|
@ -23,6 +23,7 @@ void build_update_entries(u32 **p, unsigned int tmp, unsigned int ptep);
|
||||
void build_tlb_write_entry(u32 **p, struct uasm_label **l,
|
||||
struct uasm_reloc **r,
|
||||
enum tlb_write_entry wmode);
|
||||
void build_tlb_refill_handler(void);
|
||||
|
||||
extern void handle_tlbl(void);
|
||||
extern char handle_tlbl_end[];
|
||||
|
@ -39,4 +39,28 @@ extern char except_vec_nmi[];
|
||||
register_nmi_notifier(&fn##_nb); \
|
||||
})
|
||||
|
||||
asmlinkage void do_ade(struct pt_regs *regs);
|
||||
asmlinkage void do_be(struct pt_regs *regs);
|
||||
asmlinkage void do_ov(struct pt_regs *regs);
|
||||
asmlinkage void do_fpe(struct pt_regs *regs, unsigned long fcr31);
|
||||
asmlinkage void do_bp(struct pt_regs *regs);
|
||||
asmlinkage void do_tr(struct pt_regs *regs);
|
||||
asmlinkage void do_ri(struct pt_regs *regs);
|
||||
asmlinkage void do_cpu(struct pt_regs *regs);
|
||||
asmlinkage void do_msa_fpe(struct pt_regs *regs, unsigned int msacsr);
|
||||
asmlinkage void do_msa(struct pt_regs *regs);
|
||||
asmlinkage void do_mdmx(struct pt_regs *regs);
|
||||
asmlinkage void do_watch(struct pt_regs *regs);
|
||||
asmlinkage void do_mcheck(struct pt_regs *regs);
|
||||
asmlinkage void do_mt(struct pt_regs *regs);
|
||||
asmlinkage void do_dsp(struct pt_regs *regs);
|
||||
asmlinkage void do_reserved(struct pt_regs *regs);
|
||||
asmlinkage void do_ftlb(void);
|
||||
asmlinkage void do_gsexc(struct pt_regs *regs, u32 diag1);
|
||||
asmlinkage void do_daddi_ov(struct pt_regs *regs);
|
||||
|
||||
asmlinkage void cache_parity_error(void);
|
||||
asmlinkage void ejtag_exception_handler(struct pt_regs *regs);
|
||||
asmlinkage void __noreturn nmi_exception_handler(struct pt_regs *regs);
|
||||
|
||||
#endif /* _ASM_TRAPS_H */
|
||||
|
@ -193,9 +193,7 @@ struct uasm_label {
|
||||
|
||||
void uasm_build_label(struct uasm_label **lab, u32 *addr,
|
||||
int lid);
|
||||
#ifdef CONFIG_64BIT
|
||||
int uasm_in_compat_space_p(long addr);
|
||||
#endif
|
||||
int uasm_rel_hi(long val);
|
||||
int uasm_rel_lo(long val);
|
||||
void UASM_i_LA_mostly(u32 **buf, unsigned int rs, long addr);
|
||||
|
@ -179,7 +179,6 @@ void __init check_bugs32(void)
|
||||
static inline int cpu_has_confreg(void)
|
||||
{
|
||||
#ifdef CONFIG_CPU_R3000
|
||||
extern unsigned long r3k_cache_size(unsigned long);
|
||||
unsigned long size1, size2;
|
||||
unsigned long cfg = read_c0_conf();
|
||||
|
||||
|
@ -42,7 +42,6 @@ void __init check_bugs32(void)
|
||||
static inline int cpu_has_confreg(void)
|
||||
{
|
||||
#ifdef CONFIG_CPU_R3000
|
||||
extern unsigned long r3k_cache_size(unsigned long);
|
||||
unsigned long size1, size2;
|
||||
unsigned long cfg = read_c0_conf();
|
||||
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include <linux/uaccess.h>
|
||||
#include <asm/mmu_context.h>
|
||||
#include <asm/mman.h>
|
||||
#include <asm/syscalls.h>
|
||||
|
||||
#ifdef __MIPSEB__
|
||||
#define merge_64(r1, r2) ((((r1) & 0xffffffffUL) << 32) + ((r2) & 0xffffffffUL))
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <linux/mm.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/libfdt.h>
|
||||
#include <linux/reboot.h>
|
||||
|
||||
#include <asm/cacheflush.h>
|
||||
#include <asm/page.h>
|
||||
|
@ -201,7 +201,7 @@ phys_addr_t __mips_cm_phys_base(void)
|
||||
phys_addr_t mips_cm_phys_base(void)
|
||||
__attribute__((weak, alias("__mips_cm_phys_base")));
|
||||
|
||||
phys_addr_t __mips_cm_l2sync_phys_base(void)
|
||||
static phys_addr_t __mips_cm_l2sync_phys_base(void)
|
||||
{
|
||||
u32 base_reg;
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include <linux/security.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <asm/syscalls.h>
|
||||
|
||||
/*
|
||||
* CPU mask used to set process affinity for MT VPEs/TCs with FPUs
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <asm/mipsmtregs.h>
|
||||
#include <asm/r4kcache.h>
|
||||
#include <asm/cacheflush.h>
|
||||
#include <asm/mips_mt.h>
|
||||
|
||||
int vpelimit;
|
||||
|
||||
|
@ -20,8 +20,7 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/jump_label.h>
|
||||
|
||||
extern void jump_label_apply_nops(struct module *mod);
|
||||
#include <asm/jump_label.h>
|
||||
|
||||
struct mips_hi16 {
|
||||
struct mips_hi16 *next;
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include <asm/fpu.h>
|
||||
#include <asm/mipsregs.h>
|
||||
#include <asm/setup.h>
|
||||
#include <asm/traps.h>
|
||||
|
||||
static char bug64hit[] __initdata =
|
||||
"reliable operation impossible!\n%s";
|
||||
|
@ -40,4 +40,7 @@ _restore_fp_context(void __user *fpregs, void __user *csr);
|
||||
extern asmlinkage int _save_msa_all_upper(void __user *buf);
|
||||
extern asmlinkage int _restore_msa_all_upper(void __user *buf);
|
||||
|
||||
extern int setup_sigcontext(struct pt_regs *, struct sigcontext __user *);
|
||||
extern int restore_sigcontext(struct pt_regs *, struct sigcontext __user *);
|
||||
|
||||
#endif /* __SIGNAL_COMMON_H */
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include <asm/dsp.h>
|
||||
#include <asm/inst.h>
|
||||
#include <asm/msa.h>
|
||||
#include <asm/syscalls.h>
|
||||
|
||||
#include "signal-common.h"
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include <asm/compat-signal.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <asm/unistd.h>
|
||||
#include <asm/syscalls.h>
|
||||
|
||||
#include "signal-common.h"
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <asm/ucontext.h>
|
||||
#include <asm/fpu.h>
|
||||
#include <asm/cpu-features.h>
|
||||
#include <asm/syscalls.h>
|
||||
|
||||
#include "signal-common.h"
|
||||
|
||||
@ -32,9 +33,6 @@
|
||||
*/
|
||||
#define __NR_N32_restart_syscall 6214
|
||||
|
||||
extern int setup_sigcontext(struct pt_regs *, struct sigcontext __user *);
|
||||
extern int restore_sigcontext(struct pt_regs *, struct sigcontext __user *);
|
||||
|
||||
struct ucontextn32 {
|
||||
u32 uc_flags;
|
||||
s32 uc_link;
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <asm/dsp.h>
|
||||
#include <asm/sim.h>
|
||||
#include <asm/unistd.h>
|
||||
#include <asm/syscalls.h>
|
||||
|
||||
#include "signal-common.h"
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include <linux/delay.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/profile.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/threads.h>
|
||||
@ -468,11 +469,13 @@ int __cpu_up(unsigned int cpu, struct task_struct *tidle)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PROFILING
|
||||
/* Not really SMP stuff ... */
|
||||
int setup_profiling_timer(unsigned int multiplier)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void flush_tlb_all_ipi(void *info)
|
||||
{
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include <asm/mipsregs.h>
|
||||
#include <asm/r4kcache.h>
|
||||
#include <asm/hazards.h>
|
||||
#include <asm/spram.h>
|
||||
|
||||
/*
|
||||
* These definitions are correct for the 24K/34K/74K SPRAM sample
|
||||
|
@ -39,6 +39,7 @@
|
||||
#include <asm/shmparam.h>
|
||||
#include <asm/sync.h>
|
||||
#include <asm/sysmips.h>
|
||||
#include <asm/syscalls.h>
|
||||
#include <asm/switch_to.h>
|
||||
|
||||
/*
|
||||
|
@ -2157,8 +2157,6 @@ void *set_vi_handler(int n, vi_handler_t addr)
|
||||
return set_vi_srs_handler(n, addr, 0);
|
||||
}
|
||||
|
||||
extern void tlb_init(void);
|
||||
|
||||
/*
|
||||
* Timer interrupt
|
||||
*/
|
||||
|
@ -91,6 +91,7 @@
|
||||
#include <asm/inst.h>
|
||||
#include <asm/unaligned-emul.h>
|
||||
#include <asm/mmu_context.h>
|
||||
#include <asm/traps.h>
|
||||
#include <linux/uaccess.h>
|
||||
|
||||
#include "access-helper.h"
|
||||
|
@ -1485,10 +1485,6 @@ static void loongson3_sc_init(void)
|
||||
return;
|
||||
}
|
||||
|
||||
extern int r5k_sc_init(void);
|
||||
extern int rm7k_sc_init(void);
|
||||
extern int mips_sc_init(void);
|
||||
|
||||
static void setup_scache(void)
|
||||
{
|
||||
struct cpuinfo_mips *c = ¤t_cpu_data;
|
||||
@ -1828,7 +1824,7 @@ static struct notifier_block r4k_cache_pm_notifier_block = {
|
||||
.notifier_call = r4k_cache_pm_notifier,
|
||||
};
|
||||
|
||||
int __init r4k_cache_init_pm(void)
|
||||
static int __init r4k_cache_init_pm(void)
|
||||
{
|
||||
return cpu_pm_register_notifier(&r4k_cache_pm_notifier_block);
|
||||
}
|
||||
|
@ -205,22 +205,13 @@ static inline void setup_protection_map(void)
|
||||
|
||||
void cpu_cache_init(void)
|
||||
{
|
||||
if (cpu_has_3k_cache) {
|
||||
extern void __weak r3k_cache_init(void);
|
||||
|
||||
if (IS_ENABLED(CONFIG_CPU_R3000) && cpu_has_3k_cache)
|
||||
r3k_cache_init();
|
||||
}
|
||||
if (cpu_has_4k_cache) {
|
||||
extern void __weak r4k_cache_init(void);
|
||||
|
||||
if (IS_ENABLED(CONFIG_CPU_R4K_CACHE_TLB) && cpu_has_4k_cache)
|
||||
r4k_cache_init();
|
||||
}
|
||||
|
||||
if (cpu_has_octeon_cache) {
|
||||
extern void __weak octeon_cache_init(void);
|
||||
|
||||
if (IS_ENABLED(CONFIG_CPU_CAVIUM_OCTEON) && cpu_has_octeon_cache)
|
||||
octeon_cache_init();
|
||||
}
|
||||
|
||||
setup_protection_map();
|
||||
}
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <asm/mmu_context.h>
|
||||
#include <asm/ptrace.h>
|
||||
#include <asm/highmem.h> /* For VMALLOC_END */
|
||||
#include <asm/traps.h>
|
||||
#include <linux/kdebug.h>
|
||||
|
||||
int show_unhandled_signals = 1;
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include <asm/dma.h>
|
||||
#include <asm/maar.h>
|
||||
#include <asm/mmu_context.h>
|
||||
#include <asm/mmzone.h>
|
||||
#include <asm/sections.h>
|
||||
#include <asm/pgalloc.h>
|
||||
#include <asm/tlb.h>
|
||||
|
@ -89,6 +89,7 @@ void pud_init(void *addr)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||
pmd_t mk_pmd(struct page *page, pgprot_t prot)
|
||||
{
|
||||
pmd_t pmd;
|
||||
@ -103,6 +104,7 @@ void set_pmd_at(struct mm_struct *mm, unsigned long addr,
|
||||
{
|
||||
*pmdp = pmd;
|
||||
}
|
||||
#endif
|
||||
|
||||
void __init pagetable_init(void)
|
||||
{
|
||||
|
@ -23,11 +23,11 @@
|
||||
#include <asm/io.h>
|
||||
#include <asm/bootinfo.h>
|
||||
#include <asm/cpu.h>
|
||||
#include <asm/setup.h>
|
||||
#include <asm/tlbex.h>
|
||||
|
||||
#undef DEBUG_TLB
|
||||
|
||||
extern void build_tlb_refill_handler(void);
|
||||
|
||||
/* CP0 hazard avoidance. */
|
||||
#define BARRIER \
|
||||
__asm__ __volatile__( \
|
||||
|
@ -22,9 +22,9 @@
|
||||
#include <asm/hazards.h>
|
||||
#include <asm/mmu_context.h>
|
||||
#include <asm/tlb.h>
|
||||
#include <asm/tlbex.h>
|
||||
#include <asm/tlbmisc.h>
|
||||
|
||||
extern void build_tlb_refill_handler(void);
|
||||
#include <asm/setup.h>
|
||||
|
||||
/*
|
||||
* LOONGSON-2 has a 4 entry itlb which is a subset of jtlb, LOONGSON-3 has
|
||||
@ -458,6 +458,7 @@ EXPORT_SYMBOL(has_transparent_hugepage);
|
||||
|
||||
int temp_tlb_entry;
|
||||
|
||||
#ifndef CONFIG_64BIT
|
||||
__init int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1,
|
||||
unsigned long entryhi, unsigned long pagemask)
|
||||
{
|
||||
@ -496,6 +497,7 @@ __init int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1,
|
||||
local_irq_restore(flags);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int ntlb;
|
||||
static int __init set_ntlb(char *str)
|
||||
|
@ -6,6 +6,7 @@
|
||||
* Author: Hu Hongbing <huhb@lemote.com>
|
||||
* Wu Zhangjin <wuzhangjin@gmail.com>
|
||||
*/
|
||||
#include <linux/suspend.h>
|
||||
#include <asm/sections.h>
|
||||
#include <asm/fpu.h>
|
||||
#include <asm/dsp.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include <linux/suspend.h>
|
||||
#include <asm/tlbflush.h>
|
||||
|
||||
extern int restore_image(void);
|
||||
|
@ -38,7 +38,7 @@ static void *elf_load(struct kimage *image, char *kernel_buf,
|
||||
for (i = 0; i < image->nr_segments; i++)
|
||||
image->segment[i].mem = __pa(image->segment[i].mem);
|
||||
|
||||
pr_debug("Loaded the kernel at 0x%lx, entry at 0x%lx\n",
|
||||
kexec_dprintk("Loaded the kernel at 0x%lx, entry at 0x%lx\n",
|
||||
kernel_load_addr, image->start);
|
||||
|
||||
if (initrd != NULL) {
|
||||
@ -51,7 +51,7 @@ static void *elf_load(struct kimage *image, char *kernel_buf,
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
pr_debug("Loaded initrd at 0x%lx\n", kbuf.mem);
|
||||
kexec_dprintk("Loaded initrd at 0x%lx\n", kbuf.mem);
|
||||
image->arch.initrd_start = kbuf.mem;
|
||||
image->arch.initrd_end = kbuf.mem + initrd_len;
|
||||
}
|
||||
@ -68,7 +68,7 @@ static void *elf_load(struct kimage *image, char *kernel_buf,
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
pr_debug("Loaded cmdline at 0x%lx\n", kbuf.mem);
|
||||
kexec_dprintk("Loaded cmdline at 0x%lx\n", kbuf.mem);
|
||||
image->arch.cmdline = kbuf.mem;
|
||||
}
|
||||
out:
|
||||
|
@ -283,8 +283,7 @@ static void kexec_prepare_cpus(void)
|
||||
* We could use a smaller stack if we don't care about anything using
|
||||
* current, but that audit has not been performed.
|
||||
*/
|
||||
static union thread_union kexec_stack __init_task_data =
|
||||
{ };
|
||||
static union thread_union kexec_stack = { };
|
||||
|
||||
/*
|
||||
* For similar reasons to the stack above, the kexecing CPU needs to be on a
|
||||
|
@ -59,7 +59,7 @@ static void *elf64_load(struct kimage *image, char *kernel_buf,
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
pr_debug("Loaded the kernel at 0x%lx\n", kernel_load_addr);
|
||||
kexec_dprintk("Loaded the kernel at 0x%lx\n", kernel_load_addr);
|
||||
|
||||
ret = kexec_load_purgatory(image, &pbuf);
|
||||
if (ret) {
|
||||
@ -67,7 +67,7 @@ static void *elf64_load(struct kimage *image, char *kernel_buf,
|
||||
goto out;
|
||||
}
|
||||
|
||||
pr_debug("Loaded purgatory at 0x%lx\n", pbuf.mem);
|
||||
kexec_dprintk("Loaded purgatory at 0x%lx\n", pbuf.mem);
|
||||
|
||||
/* Load additional segments needed for panic kernel */
|
||||
if (image->type == KEXEC_TYPE_CRASH) {
|
||||
@ -99,7 +99,7 @@ static void *elf64_load(struct kimage *image, char *kernel_buf,
|
||||
goto out;
|
||||
initrd_load_addr = kbuf.mem;
|
||||
|
||||
pr_debug("Loaded initrd at 0x%lx\n", initrd_load_addr);
|
||||
kexec_dprintk("Loaded initrd at 0x%lx\n", initrd_load_addr);
|
||||
}
|
||||
|
||||
fdt = of_kexec_alloc_and_setup_fdt(image, initrd_load_addr,
|
||||
@ -132,7 +132,7 @@ static void *elf64_load(struct kimage *image, char *kernel_buf,
|
||||
|
||||
fdt_load_addr = kbuf.mem;
|
||||
|
||||
pr_debug("Loaded device tree at 0x%lx\n", fdt_load_addr);
|
||||
kexec_dprintk("Loaded device tree at 0x%lx\n", fdt_load_addr);
|
||||
|
||||
slave_code = elf_info.buffer + elf_info.proghdrs[0].p_offset;
|
||||
ret = setup_purgatory_ppc64(image, slave_code, fdt, kernel_load_addr,
|
||||
|
@ -577,7 +577,7 @@ static int add_usable_mem_property(void *fdt, struct device_node *dn,
|
||||
NODE_PATH_LEN, dn);
|
||||
return -EOVERFLOW;
|
||||
}
|
||||
pr_debug("Memory node path: %s\n", path);
|
||||
kexec_dprintk("Memory node path: %s\n", path);
|
||||
|
||||
/* Now that we know the path, find its offset in kdump kernel's fdt */
|
||||
node = fdt_path_offset(fdt, path);
|
||||
@ -590,7 +590,7 @@ static int add_usable_mem_property(void *fdt, struct device_node *dn,
|
||||
/* Get the address & size cells */
|
||||
n_mem_addr_cells = of_n_addr_cells(dn);
|
||||
n_mem_size_cells = of_n_size_cells(dn);
|
||||
pr_debug("address cells: %d, size cells: %d\n", n_mem_addr_cells,
|
||||
kexec_dprintk("address cells: %d, size cells: %d\n", n_mem_addr_cells,
|
||||
n_mem_size_cells);
|
||||
|
||||
um_info->idx = 0;
|
||||
@ -664,7 +664,7 @@ static int update_usable_mem_fdt(void *fdt, struct crash_mem *usable_mem)
|
||||
|
||||
node = fdt_path_offset(fdt, "/ibm,dynamic-reconfiguration-memory");
|
||||
if (node == -FDT_ERR_NOTFOUND)
|
||||
pr_debug("No dynamic reconfiguration memory found\n");
|
||||
kexec_dprintk("No dynamic reconfiguration memory found\n");
|
||||
else if (node < 0) {
|
||||
pr_err("Malformed device tree: error reading /ibm,dynamic-reconfiguration-memory.\n");
|
||||
return -EINVAL;
|
||||
@ -776,7 +776,7 @@ static void update_backup_region_phdr(struct kimage *image, Elf64_Ehdr *ehdr)
|
||||
for (i = 0; i < ehdr->e_phnum; i++) {
|
||||
if (phdr->p_paddr == BACKUP_SRC_START) {
|
||||
phdr->p_offset = image->arch.backup_start;
|
||||
pr_debug("Backup region offset updated to 0x%lx\n",
|
||||
kexec_dprintk("Backup region offset updated to 0x%lx\n",
|
||||
image->arch.backup_start);
|
||||
return;
|
||||
}
|
||||
@ -850,7 +850,7 @@ int load_crashdump_segments_ppc64(struct kimage *image,
|
||||
pr_err("Failed to load backup segment\n");
|
||||
return ret;
|
||||
}
|
||||
pr_debug("Loaded the backup region at 0x%lx\n", kbuf->mem);
|
||||
kexec_dprintk("Loaded the backup region at 0x%lx\n", kbuf->mem);
|
||||
|
||||
/* Load elfcorehdr segment - to export crashing kernel's vmcore */
|
||||
ret = load_elfcorehdr_segment(image, kbuf);
|
||||
@ -858,7 +858,7 @@ int load_crashdump_segments_ppc64(struct kimage *image,
|
||||
pr_err("Failed to load elfcorehdr segment\n");
|
||||
return ret;
|
||||
}
|
||||
pr_debug("Loaded elf core header at 0x%lx, bufsz=0x%lx memsz=0x%lx\n",
|
||||
kexec_dprintk("Loaded elf core header at 0x%lx, bufsz=0x%lx memsz=0x%lx\n",
|
||||
image->elf_load_addr, kbuf->bufsz, kbuf->memsz);
|
||||
|
||||
return 0;
|
||||
|
@ -11,7 +11,7 @@ endif
|
||||
CFLAGS_syscall_table.o += $(call cc-option,-Wno-override-init,)
|
||||
CFLAGS_compat_syscall_table.o += $(call cc-option,-Wno-override-init,)
|
||||
|
||||
ifdef CONFIG_KEXEC
|
||||
ifdef CONFIG_KEXEC_CORE
|
||||
AFLAGS_kexec_relocate.o := -mcmodel=medany $(call cc-option,-mno-relax)
|
||||
endif
|
||||
|
||||
|
@ -216,7 +216,6 @@ static void *elf_kexec_load(struct kimage *image, char *kernel_buf,
|
||||
if (ret)
|
||||
goto out;
|
||||
kernel_start = image->start;
|
||||
pr_notice("The entry point of kernel at 0x%lx\n", image->start);
|
||||
|
||||
/* Add the kernel binary to the image */
|
||||
ret = riscv_kexec_elf_load(image, &ehdr, &elf_info,
|
||||
@ -252,7 +251,7 @@ static void *elf_kexec_load(struct kimage *image, char *kernel_buf,
|
||||
image->elf_load_addr = kbuf.mem;
|
||||
image->elf_headers_sz = headers_sz;
|
||||
|
||||
pr_debug("Loaded elf core header at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
|
||||
kexec_dprintk("Loaded elf core header at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
|
||||
image->elf_load_addr, kbuf.bufsz, kbuf.memsz);
|
||||
|
||||
/* Setup cmdline for kdump kernel case */
|
||||
@ -275,6 +274,8 @@ static void *elf_kexec_load(struct kimage *image, char *kernel_buf,
|
||||
pr_err("Error loading purgatory ret=%d\n", ret);
|
||||
goto out;
|
||||
}
|
||||
kexec_dprintk("Loaded purgatory at 0x%lx\n", kbuf.mem);
|
||||
|
||||
ret = kexec_purgatory_get_set_symbol(image, "riscv_kernel_entry",
|
||||
&kernel_start,
|
||||
sizeof(kernel_start), 0);
|
||||
@ -293,7 +294,7 @@ static void *elf_kexec_load(struct kimage *image, char *kernel_buf,
|
||||
if (ret)
|
||||
goto out;
|
||||
initrd_pbase = kbuf.mem;
|
||||
pr_notice("Loaded initrd at 0x%lx\n", initrd_pbase);
|
||||
kexec_dprintk("Loaded initrd at 0x%lx\n", initrd_pbase);
|
||||
}
|
||||
|
||||
/* Add the DTB to the image */
|
||||
@ -318,7 +319,7 @@ static void *elf_kexec_load(struct kimage *image, char *kernel_buf,
|
||||
}
|
||||
/* Cache the fdt buffer address for memory cleanup */
|
||||
image->arch.fdt = fdt;
|
||||
pr_notice("Loaded device tree at 0x%lx\n", kbuf.mem);
|
||||
kexec_dprintk("Loaded device tree at 0x%lx\n", kbuf.mem);
|
||||
goto out;
|
||||
|
||||
out_free_fdt:
|
||||
|
@ -18,30 +18,6 @@
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/irq.h>
|
||||
|
||||
/*
|
||||
* kexec_image_info - Print received image details
|
||||
*/
|
||||
static void
|
||||
kexec_image_info(const struct kimage *image)
|
||||
{
|
||||
unsigned long i;
|
||||
|
||||
pr_debug("Kexec image info:\n");
|
||||
pr_debug("\ttype: %d\n", image->type);
|
||||
pr_debug("\tstart: %lx\n", image->start);
|
||||
pr_debug("\thead: %lx\n", image->head);
|
||||
pr_debug("\tnr_segments: %lu\n", image->nr_segments);
|
||||
|
||||
for (i = 0; i < image->nr_segments; i++) {
|
||||
pr_debug("\t segment[%lu]: %016lx - %016lx", i,
|
||||
image->segment[i].mem,
|
||||
image->segment[i].mem + image->segment[i].memsz);
|
||||
pr_debug("\t\t0x%lx bytes, %lu pages\n",
|
||||
(unsigned long) image->segment[i].memsz,
|
||||
(unsigned long) image->segment[i].memsz / PAGE_SIZE);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* machine_kexec_prepare - Initialize kexec
|
||||
*
|
||||
@ -60,8 +36,6 @@ machine_kexec_prepare(struct kimage *image)
|
||||
unsigned int control_code_buffer_sz = 0;
|
||||
int i = 0;
|
||||
|
||||
kexec_image_info(image);
|
||||
|
||||
/* Find the Flattened Device Tree and save its physical address */
|
||||
for (i = 0; i < image->nr_segments; i++) {
|
||||
if (image->segment[i].memsz <= sizeof(fdt))
|
||||
|
@ -43,10 +43,12 @@ static inline void __user *get_trap_ip(struct pt_regs *regs)
|
||||
return (void __user *) (address - (regs->int_code >> 16));
|
||||
}
|
||||
|
||||
#ifdef CONFIG_GENERIC_BUG
|
||||
int is_valid_bugaddr(unsigned long addr)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
void do_report_trap(struct pt_regs *regs, int si_signo, int si_code, char *str)
|
||||
{
|
||||
|
@ -5,7 +5,6 @@
|
||||
#
|
||||
|
||||
asflags-y := -ansi
|
||||
ccflags-y := -Werror
|
||||
|
||||
# Undefine sparc when processing vmlinux.lds - it is used
|
||||
# And teach CPP we are doing $(BITS) builds (for this case)
|
||||
|
@ -3,7 +3,6 @@
|
||||
#
|
||||
|
||||
asflags-y := -ansi -DST_DIV0=0x02
|
||||
ccflags-y := -Werror
|
||||
|
||||
lib-$(CONFIG_SPARC32) += ashrdi3.o
|
||||
lib-$(CONFIG_SPARC32) += memcpy.o memset.o
|
||||
|
@ -3,7 +3,6 @@
|
||||
#
|
||||
|
||||
asflags-y := -ansi
|
||||
ccflags-y := -Werror
|
||||
|
||||
obj-$(CONFIG_SPARC64) += ultra.o tlb.o tsb.o
|
||||
obj-y += fault_$(BITS).o
|
||||
|
@ -3,7 +3,6 @@
|
||||
# Linux.
|
||||
#
|
||||
asflags := -ansi
|
||||
ccflags := -Werror
|
||||
|
||||
lib-y := bootstr_$(BITS).o
|
||||
lib-y += init_$(BITS).o
|
||||
|
@ -170,7 +170,7 @@ static int elf_header_exclude_ranges(struct crash_mem *cmem)
|
||||
int ret = 0;
|
||||
|
||||
/* Exclude the low 1M because it is always reserved */
|
||||
ret = crash_exclude_mem_range(cmem, 0, (1<<20)-1);
|
||||
ret = crash_exclude_mem_range(cmem, 0, SZ_1M - 1);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@ -198,8 +198,8 @@ static int prepare_elf64_ram_headers_callback(struct resource *res, void *arg)
|
||||
}
|
||||
|
||||
/* Prepare elf headers. Return addr and size */
|
||||
static int prepare_elf_headers(struct kimage *image, void **addr,
|
||||
unsigned long *sz, unsigned long *nr_mem_ranges)
|
||||
static int prepare_elf_headers(void **addr, unsigned long *sz,
|
||||
unsigned long *nr_mem_ranges)
|
||||
{
|
||||
struct crash_mem *cmem;
|
||||
int ret;
|
||||
@ -349,7 +349,7 @@ int crash_load_segments(struct kimage *image)
|
||||
.buf_max = ULONG_MAX, .top_down = false };
|
||||
|
||||
/* Prepare elf headers and add a segment */
|
||||
ret = prepare_elf_headers(image, &kbuf.buffer, &kbuf.bufsz, &pnum);
|
||||
ret = prepare_elf_headers(&kbuf.buffer, &kbuf.bufsz, &pnum);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@ -386,7 +386,7 @@ int crash_load_segments(struct kimage *image)
|
||||
if (ret)
|
||||
return ret;
|
||||
image->elf_load_addr = kbuf.mem;
|
||||
pr_debug("Loaded ELF headers at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
|
||||
kexec_dprintk("Loaded ELF headers at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
|
||||
image->elf_load_addr, kbuf.bufsz, kbuf.memsz);
|
||||
|
||||
return ret;
|
||||
@ -452,7 +452,7 @@ void arch_crash_handle_hotplug_event(struct kimage *image)
|
||||
* Create the new elfcorehdr reflecting the changes to CPU and/or
|
||||
* memory resources.
|
||||
*/
|
||||
if (prepare_elf_headers(image, &elfbuf, &elfsz, &nr_mem_ranges)) {
|
||||
if (prepare_elf_headers(&elfbuf, &elfsz, &nr_mem_ranges)) {
|
||||
pr_err("unable to create new elfcorehdr");
|
||||
goto out;
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ static int setup_cmdline(struct kimage *image, struct boot_params *params,
|
||||
|
||||
cmdline_ptr[cmdline_len - 1] = '\0';
|
||||
|
||||
pr_debug("Final command line is: %s\n", cmdline_ptr);
|
||||
kexec_dprintk("Final command line is: %s\n", cmdline_ptr);
|
||||
cmdline_ptr_phys = bootparams_load_addr + cmdline_offset;
|
||||
cmdline_low_32 = cmdline_ptr_phys & 0xffffffffUL;
|
||||
cmdline_ext_32 = cmdline_ptr_phys >> 32;
|
||||
@ -272,7 +272,12 @@ setup_boot_parameters(struct kimage *image, struct boot_params *params,
|
||||
|
||||
nr_e820_entries = params->e820_entries;
|
||||
|
||||
kexec_dprintk("E820 memmap:\n");
|
||||
for (i = 0; i < nr_e820_entries; i++) {
|
||||
kexec_dprintk("%016llx-%016llx (%d)\n",
|
||||
params->e820_table[i].addr,
|
||||
params->e820_table[i].addr + params->e820_table[i].size - 1,
|
||||
params->e820_table[i].type);
|
||||
if (params->e820_table[i].type != E820_TYPE_RAM)
|
||||
continue;
|
||||
start = params->e820_table[i].addr;
|
||||
@ -424,7 +429,7 @@ static void *bzImage64_load(struct kimage *image, char *kernel,
|
||||
* command line. Make sure it does not overflow
|
||||
*/
|
||||
if (cmdline_len + MAX_ELFCOREHDR_STR_LEN > header->cmdline_size) {
|
||||
pr_debug("Appending elfcorehdr=<addr> to command line exceeds maximum allowed length\n");
|
||||
pr_err("Appending elfcorehdr=<addr> to command line exceeds maximum allowed length\n");
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
@ -445,7 +450,7 @@ static void *bzImage64_load(struct kimage *image, char *kernel,
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
|
||||
pr_debug("Loaded purgatory at 0x%lx\n", pbuf.mem);
|
||||
kexec_dprintk("Loaded purgatory at 0x%lx\n", pbuf.mem);
|
||||
|
||||
|
||||
/*
|
||||
@ -490,8 +495,8 @@ static void *bzImage64_load(struct kimage *image, char *kernel,
|
||||
if (ret)
|
||||
goto out_free_params;
|
||||
bootparam_load_addr = kbuf.mem;
|
||||
pr_debug("Loaded boot_param, command line and misc at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
|
||||
bootparam_load_addr, kbuf.bufsz, kbuf.bufsz);
|
||||
kexec_dprintk("Loaded boot_param, command line and misc at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
|
||||
bootparam_load_addr, kbuf.bufsz, kbuf.memsz);
|
||||
|
||||
/* Load kernel */
|
||||
kbuf.buffer = kernel + kern16_size;
|
||||
@ -505,7 +510,7 @@ static void *bzImage64_load(struct kimage *image, char *kernel,
|
||||
goto out_free_params;
|
||||
kernel_load_addr = kbuf.mem;
|
||||
|
||||
pr_debug("Loaded 64bit kernel at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
|
||||
kexec_dprintk("Loaded 64bit kernel at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
|
||||
kernel_load_addr, kbuf.bufsz, kbuf.memsz);
|
||||
|
||||
/* Load initrd high */
|
||||
@ -520,7 +525,7 @@ static void *bzImage64_load(struct kimage *image, char *kernel,
|
||||
goto out_free_params;
|
||||
initrd_load_addr = kbuf.mem;
|
||||
|
||||
pr_debug("Loaded initrd at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
|
||||
kexec_dprintk("Loaded initrd at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
|
||||
initrd_load_addr, initrd_len, initrd_len);
|
||||
|
||||
setup_initrd(params, initrd_load_addr, initrd_len);
|
||||
|
@ -42,12 +42,9 @@ struct init_pgtable_data {
|
||||
static int mem_region_callback(struct resource *res, void *arg)
|
||||
{
|
||||
struct init_pgtable_data *data = arg;
|
||||
unsigned long mstart, mend;
|
||||
|
||||
mstart = res->start;
|
||||
mend = mstart + resource_size(res) - 1;
|
||||
|
||||
return kernel_ident_mapping_init(data->info, data->level4p, mstart, mend);
|
||||
return kernel_ident_mapping_init(data->info, data->level4p,
|
||||
res->start, res->end + 1);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include <linux/dma-map-ops.h>
|
||||
#include <linux/swiotlb.h>
|
||||
#include <asm/iommu.h>
|
||||
#include <asm/sta2x11.h>
|
||||
|
||||
#define STA2X11_SWIOTLB_SIZE (4*1024*1024)
|
||||
|
||||
|
@ -2255,7 +2255,7 @@ config MFD_VEXPRESS_SYSREG
|
||||
config RAVE_SP_CORE
|
||||
tristate "RAVE SP MCU core driver"
|
||||
depends on SERIAL_DEV_BUS
|
||||
select CRC_CCITT
|
||||
select CRC_ITU_T
|
||||
help
|
||||
Select this to get support for the Supervisory Processor
|
||||
device found on several devices in RAVE line of hardware.
|
||||
|
@ -9,7 +9,7 @@
|
||||
*/
|
||||
|
||||
#include <linux/atomic.h>
|
||||
#include <linux/crc-ccitt.h>
|
||||
#include <linux/crc-itu-t.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/init.h>
|
||||
@ -251,7 +251,7 @@ static void csum_8b2c(const u8 *buf, size_t size, u8 *crc)
|
||||
|
||||
static void csum_ccitt(const u8 *buf, size_t size, u8 *crc)
|
||||
{
|
||||
const u16 calculated = crc_ccitt_false(0xffff, buf, size);
|
||||
const u16 calculated = crc_itu_t(0xffff, buf, size);
|
||||
|
||||
/*
|
||||
* While the rest of the wire protocol is little-endian,
|
||||
|
@ -32,29 +32,25 @@ static u8 pmio_read_index(u16 index, u8 reg)
|
||||
return inb(index + 1);
|
||||
}
|
||||
|
||||
void pm_iowrite(u8 reg, u8 value)
|
||||
static void pm_iowrite(u8 reg, u8 value)
|
||||
{
|
||||
pmio_write_index(PM_INDEX, reg, value);
|
||||
}
|
||||
EXPORT_SYMBOL(pm_iowrite);
|
||||
|
||||
u8 pm_ioread(u8 reg)
|
||||
static u8 pm_ioread(u8 reg)
|
||||
{
|
||||
return pmio_read_index(PM_INDEX, reg);
|
||||
}
|
||||
EXPORT_SYMBOL(pm_ioread);
|
||||
|
||||
void pm2_iowrite(u8 reg, u8 value)
|
||||
static void pm2_iowrite(u8 reg, u8 value)
|
||||
{
|
||||
pmio_write_index(PM2_INDEX, reg, value);
|
||||
}
|
||||
EXPORT_SYMBOL(pm2_iowrite);
|
||||
|
||||
u8 pm2_ioread(u8 reg)
|
||||
static u8 pm2_ioread(u8 reg)
|
||||
{
|
||||
return pmio_read_index(PM2_INDEX, reg);
|
||||
}
|
||||
EXPORT_SYMBOL(pm2_ioread);
|
||||
|
||||
static void acpi_hw_clear_status(void)
|
||||
{
|
||||
|
@ -5,7 +5,7 @@ menuconfig SURFACE_AGGREGATOR
|
||||
tristate "Microsoft Surface System Aggregator Module Subsystem and Drivers"
|
||||
depends on SERIAL_DEV_BUS
|
||||
depends on ACPI && !RISCV
|
||||
select CRC_CCITT
|
||||
select CRC_ITU_T
|
||||
help
|
||||
The Surface System Aggregator Module (Surface SAM or SSAM) is an
|
||||
embedded controller (EC) found on 5th- and later-generation Microsoft
|
||||
|
@ -51,8 +51,9 @@ static void tsi721_imsg_handler(struct tsi721_device *priv, int ch);
|
||||
* @len: Length (in bytes) of the maintenance transaction
|
||||
* @data: Value to be read into
|
||||
*
|
||||
* Generates a local SREP space read. Returns %0 on
|
||||
* success or %-EINVAL on failure.
|
||||
* Generates a local SREP space read.
|
||||
*
|
||||
* Returns: %0 on success or %-EINVAL on failure.
|
||||
*/
|
||||
static int tsi721_lcread(struct rio_mport *mport, int index, u32 offset,
|
||||
int len, u32 *data)
|
||||
@ -75,8 +76,9 @@ static int tsi721_lcread(struct rio_mport *mport, int index, u32 offset,
|
||||
* @len: Length (in bytes) of the maintenance transaction
|
||||
* @data: Value to be written
|
||||
*
|
||||
* Generates a local write into SREP configuration space. Returns %0 on
|
||||
* success or %-EINVAL on failure.
|
||||
* Generates a local write into SREP configuration space.
|
||||
*
|
||||
* Returns: %0 on success or %-EINVAL on failure.
|
||||
*/
|
||||
static int tsi721_lcwrite(struct rio_mport *mport, int index, u32 offset,
|
||||
int len, u32 data)
|
||||
@ -104,7 +106,7 @@ static int tsi721_lcwrite(struct rio_mport *mport, int index, u32 offset,
|
||||
* @do_wr: Operation flag (1 == MAINT_WR)
|
||||
*
|
||||
* Generates a RapidIO maintenance transaction (Read or Write).
|
||||
* Returns %0 on success and %-EINVAL or %-EFAULT on failure.
|
||||
* Returns: %0 on success and %-EINVAL or %-EFAULT on failure.
|
||||
*/
|
||||
static int tsi721_maint_dma(struct tsi721_device *priv, u32 sys_size,
|
||||
u16 destid, u8 hopcount, u32 offset, int len,
|
||||
@ -205,10 +207,10 @@ static int tsi721_maint_dma(struct tsi721_device *priv, u32 sys_size,
|
||||
* @hopcount: Number of hops to target device
|
||||
* @offset: Offset into configuration space
|
||||
* @len: Length (in bytes) of the maintenance transaction
|
||||
* @val: Location to be read into
|
||||
* @data: Location to be read into
|
||||
*
|
||||
* Generates a RapidIO maintenance read transaction.
|
||||
* Returns %0 on success and %-EINVAL or %-EFAULT on failure.
|
||||
* Returns: %0 on success and %-EINVAL or %-EFAULT on failure.
|
||||
*/
|
||||
static int tsi721_cread_dma(struct rio_mport *mport, int index, u16 destid,
|
||||
u8 hopcount, u32 offset, int len, u32 *data)
|
||||
@ -228,10 +230,10 @@ static int tsi721_cread_dma(struct rio_mport *mport, int index, u16 destid,
|
||||
* @hopcount: Number of hops to target device
|
||||
* @offset: Offset into configuration space
|
||||
* @len: Length (in bytes) of the maintenance transaction
|
||||
* @val: Value to be written
|
||||
* @data: Value to be written
|
||||
*
|
||||
* Generates a RapidIO maintenance write transaction.
|
||||
* Returns %0 on success and %-EINVAL or %-EFAULT on failure.
|
||||
* Returns: %0 on success and %-EINVAL or %-EFAULT on failure.
|
||||
*/
|
||||
static int tsi721_cwrite_dma(struct rio_mport *mport, int index, u16 destid,
|
||||
u8 hopcount, u32 offset, int len, u32 data)
|
||||
@ -250,6 +252,8 @@ static int tsi721_cwrite_dma(struct rio_mport *mport, int index, u16 destid,
|
||||
* Handles inbound port-write interrupts. Copies PW message from an internal
|
||||
* buffer into PW message FIFO and schedules deferred routine to process
|
||||
* queued messages.
|
||||
*
|
||||
* Returns: %0
|
||||
*/
|
||||
static int
|
||||
tsi721_pw_handler(struct tsi721_device *priv)
|
||||
@ -307,6 +311,8 @@ static void tsi721_pw_dpc(struct work_struct *work)
|
||||
* tsi721_pw_enable - enable/disable port-write interface init
|
||||
* @mport: Master port implementing the port write unit
|
||||
* @enable: 1=enable; 0=disable port-write message handling
|
||||
*
|
||||
* Returns: %0
|
||||
*/
|
||||
static int tsi721_pw_enable(struct rio_mport *mport, int enable)
|
||||
{
|
||||
@ -336,7 +342,9 @@ static int tsi721_pw_enable(struct rio_mport *mport, int enable)
|
||||
* @destid: Destination ID of target device
|
||||
* @data: 16-bit info field of RapidIO doorbell
|
||||
*
|
||||
* Sends a RapidIO doorbell message. Always returns %0.
|
||||
* Sends a RapidIO doorbell message.
|
||||
*
|
||||
* Returns: %0
|
||||
*/
|
||||
static int tsi721_dsend(struct rio_mport *mport, int index,
|
||||
u16 destid, u16 data)
|
||||
@ -361,6 +369,8 @@ static int tsi721_dsend(struct rio_mport *mport, int index,
|
||||
* Handles inbound doorbell interrupts. Copies doorbell entry from an internal
|
||||
* buffer into DB message FIFO and schedules deferred routine to process
|
||||
* queued DBs.
|
||||
*
|
||||
* Returns: %0
|
||||
*/
|
||||
static int
|
||||
tsi721_dbell_handler(struct tsi721_device *priv)
|
||||
@ -453,6 +463,8 @@ static void tsi721_db_dpc(struct work_struct *work)
|
||||
*
|
||||
* Handles Tsi721 interrupts signaled using MSI and INTA. Checks reported
|
||||
* interrupt events and calls an event-specific handler(s).
|
||||
*
|
||||
* Returns: %IRQ_HANDLED or %IRQ_NONE
|
||||
*/
|
||||
static irqreturn_t tsi721_irqhandler(int irq, void *ptr)
|
||||
{
|
||||
@ -607,6 +619,8 @@ static void tsi721_interrupts_init(struct tsi721_device *priv)
|
||||
* @ptr: Pointer to interrupt-specific data (tsi721_device structure)
|
||||
*
|
||||
* Handles outbound messaging interrupts signaled using MSI-X.
|
||||
*
|
||||
* Returns: %IRQ_HANDLED
|
||||
*/
|
||||
static irqreturn_t tsi721_omsg_msix(int irq, void *ptr)
|
||||
{
|
||||
@ -624,6 +638,8 @@ static irqreturn_t tsi721_omsg_msix(int irq, void *ptr)
|
||||
* @ptr: Pointer to interrupt-specific data (tsi721_device structure)
|
||||
*
|
||||
* Handles inbound messaging interrupts signaled using MSI-X.
|
||||
*
|
||||
* Returns: %IRQ_HANDLED
|
||||
*/
|
||||
static irqreturn_t tsi721_imsg_msix(int irq, void *ptr)
|
||||
{
|
||||
@ -641,6 +657,8 @@ static irqreturn_t tsi721_imsg_msix(int irq, void *ptr)
|
||||
* @ptr: Pointer to interrupt-specific data (tsi721_device structure)
|
||||
*
|
||||
* Handles Tsi721 interrupts from SRIO MAC.
|
||||
*
|
||||
* Returns: %IRQ_HANDLED
|
||||
*/
|
||||
static irqreturn_t tsi721_srio_msix(int irq, void *ptr)
|
||||
{
|
||||
@ -663,6 +681,8 @@ static irqreturn_t tsi721_srio_msix(int irq, void *ptr)
|
||||
* Handles Tsi721 interrupts from SR2PC Channel.
|
||||
* NOTE: At this moment services only one SR2PC channel associated with inbound
|
||||
* doorbells.
|
||||
*
|
||||
* Returns: %IRQ_HANDLED
|
||||
*/
|
||||
static irqreturn_t tsi721_sr2pc_ch_msix(int irq, void *ptr)
|
||||
{
|
||||
@ -689,6 +709,8 @@ static irqreturn_t tsi721_sr2pc_ch_msix(int irq, void *ptr)
|
||||
* Registers MSI-X interrupt service routines for interrupts that are active
|
||||
* immediately after mport initialization. Messaging interrupt service routines
|
||||
* should be registered during corresponding open requests.
|
||||
*
|
||||
* Returns: %0 on success or -errno value on failure.
|
||||
*/
|
||||
static int tsi721_request_msix(struct tsi721_device *priv)
|
||||
{
|
||||
@ -717,6 +739,8 @@ static int tsi721_request_msix(struct tsi721_device *priv)
|
||||
*
|
||||
* Configures MSI-X support for Tsi721. Supports only an exact number
|
||||
* of requested vectors.
|
||||
*
|
||||
* Returns: %0 on success or -errno value on failure.
|
||||
*/
|
||||
static int tsi721_enable_msix(struct tsi721_device *priv)
|
||||
{
|
||||
@ -1334,7 +1358,7 @@ static void tsi721_close_sr2pc_mapping(struct tsi721_device *priv)
|
||||
* @priv: pointer to tsi721 private data
|
||||
*
|
||||
* Initializes inbound port write handler.
|
||||
* Returns %0 on success or %-ENOMEM on failure.
|
||||
* Returns: %0 on success or %-ENOMEM on failure.
|
||||
*/
|
||||
static int tsi721_port_write_init(struct tsi721_device *priv)
|
||||
{
|
||||
@ -1412,7 +1436,8 @@ static void tsi721_doorbell_free(struct tsi721_device *priv)
|
||||
*
|
||||
* Initialize BDMA channel allocated for RapidIO maintenance read/write
|
||||
* request generation
|
||||
* Returns %0 on success or %-ENOMEM on failure.
|
||||
*
|
||||
* Returns: %0 on success or %-ENOMEM on failure.
|
||||
*/
|
||||
static int tsi721_bdma_maint_init(struct tsi721_device *priv)
|
||||
{
|
||||
@ -1662,6 +1687,8 @@ tsi721_omsg_interrupt_disable(struct tsi721_device *priv, int ch,
|
||||
* @mbox: Outbound mailbox
|
||||
* @buffer: Message to add to outbound queue
|
||||
* @len: Length of message
|
||||
*
|
||||
* Returns: %0 on success or -errno value on failure.
|
||||
*/
|
||||
static int
|
||||
tsi721_add_outb_message(struct rio_mport *mport, struct rio_dev *rdev, int mbox,
|
||||
@ -1869,6 +1896,8 @@ static void tsi721_omsg_handler(struct tsi721_device *priv, int ch)
|
||||
* @dev_id: Device specific pointer to pass on event
|
||||
* @mbox: Mailbox to open
|
||||
* @entries: Number of entries in the outbound mailbox ring
|
||||
*
|
||||
* Returns: %0 on success or -errno value on failure.
|
||||
*/
|
||||
static int tsi721_open_outb_mbox(struct rio_mport *mport, void *dev_id,
|
||||
int mbox, int entries)
|
||||
@ -2156,6 +2185,8 @@ static void tsi721_imsg_handler(struct tsi721_device *priv, int ch)
|
||||
* @dev_id: Device specific pointer to pass on event
|
||||
* @mbox: Mailbox to open
|
||||
* @entries: Number of entries in the inbound mailbox ring
|
||||
*
|
||||
* Returns: %0 on success or -errno value on failure.
|
||||
*/
|
||||
static int tsi721_open_inb_mbox(struct rio_mport *mport, void *dev_id,
|
||||
int mbox, int entries)
|
||||
@ -2409,6 +2440,8 @@ static void tsi721_close_inb_mbox(struct rio_mport *mport, int mbox)
|
||||
* @mport: Master port implementing the Inbound Messaging Engine
|
||||
* @mbox: Inbound mailbox number
|
||||
* @buf: Buffer to add to inbound queue
|
||||
*
|
||||
* Returns: %0 on success or -errno value on failure.
|
||||
*/
|
||||
static int tsi721_add_inb_buffer(struct rio_mport *mport, int mbox, void *buf)
|
||||
{
|
||||
@ -2439,7 +2472,7 @@ static int tsi721_add_inb_buffer(struct rio_mport *mport, int mbox, void *buf)
|
||||
* @mport: Master port implementing the Inbound Messaging Engine
|
||||
* @mbox: Inbound mailbox number
|
||||
*
|
||||
* Returns pointer to the message on success or NULL on failure.
|
||||
* Returns: pointer to the message on success or %NULL on failure.
|
||||
*/
|
||||
static void *tsi721_get_inb_message(struct rio_mport *mport, int mbox)
|
||||
{
|
||||
@ -2507,6 +2540,8 @@ static void *tsi721_get_inb_message(struct rio_mport *mport, int mbox)
|
||||
* @priv: pointer to tsi721 private data
|
||||
*
|
||||
* Configures Tsi721 messaging engine.
|
||||
*
|
||||
* Returns: %0
|
||||
*/
|
||||
static int tsi721_messages_init(struct tsi721_device *priv)
|
||||
{
|
||||
@ -2539,9 +2574,9 @@ static int tsi721_messages_init(struct tsi721_device *priv)
|
||||
/**
|
||||
* tsi721_query_mport - Fetch inbound message from the Tsi721 MSG Queue
|
||||
* @mport: Master port implementing the Inbound Messaging Engine
|
||||
* @mbox: Inbound mailbox number
|
||||
* @attr: mport device attributes
|
||||
*
|
||||
* Returns pointer to the message on success or NULL on failure.
|
||||
* Returns: pointer to the message on success or %NULL on failure.
|
||||
*/
|
||||
static int tsi721_query_mport(struct rio_mport *mport,
|
||||
struct rio_mport_attr *attr)
|
||||
@ -2653,6 +2688,8 @@ static void tsi721_mport_release(struct device *dev)
|
||||
* @priv: pointer to tsi721 private data
|
||||
*
|
||||
* Configures Tsi721 as RapidIO master port.
|
||||
*
|
||||
* Returns: %0 on success or -errno value on failure.
|
||||
*/
|
||||
static int tsi721_setup_mport(struct tsi721_device *priv)
|
||||
{
|
||||
|
@ -283,11 +283,13 @@ void tsi721_bdma_handler(struct tsi721_bdma_chan *bdma_chan)
|
||||
|
||||
#ifdef CONFIG_PCI_MSI
|
||||
/**
|
||||
* tsi721_omsg_msix - MSI-X interrupt handler for BDMA channels
|
||||
* tsi721_bdma_msix - MSI-X interrupt handler for BDMA channels
|
||||
* @irq: Linux interrupt number
|
||||
* @ptr: Pointer to interrupt-specific data (BDMA channel structure)
|
||||
*
|
||||
* Handles BDMA channel interrupts signaled using MSI-X.
|
||||
*
|
||||
* Returns: %IRQ_HANDLED
|
||||
*/
|
||||
static irqreturn_t tsi721_bdma_msix(int irq, void *ptr)
|
||||
{
|
||||
|
@ -1106,12 +1106,6 @@ static void dasd_statistics_removeroot(void)
|
||||
return;
|
||||
}
|
||||
|
||||
int dasd_stats_generic_show(struct seq_file *m, void *v)
|
||||
{
|
||||
seq_puts(m, "Statistics are not activated in this kernel\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void dasd_profile_init(struct dasd_profile *profile,
|
||||
struct dentry *base_dentry)
|
||||
{
|
||||
|
@ -288,7 +288,7 @@ static void fsl_usb2_mph_dr_of_remove(struct platform_device *ofdev)
|
||||
#define PHYCTRL_LSFE (1 << 1) /* Line State Filter Enable */
|
||||
#define PHYCTRL_PXE (1 << 0) /* PHY oscillator enable */
|
||||
|
||||
int fsl_usb2_mpc5121_init(struct platform_device *pdev)
|
||||
static int fsl_usb2_mpc5121_init(struct platform_device *pdev)
|
||||
{
|
||||
struct fsl_usb2_platform_data *pdata = dev_get_platdata(&pdev->dev);
|
||||
struct clk *clk;
|
||||
|
@ -1578,11 +1578,10 @@ static void check_unsafe_exec(struct linux_binprm *bprm)
|
||||
* will be able to manipulate the current directory, etc.
|
||||
* It would be nice to force an unshare instead...
|
||||
*/
|
||||
t = p;
|
||||
n_fs = 1;
|
||||
spin_lock(&p->fs->lock);
|
||||
rcu_read_lock();
|
||||
while_each_thread(p, t) {
|
||||
for_other_threads(p, t) {
|
||||
if (t->fs == p->fs)
|
||||
n_fs++;
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ vxfs_typdump(struct vxfs_typed *typ)
|
||||
/**
|
||||
* vxfs_bmap_ext4 - do bmap for ext4 extents
|
||||
* @ip: pointer to the inode we do bmap for
|
||||
* @iblock: logical block.
|
||||
* @bn: logical block.
|
||||
*
|
||||
* Description:
|
||||
* vxfs_bmap_ext4 performs the bmap operation for inodes with
|
||||
@ -97,7 +97,7 @@ vxfs_bmap_ext4(struct inode *ip, long bn)
|
||||
* vxfs_bmap_indir reads a &struct vxfs_typed at @indir
|
||||
* and performs the type-defined action.
|
||||
*
|
||||
* Return Value:
|
||||
* Returns:
|
||||
* The physical block number on success, else Zero.
|
||||
*
|
||||
* Note:
|
||||
@ -179,7 +179,7 @@ vxfs_bmap_indir(struct inode *ip, long indir, int size, long block)
|
||||
* Description:
|
||||
* Performs the bmap operation for typed extents.
|
||||
*
|
||||
* Return Value:
|
||||
* Returns:
|
||||
* The physical block number on success, else Zero.
|
||||
*/
|
||||
static daddr_t
|
||||
@ -243,7 +243,7 @@ vxfs_bmap_typed(struct inode *ip, long iblock)
|
||||
* vxfs_bmap1 perfoms a logical to physical block mapping
|
||||
* for vxfs-internal purposes.
|
||||
*
|
||||
* Return Value:
|
||||
* Returns:
|
||||
* The physical block number on success, else Zero.
|
||||
*/
|
||||
daddr_t
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user