All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Metcalf <cmetcalf@tilera.com>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-arch@vger.kernel.org
Subject: Re: [PATCH] arch/tile: new multi-core architecture for Linux
Date: Mon, 24 May 2010 17:30:58 -0400	[thread overview]
Message-ID: <4BFAF012.4060300@tilera.com> (raw)
In-Reply-To: <20100524202204.GA9917@merkur.ravnborg.org>

On 5/24/2010 4:22 PM, Sam Ravnborg wrote:
> Kernle code looked good from a quick browsing.
>   

Glad to hear it, and thanks for taking the time to look it over.

> Please explain the need for all the different directories within include/
> {arch, hv, netio}
>   

Those three directories are shared with other components of our system. 
The "arch" headers are "core architecture" headers which can be used in
any build environment (Linux, hypervisor, user-code, booter, other
"supervisors" like VxWorks, etc.); they are partly small inline hacks to
use the hardware more easily, and partly just lists of name-to-number
mappings for special registers, etc.  The "hv" headers are imported from
the hypervisor code; these headers are "owned" by our hypervisor, and
the ones shipped with Linux are the ones that have to do with how to run
a supervisor under our hypervisor.  The "netio" headers are another type
of hypervisor header that have to do with interacting with the network
I/O silicon on the chip (the 10 Gbe and 10/100/100 Mb Ethernet).

> There is also several TILE specific options missing the TILE_ prefix.
> Like:
> config XGBE_MAIN
> 	tristate "Tilera GBE/XGBE character device support"
>
> Drop this:
> config XGBE_MAIN
> 	tristate "Tilera GBE/XGBE character device support"
>
> It is better to test for the gcc version and disable the option
> only in the cases where it is known to fail.
>   

Is the "Drop this" comment a cut and paste bug?  I'm guessing you were
referring to CONFIG_WERROR, which enables -Werror support.  The problem
is that whether or not you can use -Werror really depends on not just
the kernel version and the gcc version, but very likely also what
drivers you have enabled.  We always use it internally.  I could also
just pull this out completely (and just force it into "make" externally
within our external build process), or move it to a "generic" configure
option.  In any case we can't just automate it, unfortunately.

> Do not mess with CC like this:
> CC = $(CROSS_COMPILE)gcc
>
> I guess you had to do this to support:
> LIBGCC_PATH     := `$(CC) -print-libgcc-file-name`
>
> If you follow other archs you could do like this:
> LIBGCC_PATH     := `$(CC) -print-libgcc-file-name`
>   

I'm guessing you meant like what h8300 does, "$(shell
$(CROSS-COMPILE)$(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)".  That
seems reasonable.

> arch/tile/kernel/Makefile
> I has expected that compiling vmlinux.lds required knowledge on $(BITS)
> like this:
> CPPFLAGS_vmlinux.lds := -m$(BITS)
>   

Our 32-bit chips only do 32-bit.  In the 64-bit mode we always build the
kernel implicitly -m64, which is the compiler default.

> arch/tile/kernel/vmlinux.lds.S
> A lot of effort has been put into unifying the different
> variants of vmlinux.lds.
> Please see the skeleton outlined in include/asm-generic/vmlinux.lds.h
>   

Yes, I've tried to track this somewhat over kernel releases, but I'll go
back and re-examine it with fresh eyes.

> You include hvglue.ld.
> We use *.lds for linker script file - please rename.
> The file looks generated?? How and when?
>   

It's sort of a semi-generated file.  We have a test in our regressions
that just tests that this file matches the API for our hypervisor, which
is just calls to physical address =32KB plus 64 bytes per syscall
number.  These defined addresses are then used for calls to e.g.
hv_flush_asid() or whatever.  The hypervisor API changes occasionally,
at which point we update this file.  You don't see it used in
vmlinux.lds since it's just used as plain C calls through the arch/tile/
code.

> arch/tile/initramfs:
> Does not look like it belongs in the kernel?
>   

Fair enough.  We ship it with the kernel to make it easy for our users
to bootstrap up into a plausible initramfs filesystem, but it's strictly
speaking not part of the kernel, so I'll remove it.

> arch/tile/include/asm/spinlock.h
> Please make this a one-liner when you uses the asm-generic version only.
> Same goes for byteorder (which includes linux/byteorder/little_endian.h)
>   

I'm not sure what you mean when you say to use the asm-generic version
of spinlock.h, since it's not SMP-ready.  Also, I don't see an
asm-generic/byteorder.h, so I'm puzzled there too.

> In your mail you did not say anything about the checkpatch status.
> It is better that you make your code reasonable checkpatch clean _before_
> merging. Then you will not be hit by a lot of janitorial patches doing so.
>   

I ran checkpatch over everything I submitted.  There are many
complaints, to be sure, but I did a first pass cleaning up everything
that was plausible, so for example all the style issues were fixed, but
things like some uses of volatile, some uses of init_MUTEX, etc., were
not modified.  However, I think it's in decent shape from a checkpatch
point of view.

> Likewise please state sparse status. We do not expect it to be sparse clean.
> But getting rid of the obvious issues is good too.
>   

I have not run sparse over it.  I will do so.

Thanks for your review!  Getting this much feedback from LKML is great
-- I really appreciate it.

-- 
Chris Metcalf, Tilera Corp.
http://www.tilera.com

  reply	other threads:[~2010-05-24 21:31 UTC|newest]

Thread overview: 110+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-20  5:43 [PATCH] arch/tile: new multi-core architecture for Linux Chris Metcalf
2010-05-20  8:04 ` Barry Song
2010-05-20 14:32   ` Linus Torvalds
2010-05-20 19:10   ` Chris Metcalf
2010-05-21  4:52     ` Barry Song
2010-05-21 15:13       ` Chris Metcalf
2010-05-20 19:12   ` [PATCH] generic: make lowmem_page_address() use PFN_PHYS() for improved portability Chris Metcalf
2010-05-22  4:05 ` [PATCH] arch/tile: new multi-core architecture for Linux Chris Metcalf
2010-05-23 22:08   ` Arnd Bergmann
2010-05-24 15:29     ` Chris Metcalf
2010-05-24 18:53       ` Arnd Bergmann
2010-05-24 21:29         ` Chris Metcalf
2010-05-25 13:54         ` Chris Metcalf
2010-05-25 15:03           ` Arnd Bergmann
2010-05-25 15:13             ` Chris Metcalf
2010-05-25 15:30               ` Arnd Bergmann
2010-05-26  2:44             ` liqin.chen
2010-05-26  2:44               ` liqin.chen
2010-05-26 13:45               ` Chris Metcalf
     [not found]           ` <4BFBE005.2070500@tilera.com>
     [not found]             ` <201005251721.23782.arnd@arndb.de>
2010-05-26 23:05               ` Chris Metcalf
2010-05-26  5:02       ` Paul Mundt
2010-05-25 21:45     ` Arnd Bergmann
2010-05-27  0:58       ` Chris Metcalf
2010-05-27  8:41         ` Arnd Bergmann
2010-05-27 13:30           ` Chris Metcalf
2010-05-27 13:41             ` Geert Uytterhoeven
2010-05-27 13:48               ` Paul Mundt
2010-05-27 14:11             ` Arnd Bergmann
2010-05-27 14:35               ` Chris Metcalf
2010-05-27 15:02                 ` Arnd Bergmann
2010-05-27 15:04                   ` Chris Metcalf
2010-05-27 15:20                     ` Arnd Bergmann
2010-05-27 14:52               ` Marc Gauthier
2010-05-28 17:58                 ` Chris Metcalf
2010-05-27 15:03               ` Chris Metcalf
2010-05-27 20:34           ` Jamie Lokier
2010-05-27 20:53             ` Arnd Bergmann
2010-05-28 16:45       ` Chris Metcalf
2010-05-28 17:16         ` Arnd Bergmann
2010-05-28 17:28           ` Chris Metcalf
2011-05-16 18:23       ` [PATCH] arch/tile: support signal "exception-trace" hook Chris Metcalf
2011-05-18 18:14         ` Chris Metcalf
2011-05-17 20:26       ` [PATCH] arch/tile: add /proc/tile, /proc/sys/tile, and a sysfs cpu attribute Chris Metcalf
2011-05-19 13:41         ` Arnd Bergmann
2011-05-19 15:12           ` Chris Metcalf
2011-05-19 15:22             ` Arnd Bergmann
2011-05-19 15:22             ` Arnd Bergmann
2011-05-20 14:26               ` Chris Metcalf
2011-05-20 14:26               ` Chris Metcalf
2011-05-20 14:37                 ` Arnd Bergmann
2011-05-20 15:00                   ` Chris Metcalf
2011-05-20 15:00                   ` Chris Metcalf
2011-05-20 15:13                     ` Arnd Bergmann
2011-05-20 19:59                       ` Arnd Bergmann
2011-05-20 19:59                       ` Arnd Bergmann
2011-05-25 19:09                         ` Chris Metcalf
2011-05-25 19:17                         ` Chris Metcalf
2011-05-25 19:18                         ` Chris Metcalf
2011-05-25 19:18                         ` Chris Metcalf
2011-05-25 20:20                           ` Arnd Bergmann
2011-05-25 20:20                           ` Arnd Bergmann
2011-05-25 20:31                             ` Chris Metcalf
2011-05-25 20:34                               ` Arnd Bergmann
2011-05-25 20:34                               ` Arnd Bergmann
2011-05-25 20:31                             ` Chris Metcalf
2011-05-20 15:13                     ` Arnd Bergmann
2011-05-20 14:37                 ` Arnd Bergmann
2011-05-24 15:38               ` Arnd Bergmann
2011-05-24 15:38               ` Arnd Bergmann
2011-05-26 16:40         ` [PATCH v2] arch/tile: more /proc and /sys file support Chris Metcalf
2011-05-27 14:23           ` Arnd Bergmann
2011-05-27 14:23           ` Arnd Bergmann
2011-05-26 16:40         ` Chris Metcalf
2010-05-24 20:22 ` [PATCH] arch/tile: new multi-core architecture for Linux Sam Ravnborg
2010-05-24 21:30   ` Chris Metcalf [this message]
2010-05-25  5:02     ` Sam Ravnborg
2010-05-25 20:12 ` Thomas Gleixner
2010-05-26  1:57   ` Chris Metcalf
2010-05-26 16:22   ` Chris Metcalf
2010-05-26 17:09     ` Arnd Bergmann
2010-05-29  3:01 ` [PATCH 1/8] Fix up the "generic" unistd.h ABI to be more useful Chris Metcalf
2010-05-29  3:01 ` Chris Metcalf
2010-05-29  3:09 ` [PATCH 2/8] arch/tile: infrastructure and configuration-related files Chris Metcalf
2010-05-31  7:47   ` Paul Mundt
2010-06-03 17:54     ` Chris Metcalf
2010-05-29  3:09 ` Chris Metcalf
2010-05-29  3:10 ` [PATCH 3/8] arch/tile: header files for the Tile architecture Chris Metcalf
2010-05-31  2:58   ` FUJITA Tomonori
2010-06-03 21:32   ` [PATCH] arch/tile: respond to reviews of the second code submission Chris Metcalf
2010-06-04  0:50     ` Paul Mundt
2010-06-04  1:31     ` FUJITA Tomonori
2010-06-07  5:25       ` FUJITA Tomonori
2010-05-29  3:10 ` [PATCH 4/8] arch/tile: core kernel/ code Chris Metcalf
2010-05-31  2:58   ` FUJITA Tomonori
2010-05-29  3:11 ` [PATCH 5/8] arch/tile: the kernel/tile-desc_32.c file Chris Metcalf
2010-05-29  3:13 ` [PATCH 6/8] arch/tile: the mm/ directory Chris Metcalf
2010-05-29  3:16 ` [PATCH 7/8] arch/tile: lib/ directory Chris Metcalf
2010-05-29  3:16 ` Chris Metcalf
2010-05-29  3:17 ` [PATCH 8/8] arch/tile: hypervisor console driver Chris Metcalf
2010-05-29  3:17 ` Chris Metcalf
2010-05-29  3:20 ` [PATCH 0/8] revised patch for arch/tile/ support Chris Metcalf
2010-05-29 11:29   ` Arnd Bergmann
2010-06-03 20:40     ` Arnd Bergmann
2010-06-03 21:48       ` Chris Metcalf
2010-06-04 21:32       ` Chris Metcalf
2010-06-05 12:56         ` Stephen Rothwell
2010-06-05 13:30           ` Chris Metcalf
2010-06-05 14:10             ` Stephen Rothwell
     [not found] ` <dVZMmBu$KHA.5388@exchange1.tad.internal.tilera.com>
2010-05-29  3:20   ` Chris Metcalf
2010-05-29  3:20 ` Chris Metcalf

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=4BFAF012.4060300@tilera.com \
    --to=cmetcalf@tilera.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.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 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.