From: Doug Maxey <dwm@maxeymade.com>
To: "Randy.Dunlap" <rddunlap@osdl.org>
Cc: Jesse Barnes <jbarnes@engr.sgi.com>,
linux-pci@atrey.karlin.mff.cuni.cz, linux-ia64@vger.kernel.org,
linux-kernel@vger.kernel.org, willy@debian.org
Subject: Re: [PATCH] add legacy I/O port & memory APIs to /proc/bus/pci
Date: Thu, 16 Dec 2004 17:55:09 +0000 [thread overview]
Message-ID: <200412161755.iBGHt9Mm028966@falcon30.maxeymade.com> (raw)
In-Reply-To: <41C1BA38.60304@osdl.org>
In-Reply-To: <41C1BA38.60304@osdl.org>
[-- Attachment #1: Type: text/plain, Size: 1825 bytes --]
On Thu, 16 Dec 2004 08:39:20 PST, "Randy.Dunlap" wrote:
>Jesse Barnes wrote:
>> This patch documents the /proc/bus/pci interface and adds some optional
>> architecture specific APIs for accessing legacy I/O port and memory space.
>> This is necessary on platforms where legacy I/O port space doesn't 'soft
>> fail' like it does on PCs, and is useful for systems that can route legacy
>> space to different PCI busses.
>>
>> I've incorporated all the feedback I've received so far, so I think it's ready
>> to send on to Andrew for inclusion, if someone could give the proc-pci.txt
>> documentation a last read (and/or comment on other stuff I may have missed).
>
>meta-comment:
>Would you (and not just you :) include a diffstat summary so we
>can see which files are being changed? something like this:
>
>
> Documentation/filesystems/proc-pci.txt | 126
>+++++++++++++++++++++++++++++++++
> arch/ia64/pci/pci.c | 105
>+++++++++++++++++++++++++++
> arch/ia64/sn/pci/pci_dma.c | 74 +++++++++++++++++++
> drivers/pci/proc.c | 100 +++++++++++++++++++++++---
> include/asm-ia64/machvec.h | 24 ++++++
> include/asm-ia64/machvec_init.h | 3
> include/asm-ia64/machvec_sn2.h | 6 +
> include/asm-ia64/pci.h | 4 +
> include/asm-ia64/sn/sn_sal.h | 47 ++++++++++++
> include/linux/pci.h | 12 ++-
> 10 files changed, 488 insertions(+), 13 deletions(-)
>
>--
>~Randy
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/
>
Here is a little perl diddy that accomplishes same:
[-- Attachment #2: ds --]
[-- Type: text/plain , Size: 3416 bytes --]
#!/usr/bin/env perl
# ds
# Created Fri Oct 22 2004 by dwm@austin.ibm.com
# $Id: ds,v 1.11 2004/11/05 23:24:06 dwm Exp $
require 5.6.1;
use Getopt::Long 2.33;
use Pod::Usage;
use Data::Dumper;
use Config;
### variables and subroutines ##
$opt_debug = 0;
$opt_help = 0;
$opt_man = 0;
$stat_flags = "";
$diff_flags = "-Nwupa";
@dirs = ();
@tops = ();
sub infer_orig ( $ ) {
my $suf = "$_[0]\$";
my $x = $ENV{PWD};
my $basedir;
($basedir = $x) =~ s,.*/,,;
if ($basedir =~ m{$suf}) {
($tops[0] = $basedir) =~ s{$suf}{};
$tops[1] = $basedir;
return 1;
}
return 0;
}
\f
############# main ####################
GetOptions (
'debug' => \$opt_debug,
'diffflags=s' => \$diff_flags,
'dirs=s' => \@dirs,
'help|?' => \$opt_help,
'man' => \$opt_man,
'statflags=s' => \$stat_flags,
'tops=s' => \@tops,
'verbose+' => \$verbose,
)
or pod2usage(2);
pod2usage (1) if $opt_help;
pod2usage (-verbose => 2) if $opt_man;
( $prog = $0 ) =~ s{.*/}{}o;
## If no arguments were given, then allow STDIN to be used only
## if it's not connected to a terminal (otherwise print usage)
pod2usage ("$prog: No files given.") if ((@ARGV == 0) && (-t STDIN));
# setbuf on STDERR.
$ofh = select (STDERR); $| = 1; select ($ofh);
@diffout = ();
$kill_errs = ($verbose) ? "" : "2>/dev/null";
#
# if tops is not set, infer the older directory. Long Term - find out if cvs file.
#
if (not scalar @tops) {
my @os = ( "\.edit" );
while ($od = shift @os) {
last if (infer_orig $od);
}
}
if (not scalar @tops) {
pod2usage ("$prog: could not infer, need to define tops.");
}
if (not -d $tops[0]) {
if (-d "../$tops[0]") {
chdir '..';
print STDERR qx{pwd} if $verbose;
}
else {
die "could not find $tops[0]\n";
}
}
while ($path = shift @ARGV) {
my $recurse = (-d "$tops[0]/$path") ? 'r' : '';
$cmd = "diff $diff_flags${recurse} $tops[0]/$path $tops[1]/$path $kill_errs";
print "tops={@tops}\n$cmd\n" if $opt_debug;
open DIFFIN, "$cmd |" or die "open {$cmd}\n";
while (<DIFFIN>) {
next if (m{^Common});
push @diffout, $_;
}
}
open DSI, "|diffstat $stat_flags" or die "open stat pipe\n";
print DSI @diffout;
print while (<DSI>);
close DSI;
print "\n", @diffout;
__END__
\f
=head1 NAME
B<ds> - diffstat + diff from one command
=head1 SYNOPSIS
B<ds> [options] ...
=head1 OPTIONS
=over 4
=item B<--debug>
run without action, printing debug messages.
=item B<--diffflags>
flags to pass to diff. default -Nwupa.
=item B<--help>
print the synopsis only. see B<--man>.
=item B<--man>
print the complete manpage.
=item B<--statflags>
flags to pass to diffstat. default is {$stat_flags}.
=item B<--tops>
Top level directories to diff with the appended paths. If not specified,
infer from current directory if possible.
=item B<--verbose>
whistle while we work. multiple calls increase the verbosity level.
=back
=head1 DESCRIPTION
Runs diff over the list of files, collecting the output. When complete, outputs
the stats followed by the diffs to stdout.
=head1 EXAMPLES
examples
=head1 NOTE
note
=head1 BUGS
Undoubtedly. Contact the author with the particulars if this is stopping your progress.
=head1 FILES
B<ds> - perl script
=head1 AUTHOR
Doug Maxey <dwm@austin.ibm.com>
=cut
next prev parent reply other threads:[~2004-12-16 17:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-16 16:50 [PATCH] add legacy I/O port & memory APIs to /proc/bus/pci Jesse Barnes
2004-12-16 16:39 ` Randy.Dunlap
2004-12-16 17:07 ` Jesse Barnes
2004-12-16 17:55 ` Doug Maxey [this message]
2004-12-16 16:56 ` Christoph Hellwig
2004-12-16 17:04 ` Jesse Barnes
2004-12-16 17:37 ` Bjorn Helgaas
2004-12-16 17:42 ` Jesse Barnes
2004-12-16 18:45 ` David Mosberger
2004-12-16 18:56 ` Jesse Barnes
2004-12-16 19:07 ` Jesse Barnes
2004-12-16 19:11 ` David Mosberger
2004-12-16 19:13 ` Jesse Barnes
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=200412161755.iBGHt9Mm028966@falcon30.maxeymade.com \
--to=dwm@maxeymade.com \
--cc=jbarnes@engr.sgi.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
--cc=rddunlap@osdl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox