All of lore.kernel.org
 help / color / mirror / Atom feed
From: Grant Grundler <grundler@puffin.external.hp.com>
To: Matthew Wilcox <willy@debian.org>
Cc: parisc-linux@parisc-linux.org
Subject: Re: [parisc-linux] iotree thoughts
Date: Tue, 21 Aug 2001 01:53:26 -0600	[thread overview]
Message-ID: <200108210753.BAA21158@puffin.external.hp.com> (raw)
In-Reply-To: Message from Matthew Wilcox <willy@debian.org> of "Tue, 21 Aug 2001 08:09:53 BST." <20010821080953.B12638@parcelfarce.linux.theplanet.co.uk>

Matthew Wilcox wrote:
> I discussed this with Ted Ts'o at OLS.  The difficulty is that there's
> a fair bit of arch-independent code which does (example taken from serial.c):
> 
> static _INLINE_ unsigned int serial_in(struct async_struct *info, int offset)
....
> so either we add the nasty:
> 
>         default:
> #if defined(CONFIG_PCI) || defined(CONFIG_ISA)
>                 return inb(info->port + offset);
> #else
>                 BUG();
> #endif

The ifdef is only once in that source file.

> or we just make inb() BUG().

The problem is serial.c is written for x86 arch and wasn't ported
cleanly for other arches. Makeing inb() BUG() allows sloppy
porting.


> Only if they're called.  The majority of places where these functions
> exist can provably never be called.  The others probably won't be :-)

I don't bet on "probably".

If the kernel is designed to not link when a dependency is not met,
I can find problems much faster when they arise. Having to build/reboot
to find porting/coding issues seems harder than it needs to be.

grant

Grant Grundler
parisc-linux {PCI|IOMMU|SMP} hacker
+1.408.447.7253

  reply	other threads:[~2001-08-21  7:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-06  1:05 [parisc-linux] iotree thoughts Matthew Wilcox
2001-08-09 15:06 ` Grant Grundler
2001-08-10  0:37   ` [parisc-linux] Installation Gururaj Ananthateerta
2001-08-10  2:04     ` Thomas Marteau
2001-08-14 16:02   ` [parisc-linux] iotree thoughts Matthew Wilcox
2001-08-21  5:44     ` Grant Grundler
2001-08-21  7:09       ` Matthew Wilcox
2001-08-21  7:53         ` Grant Grundler [this message]
2001-08-21 21:12           ` Helge Deller
2001-08-21 14:12         ` Alan Cox
2001-08-22  0:50       ` Matthew Wilcox
2001-08-25  5:59         ` Grant Grundler
2001-08-27 19:20           ` Matthew Wilcox
     [not found] <200108212111.PAA28876@puffin.external.hp.com>
2001-08-23  6:18 ` Grant Grundler

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=200108210753.BAA21158@puffin.external.hp.com \
    --to=grundler@puffin.external.hp.com \
    --cc=parisc-linux@parisc-linux.org \
    --cc=willy@debian.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.