All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: David Herrmann <dh.herrmann@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Takashi Iwai <tiwai@suse.de>,
	Stephen Warren <swarren@wwwdotorg.org>,
	the arch/x86 maintainers <x86@kernel.org>,
	"linux-fbdev@vger.kernel.org" <linux-fbdev@vger.kernel.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	stable <stable@vger.kernel.org>
Subject: Re: [PATCH v3] x86: sysfb: remove sysfb when probing real hw
Date: Thu, 19 Dec 2013 17:09:27 +0000	[thread overview]
Message-ID: <20131219170927.GC30382@gmail.com> (raw)
In-Reply-To: <CANq1E4Ss30G72t3R1iza9vOO7ESYQynjS74mB+nJ-zT2zAvyzQ@mail.gmail.com>


* David Herrmann <dh.herrmann@gmail.com> wrote:

> Hi
> 
> On Thu, Dec 19, 2013 at 5:36 PM, Ingo Molnar <mingo@kernel.org> wrote:
> >
> > * David Herrmann <dh.herrmann@gmail.com> wrote:
> >
> >> --- a/drivers/video/fbmem.c
> >> +++ b/drivers/video/fbmem.c
> >> @@ -35,6 +35,9 @@
> >>
> >>  #include <asm/fb.h>
> >>
> >> +#if IS_ENABLED(CONFIG_X86)
> >> +#include <asm/sysfb.h>
> >> +#endif
> >
> > I think this can be written as:
> >
> > #ifdef CONFIG_X86
> > # include <asm/sysfb.h>
> > #endif
> >
> > also ... the dependency on a large, unrelated option like CONFIG_X86
> > looks pretty ugly here - is there no other, more specific CONFIG_
> > option that can be used here - such as CONFIG_FB_SIMPLE or
> > CONFIG_X86_SYSFB?
> >
> >> +#if IS_ENABLED(CONFIG_X86)
> >> +     sysfb_unregister(apert, primary);
> >> +#endif
> >
> > Ditto.
> 
> CONFIG_X86 is probably never 'm'.. will fix that. It was 
> CONFIG_X86_SYSFB before and that works, too, but the broader X86 
> seemed more appropriate as sysfb is available on all x86.

Well, sysfb is available if CONFIG_X86_SYSFB is set, right? So on 
!CONFIG_X86_SYSFB x86 kernels this code should not run, right?

> Note that I have patches here locally which move 
> sysfb_register/unregister to drivers/video/sysfb.c and add 
> include/linux/sysfb.h with dummies if CONFIG_SYSFB is not selected 
> to avoid the #ifdef. This will allow other architectures to do 
> gfx-hand-over, too. They seem too big for stable, though. That's why 
> I split them up and added it to x86/kernel/sysfb.c first.

Yeah, it's fine to do those cleanups after the minimal fix. But using 
a sensible config option must still be done - we cannot just slap 
broad CONFIG_X86 dependencies into random code.

Thanks,

	Ingo

WARNING: multiple messages have this Message-ID (diff)
From: Ingo Molnar <mingo@kernel.org>
To: David Herrmann <dh.herrmann@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Takashi Iwai <tiwai@suse.de>,
	Stephen Warren <swarren@wwwdotorg.org>,
	the arch/x86 maintainers <x86@kernel.org>,
	"linux-fbdev@vger.kernel.org" <linux-fbdev@vger.kernel.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	stable <stable@vger.kernel.org>
Subject: Re: [PATCH v3] x86: sysfb: remove sysfb when probing real hw
Date: Thu, 19 Dec 2013 18:09:27 +0100	[thread overview]
Message-ID: <20131219170927.GC30382@gmail.com> (raw)
In-Reply-To: <CANq1E4Ss30G72t3R1iza9vOO7ESYQynjS74mB+nJ-zT2zAvyzQ@mail.gmail.com>


* David Herrmann <dh.herrmann@gmail.com> wrote:

> Hi
> 
> On Thu, Dec 19, 2013 at 5:36 PM, Ingo Molnar <mingo@kernel.org> wrote:
> >
> > * David Herrmann <dh.herrmann@gmail.com> wrote:
> >
> >> --- a/drivers/video/fbmem.c
> >> +++ b/drivers/video/fbmem.c
> >> @@ -35,6 +35,9 @@
> >>
> >>  #include <asm/fb.h>
> >>
> >> +#if IS_ENABLED(CONFIG_X86)
> >> +#include <asm/sysfb.h>
> >> +#endif
> >
> > I think this can be written as:
> >
> > #ifdef CONFIG_X86
> > # include <asm/sysfb.h>
> > #endif
> >
> > also ... the dependency on a large, unrelated option like CONFIG_X86
> > looks pretty ugly here - is there no other, more specific CONFIG_
> > option that can be used here - such as CONFIG_FB_SIMPLE or
> > CONFIG_X86_SYSFB?
> >
> >> +#if IS_ENABLED(CONFIG_X86)
> >> +     sysfb_unregister(apert, primary);
> >> +#endif
> >
> > Ditto.
> 
> CONFIG_X86 is probably never 'm'.. will fix that. It was 
> CONFIG_X86_SYSFB before and that works, too, but the broader X86 
> seemed more appropriate as sysfb is available on all x86.

Well, sysfb is available if CONFIG_X86_SYSFB is set, right? So on 
!CONFIG_X86_SYSFB x86 kernels this code should not run, right?

> Note that I have patches here locally which move 
> sysfb_register/unregister to drivers/video/sysfb.c and add 
> include/linux/sysfb.h with dummies if CONFIG_SYSFB is not selected 
> to avoid the #ifdef. This will allow other architectures to do 
> gfx-hand-over, too. They seem too big for stable, though. That's why 
> I split them up and added it to x86/kernel/sysfb.c first.

Yeah, it's fine to do those cleanups after the minimal fix. But using 
a sensible config option must still be done - we cannot just slap 
broad CONFIG_X86 dependencies into random code.

Thanks,

	Ingo

  reply	other threads:[~2013-12-19 17:09 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-18  7:42 cirrusdrmfb broken with simplefb Takashi Iwai
2013-12-18  7:42 ` Takashi Iwai
2013-12-18  8:21 ` David Herrmann
2013-12-18  8:21   ` David Herrmann
2013-12-18  8:44   ` Takashi Iwai
2013-12-18  8:44     ` Takashi Iwai
2013-12-18  8:48     ` Geert Uytterhoeven
2013-12-18  8:48       ` Geert Uytterhoeven
2013-12-18 10:17     ` Takashi Iwai
2013-12-18 10:17       ` Takashi Iwai
2013-12-18 10:21       ` David Herrmann
2013-12-18 10:21         ` David Herrmann
2013-12-18 11:39         ` Takashi Iwai
2013-12-18 11:39           ` Takashi Iwai
2013-12-18 11:48           ` [RFC] x86: sysfb: remove sysfb when probing real hw David Herrmann
2013-12-18 11:48             ` David Herrmann
2013-12-18 11:54             ` Ingo Molnar
2013-12-18 11:54               ` Ingo Molnar
2013-12-18 13:03             ` Takashi Iwai
2013-12-18 13:03               ` Takashi Iwai
2013-12-18 13:34               ` David Herrmann
2013-12-18 13:34                 ` David Herrmann
2013-12-18 14:02                 ` Takashi Iwai
2013-12-18 14:02                   ` Takashi Iwai
2013-12-18 13:50             ` [PATCH v2] " David Herrmann
2013-12-18 13:50               ` David Herrmann
2013-12-18 14:15               ` David Herrmann
2013-12-18 14:15                 ` David Herrmann
2013-12-18 14:21               ` Takashi Iwai
2013-12-18 14:21                 ` Takashi Iwai
2013-12-19 10:13               ` [PATCH v3] " David Herrmann
2013-12-19 10:13                 ` David Herrmann
2013-12-19 16:36                 ` Ingo Molnar
2013-12-19 16:36                   ` Ingo Molnar
2013-12-19 17:03                   ` David Herrmann
2013-12-19 17:03                     ` David Herrmann
2013-12-19 17:09                     ` Ingo Molnar [this message]
2013-12-19 17:09                       ` Ingo Molnar
2013-12-19 17:18                       ` David Herrmann
2013-12-19 17:18                         ` David Herrmann
2013-12-19 17:24                 ` [PATCH v4] " David Herrmann
2013-12-19 17:24                   ` David Herrmann
2013-12-19 18:33                   ` Ingo Molnar
2013-12-19 18:33                     ` Ingo Molnar
2013-12-20 14:46                     ` David Herrmann
2013-12-20 14:46                       ` David Herrmann
2013-12-19 18:54                 ` [PATCH v3] " Stephen Warren
2013-12-19 18:54                   ` Stephen Warren
2013-12-19 18:55                   ` Ingo Molnar
2013-12-19 18:55                     ` Ingo Molnar
2013-12-19 19:09                     ` Stephen Warren
2013-12-19 19:09                       ` Stephen Warren
2013-12-19 19:19                       ` Ingo Molnar
2013-12-19 19:19                         ` Ingo Molnar
2013-12-18  9:29   ` cirrusdrmfb broken with simplefb Ingo Molnar
2013-12-18  9:29     ` Ingo Molnar
2013-12-19  0:03     ` One Thousand Gnomes
2013-12-19 10:46       ` David Herrmann
2013-12-19 10:46         ` David Herrmann
2013-12-19 11:06         ` Takashi Iwai
2013-12-19 11:06           ` Takashi Iwai
2013-12-19 12:36           ` David Herrmann
2013-12-19 12:36             ` David Herrmann
2013-12-19 13:22             ` Takashi Iwai
2013-12-19 13:22               ` Takashi Iwai
2013-12-19 13:37               ` David Herrmann
2013-12-19 13:37                 ` David Herrmann
2013-12-19 14:03                 ` Takashi Iwai
2013-12-19 14:03                   ` Takashi Iwai
2013-12-19 14:13                   ` David Herrmann
2013-12-19 14:13                     ` David Herrmann
2013-12-19 14:22                     ` Takashi Iwai
2013-12-19 14:22                       ` Takashi Iwai
2013-12-19 12:31         ` Ingo Molnar
2013-12-19 12:31           ` Ingo Molnar
2013-12-19 12:39           ` David Herrmann
2013-12-19 12:39             ` David Herrmann
2013-12-19 12:44             ` Ingo Molnar
2013-12-19 12:44               ` Ingo Molnar

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=20131219170927.GC30382@gmail.com \
    --to=mingo@kernel.org \
    --cc=dh.herrmann@gmail.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=swarren@wwwdotorg.org \
    --cc=tiwai@suse.de \
    --cc=x86@kernel.org \
    /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.