* Re: [target:for-next 51/51] ERROR: "__cmpxchg_called_with_bad_pointer" undefined! [not found] <52e8a4ef.ROAJSlpOaZtBxfoG%fengguang.wu@intel.com> @ 2014-01-29 10:01 ` Nicholas A. Bellinger 2014-02-04 18:27 ` Ralf Baechle 0 siblings, 1 reply; 2+ messages in thread From: Nicholas A. Bellinger @ 2014-01-29 10:01 UTC (permalink / raw) To: kbuild test robot; +Cc: kbuild-all, target-devel, linux-mips On Wed, 2014-01-29 at 14:51 +0800, kbuild test robot wrote: > tree: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git for-next > head: 7769401d351d54d5cbcb6400ec60c0b916e87a7e > commit: 7769401d351d54d5cbcb6400ec60c0b916e87a7e [51/51] target: Fix percpu_ref_put race in transport_lun_remove_cmd > config: make ARCH=mips allmodconfig > > All error/warnings: > > >> ERROR: "__cmpxchg_called_with_bad_pointer" undefined! > So MIPS doesn't like typedef bool as 1-byte char being used for cmpxchg -> ll/sc instructions.. Fixing this up now by making se_cmd->lun_ref_active use a single word instead. Thanks Fengguang! --nab diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index d284186..909dacb 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -552,7 +552,7 @@ struct se_cmd { void *priv; /* Used for lun->lun_ref counting */ - bool lun_ref_active; + int lun_ref_active; /* DIF related members */ enum target_prot_op prot_op; ^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [target:for-next 51/51] ERROR: "__cmpxchg_called_with_bad_pointer" undefined! 2014-01-29 10:01 ` [target:for-next 51/51] ERROR: "__cmpxchg_called_with_bad_pointer" undefined! Nicholas A. Bellinger @ 2014-02-04 18:27 ` Ralf Baechle 0 siblings, 0 replies; 2+ messages in thread From: Ralf Baechle @ 2014-02-04 18:27 UTC (permalink / raw) To: Nicholas A. Bellinger Cc: kbuild test robot, kbuild-all, target-devel, linux-mips On Wed, Jan 29, 2014 at 02:01:38AM -0800, Nicholas A. Bellinger wrote: > On Wed, 2014-01-29 at 14:51 +0800, kbuild test robot wrote: > > tree: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git for-next > > head: 7769401d351d54d5cbcb6400ec60c0b916e87a7e > > commit: 7769401d351d54d5cbcb6400ec60c0b916e87a7e [51/51] target: Fix percpu_ref_put race in transport_lun_remove_cmd > > config: make ARCH=mips allmodconfig > > > > All error/warnings: > > > > >> ERROR: "__cmpxchg_called_with_bad_pointer" undefined! > > > > So MIPS doesn't like typedef bool as 1-byte char being used for cmpxchg > -> ll/sc instructions.. > > Fixing this up now by making se_cmd->lun_ref_active use a single word > instead. Thanks, looking good. Note that this is a hardware restriction on LL/SC rsp. LLD/SCD which only operate on natually aligned four rsp. eight byte operands. Could fixed but would slow down and inflate every invocation of cmpxchg() which is currently an inline function and I feel a bit uneasy about hardware behaviour when mixing LL/SC rsp. LLD/SCD with conventional loads and stores. Ralf ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-02-04 18:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <52e8a4ef.ROAJSlpOaZtBxfoG%fengguang.wu@intel.com>
2014-01-29 10:01 ` [target:for-next 51/51] ERROR: "__cmpxchg_called_with_bad_pointer" undefined! Nicholas A. Bellinger
2014-02-04 18:27 ` Ralf Baechle
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox