mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Martin J. Bligh" <mbligh@aracnet.com>
To: "J.E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: Sam Ravnborg <sam@ravnborg.org>,
	john stultz <johnstul@us.ibm.com>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] [PATCH] subarch cleanup
Date: Fri, 22 Nov 2002 09:20:36 -0800	[thread overview]
Message-ID: <1053855634.1037956835@[10.10.2.3]> (raw)
In-Reply-To: <200211221640.gAMGetJ02979@localhost.localdomain>

>> And every other header file is under the include path ... putting them
>> all mixed in with C files is just making a mess.
> 
> No, look at e.g. SCSI.  We have a scsi.h file in drivers/scsi which defines 
> subsystem specific things that we only use within SCSI.  We have 
> include/scsi/scsi.h which defines things other subsystems can use.

The fact that it exists elsewhere does not necessarily make it a 
model to follow ...
 
>> Que? How is include/asm-i386 any more "kernel core" than arch/i386? 
> 
> Because the files are spreading.  I think there's value to keeping something 
> tightly contained unless you're going to encourage others to use it.  
> Interfaces are dangerous things: If you release them into the wild 
> willy-nilly, they can come back and bite you (athough more often they just 
> bite other people).

I think that's somewhat unlikely, but still .... let's go back to the
root of the problem here, and look at how to fix it. It seems that the
current way that subarch is implemented is not workable for current
subarches - we've gone through this before on IRC, and you agreed it
was broken, but let's do it again for the sake of argument, and so that
other people can see the problem ....

Imagine for a second that we have 5 different subarches (say visws, 
voyager, numaq, summit, generic). Assign a letter to each (ABCDE) and
a number to each of the code areas they need to modify:

A: 123456 (generic, thus needs a default for everything).
B: 12
C: 3
D: 45
E: 56

Duplicating all the code sections into all the subarches is an
impractical maintainance nightmare. Yet that's how it seems
to be set up at the moment (kind of OK if you only have 1 subarch
apart from generic, but not in general).

Let's stick to discussing header files at first ... what we need is 
to pick up the machine specific file if there is one, else fall back
and pick up the generic file. The way I'd like to see this fixed is
to have an include path statement that picks things up in order ie
append include/asm/mach-specific then include/asm/mach-generic in
the include search path. The easiest way to do that (to me) seems to
be to convert the #include "foo.h" to #include <foo.h> statements
and break things out as John did - we'll automatically pick up the
correct include file from the path.

If you have a different suggestion for fixing subarch support, please
outline it ....

Martin.





  parent reply	other threads:[~2002-11-22 17:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-20  0:00 john stultz
2002-11-21 18:33 ` Sam Ravnborg
2002-11-21 18:35   ` Martin J. Bligh
2002-11-21 19:34     ` Russell King
2002-11-21 21:47       ` Martin J. Bligh
2002-11-22 15:00     ` J.E.J. Bottomley
2002-11-22 15:42       ` Martin J. Bligh
2002-11-22 16:40         ` J.E.J. Bottomley
2002-11-22 16:57           ` Christoph Hellwig
2002-11-22 17:20           ` Martin J. Bligh [this message]
2002-11-22 17:55             ` J.E.J. Bottomley
2002-11-21 18:55   ` john stultz
2002-11-21 19:15     ` Sam Ravnborg
2002-11-21 20:27       ` Alan Cox

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='1053855634.1037956835@[10.10.2.3]' \
    --to=mbligh@aracnet.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.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®