mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Bolle <pebolle@tiscali.nl>
To: Richard Kuo <rkuo@codeaurora.org>
Cc: torvalds@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 33/36] Hexagon: Add configuration and makefiles for the Hexagon architecture.
Date: Tue, 01 Nov 2011 10:30:46 +0100	[thread overview]
Message-ID: <1320139846.14409.129.camel@x61.thuisdomein> (raw)
In-Reply-To: <093448$3uejv7@wolverine01.qualcomm.com>

(I'd like to add some quick comments, Kconfig related. It's too late, I
guess.)

On Mon, 2011-10-31 at 18:55 -0500, Richard Kuo wrote:
> diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig
> new file mode 100644
> index 0000000..02513c2
> --- /dev/null
> +++ b/arch/hexagon/Kconfig
> @@ -0,0 +1,220 @@
> +# Hexagon configuration
> +comment "Linux Kernel Configuration for Hexagon"
> +
> +config HEXAGON
> +	def_bool y
> +	select HAVE_OPROFILE
> +	select USE_GENERIC_SMP_HELPERS if SMP
> +	# Other pending projects/to-do items.
> +	# select HAVE_REGS_AND_STACK_ACCESS_API
> +	# select HAVE_HW_BREAKPOINT if PERF_EVENTS
> +	# select ARCH_HAS_CPU_IDLE_WAIT
> +	# select ARCH_WANT_OPTIONAL_GPIOLIB
> +	# select ARCH_REQUIRE_GPIOLIB
> +	# select HAVE_CLK
> +	# select IRQ_PER_CPU
> +	select HAVE_IRQ_WORK
> +	# select GENERIC_PENDING_IRQ if SMP

Is GENERIC_PENDING_IRQ also a pending project?

> +	select GENERIC_ATOMIC64
> +	select HAVE_PERF_EVENTS
> +	select HAVE_GENERIC_HARDIRQS
> +	select GENERIC_HARDIRQS_NO__DO_IRQ
> +	select GENERIC_HARDIRQS_NO_DEPRECATED
> +	# GENERIC_ALLOCATOR is used by dma_alloc_coherent()
> +	select GENERIC_ALLOCATOR
> +	select GENERIC_IRQ_SHOW
> +	select HAVE_ARCH_KGDB
> +	select HAVE_ARCH_TRACEHOOK
> +	select NO_IOPORT
> +	# mostly generic routines, with some accelerated ones

What does this comment on?

> +	---help---
> +	  Qualcomm Hexagon is a processor architecture designed for high
> +	  performance and low power across a wide variety of applications.
> +
> +config HEXAGON_ARCH_V1
> +	bool
> +
> +config HEXAGON_ARCH_V2
> +	bool
> +
> +config HEXAGON_ARCH_V3
> +	bool
> +
> +config HEXAGON_ARCH_V4
> +	bool

[...]

> +#config ZONE_DMA
> +#	bool
> +#	default y

Why is this added commented out?

> +config HAS_DMA
> +	bool
> +	select HAVE_DMA_ATTRS
> +	default y

HAS_DMA isn't supposed to be used this way, is it? See commit
411f0f3edc141a582190d3605cadd1d993abb6df ("Introduce CONFIG_HAS_DMA").
Can't this entry be replaced by a "select HAVE_DMA_ATTRS" line in the
"config HEXAGON" entry? That seems to be the common idiom.

[...]

> +config STACKTRACE_SUPPORT
> +	def_bool y
> +	select STACKTRACE

Some grepping suggests that the tracing infrastructure will "select
STACKTRACE" if the architecture sets STACKTRACE_SUPPORT (tile apparently
also gets this wrong). Have I grepped this correctly?

> +config GENERIC_BUG
> +	def_bool y
> +	depends on BUG
> +
> +config BUG
> +	def_bool y

Why do you have this? Other architecture don't (there's just one BUG
entry in all the Kconfig files).

> +menu "Machine selection"
> +
> +choice
> +	prompt "System type"
> +	default HEXAGON_ARCH_V2
> +
> +config HEXAGON_COMET
> +	bool "Comet Board"
> +	select HEXAGON_ARCH_V2
> +	---help---
> +	  Support for the Comet platform.
> +
> +endchoice

The default doesn't match the (single) config option here (it should
default to HEXAGON_COMET). That shouldn't matter because there's only
one option, which the config tools will then pick (that's the way they
seem to work). 

But why is this a choice when there's nothing to actually choose?
Moreover, just looking at this patch suggests HEXAGON_COMET is yet
unused (CONFIG_HEXAGON_COMET is commented out in the Makefile). So at
first glance this seems an elaborate way to select HEXAGON_ARCH_V2.

[...]

> +config SMP
> +	bool "Multi-Processing support"
> +	---help---
> +	  Enables SMP support in the kernel.  If unsure, say "Y"

Odd. Even x86 and powerpc (the only two architectures I looked at)
suggest to say "N" to those not knowing what to do here.

> +config NR_CPUS
> +	int "Maximum number of CPUs" if SMP
> +	range 2 6 if SMP
> +	default "1" if !SMP
> +	default "6" if SMP
> +	---help---
> +	  This allows you to specify the maximum number of CPUs which this
> +	  kernel will support.  The maximum supported value is 6 and the
> +	  minimum value which makes sense is 2.
> +
> +	  This is purely to save memory - each supported CPU adds
> +	  approximately eight kilobytes to the kernel image.

This is good. Quite a number of architectures do net set this
(especially the default of "1" in the !SMP case).

[...]

> +config GENERIC_GPIO
> +	bool "Generic GPIO support"
> +	default n

I know next to nothing about GENERIC_GPIO but does it make sense for
Hexagon? If not, wouldn't a "def_bool n" do? (Perhaps you could even
drop this entry entirely.)

[...]

> diff --git a/arch/hexagon/Makefile b/arch/hexagon/Makefile
> new file mode 100644
> index 0000000..7ce9563
> --- /dev/null
> +++ b/arch/hexagon/Makefile

[...]

> +#	arch/hexagon/platform/common/
> +#
> +#core-$(CONFIG_HEXAGON_COMET)		+= arch/hexagon/platform/comet/
> +#machine-$(CONFIG_HEXAGON_COMET)		:= comet


Paul Bolle


  reply	other threads:[~2011-11-01  9:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-31 23:55 Richard Kuo
2011-11-01  9:30 ` Paul Bolle [this message]
2011-11-01 17:27   ` Richard Kuo
2011-11-01 18:59     ` Paul Bolle
2011-11-01 21:17       ` Richard Kuo
  -- strict thread matches above, loose matches on Subject: below --
2011-10-19  3:47 Richard Kuo

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=1320139846.14409.129.camel@x61.thuisdomein \
    --to=pebolle@tiscali.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rkuo@codeaurora.org \
    --cc=torvalds@linux-foundation.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

all inboxes | Powered by JetHome®