linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chen Gang <gang.chen@asianux.com>
To: Vineet Gupta <Vineet.Gupta1@synopsys.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	"sachin.kamat@linaro.org" <sachin.kamat@linaro.org>,
	Paul Gortmaker <paul.gortmaker@windriver.com>,
	James Hogan <james.hogan@imgtec.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Will Deacon <will.deacon@arm.com>,
	Catalin Marinas <Catalin.Marinas@arm.com>
Subject: Re: [PATCH] arc: kernel: add default extern variable 'screen_info' in "setup.c"
Date: Thu, 24 Oct 2013 10:56:02 +0800	[thread overview]
Message-ID: <52688C42.3030907@asianux.com> (raw)
In-Reply-To: <C2D7FE5348E1B147BCA15975FBA23075152B30@IN01WEMBXA.internal.synopsys.com>

On 10/23/2013 09:47 PM, Vineet Gupta wrote:
> Apologies for top posting !
> 

Not at all.

> NAK.
> 

OK, thanks. At least this patch is incorrect.


> ARC will never have VGA console. You need to add !ARC to relevant Kconfig. However that approach is frowned upon in general. The current way to doing such things is to define a new Kconfig item which relevant arches can select.

Hmm... it seems necessary to discuss about the 2 fixing ways (which
already had a long discussion in ARM64):

 - add !ARC in related place, just like another (almost 30-40%) architectures done.

 - add a new Kconfig item (e.g. HAVE_VGA_CONSOLE), and let the left (almost 50%) architectures which use VGA_CONSOLE to set it.

Catalin, Will, Geert (it seems also include you) prefer 2nd way, but I
prefer 1st, my reasons are below, please help check:

 - 1st way need add some (10-20%) of architectures in one place, which belongs to local wide.
   2nd way will let the left (almost 50%) architectures need add HAVE_VGA_CONSOLE in various place, which belongs to arch global wide.

 - 1st way will let most (80-90%) of architectures don't care about VGA_CONSOLE (50% need it, 30-40% already mark it in the same place).
   2nd way will let 50% architectures care about VGA_CONSOLE (although can let the left 10-20% architectures do nothing -- not care about it).

 - 1st way is still easy, sustainable, and clear enough in local wide fixing (although maybe it is not the best, or clearest way).
   2nd way is also easy, sustainable and clear enough (maybe the best, or clearest for 10-20% architectures), but it will let the fix in global wide

All together, if we can bear and sustainable, I always prefer to fix it
in local wide, not lead to arch global (especially 80-90% architectures
already followed 1st way).


BTW: for me, if less than 20% architectures need XXX, we can trigger
defining a new Kconfig item (e.g. HAVE_XXX), or just follow original
implementation.


Thanks.

> 
> -Vineet
> ________________________________________
> From: Chen Gang [gang.chen@asianux.com]
> Sent: Wednesday, October 23, 2013 4:39 PM
> To: vgupta@synopsys.com; Arnd Bergmann; sachin.kamat@linaro.org; Paul Gortmaker; James Hogan
> Cc: linux-kernel@vger.kernel.org
> Subject: [PATCH] arc: kernel: add default extern variable 'screen_info' in "setup.c"
> 
> Add default 'screen_info' just like some of other architectures (e.g.
> cris, score, sh, tile), or can not pass compiling.
> 
> The related error (with allmodconfig):
> 
>   drivers/built-in.o: In function `vgacon_save_screen':
>   drivers/video/console/vgacon.c:1347: undefined reference to `screen_info'
>   drivers/video/console/vgacon.c:1348: undefined reference to `screen_info'
>   drivers/built-in.o: In function `vgacon_resize':
>   drivers/video/console/vgacon.c:1314: undefined reference to `screen_info'
>   drivers/video/console/vgacon.c:1315: undefined reference to `screen_info'
>   drivers/built-in.o: In function `vgacon_switch':
>   drivers/video/console/vgacon.c:820: undefined reference to `screen_info'
>   drivers/built-in.o:drivers/video/console/vgacon.c:840: more undefined references to `screen_info' follow
> 
> 
> Signed-off-by: Chen Gang <gang.chen@asianux.com>
> ---
>  arch/arc/kernel/setup.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c
> index 2c68bc7e..07130f3 100644
> --- a/arch/arc/kernel/setup.c
> +++ b/arch/arc/kernel/setup.c
> @@ -15,6 +15,7 @@
>  #include <linux/cpu.h>
>  #include <linux/of_fdt.h>
>  #include <linux/cache.h>
> +#include <linux/screen_info.h>
>  #include <asm/sections.h>
>  #include <asm/arcregs.h>
>  #include <asm/tlb.h>
> @@ -37,6 +38,8 @@ struct task_struct *_current_task[NR_CPUS];   /* For stack switching */
> 
>  struct cpuinfo_arc cpuinfo_arc700[NR_CPUS];
> 
> +struct screen_info screen_info;
> +
> 
>  void read_arc_build_cfg_regs(void)
>  {
> --
> 1.7.7.6
> 
> 


-- 
Chen Gang

  reply	other threads:[~2013-10-24  2:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-23 11:09 [PATCH] arc: kernel: add default extern variable 'screen_info' in "setup.c" Chen Gang
2013-10-23 13:47 ` Vineet Gupta
2013-10-24  2:56   ` Chen Gang [this message]
2013-10-24  8:30     ` Geert Uytterhoeven
2013-10-24 11:23       ` Chen Gang
2013-10-24 11:50         ` Vineet Gupta
2013-10-26  2:11           ` Chen Gang
2013-10-24 11:51         ` Geert Uytterhoeven
2013-10-26  2:13           ` Chen Gang
  -- strict thread matches above, loose matches on Subject: below --
2013-11-28  9:07 Chen Gang
2013-12-06  0:58 ` rkuo
2013-12-06  2:03   ` Chen Gang
2013-12-24  3:18   ` Chen Gang

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=52688C42.3030907@asianux.com \
    --to=gang.chen@asianux.com \
    --cc=Catalin.Marinas@arm.com \
    --cc=Vineet.Gupta1@synopsys.com \
    --cc=arnd@arndb.de \
    --cc=geert@linux-m68k.org \
    --cc=james.hogan@imgtec.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul.gortmaker@windriver.com \
    --cc=sachin.kamat@linaro.org \
    --cc=will.deacon@arm.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).