From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Mark Brown <broonie@kernel.org>
Cc: kernel test robot <lkp@intel.com>,
llvm@lists.linux.dev, kbuild-all@lists.01.org,
linux-kernel@vger.kernel.org
Subject: Re: [mtd:spi-mem-ecc 30/30] ld.lld: error: undefined symbol: nand_ecc_unregister_on_host_hw_engine
Date: Wed, 2 Feb 2022 22:31:49 +0100 [thread overview]
Message-ID: <20220202223149.25ddc760@xps13> (raw)
In-Reply-To: <YfrHs81VGzUggPC6@sirena.org.uk>
Hi Mark,
broonie@kernel.org wrote on Wed, 2 Feb 2022 18:04:35 +0000:
> On Wed, Feb 02, 2022 at 06:35:00PM +0100, Miquel Raynal wrote:
>
> > > depends on MTD=y if SPI_MXC=y
>
> > In this case I believe we should also add
>
> > depends on MTD=m if SPI_MXC=m ?
>
> It doesn't specifically need MTD to be a module so just a straight
> dependency should be fine I guess.
>
> > Anyway, this would force building the ECC support (and MTD...) even
> > though we don't need it in most cases.
>
> > My idea was to give people the right to only select SPI_MXIC without
> > really caring about MTD/ECC support at all because this is IMHO a
> > valid use case. We would then save a few kiB of extra MTD fat.
>
> Is that something that people actually do - does this controller get
> used without the MTD functionality? Most of these controllers seem to
> be really bad generic SPI controllers that would rarely get used for
> anything other than MTD devices, if this one is a useful generic
> controller your approach makes more sense although I do worry about
> people getting noticably worse performance if they don't build MTD in.
This one in particular really is a SPI controller, and can really be
used without MTD at all. I don't know how good are the performances
with it but it is sure that there is no performance hit when the MTD
stack is not pulled in.
Also, for the example I mentioned CONFIG_MTD but in fact I simplified a
bit the situation as this driver is actually implying
CONFIG_MTD_NAND_ECC which selects CONFIG_MTD_NAND_CORE.
CONFIG_MTD_NAND_CORE is a subset of MTD. Building this subset
really is not needed when playing with eg. a SPI-NOR. And even with a
SPI-NAND which would require CONFIG_MTD_NAND_CORE anyway, it would not
be necessarily to have CONFIG_MTD_NAND_ECC enabled because most NANDs
have on-die support for it and thus do not need extra code to handle
bitflips.
That is the reason why I felt a bit puzzled in the first place by the
need to pull all MTD in a build which would select this SPI controller
driver.
Thanks,
Miquèl
WARNING: multiple messages have this Message-ID (diff)
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: kbuild-all@lists.01.org
Subject: Re: [mtd:spi-mem-ecc 30/30] ld.lld: error: undefined symbol: nand_ecc_unregister_on_host_hw_engine
Date: Wed, 02 Feb 2022 22:31:49 +0100 [thread overview]
Message-ID: <20220202223149.25ddc760@xps13> (raw)
In-Reply-To: <YfrHs81VGzUggPC6@sirena.org.uk>
[-- Attachment #1: Type: text/plain, Size: 2126 bytes --]
Hi Mark,
broonie(a)kernel.org wrote on Wed, 2 Feb 2022 18:04:35 +0000:
> On Wed, Feb 02, 2022 at 06:35:00PM +0100, Miquel Raynal wrote:
>
> > > depends on MTD=y if SPI_MXC=y
>
> > In this case I believe we should also add
>
> > depends on MTD=m if SPI_MXC=m ?
>
> It doesn't specifically need MTD to be a module so just a straight
> dependency should be fine I guess.
>
> > Anyway, this would force building the ECC support (and MTD...) even
> > though we don't need it in most cases.
>
> > My idea was to give people the right to only select SPI_MXIC without
> > really caring about MTD/ECC support at all because this is IMHO a
> > valid use case. We would then save a few kiB of extra MTD fat.
>
> Is that something that people actually do - does this controller get
> used without the MTD functionality? Most of these controllers seem to
> be really bad generic SPI controllers that would rarely get used for
> anything other than MTD devices, if this one is a useful generic
> controller your approach makes more sense although I do worry about
> people getting noticably worse performance if they don't build MTD in.
This one in particular really is a SPI controller, and can really be
used without MTD at all. I don't know how good are the performances
with it but it is sure that there is no performance hit when the MTD
stack is not pulled in.
Also, for the example I mentioned CONFIG_MTD but in fact I simplified a
bit the situation as this driver is actually implying
CONFIG_MTD_NAND_ECC which selects CONFIG_MTD_NAND_CORE.
CONFIG_MTD_NAND_CORE is a subset of MTD. Building this subset
really is not needed when playing with eg. a SPI-NOR. And even with a
SPI-NAND which would require CONFIG_MTD_NAND_CORE anyway, it would not
be necessarily to have CONFIG_MTD_NAND_ECC enabled because most NANDs
have on-die support for it and thus do not need extra code to handle
bitflips.
That is the reason why I felt a bit puzzled in the first place by the
need to pull all MTD in a build which would select this SPI controller
driver.
Thanks,
Miquèl
next prev parent reply other threads:[~2022-02-02 21:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-01 5:28 [mtd:spi-mem-ecc 30/30] ld.lld: error: undefined symbol: nand_ecc_unregister_on_host_hw_engine kernel test robot
2022-02-01 5:28 ` kernel test robot
2022-02-02 14:45 ` Miquel Raynal
2022-02-02 14:45 ` Miquel Raynal
2022-02-02 15:20 ` Mark Brown
2022-02-02 15:20 ` Mark Brown
2022-02-02 15:34 ` Miquel Raynal
2022-02-02 15:34 ` Miquel Raynal
2022-02-02 16:15 ` Mark Brown
2022-02-02 16:15 ` Mark Brown
2022-02-02 17:35 ` Miquel Raynal
2022-02-02 17:35 ` Miquel Raynal
2022-02-02 18:04 ` Mark Brown
2022-02-02 18:04 ` Mark Brown
2022-02-02 21:31 ` Miquel Raynal [this message]
2022-02-02 21:31 ` Miquel Raynal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220202223149.25ddc760@xps13 \
--to=miquel.raynal@bootlin.com \
--cc=broonie@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.