From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: + lib-test_lockup-test-module-to-generate-lockups-fix.patch added to -mm tree Date: Tue, 17 Mar 2020 20:19:11 -0700 Message-ID: <20200318031911.h-a7sZwhZ%akpm@linux-foundation.org> References: <20200305222751.6d781a3f2802d79510941e4e@linux-foundation.org> Reply-To: linux-kernel@vger.kernel.org Return-path: Received: from mail.kernel.org ([198.145.29.99]:59266 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726229AbgCRDTM (ORCPT ); Tue, 17 Mar 2020 23:19:12 -0400 In-Reply-To: <20200305222751.6d781a3f2802d79510941e4e@linux-foundation.org> Sender: mm-commits-owner@vger.kernel.org List-Id: mm-commits@vger.kernel.org To: khlebnikov@yandex-team.ru, linux@roeck-us.net, mm-commits@vger.kernel.org The patch titled Subject: lib/test_lockup: rename disable_irq to fix build error has been added to the -mm tree. Its filename is lib-test_lockup-test-module-to-generate-lockups-fix.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/lib-test_lockup-test-module-to-generate-lockups-fix.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/lib-test_lockup-test-module-to-generate-lockups-fix.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Guenter Roeck Subject: lib/test_lockup: rename disable_irq to fix build error mips:allmodconfig fails to build. lib/test_lockup.c:87:13: error: 'disable_irq' redeclared as different kind of symbol 87 | static bool disable_irq; | ^~~~~~~~~~~ In file included from arch/mips/include/asm/highmem.h:24, from arch/mips/include/asm/pgtable-32.h:22, from arch/mips/include/asm/pgtable.h:14, from include/linux/mm.h:95, from lib/test_lockup.c:15: include/linux/interrupt.h:237:13: note: previous declaration of 'disable_irq' was here 237 | extern void disable_irq(unsigned int irq); Rename the variable to fix the problem. Link: http://lkml.kernel.org/r/20200317133614.23152-1-linux@roeck-us.net Fixes: 0e86238873f3 ("lib/test_lockup: test module to generate lockups") Signed-off-by: Guenter Roeck Cc: Konstantin Khlebnikov Signed-off-by: Andrew Morton --- lib/test_lockup.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) --- a/lib/test_lockup.c~lib-test_lockup-test-module-to-generate-lockups-fix +++ a/lib/test_lockup.c @@ -84,8 +84,8 @@ static unsigned long lock_wait_threshold module_param(lock_wait_threshold, ulong, 0400); MODULE_PARM_DESC(lock_wait_threshold, "print lock wait time longer than this in nanoseconds, default off"); -static bool disable_irq; -module_param(disable_irq, bool, 0400); +static bool test_disable_irq; +module_param_named(disable_irq, test_disable_irq, bool, 0400); MODULE_PARM_DESC(disable_irq, "disable interrupts: generate hard-lockups"); static bool disable_softirq; @@ -179,7 +179,7 @@ static void test_lock(bool master, bool down_write(&main_task->mm->mmap_sem); } - if (disable_irq) + if (test_disable_irq) local_irq_disable(); if (disable_softirq) @@ -252,7 +252,7 @@ static void test_unlock(bool master, boo if (disable_softirq) local_bh_enable(); - if (disable_irq) + if (test_disable_irq) local_irq_enable(); if (lock_mmap_sem && master) { @@ -479,8 +479,8 @@ static int __init test_lockup_init(void) if ((wait_state != TASK_RUNNING || (call_cond_resched && !reacquire_locks) || (alloc_pages_nr && gfpflags_allow_blocking(alloc_pages_gfp))) && - (disable_irq || disable_softirq || disable_preempt || lock_rcu || - lock_spinlock_ptr || lock_rwlock_ptr)) { + (test_disable_irq || disable_softirq || disable_preempt || + lock_rcu || lock_spinlock_ptr || lock_rwlock_ptr)) { pr_err("refuse to sleep in atomic context\n"); return -EINVAL; } @@ -495,7 +495,7 @@ static int __init test_lockup_init(void) cooldown_secs, cooldown_nsecs, iterations, state, all_cpus ? "all_cpus " : "", iowait ? "iowait " : "", - disable_irq ? "disable_irq " : "", + test_disable_irq ? "disable_irq " : "", disable_softirq ? "disable_softirq " : "", disable_preempt ? "disable_preempt " : "", lock_rcu ? "lock_rcu " : "", _ Patches currently in -mm which might be from linux@roeck-us.net are lib-test_lockup-test-module-to-generate-lockups-fix.patch