linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: Borislav Petkov <bp@alien8.de>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	James Morse <james.morse@arm.com>,
	Qiuxu Zhuo <qiuxu.zhuo@intel.com>,
	linux-edac@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] EDAC, {skx|i10nm}_edac: Fix randconfig build error
Date: Thu, 14 Mar 2019 08:09:06 +0100	[thread overview]
Message-ID: <CAK8P3a0aDdEt323i=z4BGuh71ntPqm-L33U4q+FiQOdMUin6wg@mail.gmail.com> (raw)
In-Reply-To: <20190313230137.GA12529@agluck-desk>

On Thu, Mar 14, 2019 at 12:01 AM Luck, Tony <tony.luck@intel.com> wrote:
>
> On Wed, Mar 06, 2019 at 09:15:13PM +0100, Arnd Bergmann wrote:
> > On Wed, Mar 6, 2019 at 6:58 PM Luck, Tony <tony.luck@intel.com> wrote:
> > > From: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
> > >
> > > This seems cleaner than adding all the EXPORTs to skx_common.c
> > > I also tried a build with the 0x8A152468-config.gz that Arnd
> > > supplied.
> >
> > It's still a bit fragile since you do something that kbuild doesn't
> > expect with having a file in both a module and built-in code
> > in some configurations. I'm fairly sure this version works today,
> > but it would break the next time that file gets changed to include
> > a reference to THIS_MODULE, or anything else that is different
> > between built-in and modular code.
> >
> > Another alternative would be to mark all symbols in this file
> > 'static' and then include skx_common.c from the other two files.
> > Of course that is also ugly and it increases the overall code size,
> > so I don't see a way to win this.
>
> Boris,
>
> So where should we go. Proposed solutions are piling up:
>
> 1) Make skx_common a module
>         [downside: have to EXPORT everything in it]
> 2) Move module-ish bits out of skx_common
>         [downside: perhaps fragile]
> 3) #include skx_common.c into {skx,i10nm}_edac.c
>         [downside: no patch yet, bigger code size]

Sorry to add on to the already long list, but one more idea after
looking at the two files:

4) Have a single driver module, with the skx_common.c containing
    the top-level module_init/module_exit functions that call into the
    hardware specific versions.

This is the opposite of the usual recommendation (the driver
is already structured nicely otherwise), but it would be cheap
way out here.

      Arnd

  reply	other threads:[~2019-03-14  7:09 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-05 13:21 [PATCH] EDAC: i10nm, skx: fix randconfig builds Arnd Bergmann
2019-03-05 14:34 ` Borislav Petkov
2019-03-06 13:48   ` Arnd Bergmann
2019-03-06 17:58     ` [PATCH] EDAC, {skx|i10nm}_edac: Fix randconfig build error Luck, Tony
2019-03-06 20:15       ` Arnd Bergmann
2019-03-13 23:01         ` Luck, Tony
2019-03-14  7:09           ` Arnd Bergmann [this message]
2019-03-14 11:04             ` Borislav Petkov
2019-03-14 21:59               ` Luck, Tony
2019-03-15  9:43                 ` Borislav Petkov
2019-03-15 15:57                   ` Luck, Tony
2019-03-15 17:37                     ` Borislav Petkov
2019-03-15 17:49                       ` Luck, Tony
2019-03-15 18:02                         ` Borislav Petkov
2019-03-15 18:11                           ` Luck, Tony
2019-03-15 21:03                             ` Arnd Bergmann
2019-03-15 21:28                               ` Luck, Tony
2019-03-22 14:00                                 ` Arnd Bergmann
2019-03-22 17:55                                   ` Luck, Tony
2019-03-22 19:56                                     ` Arnd Bergmann
2019-03-21 22:13                               ` Luck, Tony
2019-03-22 22:59                                 ` Borislav Petkov
2019-03-22 14:02 Arnd Bergmann

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='CAK8P3a0aDdEt323i=z4BGuh71ntPqm-L33U4q+FiQOdMUin6wg@mail.gmail.com' \
    --to=arnd@arndb.de \
    --cc=bp@alien8.de \
    --cc=james.morse@arm.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=qiuxu.zhuo@intel.com \
    --cc=tony.luck@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).