Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak to support 1Mbaud and similar baudrates that require Mode16 instea... #26

Closed
wants to merge 1 commit into from
Closed

Tweak to support 1Mbaud and similar baudrates that require Mode16 instea... #26

wants to merge 1 commit into from

Conversation

alexey-pelykh
Copy link
Contributor

...d of Mode13

@torvalds
Copy link
Owner

Nobody takes kernel pulls from github pull requests. Stop doing them. They
are crap.

Use the "git request-pull" scripting instead, which does this properly.

         Linus

hzhuang1 pushed a commit to hzhuang1/linux that referenced this pull request Dec 4, 2012
WARNING: line over 80 characters
torvalds#24: FILE: fs/binfmt_elf.c:1604:
+		info->psinfo.data = NULL;	/* So we don't free this wrongly */

ERROR: code indent should use tabs where possible
torvalds#26: FILE: fs/binfmt_elf.c:1606:
+        }$

WARNING: please, no spaces at the start of a line
torvalds#26: FILE: fs/binfmt_elf.c:1606:
+        }$

total: 1 errors, 2 warnings, 11 lines checked

NOTE: whitespace errors detected, you may wish to use scripts/cleanpatch or
      scripts/cleanfile

./patches/binfmt_elf-fix-corner-case-kfree-of-uninitialized-data.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tobetter referenced this pull request in tobetter/linux Dec 12, 2012
WARNING: line over 80 characters
#24: FILE: fs/binfmt_elf.c:1604:
+		info->psinfo.data = NULL;	/* So we don't free this wrongly */

ERROR: code indent should use tabs where possible
#26: FILE: fs/binfmt_elf.c:1606:
+        }$

WARNING: please, no spaces at the start of a line
#26: FILE: fs/binfmt_elf.c:1606:
+        }$

total: 1 errors, 2 warnings, 11 lines checked

NOTE: whitespace errors detected, you may wish to use scripts/cleanpatch or
      scripts/cleanfile

./patches/binfmt_elf-fix-corner-case-kfree-of-uninitialized-data.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
vineetgarc referenced this pull request in foss-for-synopsys-dwc-arc-processors/linux Dec 31, 2012
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
hardkernel referenced this pull request in hardkernel/linux Dec 31, 2012
commit fe20b39 upstream.

reg_timeout_work() calls restore_regulatory_settings() which
takes cfg80211_mutex.

reg_set_request_processed() already holds cfg80211_mutex
before calling cancel_delayed_work_sync(reg_timeout),
so it might deadlock.

Call the async cancel_delayed_work instead, in order
to avoid the potential deadlock.

This is the relevant lockdep warning:

cfg80211: Calling CRDA for country: XX

======================================================
[ INFO: possible circular locking dependency detected ]
3.4.0-rc5-wl+ #26 Not tainted
-------------------------------------------------------
kworker/0:2/1391 is trying to acquire lock:
 (cfg80211_mutex){+.+.+.}, at: [<bf28ae00>] restore_regulatory_settings+0x34/0x418 [cfg80211]

but task is already holding lock:
 ((reg_timeout).work){+.+...}, at: [<c0059e94>] process_one_work+0x1f0/0x480

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-> #2 ((reg_timeout).work){+.+...}:
       [<c008fd44>] validate_chain+0xb94/0x10f0
       [<c0090b68>] __lock_acquire+0x8c8/0x9b0
       [<c0090d40>] lock_acquire+0xf0/0x114
       [<c005b600>] wait_on_work+0x4c/0x154
       [<c005c000>] __cancel_work_timer+0xd4/0x11c
       [<c005c064>] cancel_delayed_work_sync+0x1c/0x20
       [<bf28b274>] reg_set_request_processed+0x50/0x78 [cfg80211]
       [<bf28bd84>] set_regdom+0x550/0x600 [cfg80211]
       [<bf294cd8>] nl80211_set_reg+0x218/0x258 [cfg80211]
       [<c03c7738>] genl_rcv_msg+0x1a8/0x1e8
       [<c03c6a00>] netlink_rcv_skb+0x5c/0xc0
       [<c03c7584>] genl_rcv+0x28/0x34
       [<c03c6720>] netlink_unicast+0x15c/0x228
       [<c03c6c7c>] netlink_sendmsg+0x218/0x298
       [<c03933c8>] sock_sendmsg+0xa4/0xc0
       [<c039406c>] __sys_sendmsg+0x1e4/0x268
       [<c0394228>] sys_sendmsg+0x4c/0x70
       [<c0013840>] ret_fast_syscall+0x0/0x3c

-> #1 (reg_mutex){+.+.+.}:
       [<c008fd44>] validate_chain+0xb94/0x10f0
       [<c0090b68>] __lock_acquire+0x8c8/0x9b0
       [<c0090d40>] lock_acquire+0xf0/0x114
       [<c04734dc>] mutex_lock_nested+0x48/0x320
       [<bf28b2cc>] reg_todo+0x30/0x538 [cfg80211]
       [<c0059f44>] process_one_work+0x2a0/0x480
       [<c005a4b4>] worker_thread+0x1bc/0x2bc
       [<c0061148>] kthread+0x98/0xa4
       [<c0014af4>] kernel_thread_exit+0x0/0x8

-> #0 (cfg80211_mutex){+.+.+.}:
       [<c008ed58>] print_circular_bug+0x68/0x2cc
       [<c008fb28>] validate_chain+0x978/0x10f0
       [<c0090b68>] __lock_acquire+0x8c8/0x9b0
       [<c0090d40>] lock_acquire+0xf0/0x114
       [<c04734dc>] mutex_lock_nested+0x48/0x320
       [<bf28ae00>] restore_regulatory_settings+0x34/0x418 [cfg80211]
       [<bf28b200>] reg_timeout_work+0x1c/0x20 [cfg80211]
       [<c0059f44>] process_one_work+0x2a0/0x480
       [<c005a4b4>] worker_thread+0x1bc/0x2bc
       [<c0061148>] kthread+0x98/0xa4
       [<c0014af4>] kernel_thread_exit+0x0/0x8

other info that might help us debug this:

Chain exists of:
  cfg80211_mutex --> reg_mutex --> (reg_timeout).work

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock((reg_timeout).work);
                               lock(reg_mutex);
                               lock((reg_timeout).work);
  lock(cfg80211_mutex);

 *** DEADLOCK ***

2 locks held by kworker/0:2/1391:
 #0:  (events){.+.+.+}, at: [<c0059e94>] process_one_work+0x1f0/0x480
 #1:  ((reg_timeout).work){+.+...}, at: [<c0059e94>] process_one_work+0x1f0/0x480

stack backtrace:
[<c001b928>] (unwind_backtrace+0x0/0x12c) from [<c0471d3c>] (dump_stack+0x20/0x24)
[<c0471d3c>] (dump_stack+0x20/0x24) from [<c008ef70>] (print_circular_bug+0x280/0x2cc)
[<c008ef70>] (print_circular_bug+0x280/0x2cc) from [<c008fb28>] (validate_chain+0x978/0x10f0)
[<c008fb28>] (validate_chain+0x978/0x10f0) from [<c0090b68>] (__lock_acquire+0x8c8/0x9b0)
[<c0090b68>] (__lock_acquire+0x8c8/0x9b0) from [<c0090d40>] (lock_acquire+0xf0/0x114)
[<c0090d40>] (lock_acquire+0xf0/0x114) from [<c04734dc>] (mutex_lock_nested+0x48/0x320)
[<c04734dc>] (mutex_lock_nested+0x48/0x320) from [<bf28ae00>] (restore_regulatory_settings+0x34/0x418 [cfg80211])
[<bf28ae00>] (restore_regulatory_settings+0x34/0x418 [cfg80211]) from [<bf28b200>] (reg_timeout_work+0x1c/0x20 [cfg80211])
[<bf28b200>] (reg_timeout_work+0x1c/0x20 [cfg80211]) from [<c0059f44>] (process_one_work+0x2a0/0x480)
[<c0059f44>] (process_one_work+0x2a0/0x480) from [<c005a4b4>] (worker_thread+0x1bc/0x2bc)
[<c005a4b4>] (worker_thread+0x1bc/0x2bc) from [<c0061148>] (kthread+0x98/0xa4)
[<c0061148>] (kthread+0x98/0xa4) from [<c0014af4>] (kernel_thread_exit+0x0/0x8)
cfg80211: Calling CRDA to update world regulatory domain
cfg80211: World regulatory domain updated:
cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
modmaker pushed a commit to modmaker/linux that referenced this pull request Jan 22, 2013
commit fe20b39 upstream.

reg_timeout_work() calls restore_regulatory_settings() which
takes cfg80211_mutex.

reg_set_request_processed() already holds cfg80211_mutex
before calling cancel_delayed_work_sync(reg_timeout),
so it might deadlock.

Call the async cancel_delayed_work instead, in order
to avoid the potential deadlock.

This is the relevant lockdep warning:

cfg80211: Calling CRDA for country: XX

======================================================
[ INFO: possible circular locking dependency detected ]
3.4.0-rc5-wl+ torvalds#26 Not tainted
-------------------------------------------------------
kworker/0:2/1391 is trying to acquire lock:
 (cfg80211_mutex){+.+.+.}, at: [<bf28ae00>] restore_regulatory_settings+0x34/0x418 [cfg80211]

but task is already holding lock:
 ((reg_timeout).work){+.+...}, at: [<c0059e94>] process_one_work+0x1f0/0x480

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-> koenkooi#2 ((reg_timeout).work){+.+...}:
       [<c008fd44>] validate_chain+0xb94/0x10f0
       [<c0090b68>] __lock_acquire+0x8c8/0x9b0
       [<c0090d40>] lock_acquire+0xf0/0x114
       [<c005b600>] wait_on_work+0x4c/0x154
       [<c005c000>] __cancel_work_timer+0xd4/0x11c
       [<c005c064>] cancel_delayed_work_sync+0x1c/0x20
       [<bf28b274>] reg_set_request_processed+0x50/0x78 [cfg80211]
       [<bf28bd84>] set_regdom+0x550/0x600 [cfg80211]
       [<bf294cd8>] nl80211_set_reg+0x218/0x258 [cfg80211]
       [<c03c7738>] genl_rcv_msg+0x1a8/0x1e8
       [<c03c6a00>] netlink_rcv_skb+0x5c/0xc0
       [<c03c7584>] genl_rcv+0x28/0x34
       [<c03c6720>] netlink_unicast+0x15c/0x228
       [<c03c6c7c>] netlink_sendmsg+0x218/0x298
       [<c03933c8>] sock_sendmsg+0xa4/0xc0
       [<c039406c>] __sys_sendmsg+0x1e4/0x268
       [<c0394228>] sys_sendmsg+0x4c/0x70
       [<c0013840>] ret_fast_syscall+0x0/0x3c

-> koenkooi#1 (reg_mutex){+.+.+.}:
       [<c008fd44>] validate_chain+0xb94/0x10f0
       [<c0090b68>] __lock_acquire+0x8c8/0x9b0
       [<c0090d40>] lock_acquire+0xf0/0x114
       [<c04734dc>] mutex_lock_nested+0x48/0x320
       [<bf28b2cc>] reg_todo+0x30/0x538 [cfg80211]
       [<c0059f44>] process_one_work+0x2a0/0x480
       [<c005a4b4>] worker_thread+0x1bc/0x2bc
       [<c0061148>] kthread+0x98/0xa4
       [<c0014af4>] kernel_thread_exit+0x0/0x8

-> #0 (cfg80211_mutex){+.+.+.}:
       [<c008ed58>] print_circular_bug+0x68/0x2cc
       [<c008fb28>] validate_chain+0x978/0x10f0
       [<c0090b68>] __lock_acquire+0x8c8/0x9b0
       [<c0090d40>] lock_acquire+0xf0/0x114
       [<c04734dc>] mutex_lock_nested+0x48/0x320
       [<bf28ae00>] restore_regulatory_settings+0x34/0x418 [cfg80211]
       [<bf28b200>] reg_timeout_work+0x1c/0x20 [cfg80211]
       [<c0059f44>] process_one_work+0x2a0/0x480
       [<c005a4b4>] worker_thread+0x1bc/0x2bc
       [<c0061148>] kthread+0x98/0xa4
       [<c0014af4>] kernel_thread_exit+0x0/0x8

other info that might help us debug this:

Chain exists of:
  cfg80211_mutex --> reg_mutex --> (reg_timeout).work

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock((reg_timeout).work);
                               lock(reg_mutex);
                               lock((reg_timeout).work);
  lock(cfg80211_mutex);

 *** DEADLOCK ***

2 locks held by kworker/0:2/1391:
 #0:  (events){.+.+.+}, at: [<c0059e94>] process_one_work+0x1f0/0x480
 koenkooi#1:  ((reg_timeout).work){+.+...}, at: [<c0059e94>] process_one_work+0x1f0/0x480

stack backtrace:
[<c001b928>] (unwind_backtrace+0x0/0x12c) from [<c0471d3c>] (dump_stack+0x20/0x24)
[<c0471d3c>] (dump_stack+0x20/0x24) from [<c008ef70>] (print_circular_bug+0x280/0x2cc)
[<c008ef70>] (print_circular_bug+0x280/0x2cc) from [<c008fb28>] (validate_chain+0x978/0x10f0)
[<c008fb28>] (validate_chain+0x978/0x10f0) from [<c0090b68>] (__lock_acquire+0x8c8/0x9b0)
[<c0090b68>] (__lock_acquire+0x8c8/0x9b0) from [<c0090d40>] (lock_acquire+0xf0/0x114)
[<c0090d40>] (lock_acquire+0xf0/0x114) from [<c04734dc>] (mutex_lock_nested+0x48/0x320)
[<c04734dc>] (mutex_lock_nested+0x48/0x320) from [<bf28ae00>] (restore_regulatory_settings+0x34/0x418 [cfg80211])
[<bf28ae00>] (restore_regulatory_settings+0x34/0x418 [cfg80211]) from [<bf28b200>] (reg_timeout_work+0x1c/0x20 [cfg80211])
[<bf28b200>] (reg_timeout_work+0x1c/0x20 [cfg80211]) from [<c0059f44>] (process_one_work+0x2a0/0x480)
[<c0059f44>] (process_one_work+0x2a0/0x480) from [<c005a4b4>] (worker_thread+0x1bc/0x2bc)
[<c005a4b4>] (worker_thread+0x1bc/0x2bc) from [<c0061148>] (kthread+0x98/0xa4)
[<c0061148>] (kthread+0x98/0xa4) from [<c0014af4>] (kernel_thread_exit+0x0/0x8)
cfg80211: Calling CRDA to update world regulatory domain
cfg80211: World regulatory domain updated:
cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
amery referenced this pull request in amery/linux-sunxi Feb 11, 2013
=======================================================
[ INFO: possible circular locking dependency detected ]
3.0.0-rc3+ linux-sunxi#26
-------------------------------------------------------
ip/1104 is trying to acquire lock:
 (local_softirq_lock){+.+...}, at: [<ffffffff81056d12>] __local_lock+0x25/0x68

but task is already holding lock:
 (sk_lock-AF_INET){+.+...}, at: [<ffffffff81433308>] lock_sock+0x10/0x12

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> linux-sunxi#1 (sk_lock-AF_INET){+.+...}:
       [<ffffffff810836e5>] lock_acquire+0x103/0x12e
       [<ffffffff813e2781>] lock_sock_nested+0x82/0x92
       [<ffffffff81433308>] lock_sock+0x10/0x12
       [<ffffffff81433afa>] tcp_close+0x1b/0x355
       [<ffffffff81453c99>] inet_release+0xc3/0xcd
       [<ffffffff813dff3f>] sock_release+0x1f/0x74
       [<ffffffff813dffbb>] sock_close+0x27/0x2b
       [<ffffffff81129c63>] fput+0x11d/0x1e3
       [<ffffffff81126577>] filp_close+0x70/0x7b
       [<ffffffff8112667a>] sys_close+0xf8/0x13d
       [<ffffffff814ae882>] system_call_fastpath+0x16/0x1b

-> #0 (local_softirq_lock){+.+...}:
       [<ffffffff81082ecc>] __lock_acquire+0xacc/0xdc8
       [<ffffffff810836e5>] lock_acquire+0x103/0x12e
       [<ffffffff814a7e40>] _raw_spin_lock+0x3b/0x4a
       [<ffffffff81056d12>] __local_lock+0x25/0x68
       [<ffffffff81056d8b>] local_bh_disable+0x36/0x3b
       [<ffffffff814a7fc4>] _raw_write_lock_bh+0x16/0x4f
       [<ffffffff81433c38>] tcp_close+0x159/0x355
       [<ffffffff81453c99>] inet_release+0xc3/0xcd
       [<ffffffff813dff3f>] sock_release+0x1f/0x74
       [<ffffffff813dffbb>] sock_close+0x27/0x2b
       [<ffffffff81129c63>] fput+0x11d/0x1e3
       [<ffffffff81126577>] filp_close+0x70/0x7b
       [<ffffffff8112667a>] sys_close+0xf8/0x13d
       [<ffffffff814ae882>] system_call_fastpath+0x16/0x1b

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(sk_lock-AF_INET);
                               lock(local_softirq_lock);
                               lock(sk_lock-AF_INET);
  lock(local_softirq_lock);

 *** DEADLOCK ***

1 lock held by ip/1104:
 #0:  (sk_lock-AF_INET){+.+...}, at: [<ffffffff81433308>] lock_sock+0x10/0x12

stack backtrace:
Pid: 1104, comm: ip Not tainted 3.0.0-rc3+ linux-sunxi#26
Call Trace:
 [<ffffffff81081649>] print_circular_bug+0x1f8/0x209
 [<ffffffff81082ecc>] __lock_acquire+0xacc/0xdc8
 [<ffffffff81056d12>] ? __local_lock+0x25/0x68
 [<ffffffff810836e5>] lock_acquire+0x103/0x12e
 [<ffffffff81056d12>] ? __local_lock+0x25/0x68
 [<ffffffff81046c75>] ? get_parent_ip+0x11/0x41
 [<ffffffff814a7e40>] _raw_spin_lock+0x3b/0x4a
 [<ffffffff81056d12>] ? __local_lock+0x25/0x68
 [<ffffffff81046c8c>] ? get_parent_ip+0x28/0x41
 [<ffffffff81056d12>] __local_lock+0x25/0x68
 [<ffffffff81056d8b>] local_bh_disable+0x36/0x3b
 [<ffffffff81433308>] ? lock_sock+0x10/0x12
 [<ffffffff814a7fc4>] _raw_write_lock_bh+0x16/0x4f
 [<ffffffff81433c38>] tcp_close+0x159/0x355
 [<ffffffff81453c99>] inet_release+0xc3/0xcd
 [<ffffffff813dff3f>] sock_release+0x1f/0x74
 [<ffffffff813dffbb>] sock_close+0x27/0x2b
 [<ffffffff81129c63>] fput+0x11d/0x1e3
 [<ffffffff81126577>] filp_close+0x70/0x7b
 [<ffffffff8112667a>] sys_close+0xf8/0x13d
 [<ffffffff814ae882>] system_call_fastpath+0x16/0x1b


Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kvaneesh pushed a commit to kvaneesh/linux that referenced this pull request Feb 18, 2013
Printing the "start_ip" for every secondary cpu is very noisy on a large
system - and doesn't add any value. Drop this message.

Console log before:
Booting Node   0, Processors  #1
smpboot cpu 1: start_ip = 96000
 #2
smpboot cpu 2: start_ip = 96000
 #3
smpboot cpu 3: start_ip = 96000
 #4
smpboot cpu 4: start_ip = 96000
       ...
 torvalds#31
smpboot cpu 31: start_ip = 96000
Brought up 32 CPUs

Console log after:
Booting Node   0, Processors  #1 #2 #3 #4 #5 torvalds#6 torvalds#7 Ok.
Booting Node   1, Processors  torvalds#8 torvalds#9 torvalds#10 torvalds#11 torvalds#12 torvalds#13 torvalds#14 torvalds#15 Ok.
Booting Node   0, Processors  torvalds#16 torvalds#17 torvalds#18 torvalds#19 torvalds#20 torvalds#21 torvalds#22 torvalds#23 Ok.
Booting Node   1, Processors  torvalds#24 torvalds#25 torvalds#26 torvalds#27 torvalds#28 torvalds#29 torvalds#30 torvalds#31
Brought up 32 CPUs

Acked-by: Borislav Petkov <bp@amd64.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Link: http://lkml.kernel.org/r/4f452eb42507460426@agluck-desktop.sc.intel.com
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
cianmcgovern pushed a commit to cianmcgovern/linux that referenced this pull request Mar 10, 2013
commit fe20b39 upstream.

reg_timeout_work() calls restore_regulatory_settings() which
takes cfg80211_mutex.

reg_set_request_processed() already holds cfg80211_mutex
before calling cancel_delayed_work_sync(reg_timeout),
so it might deadlock.

Call the async cancel_delayed_work instead, in order
to avoid the potential deadlock.

This is the relevant lockdep warning:

cfg80211: Calling CRDA for country: XX

======================================================
[ INFO: possible circular locking dependency detected ]
3.4.0-rc5-wl+ torvalds#26 Not tainted
-------------------------------------------------------
kworker/0:2/1391 is trying to acquire lock:
 (cfg80211_mutex){+.+.+.}, at: [<bf28ae00>] restore_regulatory_settings+0x34/0x418 [cfg80211]

but task is already holding lock:
 ((reg_timeout).work){+.+...}, at: [<c0059e94>] process_one_work+0x1f0/0x480

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-> #2 ((reg_timeout).work){+.+...}:
       [<c008fd44>] validate_chain+0xb94/0x10f0
       [<c0090b68>] __lock_acquire+0x8c8/0x9b0
       [<c0090d40>] lock_acquire+0xf0/0x114
       [<c005b600>] wait_on_work+0x4c/0x154
       [<c005c000>] __cancel_work_timer+0xd4/0x11c
       [<c005c064>] cancel_delayed_work_sync+0x1c/0x20
       [<bf28b274>] reg_set_request_processed+0x50/0x78 [cfg80211]
       [<bf28bd84>] set_regdom+0x550/0x600 [cfg80211]
       [<bf294cd8>] nl80211_set_reg+0x218/0x258 [cfg80211]
       [<c03c7738>] genl_rcv_msg+0x1a8/0x1e8
       [<c03c6a00>] netlink_rcv_skb+0x5c/0xc0
       [<c03c7584>] genl_rcv+0x28/0x34
       [<c03c6720>] netlink_unicast+0x15c/0x228
       [<c03c6c7c>] netlink_sendmsg+0x218/0x298
       [<c03933c8>] sock_sendmsg+0xa4/0xc0
       [<c039406c>] __sys_sendmsg+0x1e4/0x268
       [<c0394228>] sys_sendmsg+0x4c/0x70
       [<c0013840>] ret_fast_syscall+0x0/0x3c

-> #1 (reg_mutex){+.+.+.}:
       [<c008fd44>] validate_chain+0xb94/0x10f0
       [<c0090b68>] __lock_acquire+0x8c8/0x9b0
       [<c0090d40>] lock_acquire+0xf0/0x114
       [<c04734dc>] mutex_lock_nested+0x48/0x320
       [<bf28b2cc>] reg_todo+0x30/0x538 [cfg80211]
       [<c0059f44>] process_one_work+0x2a0/0x480
       [<c005a4b4>] worker_thread+0x1bc/0x2bc
       [<c0061148>] kthread+0x98/0xa4
       [<c0014af4>] kernel_thread_exit+0x0/0x8

-> #0 (cfg80211_mutex){+.+.+.}:
       [<c008ed58>] print_circular_bug+0x68/0x2cc
       [<c008fb28>] validate_chain+0x978/0x10f0
       [<c0090b68>] __lock_acquire+0x8c8/0x9b0
       [<c0090d40>] lock_acquire+0xf0/0x114
       [<c04734dc>] mutex_lock_nested+0x48/0x320
       [<bf28ae00>] restore_regulatory_settings+0x34/0x418 [cfg80211]
       [<bf28b200>] reg_timeout_work+0x1c/0x20 [cfg80211]
       [<c0059f44>] process_one_work+0x2a0/0x480
       [<c005a4b4>] worker_thread+0x1bc/0x2bc
       [<c0061148>] kthread+0x98/0xa4
       [<c0014af4>] kernel_thread_exit+0x0/0x8

other info that might help us debug this:

Chain exists of:
  cfg80211_mutex --> reg_mutex --> (reg_timeout).work

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock((reg_timeout).work);
                               lock(reg_mutex);
                               lock((reg_timeout).work);
  lock(cfg80211_mutex);

 *** DEADLOCK ***

2 locks held by kworker/0:2/1391:
 #0:  (events){.+.+.+}, at: [<c0059e94>] process_one_work+0x1f0/0x480
 #1:  ((reg_timeout).work){+.+...}, at: [<c0059e94>] process_one_work+0x1f0/0x480

stack backtrace:
[<c001b928>] (unwind_backtrace+0x0/0x12c) from [<c0471d3c>] (dump_stack+0x20/0x24)
[<c0471d3c>] (dump_stack+0x20/0x24) from [<c008ef70>] (print_circular_bug+0x280/0x2cc)
[<c008ef70>] (print_circular_bug+0x280/0x2cc) from [<c008fb28>] (validate_chain+0x978/0x10f0)
[<c008fb28>] (validate_chain+0x978/0x10f0) from [<c0090b68>] (__lock_acquire+0x8c8/0x9b0)
[<c0090b68>] (__lock_acquire+0x8c8/0x9b0) from [<c0090d40>] (lock_acquire+0xf0/0x114)
[<c0090d40>] (lock_acquire+0xf0/0x114) from [<c04734dc>] (mutex_lock_nested+0x48/0x320)
[<c04734dc>] (mutex_lock_nested+0x48/0x320) from [<bf28ae00>] (restore_regulatory_settings+0x34/0x418 [cfg80211])
[<bf28ae00>] (restore_regulatory_settings+0x34/0x418 [cfg80211]) from [<bf28b200>] (reg_timeout_work+0x1c/0x20 [cfg80211])
[<bf28b200>] (reg_timeout_work+0x1c/0x20 [cfg80211]) from [<c0059f44>] (process_one_work+0x2a0/0x480)
[<c0059f44>] (process_one_work+0x2a0/0x480) from [<c005a4b4>] (worker_thread+0x1bc/0x2bc)
[<c005a4b4>] (worker_thread+0x1bc/0x2bc) from [<c0061148>] (kthread+0x98/0xa4)
[<c0061148>] (kthread+0x98/0xa4) from [<c0014af4>] (kernel_thread_exit+0x0/0x8)
cfg80211: Calling CRDA to update world regulatory domain
cfg80211: World regulatory domain updated:
cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
dormando pushed a commit to fastly/linux that referenced this pull request Mar 30, 2013
commit fe20b39 upstream.

reg_timeout_work() calls restore_regulatory_settings() which
takes cfg80211_mutex.

reg_set_request_processed() already holds cfg80211_mutex
before calling cancel_delayed_work_sync(reg_timeout),
so it might deadlock.

Call the async cancel_delayed_work instead, in order
to avoid the potential deadlock.

This is the relevant lockdep warning:

cfg80211: Calling CRDA for country: XX

======================================================
[ INFO: possible circular locking dependency detected ]
3.4.0-rc5-wl+ torvalds#26 Not tainted
-------------------------------------------------------
kworker/0:2/1391 is trying to acquire lock:
 (cfg80211_mutex){+.+.+.}, at: [<bf28ae00>] restore_regulatory_settings+0x34/0x418 [cfg80211]

but task is already holding lock:
 ((reg_timeout).work){+.+...}, at: [<c0059e94>] process_one_work+0x1f0/0x480

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-> #2 ((reg_timeout).work){+.+...}:
       [<c008fd44>] validate_chain+0xb94/0x10f0
       [<c0090b68>] __lock_acquire+0x8c8/0x9b0
       [<c0090d40>] lock_acquire+0xf0/0x114
       [<c005b600>] wait_on_work+0x4c/0x154
       [<c005c000>] __cancel_work_timer+0xd4/0x11c
       [<c005c064>] cancel_delayed_work_sync+0x1c/0x20
       [<bf28b274>] reg_set_request_processed+0x50/0x78 [cfg80211]
       [<bf28bd84>] set_regdom+0x550/0x600 [cfg80211]
       [<bf294cd8>] nl80211_set_reg+0x218/0x258 [cfg80211]
       [<c03c7738>] genl_rcv_msg+0x1a8/0x1e8
       [<c03c6a00>] netlink_rcv_skb+0x5c/0xc0
       [<c03c7584>] genl_rcv+0x28/0x34
       [<c03c6720>] netlink_unicast+0x15c/0x228
       [<c03c6c7c>] netlink_sendmsg+0x218/0x298
       [<c03933c8>] sock_sendmsg+0xa4/0xc0
       [<c039406c>] __sys_sendmsg+0x1e4/0x268
       [<c0394228>] sys_sendmsg+0x4c/0x70
       [<c0013840>] ret_fast_syscall+0x0/0x3c

-> #1 (reg_mutex){+.+.+.}:
       [<c008fd44>] validate_chain+0xb94/0x10f0
       [<c0090b68>] __lock_acquire+0x8c8/0x9b0
       [<c0090d40>] lock_acquire+0xf0/0x114
       [<c04734dc>] mutex_lock_nested+0x48/0x320
       [<bf28b2cc>] reg_todo+0x30/0x538 [cfg80211]
       [<c0059f44>] process_one_work+0x2a0/0x480
       [<c005a4b4>] worker_thread+0x1bc/0x2bc
       [<c0061148>] kthread+0x98/0xa4
       [<c0014af4>] kernel_thread_exit+0x0/0x8

-> #0 (cfg80211_mutex){+.+.+.}:
       [<c008ed58>] print_circular_bug+0x68/0x2cc
       [<c008fb28>] validate_chain+0x978/0x10f0
       [<c0090b68>] __lock_acquire+0x8c8/0x9b0
       [<c0090d40>] lock_acquire+0xf0/0x114
       [<c04734dc>] mutex_lock_nested+0x48/0x320
       [<bf28ae00>] restore_regulatory_settings+0x34/0x418 [cfg80211]
       [<bf28b200>] reg_timeout_work+0x1c/0x20 [cfg80211]
       [<c0059f44>] process_one_work+0x2a0/0x480
       [<c005a4b4>] worker_thread+0x1bc/0x2bc
       [<c0061148>] kthread+0x98/0xa4
       [<c0014af4>] kernel_thread_exit+0x0/0x8

other info that might help us debug this:

Chain exists of:
  cfg80211_mutex --> reg_mutex --> (reg_timeout).work

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock((reg_timeout).work);
                               lock(reg_mutex);
                               lock((reg_timeout).work);
  lock(cfg80211_mutex);

 *** DEADLOCK ***

2 locks held by kworker/0:2/1391:
 #0:  (events){.+.+.+}, at: [<c0059e94>] process_one_work+0x1f0/0x480
 #1:  ((reg_timeout).work){+.+...}, at: [<c0059e94>] process_one_work+0x1f0/0x480

stack backtrace:
[<c001b928>] (unwind_backtrace+0x0/0x12c) from [<c0471d3c>] (dump_stack+0x20/0x24)
[<c0471d3c>] (dump_stack+0x20/0x24) from [<c008ef70>] (print_circular_bug+0x280/0x2cc)
[<c008ef70>] (print_circular_bug+0x280/0x2cc) from [<c008fb28>] (validate_chain+0x978/0x10f0)
[<c008fb28>] (validate_chain+0x978/0x10f0) from [<c0090b68>] (__lock_acquire+0x8c8/0x9b0)
[<c0090b68>] (__lock_acquire+0x8c8/0x9b0) from [<c0090d40>] (lock_acquire+0xf0/0x114)
[<c0090d40>] (lock_acquire+0xf0/0x114) from [<c04734dc>] (mutex_lock_nested+0x48/0x320)
[<c04734dc>] (mutex_lock_nested+0x48/0x320) from [<bf28ae00>] (restore_regulatory_settings+0x34/0x418 [cfg80211])
[<bf28ae00>] (restore_regulatory_settings+0x34/0x418 [cfg80211]) from [<bf28b200>] (reg_timeout_work+0x1c/0x20 [cfg80211])
[<bf28b200>] (reg_timeout_work+0x1c/0x20 [cfg80211]) from [<c0059f44>] (process_one_work+0x2a0/0x480)
[<c0059f44>] (process_one_work+0x2a0/0x480) from [<c005a4b4>] (worker_thread+0x1bc/0x2bc)
[<c005a4b4>] (worker_thread+0x1bc/0x2bc) from [<c0061148>] (kthread+0x98/0xa4)
[<c0061148>] (kthread+0x98/0xa4) from [<c0014af4>] (kernel_thread_exit+0x0/0x8)
cfg80211: Calling CRDA to update world regulatory domain
cfg80211: World regulatory domain updated:
cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tom3q pushed a commit to tom3q/linux that referenced this pull request Apr 28, 2013
This avoids:
Apr 12 23:52:16 homeserver kernel: imon:send_packet: task interrupted
Apr 12 23:52:16 homeserver kernel: ------------[ cut here ]------------
Apr 12 23:52:16 homeserver kernel: WARNING: at drivers/usb/core/urb.c:327 usb_submit_urb+0x353/0x370()
Apr 12 23:52:16 homeserver kernel: Hardware name: Unknow
Apr 12 23:52:16 homeserver kernel: URB f64b6f00 submitted while active
Apr 12 23:52:16 homeserver kernel: Modules linked in:
Apr 12 23:52:16 homeserver kernel: Pid: 3154, comm: LCDd Not tainted 3.8.6-htpc-00005-g9e6fc5e torvalds#26
Apr 12 23:52:16 homeserver kernel: Call Trace:
Apr 12 23:52:16 homeserver kernel: [<c012d778>] ? warn_slowpath_common+0x78/0xb0
Apr 12 23:52:16 homeserver kernel: [<c04136c3>] ? usb_submit_urb+0x353/0x370
Apr 12 23:52:16 homeserver kernel: [<c04136c3>] ? usb_submit_urb+0x353/0x370
Apr 12 23:52:16 homeserver kernel: [<c0447010>] ? imon_ir_change_protocol+0x150/0x150
Apr 12 23:52:16 homeserver kernel: [<c012d843>] ? warn_slowpath_fmt+0x33/0x40
Apr 12 23:52:16 homeserver kernel: [<c04136c3>] ? usb_submit_urb+0x353/0x370
Apr 12 23:52:16 homeserver kernel: [<c0446c67>] ? send_packet+0x97/0x270
Apr 12 23:52:16 homeserver kernel: [<c0446cfe>] ? send_packet+0x12e/0x270
Apr 12 23:52:16 homeserver kernel: [<c05c5743>] ? do_nanosleep+0xa3/0xd0
Apr 12 23:52:16 homeserver kernel: [<c044760e>] ? vfd_write+0xae/0x250
Apr 12 23:52:16 homeserver kernel: [<c0447560>] ? lcd_write+0x180/0x180
Apr 12 23:52:16 homeserver kernel: [<c01b2b19>] ? vfs_write+0x89/0x140
Apr 12 23:52:16 homeserver kernel: [<c01b2dda>] ? sys_write+0x4a/0x90
Apr 12 23:52:16 homeserver kernel: [<c05c7c45>] ? sysenter_do_call+0x12/0x26
Apr 12 23:52:16 homeserver kernel: ---[ end trace a0b6f0fcfd2f9a1d ]---
Apr 12 23:52:16 homeserver kernel: imon:send_packet: error submitting urb(-16)
Apr 12 23:52:16 homeserver kernel: imon:vfd_write: send packet #3 failed
Apr 12 23:52:16 homeserver kernel: imon:send_packet: error submitting urb(-16)
Apr 12 23:52:16 homeserver kernel: imon:vfd_write: send packet #0 failed

Signed-off-by: Kevin Baradon <kevin.baradon@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
torvalds pushed a commit that referenced this pull request Apr 30, 2013
em28xx is oopsing with some DVB devices:

[10856.061884] general protection fault: 0000 [#1] SMP
[10856.067041] Modules linked in: rc_hauppauge em28xx_rc xc5000 drxk em28xx_dvb dvb_core em28xx videobuf2_vmalloc videobuf2_memops videobuf2_core rc_pixelview_new tuner_xc2028 tuner cx8800 cx88xx tveeprom btcx_risc videobuf_dma_sg videobuf_core rc_core v4l2_common videodev ebtable_nat ebtables nf_conntrack_ipv4 nf_defrag_ipv4 xt_CHECKSUM be2iscsi iscsi_boot_sysfs iptable_mangle bnx2i cnic uio cxgb4i cxgb4 tun bridge cxgb3i cxgb3 stp ip6t_REJECT mdio libcxgbi nf_conntrack_ipv6 llc nf_defrag_ipv6 ib_iser rdma_cm ib_addr xt_conntrack iw_cm ib_cm ib_sa nf_conntrack ib_mad ib_core bnep bluetooth iscsi_tcp libiscsi_tcp ip6table_filter libiscsi ip6_tables scsi_transport_iscsi xfs libcrc32c snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_hwdep snd_seq snd_seq_device snd_pcm tg3 snd_page_alloc snd_timer
[10856.139176]  snd ptp iTCO_wdt soundcore pps_core iTCO_vendor_support lpc_ich mfd_core coretemp nfsd hp_wmi crc32c_intel microcode serio_raw rfkill sparse_keymap nfs_acl lockd sunrpc kvm_intel kvm uinput binfmt_misc firewire_ohci nouveau mxm_wmi i2c_algo_bit drm_kms_helper firewire_core crc_itu_t ttm drm i2c_core wmi [last unloaded: dib0070]
[10856.168969] CPU 1
[10856.170799] Pid: 13606, comm: dvbv5-zap Not tainted 3.9.0-rc5+ #26 Hewlett-Packard HP Z400 Workstation/0AE4h
[10856.181187] RIP: 0010:[<ffffffffa0459e47>]  [<ffffffffa0459e47>] em28xx_write_regs_req+0x37/0x1c0 [em28xx]
[10856.191028] RSP: 0018:ffff880118401a58  EFLAGS: 00010282
[10856.196533] RAX: 00020000012d0000 RBX: ffff88010804aec8 RCX: ffff880118401b14
[10856.203852] RDX: 0000000000000048 RSI: 0000000000000000 RDI: ffff88010804aec8
[10856.211174] RBP: ffff880118401ac8 R08: 0000000000000001 R09: 0000000000000000
[10856.218496] R10: 0000000000000000 R11: 0000000000000006 R12: 0000000000000048
[10856.226026] R13: ffff880118401b14 R14: ffff88011752b258 R15: ffff88011752b258
[10856.233352] FS:  00007f26636d2740(0000) GS:ffff88011fc20000(0000) knlGS:0000000000000000
[10856.241626] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[10856.247565] CR2: 00007f2663716e20 CR3: 00000000c7eb1000 CR4: 00000000000007e0
[10856.254889] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[10856.262215] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[10856.269542] Process dvbv5-zap (pid: 13606, threadinfo ffff880118400000, task ffff8800cd625d40)
[10856.278340] Stack:
[10856.280564]  ffff88011ffe8de8 0000000000000002 0000000000000000 ffff88011ffe9b00
[10856.288191]  ffff880118401b14 00ff88011ffe9b08 ffff880100000048 ffffffff8112a52a
[10856.295893]  0000000000000001 ffff88010804aec8 0000000000000048 ffff880118401b14
[10856.303521] Call Trace:
[10856.306182]  [<ffffffff8112a52a>] ? __alloc_pages_nodemask+0x15a/0x960
[10856.312912]  [<ffffffffa045a002>] em28xx_write_regs+0x32/0xa0 [em28xx]
[10856.319638]  [<ffffffffa045a221>] em28xx_write_reg+0x21/0x30 [em28xx]
[10856.326279]  [<ffffffffa045a2cc>] em28xx_gpio_set+0x9c/0x100 [em28xx]
[10856.332919]  [<ffffffffa045a3ac>] em28xx_set_mode+0x7c/0x80 [em28xx]
[10856.339472]  [<ffffffffa03ef032>] em28xx_dvb_bus_ctrl+0x32/0x40 [em28xx_dvb]

This is caused by commit c7a45e5,
that added support for two I2C buses. A partial fix was applied
at 3de09fb, but it doesn't cover
all cases, as the DVB core fills fe->dvb->priv with adapter->priv.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
morphis pushed a commit to shr-distribution/linux that referenced this pull request May 24, 2013
According to Tegra3 Errata v6 torvalds#26 (Rare memory controller deadlock
condition)

Bug 1013627 Rare memory controller deadlock condition (regarding to EACK)
Bug 955082

Change-Id: I696a275b3921e485da195bf4d5f772c2d0050beb
Signed-off-by: Haley Teng <hteng@nvidia.com>
torvalds pushed a commit that referenced this pull request Oct 13, 2013
With DT-based boot, the GPMC OneNAND sync mode setup does not work
correctly. During the async mode setup, sync flags gets incorrectly
set in the onenand_async data and the system crashes during the async
setup. Also, the sync mode never gets set in gpmc_onenand_data->flags, so
even without the crash, the actual sync mode setup would never be called.

The patch fixes this by adjusting the gpmc_onenand_data->flags when the
data is read from the DT. Also while doing this we force the onenand_async
to be always async.

The patch enables to use the following DTS chunk (that should correspond
the arch/arm/mach-omap2/board-rm680.c board file setup) with Nokia N950,
which currently crashes with 3.12-rc1. The crash output can be also
found below.

&gpmc {
	ranges = <0 0 0x04000000 0x20000000>;

	onenand@0,0 {
		#address-cells = <1>;
		#size-cells = <1>;
		reg = <0 0 0x20000000>;

		gpmc,sync-read;
		gpmc,sync-write;
		gpmc,burst-length = <16>;
		gpmc,burst-read;
		gpmc,burst-wrap;
		gpmc,burst-write;
		gpmc,device-width = <2>;
		gpmc,mux-add-data = <2>;
		gpmc,cs-on-ns = <0>;
		gpmc,cs-rd-off-ns = <87>;
		gpmc,cs-wr-off-ns = <87>;
		gpmc,adv-on-ns = <0>;
		gpmc,adv-rd-off-ns = <10>;
		gpmc,adv-wr-off-ns = <10>;
		gpmc,oe-on-ns = <15>;
		gpmc,oe-off-ns = <87>;
		gpmc,we-on-ns = <0>;
		gpmc,we-off-ns = <87>;
		gpmc,rd-cycle-ns = <112>;
		gpmc,wr-cycle-ns = <112>;
		gpmc,access-ns = <81>;
		gpmc,page-burst-access-ns = <15>;
		gpmc,bus-turnaround-ns = <0>;
		gpmc,cycle2cycle-delay-ns = <0>;
		gpmc,wait-monitoring-ns = <0>;
		gpmc,clk-activation-ns = <5>;
		gpmc,wr-data-mux-bus-ns = <30>;
		gpmc,wr-access-ns = <81>;
		gpmc,sync-clk-ps = <15000>;
	};
};

[    1.467559] GPMC CS0: cs_on     :   0 ticks,   0 ns (was   0 ticks)   0 ns
[    1.474822] GPMC CS0: cs_rd_off :   1 ticks,   5 ns (was  24 ticks)   5 ns
[    1.482116] GPMC CS0: cs_wr_off :  14 ticks,  71 ns (was  24 ticks)  71 ns
[    1.489349] GPMC CS0: adv_on    :   0 ticks,   0 ns (was   0 ticks)   0 ns
[    1.496582] GPMC CS0: adv_rd_off:   3 ticks,  15 ns (was   3 ticks)  15 ns
[    1.503845] GPMC CS0: adv_wr_off:   3 ticks,  15 ns (was   3 ticks)  15 ns
[    1.511077] GPMC CS0: oe_on     :   3 ticks,  15 ns (was   4 ticks)  15 ns
[    1.518310] GPMC CS0: oe_off    :   1 ticks,   5 ns (was  24 ticks)   5 ns
[    1.525543] GPMC CS0: we_on     :   0 ticks,   0 ns (was   0 ticks)   0 ns
[    1.532806] GPMC CS0: we_off    :   8 ticks,  40 ns (was  24 ticks)  40 ns
[    1.540039] GPMC CS0: rd_cycle  :   4 ticks,  20 ns (was  29 ticks)  20 ns
[    1.547302] GPMC CS0: wr_cycle  :   4 ticks,  20 ns (was  29 ticks)  20 ns
[    1.554504] GPMC CS0: access    :   0 ticks,   0 ns (was  23 ticks)   0 ns
[    1.561767] GPMC CS0: page_burst_access:   0 ticks,   0 ns (was   3 ticks)   0 ns
[    1.569641] GPMC CS0: bus_turnaround:   0 ticks,   0 ns (was   0 ticks)   0 ns
[    1.577270] GPMC CS0: cycle2cycle_delay:   0 ticks,   0 ns (was   0 ticks)   0 ns
[    1.585144] GPMC CS0: wait_monitoring:   0 ticks,   0 ns (was   0 ticks)   0 ns
[    1.592834] GPMC CS0: clk_activation:   0 ticks,   0 ns (was   0 ticks)   0 ns
[    1.600463] GPMC CS0: wr_data_mux_bus:   5 ticks,  25 ns (was   8 ticks)  25 ns
[    1.608154] GPMC CS0: wr_access :   0 ticks,   0 ns (was  23 ticks)   0 ns
[    1.615386] GPMC CS0 CLK period is 5 ns (div 1)
[    1.625122] Unhandled fault: external abort on non-linefetch (0x1008) at 0xf009e442
[    1.633178] Internal error: : 1008 [#1] ARM
[    1.637573] Modules linked in:
[    1.640777] CPU: 0 PID: 1 Comm: swapper Not tainted 3.12.0-rc1-n9xx-los.git-5318619-00006-g4baa700-dirty #26
[    1.651123] task: ef04c000 ti: ef050000 task.ti: ef050000
[    1.656799] PC is at gpmc_onenand_setup+0x98/0x1e0
[    1.661865] LR is at gpmc_cs_set_timings+0x494/0x5a4
[    1.667083] pc : [<c002e040>]    lr : [<c001f384>]    psr: 60000113
[    1.667083] sp : ef051d10  ip : ef051ce0  fp : ef051d94
[    1.679138] r10: c0caaf60  r9 : ef050000  r8 : ef18b32c
[    1.684631] r7 : f0080000  r6 : c0caaf60  r5 : 00000000  r4 : f009e400
[    1.691497] r3 : f009e442  r2 : 80050000  r1 : 00000014  r0 : 00000000
[    1.698333] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
[    1.706024] Control: 10c5387d  Table: af290019  DAC: 00000015
[    1.712066] Process swapper (pid: 1, stack limit = 0xef050240)
[    1.718200] Stack: (0xef051d10 to 0xef052000)
[    1.722778] 1d00:                                     00004000 00001402 00000000 00000005
[    1.731384] 1d20: 00000047 00000000 0000000f 0000000f 00000000 00000028 0000000f 00000005
[    1.739990] 1d40: 00000000 00000000 00000014 00000014 00000000 00000000 00000000 00000000
[    1.748596] 1d60: 00000000 00000019 00000000 00000000 ef18b000 ef099c50 c0c8cb30 00000000
[    1.757171] 1d80: c0488074 c048f868 ef051dcc ef051d98 c024447c c002dfb4 00000000 c048f868
[    1.765777] 1da0: 00000000 00000000 c010e4a4 c0dbbb7c c0c8cb40 00000000 c0ca2500 c0488074
[    1.774383] 1dc0: ef051ddc ef051dd0 c01fd508 c0244370 ef051dfc ef051de0 c01fc204 c01fd4f4
[    1.782989] 1de0: c0c8cb40 c0ca2500 c0c8cb74 00000000 ef051e1c ef051e00 c01fc3b0 c01fc104
[    1.791595] 1e00: ef0983bc 00000000 c0ca2500 c01fc31c ef051e44 ef051e20 c01fa794 c01fc328
[    1.800201] 1e20: ef03634c ef0983b0 ef27d534 c0ca2500 ef27d500 c0c9a2f8 ef051e54 ef051e48
[    1.808807] 1e40: c01fbcfc c01fa744 ef051e84 ef051e58 c01fb838 c01fbce4 c0411df8 c0caa040
[    1.817413] 1e60: ef051e84 c0ca2500 00000006 c0caa040 00000066 c0488074 ef051e9c ef051e88
[    1.825988] 1e80: c01fca30 c01fb768 c04975b8 00000006 ef051eac ef051ea0 c01fd728 c01fc9bc
[    1.834594] 1ea0: ef051ebc ef051eb0 c048808c c01fd6e4 ef051f4c ef051ec0 c0008888 c0488080
[    1.843200] 1ec0: 0000006f c046bae8 00000000 00000000 ef051efc ef051ee0 ef051f04 ef051ee8
[    1.851806] 1ee0: c046d400 c0181218 c046d410 c18da8d5 c036a8e4 00000066 ef051f4c ef051f08
[    1.860412] 1f00: c004b9a8 c046d41c c048f840 00000006 00000006 c046b488 00000000 c043ec08
[    1.869018] 1f20: ef051f4c c04975b8 00000006 c0caa040 00000066 c046d410 c048f85c c048f868
[    1.877593] 1f40: ef051f94 ef051f50 c046db8c c00087a0 00000006 00000006 c046d410 ffffffff
[    1.886199] 1f60: ffffffff ffffffff ffffffff 00000000 c0348fd0 00000000 00000000 00000000
[    1.894805] 1f80: 00000000 00000000 ef051fac ef051f98 c0348fe0 c046daa8 00000000 00000000
[    1.903411] 1fa0: 00000000 ef051fb0 c000e7f8 c0348fdc 00000000 00000000 00000000 00000000
[    1.912017] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    1.920623] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 ffffffff ffffffff
[    1.929199] Backtrace:
[    1.931793] [<c002dfa8>] (gpmc_onenand_setup+0x0/0x1e0) from [<c024447c>] (omap2_onenand_probe+0x118/0x49c)
[    1.942047] [<c0244364>] (omap2_onenand_probe+0x0/0x49c) from [<c01fd508>] (platform_drv_probe+0x20/0x24)
[    1.952117]  r8:c0488074 r7:c0ca2500 r6:00000000 r5:c0c8cb40 r4:c0dbbb7c
[    1.959197] [<c01fd4e8>] (platform_drv_probe+0x0/0x24) from [<c01fc204>] (driver_probe_device+0x10c/0x224)
[    1.969360] [<c01fc0f8>] (driver_probe_device+0x0/0x224) from [<c01fc3b0>] (__driver_attach+0x94/0x98)
[    1.979125]  r7:00000000 r6:c0c8cb74 r5:c0ca2500 r4:c0c8cb40
[    1.985107] [<c01fc31c>] (__driver_attach+0x0/0x98) from [<c01fa794>] (bus_for_each_dev+0x5c/0x90)
[    1.994506]  r6:c01fc31c r5:c0ca2500 r4:00000000 r3:ef0983bc
[    2.000488] [<c01fa738>] (bus_for_each_dev+0x0/0x90) from [<c01fbcfc>] (driver_attach+0x24/0x28)
[    2.009735]  r6:c0c9a2f8 r5:ef27d500 r4:c0ca2500
[    2.014587] [<c01fbcd8>] (driver_attach+0x0/0x28) from [<c01fb838>] (bus_add_driver+0xdc/0x260)
[    2.023742] [<c01fb75c>] (bus_add_driver+0x0/0x260) from [<c01fca30>] (driver_register+0x80/0xfc)
[    2.033081]  r8:c0488074 r7:00000066 r6:c0caa040 r5:00000006 r4:c0ca2500
[    2.040161] [<c01fc9b0>] (driver_register+0x0/0xfc) from [<c01fd728>] (__platform_driver_register+0x50/0x64)
[    2.050476]  r5:00000006 r4:c04975b8
[    2.054260] [<c01fd6d8>] (__platform_driver_register+0x0/0x64) from [<c048808c>] (omap2_onenand_driver_init+0x18/0x20)
[    2.065490] [<c0488074>] (omap2_onenand_driver_init+0x0/0x20) from [<c0008888>] (do_one_initcall+0xf4/0x150)
[    2.075836] [<c0008794>] (do_one_initcall+0x0/0x150) from [<c046db8c>] (kernel_init_freeable+0xf0/0x1b4)
[    2.085815] [<c046da9c>] (kernel_init_freeable+0x0/0x1b4) from [<c0348fe0>] (kernel_init+0x10/0xec)
[    2.095336] [<c0348fd0>] (kernel_init+0x0/0xec) from [<c000e7f8>] (ret_from_fork+0x14/0x3c)
[    2.104125]  r4:00000000 r3:00000000
[    2.107879] Code: ebffc3ae e2505000 ba00002e e2843042 (e1d320b0)
[    2.114318] ---[ end trace b8ee3e3e5e002451 ]---

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Tony Lindgren <tony@atomide.com>
swarren pushed a commit to swarren/linux-tegra that referenced this pull request Oct 14, 2013
As the new x86 CPU bootup printout format code maintainer, I am
taking immediate action to improve and clean (and thus indulge
my OCD) the reporting of the cores when coming up online.

Fix padding to a right-hand alignment, cleanup code and bind
reporting width to the max number of supported CPUs on the
system, like this:

 [    0.074509] smpboot: Booting Node   0, Processors:      #1  #2  #3  #4  #5  torvalds#6  torvalds#7 OK
 [    0.644008] smpboot: Booting Node   1, Processors:  torvalds#8  torvalds#9 torvalds#10 torvalds#11 torvalds#12 torvalds#13 torvalds#14 torvalds#15 OK
 [    1.245006] smpboot: Booting Node   2, Processors: torvalds#16 torvalds#17 torvalds#18 torvalds#19 torvalds#20 torvalds#21 torvalds#22 torvalds#23 OK
 [    1.864005] smpboot: Booting Node   3, Processors: torvalds#24 torvalds#25 torvalds#26 torvalds#27 torvalds#28 torvalds#29 torvalds#30 torvalds#31 OK
 [    2.489005] smpboot: Booting Node   4, Processors: torvalds#32 torvalds#33 torvalds#34 torvalds#35 torvalds#36 torvalds#37 torvalds#38 torvalds#39 OK
 [    3.093005] smpboot: Booting Node   5, Processors: torvalds#40 torvalds#41 torvalds#42 torvalds#43 torvalds#44 torvalds#45 torvalds#46 torvalds#47 OK
 [    3.698005] smpboot: Booting Node   6, Processors: torvalds#48 torvalds#49 torvalds#50 torvalds#51 #52 #53 torvalds#54 torvalds#55 OK
 [    4.304005] smpboot: Booting Node   7, Processors: torvalds#56 torvalds#57 #58 torvalds#59 torvalds#60 torvalds#61 torvalds#62 torvalds#63 OK
 [    4.961413] Brought up 64 CPUs

and this:

 [    0.072367] smpboot: Booting Node   0, Processors:    #1 #2 #3 #4 #5 torvalds#6 torvalds#7 OK
 [    0.686329] Brought up 8 CPUs

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Libin <huawei.libin@huawei.com>
Cc: wangyijing@huawei.com
Cc: fenghua.yu@intel.com
Cc: guohanjun@huawei.com
Cc: paul.gortmaker@windriver.com
Link: http://lkml.kernel.org/r/20130927143554.GF4422@pd.tnic
Signed-off-by: Ingo Molnar <mingo@kernel.org>
swarren pushed a commit to swarren/linux-tegra that referenced this pull request Oct 14, 2013
Turn it into (for example):

[    0.073380] x86: Booting SMP configuration:
[    0.074005] .... node   #0, CPUs:          #1   #2   #3   #4   #5   torvalds#6   torvalds#7
[    0.603005] .... node   #1, CPUs:     torvalds#8   torvalds#9  torvalds#10  torvalds#11  torvalds#12  torvalds#13  torvalds#14  torvalds#15
[    1.200005] .... node   #2, CPUs:    torvalds#16  torvalds#17  torvalds#18  torvalds#19  torvalds#20  torvalds#21  torvalds#22  torvalds#23
[    1.796005] .... node   #3, CPUs:    torvalds#24  torvalds#25  torvalds#26  torvalds#27  torvalds#28  torvalds#29  torvalds#30  torvalds#31
[    2.393005] .... node   #4, CPUs:    torvalds#32  torvalds#33  torvalds#34  torvalds#35  torvalds#36  torvalds#37  torvalds#38  torvalds#39
[    2.996005] .... node   #5, CPUs:    torvalds#40  torvalds#41  torvalds#42  torvalds#43  torvalds#44  torvalds#45  torvalds#46  torvalds#47
[    3.600005] .... node   torvalds#6, CPUs:    torvalds#48  torvalds#49  torvalds#50  torvalds#51  #52  #53  torvalds#54  torvalds#55
[    4.202005] .... node   torvalds#7, CPUs:    torvalds#56  torvalds#57  #58  torvalds#59  torvalds#60  torvalds#61  torvalds#62  torvalds#63
[    4.811005] .... node   torvalds#8, CPUs:    torvalds#64  torvalds#65  torvalds#66  torvalds#67  torvalds#68  torvalds#69  #70  torvalds#71
[    5.421006] .... node   torvalds#9, CPUs:    torvalds#72  torvalds#73  torvalds#74  torvalds#75  torvalds#76  torvalds#77  torvalds#78  torvalds#79
[    6.032005] .... node  torvalds#10, CPUs:    torvalds#80  torvalds#81  torvalds#82  torvalds#83  torvalds#84  torvalds#85  torvalds#86  torvalds#87
[    6.648006] .... node  torvalds#11, CPUs:    torvalds#88  torvalds#89  torvalds#90  torvalds#91  torvalds#92  torvalds#93  torvalds#94  torvalds#95
[    7.262005] .... node  torvalds#12, CPUs:    torvalds#96  torvalds#97  torvalds#98  torvalds#99 torvalds#100 torvalds#101 torvalds#102 torvalds#103
[    7.865005] .... node  torvalds#13, CPUs:   torvalds#104 torvalds#105 torvalds#106 torvalds#107 torvalds#108 torvalds#109 torvalds#110 torvalds#111
[    8.466005] .... node  torvalds#14, CPUs:   torvalds#112 torvalds#113 torvalds#114 torvalds#115 torvalds#116 torvalds#117 torvalds#118 torvalds#119
[    9.073006] .... node  torvalds#15, CPUs:   torvalds#120 torvalds#121 torvalds#122 torvalds#123 torvalds#124 torvalds#125 torvalds#126 torvalds#127
[    9.679901] x86: Booted up 16 nodes, 128 CPUs

and drop useless elements.

Change num_digits() to hpa's division-avoiding, cell-phone-typed
version which he went at great lengths and pains to submit on a
Saturday evening.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: huawei.libin@huawei.com
Cc: wangyijing@huawei.com
Cc: fenghua.yu@intel.com
Cc: guohanjun@huawei.com
Cc: paul.gortmaker@windriver.com
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20130930095624.GB16383@pd.tnic
Signed-off-by: Ingo Molnar <mingo@kernel.org>
torvalds pushed a commit that referenced this pull request Dec 2, 2013
…culation

Currently mx53 (CortexA8) running at 1GHz reports:
Calibrating delay loop... 663.55 BogoMIPS (lpj=3317760)

Tom Evans verified that alignments of 0x0 and 0x8 run the two instructions of __loop_delay in one clock cycle (1 clock/loop), while alignments of 0x4 and 0xc take 3 clocks to run the loop twice. (1.5 clock/loop)

The original object code looks like this:

00000010 <__loop_const_udelay>:
  10:	e3e01000 	mvn	r1, #0
  14:	e51f201c 	ldr	r2, [pc, #-28]	; 0 <__loop_udelay-0x8>
  18:	e5922000 	ldr	r2, [r2]
  1c:	e0800921 	add	r0, r0, r1, lsr #18
  20:	e1a00720 	lsr	r0, r0, #14
  24:	e0822b21 	add	r2, r2, r1, lsr #22
  28:	e1a02522 	lsr	r2, r2, #10
  2c:	e0000092 	mul	r0, r2, r0
  30:	e0800d21 	add	r0, r0, r1, lsr #26
  34:	e1b00320 	lsrs	r0, r0, #6
  38:	01a0f00e 	moveq	pc, lr

0000003c <__loop_delay>:
  3c:	e2500001 	subs	r0, r0, #1
  40:	8afffffe 	bhi	3c <__loop_delay>
  44:	e1a0f00e 	mov	pc, lr

After adding the 'align 3' directive to __loop_delay (align to 8 bytes):

00000010 <__loop_const_udelay>:
  10:	e3e01000 	mvn	r1, #0
  14:	e51f201c 	ldr	r2, [pc, #-28]	; 0 <__loop_udelay-0x8>
  18:	e5922000 	ldr	r2, [r2]
  1c:	e0800921 	add	r0, r0, r1, lsr #18
  20:	e1a00720 	lsr	r0, r0, #14
  24:	e0822b21 	add	r2, r2, r1, lsr #22
  28:	e1a02522 	lsr	r2, r2, #10
  2c:	e0000092 	mul	r0, r2, r0
  30:	e0800d21 	add	r0, r0, r1, lsr #26
  34:	e1b00320 	lsrs	r0, r0, #6
  38:	01a0f00e 	moveq	pc, lr
  3c:	e320f000 	nop	{0}

00000040 <__loop_delay>:
  40:	e2500001 	subs	r0, r0, #1
  44:	8afffffe 	bhi	40 <__loop_delay>
  48:	e1a0f00e 	mov	pc, lr
  4c:	e320f000 	nop	{0}

, which now reports:
Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)

Some more test results:

On mx31 (ARM1136) running at 532 MHz, before the patch:
Calibrating delay loop... 351.43 BogoMIPS (lpj=1757184)

On mx31 (ARM1136) running at 532 MHz after the patch:
Calibrating delay loop... 528.79 BogoMIPS (lpj=2643968)

Also tested on mx6 (CortexA9) and on mx27 (ARM926), which shows the same
BogoMIPS value before and after this patch.

Reported-by: Tom Evans <tom_usenet@optusnet.com.au>
Suggested-by: Tom Evans <tom_usenet@optusnet.com.au>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
torvalds pushed a commit that referenced this pull request Mar 10, 2014
…d problems with booting

Without that change booting leads to crash with more warnings like below:
[    0.284454] omap_hwmod: uart4: cannot clk_get main_clk uart4_fck
[    0.284484] omap_hwmod: uart4: cannot _init_clocks
[    0.284484] ------------[ cut here ]------------
[    0.284545] WARNING: CPU: 0 PID: 1 at arch/arm/mach-omap2/omap_hwmod.c:2543 _init+0x300/0x3e4()
[    0.284545] omap_hwmod: uart4: couldn't init clocks
[    0.284576] Modules linked in:
[    0.284606] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.13.0-next-20140124-00020-gd2aefec-dirty #26
[    0.284637] [<c00151c0>] (unwind_backtrace) from [<c0011e20>] (show_stack+0x10/0x14)
[    0.284667] [<c0011e20>] (show_stack) from [<c0568544>] (dump_stack+0x7c/0x94)
[    0.284729] [<c0568544>] (dump_stack) from [<c003ff94>] (warn_slowpath_common+0x6c/0x90)
[    0.284729] [<c003ff94>] (warn_slowpath_common) from [<c003ffe8>] (warn_slowpath_fmt+0x30/0x40)
[    0.284759] [<c003ffe8>] (warn_slowpath_fmt) from [<c07d1be8>] (_init+0x300/0x3e4)
[    0.284790] [<c07d1be8>] (_init) from [<c07d217c>] (__omap_hwmod_setup_all+0x40/0x8c)
[    0.284820] [<c07d217c>] (__omap_hwmod_setup_all) from [<c0008918>] (do_one_initcall+0xe8/0x14c)
[    0.284851] [<c0008918>] (do_one_initcall) from [<c07c5c18>] (kernel_init_freeable+0x104/0x1c8)
[    0.284881] [<c07c5c18>] (kernel_init_freeable) from [<c0563524>] (kernel_init+0x8/0x118)
[    0.284912] [<c0563524>] (kernel_init) from [<c000e368>] (ret_from_fork+0x14/0x2c)
[    0.285064] ---[ end trace 63de210ad43b627d ]---

Reference:
https://lkml.org/lkml/2013/10/8/553

Signed-off-by: Marek Belisko <marek@goldelico.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
zeitgeist87 pushed a commit to zeitgeist87/linux that referenced this pull request Mar 14, 2014
WARNING: braces {} are not necessary for single statement blocks
torvalds#26: FILE: fs/ocfs2/locks.c:85:
+	if (ret) {
+		ocfs2_file_unlock(file);
+	}

total: 0 errors, 1 warnings, 9 lines checked

./patches/ocfs2-flock-drop-cross-node-lock-when-failed-locally.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Joel Becker <jlbec@evilplan.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Wengang Wang <wen.gang.wang@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
zeitgeist87 pushed a commit to zeitgeist87/linux that referenced this pull request Mar 14, 2014
While implementing atomic_write_len, 4d3773c ("kernfs: implement
kernfs_ops->atomic_write_len") moved data copy from userland inside
kernfs_get_active() and kernfs_open_file->mutex so that
kernfs_ops->atomic_write_len can be accessed before copying buffer
from userland; unfortunately, this could lead to locking order
inversion involving mmap_sem if copy_from_user() takes a page fault.

  ======================================================
  [ INFO: possible circular locking dependency detected ]
  3.14.0-rc4-next-20140228-sasha-00011-g4077c67-dirty torvalds#26 Tainted: G        W
  -------------------------------------------------------
  trinity-c236/10658 is trying to acquire lock:
   (&of->mutex#2){+.+.+.}, at: [<fs/kernfs/file.c:487>] kernfs_fop_mmap+0x54/0x120

  but task is already holding lock:
   (&mm->mmap_sem){++++++}, at: [<mm/util.c:397>] vm_mmap_pgoff+0x6e/0xe0

  which lock already depends on the new lock.

  the existing dependency chain (in reverse order) is:

 -> #1 (&mm->mmap_sem){++++++}:
	 [<kernel/locking/lockdep.c:1945 kernel/locking/lockdep.c:2131>] validate_chain+0x6c5/0x7b0
	 [<kernel/locking/lockdep.c:3182>] __lock_acquire+0x4cd/0x5a0
	 [<arch/x86/include/asm/current.h:14 kernel/locking/lockdep.c:3602>] lock_acquire+0x182/0x1d0
	 [<mm/memory.c:4188>] might_fault+0x7e/0xb0
	 [<arch/x86/include/asm/uaccess.h:713 fs/kernfs/file.c:291>] kernfs_fop_write+0xd8/0x190
	 [<fs/read_write.c:473>] vfs_write+0xe3/0x1d0
	 [<fs/read_write.c:523 fs/read_write.c:515>] SyS_write+0x5d/0xa0
	 [<arch/x86/kernel/entry_64.S:749>] tracesys+0xdd/0xe2

 -> #0 (&of->mutex#2){+.+.+.}:
	 [<kernel/locking/lockdep.c:1840>] check_prev_add+0x13f/0x560
	 [<kernel/locking/lockdep.c:1945 kernel/locking/lockdep.c:2131>] validate_chain+0x6c5/0x7b0
	 [<kernel/locking/lockdep.c:3182>] __lock_acquire+0x4cd/0x5a0
	 [<arch/x86/include/asm/current.h:14 kernel/locking/lockdep.c:3602>] lock_acquire+0x182/0x1d0
	 [<kernel/locking/mutex.c:470 kernel/locking/mutex.c:571>] mutex_lock_nested+0x6a/0x510
	 [<fs/kernfs/file.c:487>] kernfs_fop_mmap+0x54/0x120
	 [<mm/mmap.c:1573>] mmap_region+0x310/0x5c0
	 [<mm/mmap.c:1365>] do_mmap_pgoff+0x385/0x430
	 [<mm/util.c:399>] vm_mmap_pgoff+0x8f/0xe0
	 [<mm/mmap.c:1416 mm/mmap.c:1374>] SyS_mmap_pgoff+0x1b0/0x210
	 [<arch/x86/kernel/sys_x86_64.c:72>] SyS_mmap+0x1d/0x20
	 [<arch/x86/kernel/entry_64.S:749>] tracesys+0xdd/0xe2

  other info that might help us debug this:

   Possible unsafe locking scenario:

	 CPU0                    CPU1
	 ----                    ----
    lock(&mm->mmap_sem);
				 lock(&of->mutex#2);
				 lock(&mm->mmap_sem);
    lock(&of->mutex#2);

   *** DEADLOCK ***

  1 lock held by trinity-c236/10658:
   #0:  (&mm->mmap_sem){++++++}, at: [<mm/util.c:397>] vm_mmap_pgoff+0x6e/0xe0

  stack backtrace:
  CPU: 2 PID: 10658 Comm: trinity-c236 Tainted: G        W 3.14.0-rc4-next-20140228-sasha-00011-g4077c67-dirty torvalds#26
   0000000000000000 ffff88011911fa48 ffffffff8438e945 0000000000000000
   0000000000000000 ffff88011911fa98 ffffffff811a0109 ffff88011911fab8
   ffff88011911fab8 ffff88011911fa98 ffff880119128cc0 ffff880119128cf8
  Call Trace:
   [<lib/dump_stack.c:52>] dump_stack+0x52/0x7f
   [<kernel/locking/lockdep.c:1213>] print_circular_bug+0x129/0x160
   [<kernel/locking/lockdep.c:1840>] check_prev_add+0x13f/0x560
   [<include/linux/spinlock.h:343 mm/slub.c:1933>] ? deactivate_slab+0x511/0x550
   [<kernel/locking/lockdep.c:1945 kernel/locking/lockdep.c:2131>] validate_chain+0x6c5/0x7b0
   [<kernel/locking/lockdep.c:3182>] __lock_acquire+0x4cd/0x5a0
   [<mm/mmap.c:1552>] ? mmap_region+0x24a/0x5c0
   [<arch/x86/include/asm/current.h:14 kernel/locking/lockdep.c:3602>] lock_acquire+0x182/0x1d0
   [<fs/kernfs/file.c:487>] ? kernfs_fop_mmap+0x54/0x120
   [<kernel/locking/mutex.c:470 kernel/locking/mutex.c:571>] mutex_lock_nested+0x6a/0x510
   [<fs/kernfs/file.c:487>] ? kernfs_fop_mmap+0x54/0x120
   [<kernel/sched/core.c:2477>] ? get_parent_ip+0x11/0x50
   [<fs/kernfs/file.c:487>] ? kernfs_fop_mmap+0x54/0x120
   [<fs/kernfs/file.c:487>] kernfs_fop_mmap+0x54/0x120
   [<mm/mmap.c:1573>] mmap_region+0x310/0x5c0
   [<mm/mmap.c:1365>] do_mmap_pgoff+0x385/0x430
   [<mm/util.c:397>] ? vm_mmap_pgoff+0x6e/0xe0
   [<mm/util.c:399>] vm_mmap_pgoff+0x8f/0xe0
   [<kernel/rcu/update.c:97>] ? __rcu_read_unlock+0x44/0xb0
   [<fs/file.c:641>] ? dup_fd+0x3c0/0x3c0
   [<mm/mmap.c:1416 mm/mmap.c:1374>] SyS_mmap_pgoff+0x1b0/0x210
   [<arch/x86/kernel/sys_x86_64.c:72>] SyS_mmap+0x1d/0x20
   [<arch/x86/kernel/entry_64.S:749>] tracesys+0xdd/0xe2

Fix it by caching atomic_write_len in kernfs_open_file during open so
that it can be determined without accessing kernfs_ops in
kernfs_fop_write().  This restores the structure of kernfs_fop_write()
before 4d3773c with updated @len determination logic.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Sasha Levin <sasha.levin@oracle.com>
References: http://lkml.kernel.org/g/53113485.2090407@oracle.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
swarren pushed a commit to swarren/linux-tegra that referenced this pull request Mar 19, 2014
WARNING: braces {} are not necessary for single statement blocks
torvalds#26: FILE: fs/ocfs2/locks.c:85:
+	if (ret) {
+		ocfs2_file_unlock(file);
+	}

total: 0 errors, 1 warnings, 9 lines checked

./patches/ocfs2-flock-drop-cross-node-lock-when-failed-locally.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Joel Becker <jlbec@evilplan.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Wengang Wang <wen.gang.wang@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
shr-buildhost pushed a commit to shr-distribution/linux that referenced this pull request Mar 20, 2014
…d problems with booting.

Without that change booting leads to crash with more warnings like below:
[    0.284454] omap_hwmod: uart4: cannot clk_get main_clk uart4_fck
[    0.284484] omap_hwmod: uart4: cannot _init_clocks
[    0.284484] ------------[ cut here ]------------
[    0.284545] WARNING: CPU: 0 PID: 1 at arch/arm/mach-omap2/omap_hwmod.c:2543 _init+0x300/0x3e4()
[    0.284545] omap_hwmod: uart4: couldn't init clocks
[    0.284576] Modules linked in:
[    0.284606] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.13.0-next-20140124-00020-gd2aefec-dirty torvalds#26
[    0.284637] [<c00151c0>] (unwind_backtrace) from [<c0011e20>] (show_stack+0x10/0x14)
[    0.284667] [<c0011e20>] (show_stack) from [<c0568544>] (dump_stack+0x7c/0x94)
[    0.284729] [<c0568544>] (dump_stack) from [<c003ff94>] (warn_slowpath_common+0x6c/0x90)
[    0.284729] [<c003ff94>] (warn_slowpath_common) from [<c003ffe8>] (warn_slowpath_fmt+0x30/0x40)
[    0.284759] [<c003ffe8>] (warn_slowpath_fmt) from [<c07d1be8>] (_init+0x300/0x3e4)
[    0.284790] [<c07d1be8>] (_init) from [<c07d217c>] (__omap_hwmod_setup_all+0x40/0x8c)
[    0.284820] [<c07d217c>] (__omap_hwmod_setup_all) from [<c0008918>] (do_one_initcall+0xe8/0x14c)
[    0.284851] [<c0008918>] (do_one_initcall) from [<c07c5c18>] (kernel_init_freeable+0x104/0x1c8)
[    0.284881] [<c07c5c18>] (kernel_init_freeable) from [<c0563524>] (kernel_init+0x8/0x118)
[    0.284912] [<c0563524>] (kernel_init) from [<c000e368>] (ret_from_fork+0x14/0x2c)
[    0.285064] ---[ end trace 63de210ad43b627d ]---

Reference:
https://lkml.org/lkml/2013/10/8/553

Signed-off-by: Marek Belisko <marek@goldelico.com>
ddstreet referenced this pull request in ddstreet/linux Apr 8, 2014
GIT 3b55c3c0ec2eb3f163f15559f3962df717f53ccb

commit 8dec067dc9c59f9fdcaf4357c22994cde3647eb8
Author: Tomasz Figa <t.figa@samsung.com>
Date:   Fri Mar 21 02:59:30 2014 +0900

    ARM: EXYNOS: Fix compilation error in cpuidle.c
    
    The big series refactoring Exynos suspend to RAM handling missed the
    cpuidle driver that is disabled in exynos_defconfig, leaving it
    including old mach/pm_core.h header and using old s3c_cpu_resume symbol
    instead of new exynos_cpu_resume, resulting in compilation failures with
    CONFIG_ARCH_EXYNOS and CONFIG_CPU_IDLE enabled.
    
    This patch fixes that silly mistake and performs necessary modification
    to arhc/arm/exynos/cpuidle.c to make it compile again.
    
    Signed-off-by: Tomasz Figa <t.figa@samsung.com>
    Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

commit 58f37b0d47e9839fc8ef90d712594ed55cfcb2c7
Author: Tomasz Figa <t.figa@samsung.com>
Date:   Fri Mar 21 03:22:33 2014 +0900

    ARM: S5P64X0: Explicitly include linux/serial_s3c.h in mach/pm-core.h
    
    This patch fixes compilation failure due to missing explicit inclusion
    of linux/serial_s3c.h in mach/pm-core.h, which contains definitions
    required for further code in this header.
    
    Signed-off-by: Tomasz Figa <t.figa@samsung.com>
    Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

commit b2cde2cc71f2382e4a4bfaaacd5263bd93f1e0d2
Author: Florian Fainelli <f.fainelli@gmail.com>
Date:   Thu Mar 20 10:53:23 2014 -0700

    net: bcmgenet: manipulate netdev_queue directly
    
    Instead of always invoking netdev_get_tx_queue() in bcmgenet_xmit() and
    bcmgenet_tx_reclaim(), just get the corresponding netdev_queue pointer
    once and for all and manipulate it throughout bcmgenet_xmit() and
    bcmgenet_tx_reclaim().
    
    Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

commit d5c76f628d399f06785b0ee910c431770a01b807
Author: Florian Fainelli <f.fainelli@gmail.com>
Date:   Thu Mar 20 10:53:22 2014 -0700

    net: bcmgenet: remove bogus tx queue checks
    
    netdev_pick_tx already takes care of making sure that a given
    skb->queue_mapping value will remain within the number of advertised
    hardware queue number, there is no need to re-do this again in the
    driver.
    
    Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

commit d03825fba459d0d58e4fe162439babfc5f5eabc4
Author: Florian Fainelli <f.fainelli@gmail.com>
Date:   Thu Mar 20 10:53:21 2014 -0700

    net: bcmgenet: add skb_tx_timestamp call
    
    The BCMGENET driver was not TX timestamping the SKBs it queued for
    transmission, do this in bcmgenet_xmit() right before kicking the
    Transmit DMA engine.
    
    Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

commit 9460c936794fbcf82623e263926b17334ca5887a
Author: Florian Fainelli <f.fainelli@gmail.com>
Date:   Thu Mar 20 10:53:20 2014 -0700

    net: bcmgenet: remove unused spinlock member
    
    The spinlock cookie in bcmgenet_priv is never used, get rid of it.
    
    Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

commit f738a13d8365b0f824f3f20450b413f55374f175
Author: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Date:   Thu Mar 20 15:00:35 2014 +0100

    sh_eth: Remove goto statements that jump straight to a return
    
    "goto" is well accepted for error paths in the kernel but should not be
    used unnecessarily. Return the correct value directly instead of using a
    goto when possible.
    
    Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
    Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>

commit daacf03f0bbfefee3df107c3f7659d22e22538a7
Author: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Date:   Thu Mar 20 15:00:34 2014 +0100

    sh_eth: Register MDIO bus before registering the network device
    
    Network API functions that rely on the MDIO bus can be called as soon as
    the driver calls register_netdev(). Register the MDIO bus before the
    network device to avoid race conditions.
    
    Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
    Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>

commit bd920ff553ba17f19372501a14e432d9d92b102b
Author: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Date:   Thu Mar 20 15:00:33 2014 +0100

    sh_eth: Simplify MDIO bus initialization and release
    
    The network device passed to the sh_mdio_init and sh_mdio_release
    functions is only used to access the sh_eth_private instance. Pass it
    directly to those functions.
    
    Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
    Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>

commit a5bd60608936fbb84471a80592401ce29a68de71
Author: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Date:   Thu Mar 20 15:00:32 2014 +0100

    sh_eth: Use the platform device as the MDIO bus parent
    
    The MDIO bus parent is set to the network device. Beside not reflecting
    the hardware topology, this prevents registering the MDIO bus before
    initializing the network device. Fix it by setting the MDIO bus parent
    to the platform device.
    
    Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
    Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>

commit aa8d422510969b705656e49fc0166d862aca9246
Author: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Date:   Thu Mar 20 15:00:31 2014 +0100

    sh_eth: Use the platform device for memory allocation
    
    Memory allocated for the MDIO bus with the devm_kzalloc() API is
    associated with the network device. While this will cause memory to be
    freed at the right time, it doesn't allow allocating memory before the
    network device is initialized.
    
    Replace the network device with the parent platform device for memory
    allocation to remove that dependency. This also improves consistency
    with the other devm_* calls in the driver that all use the platform
    device.
    
    Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
    Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>

commit 54af36e7136b5e111734ca5b06c6b4390d663cac
Author: Alexander Aring <alex.aring@gmail.com>
Date:   Thu Mar 20 14:57:03 2014 +0100

    ieee802154: dgram: cleanup set of broadcast panid
    
    This patch is only a cleanup to use the right define for a panid field.
    The broadcast address and panid broadcast is still the same value.
    
    Signed-off-by: Alexander Aring <alex.aring@gmail.com>
    Cc: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
    Signed-off-by: David S. Miller <davem@davemloft.net>

commit 06324f2f7c21e3ba3529546063a3ebf7da806ed0
Author: Alexander Aring <alex.aring@gmail.com>
Date:   Thu Mar 20 14:57:02 2014 +0100

    af_ieee802154: fix check on broadcast address
    
    This patch fixes an issue which was introduced by commit
    b70ab2e87f17176d18f67ef331064441a032b5f3 ("ieee802154: enforce
    consistent endianness in the 802.15.4 stack").
    
    The correct behaviour should be a check on the broadcast address field
    which is 0xffff.
    
    Signed-off-by: Alexander Aring <alex.aring@gmail.com>
    Reported-by: Jan Luebbe <jlu@pengutronix.de>
    Cc: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
    Signed-off-by: David S. Miller <davem@davemloft.net>

commit 3c6f5592203e8126b70717f040c6c59f953068b3
Author: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Date:   Wed Mar 19 16:15:24 2014 -0600

    of_mdio: Allow the DT to specify the phy ID and avoid autoprobing
    
    This makes the generic of_mdiobus_register parse the DT compatible string for
    the pattern ethernet-phy-idAAAA.BBBB. If present it should be a value that
    matches the phy-id register normally readable through MDIO.
    
    When the ID is given the phy autoprobing is defeated and the phy is
    created directly.
    
    This is necessary to support phy's that cannot be autoprobed when
    of_mdiobus_register is called. Specifically, my case has the phy in reset at
    of_mdiobus_register, the reset is only released once the ethernet driver
    starts, before it attaches to the phy.
    
    Tested on ARM Kirkwood with phy id 0x01410e90 (Marvell 88E1318)
    
    Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
    Acked-by: Florian Fainelli <f.fainelli@gmail.com>
    Acked-by: Rob Herring <robh@kernel.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>

commit f00e756ed12d3204583764c93e41b89e1ae7ee44
Author: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Date:   Wed Mar 19 16:15:23 2014 -0600

    dt: Document a compatible entry for MDIO ethernet Phys
    
    This describes a compatible entry of the form:
      ethernet-phy-idAAAA,BBBB
    Which is modelled after the PCI structured compatible entry
    (pciVVVV,DDDD.SSSS.ssss.RR)
    
    If present the OF core will be able to use this information to
    directly create the correct phy without auto probing the bus.
    
    Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
    Acked-by: Rob Herring <robh@kernel.org>
    Acked-by: Florian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

commit 259fef033ffe4e70bf7f358c53400a09f1b5384e
Author: Ben Chan <benchan@chromium.org>
Date:   Wed Mar 19 14:00:06 2014 -0700

    net: cdc_ncm: respect operator preferred MTU reported by MBIM
    
    According to "Universal Serial Bus Communications Class Subclass
    Specification for Mobile Broadband Interface Model, Revision 1.0,
    Errata-1" published by USB-IF, the wMTU field of the MBIM extended
    functional descriptor indicates the operator preferred MTU for IP data
    streams.
    
    This patch modifies cdc_ncm_setup to ensure that the MTU value set on
    the usbnet device does not exceed the operator preferred MTU indicated
    by wMTU if the MBIM device exposes a MBIM extended functional
    descriptor.
    
    Signed-off-by: Ben Chan <benchan@chromium.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>

commit bfe9b3f8c5229e5de4fd18e941866bc410d16334
Author: Ben Chan <benchan@chromium.org>
Date:   Wed Mar 19 14:00:05 2014 -0700

    USB: cdc: add MBIM extended functional descriptor structure
    
    This patch adds the MBIM extended functional descriptor structure
    defined in "Universal Serial Bus Communications Class Subclass
    Specification for Mobile Broadband Interface Model, Revision 1.0,
    Errata-1" published by USB-IF.
    
    Signed-off-by: Ben Chan <benchan@chromium.org>
    Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>

commit f518338b16038beeb73e155e60d0f70beb9379f4
Author: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Date:   Wed Mar 19 17:47:51 2014 +0100

    ip6mr: fix mfc notification flags
    
    Commit 812e44dd1829 ("ip6mr: advertise new mfc entries via rtnl") reuses the
    function ip6mr_fill_mroute() to notify mfc events.
    But this function was used only for dump and thus was always setting the
    flag NLM_F_MULTI, which is wrong in case of a single notification.
    
    Libraries like libnl will wait forever for NLMSG_DONE.
    
    CC: Thomas Graf <tgraf@suug.ch>
    Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
    Acked-by: Thomas Graf <tgraf@suug.ch>
    Signed-off-by: David S. Miller <davem@davemloft.net>

commit 65886f439ab0fdc2dff20d1fa87afb98c6717472
Author: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Date:   Wed Mar 19 17:47:50 2014 +0100

    ipmr: fix mfc notification flags
    
    Commit 8cd3ac9f9b7b ("ipmr: advertise new mfc entries via rtnl") reuses the
    function ipmr_fill_mroute() to notify mfc events.
    But this function was used only for dump and thus was always setting the
    flag NLM_F_MULTI, which is wrong in case of a single notification.
    
    Libraries like libnl will wait forever for NLMSG_DONE.
    
    CC: Thomas Graf <tgraf@suug.ch>
    Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
    Acked-by: Thomas Graf <tgraf@suug.ch>
    Signed-off-by: David S. Miller <davem@davemloft.net>

commit 1c104a6bebf3c16b6248408b84f91d09ac8a26b6
Author: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Date:   Wed Mar 19 17:47:49 2014 +0100

    rtnetlink: fix fdb notification flags
    
    Commit 3ff661c38c84 ("net: rtnetlink notify events for FDB NTF_SELF adds and
    deletes") reuses the function nlmsg_populate_fdb_fill() to notify fdb events.
    But this function was used only for dump and thus was always setting the
    flag NLM_F_MULTI, which is wrong in case of a single notification.
    
    Libraries like libnl will wait forever for NLMSG_DONE.
    
    CC: Thomas Graf <tgraf@suug.ch>
    Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
    Acked-by: Thomas Graf <tgraf@suug.ch>
    Signed-off-by: David S. Miller <davem@davemloft.net>

commit 632623153196bf183a69686ed9c07eee98ff1bf8
Author: Eric Dumazet <edumazet@google.com>
Date:   Wed Mar 19 21:02:21 2014 -0700

    tcp: syncookies: do not use getnstimeofday()
    
    While it is true that getnstimeofday() uses about 40 cycles if TSC
    is available, it can use 1600 cycles if hpet is the clocksource.
    
    Switch to get_jiffies_64(), as this is more than enough, and
    go back to 60 seconds periods.
    
    Fixes: 8c27bd75f04f ("tcp: syncookies: reduce cookie lifetime to 128 seconds")
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Cc: Florian Westphal <fw@strlen.de>
    Acked-by: Florian Westphal <fw@strlen.de>
    Signed-off-by: David S. Miller <davem@davemloft.net>

commit dd41cc3bb90efd455df514899a5d3cf245182eb1
Author: Matan Barak <matanb@mellanox.com>
Date:   Wed Mar 19 18:11:53 2014 +0200

    net/mlx4: Adapt num_vfs/probed_vf params for single port VF
    
    A new syntax is added for the module parameters num_vfs and probe_vf.
    
      num_vfs=p1,p2,p1+p2
      probe_bf=p1,p2,p1+p2
    
    Where p1(2) is the number of VFs on / probed VFs for physical
    port1(2) and p1+p2 is the number of dual port VFs.
    
    Single port VFs are currently supported only when the link type
    for both ports of the device is Ethernet.
    
    Signed-off-by: Matan Barak <matanb@mellanox.com>
    Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

commit 449fc48866f7d84b0d9a19201de18a4dd4d3488c
Author: Matan Barak <matanb@mellanox.com>
Date:   Wed Mar 19 18:11:52 2014 +0200

    net/mlx4: Adapt code for N-Port VF
    
    Adds support for N-Port VFs, this includes:
    1. Adding support in the wrapped FW command
    	In wrapped commands, we need to verify and convert
    	the slave's port into the real physical port.
    	Furthermore, when sending the response back to the slave,
    	a reverse conversion should be made.
    2. Adjusting sqpn for QP1 para-virtualization
    	The slave assumes that sqpn is used for QP1 communication.
    	If the slave is assigned to a port != (first port), we need
    	to adjust the sqpn that will direct its QP1 packets into the
    	correct endpoint.
    3. Adjusting gid[5] to modify the port for raw ethernet
    	In B0 steering, gid[5] contains the port. It needs
    	to be adjusted into the physical port.
    4. Adjusting number of ports in the query / ports caps in the FW commands
    	When a slave queries the hardware, it needs to view only
    	the physical ports it's assigned to.
    5. Adjusting the sched_qp according to the port number
    	The QP port is encoded in the sched_qp, thus in modify_qp we need
    	to encode the correct port in sched_qp.
    
    Signed-off-by: Matan Barak <matanb@mellanox.com>
    Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

commit f74462acf8f390528c8b7937f227c6c90d017f3b
Author: Matan Barak <matanb@mellanox.com>
Date:   Wed Mar 19 18:11:51 2014 +0200

    net/mlx4: Add utils for N-Port VFs
    
    This patch adds the following utils:
    1. Convert slave_id -> VF
    2. Get the active ports by slave_id
    3. Convert slave's port to real port
    4. Get the slave's port from real port
    5. Get all slaves that uses the i'th real port
    6. Get all slaves that uses the i'th real port exclusively
    
    Signed-off-by: Matan Barak <matanb@mellanox.com>
    Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

commit 1ab95d37bcc3ff2d69e3871e4f056bab7aed0b85
Author: Matan Barak <matanb@mellanox.com>
Date:   Wed Mar 19 18:11:50 2014 +0200

    net/mlx4: Add data structures to support N-Ports per VF
    
    Adds the required data structures to support VFs with N (1 or 2)
    ports instead of always using the number of physical ports.
    
    Signed-off-by: Matan Barak <matanb@mellanox.com>
    Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

commit 82373701be26b893eaf7372db0af84235a51998a
Author: Matan Barak <matanb@mellanox.com>
Date:   Wed Mar 19 18:11:49 2014 +0200

    IB/mlx4_ib: Adapt code to use caps.num_ports instead of a constant
    
    Some code in the mlx4 IB driver stack assumed MLX4_MAX_PORTS ports.
    
    Instead, we should only loop until the number of actual ports in i
    the device, which is stored in dev->caps.num_ports.
    
    Signed-off-by: Matan Barak <matanb@mellanox.com>
    Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

commit 8798998c2cdbc0df3c64e8845c1502ed93ef1ebd
Author: Fabio Estevam <fabio.estevam@freescale.com>
Date:   Wed Mar 19 11:22:06 2014 -0300

    smsc911x: Change clock warning message to debug level
    
    Since passing the clock is not mandatory, change the warning message to debug,
    so that we avoid getting the following clock failure message on every boot:
    
    smsc911x: Driver version 2008-10-21
    smsc911x smsc911x (unregistered net_device): couldn't get clock -2
    libphy: smsc911x-mdio: probed
    
    Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

commit e35bad5d876dc7b0bfd794a3ba328a442bd970e0
Author: Daniel Baluta <dbaluta@ixiacom.com>
Date:   Wed Mar 19 15:58:25 2014 +0200

    net: remove empty lines from tcp_syn_flood_action
    
    Signed-off-by: Daniel Baluta <dbaluta@ixiacom.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

commit 1aa9c483d1be13831bc4e516ce4848d32ac3e944
Author: Sachin Kamat <sachin.kamat@linaro.org>
Date:   Fri Mar 21 04:49:03 2014 +0900

    ARM: EXYNOS: Remove hardware.h file
    
    This is a dummy placeholder file. Delete it.
    
    Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
    Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

commit 2bb1ad17d66da3549eb4d23e264786a98f9ab17b
Author: Sachin Kamat <sachin.kamat@linaro.org>
Date:   Fri Mar 21 04:48:59 2014 +0900

    ARM: SAMSUNG: Remove hardware.h inclusion
    
    The contents of this header file are not referenced anywhere in the
    included .c files except in devs.c. Remove its inclusion. For devs.c,
    explicitly include sizes.h header for SZ_* macros.
    
    Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
    Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

commit 144bf7b0a96e28266c6b2f47a6e04c7a4e4b3aa4
Author: Sachin Kamat <sachin.kamat@linaro.org>
Date:   Fri Mar 21 04:48:07 2014 +0900

    ARM: S3C24XX: Remove invalid code from hardware.h
    
    Remove the code that is not referenced anywhere. While at it also
    remove incorrect file path.
    
    Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
    Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

commit 676141e48af7463717896352e69c10f945ac22dd
Author: Jens Axboe <axboe@fb.com>
Date:   Thu Mar 20 13:29:18 2014 -0600

    blk-mq: don't dump CPU -> hw queue map on driver load
    
    Now that we are out of initial debug/bringup mode, remove
    the verbose dump of the mapping table.
    
    Provide the mapping table in sysfs, under the hardware queue
    directory, in the cpu_list file.
    
    Signed-off-by: Jens Axboe <axboe@fb.com>

commit 602408e3de70d132c115670a366f4c5ae657080c
Author: Tushar Behera <tushar.behera@linaro.org>
Date:   Fri Mar 21 04:31:30 2014 +0900

    dt-bindings: clock: Move exynos-audss-clk.h to dt-bindings/clock
    
    Most of the clock related dt-binding header files are located in
    dt-bindings/clock folder. It would be good to keep all the similar
    header files at a single location.
    
    Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
    Reviewed-by: Sachin Kamat <sachin.kamat@linaro.org>
    Acked-by: Tomasz Figa <t.figa@samsung.com>
    Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

commit 55ace6b285d7350d5b562ba065656c8242629a32
Author: Tushar Behera <tushar.behera@linaro.org>
Date:   Fri Mar 21 04:26:40 2014 +0900

    ARM: dts: Keep some essential LDOs enabled for arndale-octa board
    
    LDO3 and LDO23 need to be enabled in order for soft-reset to work.
    Additionally LDO9 needs to be enabled for USB operations.
    
    Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
    Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

commit 3da355c03a44bc45f3688bb68b51eefa738d1857
Author: Tushar Behera <tushar.behera@linaro.org>
Date:   Fri Mar 21 04:26:40 2014 +0900

    ARM: dts: Disable MDMA1 node for arndale-octa board
    
    MDMA1 can support both secure and non-secure AXI transactions. When this
    is enabled in the kernel for boards that run in secure mode, we get
    imprecise external aborts causing the kernel to oops.
    
    Unhandled fault: imprecise external abort (0x1406) at 0x00000000
    Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000007
    
    Suggested-by: Javi Merino <javi.merino@arm.com>
    Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
    Tested-by: Javi Merino <javi.merino@arm.com>
    Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

commit e1a9d00c689a5da2d1baf273891507c5fb063f4c
Author: Mark Brown <broonie@linaro.org>
Date:   Fri Mar 21 02:57:18 2014 +0900

    ARM: S3C64XX: Fix build for implicit serial_s3c.h inclusion
    
    Some very recent change appears to have removed an implicit inclusion of
    serial_s3c.h causing build failures due to references to UART registers
    in the serial port restore code in next-20140318.  Include it explicitly
    to fix the build.
    
    Signed-off-by: Mark Brown <broonie@linaro.org>
    Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

commit cf559ab94e058df65c841b4afc8d5346fdda19b3
Author: Mark Brown <broonie@linaro.org>
Date:   Fri Mar 21 02:55:11 2014 +0900

    serial: s3c: Fix build of header without serial_core.h preinclusion
    
    serial_s3c.h uses upf_t which is defined in serial_core.h but does not
    include that itself meaning that users which include serial_s3c.h by
    itself don't build.
    
    Signed-off-by: Mark Brown <broonie@linaro.org>
    [t.figa: Moved inclusion under #ifndef __ASSEMBLY__ to fix mach-exynos]
    Signed-off-by: Tomasz Figa <t.figa@samsung.com>
    Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

commit dd8ac696b20c1be5ca4728045df10e882e01e91d
Author: Tomasz Figa <t.figa@samsung.com>
Date:   Tue Mar 18 07:28:30 2014 +0900

    ARM: EXYNOS: Allow wake-up using GIC interrupts
    
    This patch restores the ability to receive wake-up events from internal
    GIC interrupts, e.g. RTC tick or alarm interrupts.
    
    Signed-off-by: Tomasz Figa <t.figa@samsung.com>
    Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
    Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

commit d710aa31874e2ff6e656dbd4807f4bd8d659eb93
Author: Tomasz Figa <t.figa@samsung.com>
Date:   Tue Mar 18 07:28:27 2014 +0900

    ARM: EXYNOS: Stop using legacy Samsung PM code
    
    Since Exynos SoCs does not follow most of the semantics of older SoCs
    when configuring the system to enter sleep, there is no reason to rely
    on the legacy Samsung PM core anymore.
    
    This patch adds local Exynos suspend ops and removes all the code left
    unnecessary. As a side effect, suspend support on Exynos becomes
    multiplatform-friendly.
    
    Signed-off-by: Tomasz Figa <t.figa@samsung.com>
    Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
    Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

commit 559ba237999d723ccba5b4a75cf6b280bac1ab21
Author: Tomasz Figa <t.figa@samsung.com>
Date:   Tue Mar 18 07:28:22 2014 +0900

    ARM: EXYNOS: Remove PM initcalls and useless indirection
    
    This patch simplifies Exynos PM initialization and makes it
    multiplatform friendly by replacing initcalls used originally to invoke
    all the initialization code with explicit function calls.
    
    In addition, an useless subsys_interface is removed, as all its .add_dev
    callback did was setting two function pointers.
    
    Signed-off-by: Tomasz Figa <t.figa@samsung.com>
    Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
    Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

commit dbc5ca163dc46153a8e5249da627af571ae47c10
Author: Tomasz Figa <t.figa@samsung.com>
Date:   Tue Mar 18 07:28:10 2014 +0900

    ARM: EXYNOS: Fix abuse of CONFIG_PM
    
    CONFIG_PM means that at least one of CONFIG_PM_SLEEP and
    CONFIG_PM_RUNTIME is enabled, while multiple entries in
    mach-exynos/Kconfig abused it to enable sleep- and runtime-specific
    functionality.
    
    This patch fixes this abuse by replacing dependencies on CONFIG_PM with
    appropriate dependencies on either CONFIG_PM_SLEEP or CONFIG_PM_RUNTIME,
    whichever is appropriate.
    
    Signed-off-by: Tomasz Figa <t.figa@samsung.com>
    Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
    Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

commit f682426630c620a2b8ae488a4f0d85ec6c272d66
Author: Tomasz Figa <t.figa@samsung.com>
Date:   Tue Mar 18 07:28:10 2014 +0900

    ARM: SAMSUNG: Move s3c_pm_check_* prototypes to plat/pm-common.h
    
    To allow using Samsung PM memory check helpers on platforms that do not
    use the legacy Samsung PM core, this patch moves prototypes of relevant
    functions to plat/pm-common.h header.
    
    Signed-off-by: Tomasz Figa <t.figa@samsung.com>
    Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
    Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

commit b27899178c53226a5ff780a17657c84eb5e32338
Author: Tomasz Figa <t.figa@samsung.com>
Date:   Tue Mar 18 07:28:10 2014 +0900

    ARM: SAMSUNG: Move common save/restore helpers to separate file
    
    To separate legacy PM code from generic helpers, this patch moves the
    generic register save/restore helpers to a new file called pm-common.c
    that is compiled always when CONFIG_PM_SLEEP is enabled, to allow
    platforms that do not want to use the legacy PM code use the generic
    helpers.
    
    Signed-off-by: Tomasz Figa <t.figa@samsung.com>
    Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
    Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

commit 72551f6cf13e2f3a1d273b7007b5d7d7fd69c554
Author: Tomasz Figa <t.figa@samsung.com>
Date:   Tue Mar 18 07:28:09 2014 +0900

    ARM: SAMSUNG: Move Samsung PM debug code into separate file
    
    Not all Samsung SoC platforms are going to use the legacy Samsung PM
    code enabled by CONFIG_SAMSUNG_PM_DEBUG. To allow using Samsung PM debug
    helpers on such platforms, related code is moved to separate file and
    a plat/pm-common.h header is added to separate legacy and generic code.
    
    Signed-off-by: Tomasz Figa <t.figa@samsung.com>
    Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
    Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

commit d38688a69fd88269eae3c7c66ec34fb02fb04fd1
Author: Tomasz Figa <t.figa@samsung.com>
Date:   Tue Mar 18 07:28:09 2014 +0900

    ARM: SAMSUNG: Consolidate PM debug functions
    
    This patch removes one-line functions that was used just to pass
    constant arguments to lower level functions. After previous patches the
    need for those constants has been eliminated, so the main functions can
    be called directly.
    
    Signed-off-by: Tomasz Figa <t.figa@samsung.com>
    Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
    Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

commit 99b2fc2b8b40256538332769f11f2fe6ee942f6c
Author: Tomasz Figa <t.figa@samsung.com>
Date:   Tue Mar 18 07:28:09 2014 +0900

    ARM: SAMSUNG: Use debug_ll_addr() to get UART base address
    
    This patch modifies Samsung PM debug helpers to use a multiplatform
    friendly way of getting base address of debug UART port, so instead
    of using a per-mach static macro, a generic debug_ll_addr() helper
    is used.
    
    Signed-off-by: Tomasz Figa <t.figa@samsung.com>
    Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
    Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

commit de7fe0807c08553b88028d039861a4b8ad04fc62
Author: Tomasz Figa <t.figa@samsung.com>
Date:   Tue Mar 18 07:28:09 2014 +0900

    ARM: SAMSUNG: Save UART DIVSLOT register based on SoC type
    
    The only SoC that does not have DIVSLOT register is S3C2410, so instead
    of exporting a variable for platforms to set if DIVSLOT register should
    be preserved, it's enough to simply check whether we are running on
    a S3C2410 instead.
    
    Signed-off-by: Tomasz Figa <t.figa@samsung.com>
    Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
    Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

commit 04241069617d4f0bfd9f4a3aeefae13e1e5b55e1
Author: Tomasz Figa <t.figa@samsung.com>
Date:   Tue Mar 18 07:28:09 2014 +0900

    ARM: SAMSUNG: Add soc_is_s3c2410() helper
    
    Due to the S3C2410 SoC being quite different from other S3C24xx SoCs
    in some aspects, such as availability of DIVSLOT register in its UART
    blocks, there is a need sometimes to check whether we are running on
    this SoC, not just the S3C24xx series. This patch adds soc_is_s3c2410()
    helper function for this purpose.
    
    Signed-off-by: Tomasz Figa <t.figa@samsung.com>
    Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
    Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

commit 61557b8bac9c80a5c14d237d420c246703e5c2e2
Author: Tomasz Figa <t.figa@samsung.com>
Date:   Tue Mar 18 07:28:09 2014 +0900

    ARM: EXYNOS: Do not resume l2x0 if not enabled before suspend
    
    Trying to resume l2x0 if it was not enabled before suspend leads to
    system crash. This patch prevents this by checking if l2x0_regs_phys is
    a valid pointer to l2x0 context data saved on initialization.
    
    Signed-off-by: Tomasz Figa <t.figa@samsung.com>
    Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
    Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

commit 56981fbc1b044cb140f70279deb736b6ae8664fb
Author: Mike Snitzer <snitzer@redhat.com>
Date:   Thu Mar 20 10:11:15 2014 -0400

    dm cache: prevent corruption caused by discard_block_size > cache_block_size
    
    If the discard block size is larger than the cache block size we will
    not properly quiesce IO to a region that is about to be discarded.  This
    results in a race between a cache migration where no copy is needed, and
    a write to an adjacent cache block that's within the same large discard
    block.
    
    Workaround this by limiting the discard_block_size to cache_block_size.
    Also limit the max_discard_sectors to cache_block_size.
    
    A more comprehensive fix that introduces range locking support in the
    bio_prison and proper quiescing of a discard range that spans multiple
    cache blocks is already in development.
    
    Reported-by: Morgan Mears <Morgan.Mears@netapp.com>
    Signed-off-by: Mike Snitzer <snitzer@redhat.com>
    Acked-by: Joe Thornber <ejt@redhat.com>
    Acked-by: Heinz Mauelshagen <heinzm@redhat.com>
    Cc: stable@vger.kernel.org

commit 88050049e7111f074e8887ba5a4cefc9f8fa8d41
Author: stephen hemminger <shemming@brocade.com>
Date:   Wed Mar 19 21:54:20 2014 -0700

    netlink: fix setsockopt in mmap examples in documentation
    
    The documentation for how to use netlink mmap interface is incorrect.
    The calls to setsockopt() require an additional argument.
    
    Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>

commit f9b8c4c8baded129535d82d74df8e87a7a369f54
Author: Ben Pfaff <blp@nicira.com>
Date:   Thu Mar 20 10:45:21 2014 -0700

    openvswitch: Correctly report flow used times for first 5 minutes after boot.
    
    The kernel starts out its "jiffies" timer as 5 minutes below zero, as
    shown in include/linux/jiffies.h:
    
      /*
       * Have the 32 bit jiffies value wrap 5 minutes after boot
       * so jiffies wrap bugs show up earlier.
       */
      #define INITIAL_JIFFIES ((unsigned long)(unsigned int) (-300*HZ))
    
    The loop in ovs_flow_stats_get() starts out with 'used' set to 0, then
    takes any "later" time.  This means that for the first five minutes after
    boot, flows will always be reported as never used, since 0 is greater than
    any time already seen.
    
    Signed-off-by: Ben Pfaff <blp@nicira.com>
    Acked-by: Pravin B Shelar <pshelar@nicira.com>
    Signed-off-by: Jesse Gross <jesse@nicira.com>

commit 494314c415e2d3b308f57c9245ae6525166c70b8
Author: Trond Myklebust <trond.myklebust@primarydata.com>
Date:   Thu Mar 20 12:59:09 2014 -0400

    SUNRPC: rpc_restart_call/rpc_restart_call_prepare should clear task->tk_status
    
    When restarting an rpc call, we should not be carrying over data from the
    previous call.
    
    Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>

commit 6bd144160a5554e4af052c153a094c4851a4c6aa
Author: Trond Myklebust <trond.myklebust@primarydata.com>
Date:   Thu Mar 20 12:53:54 2014 -0400

    SUNRPC: Don't let rpc_delay() clobber non-timeout errors
    
    Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>

commit d614f6d0bed7fa5a795708a6dc334370e1ca7951
Author: Yan Burman <yanb@mellanox.com>
Date:   Tue Mar 11 14:41:47 2014 +0200

    IB/mad: Check and handle potential DMA mapping errors
    
    Running with DMA_API_DEBUG enabled and not checking for DMA mapping
    errors triggers a kernel stack trace with "DMA-API: device driver
    failed to check map error" message.  Add these checks to the MAD
    module, both to be be more robust and also eliminate these
    false-positive stack traces.
    
    Signed-off-by: Yan Burman <yanb@mellanox.com>
    Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
    Signed-off-by: Roland Dreier <roland@purestorage.com>

commit 76cf9cbb68f3234f54c0a12bde6372911157c650
Author: Selvin Xavier <selvin.xavier@emulex.com>
Date:   Tue Mar 18 14:54:56 2014 +0530

    RDMA/ocrdma: Unregister inet notifier when unloading ocrdma
    
    Unregister the inet notifier during ocrdma unload to avoid a panic after
    driver unload.
    
    Signed-off-by: Selvin Xavier <selvin.xavier@emulex.com>
    Signed-off-by: Devesh Sharma <devesh.sharma@emulex.com>
    Signed-off-by: Roland Dreier <roland@purestorage.com>

commit 186f8ba062f796221d51077342f3ba5202838e9f
Author: Dan Carpenter <dan.carpenter@oracle.com>
Date:   Thu Jan 30 15:12:31 2014 +0300

    IB/qib: Cleanup qib_register_observer()
    
    Returning directly is easier to read than do-nothing gotos.  Remove the
    duplicative check on "olp" and pull the code in one indent level.
    
    Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
    Acked-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
    Signed-off-by: Roland Dreier <roland@purestorage.com>

commit 49c0e2414b20d868cf006addf14152570aef2605
Author: CQ Tang <cq.tang@intel.com>
Date:   Thu Jan 30 17:36:00 2014 -0500

    IB/qib: Change SDMA progression mode depending on single- or multi-rail
    
    Improve performance by changing the behavour of the driver when all
    SDMA descriptors are in use, and the processes adding new descriptors
    are single- or multi-rail.
    
    For single-rail processes, the driver will block the call and finish
    posting all SDMA descriptors onto the hardware queue before returning
    back to PSM.  Repeated kernel calls are slower than blocking.
    
    For multi-rail processes, the driver will return to PSM as quick as
    possible so PSM can feed packets to other rail.  If all hardware
    queues are full, PSM will buffer the remaining SDMA descriptors until
    notified by interrupt that space is available.
    
    This patch builds a red-black tree to track the number rails opened by
    a particular PID. If the number is more than one, it is a multi-rail
    PSM process, otherwise, it is a single-rail process.
    
    Reviewed-by: Dean Luick <dean.luick@intel.com>
    Reviewed-by: John A Gregor <john.a.gregor@intel.com>
    Reviewed-by: Mitko Haralanov <mitko.haralanov@intel.com>
    Signed-off-by: CQ Tang <cq.tang@intel.com>
    Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
    Signed-off-by: Roland Dreier <roland@purestorage.com>

commit 8307281a5bceaaaa1566897dc0b57cdb62413ae8
Author: Roland Dreier <roland@purestorage.com>
Date:   Mon Mar 17 23:14:17 2014 -0700

    RDMA/ocrdma: Fix warnings about pointer <-> integer casts
    
    We should cast pointers to and from unsigned long to turn them into ints.
    
    Signed-off-by: Roland Dreier <roland@purestorage.com>

commit 0d3a1e7e317b06d87b92011c62a5061f299820b9
Author: Devesh Sharma <Devesh.Sharma@Emulex.Com>
Date:   Tue Feb 4 11:57:10 2014 +0530

    RDMA/ocrdma: Code clean-up
    
    Clean up code.  Also modifying GSI QP to error during ocrdma_close is fixed.
    
    Signed-off-by: Devesh Sharma <devesh.sharma@emulex.com>
    Signed-off-by: Selvin Xavier <selvin.xavier@emulex.com>
    Signed-off-by: Roland Dreier <roland@purestorage.com>

commit 9a31758308df672713ea0db9a9eff7c3cb348bc2
Author: Selvin Xavier <selvin.xavier@emulex.com>
Date:   Tue Feb 4 11:57:09 2014 +0530

    RDMA/ocrdma: Display FW version
    
    Adding a sysfs file for getting the FW version.
    
    Signed-off-by: Selvin Xavier <selvin.xavier@emulex.com>
    Signed-off-by: Devesh Sharma <devesh.sharma@emulex.com>
    Signed-off-by: Roland Dreier <roland@purestorage.com>

commit babe6b9ce0bdf964624435382a67c09f668bcab0
Author: Selvin Xavier <selvin.xavier@emulex.com>
Date:   Tue Feb 4 11:57:07 2014 +0530

    RDMA/ocrdma: Query controller information
    
    Issue mailbox commands to query ocrdma controller information and phy
    information and print them while adding ocrdma device.
    
    Signed-off-by: Selvin Xavier <selvin.xavier@emulex.com>
    Signed-off-by: Devesh Sharma <devesh.sharma@emulex.com>
    Signed-off-by: Roland Dreier <roland@purestorage.com>

commit 8bdb31b4d1931a32264fbe4651e607eb72941ff0
Author: Sachin Kamat <sachin.kamat@linaro.org>
Date:   Fri Mar 21 02:17:22 2014 +0900

    ARM: dts: Update Exynos DT files with generic compatible strings
    
    Add generic compatible strings to the respective board DT files.
    
    Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
    Acked-by: Arnd Bergmann <arnd@arndb.de>
    Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

commit 4868123ceb6ef0d4fa04e3211a0f4cd948f418f9
Author: Sachin Kamat <sachin.kamat@linaro.org>
Date:   Fri Mar 21 02:14:59 2014 +0900

    ARM: EXYNOS: Add generic compatible strings
    
    Add generic compatible strings for Exynos4 and 5 platforms so that
    future SoCs can use them if there is nothing extra/specific to be
    differentiated.
    
    Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
    Acked-by: Arnd Bergmann <arnd@arndb.de>
    Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

commit cbf08b9ebdfc75bb13ef80ad3b8e3bea46d8c43a
Author: Sachin Kamat <sachin.kamat@linaro.org>
Date:   Fri Mar 21 02:14:30 2014 +0900

    ARM: EXYNOS: Consolidate exynos4 and exynos5 machine files
    
    Since there is very little difference between these two files,
    they can be easily combined into one with necessary SoC checks.
    While at it also merge the common.c file into this as it does
    not have any other users.
    
    Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
    Acked-by: Arnd Bergmann <arnd@arndb.de>
    Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

commit 6eb84669cf7e94214593f162d4c1cf20424dd906
Author: Sachin Kamat <sachin.kamat@linaro.org>
Date:   Fri Mar 21 02:09:39 2014 +0900

    ARM: EXYNOS: Consolidate CPU init code
    
    cpu_table was used to distinguish between different Exynos4 and 5
    SoCs and based on the type do the initialization and io mapping.
    exynos_init is dummy and no longer needed as we do a DT based booting.
    By having a common io mapping function we can get rid of the whole
    table and avoid populating it for every SoC.
    
    Tested on Exynos4210, 5250 and 5420 based boards.
    
    Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
    Tested-by: Tomasz Figa <t.figa@samsung.com>
    Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

commit 7bd03c0ebe54db94f20cd7577b875d9d27e539a9
Author: Selvin Xavier <selvin.xavier@emulex.com>
Date:   Tue Feb 4 11:57:06 2014 +0530

    RDMA/ocrdma: Support non-embedded mailbox commands
    
    Added a routine to issue non-embedded mailbox commands for handling
    large mailbox request/response data.
    
    Signed-off-by: Selvin Xavier <selvin.xavier@emulex.com>
    Signed-off-by: Devesh Sharma <devesh.sharma@emulex.com>
    Signed-off-by: Roland Dreier <roland@purestorage.com>

commit a1b8aff87d5f27022e6c14c43bf43226e75d2745
Author: Selvin Xavier <selvin.xavier@emulex.com>
Date:   Tue Feb 4 11:57:05 2014 +0530

    RDMA/ocrdma: Handle CQ overrun error
    
    Signed-off-by: Selvin Xavier <selvin.xavier@emulex.com>
    Signed-off-by: Devesh Sharma <devesh.sharma@emulex.com>
    Signed-off-by: Roland Dreier <roland@purestorage.com>

commit 23631e15a7f3c01a1ebb34f2c176f658c27eb949
Author: Selvin Xavier <selvin.xavier@emulex.com>
Date:   Tue Feb 4 11:57:04 2014 +0530

    RDMA/ocrdma: Display proper value for max_mw
    
    Signed-off-by: Selvin Xavier <selvin.xavier@emulex.com>
    Signed-off-by: Devesh Sharma <devesh.sharma@emulex.com>
    Signed-off-by: Roland Dreier <roland@purestorage.com>

commit c0e19755d56142b026b07b8020273301c8ed42bb
Author: Selvin Xavier <selvin.xavier@emulex.com>
Date:   Tue Feb 4 11:57:03 2014 +0530

    RDMA/ocrdma: Use non-zero tag in SRQ posting
    
    As part of SRQ receive buffers posting we populate a non-zero tag
    which will be returned in SRQ receive completions.
    
    Signed-off-by: Selvin Xavier <selvin.xavier@emulex.com>
    Signed-off-by: Devesh Sharma <devesh.sharma@emulex.com>
    Signed-off-by: Roland Dreier <roland@purestorage.com>

commit def4eb8e5eacdfbc4788a6cb1bc0a3f118b5b349
Author: Selvin Xavier <selvin.xavier@emulex.com>
Date:   Tue Feb 4 11:57:02 2014 +0530

    RDMA/ocrdma: Memory leak fix in ocrdma_dereg_mr()
    
    Signed-off-by: Selvin Xavier <selvin.xavier@emulex.com>
    Signed-off-by: Devesh Sharma <devesh.sharma@emulex.com>
    Signed-off-by: Roland Dreier <roland@purestorage.com>

commit 0f4d45e0845e63e54aeaf5a7444b8ef4b77e4895
Author: devesh.sharma@emulex.com <devesh.sharma@emulex.com>
Date:   Tue Feb 4 11:57:01 2014 +0530

    RDMA/ocrdma: Increment abi version count
    
    Increment the ABI version count for driver/library interface.
    
    Signed-off-by: Devesh Sharma <devesh.sharma@emulex.com>
    Signed-off-by: Selvin Xavier <selvin.xavier@emulex.com>
    Signed-off-by: Roland Dreier <roland@purestorage.com>

commit 5b5eb9421408080b46ce14210ca717714859dee4
Author: devesh.sharma@emulex.com <devesh.sharma@emulex.com>
Date:   Tue Feb 4 11:57:00 2014 +0530

    RDMA/ocrdma: Update version string
    
    Update the driver vrsion string and node description string
    
    Signed-off-by: Devesh Sharma <devesh.sharma@emulex.com>
    Signed-off-by: Selvin Xavier <selvin.xavier@emulex.com>
    Signed-off-by: Roland Dreier <roland@purestorage.com>

commit 91b3140a692e87733367521efdd24f9a3532889a
Author: devesh.sharma@emulex.com <devesh.sharma@emulex.com>
Date:   Tue Feb 4 11:56:59 2014 +0530

    be2net: Add abi version between be2net and ocrdma
    
    This patch adds abi versioning between be2net and ocrdma driver modules
    to catch functional incompatibilities in the two drivers.
    
    Signed-off-by: Devesh Sharma <devesh.sharma@emulex.com>
    Signed-off-by: Selvin Xavier <selvin.xavier@emulex.com>
    Signed-off-by: Roland Dreier <roland@purestorage.com>

commit 973ce6ce272d2c79f7eb1094ec26c25d1d8b4b32
Author: devesh.sharma@emulex.com <devesh.sharma@emulex.com>
Date:   Tue Feb 4 11:56:58 2014 +0530

    RDMA/ocrdma: ABI versioning between ocrdma and be2net
    
    While loading RoCE driver be2net driver should check for ABI version
    to catch functional incompatibilities.
    
    Signed-off-by: Devesh Sharma <devesh.sharma@emulex.com>
    Signed-off-by: Selvin Xavier <selvin.xavier@emulex.com>
    Signed-off-by: Roland Dreier <roland@purestorage.com>

commit db84035babf25f81be2a548f9332553b3a62865f
Author: devesh.sharma@emulex.com <devesh.sharma@emulex.com>
Date:   Tue Feb 4 11:56:57 2014 +0530

    RDMA/ocrdma: Allow DPP QP creation
    
    Allow creating DPP QP even if inline-data is not requested.  This is an
    optimization to lower latency.
    
    Signed-off-by: Devesh Sharma <devesh.sharma@emulex.com>
    Signed-off-by: Selvin Xavier <selvin.xavier@emulex.com>
    Signed-off-by: Roland Dreier <roland@purestorage.com>

commit d64c9414a4cc7c768d117ae035bf45cce760aeb5
Author: devesh.sharma@emulex.com <devesh.sharma@emulex.com>
Date:   Tue Feb 4 11:56:56 2014 +0530

    RDMA/ocrdma: Read ASIC_ID register to select asic_gen
    
    ocrdma driver selects execution path based on sli_family and asic
    generation number.  This introduces code to read the asic gen number
    from pci register instead of obtaining it from the Emulex NIC driver.
    
    Signed-off-by: Devesh Sharma <devesh.sharma@emulex.com>
    Signed-off-by: Selvin Xavier <selvin.xavier@emulex.com>
    Signed-off-by: Roland Dreier <roland@purestorage.com>

commit da7d0e7699e6c5e3b076ba68680afe679e7379f0
Author: Devesh Sharma <Devesh.Sharma@Emulex.Com>
Date:   Tue Feb 4 11:56:55 2014 +0530

    RDMA/ocrdma: SQ and RQ doorbell offset clean up
    
    Introducing new macros to define SQ and RQ doorbell offset.
    
    Signed-off-by: Devesh Sharma <devesh.sharma@emulex.com>
    Signed-off-by: Selvin Xavier <selvin.xavier@emulex.com>
    Signed-off-by: Roland Dreier <roland@purestorage.com>

commit 1dbf741320af98620593c9a1d7481dd8b37f53fe
Author: devesh.sharma@emulex.com <devesh.sharma@emulex.com>
Date:   Tue Feb 4 11:56:54 2014 +0530

    RDMA/ocrdma: EQ full catastrophe avoidance
    
    Stale entries in the CQ being destroyed causes hardware to generate
    EQEs indefinitely for a given CQ.  Thus causing uncontrolled execution
    of irq_handler.  This patch fixes this using following sementics:
    
        * irq_handler will ring EQ doorbell atleast once and implement budgeting scheme.
        * cq_destroy will count number of valid entires during destroy and ring
          cq-db so that hardware does not generate uncontrolled EQE.
        * cq_destroy will synchronize with last running irq_handler instance.
        * arm_cq will always defer arming CQ till poll_cq, except for the first arm_cq call.
        * poll_cq will always ring cq-db with arm=SET if arm_cq was called prior to enter poll_cq.
        * poll_cq will always ring cq-db with arm=UNSET if arm_cq was not called prior to enter poll_cq.
    
    Signed-off-by: Devesh Sharma <devesh.sharma@emulex.com>
    Signed-off-by: Selvin Xavier <selvin.xavier@emulex.com>
    Signed-off-by: Roland Dreier <roland@purestorage.com>

commit eda6d1d1b7932f90d55583f8f3835dd7d6b32543
Author: Steve Wise <swise@opengridcomputing.com>
Date:   Wed Mar 19 17:44:45 2014 +0530

    RDMA/cxgb4: Save the correct map length for fast_reg_page_lists
    
    We cannot save the mapped length using the rdma max_page_list_len field
    of the ib_fast_reg_page_list struct because the core code uses it.  This
    results in an incorrect unmap of the page list in c4iw_free_fastreg_pbl().
    
    I found this with dma mapping debugging enabled in the kernel.  The
    fix is to save the length in the c4iw_fr_page_list struct.
    
    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
    Signed-off-by: Roland Dreier <roland@purestorage.com>

commit df2d5130ece9118591c2f3fbf0ee4a79183b4ccc
Author: Steve Wise <swise@opengridcomputing.com>
Date:   Wed Mar 19 17:44:44 2014 +0530

    RDMA/cxgb4: Default peer2peer mode to 1
    
    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
    Signed-off-by: Roland Dreier <roland@purestorage.com>

commit ba32de9d8d8173a1d6dd1ed608c519d5d0a623bb
Author: Steve Wise <swise@opengridcomputing.com>
Date:   Wed Mar 19 17:44:43 2014 +0530

    RDMA/cxgb4: Mind the sq_sig_all/sq_sig_type QP attributes
    
    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
    Signed-off-by: Roland Dreier <roland@purestorage.com>

commit 8a9c399eeee8c2d99e22b975f6023001a1fde88f
Author: Steve Wise <swise@opengridcomputing.com>
Date:   Wed Mar 19 17:44:42 2014 +0530

    RDMA/cxgb4: Fix incorrect BUG_ON conditions
    
    Based on original work from Jay Hernandez <jay@chelsio.com>
    
    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
    Signed-off-by: Roland Dreier <roland@purestorage.com>

commit 58553078c1feb40e0a02d7c72ae41dd6b923f231
Author: Sachin Kamat <sachin.kamat@linaro.org>
Date:   Fri Mar 21 02:00:21 2014 +0900

    ARM: SAMSUNG: Introduce generic Exynos4 and 5 helpers
    
    Add helpers to check for Exynos4 and 5 family of SoCs.
    This will eliminate comparing long list of SoCs and make
    code simpler.
    
    Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
    Acked-by: Arnd Bergmann <arnd@arndb.de>
    Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

commit 7ed30015007c32c006783526dc54a2a88bd5e13b
Author: Sachin Kamat <sachin.kamat@linaro.org>
Date:   Fri Mar 21 01:52:56 2014 +0900

    ARM: EXYNOS: Add support to reserve memory for MFC-v7
    
    Reserve memory for MFC-v7 IP.
    
    Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
    Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

commit 8b3e8bbd132279be544a6f4dc22c22d244c98c23
Author: Tushar Behera <tushar.behera@linaro.org>
Date:   Fri Mar 21 01:49:24 2014 +0900

    ARM: SAMSUNG: Reorganize calls to reserve memory for MFC
    
    Reorganize code so that "plat/mfc.h" is no more referred
    from mach-exynos directory.
    
    Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
    Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>

commit ebf00060c33b9d0946384fa6f440df7ea35a569e
Author: Steve Wise <swise@opengridcomputing.com>
Date:   Wed Mar 19 17:44:40 2014 +0530

    RDMA/cxgb4: Always release neigh entry
    
    Always release the neigh entry in rx_pkt().
    
    Based on original work by Santosh Rastapur <santosh@chelsio.com>.
    
    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
    Signed-off-by: Roland Dreier <roland@purestorage.com>

commit f8e819081f797df355cffbdedb9301ea50ae76b2
Author: Steve Wise <swise@opengridcomputing.com>
Date:   Wed Mar 19 17:44:39 2014 +0530

    RDMA/cxgb4: Allow loopback connections
    
    find_route() must treat loopback as a valid egress interface.
    
    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
    Signed-off-by: Roland Dreier <roland@purestorage.com>

commit ffd435924c86de055d33fe59941841819eef9f6a
Author: Steve Wise <swise@opengridcomputing.com>
Date:   Wed Mar 19 17:44:38 2014 +0530

    RDMA/cxgb4: Cap CQ size at T4_MAX_IQ_SIZE
    
    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
    Signed-off-by: Roland Dreier <roland@purestorage.com>

commit e24a72a3302a638d4c6e77f0b40c45cc61c3f089
Author: Dan Carpenter <dan.carpenter@oracle.com>
Date:   Sat Oct 19 12:14:35 2013 +0300

    RDMA/cxgb4: Fix four byte info leak in c4iw_create_cq()
    
    There is a four byte hole at the end of the "uresp" struct after the
    ->qid_mask member.
    
    Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
    Signed-off-by: Roland Dreier <roland@purestorage.com>

commit ff1706f4feb8e0e1a2e56a8dd57e17a4b45649b5
Author: Dan Carpenter <dan.carpenter@oracle.com>
Date:   Sat Oct 19 12:14:12 2013 +0300

    RDMA/cxgb4: Fix underflows in c4iw_create_qp()
    
    These sizes should be unsigned so we don't allow negative values and
    have underflow bugs.  These can come from the user so there may be
    security implications, but I have not tested this.
    
    Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
    Signed-off-by: Roland Dreier <roland@purestorage.com>

commit 4726e0b045b80c514377da35ca01467ef6a4de53
Author: Sagar Kamble <sagar.a.kamble@intel.com>
Date:   Mon Mar 10 17:06:23 2014 +0530

    drm/i915: Enabling 128x128 and 256x256 ARGB Cursor Support
    
    With this patch we allow larger cursor planes of sizes 128x128
    and 256x256.
    
    v2: Added more precise check on size while setting cursor plane.
    
    v3: Changes related to restructuring cursor size restrictions
    and DRM_DEBUG usage.
    
    v4: Indentation related changes for setting cursor control and
    implementing DRM_CAP_CURSOR_WIDTH and DRM_CAP_CURSOR_HEIGHT
    
    Testcase: igt/kms_cursor_crc
    Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
    Cc: Jani Nikula <jani.nikula@linux.intel.com>
    Cc: David Airlie <airlied@linux.ie>
    Cc: dri-devel@lists.freedesktop.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: G, Pallavi <pallavi.g@intel.com>
    Signed-off-by: Sagar Kamble <sagar.a.kamble@intel.com>
    Reviewed-by: Imre Deak <imre.deak@intel.com>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

commit 61b1a7fbda6f761ebe16a62124578ca0779d9365
Author: Johan Hedberg <johan.hedberg@intel.com>
Date:   Thu Mar 20 12:54:16 2014 +0200

    Bluetooth: Fix address value for early disconnection events
    
    We need to ensure that we do not send events to user space with the
    identity address if we have not yet notified user space of the IRK. The
    code was previously trying to handle this for the mgmt_pair_device
    response (which worked well enough) but this is not the only connection
    related event that might be sent to user space before pairing is
    successful: another important event is Device Disconnected.
    
    The issue can actually be solved more simply than the solution
    previously used for mgmt_pair_device. Since we do have the identity
    address tracked as part of the remote IRK struct we can just copy it
    over from there to the hci_conn struct once we've for real sent the mgmt
    event for the new IRK.
    
    Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
    Signed-off-by: Marcel Holtmann <marcel@holtmann.org>

commit 204747c970c0d568721c76ab8a57dde0e5dcf0d5
Author: Guenter Roeck <linux@roeck-us.net>
Date:   Thu Mar 20 08:12:28 2014 -0700

    mfd: kempld-core: Fix potential hang-up during boot
    
    On PXT and COMe-cPC2 boards it is observed that the hardware
    mutex is acquired but not being released during initialization.
    This can result in a hang-up during boot if the driver is built
    into the kernel.
    
    Releasing the mutex twice if it was acquired fixes the problem.
    Subsequent request/release cycles work as expected, so the fix is
    only needed during initialization.
    
    Cc: <stable@vger.kernel.org>
    Reviewed-by: Michael Brunner <michael.brunner@kontron.com>
    Tested-by: Michael Brunner <michael.brunner@kontron.com>
    Signed-off-by: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: Lee Jones <lee.jones@linaro.org>

commit 5a78401623740c892868d5929b33f5cda8fe819e
Author: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Date:   Tue Mar 18 14:11:26 2014 +0100

    mfd: sec-core: Fix uninitialized 'regmap_rtc' on S2MPA01
    
    Initialize the 'regmap_rtc' on S2MPA01 to some sane value. Sane at least
    for S5M87X chipsets, not S2MPS/S2MPA but it won't be used because
    rtc-s5m driver does not support S2MPA01.
    
    This fixes following error:
    drivers/mfd/sec-core.c:342:45: warning: ‘regmap_rtc’ may be used uninitialized in this function [-Wuninitialized]
    
    Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
    Acked-by: Sachin Kamat <sachin.kamat@linaro.org>
    Signed-off-by: Lee Jones <lee.jones@linaro.org>

commit 67b3bd4e65f0854aca70e0134d59b1daede49504
Author: Arend van Spriel <arend@broadcom.com>
Date:   Thu Mar 20 10:18:03 2014 +0100

    brcmfmac: fallback to mimo_bw_cap for older firmwares
    
    In order to support the driver behaviour introduced by:
    
       commit d0575a5a703978c43e25128421158c78534ba100
       Author: Daniel Kim <dekim@broadcom.com>
       Date:   Wed Mar 12 18:12:14 2014 -0700
    
           brcmfmac: Enable 40MHz bandwidth in 2GHz band and OBSS scanning
    
    in devices that do not support bwcap firmware command a fallback
    is added.
    
    Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
    Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
    Signed-off-by: Arend van Spriel <arend@broadcom.com>
    Signed-off-by: John W. Linville <linville@tuxdriver.com>

commit 4d1a4f16c96d3f4cf6afd92ca3ffb4d2c24875e1
Author: Arend van Spriel <arend@broadcom.com>
Date:   Thu Mar 20 10:18:02 2014 +0100

    brcmfmac: only show error message when brcmf_sdiod_regrw_helper() fails
    
    In the function brcmf_sdiod_request_data() an error message is logged,
    but the calling function retries it. This patch will only log an error
    message when retry limit is reached. The low-level error is still
    logged by a SDIO debug message.
    
    Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
    Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
    Signed-off-by: Arend van Spriel <arend@broadcom.com>
    Signed-off-by: John W. Linville <linville@tuxdriver.com>

commit 58e9df462fd70a1862378beb46b312f1f6bca94f
Author: Arend van Spriel <arend@broadcom.com>
Date:   Thu Mar 20 10:18:01 2014 +0100

    brcmfmac: reinit watchdog completion after handling watchdog
    
    The watchdog thread waits on completion that is set from a timer. As
    the completion is count based this could mean that on a busy system
    the watchdog is handled multiple times with a very short interval.
    This is not the intended behaviour. After handling the watchdog it
    should wait for the next timer expiry. This is accomplished by
    reinitializing the completion.
    
    Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
    Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
    Signed-off-by: Arend van Spriel <arend@broadcom.com>
    Signed-off-by: John W. Linville <linville@tuxdriver.com>

commit d23536796011cbeeb93fc866446800c52deb5603
Author: Daniel Kim <dekim@broadcom.com>
Date:   Thu Mar 20 10:18:00 2014 +0100

    brcmfmac: Enable 40MHz bandwidth in 2GHz band and OBSS scanning operations
    
    This patch enables 40MHz bandwidth in 2GHz band after checking whether
    cfg80211 allows it or not, and enables OBSS scanning operations to
    to support 20/40 BSS coexistence.
    
    Reviewed-by: Arend Van Spriel <arend@broadcom.com>
    Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
    Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
    Signed-off-by: Daniel Kim <dekim@broadcom.com>
    Signed-off-by: Arend van Spriel <arend@broadcom.com>
    Signed-off-by: John W. Linville <linville@tuxdriver.com>

commit 1fa3e2eb9db07f30a605c66d1a2fdde4b24e74d5
Author: Steve Dickson <steved@redhat.com>
Date:   Thu Mar 20 11:23:03 2014 -0400

    SUNRPC: Ensure call_connect_status() deals correctly with SOFTCONN tasks
    
    Don't schedule an rpc_delay before checking to see if the task
    is a SOFTCONN because the tk_callback from the delay (__rpc_atrun)
    clears the task status before the rpc_exit_task can be run.
    
    Signed-off-by: Steve Dickson <steved@redhat.com>
    Fixes: 561ec1603171c (SUNRPC: call_connect_status should recheck...)
    Link: http://lkml.kernel.org/r/5329CF7C.7090308@RedHat.com
    Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>

commit f5b972e9fbd2e99a2abc3221783d089799b69394
Author: Heiko Carstens <heiko.carstens@de.ibm.com>
Date:   Thu Mar 20 15:30:14 2014 +0100

    compat: include linux/unistd.h within linux/compat.h
    
    linux/compat.h does not include linux/unistd.h but the compat.h header
    file contains various conditional
    
     #ifdef __ARCH_WANT_COMPAT_...
     asmlinkage long compat...()
     #endif
    
    compat system call function declarations.
    If linux/unistd.h isn't included it depends on previous includes if those
    __ARCH_WANT_COMPAT_... defines are defined or not. So add an additional
    linux/unistd.h include.
    
    Should fix this compile error on tile:
    
    include/uapi/asm-generic/unistd.h:195:1: error: 'compat_sys_getdents64' undeclared
    make[3]: *** [arch/tile/kernel/compat.o] Error 1
    
    Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
    Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
    Acked-by: Chris Metcalf <cmetcalf@tilera.com>
    Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>

commit e1b2dc176f2d5be7952c47a4e4e8f3b06a90db1c
Author: Tejun Heo <tj@kernel.org>
Date:   Thu Mar 20 11:10:15 2014 -0400

    cgroup: break kernfs active_ref protection in cgroup directory operations
    
    cgroup_tree_mutex should nest above the kernfs active_ref protection;
    however, cgroup_create() and cgroup_rename() were grabbing
    cgroup_tree_mutex while under kernfs active_ref protection.  This has
    actualy possibility to lead to deadlocks in case these operations race
    against cgroup_rmdir() which invokes kernfs_remove() on directory
    kernfs_node while holding cgroup_tree_mutex.
    
    Neither cgroup_create() or cgroup_rename() requires active_ref
    protection.  The former already has enough synchronization through
    cgroup_lock_live_group() and the latter doesn't care, so this can be
    fixed by updating both functions to break all active_ref protections
    before grabbing cgroup_tree_mutex.
    
    While this patch fixes the immediate issue, it probably needs further
    work in the long term - kernfs directories should enable lockdep
    annotations and maybe the better way to handle this is marking
    directory nodes as not needing active_ref protection rather than
    breaking it in each operation.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 80e0b6e8a001361316a2d62b748fe677ec46b860
Author: Richard Guy Briggs <rgb@redhat.com>
Date:   Sun Mar 16 14:00:19 2014 -0400

    sched: declare pid_alive as inline
    
    We accidentally declared pid_alive without any extern/inline connotation.
    Some platforms were fine with this, some like ia64 and mips were very angry.
    If the function is inline, the prototype should be inline!
    
    on ia64:
    include/linux/sched.h:1718: warning: 'pid_alive' declared inline after
    being called
    
    Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
    Signed-off-by: Eric Paris <eparis@redhat.com>

commit 579ec9e1ab0bdca2dbc3c942aa1a530a6ec8c349
Author: Eric Paris <eparis@redhat.com>
Date:   Tue Mar 11 12:55:42 2014 -0400

    audit: use uapi/linux/audit.h for AUDIT_ARCH declarations
    
    The syscall.h headers were including linux/audit.h but really only
    needed the uapi/linux/audit.h to get the requisite defines.  Switch to
    the uapi headers.
    
    Signed-off-by: Eric Paris <eparis@redhat.com>
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-mips@linux-mips.org
    Cc: linux-s390@vger.kernel.org
    Cc: x86@kernel.org

commit 5e937a9ae9137899c6641d718bd3820861099a09
Author: Eric Paris <eparis@redhat.com>
Date:   Tue Mar 11 12:48:43 2014 -0400

    syscall_get_arch: remove useless function arguments
    
    Every caller of syscall_get_arch() uses current for the task and no
    implementors of the function need args.  So just get rid of both of
    those things.  Admittedly, since these are inline functions we aren't
    wasting stack space, but it just makes the prototypes better.
    
    Signed-off-by: Eric Paris <eparis@redhat.com>
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-mips@linux-mips.org
    Cc: linux390@de.ibm.com
    Cc: x86@kernel.org
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-s390@vger.kernel.org
    Cc: linux-arch@vger.kernel.org

commit b7550787fe8b5beffb5f56fa11a87712d699d085
Author: Joe Perches <jo…
ystk pushed a commit to ystk/linux-ltsi-work that referenced this pull request May 23, 2014
=======================================================
[ INFO: possible circular locking dependency detected ]
3.0.0-rc3+ torvalds#26
-------------------------------------------------------
ip/1104 is trying to acquire lock:
 (local_softirq_lock){+.+...}, at: [<ffffffff81056d12>] __local_lock+0x25/0x68

but task is already holding lock:
 (sk_lock-AF_INET){+.+...}, at: [<ffffffff81433308>] lock_sock+0x10/0x12

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (sk_lock-AF_INET){+.+...}:
       [<ffffffff810836e5>] lock_acquire+0x103/0x12e
       [<ffffffff813e2781>] lock_sock_nested+0x82/0x92
       [<ffffffff81433308>] lock_sock+0x10/0x12
       [<ffffffff81433afa>] tcp_close+0x1b/0x355
       [<ffffffff81453c99>] inet_release+0xc3/0xcd
       [<ffffffff813dff3f>] sock_release+0x1f/0x74
       [<ffffffff813dffbb>] sock_close+0x27/0x2b
       [<ffffffff81129c63>] fput+0x11d/0x1e3
       [<ffffffff81126577>] filp_close+0x70/0x7b
       [<ffffffff8112667a>] sys_close+0xf8/0x13d
       [<ffffffff814ae882>] system_call_fastpath+0x16/0x1b

-> #0 (local_softirq_lock){+.+...}:
       [<ffffffff81082ecc>] __lock_acquire+0xacc/0xdc8
       [<ffffffff810836e5>] lock_acquire+0x103/0x12e
       [<ffffffff814a7e40>] _raw_spin_lock+0x3b/0x4a
       [<ffffffff81056d12>] __local_lock+0x25/0x68
       [<ffffffff81056d8b>] local_bh_disable+0x36/0x3b
       [<ffffffff814a7fc4>] _raw_write_lock_bh+0x16/0x4f
       [<ffffffff81433c38>] tcp_close+0x159/0x355
       [<ffffffff81453c99>] inet_release+0xc3/0xcd
       [<ffffffff813dff3f>] sock_release+0x1f/0x74
       [<ffffffff813dffbb>] sock_close+0x27/0x2b
       [<ffffffff81129c63>] fput+0x11d/0x1e3
       [<ffffffff81126577>] filp_close+0x70/0x7b
       [<ffffffff8112667a>] sys_close+0xf8/0x13d
       [<ffffffff814ae882>] system_call_fastpath+0x16/0x1b

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(sk_lock-AF_INET);
                               lock(local_softirq_lock);
                               lock(sk_lock-AF_INET);
  lock(local_softirq_lock);

 *** DEADLOCK ***

1 lock held by ip/1104:
 #0:  (sk_lock-AF_INET){+.+...}, at: [<ffffffff81433308>] lock_sock+0x10/0x12

stack backtrace:
Pid: 1104, comm: ip Not tainted 3.0.0-rc3+ torvalds#26
Call Trace:
 [<ffffffff81081649>] print_circular_bug+0x1f8/0x209
 [<ffffffff81082ecc>] __lock_acquire+0xacc/0xdc8
 [<ffffffff81056d12>] ? __local_lock+0x25/0x68
 [<ffffffff810836e5>] lock_acquire+0x103/0x12e
 [<ffffffff81056d12>] ? __local_lock+0x25/0x68
 [<ffffffff81046c75>] ? get_parent_ip+0x11/0x41
 [<ffffffff814a7e40>] _raw_spin_lock+0x3b/0x4a
 [<ffffffff81056d12>] ? __local_lock+0x25/0x68
 [<ffffffff81046c8c>] ? get_parent_ip+0x28/0x41
 [<ffffffff81056d12>] __local_lock+0x25/0x68
 [<ffffffff81056d8b>] local_bh_disable+0x36/0x3b
 [<ffffffff81433308>] ? lock_sock+0x10/0x12
 [<ffffffff814a7fc4>] _raw_write_lock_bh+0x16/0x4f
 [<ffffffff81433c38>] tcp_close+0x159/0x355
 [<ffffffff81453c99>] inet_release+0xc3/0xcd
 [<ffffffff813dff3f>] sock_release+0x1f/0x74
 [<ffffffff813dffbb>] sock_close+0x27/0x2b
 [<ffffffff81129c63>] fput+0x11d/0x1e3
 [<ffffffff81126577>] filp_close+0x70/0x7b
 [<ffffffff8112667a>] sys_close+0xf8/0x13d
 [<ffffffff814ae882>] system_call_fastpath+0x16/0x1b


Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
damentz referenced this pull request in zen-kernel/zen-kernel May 29, 2014
=======================================================
[ INFO: possible circular locking dependency detected ]
3.0.0-rc3+ #26
-------------------------------------------------------
ip/1104 is trying to acquire lock:
 (local_softirq_lock){+.+...}, at: [<ffffffff81056d12>] __local_lock+0x25/0x68

but task is already holding lock:
 (sk_lock-AF_INET){+.+...}, at: [<ffffffff81433308>] lock_sock+0x10/0x12

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-> #1 (sk_lock-AF_INET){+.+...}:
       [<ffffffff810836e5>] lock_acquire+0x103/0x12e
       [<ffffffff813e2781>] lock_sock_nested+0x82/0x92
       [<ffffffff81433308>] lock_sock+0x10/0x12
       [<ffffffff81433afa>] tcp_close+0x1b/0x355
       [<ffffffff81453c99>] inet_release+0xc3/0xcd
       [<ffffffff813dff3f>] sock_release+0x1f/0x74
       [<ffffffff813dffbb>] sock_close+0x27/0x2b
       [<ffffffff81129c63>] fput+0x11d/0x1e3
       [<ffffffff81126577>] filp_close+0x70/0x7b
       [<ffffffff8112667a>] sys_close+0xf8/0x13d
       [<ffffffff814ae882>] system_call_fastpath+0x16/0x1b

-> #0 (local_softirq_lock){+.+...}:
       [<ffffffff81082ecc>] __lock_acquire+0xacc/0xdc8
       [<ffffffff810836e5>] lock_acquire+0x103/0x12e
       [<ffffffff814a7e40>] _raw_spin_lock+0x3b/0x4a
       [<ffffffff81056d12>] __local_lock+0x25/0x68
       [<ffffffff81056d8b>] local_bh_disable+0x36/0x3b
       [<ffffffff814a7fc4>] _raw_write_lock_bh+0x16/0x4f
       [<ffffffff81433c38>] tcp_close+0x159/0x355
       [<ffffffff81453c99>] inet_release+0xc3/0xcd
       [<ffffffff813dff3f>] sock_release+0x1f/0x74
       [<ffffffff813dffbb>] sock_close+0x27/0x2b
       [<ffffffff81129c63>] fput+0x11d/0x1e3
       [<ffffffff81126577>] filp_close+0x70/0x7b
       [<ffffffff8112667a>] sys_close+0xf8/0x13d
       [<ffffffff814ae882>] system_call_fastpath+0x16/0x1b

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(sk_lock-AF_INET);
                               lock(local_softirq_lock);
                               lock(sk_lock-AF_INET);
  lock(local_softirq_lock);

 *** DEADLOCK ***

1 lock held by ip/1104:
 #0:  (sk_lock-AF_INET){+.+...}, at: [<ffffffff81433308>] lock_sock+0x10/0x12

stack backtrace:
Pid: 1104, comm: ip Not tainted 3.0.0-rc3+ #26
Call Trace:
 [<ffffffff81081649>] print_circular_bug+0x1f8/0x209
 [<ffffffff81082ecc>] __lock_acquire+0xacc/0xdc8
 [<ffffffff81056d12>] ? __local_lock+0x25/0x68
 [<ffffffff810836e5>] lock_acquire+0x103/0x12e
 [<ffffffff81056d12>] ? __local_lock+0x25/0x68
 [<ffffffff81046c75>] ? get_parent_ip+0x11/0x41
 [<ffffffff814a7e40>] _raw_spin_lock+0x3b/0x4a
 [<ffffffff81056d12>] ? __local_lock+0x25/0x68
 [<ffffffff81046c8c>] ? get_parent_ip+0x28/0x41
 [<ffffffff81056d12>] __local_lock+0x25/0x68
 [<ffffffff81056d8b>] local_bh_disable+0x36/0x3b
 [<ffffffff81433308>] ? lock_sock+0x10/0x12
 [<ffffffff814a7fc4>] _raw_write_lock_bh+0x16/0x4f
 [<ffffffff81433c38>] tcp_close+0x159/0x355
 [<ffffffff81453c99>] inet_release+0xc3/0xcd
 [<ffffffff813dff3f>] sock_release+0x1f/0x74
 [<ffffffff813dffbb>] sock_close+0x27/0x2b
 [<ffffffff81129c63>] fput+0x11d/0x1e3
 [<ffffffff81126577>] filp_close+0x70/0x7b
 [<ffffffff8112667a>] sys_close+0xf8/0x13d
 [<ffffffff814ae882>] system_call_fastpath+0x16/0x1b

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
aryabinin pushed a commit to aryabinin/linux that referenced this pull request Aug 25, 2014
Junxiao Bi reports seeing the following deadlock:

@ crash> bt 1539
@ PID: 1539   TASK: ffff88178f64a040  CPU: 1   COMMAND: "rpciod/1"
@  #0 [ffff88178f64d2c0] schedule at ffffffff8145833a
@  #1 [ffff88178f64d348] io_schedule at ffffffff8145842c
@  #2 [ffff88178f64d368] sync_page at ffffffff810d8161
@  #3 [ffff88178f64d378] __wait_on_bit at ffffffff8145895b
@  #4 [ffff88178f64d3b8] wait_on_page_bit at ffffffff810d82fe
@  #5 [ffff88178f64d418] wait_on_page_writeback at ffffffff810e2a1a
@  torvalds#6 [ffff88178f64d438] shrink_page_list at ffffffff810e34e1
@  torvalds#7 [ffff88178f64d588] shrink_list at ffffffff810e3dbe
@  torvalds#8 [ffff88178f64d6f8] shrink_zone at ffffffff810e425e
@  torvalds#9 [ffff88178f64d7b8] do_try_to_free_pages at ffffffff810e4978
@ torvalds#10 [ffff88178f64d828] try_to_free_pages at ffffffff810e4c31
@ torvalds#11 [ffff88178f64d8c8] __alloc_pages_nodemask at ffffffff810de370
@ torvalds#12 [ffff88178f64d978] kmem_getpages at ffffffff8110e18b
@ torvalds#13 [ffff88178f64d9a8] fallback_alloc at ffffffff8110e35e
@ torvalds#14 [ffff88178f64da08] ____cache_alloc_node at ffffffff8110e51f
@ torvalds#15 [ffff88178f64da48] __kmalloc at ffffffff8110efba
@ torvalds#16 [ffff88178f64da98] xs_setup_xprt at ffffffffa00a563f [sunrpc]
@ torvalds#17 [ffff88178f64dad8] xs_setup_tcp at ffffffffa00a7648 [sunrpc]
@ torvalds#18 [ffff88178f64daf8] xprt_create_transport at ffffffffa00a478f [sunrpc]
@ torvalds#19 [ffff88178f64db18] rpc_create at ffffffffa00a2d7a [sunrpc]
@ torvalds#20 [ffff88178f64dbf8] rpcb_create at ffffffffa00b026b [sunrpc]
@ torvalds#21 [ffff88178f64dc98] rpcb_getport_async at ffffffffa00b0c94 [sunrpc]
@ torvalds#22 [ffff88178f64ddf8] call_bind at ffffffffa00a11f8 [sunrpc]
@ torvalds#23 [ffff88178f64de18] __rpc_execute at ffffffffa00a88ef [sunrpc]
@ torvalds#24 [ffff88178f64de58] rpc_async_schedule at ffffffffa00a9187 [sunrpc]
@ torvalds#25 [ffff88178f64de78] worker_thread at ffffffff81072ed2
@ torvalds#26 [ffff88178f64dee8] kthread at ffffffff81076df3
@ torvalds#27 [ffff88178f64df48] kernel_thread at ffffffff81012e2a
@ crash>

Junxiao notes that the problem is not limited to the rpcbind client. In
fact we can trigger the exact same problem when trying to reconnect to
the server, and we find ourselves calling sock_alloc().

The following solution should work for all kernels that support the
PF_MEMALLOC_NOIO flag (i.e. Linux 3.9 and newer).

Link: http://lkml.kernel.org/r/53F6F772.6020708@oracle.com
Reported-by: Junxiao Bi <junxiao.bi@oracle.com>
Cc: stable@vger.kernel.org # 3.9+
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request Nov 26, 2023
As of commit b92143d ("net: dsa: mv88e6xxx: add infrastructure for
phylink_pcs") probing of a Marvell 88e6350 switch causes a NULL pointer
de-reference like this example:

    ...
    mv88e6085 d0072004.mdio-mii:11: switch 0x3710 detected: Marvell 88E6350, revision 2
    8<--- cut here ---
    Unable to handle kernel NULL pointer dereference at virtual address 00000000 when read
    [00000000] *pgd=00000000
    Internal error: Oops: 5 [#1] ARM
    Modules linked in:
    CPU: 0 PID: 8 Comm: kworker/u2:0 Not tainted 6.7.0-rc2-dirty torvalds#26
    Hardware name: Marvell Armada 370/XP (Device Tree)
    Workqueue: events_unbound deferred_probe_work_func
    PC is at mv88e6xxx_port_setup+0x1c/0x44
    LR is at dsa_port_devlink_setup+0x74/0x154
    pc : [<c057ea24>]    lr : [<c0819598>]    psr: a0000013
    sp : c184fce0  ip : c542b8f4  fp : 00000000
    r10: 00000001  r9 : c542a540  r8 : c542bc00
    r7 : c542b838  r6 : c5244580  r5 : 00000005  r4 : c5244580
    r3 : 00000000  r2 : c542b840  r1 : 00000005  r0 : c1a02040
    ...

The Marvell 6350 switch has no SERDES interface and so has no
corresponding pcs_ops defined for it. But during probing a call is made
to mv88e6xxx_port_setup() which unconditionally expects pcs_ops to exist -
though the presence of the pcs_ops->pcs_init function is optional.

Modify code to check for pcs_ops first, before checking for and calling
pcs_ops->pcs_init. Modify checking and use of pcs_ops->pcs_teardown
which may potentially suffer the same problem.

Fixes: b92143d ("net: dsa: mv88e6xxx: add infrastructure for phylink_pcs")
Signed-off-by: Greg Ungerer <gerg@kernel.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request Dec 5, 2023
With previous patch, one of subtests in test_btf_id becomes
flaky and may fail. The following is a failing example:

  Error: torvalds#26 btf
  Error: torvalds#26/174 btf/BTF ID
    Error: torvalds#26/174 btf/BTF ID
    btf_raw_create:PASS:check 0 nsec
    btf_raw_create:PASS:check 0 nsec
    test_btf_id:PASS:check 0 nsec
    ...
    test_btf_id:PASS:check 0 nsec
    test_btf_id:FAIL:check BTF lingersdo_test_get_info:FAIL:check failed: -1

The test tries to prove a btf_id not available after the map is closed.
But btf_id is freed only after workqueue and a rcu grace period, compared
to previous case just after a rcu grade period.

To fix the flaky test, I added a kern_sync_rcu() after closing map and
before querying btf id availability, essentially ensuring a rcu grace
period in the kernel, which seems making the test happy.

Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
intersectRaven pushed a commit to intersectRaven/linux that referenced this pull request Dec 8, 2023
[ Upstream commit a524eab ]

As of commit b92143d ("net: dsa: mv88e6xxx: add infrastructure for
phylink_pcs") probing of a Marvell 88e6350 switch causes a NULL pointer
de-reference like this example:

    ...
    mv88e6085 d0072004.mdio-mii:11: switch 0x3710 detected: Marvell 88E6350, revision 2
    8<--- cut here ---
    Unable to handle kernel NULL pointer dereference at virtual address 00000000 when read
    [00000000] *pgd=00000000
    Internal error: Oops: 5 [#1] ARM
    Modules linked in:
    CPU: 0 PID: 8 Comm: kworker/u2:0 Not tainted 6.7.0-rc2-dirty torvalds#26
    Hardware name: Marvell Armada 370/XP (Device Tree)
    Workqueue: events_unbound deferred_probe_work_func
    PC is at mv88e6xxx_port_setup+0x1c/0x44
    LR is at dsa_port_devlink_setup+0x74/0x154
    pc : [<c057ea24>]    lr : [<c0819598>]    psr: a0000013
    sp : c184fce0  ip : c542b8f4  fp : 00000000
    r10: 00000001  r9 : c542a540  r8 : c542bc00
    r7 : c542b838  r6 : c5244580  r5 : 00000005  r4 : c5244580
    r3 : 00000000  r2 : c542b840  r1 : 00000005  r0 : c1a02040
    ...

The Marvell 6350 switch has no SERDES interface and so has no
corresponding pcs_ops defined for it. But during probing a call is made
to mv88e6xxx_port_setup() which unconditionally expects pcs_ops to exist -
though the presence of the pcs_ops->pcs_init function is optional.

Modify code to check for pcs_ops first, before checking for and calling
pcs_ops->pcs_init. Modify checking and use of pcs_ops->pcs_teardown
which may potentially suffer the same problem.

Fixes: b92143d ("net: dsa: mv88e6xxx: add infrastructure for phylink_pcs")
Signed-off-by: Greg Ungerer <gerg@kernel.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
gbhardwaja pushed a commit to gbhardwaja/linux that referenced this pull request Dec 8, 2023
…json and interface counters

Merge in OBUDPST/udpst from lc9892/feature/OBUDPST-26-28-29-30-32-Mostly-json to develop

* commit 'd58d764e699f693794d2ef1cb43809fa944b0257':
  OBUDPST-26-28-29-30-32: JSON and Interface Counters
  OBUDPST-26-28-29-30-32: JSON and Interface Counters
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request Dec 15, 2023
With previous patch, one of subtests in test_btf_id becomes
flaky and may fail. The following is a failing example:

  Error: torvalds#26 btf
  Error: torvalds#26/174 btf/BTF ID
    Error: torvalds#26/174 btf/BTF ID
    btf_raw_create:PASS:check 0 nsec
    btf_raw_create:PASS:check 0 nsec
    test_btf_id:PASS:check 0 nsec
    ...
    test_btf_id:PASS:check 0 nsec
    test_btf_id:FAIL:check BTF lingersdo_test_get_info:FAIL:check failed: -1

The test tries to prove a btf_id not available after the map is closed.
But btf_id is freed only after workqueue and a rcu grace period, compared
to previous case just after a rcu grade period.
Depending on system workload, workqueue could take quite some time
to execute function bpf_map_free_deferred() which may cause the test failure.
Instead of adding arbitrary delays, let us remove the logic to
check btf_id availability after map is closed.

Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20231214203820.1469402-1-yonghong.song@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
anakryiko pushed a commit to anakryiko/linux that referenced this pull request Dec 19, 2023
With previous patch, one of subtests in test_btf_id becomes
flaky and may fail. The following is a failing example:

  Error: torvalds#26 btf
  Error: torvalds#26/174 btf/BTF ID
    Error: torvalds#26/174 btf/BTF ID
    btf_raw_create:PASS:check 0 nsec
    btf_raw_create:PASS:check 0 nsec
    test_btf_id:PASS:check 0 nsec
    ...
    test_btf_id:PASS:check 0 nsec
    test_btf_id:FAIL:check BTF lingersdo_test_get_info:FAIL:check failed: -1

The test tries to prove a btf_id not available after the map is closed.
But btf_id is freed only after workqueue and a rcu grace period, compared
to previous case just after a rcu grade period.
Depending on system workload, workqueue could take quite some time
to execute function bpf_map_free_deferred() which may cause the test failure.
Instead of adding arbitrary delays, let us remove the logic to
check btf_id availability after map is closed.

Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20231214203820.1469402-1-yonghong.song@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
logic10492 pushed a commit to logic10492/linux-amd-zen2 that referenced this pull request Jan 18, 2024
SCX: Use "idle core" instead of "whole cpu"
gyroninja added a commit to gyroninja/linux that referenced this pull request Jan 28, 2024
KSAN calls into rcu code which then triggers a write that reenters into KSAN
getting the system stuck doing infinite recursion.

#0  kmsan_get_context () at mm/kmsan/kmsan.h:106
#1  __msan_get_context_state () at mm/kmsan/instrumentation.c:331
#2  0xffffffff81495671 in get_current () at ./arch/x86/include/asm/current.h:42
#3  rcu_preempt_read_enter () at kernel/rcu/tree_plugin.h:379
#4  __rcu_read_lock () at kernel/rcu/tree_plugin.h:402
#5  0xffffffff81b2054b in rcu_read_lock () at ./include/linux/rcupdate.h:748
torvalds#6  pfn_valid (pfn=<optimized out>) at ./include/linux/mmzone.h:2016
torvalds#7  kmsan_virt_addr_valid (addr=addr@entry=0xffffffff8620d974 <init_task+1012>) at ./arch/x86/include/asm/kmsan.h:82
torvalds#8  virt_to_page_or_null (vaddr=vaddr@entry=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/shadow.c:75
torvalds#9  0xffffffff81b2023c in kmsan_get_metadata (address=0xffffffff8620d974 <init_task+1012>, is_origin=false) at mm/kmsan/shadow.c:143
torvalds#10 kmsan_get_shadow_origin_ptr (address=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/shadow.c:97
torvalds#11 0xffffffff81b1dbd2 in get_shadow_origin_ptr (addr=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/instrumentation.c:36
torvalds#12 __msan_metadata_ptr_for_load_4 (addr=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/instrumentation.c:91
torvalds#13 0xffffffff8149568f in rcu_preempt_read_enter () at kernel/rcu/tree_plugin.h:379
torvalds#14 __rcu_read_lock () at kernel/rcu/tree_plugin.h:402
torvalds#15 0xffffffff81b2054b in rcu_read_lock () at ./include/linux/rcupdate.h:748
torvalds#16 pfn_valid (pfn=<optimized out>) at ./include/linux/mmzone.h:2016
torvalds#17 kmsan_virt_addr_valid (addr=addr@entry=0xffffffff8620d974 <init_task+1012>) at ./arch/x86/include/asm/kmsan.h:82
torvalds#18 virt_to_page_or_null (vaddr=vaddr@entry=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/shadow.c:75
torvalds#19 0xffffffff81b2023c in kmsan_get_metadata (address=0xffffffff8620d974 <init_task+1012>, is_origin=false) at mm/kmsan/shadow.c:143
torvalds#20 kmsan_get_shadow_origin_ptr (address=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/shadow.c:97
torvalds#21 0xffffffff81b1dbd2 in get_shadow_origin_ptr (addr=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/instrumentation.c:36
torvalds#22 __msan_metadata_ptr_for_load_4 (addr=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/instrumentation.c:91
torvalds#23 0xffffffff8149568f in rcu_preempt_read_enter () at kernel/rcu/tree_plugin.h:379
torvalds#24 __rcu_read_lock () at kernel/rcu/tree_plugin.h:402
torvalds#25 0xffffffff81b2054b in rcu_read_lock () at ./include/linux/rcupdate.h:748
torvalds#26 pfn_valid (pfn=<optimized out>) at ./include/linux/mmzone.h:2016
torvalds#27 kmsan_virt_addr_valid (addr=addr@entry=0xffffffff8620d974 <init_task+1012>) at ./arch/x86/include/asm/kmsan.h:82
torvalds#28 virt_to_page_or_null (vaddr=vaddr@entry=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/shadow.c:75
torvalds#29 0xffffffff81b2023c in kmsan_get_metadata (address=0xffffffff8620d974 <init_task+1012>, is_origin=false) at mm/kmsan/shadow.c:143
torvalds#30 kmsan_get_shadow_origin_ptr (address=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/shadow.c:97
torvalds#31 0xffffffff81b1dbd2 in get_shadow_origin_ptr (addr=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/instrumentation.c:36
torvalds#32 __msan_metadata_ptr_for_load_4 (addr=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/instrumentation.c:91
torvalds#33 0xffffffff8149568f in rcu_preempt_read_enter () at kernel/rcu/tree_plugin.h:379
torvalds#34 __rcu_read_lock () at kernel/rcu/tree_plugin.h:402
torvalds#35 0xffffffff81b2054b in rcu_read_lock () at ./include/linux/rcupdate.h:748
torvalds#36 pfn_valid (pfn=<optimized out>) at ./include/linux/mmzone.h:2016
torvalds#37 kmsan_virt_addr_valid (addr=addr@entry=0xffffffff8620d974 <init_task+1012>) at ./arch/x86/include/asm/kmsan.h:82
torvalds#38 virt_to_page_or_null (vaddr=vaddr@entry=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/shadow.c:75
torvalds#39 0xffffffff81b2023c in kmsan_get_metadata (address=0xffffffff8620d974 <init_task+1012>, is_origin=false) at mm/kmsan/shadow.c:143
torvalds#40 kmsan_get_shadow_origin_ptr (address=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/shadow.c:97
torvalds#41 0xffffffff81b1dbd2 in get_shadow_origin_ptr (addr=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/instrumentation.c:36
torvalds#42 __msan_metadata_ptr_for_load_4 (addr=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/instrumentation.c:91
torvalds#43 0xffffffff8149568f in rcu_preempt_read_enter () at kernel/rcu/tree_plugin.h:379
torvalds#44 __rcu_read_lock () at kernel/rcu/tree_plugin.h:402
torvalds#45 0xffffffff81b2054b in rcu_read_lock () at ./include/linux/rcupdate.h:748
torvalds#46 pfn_valid (pfn=<optimized out>) at ./include/linux/mmzone.h:2016
torvalds#47 kmsan_virt_addr_valid (addr=addr@entry=0xffffffff8620d974 <init_task+1012>) at ./arch/x86/include/asm/kmsan.h:82
torvalds#48 virt_to_page_or_null (vaddr=vaddr@entry=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/shadow.c:75
torvalds#49 0xffffffff81b2023c in kmsan_get_metadata (address=0xffffffff8620d974 <init_task+1012>, is_origin=false) at mm/kmsan/shadow.c:143
torvalds#50 kmsan_get_shadow_origin_ptr (address=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/shadow.c:97
torvalds#51 0xffffffff81b1dbd2 in get_shadow_origin_ptr (addr=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/instrumentation.c:36
#52 __msan_metadata_ptr_for_load_4 (addr=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/instrumentation.c:91
#53 0xffffffff8149568f in rcu_preempt_read_enter () at kernel/rcu/tree_plugin.h:379
torvalds#54 __rcu_read_lock () at kernel/rcu/tree_plugin.h:402
torvalds#55 0xffffffff81b2054b in rcu_read_lock () at ./include/linux/rcupdate.h:748
torvalds#56 pfn_valid (pfn=<optimized out>) at ./include/linux/mmzone.h:2016
torvalds#57 kmsan_virt_addr_valid (addr=addr@entry=0xffffffff8620d974 <init_task+1012>) at ./arch/x86/include/asm/kmsan.h:82
#58 virt_to_page_or_null (vaddr=vaddr@entry=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/shadow.c:75
torvalds#59 0xffffffff81b2023c in kmsan_get_metadata (address=0xffffffff8620d974 <init_task+1012>, is_origin=false) at mm/kmsan/shadow.c:143
torvalds#60 kmsan_get_shadow_origin_ptr (address=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/shadow.c:97
torvalds#61 0xffffffff81b1dbd2 in get_shadow_origin_ptr (addr=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/instrumentation.c:36
torvalds#62 __msan_metadata_ptr_for_load_4 (addr=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/instrumentation.c:91
torvalds#63 0xffffffff8149568f in rcu_preempt_read_enter () at kernel/rcu/tree_plugin.h:379
torvalds#64 __rcu_read_lock () at kernel/rcu/tree_plugin.h:402
torvalds#65 0xffffffff81b2054b in rcu_read_lock () at ./include/linux/rcupdate.h:748
torvalds#66 pfn_valid (pfn=<optimized out>) at ./include/linux/mmzone.h:2016
torvalds#67 kmsan_virt_addr_valid (addr=addr@entry=0xffffffff8620d974 <init_task+1012>) at ./arch/x86/include/asm/kmsan.h:82
torvalds#68 virt_to_page_or_null (vaddr=vaddr@entry=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/shadow.c:75
torvalds#69 0xffffffff81b2023c in kmsan_get_metadata (address=0xffffffff8620d974 <init_task+1012>, is_origin=false) at mm/kmsan/shadow.c:143
#70 kmsan_get_shadow_origin_ptr (address=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/shadow.c:97
torvalds#71 0xffffffff81b1dbd2 in get_shadow_origin_ptr (addr=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/instrumentation.c:36
torvalds#72 __msan_metadata_ptr_for_load_4 (addr=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/instrumentation.c:91
torvalds#73 0xffffffff8149568f in rcu_preempt_read_enter () at kernel/rcu/tree_plugin.h:379
torvalds#74 __rcu_read_lock () at kernel/rcu/tree_plugin.h:402
torvalds#75 0xffffffff81b2054b in rcu_read_lock () at ./include/linux/rcupdate.h:748
torvalds#76 pfn_valid (pfn=<optimized out>) at ./include/linux/mmzone.h:2016
torvalds#77 kmsan_virt_addr_valid (addr=addr@entry=0xffffffff86203c90) at ./arch/x86/include/asm/kmsan.h:82
torvalds#78 virt_to_page_or_null (vaddr=vaddr@entry=0xffffffff86203c90) at mm/kmsan/shadow.c:75
torvalds#79 0xffffffff81b2023c in kmsan_get_metadata (address=0xffffffff86203c90, is_origin=false) at mm/kmsan/shadow.c:143
torvalds#80 kmsan_get_shadow_origin_ptr (address=0xffffffff86203c90, size=8, store=false) at mm/kmsan/shadow.c:97
torvalds#81 0xffffffff81b1dc72 in get_shadow_origin_ptr (addr=0xffffffff8620d974 <init_task+1012>, size=8, store=false) at mm/kmsan/instrumentation.c:36
torvalds#82 __msan_metadata_ptr_for_load_8 (addr=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/instrumentation.c:92
torvalds#83 0xffffffff814fdb9e in filter_irq_stacks (entries=<optimized out>, nr_entries=4) at kernel/stacktrace.c:397
torvalds#84 0xffffffff829520e8 in stack_depot_save_flags (entries=0xffffffff8620d974 <init_task+1012>, nr_entries=4, alloc_flags=0, depot_flags=0) at lib/stackdepot.c:500
torvalds#85 0xffffffff81b1e560 in __msan_poison_alloca (address=0xffffffff86203da0, size=24, descr=<optimized out>) at mm/kmsan/instrumentation.c:285
torvalds#86 0xffffffff8562821c in _printk (fmt=0xffffffff85f191a5 "\0016Attempting lock1") at kernel/printk/printk.c:2324
torvalds#87 0xffffffff81942aa2 in kmem_cache_create_usercopy (name=0xffffffff85f18903 "mm_struct", size=1296, align=0, flags=270336, useroffset=<optimized out>, usersize=<optimized out>, ctor=0x0 <fixed_percpu_data>) at mm/slab_common.c:296
torvalds#88 0xffffffff86f337a0 in mm_cache_init () at kernel/fork.c:3262
torvalds#89 0xffffffff86eacb8e in start_kernel () at init/main.c:932
torvalds#90 0xffffffff86ecdf94 in x86_64_start_reservations (real_mode_data=0x140e0 <exception_stacks+28896> <error: Cannot access memory at address 0x140e0>) at arch/x86/kernel/head64.c:555
torvalds#91 0xffffffff86ecde9b in x86_64_start_kernel (real_mode_data=0x140e0 <exception_stacks+28896> <error: Cannot access memory at address 0x140e0>) at arch/x86/kernel/head64.c:536
torvalds#92 0xffffffff810001d3 in secondary_startup_64 () at /pool/workspace/linux/arch/x86/kernel/head_64.S:461
torvalds#93 0x0000000000000000 in ??
gyroninja added a commit to gyroninja/linux that referenced this pull request Jan 28, 2024
As of 5ec8e8e(mm/sparsemem: fix race in accessing memory_section->usage) KMSAN
now calls into RCU tree code during kmsan_get_metadata. This will trigger a
write that will reenter into KMSAN getting the system stuck doing infinite
recursion.

#0  kmsan_get_context () at mm/kmsan/kmsan.h:106
#1  __msan_get_context_state () at mm/kmsan/instrumentation.c:331
#2  0xffffffff81495671 in get_current () at ./arch/x86/include/asm/current.h:42
#3  rcu_preempt_read_enter () at kernel/rcu/tree_plugin.h:379
#4  __rcu_read_lock () at kernel/rcu/tree_plugin.h:402
#5  0xffffffff81b2054b in rcu_read_lock () at ./include/linux/rcupdate.h:748
torvalds#6  pfn_valid (pfn=<optimized out>) at ./include/linux/mmzone.h:2016
torvalds#7  kmsan_virt_addr_valid (addr=addr@entry=0xffffffff8620d974 <init_task+1012>) at ./arch/x86/include/asm/kmsan.h:82
torvalds#8  virt_to_page_or_null (vaddr=vaddr@entry=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/shadow.c:75
torvalds#9  0xffffffff81b2023c in kmsan_get_metadata (address=0xffffffff8620d974 <init_task+1012>, is_origin=false) at mm/kmsan/shadow.c:143
torvalds#10 kmsan_get_shadow_origin_ptr (address=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/shadow.c:97
torvalds#11 0xffffffff81b1dbd2 in get_shadow_origin_ptr (addr=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/instrumentation.c:36
torvalds#12 __msan_metadata_ptr_for_load_4 (addr=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/instrumentation.c:91
torvalds#13 0xffffffff8149568f in rcu_preempt_read_enter () at kernel/rcu/tree_plugin.h:379
torvalds#14 __rcu_read_lock () at kernel/rcu/tree_plugin.h:402
torvalds#15 0xffffffff81b2054b in rcu_read_lock () at ./include/linux/rcupdate.h:748
torvalds#16 pfn_valid (pfn=<optimized out>) at ./include/linux/mmzone.h:2016
torvalds#17 kmsan_virt_addr_valid (addr=addr@entry=0xffffffff8620d974 <init_task+1012>) at ./arch/x86/include/asm/kmsan.h:82
torvalds#18 virt_to_page_or_null (vaddr=vaddr@entry=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/shadow.c:75
torvalds#19 0xffffffff81b2023c in kmsan_get_metadata (address=0xffffffff8620d974 <init_task+1012>, is_origin=false) at mm/kmsan/shadow.c:143
torvalds#20 kmsan_get_shadow_origin_ptr (address=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/shadow.c:97
torvalds#21 0xffffffff81b1dbd2 in get_shadow_origin_ptr (addr=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/instrumentation.c:36
torvalds#22 __msan_metadata_ptr_for_load_4 (addr=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/instrumentation.c:91
torvalds#23 0xffffffff8149568f in rcu_preempt_read_enter () at kernel/rcu/tree_plugin.h:379
torvalds#24 __rcu_read_lock () at kernel/rcu/tree_plugin.h:402
torvalds#25 0xffffffff81b2054b in rcu_read_lock () at ./include/linux/rcupdate.h:748
torvalds#26 pfn_valid (pfn=<optimized out>) at ./include/linux/mmzone.h:2016
torvalds#27 kmsan_virt_addr_valid (addr=addr@entry=0xffffffff8620d974 <init_task+1012>) at ./arch/x86/include/asm/kmsan.h:82
torvalds#28 virt_to_page_or_null (vaddr=vaddr@entry=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/shadow.c:75
torvalds#29 0xffffffff81b2023c in kmsan_get_metadata (address=0xffffffff8620d974 <init_task+1012>, is_origin=false) at mm/kmsan/shadow.c:143
torvalds#30 kmsan_get_shadow_origin_ptr (address=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/shadow.c:97
torvalds#31 0xffffffff81b1dbd2 in get_shadow_origin_ptr (addr=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/instrumentation.c:36
torvalds#32 __msan_metadata_ptr_for_load_4 (addr=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/instrumentation.c:91
torvalds#33 0xffffffff8149568f in rcu_preempt_read_enter () at kernel/rcu/tree_plugin.h:379
torvalds#34 __rcu_read_lock () at kernel/rcu/tree_plugin.h:402
torvalds#35 0xffffffff81b2054b in rcu_read_lock () at ./include/linux/rcupdate.h:748
torvalds#36 pfn_valid (pfn=<optimized out>) at ./include/linux/mmzone.h:2016
torvalds#37 kmsan_virt_addr_valid (addr=addr@entry=0xffffffff8620d974 <init_task+1012>) at ./arch/x86/include/asm/kmsan.h:82
torvalds#38 virt_to_page_or_null (vaddr=vaddr@entry=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/shadow.c:75
torvalds#39 0xffffffff81b2023c in kmsan_get_metadata (address=0xffffffff8620d974 <init_task+1012>, is_origin=false) at mm/kmsan/shadow.c:143
torvalds#40 kmsan_get_shadow_origin_ptr (address=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/shadow.c:97
torvalds#41 0xffffffff81b1dbd2 in get_shadow_origin_ptr (addr=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/instrumentation.c:36
torvalds#42 __msan_metadata_ptr_for_load_4 (addr=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/instrumentation.c:91
torvalds#43 0xffffffff8149568f in rcu_preempt_read_enter () at kernel/rcu/tree_plugin.h:379
torvalds#44 __rcu_read_lock () at kernel/rcu/tree_plugin.h:402
torvalds#45 0xffffffff81b2054b in rcu_read_lock () at ./include/linux/rcupdate.h:748
torvalds#46 pfn_valid (pfn=<optimized out>) at ./include/linux/mmzone.h:2016
torvalds#47 kmsan_virt_addr_valid (addr=addr@entry=0xffffffff8620d974 <init_task+1012>) at ./arch/x86/include/asm/kmsan.h:82
torvalds#48 virt_to_page_or_null (vaddr=vaddr@entry=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/shadow.c:75
torvalds#49 0xffffffff81b2023c in kmsan_get_metadata (address=0xffffffff8620d974 <init_task+1012>, is_origin=false) at mm/kmsan/shadow.c:143
torvalds#50 kmsan_get_shadow_origin_ptr (address=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/shadow.c:97
torvalds#51 0xffffffff81b1dbd2 in get_shadow_origin_ptr (addr=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/instrumentation.c:36
#52 __msan_metadata_ptr_for_load_4 (addr=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/instrumentation.c:91
#53 0xffffffff8149568f in rcu_preempt_read_enter () at kernel/rcu/tree_plugin.h:379
torvalds#54 __rcu_read_lock () at kernel/rcu/tree_plugin.h:402
torvalds#55 0xffffffff81b2054b in rcu_read_lock () at ./include/linux/rcupdate.h:748
torvalds#56 pfn_valid (pfn=<optimized out>) at ./include/linux/mmzone.h:2016
torvalds#57 kmsan_virt_addr_valid (addr=addr@entry=0xffffffff8620d974 <init_task+1012>) at ./arch/x86/include/asm/kmsan.h:82
#58 virt_to_page_or_null (vaddr=vaddr@entry=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/shadow.c:75
torvalds#59 0xffffffff81b2023c in kmsan_get_metadata (address=0xffffffff8620d974 <init_task+1012>, is_origin=false) at mm/kmsan/shadow.c:143
torvalds#60 kmsan_get_shadow_origin_ptr (address=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/shadow.c:97
torvalds#61 0xffffffff81b1dbd2 in get_shadow_origin_ptr (addr=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/instrumentation.c:36
torvalds#62 __msan_metadata_ptr_for_load_4 (addr=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/instrumentation.c:91
torvalds#63 0xffffffff8149568f in rcu_preempt_read_enter () at kernel/rcu/tree_plugin.h:379
torvalds#64 __rcu_read_lock () at kernel/rcu/tree_plugin.h:402
torvalds#65 0xffffffff81b2054b in rcu_read_lock () at ./include/linux/rcupdate.h:748
torvalds#66 pfn_valid (pfn=<optimized out>) at ./include/linux/mmzone.h:2016
torvalds#67 kmsan_virt_addr_valid (addr=addr@entry=0xffffffff8620d974 <init_task+1012>) at ./arch/x86/include/asm/kmsan.h:82
torvalds#68 virt_to_page_or_null (vaddr=vaddr@entry=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/shadow.c:75
torvalds#69 0xffffffff81b2023c in kmsan_get_metadata (address=0xffffffff8620d974 <init_task+1012>, is_origin=false) at mm/kmsan/shadow.c:143
#70 kmsan_get_shadow_origin_ptr (address=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/shadow.c:97
torvalds#71 0xffffffff81b1dbd2 in get_shadow_origin_ptr (addr=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/instrumentation.c:36
torvalds#72 __msan_metadata_ptr_for_load_4 (addr=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/instrumentation.c:91
torvalds#73 0xffffffff8149568f in rcu_preempt_read_enter () at kernel/rcu/tree_plugin.h:379
torvalds#74 __rcu_read_lock () at kernel/rcu/tree_plugin.h:402
torvalds#75 0xffffffff81b2054b in rcu_read_lock () at ./include/linux/rcupdate.h:748
torvalds#76 pfn_valid (pfn=<optimized out>) at ./include/linux/mmzone.h:2016
torvalds#77 kmsan_virt_addr_valid (addr=addr@entry=0xffffffff86203c90) at ./arch/x86/include/asm/kmsan.h:82
torvalds#78 virt_to_page_or_null (vaddr=vaddr@entry=0xffffffff86203c90) at mm/kmsan/shadow.c:75
torvalds#79 0xffffffff81b2023c in kmsan_get_metadata (address=0xffffffff86203c90, is_origin=false) at mm/kmsan/shadow.c:143
torvalds#80 kmsan_get_shadow_origin_ptr (address=0xffffffff86203c90, size=8, store=false) at mm/kmsan/shadow.c:97
torvalds#81 0xffffffff81b1dc72 in get_shadow_origin_ptr (addr=0xffffffff8620d974 <init_task+1012>, size=8, store=false) at mm/kmsan/instrumentation.c:36
torvalds#82 __msan_metadata_ptr_for_load_8 (addr=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/instrumentation.c:92
torvalds#83 0xffffffff814fdb9e in filter_irq_stacks (entries=<optimized out>, nr_entries=4) at kernel/stacktrace.c:397
torvalds#84 0xffffffff829520e8 in stack_depot_save_flags (entries=0xffffffff8620d974 <init_task+1012>, nr_entries=4, alloc_flags=0, depot_flags=0) at lib/stackdepot.c:500
torvalds#85 0xffffffff81b1e560 in __msan_poison_alloca (address=0xffffffff86203da0, size=24, descr=<optimized out>) at mm/kmsan/instrumentation.c:285
torvalds#86 0xffffffff8562821c in _printk (fmt=0xffffffff85f191a5 "\0016Attempting lock1") at kernel/printk/printk.c:2324
torvalds#87 0xffffffff81942aa2 in kmem_cache_create_usercopy (name=0xffffffff85f18903 "mm_struct", size=1296, align=0, flags=270336, useroffset=<optimized out>, usersize=<optimized out>, ctor=0x0 <fixed_percpu_data>) at mm/slab_common.c:296
torvalds#88 0xffffffff86f337a0 in mm_cache_init () at kernel/fork.c:3262
torvalds#89 0xffffffff86eacb8e in start_kernel () at init/main.c:932
torvalds#90 0xffffffff86ecdf94 in x86_64_start_reservations (real_mode_data=0x140e0 <exception_stacks+28896> <error: Cannot access memory at address 0x140e0>) at arch/x86/kernel/head64.c:555
torvalds#91 0xffffffff86ecde9b in x86_64_start_kernel (real_mode_data=0x140e0 <exception_stacks+28896> <error: Cannot access memory at address 0x140e0>) at arch/x86/kernel/head64.c:536
torvalds#92 0xffffffff810001d3 in secondary_startup_64 () at /pool/workspace/linux/arch/x86/kernel/head_64.S:461
torvalds#93 0x0000000000000000 in ??
Kaz205 pushed a commit to Kaz205/linux that referenced this pull request Feb 5, 2024
commit 56925f3 upstream.

With previous patch, one of subtests in test_btf_id becomes
flaky and may fail. The following is a failing example:

  Error: torvalds#26 btf
  Error: torvalds#26/174 btf/BTF ID
    Error: torvalds#26/174 btf/BTF ID
    btf_raw_create:PASS:check 0 nsec
    btf_raw_create:PASS:check 0 nsec
    test_btf_id:PASS:check 0 nsec
    ...
    test_btf_id:PASS:check 0 nsec
    test_btf_id:FAIL:check BTF lingersdo_test_get_info:FAIL:check failed: -1

The test tries to prove a btf_id not available after the map is closed.
But btf_id is freed only after workqueue and a rcu grace period, compared
to previous case just after a rcu grade period.
Depending on system workload, workqueue could take quite some time
to execute function bpf_map_free_deferred() which may cause the test failure.
Instead of adding arbitrary delays, let us remove the logic to
check btf_id availability after map is closed.

Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20231214203820.1469402-1-yonghong.song@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Samasth Norway Ananda <samasth.norway.ananda@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1054009064 pushed a commit to 1054009064/linux that referenced this pull request Feb 5, 2024
commit 56925f3 upstream.

With previous patch, one of subtests in test_btf_id becomes
flaky and may fail. The following is a failing example:

  Error: torvalds#26 btf
  Error: torvalds#26/174 btf/BTF ID
    Error: torvalds#26/174 btf/BTF ID
    btf_raw_create:PASS:check 0 nsec
    btf_raw_create:PASS:check 0 nsec
    test_btf_id:PASS:check 0 nsec
    ...
    test_btf_id:PASS:check 0 nsec
    test_btf_id:FAIL:check BTF lingersdo_test_get_info:FAIL:check failed: -1

The test tries to prove a btf_id not available after the map is closed.
But btf_id is freed only after workqueue and a rcu grace period, compared
to previous case just after a rcu grade period.
Depending on system workload, workqueue could take quite some time
to execute function bpf_map_free_deferred() which may cause the test failure.
Instead of adding arbitrary delays, let us remove the logic to
check btf_id availability after map is closed.

Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20231214203820.1469402-1-yonghong.song@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Samasth Norway Ananda <samasth.norway.ananda@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
jannau pushed a commit to jannau/linux that referenced this pull request Mar 5, 2024
t8103:
- WLAN (SMC PMU GPIO torvalds#13)
t600x:
- WLAN (SMC PMU GPIO torvalds#13)
- SD (SMC PMU GPIO torvalds#26)

Signed-off-by: Hector Martin <marcan@marcan.st>
jannau pushed a commit to jannau/linux that referenced this pull request Mar 5, 2024
t8103:
- WLAN (SMC PMU GPIO torvalds#13)
t600x:
- WLAN (SMC PMU GPIO torvalds#13)
- SD (SMC PMU GPIO torvalds#26)

Signed-off-by: Hector Martin <marcan@marcan.st>
jannau pushed a commit to jannau/linux that referenced this pull request Mar 11, 2024
t8103:
- WLAN (SMC PMU GPIO torvalds#13)
t600x:
- WLAN (SMC PMU GPIO torvalds#13)
- SD (SMC PMU GPIO torvalds#26)

Signed-off-by: Hector Martin <marcan@marcan.st>
jannau pushed a commit to jannau/linux that referenced this pull request Mar 11, 2024
t8103:
- WLAN (SMC PMU GPIO torvalds#13)
t600x:
- WLAN (SMC PMU GPIO torvalds#13)
- SD (SMC PMU GPIO torvalds#26)

Signed-off-by: Hector Martin <marcan@marcan.st>
jannau pushed a commit to jannau/linux that referenced this pull request Apr 9, 2024
t8103:
- WLAN (SMC PMU GPIO torvalds#13)
t600x:
- WLAN (SMC PMU GPIO torvalds#13)
- SD (SMC PMU GPIO torvalds#26)

Signed-off-by: Hector Martin <marcan@marcan.st>
jannau pushed a commit to jannau/linux that referenced this pull request Apr 9, 2024
t8103:
- WLAN (SMC PMU GPIO torvalds#13)
t600x:
- WLAN (SMC PMU GPIO torvalds#13)
- SD (SMC PMU GPIO torvalds#26)

Signed-off-by: Hector Martin <marcan@marcan.st>
jannau pushed a commit to jannau/linux that referenced this pull request Apr 14, 2024
t8103:
- WLAN (SMC PMU GPIO torvalds#13)
t600x:
- WLAN (SMC PMU GPIO torvalds#13)
- SD (SMC PMU GPIO torvalds#26)

Signed-off-by: Hector Martin <marcan@marcan.st>
jannau pushed a commit to jannau/linux that referenced this pull request Apr 14, 2024
t8103:
- WLAN (SMC PMU GPIO torvalds#13)
t600x:
- WLAN (SMC PMU GPIO torvalds#13)
- SD (SMC PMU GPIO torvalds#26)

Signed-off-by: Hector Martin <marcan@marcan.st>
john-cabaj pushed a commit to UbuntuAsahi/linux that referenced this pull request May 31, 2024
t8103:
- WLAN (SMC PMU GPIO torvalds#13)
t600x:
- WLAN (SMC PMU GPIO torvalds#13)
- SD (SMC PMU GPIO torvalds#26)

Signed-off-by: Hector Martin <marcan@marcan.st>
(cherry picked from commit 868dda9 https://github.com/AsahiLinux/linux)
Signed-off-by: John Cabaj <john.cabaj@canonical.com>
john-cabaj pushed a commit to UbuntuAsahi/linux that referenced this pull request May 31, 2024
t8103:
- WLAN (SMC PMU GPIO torvalds#13)
t600x:
- WLAN (SMC PMU GPIO torvalds#13)
- SD (SMC PMU GPIO torvalds#26)

Signed-off-by: Hector Martin <marcan@marcan.st>
(cherry picked from commit 095c7f4 https://github.com/AsahiLinux/linux)
Signed-off-by: John Cabaj <john.cabaj@canonical.com>
john-cabaj pushed a commit to UbuntuAsahi/linux that referenced this pull request Jun 17, 2024
t8103:
- WLAN (SMC PMU GPIO torvalds#13)
t600x:
- WLAN (SMC PMU GPIO torvalds#13)
- SD (SMC PMU GPIO torvalds#26)

Signed-off-by: Hector Martin <marcan@marcan.st>
(cherry picked from commit 868dda9 https://github.com/AsahiLinux/linux)
Signed-off-by: John Cabaj <john.cabaj@canonical.com>
john-cabaj pushed a commit to UbuntuAsahi/linux that referenced this pull request Jun 17, 2024
t8103:
- WLAN (SMC PMU GPIO torvalds#13)
t600x:
- WLAN (SMC PMU GPIO torvalds#13)
- SD (SMC PMU GPIO torvalds#26)

Signed-off-by: Hector Martin <marcan@marcan.st>
(cherry picked from commit 095c7f4 https://github.com/AsahiLinux/linux)
Signed-off-by: John Cabaj <john.cabaj@canonical.com>
MingcongBai pushed a commit to deepin-community/kernel-rolling that referenced this pull request Jul 8, 2024
When we boot a 3C5000-7A2000 2Node server using "nr_cpus=1 maxcpus=1",
we get the following Call Trace:
    4.807397] ------------[ cut here ]------------
[    4.811996] WARNING: CPU: 0 PID: 1 at drivers/acpi/irq.c:63 acpi_register_gsi+0xe0/0x100
[    4.820048] Modules linked in:
[    4.823082] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.9.0-rc7-next-20240509+ torvalds#26
[    4.830604] Hardware name: LOONGSON Dabieshan/Loongson-LS2C50C2, BIOS Loongson UEFI (3C50007A2000_Ls2c5lc2) V4.0.13-Dual 12/06/23 17:33:54
[    4.842964] pc 9000000000bdc6e0 ra 9000000000bdc66c tp 90000002051d4000 sp 90000002051d7ae0
[    4.851269] a0 0000000000000000 a1 00000000000000a0 a2 0000000000000000 a3 0000000000000000
[    4.859567] a4 9000000200014518 a5 000000000000003c a6 90000000018876b0 a7 00302e39303a3030
[    4.867866] t0 0000000000000000 t1 0000000000000080 t2 0000000000000040 t3 0000000000036800
[    4.876165] t4 0000000000036800 t5 0000000000000004 t6 0000000000000000 t7 0000000000000000
[    4.884464] t8 900000000800d910 u0 0000000000000000 s9 90000000014bf9e8 s0 00000000000000a0
[    4.892763] s1 0000000000000000 s2 0000000000000000 s3 9000000001985000 s4 90000002051d7b88
[    4.901063] s5 0000000000000001 s6 90000002055470b8 s7 90000000014400ac s8 0000000000000008
[    4.909362]    ra: 9000000000bdc66c acpi_register_gsi+0x6c/0x100
[    4.915330]   ERA: 9000000000bdc6e0 acpi_register_gsi+0xe0/0x100
[    4.921297]  CRMD: 000000b0 (PLV0 -IE -DA +PG DACF=CC DACM=CC -WE)
[    4.927446]  PRMD: 00000004 (PPLV0 +PIE -PWE)
[    4.931777]  EUEN: 00000000 (-FPE -SXE -ASXE -BTE)
[    4.936538]  ECFG: 00071c1d (LIE=0,2-4,10-12 VS=7)
[    4.941301] ESTAT: 000c0000 [BRK] (IS= ECode=12 EsubCode=0)
[    4.946838]  PRID: 0014c011 (Loongson-64bit, Loongson-3C5000)
[    4.952545] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.9.0-rc7-next-20240509+ torvalds#26
[    4.960066] Hardware name: LOONGSON Dabieshan/Loongson-LS2C50C2, BIOS Loongson UEFI (3C50007A2000_Ls2c5lc2) V4.0.13-Dual 12/06/23 17:33:54
[    4.972425] Stack : 9000000001985000 0000000000000000 9000000000223524 90000002051d4000
[    4.980382]         90000002051d7740 90000002051d7748 0000000000000000 90000002051d7888
[    4.988338]         90000002051d7880 90000002051d7880 90000002051d7690 0000000000000001
[    4.996294]         0000000000000001 90000002051d7748 420a070366b7e75d 90000002054f4500
[    5.004251]         0000000000000001 0000000000000000 4137303030354333 c0000000ffffdfff
[    5.012206]         0000000000000003 00000000000ea642 0000000006b3c000 90000000014bf9e8
[    5.020163]         0000000000000000 0000000000000000 90000000017f7e80 9000000001985000
[    5.028119]         0000000000000001 0000000000000000 ffffffffffd7f549 90000000014400ac
[    5.036075]         0000000000000008 0000000000000000 900000000022353c 00007ffff1354000
[    5.044031]         00000000000000b0 0000000000000004 0000000000000000 0000000000071c1d
[    5.051987]         ...
[    5.054410] Call Trace:
[    5.054412] [<900000000022353c>] show_stack+0x5c/0x1a0
[    5.061940] [<900000000141e86c>] dump_stack_lvl+0x9c/0xc4
[    5.067305] [<900000000140170c>] __warn+0x94/0xcc
[    5.071977] [<90000000013cd900>] report_bug+0x160/0x220
[    5.077170] [<900000000141facc>] do_bp+0x26c/0x2e0
[    5.081929] [<0000000000000000>] 0x0
[    5.085475] [<9000000000bdc6e0>] acpi_register_gsi+0xe0/0x100
[    5.091182] [<9000000000bd5350>] acpi_pci_irq_enable+0xd0/0x220
[    5.097061] [<9000000000b5e8d4>] pci_device_probe+0x54/0x260
[    5.102683] [<9000000000d1fefc>] really_probe+0xbc/0x320
[    5.107960] [<9000000000d201f0>] __driver_probe_device+0x90/0x160
[    5.114012] [<9000000000d202f8>] driver_probe_device+0x38/0x120
[    5.119892] [<9000000000d205d4>] __driver_attach+0x94/0x1c0
[    5.125426] [<9000000000d1d7ac>] bus_for_each_dev+0x8c/0x100
[    5.131046] [<9000000000d1ee30>] bus_add_driver+0xf0/0x240
[    5.136494] [<9000000000d21688>] driver_register+0x68/0x140
[    5.142028] [<9000000000220158>] do_one_initcall+0x78/0x200
[    5.147561] [<9000000001440fcc>] kernel_init_freeable+0x23c/0x2b0
[    5.153614] [<900000000142123c>] kernel_init+0x1c/0x120
[    5.158802] [<9000000000221348>] ret_from_kernel_thread+0xc/0xa4

[    5.166244] ---[ end trace 0000000000000000 ]---
[    5.170998] GSI: No registered irqchip, giving up

The root cause is that when the CPU boot from flat mode, it is
unreliable to use cpu_to node to calculate the node number.
Therefore, we use NODES_PER_FLATMODE_NODE to calculate the
physical node number.

According to the 3C5000 user manual, the value of
NODES_PER_FLATMODE_NODE should be 4.

Signed-off-by: Ming Wang <wangming01@loongson.cn>
Signed-off-by: Hongchen Zhang <zhanghongchen@loongson.cn>
Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
MingcongBai pushed a commit to deepin-community/kernel-rolling that referenced this pull request Jul 23, 2024
When we boot a 3C5000-7A2000 2Node server using "nr_cpus=1 maxcpus=1",
we get the following Call Trace:
    4.807397] ------------[ cut here ]------------
[    4.811996] WARNING: CPU: 0 PID: 1 at drivers/acpi/irq.c:63 acpi_register_gsi+0xe0/0x100
[    4.820048] Modules linked in:
[    4.823082] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.9.0-rc7-next-20240509+ torvalds#26
[    4.830604] Hardware name: LOONGSON Dabieshan/Loongson-LS2C50C2, BIOS Loongson UEFI (3C50007A2000_Ls2c5lc2) V4.0.13-Dual 12/06/23 17:33:54
[    4.842964] pc 9000000000bdc6e0 ra 9000000000bdc66c tp 90000002051d4000 sp 90000002051d7ae0
[    4.851269] a0 0000000000000000 a1 00000000000000a0 a2 0000000000000000 a3 0000000000000000
[    4.859567] a4 9000000200014518 a5 000000000000003c a6 90000000018876b0 a7 00302e39303a3030
[    4.867866] t0 0000000000000000 t1 0000000000000080 t2 0000000000000040 t3 0000000000036800
[    4.876165] t4 0000000000036800 t5 0000000000000004 t6 0000000000000000 t7 0000000000000000
[    4.884464] t8 900000000800d910 u0 0000000000000000 s9 90000000014bf9e8 s0 00000000000000a0
[    4.892763] s1 0000000000000000 s2 0000000000000000 s3 9000000001985000 s4 90000002051d7b88
[    4.901063] s5 0000000000000001 s6 90000002055470b8 s7 90000000014400ac s8 0000000000000008
[    4.909362]    ra: 9000000000bdc66c acpi_register_gsi+0x6c/0x100
[    4.915330]   ERA: 9000000000bdc6e0 acpi_register_gsi+0xe0/0x100
[    4.921297]  CRMD: 000000b0 (PLV0 -IE -DA +PG DACF=CC DACM=CC -WE)
[    4.927446]  PRMD: 00000004 (PPLV0 +PIE -PWE)
[    4.931777]  EUEN: 00000000 (-FPE -SXE -ASXE -BTE)
[    4.936538]  ECFG: 00071c1d (LIE=0,2-4,10-12 VS=7)
[    4.941301] ESTAT: 000c0000 [BRK] (IS= ECode=12 EsubCode=0)
[    4.946838]  PRID: 0014c011 (Loongson-64bit, Loongson-3C5000)
[    4.952545] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.9.0-rc7-next-20240509+ torvalds#26
[    4.960066] Hardware name: LOONGSON Dabieshan/Loongson-LS2C50C2, BIOS Loongson UEFI (3C50007A2000_Ls2c5lc2) V4.0.13-Dual 12/06/23 17:33:54
[    4.972425] Stack : 9000000001985000 0000000000000000 9000000000223524 90000002051d4000
[    4.980382]         90000002051d7740 90000002051d7748 0000000000000000 90000002051d7888
[    4.988338]         90000002051d7880 90000002051d7880 90000002051d7690 0000000000000001
[    4.996294]         0000000000000001 90000002051d7748 420a070366b7e75d 90000002054f4500
[    5.004251]         0000000000000001 0000000000000000 4137303030354333 c0000000ffffdfff
[    5.012206]         0000000000000003 00000000000ea642 0000000006b3c000 90000000014bf9e8
[    5.020163]         0000000000000000 0000000000000000 90000000017f7e80 9000000001985000
[    5.028119]         0000000000000001 0000000000000000 ffffffffffd7f549 90000000014400ac
[    5.036075]         0000000000000008 0000000000000000 900000000022353c 00007ffff1354000
[    5.044031]         00000000000000b0 0000000000000004 0000000000000000 0000000000071c1d
[    5.051987]         ...
[    5.054410] Call Trace:
[    5.054412] [<900000000022353c>] show_stack+0x5c/0x1a0
[    5.061940] [<900000000141e86c>] dump_stack_lvl+0x9c/0xc4
[    5.067305] [<900000000140170c>] __warn+0x94/0xcc
[    5.071977] [<90000000013cd900>] report_bug+0x160/0x220
[    5.077170] [<900000000141facc>] do_bp+0x26c/0x2e0
[    5.081929] [<0000000000000000>] 0x0
[    5.085475] [<9000000000bdc6e0>] acpi_register_gsi+0xe0/0x100
[    5.091182] [<9000000000bd5350>] acpi_pci_irq_enable+0xd0/0x220
[    5.097061] [<9000000000b5e8d4>] pci_device_probe+0x54/0x260
[    5.102683] [<9000000000d1fefc>] really_probe+0xbc/0x320
[    5.107960] [<9000000000d201f0>] __driver_probe_device+0x90/0x160
[    5.114012] [<9000000000d202f8>] driver_probe_device+0x38/0x120
[    5.119892] [<9000000000d205d4>] __driver_attach+0x94/0x1c0
[    5.125426] [<9000000000d1d7ac>] bus_for_each_dev+0x8c/0x100
[    5.131046] [<9000000000d1ee30>] bus_add_driver+0xf0/0x240
[    5.136494] [<9000000000d21688>] driver_register+0x68/0x140
[    5.142028] [<9000000000220158>] do_one_initcall+0x78/0x200
[    5.147561] [<9000000001440fcc>] kernel_init_freeable+0x23c/0x2b0
[    5.153614] [<900000000142123c>] kernel_init+0x1c/0x120
[    5.158802] [<9000000000221348>] ret_from_kernel_thread+0xc/0xa4

[    5.166244] ---[ end trace 0000000000000000 ]---
[    5.170998] GSI: No registered irqchip, giving up

The root cause is that when the CPU boot from flat mode, it is
unreliable to use cpu_to node to calculate the node number.
Therefore, we use NODES_PER_FLATMODE_NODE to calculate the
physical node number.

According to the 3C5000 user manual, the value of
NODES_PER_FLATMODE_NODE should be 4.

Signed-off-by: Ming Wang <wangming01@loongson.cn>
Signed-off-by: Hongchen Zhang <zhanghongchen@loongson.cn>
Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request Aug 6, 2024
The dead lock can happen if we try to use printk(), such as a call of
SCHED_WARN_ON(), during the rq->__lock is held. The printk() will try to
print the message to the console, and the console driver can call
queue_work_on(), which will try to obtain rq->__lock again.

This means that any WARN during the kernel function that hold the
rq->__lock, such as schedule(), sched_ttwu_pending(), etc, can cause dead
lock.

Following is the call trace of the deadlock case that I encounter:

  PID: 0      TASK: ff36bfda010c8000  CPU: 156  COMMAND: "swapper/156"
   #0 crash_nmi_callback+30
   #1 nmi_handle+85
   #2 default_do_nmi+66
   #3 exc_nmi+291
   #4 end_repeat_nmi+22
      [exception RIP: native_queued_spin_lock_slowpath+96]
   #5 native_queued_spin_lock_slowpath+96
   torvalds#6 _raw_spin_lock+30
   torvalds#7 ttwu_queue+111
   torvalds#8 try_to_wake_up+375
   torvalds#9 __queue_work+462
  torvalds#10 queue_work_on+32
  torvalds#11 soft_cursor+420
  torvalds#12 bit_cursor+898
  torvalds#13 hide_cursor+39
  torvalds#14 vt_console_print+995
  torvalds#15 call_console_drivers.constprop.0+204
  torvalds#16 console_unlock+374
  torvalds#17 vprintk_emit+280
  torvalds#18 printk+88
  torvalds#19 __warn_printk+71
  torvalds#20 enqueue_task_fair+1779
  torvalds#21 activate_task+102
  torvalds#22 ttwu_do_activate+155
  torvalds#23 sched_ttwu_pending+177
  torvalds#24 flush_smp_call_function_from_idle+42
  torvalds#25 do_idle+161
  torvalds#26 cpu_startup_entry+25
  torvalds#27 secondary_startup_64_no_verify+194

Fix this by using __printk_safe_enter()/__printk_safe_exit() in
rq_pin_lock()/rq_unpin_lock(). Then, printk will defer to print out the
buffers to the console.

Signed-off-by: Menglong Dong <dongml2@chinatelecom.cn>
Signed-off-by: Bin Lai <laib2@chinatelecom.cn>
cthbleachbit pushed a commit to AOSC-Tracking/linux that referenced this pull request Aug 10, 2024
t8103:
- WLAN (SMC PMU GPIO torvalds#13)
t600x:
- WLAN (SMC PMU GPIO torvalds#13)
- SD (SMC PMU GPIO torvalds#26)

Signed-off-by: Hector Martin <marcan@marcan.st>
cthbleachbit pushed a commit to AOSC-Tracking/linux that referenced this pull request Aug 10, 2024
t8103:
- WLAN (SMC PMU GPIO torvalds#13)
t600x:
- WLAN (SMC PMU GPIO torvalds#13)
- SD (SMC PMU GPIO torvalds#26)

Signed-off-by: Hector Martin <marcan@marcan.st>
lsahn-gh pushed a commit to lsahn-gh/mainline-linux that referenced this pull request Oct 8, 2024
t8103:
- WLAN (SMC PMU GPIO torvalds#13)
t600x:
- WLAN (SMC PMU GPIO torvalds#13)
- SD (SMC PMU GPIO torvalds#26)

Signed-off-by: Hector Martin <marcan@marcan.st>
lsahn-gh pushed a commit to lsahn-gh/mainline-linux that referenced this pull request Oct 8, 2024
t8103:
- WLAN (SMC PMU GPIO torvalds#13)
t600x:
- WLAN (SMC PMU GPIO torvalds#13)
- SD (SMC PMU GPIO torvalds#26)

Signed-off-by: Hector Martin <marcan@marcan.st>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants