From: Wu Zhangjin <wuzhangjin@gmail.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Subject: Re: [PATCH -queue 2/2] MIPS: Cleanup the debugging of compressed kernel support
Date: Tue, 26 Jan 2010 21:46:39 +0800 [thread overview]
Message-ID: <1264513599.24895.12.camel@falcon> (raw)
In-Reply-To: <20100126105155.GC30098@linux-mips.org>
On Tue, 2010-01-26 at 11:51 +0100, Ralf Baechle wrote:
[...]
> >
> > +config DEBUG_ZBOOT
> > + bool "Enable compressed kernel support debugging"
> > + depends on SYS_SUPPORTS_ZBOOT_UART16550
>
> This should probably depend on DEBUG_KERNEL also.
>
ok, will add it.
[...]
> > diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile
> > index 91a57a6..68e5db8 100644
> > --- a/arch/mips/boot/compressed/Makefile
> > +++ b/arch/mips/boot/compressed/Makefile
> > @@ -32,7 +32,9 @@ KBUILD_AFLAGS := $(LINUXINCLUDE) $(KBUILD_AFLAGS) -D__ASSEMBLY__ \
> >
> > obj-y := $(obj)/head.o $(obj)/decompress.o $(obj)/dbg.o
> >
> > +ifdef CONFIG_DEBUG_ZBOOT
> > obj-$(CONFIG_SYS_SUPPORTS_ZBOOT_UART16550) += $(obj)/uart-16550.o
> > +endif
>
> DEBUG_ZBOOT already depends on SYS_SUPPORTS_ZBOOT_UART16550 so this can be
> simplified into just obj-$(CONFIG_DEBUG_ZBOOT) and no ifdef.
>
Yes, currently, we can simplify it, but the ifdef can make people be
easier to add new debugging supports, for example:
ifdef CONFIG_DEBUG_ZBOOT
obj-$(CONFIG_SYS_SUPPORTS_ZBOOT_UART16550) += $(obj)/uart-16550.o
+obj-$(CONFIG_SYS_SUPPORTS_ZBOOT_UARTXXXX) += $(obj)/uart-xxxx.o
+obj-$(CONFIG_SYS_SUPPORTS_ZBOOT_VGA) += $(obj)/vga.o
endif
otherwise, we need:
obj-$(CONFIG_SYS_SUPPORTS_ZBOOT) += $(obj)/uart-16550.o \
$(obj)/uart-xxxx.o \
$(obj)/vga.o
and then wrap the $(obj)/uart-16550.c, $(obj)/uart-xxxx.c, $(obj)/vga.c
internally with related ifdefs.
So, which method we choose?
Best Regards,
Wu Zhangjin
next prev parent reply other threads:[~2010-01-26 13:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-26 9:04 [PATCH -queue 1/2] MIPS: Cleanup the Makefile of compressed kernel support Wu Zhangjin
2010-01-26 9:04 ` [PATCH -queue 2/2] MIPS: Cleanup the debugging " Wu Zhangjin
2010-01-26 10:51 ` Ralf Baechle
2010-01-26 13:46 ` Wu Zhangjin [this message]
2010-01-26 10:56 ` [PATCH -queue 1/2] MIPS: Cleanup the Makefile " Ralf Baechle
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=1264513599.24895.12.camel@falcon \
--to=wuzhangjin@gmail.com \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.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 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).