From 0af96a024f524a5318485cbada73ab7d874895d4 Mon Sep 17 00:00:00 2001 From: Julia Lawall Date: Thu, 28 Apr 2022 23:17:25 -0700 Subject: ia64: fix typos in comments Various spelling mistakes in comments. Detected with the help of Coccinelle. Link: https://lkml.kernel.org/r/20220318103729.157574-1-Julia.Lawall@inria.fr Signed-off-by: Julia Lawall Signed-off-by: Andrew Morton --- arch/ia64/kernel/palinfo.c | 2 +- arch/ia64/kernel/traps.c | 2 +- arch/ia64/mm/init.c | 2 +- arch/ia64/mm/tlb.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'arch/ia64') diff --git a/arch/ia64/kernel/palinfo.c b/arch/ia64/kernel/palinfo.c index 64189f04c1a4..b9ae093bfe37 100644 --- a/arch/ia64/kernel/palinfo.c +++ b/arch/ia64/kernel/palinfo.c @@ -120,7 +120,7 @@ static const char *mem_attrib[]={ * Input: * - a pointer to a buffer to hold the string * - a 64-bit vector - * Ouput: + * Output: * - a pointer to the end of the buffer * */ diff --git a/arch/ia64/kernel/traps.c b/arch/ia64/kernel/traps.c index 753642366e12..53735b1d1be3 100644 --- a/arch/ia64/kernel/traps.c +++ b/arch/ia64/kernel/traps.c @@ -309,7 +309,7 @@ handle_fpu_swa (int fp_fault, struct pt_regs *regs, unsigned long isr) /* * Lower 4 bits are used as a count. Upper bits are a sequence * number that is updated when count is reset. The cmpxchg will - * fail is seqno has changed. This minimizes mutiple cpus + * fail is seqno has changed. This minimizes multiple cpus * resetting the count. */ if (current_jiffies > last.time) diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c index 5d165607bf35..7ae1244ed8ec 100644 --- a/arch/ia64/mm/init.c +++ b/arch/ia64/mm/init.c @@ -451,7 +451,7 @@ mem_init (void) memblock_free_all(); /* - * For fsyscall entrpoints with no light-weight handler, use the ordinary + * For fsyscall entrypoints with no light-weight handler, use the ordinary * (heavy-weight) handler, but mark it by setting bit 0, so the fsyscall entry * code can tell them apart. */ diff --git a/arch/ia64/mm/tlb.c b/arch/ia64/mm/tlb.c index 135b5135cace..ca060e7a2a46 100644 --- a/arch/ia64/mm/tlb.c +++ b/arch/ia64/mm/tlb.c @@ -174,7 +174,7 @@ __setup("nptcg=", set_nptcg); * override table (in which case we should ignore the value from * PAL_VM_SUMMARY). * - * Kernel parameter "nptcg=" overrides maximum number of simultanesous ptc.g + * Kernel parameter "nptcg=" overrides maximum number of simultaneous ptc.g * purges defined in either PAL_VM_SUMMARY or PAL override table. In this case, * we should ignore the value from either PAL_VM_SUMMARY or PAL override table. * @@ -516,7 +516,7 @@ found: if (i >= per_cpu(ia64_tr_num, cpu)) return -EBUSY; - /*Record tr info for mca hander use!*/ + /*Record tr info for mca handler use!*/ if (i > per_cpu(ia64_tr_used, cpu)) per_cpu(ia64_tr_used, cpu) = i; -- cgit v1.2.3 From 72a4fd6a7f032b921b1c195eb42a038ab9026021 Mon Sep 17 00:00:00 2001 From: Julia Lawall Date: Thu, 28 Apr 2022 23:17:25 -0700 Subject: ia64: ptrace: fix typos in comments Various spelling mistakes in comments. Detected with the help of Coccinelle. Link: https://lkml.kernel.org/r/20220318103729.157574-23-Julia.Lawall@inria.fr Signed-off-by: Julia Lawall Signed-off-by: Andrew Morton --- arch/ia64/kernel/ptrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/ia64') diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c index a19acd9f5e1f..4fc6e38a8459 100644 --- a/arch/ia64/kernel/ptrace.c +++ b/arch/ia64/kernel/ptrace.c @@ -2025,7 +2025,7 @@ static void syscall_get_args_cb(struct unw_frame_info *info, void *data) * - epsinstruction: cfm is set by br.call * locals don't exist. * - * For both cases argguments are reachable in cfm.sof - cfm.sol. + * For both cases arguments are reachable in cfm.sof - cfm.sol. * CFM: [ ... | sor: 17..14 | sol : 13..7 | sof : 6..0 ] */ cfm = pt->cr_ifs; -- cgit v1.2.3 From bd7155a0282e2f4e14260c30272d6472253e6564 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20St=C3=BCrz?= Date: Thu, 28 Apr 2022 23:17:25 -0700 Subject: ia64: replace comments with C99 initializers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This replaces comments with C99's designated initializers because the kernel supports them now. Link: https://lkml.kernel.org/r/20220326165909.506926-3-benni@stuerz.xyz Signed-off-by: Benjamin Stürz Signed-off-by: Andrew Morton --- arch/ia64/kernel/kprobes.c | 64 +++++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 32 deletions(-) (limited to 'arch/ia64') diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c index 1a7bab1c5d7c..ca34e51e84b4 100644 --- a/arch/ia64/kernel/kprobes.c +++ b/arch/ia64/kernel/kprobes.c @@ -29,38 +29,38 @@ struct kretprobe_blackpoint kretprobe_blacklist[] = {{NULL, NULL}}; enum instruction_type {A, I, M, F, B, L, X, u}; static enum instruction_type bundle_encoding[32][3] = { - { M, I, I }, /* 00 */ - { M, I, I }, /* 01 */ - { M, I, I }, /* 02 */ - { M, I, I }, /* 03 */ - { M, L, X }, /* 04 */ - { M, L, X }, /* 05 */ - { u, u, u }, /* 06 */ - { u, u, u }, /* 07 */ - { M, M, I }, /* 08 */ - { M, M, I }, /* 09 */ - { M, M, I }, /* 0A */ - { M, M, I }, /* 0B */ - { M, F, I }, /* 0C */ - { M, F, I }, /* 0D */ - { M, M, F }, /* 0E */ - { M, M, F }, /* 0F */ - { M, I, B }, /* 10 */ - { M, I, B }, /* 11 */ - { M, B, B }, /* 12 */ - { M, B, B }, /* 13 */ - { u, u, u }, /* 14 */ - { u, u, u }, /* 15 */ - { B, B, B }, /* 16 */ - { B, B, B }, /* 17 */ - { M, M, B }, /* 18 */ - { M, M, B }, /* 19 */ - { u, u, u }, /* 1A */ - { u, u, u }, /* 1B */ - { M, F, B }, /* 1C */ - { M, F, B }, /* 1D */ - { u, u, u }, /* 1E */ - { u, u, u }, /* 1F */ + [0x00] = { M, I, I }, + [0x01] = { M, I, I }, + [0x02] = { M, I, I }, + [0x03] = { M, I, I }, + [0x04] = { M, L, X }, + [0x05] = { M, L, X }, + [0x06] = { u, u, u }, + [0x07] = { u, u, u }, + [0x08] = { M, M, I }, + [0x09] = { M, M, I }, + [0x0A] = { M, M, I }, + [0x0B] = { M, M, I }, + [0x0C] = { M, F, I }, + [0x0D] = { M, F, I }, + [0x0E] = { M, M, F }, + [0x0F] = { M, M, F }, + [0x10] = { M, I, B }, + [0x11] = { M, I, B }, + [0x12] = { M, B, B }, + [0x13] = { M, B, B }, + [0x14] = { u, u, u }, + [0x15] = { u, u, u }, + [0x16] = { B, B, B }, + [0x17] = { B, B, B }, + [0x18] = { M, M, B }, + [0x19] = { M, M, B }, + [0x1A] = { u, u, u }, + [0x1B] = { u, u, u }, + [0x1C] = { M, F, B }, + [0x1D] = { M, F, B }, + [0x1E] = { u, u, u }, + [0x1F] = { u, u, u }, }; /* Insert a long branch code */ -- cgit v1.2.3 From 5d8de293c224896a4da99763fce4f9794308caf4 Mon Sep 17 00:00:00 2001 From: "Matthew Wilcox (Oracle)" Date: Fri, 29 Apr 2022 14:37:59 -0700 Subject: vmcore: convert copy_oldmem_page() to take an iov_iter Patch series "Convert vmcore to use an iov_iter", v5. For some reason several people have been sending bad patches to fix compiler warnings in vmcore recently. Here's how it should be done. Compile-tested only on x86. As noted in the first patch, s390 should take this conversion a bit further, but I'm not inclined to do that work myself. This patch (of 3): Instead of passing in a 'buf' and 'userbuf' argument, pass in an iov_iter. s390 needs more work to pass the iov_iter down further, or refactor, but I'd be more comfortable if someone who can test on s390 did that work. It's more convenient to convert the whole of read_from_oldmem() to take an iov_iter at the same time, so rename it to read_from_oldmem_iter() and add a temporary read_from_oldmem() wrapper that creates an iov_iter. Link: https://lkml.kernel.org/r/20220408090636.560886-1-bhe@redhat.com Link: https://lkml.kernel.org/r/20220408090636.560886-2-bhe@redhat.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Baoquan He Reviewed-by: Christoph Hellwig Cc: Heiko Carstens Signed-off-by: Andrew Morton --- arch/ia64/kernel/crash_dump.c | 32 ++++---------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) (limited to 'arch/ia64') diff --git a/arch/ia64/kernel/crash_dump.c b/arch/ia64/kernel/crash_dump.c index 0ed3c3dee4cd..4ef68e2aa757 100644 --- a/arch/ia64/kernel/crash_dump.c +++ b/arch/ia64/kernel/crash_dump.c @@ -10,42 +10,18 @@ #include #include #include - +#include #include -#include -/** - * copy_oldmem_page - copy one page from "oldmem" - * @pfn: page frame number to be copied - * @buf: target memory address for the copy; this can be in kernel address - * space or user address space (see @userbuf) - * @csize: number of bytes to copy - * @offset: offset in bytes into the page (based on pfn) to begin the copy - * @userbuf: if set, @buf is in user address space, use copy_to_user(), - * otherwise @buf is in kernel address space, use memcpy(). - * - * Copy a page from "oldmem". For this page, there is no pte mapped - * in the current kernel. We stitch up a pte, similar to kmap_atomic. - * - * Calling copy_to_user() in atomic context is not desirable. Hence first - * copying the data to a pre-allocated kernel page and then copying to user - * space in non-atomic context. - */ -ssize_t -copy_oldmem_page(unsigned long pfn, char *buf, - size_t csize, unsigned long offset, int userbuf) +ssize_t copy_oldmem_page(struct iov_iter *iter, unsigned long pfn, + size_t csize, unsigned long offset) { void *vaddr; if (!csize) return 0; vaddr = __va(pfn< Date: Thu, 12 May 2022 20:38:37 -0700 Subject: ia64: mca: drop redundant spinlock initialization mlogbuf_rlock has declared and initialized by DEFINE_SPINLOCK, so we don't need to spin_lock_init again, drop it. Link: https://lkml.kernel.org/r/1652176897-4754-1-git-send-email-baihaowen@meizu.com Signed-off-by: Haowen Bai Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton --- arch/ia64/kernel/mca.c | 1 - 1 file changed, 1 deletion(-) (limited to 'arch/ia64') diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c index e628a88607bb..c62a66710ad6 100644 --- a/arch/ia64/kernel/mca.c +++ b/arch/ia64/kernel/mca.c @@ -290,7 +290,6 @@ static void ia64_mlogbuf_finish(int wait) { BREAK_LOGLEVEL(console_loglevel); - spin_lock_init(&mlogbuf_rlock); ia64_mlogbuf_dump(); printk(KERN_EMERG "mlogbuf_finish: printing switched to urgent mode, " "MCA/INIT might be dodgy or fail.\n"); -- cgit v1.2.3