* Re: [ISN] Music file flaws could threaten traders
From: Paul Krumviede @ 2002-12-19 22:41 UTC (permalink / raw)
To: Russell Coker, selinux
In-Reply-To: <200212192307.20386.russell@coker.com.au>
--On Thursday, 19 December, 2002 23:07 +0100 Russell Coker
<russell@coker.com.au> wrote:
> This type of thing could affect Linux in the same way as it affects
> Windows.
i'm not so sure. the bugtraq posting about the windows XP bug
indicated that it could be exploited even without downloading
a file to the user's computer. if using explorer, the file had to be
on the local machine, but didn't need to be "played" to allow
an exploit. i don't think that either case is relevant to selinux
(but would like to know if i'm wrong).
i haven't looked at the winamp report yet.
-paul
> Currently we have "risky" programs such as netscape, games, and IRC
> clients in their own domains that have types for read-only and for
> read-write files (and no ability to run gpg or other important programs).
>
> The problem about doing the same for audio/video programs such as players
> for avi, mp3, and vob files is that their typical use involves
> downloading files from the net to play immediately so that denying them
> read access to user_home_t files will give a large decrease in
> functionality. I believe that there are two major categories of SE
> Linux users, those who will never run such A/V programs on Linux, and
> those who won't use any security software that gets in the way of their
> entertainment.
>
> So I think that having a domain for A/V programs such as $1_av_t that has
> read access to $1_home_t and can create files with the type $1_home_av_t
> may not be as tightly secured as we might like, but the people who are
> concerned about that won't use it anyway.
>
> On Thu, 19 Dec 2002 09:58, InfoSec News wrote:
>> http://news.com.com/2100-1001-978403.html?tag=fd_top
>>
>> By Robert Lemos
>> Staff Writer, CNET News.com
>> December 18, 2002, 5:12 PM PT
>>
>> A security firm on Wednesday warned that people using Windows XP or
>> popular music player WinAmp could fall prey to a vulnerability,
>> enabling a modified music file to take control of a person's PC.
>
> --
> http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages
> http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark
> http://www.coker.com.au/postal/ Postal SMTP/POP benchmark
> http://www.coker.com.au/~russell/ My home page
>
>
> --
> This message was distributed to subscribers of the selinux mailing list.
> If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov
> with the words "unsubscribe selinux" without quotes as the message.
>
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply
* Re: Intel P6 vs P7 system call performance
From: Linus Torvalds @ 2002-12-19 22:49 UTC (permalink / raw)
To: H. Peter Anvin
Cc: Jamie Lokier, bart, davej, terje.eggestad, drepper, matti.aarnio,
hugh, mingo, linux-kernel
In-Reply-To: <3E02479E.8050801@transmeta.com>
On Thu, 19 Dec 2002, H. Peter Anvin wrote:
>
> Unfortunately it means taking an indirect call cost for every invocation...
Ehh.. I just tested the "cost" of this on a PIII (comparing a indirect
call with a direct one), and it's exactly one extra cycle.
ONE CYCLE.
On a P4 the difference was 4 cycles. On my test P95 system I didn't see
any difference at all. And I don't have an athlon handy in my office.
That's the difference between
static void *address = &do_nothing;
asm("call *%0" :"m" (address))
and
asm("call do_nothing");
So it's between 0-4 cycles on machines that take 200 - 1000 cycles for
just the system call overhead.
And for that "overhead", you get a binary that trivially works on all
kernels, _and_ doesn't need extra mmap's etc (which are _easily_ thousands
of cycles).
Linus
^ permalink raw reply
* Re: Dedicated kernel bug database
From: John Bradford @ 2002-12-19 23:09 UTC (permalink / raw)
To: Dan Kegel; +Cc: linux-kernel
In-Reply-To: <3E024798.5070702@kegel.com>
> > But I see that starting from scratch is just the way you work:
> > http://grabjohn.com/question.php?q=6
>
> It gets worse:
> http://grabjohn.com/question.php?q=9
It gets worse still:
http://grabjohn.com/question.php?q=7
Do I have the only web page in the world that rejects the world's most
popular web browser?
http://grabjohn.com/fruit2.php
John.
^ permalink raw reply
* Re: modutils for both redhat kernels and 2.5.x
From: Bill Davidsen @ 2002-12-19 22:57 UTC (permalink / raw)
To: Jamie Lokier; +Cc: Linux-Kernel Mailing List
In-Reply-To: <20021126021100.GB29814@bjl1.asuk.net>
On Tue, 26 Nov 2002, Jamie Lokier wrote:
> Rusty Russell wrote:
> > > Depmod no longer exists.
> >
> > This is true. It doesn't need to for 0.7, but it's being reintroduced
> > in 0.8 for speed.
>
> Doesn't it? When I upgraded from 2.5.45 to 2.5.48, and installed
> module-init-tools-0.7, a whole bunch of modules failed to load
> automatically, and I ended up with no pcmcia, no network, no
> af_packet, no loopback device...
Having the driver for the root device not load from the initrd kind of
sucks as well. Actually I always build the loopback and ramdisk in, I
don't want to find out if initrd boot would work without them ;-)
But trying to build a single kernel for multiple configs of hardware is
much harder if you can't just roll multiple initrd files from the single
compile. I guess you can build every possible driver in, but I'd rather
not.
--
bill davidsen <davidsen@tmr.com>
CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.
^ permalink raw reply
* Re: ALSA update
From: Bill Davidsen @ 2002-12-19 23:04 UTC (permalink / raw)
To: Takashi Iwai; +Cc: Linux-Kernel Mailing List
In-Reply-To: <s5hof7ius93.wl@alsa2.suse.de>
On Thu, 19 Dec 2002, Takashi Iwai wrote:
> At Wed, 18 Dec 2002 22:51:27 +0300 (MSK),
> Ruslan U. Zakirov <cubic@miee.ru> wrote:
> >
> > Hello, Jaroslav and All.
> > How about other changes in new 2.5 kernel, like new PnP layer (Adam Belay)
> > or changes with module & boot params (Rusty Russel)? There are now some
> > changes in 2.5.52 kernel in sound/isa/opl3sa2.c that make this driver not
> > compatible with other kernels. May be it's better split your tree in
> > several trees for each version of kernels?
>
> if possible, we'll build up some wrapper for 2.4 on alsa-driver (not
> the codebase for 2.5) tree. if not possible, yes, splitting to two
> trees would be reasonable for such big changes...
>
> thanks for noticing this issue. i'll check them now.
If you really want single source you might use something like m4 to split
out both 2.4 and 2.5 versions which are less cluttered.
I admit this doesn't make your job a bit easier, but people reading the
drivers for one series or the other would have an easier job reading the
code. In a perfect world that would means they would find bugs for you and
just send patches. In reality you wouldn't have people telling you your
code was ugly.
--
bill davidsen <davidsen@tmr.com>
CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.
^ permalink raw reply
* Re: 2.4.21-pre1 broke the ide-tape driver
From: Marcelo Tosatti @ 2002-12-19 20:08 UTC (permalink / raw)
To: Mikael Pettersson; +Cc: alan, linux-kernel
In-Reply-To: <200212162327.AAA06228@harpo.it.uu.se>
On Tue, 17 Dec 2002, Mikael Pettersson wrote:
> I wrote:
> >On Sun, 15 Dec 2002 02:23:34 +0100, Marc-Christian Petersen wrote:
> >>> Kernel 2.4.21-pre1 broke the ide-tape driver: the driver
> >>> now hangs during initialisation. 2.2 kernels (with Andre's
> >>> IDE patch) and 2.4 up to 2.4.20 do not have this problem.
> >>> My box has a Seagate STT8000A ATAPI tape drive as hdd;
> >>> hdc is a Philips CD-RW, and the controller is ICH2 (i850 chipset).
> >>http://linux.bkbits.net:8080/linux-2.4/patch@1.828?nav=index.html|ChangeSet@-7d|cset@1.828
> >
> >Addendum: this patch fixes the init-time hang, and ide-tape does
> >seem to work fine, but 'rmmod ide-tape' oopses -- 2.4.20-ac2 also
> >oopses on 'rmmod ide-tape'.
>
> Solved, I think. Observe ide-tape's module_exit() procedure idetape_exit():
>
> >static void __exit idetape_exit (void)
> >{
> > ide_drive_t *drive;
> > int minor;
> >
> > for (minor = 0; minor < MAX_HWIFS * MAX_DRIVES; minor++) {
> > drive = idetape_chrdevs[minor].drive;
> > if (drive != NULL && idetape_cleanup(drive))
> > printk(KERN_ERR "ide-tape: %s: cleanup_module() "
> > "called while still busy\n", drive->name);
> > }
> >#ifdef CONFIG_PROC_FS
> > if (drive->proc)
> > ide_remove_proc_entries(drive->proc, idetape_proc);
> >#endif
> >
> > ide_unregister_module(&idetape_module);
> >}
>
> In the "if (drive->proc)" line, drive==NULL when I rmmod ide-tape,
> causing the oops.
>
> I'm not sure if ide_remove_proc_entries() is needed or not,
> but the current code is obviously broken.
>
> - ide_unregister_module() removes ide-tape's proc entry
> (/proc/ide/ideX/hdY/name) for us, at least that's what happens
> on my box after I commented out the entire "if (drive->proc) ..."
> statement to prevent the oops. So possibly the call should be deleted.
>
> - ide-disk/ide-floppy do the test&call inside the loop rather than after,
> so possibly the call should be moved into the loop, and augmented
> to be "if (drive && drive->proc) ide_remove_proc_entries(...)".
Yes... here is a patch which moves the ide_remove_proc_entries inside the
detection loop. Without ide_remove_proc_entries inside the loop we would
also not unregister more than one device /proc entries, too.
Please test it, works for me.
--- linux-bk/drivers/ide/ide-tape.c 2002-12-19 18:05:07.000000000 -0200
+++ linux-2.4.21/drivers/ide/ide-tape.c 2002-12-19 17:59:39.000000000 -0200
@@ -6597,14 +6597,16 @@
for (minor = 0; minor < MAX_HWIFS * MAX_DRIVES; minor++) {
drive = idetape_chrdevs[minor].drive;
- if (drive != NULL && idetape_cleanup(drive))
- printk(KERN_ERR "ide-tape: %s: cleanup_module() "
- "called while still busy\n", drive->name);
- }
+ if (drive) {
+ if (idetape_cleanup(drive))
+ printk(KERN_ERR "ide-tape: %s: cleanup_module() "
+ "called while still busy\n", drive->name);
#ifdef CONFIG_PROC_FS
- if (drive->proc)
- ide_remove_proc_entries(drive->proc, idetape_proc);
+ if (drive->proc)
+ ide_remove_proc_entries(drive->proc, idetape_proc);
#endif
+ }
+ }
ide_unregister_module(&idetape_module);
}
^ permalink raw reply
* [PATCH] (4/5) notifier callback mechanism - read copy update V2
From: Stephen Hemminger @ 2002-12-19 23:07 UTC (permalink / raw)
To: vamsi, John Levon; +Cc: Linus Torvalds, Alan Cox, Kernel List
In-Reply-To: <20021219181929.A5265@in.ibm.com>
Here is third try at using RCU for notifier callbacks. The difference is
that this version has a separate version for use by kernel profile that does
it's own locking and can sleep.
diff -Nru a/include/linux/notifier.h b/include/linux/notifier.h
--- a/include/linux/notifier.h Thu Dec 19 14:51:07 2002
+++ b/include/linux/notifier.h Thu Dec 19 14:51:07 2002
@@ -25,6 +25,7 @@
extern int notifier_chain_register(struct list_head *, struct notifier_block *);
extern int notifier_chain_unregister(struct list_head *, struct notifier_block *);
extern int notifier_call_chain(struct list_head *, unsigned long, void *);
+extern int notifier_call_chain_safe(struct list_head *, unsigned long, void *);
extern int register_panic_notifier(struct notifier_block *);
extern int unregister_panic_notifier(struct notifier_block *);
diff -Nru a/kernel/profile.c b/kernel/profile.c
--- a/kernel/profile.c Thu Dec 19 14:51:07 2002
+++ b/kernel/profile.c Thu Dec 19 14:51:07 2002
@@ -55,21 +55,21 @@
void profile_exit_task(struct task_struct * task)
{
down_read(&profile_rwsem);
- notifier_call_chain(&exit_task_notifier, 0, task);
+ notifier_call_chain_safe(&exit_task_notifier, 0, task);
up_read(&profile_rwsem);
}
void profile_exit_mmap(struct mm_struct * mm)
{
down_read(&profile_rwsem);
- notifier_call_chain(&exit_mmap_notifier, 0, mm);
+ notifier_call_chain_safe(&exit_mmap_notifier, 0, mm);
up_read(&profile_rwsem);
}
void profile_exec_unmap(struct mm_struct * mm)
{
down_read(&profile_rwsem);
- notifier_call_chain(&exec_unmap_notifier, 0, mm);
+ notifier_call_chain_safe(&exec_unmap_notifier, 0, mm);
up_read(&profile_rwsem);
}
diff -Nru a/kernel/sys.c b/kernel/sys.c
--- a/kernel/sys.c Thu Dec 19 14:51:07 2002
+++ b/kernel/sys.c Thu Dec 19 14:51:07 2002
@@ -22,6 +22,7 @@
#include <linux/security.h>
#include <linux/dcookies.h>
#include <linux/suspend.h>
+#include <linux/rcupdate.h>
#include <asm/uaccess.h>
#include <asm/io.h>
@@ -78,7 +79,7 @@
*/
static LIST_HEAD(reboot_notifier_list);
-static rwlock_t notifier_lock = RW_LOCK_UNLOCKED;
+static spinlock_t notifier_lock = SPIN_LOCK_UNLOCKED;
/**
* notifier_chain_register - Add notifier to a notifier chain
@@ -95,7 +96,8 @@
struct list_head *p;
INIT_LIST_HEAD(&n->link);
- write_lock(¬ifier_lock);
+
+ spin_lock(¬ifier_lock);
list_for_each(p, list) {
struct notifier_block *e
= list_entry(p, struct notifier_block, link);
@@ -104,7 +106,7 @@
}
list_add(&n->link, p);
- write_unlock(¬ifier_lock);
+ spin_unlock(¬ifier_lock);
return 0;
}
@@ -122,15 +124,18 @@
{
struct list_head *cur;
- write_lock(¬ifier_lock);
+ spin_lock(¬ifier_lock);
list_for_each(cur, list) {
if (n == list_entry(cur, struct notifier_block, link)) {
- list_del(cur);
- write_unlock(¬ifier_lock);
+ list_del_rcu(cur);
+ spin_unlock(¬ifier_lock);
+
+ synchronize_kernel();
+
return 0;
}
}
- write_unlock(¬ifier_lock);
+ spin_unlock(¬ifier_lock);
return -ENOENT;
}
@@ -148,18 +153,62 @@
* the notifier function which halted execution.
* Otherwise, the return value is the return value
* of the last notifier function called.
+ *
+ * This might be called from NMI or other context where it
+ * is impossible to sleep or spin. The restriction is that the
+ * handler must not sleep since rcu_read_lock disables preempt.
*/
-
int notifier_call_chain(struct list_head *list, unsigned long val, void *v)
{
- struct list_head *p;
+ struct list_head *p, *nxtp;
int ret = NOTIFY_DONE;
- list_for_each(p, list) {
+ rcu_read_lock();
+ list_for_each_safe_rcu(p, nxtp, list) {
+ struct notifier_block *nb =
+ list_entry(p, struct notifier_block, link);
+
+ ret = nb->notifier_call(nb,val,v);
+
+ if (ret & NOTIFY_STOP_MASK)
+ goto end_loop;
+ }
+
+ end_loop:
+ rcu_read_unlock();
+ return ret;
+}
+
+/**
+ * notifier_call_chain_safe - Call functions in a notifier chain
+ * @n: Pointer to root pointer of notifier chain
+ * @val: Value passed unmodified to notifier function
+ * @v: Pointer passed unmodified to notifier function
+ *
+ * Calls each function in a notifier chain in turn.
+ *
+ * If the return value of the notifier can be and'd
+ * with %NOTIFY_STOP_MASK, then notifier_call_chain
+ * will return immediately, with the return value of
+ * the notifier function which halted execution.
+ * Otherwise, the return value is the return value
+ * of the last notifier function called.
+ *
+ * This differs from notifier_call_chain because it assumes
+ * that the caller has done its own mutual exclusion and
+ * does not want to use read-copy-update.
+ */
+int notifier_call_chain_safe(struct list_head *list, unsigned long val, void *v)
+{
+ struct list_head *p, *nxtp;
+ int ret = NOTIFY_DONE;
+
+ list_for_each_safe(p, nxtp, list) {
struct notifier_block *nb =
list_entry(p, struct notifier_block, link);
ret = nb->notifier_call(nb,val,v);
+
if (ret & NOTIFY_STOP_MASK)
goto end_loop;
}
^ permalink raw reply
* RE: linux-mtd digest, Vol 1 #728 - 13 msgs
From: Alex Pavloff @ 2002-12-19 23:31 UTC (permalink / raw)
To: 'linux-mtd@lists.infradead.org'
> Date: Mon, 16 Dec 2002 13:54:14 +0100
> From: Geoffroy Stevenne <geof@hellea.com>
> To: linux-mtd@lists.infradead.org
> Subject: Re: writing new BBRAM driver
> Organization: Hellea SPRl
>
>
> Hi,
>
> On Mon, 16 Dec 2002 11:14:41 +0100 (MET)
> Tobias Otto-Adamczak <toa@indakom.de> wrote:
>
> > Alex Pavloff, 2002-12-13, 15:45h:
> >
> > > Hi there folks. I've written the struct mtd_info functions for a
> > > 128KB BBRAM driver for my companies new board. It's horribly
> > > simple, as most of it is actually done by a gate array on
> the board,
> > > so from kernel land its just poking ioports. Easy stuff.
>
> Great! If it works with the versalogic board it will be tested
> here with a 512KB BBRAM. Of course I'll provide maximum feedback
> (maybe patches if any required). Thanks!
Sadly, its an integrated piece of hardware that goes onto a
power/touchscreen/bbram mezzanine board that fits directly on top of a geode
"biscuit" SBC board and connects via PC104. I'll make the source available,
but I really don't think it'll be useful to anyone else as something other
than an example.
I'm still trying to figure out some stuff.
The BBRAM formats to 122KB, which is fine. I can copy files to & from it.
Since my device can be powered down at any second, I'm might want to use a
journalling filesystem, but, well, I don't need any sort of wear levelling,
so I think jffs/2 is overkill. Shall I just run minix and just fsck the
drive on powerup or us there some sort of small non-wear-levelling yet
journalling filesystem that I could use?
Secondly: erasesize. I have to define a "erase" function (like that of the
test RAM device) and define MTD_ERASEABLE and I've got the erasesize set to
0. Is this ok? Will this be called? Should I make erase size larger for
some reason?
And lastly, while I've got you here, does anyone have any info on why
certain CompactFlash pieces don't work properly in IDE mode without file
corruption?
A range of possible theories have been proposed
1) Slow write speed of flash falling out of IDE spec
2) Crappy controller chips with IDE code that isn't up to spec
3) Linux affinity for SanDisk only, require the =flash option boot
I don't have any flash that does this, but its out there. All thoughts
appreciated.
Thanks for the great subsystem.
Alex Pavloff - apavloff@eason.com
Eason Technology -- www.eason.com
^ permalink raw reply
* PROBLEM: Oops during high ide io loads.
From: David A. Chappel @ 2002-12-19 23:05 UTC (permalink / raw)
To: linux-kernel
Oops occurs under high disk load under stock 2.4.20 kernel
(Alan's version too.)
=========================================================
Oops occurs under high disk usage. Simultaniously ripping of
one cd and creating another iso file off of an nfs share.
(oggenc, cdparanoia, mkisofs, xcdroast) I use and have ide-scsi
compiled into my kernel and have an all-ide system.
=========================================================
[root@Perky root]# cat /proc/version
Linux version 2.4.20 (root@Perky.Davids.local) (gcc version 2.96
20000731 (Red Hat Linux 7.1 2.96-98)) #11 SMP Thu Dec 19
13:00:17 MST 2002
=========================================================
I was able to get a couple pictures: ; )
http://home.attbi.com/~bobzibub/oops/oops1.jpg
http://home.attbi.com/~bobzibub/oops/oops2.jpg
Stack: 00000000 ffffffff ffffffff ffffffff ffffffff 00000001
00000000 de4c0000 de4c1e98 c02c0b95 de4c1e3c 00000001 00000001
c02dfc0c 00000000 de4c0000 de4c1e98 ffffffff ffff0018 ffff0018
ffffffef c0114425 00000010 00000282
Call Trace: [<c0115525>]
Code: f7 f1 50 e8 99 fd ff ff 8b 83 40 df 30 c0 89 83 c0 de 30
c0
<1>Unable to handle kernel paging requiest at virtual address
e0000000 printing eip:
c0209847
*pde = 00000000
=========================================================
[root@Perky root]# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 8
model name : Pentium III (Coppermine)
stepping : 6
cpu MHz : 998.374
cache size : 256 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep
mtrr pge mca cmov pat pse36 mmx fxsr sse
bogomips : 1992.29
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 8
model name : Pentium III (Coppermine)
stepping : 6
cpu MHz : 998.374
cache size : 256 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep
mtrr pge mca cmov pat pse36 mmx fxsr sse
bogomips : 1992.29
=========================================================
[root@Perky root]# cat /proc/modules
=========================================================
(The CDs/ hard drives are attached to the HPT370 not the VIA
adapter)
[root@Perky root]# cat /proc/ioports
0000-001f : dma1
0020-003f : pic1
0040-005f : timer
0060-006f : keyboard
0080-008f : dma page reg
00a0-00bf : pic2
00c0-00df : dma2
00f0-00ff : fpu
02f8-02ff : serial(auto)
0378-037a : parport0
03c0-03df : vga+
03f8-03ff : serial(auto)
0cf8-0cff : PCI conf1
5000-500f : VIA Technologies, Inc. VT82C686 [Apollo Super ACPI]
6000-607f : VIA Technologies, Inc. VT82C686 [Apollo Super ACPI]
c000-c00f : VIA Technologies, Inc. VT82C586B PIPC Bus Master IDE
c000-c007 : ide0
c008-c00f : ide1
c400-c41f : VIA Technologies, Inc. USB
c400-c41f : usb-uhci
c800-c81f : VIA Technologies, Inc. USB (#2)
c800-c81f : usb-uhci
cc00-ccff : Linksys Network Everywhere Fast Ethernet 10/100
model NC100
cc00-ccff : tulip
d000-d03f : Ensoniq 5880 AudioPCI
d000-d03f : es1371
d400-d407 : Triones Technologies, Inc. HPT366/368/370/370A/372
d400-d407 : ide2
d800-d803 : Triones Technologies, Inc. HPT366/368/370/370A/372
d802-d802 : ide2
dc00-dc07 : Triones Technologies, Inc. HPT366/368/370/370A/372
dc00-dc07 : ide3
e000-e003 : Triones Technologies, Inc. HPT366/368/370/370A/372
e002-e002 : ide3
e400-e4ff : Triones Technologies, Inc. HPT366/368/370/370A/372
e400-e407 : ide2
e408-e40f : ide3
e410-e4ff : HPT370A
=========================================================
[root@Perky root]# cat /proc/iomem
00000000-0009fbff : System RAM
0009fc00-0009ffff : reserved
000a0000-000bffff : Video RAM area
000c0000-000c7fff : Video ROM
000f0000-000fffff : System ROM
00100000-1ffeffff : System RAM
00100000-002b9a95 : Kernel code
002b9a96-0034f45f : Kernel data
1fff0000-1fff2fff : ACPI Non-volatile Storage
1fff3000-1fffffff : ACPI Tables
c0000000-cfffffff : VIA Technologies, Inc. VT82C693A/694x
[Apollo PRO133x]
d0000000-dfffffff : PCI Bus #01
d0000000-d7ffffff : nVidia Corporation NV25 [GeForce4 Ti4400]
d8000000-d807ffff : nVidia Corporation NV25 [GeForce4 Ti4400]
e0000000-e1ffffff : PCI Bus #01
e0000000-e0ffffff : nVidia Corporation NV25 [GeForce4 Ti4400]
e3000000-e30003ff : Linksys Network Everywhere Fast Ethernet
10/100 model NC100
e3000000-e30003ff : tulip
fec00000-fec00fff : reserved
fee00000-fee00fff : reserved
ffff0000-ffffffff : reserved
[root@Perky root]#
=========================================================
[root@Perky root]# lspci -vvv
bash: lspci: command not found
[root@Perky root]# /sbin/lspci -vvv
00:00.0 Host bridge: VIA Technologies, Inc. VT82C691 [Apollo
PRO] (rev c4)
Subsystem: ABIT Computer Corp.: Unknown device a204
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV-
VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium
>TAbort- <TAbort- <MAbort+ >SERR- <PERR-
Latency: 8
Region 0: Memory at c0000000 (32-bit, prefetchable)
[size=256M]
Capabilities: [a0] AGP version 2.0
Status: RQ=31 SBA+ 64bit- FW+ Rate=x1,x2
Command: RQ=0 SBA- AGP- 64bit- FW- Rate=<none>
Capabilities: [c0] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00:01.0 PCI bridge: VIA Technologies, Inc. VT82C598/694x [Apollo
MVP3/Pro133x AGP] (prog-if 00 [Normal decode])
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV-
VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium
>TAbort- <TAbort- <MAbort+ >SERR- <PERR-
Latency: 0
Bus: primary=00, secondary=01, subordinate=01,
sec-latency=0
I/O behind bridge: 0000f000-00000fff
Memory behind bridge: e0000000-e1ffffff
Prefetchable memory behind bridge: d0000000-dfffffff
BridgeCtl: Parity- SERR- NoISA+ VGA+ MAbort- >Reset-
FastB2B-
Capabilities: [80] Power Management version 2
Flags: PMEClk- DSI- D1+ D2- AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00:07.0 ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo
Super South] (rev 40)
Subsystem: ABIT Computer Corp.: Unknown device 0000
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV-
VGASnoop- ParErr- Stepping+ SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium
>TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 0
Capabilities: [c0] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00:07.1 IDE interface: VIA Technologies, Inc. Bus Master IDE
(rev 06) (prog-if 8a [Master SecP PriP])
Subsystem: VIA Technologies, Inc. Bus Master IDE
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV-
VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium
>TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 32
Region 4: I/O ports at c000 [size=16]
Capabilities: [c0] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00:07.2 USB Controller: VIA Technologies, Inc. UHCI USB (rev 16)
(prog-if 00 [UHCI])
Subsystem: Unknown device 0925:1234
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV-
VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium
>TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 32, cache line size 08
Interrupt: pin D routed to IRQ 19
Region 4: I/O ports at c400 [size=32]
Capabilities: [80] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00:07.3 USB Controller: VIA Technologies, Inc. UHCI USB (rev 16)
(prog-if 00 [UHCI])
Subsystem: Unknown device 0925:1234
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV-
VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium
>TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 32, cache line size 08
Interrupt: pin D routed to IRQ 19
Region 4: I/O ports at c800 [size=32]
Capabilities: [80] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00:07.4 Bridge: VIA Technologies, Inc. VT82C686 [Apollo Super
ACPI] (rev 40)
Control: I/O- Mem- BusMaster- SpecCycle- MemWINV-
VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium
>TAbort- <TAbort- <MAbort- >SERR- <PERR-
Interrupt: pin ? routed to IRQ 11
Capabilities: [68] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00:0b.0 Ethernet controller: Bridgecom, Inc: Unknown device 0985
(rev 11)
Subsystem: Bridgecom, Inc: Unknown device 0574
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV-
VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium
>TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 32 (63750ns min, 63750ns max), cache line size
08
Interrupt: pin A routed to IRQ 17
Region 0: I/O ports at cc00 [size=256]
Region 1: Memory at e3000000 (32-bit, non-prefetchable)
[size=1K]
Expansion ROM at <unassigned> [disabled] [size=128K]
Capabilities: [c0] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=100mA
PME(D0+,D1+,D2+,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00:0c.0 Multimedia audio controller: Ensoniq CT5880 [AudioPCI]
(rev 02)
Subsystem: Ensoniq: Unknown device 8001
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV-
VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=slow
>TAbort- <TAbort- <MAbort+ >SERR- <PERR-
Latency: 32 (3000ns min, 32000ns max)
Interrupt: pin A routed to IRQ 19
Region 0: I/O ports at d000 [size=64]
Capabilities: [dc] Power Management version 1
Flags: PMEClk- DSI+ D1- D2+ AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00:0e.0 Unknown mass storage controller: HighPoint Technologies,
Inc. HPT366/370 UltraDMA 66/100 IDE Controller (rev 04)
Subsystem: HighPoint Technologies, Inc.: Unknown device
0001
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV-
VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium
>TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 120 (2000ns min, 2000ns max), cache line size
08
Interrupt: pin A routed to IRQ 18
Region 0: I/O ports at d400 [size=8]
Region 1: I/O ports at d800 [size=4]
Region 2: I/O ports at dc00 [size=8]
Region 3: I/O ports at e000 [size=4]
Region 4: I/O ports at e400 [size=256]
Expansion ROM at <unassigned> [disabled] [size=128K]
Capabilities: [60] Power Management version 2
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
01:00.0 VGA compatible controller: nVidia Corporation: Unknown
device 0251 (rev a2) (prog-if 00 [VGA])
Subsystem: VISIONTEK: Unknown device 003c
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV-
VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz+ UDF- FastB2B+ ParErr- DEVSEL=medium
>TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 248 (1250ns min, 250ns max)
Interrupt: pin A routed to IRQ 16
Region 0: Memory at e0000000 (32-bit, non-prefetchable)
[size=16M]
Region 1: Memory at d0000000 (32-bit, prefetchable)
[size=128M]
Region 2: Memory at d8000000 (32-bit, prefetchable)
[size=512K]
Expansion ROM at <unassigned> [disabled] [size=128K]
Capabilities: [60] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [44] AGP version 2.0
Status: RQ=31 SBA+ 64bit- FW+ Rate=x1,x2
Command: RQ=0 SBA- AGP- 64bit- FW- Rate=<none>
[root@Perky root]#
=========================================================
<Extract from System.map>
c0208a30 T ide_scan_pio_blacklist
c0208ab0 T ide_get_best_pio_mode
c0208c10 t init_hwif_data
c0208de0 T drive_is_flashcard
c0208f10 T ide_system_bus_speed
c0208f80 T ide_input_data <-------------------
c0209060 T ide_output_data
c0209130 T atapi_input_bytes
c02091a0 T atapi_output_bytes
c0209210 T drive_is_ready
c0209260 T ide_end_request
c0209370 T ide_set_handler
c0209450 T current_capacity
c0209480 T ide_geninit
c0209510 t atapi_reset_pollfunc
c02095e0 t reset_pollfunc
c0209740 t check_dma_crc
c02097c0 t pre_reset
=========================================================
(gdb) disassemble ide_input_data
Dump of assembler code for function ide_input_data:
0xc0208f80 <ide_input_data>: push %ebp
0xc0208f81 <ide_input_data+1>: mov %esp,%ebp
0xc0208f83 <ide_input_data+3>: push %edi
0xc0208f84 <ide_input_data+4>: push %esi
0xc0208f85 <ide_input_data+5>: push %ebx
0xc0208f86 <ide_input_data+6>: sub $0xc,%esp
0xc0208f89 <ide_input_data+9>: mov 0x8(%ebp),%esi
0xc0208f8c <ide_input_data+12>: mov 0xc(%ebp),%edi
0xc0208f8f <ide_input_data+15>: mov 0x10(%ebp),%ebx
0xc0208f92 <ide_input_data+18>: mov 0xfc(%esi),%edx
0xc0208f98 <ide_input_data+24>: mov 0x320(%edx),%eax
0xc0208f9e <ide_input_data+30>: mov %edx,%ecx
0xc0208fa0 <ide_input_data+32>: test %eax,%eax
0xc0208fa2 <ide_input_data+34>: je 0xc0208fb0
<ide_input_data+48>
0xc0208fa4 <ide_input_data+36>: push %ebx
0xc0208fa5 <ide_input_data+37>: push %edi
0xc0208fa6 <ide_input_data+38>: push %esi
0xc0208fa7 <ide_input_data+39>: push $0x0
0xc0208fa9 <ide_input_data+41>: call *%eax
0xc0208fab <ide_input_data+43>: jmp 0xc020904a
<ide_input_data+202>
0xc0208fb0 <ide_input_data+48>: movzbl 0xd5(%esi),%eax
0xc0208fb7 <ide_input_data+55>: test %al,%al
0xc0208fb9 <ide_input_data+57>: je 0xc0208ff0
<ide_input_data+112>
0xc0208fbb <ide_input_data+59>: and $0x2,%eax
0xc0208fbe <ide_input_data+62>: je 0xc0208fe0
<ide_input_data+96>
0xc0208fc0 <ide_input_data+64>: pushf
0xc0208fc1 <ide_input_data+65>: popl 0xffffffe8(%ebp)
0xc0208fc4 <ide_input_data+68>: cli
0xc0208fc5 <ide_input_data+69>: mov 0xfc(%esi),%esi
0xc0208fcb <ide_input_data+75>: movzwl 0xc(%esi),%edx
0xc0208fcf <ide_input_data+79>: in (%dx),%al
0xc0208fd0 <ide_input_data+80>: in (%dx),%al
0xc0208fd1 <ide_input_data+81>: in (%dx),%al
0xc0208fd2 <ide_input_data+82>: movzwl 0x8(%esi),%edx
0xc0208fd6 <ide_input_data+86>: mov %ebx,%ecx
0xc0208fd8 <ide_input_data+88>: repz insl (%dx),%es:(%edi)
0xc0208fda <ide_input_data+90>: pushl 0xffffffe8(%ebp)
0xc0208fdd <ide_input_data+93>: popf
0xc0208fde <ide_input_data+94>: jmp 0xc020904a
<ide_input_data+202>
0xc0208fe0 <ide_input_data+96>: movzwl 0x8(%edx),%edx
0xc0208fe4 <ide_input_data+100>: mov %ebx,%ecx
0xc0208fe6 <ide_input_data+102>: repz insl (%dx),%es:(%edi)
0xc0208fe8 <ide_input_data+104>: jmp 0xc020904a
<ide_input_data+202>
0xc0208fea <ide_input_data+106>: lea 0x0(%esi),%esi
0xc0208ff0 <ide_input_data+112>: cmpb $0x0,0xba(%esi)
0xc0208ff7 <ide_input_data+119>: je 0xc0209040
<ide_input_data+192>
0xc0208ff9 <ide_input_data+121>: dec %ebx
0xc0208ffa <ide_input_data+122>: cmp $0xffffffff,%ebx
0xc0208ffd <ide_input_data+125>: je 0xc020904a
<ide_input_data+202>
0xc0208fff <ide_input_data+127>: jmp 0xc0209010
<ide_input_data+144>
0xc0209001 <ide_input_data+129>: mov 0xfc(%esi),%ecx
0xc0209007 <ide_input_data+135>: mov %esi,%esi
0xc0209009 <ide_input_data+137>: lea 0x0(%edi,1),%edi
0xc0209010 <ide_input_data+144>: movzwl 0x8(%ecx),%edx
0xc0209014 <ide_input_data+148>: in (%dx),%ax
0xc0209016 <ide_input_data+150>: out %al,$0x80
0xc0209018 <ide_input_data+152>: mov %ax,(%edi)
0xc020901b <ide_input_data+155>: add $0x2,%edi
0xc020901e <ide_input_data+158>: mov 0xfc(%esi),%eax
0xc0209024 <ide_input_data+164>: movzwl 0x8(%eax),%edx
0xc0209028 <ide_input_data+168>: in (%dx),%ax
0xc020902a <ide_input_data+170>: out %al,$0x80
0xc020902c <ide_input_data+172>: mov %ax,(%edi)
0xc020902f <ide_input_data+175>: dec %ebx
0xc0209030 <ide_input_data+176>: add $0x2,%edi
0xc0209033 <ide_input_data+179>: cmp $0xffffffff,%ebx
0xc0209036 <ide_input_data+182>: jne 0xc0209001
<ide_input_data+129>
0xc0209038 <ide_input_data+184>: jmp 0xc020904a
<ide_input_data+202>
0xc020903a <ide_input_data+186>: lea 0x0(%esi),%esi
0xc0209040 <ide_input_data+192>: movzwl 0x8(%edx),%edx
0xc0209044 <ide_input_data+196>: lea (%ebx,%ebx,1),%ecx
0xc0209047 <ide_input_data+199>: repz insw (%dx),%es:(%edi)
0xc020904a <ide_input_data+202>: lea 0xfffffff4(%ebp),%esp
0xc020904d <ide_input_data+205>: pop %ebx
0xc020904e <ide_input_data+206>: pop %esi
0xc020904f <ide_input_data+207>: pop %edi
0xc0209050 <ide_input_data+208>: pop %ebp
0xc0209051 <ide_input_data+209>: ret
End of assembler dump.
=========================================================
I was running TOP remotely at the time too...
1:44pm up 16 min, 4 users, load average: 2.10, 1.78, 1.02
53 processes: 50 sleeping, 3 running, 0 zombie, 0 stopped
CPU0 states: 56.0% user, 26.2% system, 55.1% nice, 16.4% idle
CPU1 states: 24.5% user, 30.3% system, 23.3% nice, 44.2% idle
Mem: 515348K av, 484460K used, 30888K free, 0K shrd,
22104K buff
Swap: 409616K av, 0K used, 409616K free
423944K cached
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME
COMMAND
[garbled due to disconnect] 0 2004 2004 824 R N 97.9 0.3
0:17 oggenc
5519 root 15 10 2608 2576 504 S N 7.5 0.4 0:01
cdparanoia
5520 root 9 0 4020 4020 3224 S 2.1 0.7 0:00
gaim
2967 root 9 0 848 848 560 D 1.5 0.1 0:11
mkisofs
2463 root 9 0 5160 5160 3084 R 1.1 1.0 0:03
xcdroast
2347 root 9 0 2336 2316 1700 S 0.9 0.4 0:01
sshd
3269 root 9 0 1040 1040 836 R 0.3 0.2 0:01
top
12 root 9 0 0 0 0 SW 0.1 0.0 0:00
kjournald
904 root 9 0 1804 1804 1296 S 0.1 0.3 0:00
cupsd
1 root 8 0 520 520 452 S 0.0 0.1 0:04
init
2 root 9 0 0 0 0 SW 0.0 0.0 0:00
keventd
3 root 18 19 0 0 0 SWN 0.0 0.0 0:00
ksoftirqd_CPU0
4 root 18 19 0 0 0 SWN 0.0 0.0 0:00
ksoftirqd_CPU1
5 root 9 0 0 0 0 SW 0.0 0.0 0:00
kswapd
6 root 9 0 0 0 0 SW 0.0 0.0 0:00
bdflush
=========================================================
Please let me know if you'd like me to reproduce it and follow
some procedure.
Thanks!
-bobzibub
^ permalink raw reply
* Re: [PATCH/RFC] New module refcounting for net_proto_family
From: Jean Tourrilhes @ 2002-12-19 23:08 UTC (permalink / raw)
To: Linux kernel mailing list, Max Krasnyansky
Max Krasnyansky wrote :
> Ok. Drop me a note and I'll push this stuff to BK were you can pull from.
> In the mean time I'll go bug other folks :). I want to do same kinda changes
> for the TTY ldisc code.
>
> Max
Go for it, I've got the exact same problem with IrDA (both
socket and tty ldisc). Maybe worth sending an entry for the FAQ of
Rusty and include PPP maintainer in the loop.
Have fun...
Jean
P.S. : Talking about it, I'm away for Chrismas & New-Year...
^ permalink raw reply
* [PATCH] (5/5) improved notifier callback mechanism -- remove old locking V2
From: Stephen Hemminger @ 2002-12-19 23:09 UTC (permalink / raw)
To: vamsi, John Levon; +Cc: Linus Torvalds, Alan Cox, Kernel List
In-Reply-To: <20021219181929.A5265@in.ibm.com>
After the previous patches, the notifier interface now has it's own
locking. Therefore the existing locking done by the oprofile interface
is superfluous.
diff -Nru a/arch/i386/kernel/profile.c b/arch/i386/kernel/profile.c
--- a/arch/i386/kernel/profile.c Tue Dec 17 11:25:47 2002
+++ b/arch/i386/kernel/profile.c Tue Dec 17 11:25:47 2002
@@ -6,40 +6,25 @@
*/
#include <linux/profile.h>
-#include <linux/spinlock.h>
#include <linux/notifier.h>
#include <linux/irq.h>
#include <asm/hw_irq.h>
static LIST_HEAD(profile_listeners);
-static rwlock_t profile_lock = RW_LOCK_UNLOCKED;
int register_profile_notifier(struct notifier_block * nb)
{
- int err;
- write_lock_irq(&profile_lock);
- err = notifier_chain_register(&profile_listeners, nb);
- write_unlock_irq(&profile_lock);
- return err;
+ return notifier_chain_register(&profile_listeners, nb);
}
int unregister_profile_notifier(struct notifier_block * nb)
{
- int err;
- write_lock_irq(&profile_lock);
- err = notifier_chain_unregister(&profile_listeners, nb);
- write_unlock_irq(&profile_lock);
- return err;
+ return notifier_chain_unregister(&profile_listeners, nb);
}
void x86_profile_hook(struct pt_regs * regs)
{
- /* we would not even need this lock if
- * we had a global cli() on register/unregister
- */
- read_lock(&profile_lock);
notifier_call_chain(&profile_listeners, 0, regs);
- read_unlock(&profile_lock);
}
^ permalink raw reply
* Type confusion in fbcon
From: Russell King @ 2002-12-19 23:14 UTC (permalink / raw)
To: Linux Kernel List, linux-fbdev-devel
I'm in the midst of porting sa1100fb over to the new fb API, and I stumbled
across an apparant confusion over the type of fb_info->pseudo_palette.
Some code appears to think its an unsigned long, others think its u32.
This doesn't make much difference when sizeof(unsigned long) == sizeof(u32)
but this isn't always the case (eg, 64-bit architectures).
I'll get back to bashing the sa1100fb driver to work out why fbcon is
producing a _completely_ blank display, despite characters being written
to it.
--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
^ permalink raw reply
* Re: BUG: 2.5.52-bk4
From: Colin Slater @ 2002-12-19 23:19 UTC (permalink / raw)
To: Lukas Hejtmanek; +Cc: linux-kernel
> If I try to open (to view) /proc/net/tcp in midnight commander then
> the midnight commander freezes in kernel (cannot be killed) with 99%
> CPU usage.
> I do not see any disk_io line in /proc/stat although I have /dev/hda
> as primary disk. Maybe because I'm using boot_off first and
> ide=reverse. So real /dev/hda does not exist and /dev/hde is as
> /dev/hda.
I've been having a bit of trouble with /proc/net/tcp too. This patch
seemed to work for me. If this works then it's time to bug Arnaldo
some more.
Colin
===== af_inet.c 1.36 vs edited =====
--- 1.36/net/ipv4/af_inet.c Sun Nov 24 20:15:49 2002
+++ edited/af_inet.c Thu Dec 19 18:09:38 2002
@@ -1163,8 +1163,7 @@
extern int ip_misc_proc_init(void);
extern int raw_proc_init(void);
extern void raw_proc_exit(void);
-extern int tcp_proc_init(void);
-extern void tcp_proc_exit(void);
+extern int tcp_get_info(char *buffer, char **start, off_t offset, int length);
extern int udp_proc_init(void);
extern void udp_proc_exit(void);
@@ -1174,7 +1173,7 @@
if (raw_proc_init())
goto out_raw;
- if (tcp_proc_init())
+ if (!proc_net_create("tcp", 0, tcp_get_info))
goto out_tcp;
if (udp_proc_init())
goto out_udp;
@@ -1189,7 +1188,7 @@
out_fib:
udp_proc_exit();
out_udp:
- tcp_proc_exit();
+ proc_net_remove("tcp");
out_tcp:
raw_proc_exit();
out_raw:
===== tcp_ipv4.c 1.37 vs edited =====
--- 1.37/net/ipv4/tcp_ipv4.c Sat Nov 23 20:49:20 2002
+++ edited/tcp_ipv4.c Thu Dec 19 18:09:40 2002
@@ -69,8 +69,6 @@
#include <linux/inet.h>
#include <linux/ipv6.h>
#include <linux/stddef.h>
-#include <linux/proc_fs.h>
-#include <linux/seq_file.h>
extern int sysctl_ip_dynaddr;
extern int sysctl_ip_default_ttl;
@@ -2133,295 +2131,7 @@
return 0;
}
-#ifdef CONFIG_PROC_FS
/* Proc filesystem TCP sock list dumping. */
-
-enum tcp_seq_states {
- TCP_SEQ_STATE_LISTENING,
- TCP_SEQ_STATE_OPENREQ,
- TCP_SEQ_STATE_ESTABLISHED,
- TCP_SEQ_STATE_TIME_WAIT,
-};
-
-struct tcp_iter_state {
- enum tcp_seq_states state;
- struct sock *syn_wait_sk;
- int bucket, sbucket, num, uid;
-};
-
-static void *listening_get_first(struct seq_file *seq)
-{
- struct tcp_iter_state* st = seq->private;
- void *rc = NULL;
-
- for (st->bucket = 0; st->bucket < TCP_LHTABLE_SIZE; ++st->bucket) {
- struct open_request *req;
- struct tcp_opt *tp;
- struct sock *sk = tcp_listening_hash[st->bucket];
-
- if (!sk)
- continue;
- ++st->num;
- if (TCP_INET_FAMILY(sk->family)) {
- rc = sk;
- goto out;
- }
- tp = tcp_sk(sk);
- read_lock_bh(&tp->syn_wait_lock);
- if (tp->listen_opt && tp->listen_opt->qlen) {
- st->uid = sock_i_uid(sk);
- st->syn_wait_sk = sk;
- st->state = TCP_SEQ_STATE_OPENREQ;
- for (st->sbucket = 0; st->sbucket < TCP_SYNQ_HSIZE;
- ++st->sbucket) {
- for (req = tp->listen_opt->syn_table[st->sbucket];
- req; req = req->dl_next, ++st->num) {
- if (!TCP_INET_FAMILY(req->class->family))
- continue;
- rc = req;
- goto out;
- }
- }
- st->state = TCP_SEQ_STATE_LISTENING;
- }
- read_unlock_bh(&tp->syn_wait_lock);
- }
-out:
- return rc;
-}
-
-static void *listening_get_next(struct seq_file *seq, void *cur)
-{
- struct tcp_opt *tp;
- struct sock *sk = cur;
- struct tcp_iter_state* st = seq->private;
-
- if (st->state == TCP_SEQ_STATE_OPENREQ) {
- struct open_request *req = cur;
-
- tp = tcp_sk(st->syn_wait_sk);
- req = req->dl_next;
- while (1) {
- while (req) {
- ++st->num;
- if (TCP_INET_FAMILY(req->class->family)) {
- cur = req;
- goto out;
- }
- req = req->dl_next;
- }
- if (++st->sbucket >= TCP_SYNQ_HSIZE)
- break;
-get_req:
- req = tp->listen_opt->syn_table[st->sbucket];
- }
- sk = st->syn_wait_sk->next;
- st->state = TCP_SEQ_STATE_LISTENING;
- read_unlock_bh(&tp->syn_wait_lock);
- } else
- sk = sk->next;
-get_sk:
- while (sk) {
- if (TCP_INET_FAMILY(sk->family)) {
- cur = sk;
- goto out;
- }
- tp = tcp_sk(sk);
- read_lock_bh(&tp->syn_wait_lock);
- if (tp->listen_opt && tp->listen_opt->qlen) {
- st->uid = sock_i_uid(sk);
- st->syn_wait_sk = sk;
- st->state = TCP_SEQ_STATE_OPENREQ;
- st->sbucket = 0;
- goto get_req;
- }
- read_unlock_bh(&tp->syn_wait_lock);
- }
- if (++st->bucket < TCP_LHTABLE_SIZE) {
- sk = tcp_listening_hash[st->bucket];
- goto get_sk;
- }
- cur = NULL;
-out:
- return cur;
-}
-
-static void *listening_get_idx(struct seq_file *seq, loff_t *pos)
-{
- void *rc = listening_get_first(seq);
-
- if (rc)
- while (*pos && (rc = listening_get_next(seq, rc)))
- --*pos;
- return *pos ? NULL : rc;
-}
-
-static void *established_get_first(struct seq_file *seq)
-{
- struct tcp_iter_state* st = seq->private;
- void *rc = NULL;
-
- for (st->bucket = 0; st->bucket < tcp_ehash_size; ++st->bucket) {
- struct sock *sk;
- struct tcp_tw_bucket *tw;
-
- read_lock(&tcp_ehash[st->bucket].lock);
- for (sk = tcp_ehash[st->bucket].chain; sk;
- sk = sk->next, ++st->num) {
- if (!TCP_INET_FAMILY(sk->family))
- continue;
- rc = sk;
- goto out;
- }
- st->state = TCP_SEQ_STATE_TIME_WAIT;
- for (tw = (struct tcp_tw_bucket *)
- tcp_ehash[st->bucket + tcp_ehash_size].chain;
- tw; tw = (struct tcp_tw_bucket *)tw->next, ++st->num) {
- if (!TCP_INET_FAMILY(tw->family))
- continue;
- rc = tw;
- goto out;
- }
- read_unlock(&tcp_ehash[st->bucket].lock);
- st->state = TCP_SEQ_STATE_ESTABLISHED;
- }
-out:
- return rc;
-}
-
-static void *established_get_next(struct seq_file *seq, void *cur)
-{
- struct sock *sk = cur;
- struct tcp_tw_bucket *tw;
- struct tcp_iter_state* st = seq->private;
-
- if (st->state == TCP_SEQ_STATE_TIME_WAIT) {
- tw = cur;
- tw = (struct tcp_tw_bucket *)tw->next;
-get_tw:
- while (tw && !TCP_INET_FAMILY(tw->family)) {
- ++st->num;
- tw = (struct tcp_tw_bucket *)tw->next;
- }
- if (tw) {
- cur = tw;
- goto out;
- }
- read_unlock(&tcp_ehash[st->bucket].lock);
- st->state = TCP_SEQ_STATE_ESTABLISHED;
- if (++st->bucket < tcp_ehash_size) {
- read_lock(&tcp_ehash[st->bucket].lock);
- sk = tcp_ehash[st->bucket].chain;
- } else {
- cur = NULL;
- goto out;
- }
- } else
- sk = sk->next;
-
- while (sk && !TCP_INET_FAMILY(sk->family)) {
- ++st->num;
- sk = sk->next;
- }
- if (!sk) {
- st->state = TCP_SEQ_STATE_TIME_WAIT;
- tw = (struct tcp_tw_bucket *)
- tcp_ehash[st->bucket + tcp_ehash_size].chain;
- goto get_tw;
- }
- cur = sk;
-out:
- return cur;
-}
-
-static void *established_get_idx(struct seq_file *seq, loff_t pos)
-{
- void *rc = established_get_first(seq);
-
- if (rc)
- while (pos && (rc = established_get_next(seq, rc)))
- --pos;
- return pos ? NULL : rc;
-}
-
-static void *tcp_get_idx(struct seq_file *seq, loff_t pos)
-{
- void *rc;
- struct tcp_iter_state* st = seq->private;
-
- tcp_listen_lock();
- st->state = TCP_SEQ_STATE_LISTENING;
- rc = listening_get_idx(seq, &pos);
-
- if (!rc) {
- tcp_listen_unlock();
- local_bh_disable();
- st->state = TCP_SEQ_STATE_ESTABLISHED;
- rc = established_get_idx(seq, pos);
- }
-
- return rc;
-}
-
-static void *tcp_seq_start(struct seq_file *seq, loff_t *pos)
-{
- return *pos ? tcp_get_idx(seq, *pos - 1) : (void *)1;
-}
-
-static void *tcp_seq_next(struct seq_file *seq, void *v, loff_t *pos)
-{
- void *rc = NULL;
- struct tcp_iter_state* st;
-
- if (v == (void *)1) {
- rc = tcp_get_idx(seq, 0);
- goto out;
- }
- st = seq->private;
-
- switch (st->state) {
- case TCP_SEQ_STATE_OPENREQ:
- case TCP_SEQ_STATE_LISTENING:
- rc = listening_get_next(seq, v);
- if (!rc) {
- tcp_listen_unlock();
- local_bh_disable();
- st->state = TCP_SEQ_STATE_ESTABLISHED;
- rc = established_get_first(seq);
- }
- break;
- case TCP_SEQ_STATE_ESTABLISHED:
- case TCP_SEQ_STATE_TIME_WAIT:
- rc = established_get_next(seq, v);
- break;
- }
-out:
- ++*pos;
- return rc;
-}
-
-static void tcp_seq_stop(struct seq_file *seq, void *v)
-{
- struct tcp_iter_state* st = seq->private;
-
- switch (st->state) {
- case TCP_SEQ_STATE_OPENREQ:
- if (v) {
- struct tcp_opt *tp = tcp_sk(st->syn_wait_sk);
- read_unlock_bh(&tp->syn_wait_lock);
- }
- case TCP_SEQ_STATE_LISTENING:
- tcp_listen_unlock();
- break;
- case TCP_SEQ_STATE_TIME_WAIT:
- case TCP_SEQ_STATE_ESTABLISHED:
- if (v)
- read_unlock(&tcp_ehash[st->bucket].lock);
- local_bh_enable();
- break;
- }
-}
-
static void get_openreq(struct sock *sk, struct open_request *req,
char *tmpbuf, int i, int uid)
{
@@ -2509,89 +2219,137 @@
#define TMPSZ 150
-static int tcp_seq_show(struct seq_file *seq, void *v)
+int tcp_get_info(char *buffer, char **start, off_t offset, int length)
{
- struct tcp_iter_state* st;
+ int len = 0, num = 0, i;
+ off_t begin, pos = 0;
char tmpbuf[TMPSZ + 1];
- if (v == (void *)1) {
- seq_printf(seq, "%-*s\n", TMPSZ - 1,
- " sl local_address rem_address st tx_queue "
- "rx_queue tr tm->when retrnsmt uid timeout "
- "inode");
- goto out;
- }
- st = seq->private;
+ if (offset < TMPSZ)
+ len += sprintf(buffer, "%-*s\n", TMPSZ - 1,
+ " sl local_address rem_address st tx_queue "
+ "rx_queue tr tm->when retrnsmt uid timeout "
+ "inode");
- switch (st->state) {
- case TCP_SEQ_STATE_LISTENING:
- case TCP_SEQ_STATE_ESTABLISHED:
- get_tcp_sock(v, tmpbuf, st->num);
- break;
- case TCP_SEQ_STATE_OPENREQ:
- get_openreq(st->syn_wait_sk, v, tmpbuf, st->num, st->uid);
- break;
- case TCP_SEQ_STATE_TIME_WAIT:
- get_timewait_sock(v, tmpbuf, st->num);
- break;
- }
- seq_printf(seq, "%-*s\n", TMPSZ - 1, tmpbuf);
-out:
- return 0;
-}
+ pos = TMPSZ;
-static struct seq_operations tcp_seq_ops = {
- .start = tcp_seq_start,
- .next = tcp_seq_next,
- .stop = tcp_seq_stop,
- .show = tcp_seq_show,
-};
+ /* First, walk listening socket table. */
+ tcp_listen_lock();
+ for (i = 0; i < TCP_LHTABLE_SIZE; i++) {
+ struct sock *sk;
+ struct tcp_listen_opt *lopt;
+ int k;
-static int tcp_seq_open(struct inode *inode, struct file *file)
-{
- struct seq_file *seq;
- int rc = -ENOMEM;
- struct tcp_iter_state *s = kmalloc(sizeof(*s), GFP_KERNEL);
+ for (sk = tcp_listening_hash[i]; sk; sk = sk->next, num++) {
+ struct open_request *req;
+ int uid;
+ struct tcp_opt *tp = tcp_sk(sk);
- if (!s)
- goto out;
- rc = seq_open(file, &tcp_seq_ops);
- if (rc)
- goto out_kfree;
- seq = file->private_data;
- seq->private = s;
- memset(s, 0, sizeof(*s));
-out:
- return rc;
-out_kfree:
- kfree(s);
- goto out;
-}
+ if (!TCP_INET_FAMILY(sk->family))
+ goto skip_listen;
-static struct file_operations tcp_seq_fops = {
- .open = tcp_seq_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = ip_seq_release,
-};
+ pos += TMPSZ;
+ if (pos >= offset) {
+ get_tcp_sock(sk, tmpbuf, num);
+ len += sprintf(buffer + len, "%-*s\n",
+ TMPSZ - 1, tmpbuf);
+ if (pos >= offset + length) {
+ tcp_listen_unlock();
+ goto out_no_bh;
+ }
+ }
-int __init tcp_proc_init(void)
-{
- int rc = 0;
- struct proc_dir_entry *p = create_proc_entry("tcp", S_IRUGO, proc_net);
+skip_listen:
+ uid = sock_i_uid(sk);
+ read_lock_bh(&tp->syn_wait_lock);
+ lopt = tp->listen_opt;
+ if (lopt && lopt->qlen) {
+ for (k = 0; k < TCP_SYNQ_HSIZE; k++) {
+ for (req = lopt->syn_table[k];
+ req; req = req->dl_next, num++) {
+ if (!TCP_INET_FAMILY(req->class->family))
+ continue;
+
+ pos += TMPSZ;
+ if (pos <= offset)
+ continue;
+ get_openreq(sk, req, tmpbuf,
+ num, uid);
+ len += sprintf(buffer + len,
+ "%-*s\n",
+ TMPSZ - 1,
+ tmpbuf);
+ if (pos >= offset + length) {
+ read_unlock_bh(&tp->syn_wait_lock);
+ tcp_listen_unlock();
+ goto out_no_bh;
+ }
+ }
+ }
+ }
+ read_unlock_bh(&tp->syn_wait_lock);
- if (p)
- p->proc_fops = &tcp_seq_fops;
- else
- rc = -ENOMEM;
- return rc;
-}
+ /* Completed requests are in normal socket hash table */
+ }
+ }
+ tcp_listen_unlock();
-void __init tcp_proc_exit(void)
-{
- remove_proc_entry("tcp", proc_net);
+ local_bh_disable();
+
+ /* Next, walk established hash chain. */
+ for (i = 0; i < tcp_ehash_size; i++) {
+ struct tcp_ehash_bucket *head = &tcp_ehash[i];
+ struct sock *sk;
+ struct tcp_tw_bucket *tw;
+
+ read_lock(&head->lock);
+ for (sk = head->chain; sk; sk = sk->next, num++) {
+ if (!TCP_INET_FAMILY(sk->family))
+ continue;
+ pos += TMPSZ;
+ if (pos <= offset)
+ continue;
+ get_tcp_sock(sk, tmpbuf, num);
+ len += sprintf(buffer + len, "%-*s\n",
+ TMPSZ - 1, tmpbuf);
+ if (pos >= offset + length) {
+ read_unlock(&head->lock);
+ goto out;
+ }
+ }
+ for (tw = (struct tcp_tw_bucket *)tcp_ehash[i +
+ tcp_ehash_size].chain;
+ tw;
+ tw = (struct tcp_tw_bucket *)tw->next, num++) {
+ if (!TCP_INET_FAMILY(tw->family))
+ continue;
+ pos += TMPSZ;
+ if (pos <= offset)
+ continue;
+ get_timewait_sock(tw, tmpbuf, num);
+ len += sprintf(buffer + len, "%-*s\n",
+ TMPSZ - 1, tmpbuf);
+ if (pos >= offset + length) {
+ read_unlock(&head->lock);
+ goto out;
+ }
+ }
+ read_unlock(&head->lock);
+ }
+
+out:
+ local_bh_enable();
+out_no_bh:
+
+ begin = len - (pos - offset);
+ *start = buffer + begin;
+ len -= begin;
+ if (len > length)
+ len = length;
+ if (len < 0)
+ len = 0;
+ return len;
}
-#endif /* CONFIG_PROC_FS */
struct proto tcp_prot = {
.name = "TCP",
^ permalink raw reply
* [parisc-linux] patch to unaligned.c
From: LaMont Jones @ 2002-12-19 23:09 UTC (permalink / raw)
To: parisc-linux
The patch below fixes base register modificiation in the unaligned
load/store code. It still doesn't do floating point load/stores, and
I'll work on those later. In the meantime, this will deal with lots
of issues around base reg modification not happening.
Part of the unrolling is a precursor to adding floating point stuff.
lamont
Index: arch/parisc/kernel/unaligned.c
===================================================================
RCS file: /var/cvs/linux/arch/parisc/kernel/unaligned.c,v
retrieving revision 1.11
diff -u -r1.11 unaligned.c
--- arch/parisc/kernel/unaligned.c 24 Sep 2002 05:52:46 -0000 1.11
+++ arch/parisc/kernel/unaligned.c 19 Dec 2002 23:00:36 -0000
@@ -66,28 +66,28 @@
#define OPCODE3_MASK OPCODE3(0x3f,1)
#define OPCODE4_MASK OPCODE4(0x3f)
-/* skip LDB (index) */
+/* skip LDB - never unaligned (index) */
#define OPCODE_LDH_I OPCODE1(0x03,0,0x1)
#define OPCODE_LDW_I OPCODE1(0x03,0,0x2)
#define OPCODE_LDD_I OPCODE1(0x03,0,0x3)
#define OPCODE_LDDA_I OPCODE1(0x03,0,0x4)
-/* skip LDCD (index) */
+#define OPCODE_LDCD_I OPCODE1(0x03,0,0x5)
#define OPCODE_LDWA_I OPCODE1(0x03,0,0x6)
-/* skip LDCW (index) */
-/* skip LDB (short) */
+#define OPCODE_LDCW_I OPCODE1(0x03,0,0x7)
+/* skip LDB - never unaligned (short) */
#define OPCODE_LDH_S OPCODE1(0x03,1,0x1)
#define OPCODE_LDW_S OPCODE1(0x03,1,0x2)
#define OPCODE_LDD_S OPCODE1(0x03,1,0x3)
#define OPCODE_LDDA_S OPCODE1(0x03,1,0x4)
-/* skip LDCD (short) */
+#define OPCODE_LDCD_S OPCODE1(0x03,1,0x5)
#define OPCODE_LDWA_S OPCODE1(0x03,1,0x6)
-/* skip LDCW (short) */
-/* skip STB */
+#define OPCODE_LDCW_S OPCODE1(0x03,1,0x7)
+/* skip STB - never unaligned */
#define OPCODE_STH OPCODE1(0x03,1,0x9)
#define OPCODE_STW OPCODE1(0x03,1,0xa)
#define OPCODE_STD OPCODE1(0x03,1,0xb)
-/* skip STBY */
-/* skip STDBY */
+/* skip STBY - never unaligned */
+/* skip STDBY - never unaligned */
#define OPCODE_STWA OPCODE1(0x03,1,0xe)
#define OPCODE_STDA OPCODE1(0x03,1,0xf)
@@ -103,15 +103,107 @@
#define OPCODE_LDH_L OPCODE4(0x11)
#define OPCODE_LDW_L OPCODE4(0x12)
-#define OPCODE_LDW_L2 OPCODE4(0x13)
+#define OPCODE_LDWM OPCODE4(0x13)
#define OPCODE_STH_L OPCODE4(0x19)
#define OPCODE_STW_L OPCODE4(0x1A)
-#define OPCODE_STW_L2 OPCODE4(0x1B)
+#define OPCODE_STWM OPCODE4(0x1B)
+
+#define MAJOR_OP(i) (((i)>>26)&0x3f)
+#define R1(i) (((i)>>21)&0x1f)
+#define R2(i) (((i)>>16)&0x1f)
+#define R3(i) ((i)&0x1f)
+#define IM(i,n) (((i)>>1&((1<<(n-1))-1))|((i)&1?((0-1L)<<(n-1)):0))
+#define IM5_2(i) IM((i)>>16,5)
+#define IM5_3(i) IM((i),5)
+#define IM14(i) IM((i),14)
int unaligned_enabled = 1;
void die_if_kernel (char *str, struct pt_regs *regs, long err);
+static int emulate_ldh(struct pt_regs *regs, int toreg)
+{
+ unsigned long saddr = regs->ior;
+ unsigned long val = 0;
+
+ DPRINTF("load " RFMT ":" RFMT " to r%d for 2 bytes\n",
+ regs->isr, regs->ior, toreg);
+
+ __asm__ __volatile__ (
+" mtsp %3, %%sr1\n"
+" ldbs 0(%%sr1,%2), %%r20\n"
+" ldbs 1(%%sr1,%2), %0\n"
+ "depw %%r20, 23, 24, %0\n"
+ : "=r" (val)
+ : "0" (val), "r" (saddr), "r" (regs->isr)
+ : "r20" );
+
+ DPRINTF("val = 0x" RFMT "\n", val);
+
+ if (toreg)
+ regs->gr[toreg] = val;
+
+ return 0;
+}
+static int emulate_ldw(struct pt_regs *regs, int toreg)
+{
+ unsigned long saddr = regs->ior;
+ unsigned long val = 0;
+
+ DPRINTF("load " RFMT ":" RFMT " to r%d for 4 bytes\n",
+ regs->isr, regs->ior, toreg);
+
+ __asm__ __volatile__ (
+" zdep %2,28,2,%%r19\n" /* r19=(ofs&3)*8 */
+" mtsp %3, %%sr1\n"
+" depw %%r0,31,2,%2\n"
+" ldw 0(%%sr1,%2),%0\n"
+" ldw 4(%%sr1,%2),%%r20\n"
+" subi 32,%%r19,%%r19\n"
+" mtctl %%r19,11\n"
+" vshd %0,%%r20,%0\n"
+ : "=r" (val)
+ : "0" (val), "r" (saddr), "r" (regs->isr)
+ : "r19", "r20" );
+
+ DPRINTF("val = 0x" RFMT "\n", val);
+
+ if (toreg)
+ regs->gr[toreg] = val;
+
+ return 0;
+}
+#ifdef __LP64__
+static int emulate_ldd(struct pt_regs *regs, int toreg)
+{
+ unsigned long saddr = regs->ior;
+ unsigned long val = 0;
+
+ DPRINTF("load " RFMT ":" RFMT " to r%d for 8 bytes\n",
+ regs->isr, regs->ior, toreg);
+
+ __asm__ __volatile__ (
+" zdepd %2,60,3,%%r19\n" /* r19=(ofs&7)*8 */
+" mtsp %3, %%sr1\n"
+" depd %%r0,63,3,%2\n"
+" ldd 0(%%sr1,%2),%0\n"
+" ldd 8(%%sr1,%2),%%r20\n"
+" subi 64,%%r19,%%r19\n"
+" mtsar %%r19\n"
+" shrpd %0,%%r20,%sar,%0\n"
+ : "=r" (val)
+ : "0" (val), "r" (saddr), "r" (regs->isr)
+ : "r19", "r20" );
+
+ DPRINTF("val = 0x" RFMT "\n", val);
+
+ if (toreg)
+ regs->gr[toreg] = val;
+
+ return 0;
+}
+#endif
+#if 0
static int emulate_load(struct pt_regs *regs, int len, int toreg)
{
unsigned long saddr = regs->ior;
@@ -159,19 +251,144 @@
DPRINTF("val = 0x" RFMT "\n", val);
- regs->gr[toreg] = val;
+ if (toreg)
+ regs->gr[toreg] = val;
return ret;
}
+#endif
+
+static int emulate_sth(struct pt_regs *regs, int frreg)
+{
+ unsigned long val = regs->gr[frreg];
+ if (!frreg)
+ val = 0;
+
+ DPRINTF("store r%d (0x" RFMT ") to " RFMT ":" RFMT " for 2 bytes\n", frreg,
+ regs->gr[frreg], regs->isr, regs->ior);
+
+ __asm__ __volatile__ (
+" mtsp %2, %%sr1\n"
+" extrw,u %0, 23, 8, %%r19\n"
+" stb %0, 1(%%sr1, %1)\n"
+" stb %%r19, 0(%%sr1, %1)\n"
+ :
+ : "r" (val), "r" (regs->ior), "r" (regs->isr)
+ : "r19" );
+
+ return 0;
+}
+static int emulate_stw(struct pt_regs *regs, int frreg)
+{
+ unsigned long val = regs->gr[frreg];
+ if (!frreg)
+ val = 0;
+
+ DPRINTF("store r%d (0x" RFMT ") to " RFMT ":" RFMT " for 4 bytes\n", frreg,
+ regs->gr[frreg], regs->isr, regs->ior);
+
+
+ __asm__ __volatile__ (
+" mtsp %2, %%sr1\n"
+#if 0
+" extru %0, 7, 8, %%r19\n"
+" extru %0, 15, 8, %%r20\n"
+" extru %0, 23, 8, %%r21\n"
+" stb %%r19, 0(%%sr1, %1)\n"
+" stb %%r20, 1(%%sr1, %1)\n"
+" stb %%r21, 2(%%sr1, %1)\n"
+" stb %0, 3(%%sr1, %1)\n"
+ :
+ : "r" (val), "r" (regs->ior), "r" (regs->isr)
+ : "r19", "r20", "r21" );
+#else
+" zdep %1, 28, 2, %%r19\n"
+" dep %%r0, 31, 2, %1\n"
+" mtsar %%r19\n"
+" zvdepi -2, 32, %%r19\n"
+" ldw 0(%%sr1,%1),%%r20\n"
+" ldw 4(%%sr1,%1),%%r21\n"
+" vshd %%r0, %0, %%r22\n"
+" vshd %0, %%r0, %%r1\n"
+" and %%r20, %%r19, %%r20\n"
+" andcm %%r21, %%r19, %%r21\n"
+" or %%r22, %%r20, %%r20\n"
+" or %%r1, %%r21, %%r21\n"
+" stw %%r20,0(%%sr1,%1)\n"
+" stw %%r21,4(%%sr1,%1)\n"
+ :
+ : "r" (val), "r" (regs->ior), "r" (regs->isr)
+ : "r19", "r20", "r21", "r22", "r1" );
+#endif
+ return 0;
+}
+#ifdef __LP64__
+static int emulate_std(struct pt_regs *regs, int frreg)
+{
+ unsigned long val = regs->gr[frreg];
+ if (!frreg)
+ val = 0;
+
+ DPRINTF("store r%d (0x" RFMT ") to " RFMT ":" RFMT " for 8 bytes\n", frreg,
+ regs->gr[frreg], regs->isr, regs->ior);
+
+
+ __asm__ __volatile__ (
+" mtsp %2, %%sr1\n"
+#if 0
+" extrd %0, 7, 8, %%r19\n"
+" extrd %0, 15, 8, %%r20\n"
+" stb %%r19, 0(%%sr1, %1)\n"
+" stb %%r20, 1(%%sr1, %1)\n"
+" extrd %0, 23, 8, %%r19\n"
+" extrd %0, 31, 8, %%r20\n"
+" stb %%r19, 2(%%sr1, %1)\n"
+" stb %%r20, 3(%%sr1, %1)\n"
+" extrd %0, 39, 8, %%r19\n"
+" extrd %0, 47, 8, %%r20\n"
+" extrd %0, 55, 8, %%r21\n"
+" stb %%r19, 4(%%sr1, %1)\n"
+" stb %%r20, 5(%%sr1, %1)\n"
+" stb %%r21, 6(%%sr1, %1)\n"
+" stb %0, 7(%%sr1, %1)\n"
+ :
+ : "r" (val), "r" (regs->ior), "r" (regs->isr)
+ : "r19", "r20", "r21" );
+#else
+" depd,z %1, 60, 3, %%r19\n"
+" depd %%r0, 63, 3, %1\n"
+" mtsar %%r19\n"
+" depdi,z -2, 64, %%r19\n"
+" ldd 0(%%sr1,%1),%%r20\n"
+" ldd 8(%%sr1,%1),%%r21\n"
+" shrpd %%r0, %0, %sar, %%r22\n"
+" shrpd %0, %%r0, %sar, %%r1\n"
+" and %%r20, %%r19, %%r20\n"
+" andcm %%r21, %%r19, %%r21\n"
+" or %%r22, %%r20, %%r20\n"
+" or %%r1, %%r21, %%r21\n"
+" std %%r20,0(%%sr1,%1)\n"
+" std %%r21,8(%%sr1,%1)\n"
+ :
+ : "r" (val), "r" (regs->ior), "r" (regs->isr)
+ : "r19", "r20", "r21", "r22", "r1" );
+#endif
+
+ return 0;
+}
+#endif
+#if 0
static int emulate_store(struct pt_regs *regs, int len, int frreg)
{
int ret = 0;
#ifdef __LP64__
- unsigned long val = regs->gr[frreg] << (64 - (len << 3));
+ unsigned long val = regs->gr[frreg] << (64 - (len << 3));
#else
- unsigned long val = regs->gr[frreg] << (32 - (len << 3));
+ unsigned long val = regs->gr[frreg] << (32 - (len << 3));
#endif
+ if (!frreg)
+ val = 0;
if (regs->isr != regs->sr[7])
{
@@ -220,12 +437,15 @@
return ret;
}
+#endif
void handle_unaligned(struct pt_regs *regs)
{
unsigned long unaligned_count = 0;
unsigned long last_time = 0;
+ unsigned long newbase = regs->gr[R1(regs->iir)];
+ int modify = 0;
int ret = -1;
struct siginfo si;
@@ -284,83 +504,169 @@
if (!unaligned_enabled)
goto force_sigbus;
+ /* handle modification - OK, it's ugly, see the instruction manual */
+ switch (MAJOR_OP(regs->iir))
+ {
+ case 0x03:
+ case 0x09:
+ case 0x0b:
+ if (regs->iir&0x20)
+ {
+ modify = 1;
+ if (regs->iir&0x1000) /* short loads */
+ if (regs->iir&0x200)
+ newbase += IM5_3(regs->iir);
+ else
+ newbase += IM5_2(regs->iir);
+ else if (regs->iir&0x2000) /* scaled indexed */
+ {
+ int shift=0;
+ switch (regs->iir & OPCODE1_MASK)
+ {
+ case OPCODE_LDH_I:
+ shift= 1; break;
+ case OPCODE_LDW_I:
+ shift= 2; break;
+ case OPCODE_LDD_I:
+ case OPCODE_LDDA_I:
+ shift= 3; break;
+ }
+ newbase += regs->gr[R2(regs->iir)]<<shift;
+ } else /* simple indexed */
+ newbase += regs->gr[R2(regs->iir)];
+ }
+ break;
+ case 0x13:
+ case 0x1b:
+ modify = 1;
+ newbase += IM14(regs->iir);
+ break;
+ case 0x14:
+ case 0x1c:
+ if (regs->iir&8)
+ {
+ modify = 1;
+ newbase += IM14(regs->iir&~0xe);
+ }
+ break;
+ case 0x16:
+ case 0x1e:
+ modify = 1;
+ newbase += IM14(regs->iir&6);
+ break;
+ case 0x17:
+ case 0x1f:
+ if (regs->iir&4)
+ {
+ modify = 1;
+ newbase += IM14(regs->iir&~4);
+ }
+ break;
+ }
+
+ if (regs->isr != regs->sr[7])
+ {
+ printk(KERN_CRIT "isr verification failed (isr: " RFMT ", sr7: " RFMT "\n",
+ regs->isr, regs->sr[7]);
+
+ /* don't kill him though, since he has appropriate access to the page, or we
+ * would never have gotten here.
+ */
+ }
+
/* TODO: make this cleaner... */
switch (regs->iir & OPCODE1_MASK)
{
case OPCODE_LDH_I:
case OPCODE_LDH_S:
- ret = emulate_load(regs, 2, regs->iir & 0x1f);
+ ret = emulate_ldh(regs, R3(regs->iir));
break;
case OPCODE_LDW_I:
case OPCODE_LDWA_I:
case OPCODE_LDW_S:
case OPCODE_LDWA_S:
- ret = emulate_load(regs, 4, regs->iir&0x1f);
- break;
-
- case OPCODE_LDD_I:
- case OPCODE_LDDA_I:
- case OPCODE_LDD_S:
- case OPCODE_LDDA_S:
- ret = emulate_load(regs, 8, regs->iir&0x1f);
+ ret = emulate_ldw(regs, R3(regs->iir));
break;
case OPCODE_STH:
- ret = emulate_store(regs, 2, (regs->iir>>16)&0x1f);
+ ret = emulate_sth(regs, R2(regs->iir));
break;
case OPCODE_STW:
case OPCODE_STWA:
- ret = emulate_store(regs, 4, (regs->iir>>16)&0x1f);
+ ret = emulate_stw(regs, R2(regs->iir));
+ break;
+
+#ifdef __LP64__
+ case OPCODE_LDD_I:
+ case OPCODE_LDDA_I:
+ case OPCODE_LDD_S:
+ case OPCODE_LDDA_S:
+ ret = emulate_ldd(regs, R3(regs->iir));
break;
case OPCODE_STD:
case OPCODE_STDA:
- ret = emulate_store(regs, 8, (regs->iir>>16)&0x1f);
+ ret = emulate_std(regs, R2(regs->iir));
+ break;
+#endif
+
+ case OPCODE_LDCD_I:
+ case OPCODE_LDCW_I:
+ case OPCODE_LDCD_S:
+ case OPCODE_LDCW_S:
+ ret = -1; /* "undefined", but lets kill them. */
break;
}
+#ifdef __LP64__
switch (regs->iir & OPCODE2_MASK)
{
case OPCODE_LDD_L:
case OPCODE_FLDD_L:
- ret = emulate_load(regs, 8, (regs->iir>>16)&0x1f);
+ ret = emulate_ldd(regs, R2(regs->iir));
break;
case OPCODE_STD_L:
case OPCODE_FSTD_L:
- ret = emulate_store(regs, 8, (regs->iir>>16)&0x1f);
+ ret = emulate_std(regs, R2(regs->iir));
break;
}
+#endif
switch (regs->iir & OPCODE3_MASK)
{
case OPCODE_LDW_M:
case OPCODE_FLDW_L:
- ret = emulate_load(regs, 4, (regs->iir>>16)&0x1f);
+ ret = emulate_ldw(regs, R2(regs->iir));
break;
case OPCODE_FSTW_L:
case OPCODE_STW_M:
- ret = emulate_store(regs, 4, (regs->iir>>16)&0x1f);
+ ret = emulate_stw(regs, R2(regs->iir));
break;
}
switch (regs->iir & OPCODE4_MASK)
{
case OPCODE_LDH_L:
- ret = emulate_load(regs, 2, (regs->iir>>16)&0x1f);
+ ret = emulate_ldh(regs, R2(regs->iir));
break;
case OPCODE_LDW_L:
- case OPCODE_LDW_L2:
- ret = emulate_load(regs, 4, (regs->iir>>16)&0x1f);
+ case OPCODE_LDWM:
+ ret = emulate_ldw(regs, R2(regs->iir));
break;
case OPCODE_STH_L:
- ret = emulate_store(regs, 2, (regs->iir>>16)&0x1f);
+ ret = emulate_sth(regs, R2(regs->iir));
break;
case OPCODE_STW_L:
- case OPCODE_STW_L2:
- ret = emulate_store(regs, 4, (regs->iir>>16)&0x1f);
+ case OPCODE_STWM:
+ ret = emulate_stw(regs, R2(regs->iir));
break;
}
+ /* XXX LJ - need to handle float load/store */
+
+ if (modify)
+ regs->gr[R1(regs->iir)] = newbase;
+
if (ret < 0)
printk(KERN_CRIT "Not-handled unaligned insn 0x%08lx\n", regs->iir);
@@ -424,9 +730,9 @@
align_mask = 1UL;
break;
case OPCODE_LDW_L:
- case OPCODE_LDW_L2:
+ case OPCODE_LDWM:
case OPCODE_STW_L:
- case OPCODE_STW_L2:
+ case OPCODE_STWM:
align_mask = 3UL;
break;
}
^ permalink raw reply
* Re: [BENCHMARK] scheduler tunables with contest - prio_bonus_ratio
From: Andrew Morton @ 2002-12-19 23:18 UTC (permalink / raw)
To: Robert Love; +Cc: Con Kolivas, linux kernel mailing list
In-Reply-To: <1040337982.2519.45.camel@phantasy>
Robert Love wrote:
>
> ...
> Not too sure what to make of it. It shows the interactivity estimator
> does indeed help... but only if what you consider "important" is what is
> considered "interactive" by the estimator. Andrew will say that is too
> often not the case.
>
That is too often not the case.
I can get the desktop machine working about as comfortably
as 2.4.19 with:
# echo 10 > max_timeslice
# echo 0 > prio_bonus_ratio
ie: disabling all the fancy new scheduler features :(
Dropping max_timeslice fixes the enormous stalls which happen
when an interactive process gets incorrectly identified as a
cpu hog. (OK, that's expected)
But when switching virtual desktops some windows still take a
large fraction of a second to redraw themselves. Disabling the
interactivity estimator fixes that up too. (Not OK. That's bad)
hm. It's actually quite nice. I'd be prepared to throw away
a few cycles for this.
I don't expect the interactivity/cpuhog estimator will ever work
properly on the desktop, frankly. There will always be failure
cases when a sudden swing in load causes it to make the wrong
decision.
So it appears that to stem my stream of complaints we need to
merge scheduler_tunables.patch and edit my /etc/rc.local.
^ permalink raw reply
* Type confusion in fbcon
From: Russell King @ 2002-12-19 23:14 UTC (permalink / raw)
To: Linux Kernel List, linux-fbdev-devel
I'm in the midst of porting sa1100fb over to the new fb API, and I stumbled
across an apparant confusion over the type of fb_info->pseudo_palette.
Some code appears to think its an unsigned long, others think its u32.
This doesn't make much difference when sizeof(unsigned long) == sizeof(u32)
but this isn't always the case (eg, 64-bit architectures).
I'll get back to bashing the sa1100fb driver to work out why fbcon is
producing a _completely_ blank display, despite characters being written
to it.
--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
-------------------------------------------------------
This SF.NET email is sponsored by: Geek Gift Procrastinating?
Get the perfect geek gift now! Before the Holidays pass you by.
T H I N K G E E K . C O M http://www.thinkgeek.com/sf/
^ permalink raw reply
* Re: [PATCH/RFC] New module refcounting for net_proto_family
From: Max Krasnyansky @ 2002-12-19 23:23 UTC (permalink / raw)
To: jt, Linux kernel mailing list
In-Reply-To: <20021219230856.GA8392@bougret.hpl.hp.com>
At 03:08 PM 12/19/2002 -0800, Jean Tourrilhes wrote:
>Max Krasnyansky wrote :
>> Ok. Drop me a note and I'll push this stuff to BK were you can pull from.
>> In the mean time I'll go bug other folks :). I want to do same kinda changes
>> for the TTY ldisc code.
>>
>> Max
>
> Go for it, I've got the exact same problem with IrDA (both
>socket and tty ldisc).
Sockets should work with my patch and I'll fix ldisc today or tomorrow.
>Maybe worth sending an entry for the FAQ of Rusty and include PPP maintainer
>in the loop.
Ok.
>P.S. : Talking about it, I'm away for Chrismas & New-Year...
Happy holidays then.
Max
^ permalink raw reply
* [Linux-ia64] Re: ia64 cache flushing?
From: David Mosberger @ 2002-12-19 23:15 UTC (permalink / raw)
To: linux-ia64
In-Reply-To: <marc-linux-ia64-105590709805582@msgid-missing>
>>>>> On Mon, 16 Dec 2002 23:20:26 -0800, Richard Henderson <rth@twiddle.net> said:
Rich> On Mon, Dec 16, 2002 at 07:50:53PM -0800, David Mosberger
Rich> wrote:
>> I assume you do early binding of the PLTs for kernel modules,
>> right?
Rich> Yes.
>> If so, patching the PLT code stub is trivial.
Rich> No it isn't. Find me the address of the stub.
After you're done applying relocations, what stops you from going
through all PLTs and patching them to use "brl"?
--david
^ permalink raw reply
* Re: /proc/mounts and data=journal
From: Matthias Andree @ 2002-12-19 23:16 UTC (permalink / raw)
To: reiserfs-list, linux-kernel
In-Reply-To: <200212192316.51412.bofh@coker.com.au>
Russell Coker <bofh@coker.com.au> writes:
> I've applied the patches for mounting with data=journal. However one problem
> that I have discovered is that the data=journal status of a file system is
> not shown in /proc/mounts, other tunable options of a file system such as
> noatime are shown.
This also affects ext3fs. Leaving full quote and posting to linux-kernel
as well.
--
Matthias Andree
^ permalink raw reply
* Re: Intel P6 vs P7 system call performance
From: Linus Torvalds @ 2002-12-19 23:30 UTC (permalink / raw)
To: H. Peter Anvin
Cc: Jamie Lokier, bart, davej, terje.eggestad, drepper, matti.aarnio,
hugh, mingo, linux-kernel
In-Reply-To: <Pine.LNX.4.44.0212191437220.5879-100000@penguin.transmeta.com>
On Thu, 19 Dec 2002, Linus Torvalds wrote:
>
> So it's between 0-4 cycles on machines that take 200 - 1000 cycles for
> just the system call overhead.
Side note: I'd expect indirect calls - and especially the predictable
ones, like this - to maintain competitive behaviour on CPU's. Even the P4,
which usually has really bad worst-case behaviour for more complex
instructions (just look at the 2000 cycles for a regular int80/iret and
shudder) does a indirect call without huge problems.
That's because indirect calls are actually very common, and to some degree
getting _more_ so with the proliferation of OO languages (and I'm
discounting the "indirect call" that is just a return statement - they've
obviously always been common, but a return stack means that CPU
optimizations for "ret" instructions are different from "real" indirect
calls).
So I don't worry about the indirection per se. I'd worry a lot more about
some of the tricks people mentioned (ie the "pushl $0xfffff000 ; ret"
approach probably sucks quite badly on some CPU's, simply because it does
bad things to return stacks on modern CPU's - not necessarily visible in
microbenchmarks, but..).
Linus
^ permalink raw reply
* 2.5.52: agp, drm, i810 problem
From: Felix Seeger @ 2002-12-19 23:34 UTC (permalink / raw)
To: linux-kernel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi
I am running 2.5.52 (I must say that it is the best kernel I ever had, first
time acpi and sony jog dial are working, great)
But I have some agp problems at the moment:
$ modprobe i810
FATAL: Error inserting i810
(/lib/modules/2.5.52/kernel/drivers/char/drm/i810.ko): Cannot allocate memory
[drm:drm_init] *ERROR* Cannot initialize the agpgart module.
Uninitialised timer!
This is just a warning. Your computer is OK
function=0x00000000, data=0x0
Call Trace:
[<c0120852>] check_timer_failed+0x42/0x50
[<c0120c87>] del_timer+0x17/0x80
[<c4969005>] i810_takedown+0x45/0x3b0 [i810]
[<c496d516>] i810_stub_unregister+0x36/0x3d [i810]
[<c49460e6>] 0xc49460e6
[<c4970120>] +0xa60/0x2940 [i810]
[<c4970102>] +0xa42/0x2940 [i810]
[<c012a732>] sys_init_module+0xfe/0x178
[<c0108cd7>] syscall_call+0x7/0xb
Here is some output of lspci:
00:00.0 Host bridge: Intel Corp. 82815 815 Chipset Host Bridge and Memory
Controller Hub (rev 11)
Subsystem: Sony Corporation: Unknown device 80de
Flags: bus master, fast devsel, latency 0
Capabilities: [88] #09 [f205]
00:02.0 VGA compatible controller: Intel Corp. 82815 CGC [Chipset Graphics
Controller] (rev 11) (prog-if 00 [VGA])
Subsystem: Sony Corporation: Unknown device 80de
Flags: bus master, 66Mhz, medium devsel, latency 0, IRQ 9
Memory at f8000000 (32-bit, prefetchable) [size=64M]
Memory at f4000000 (32-bit, non-prefetchable) [size=512K]
Capabilities: [dc] Power Management version 2
I tried the i810 drm driver as module and compiled in part.
thanks
have fun
Felix
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+Ald4S0DOrvdnsewRApnqAKCAM3Way11XvYh4MO/eBTPEwiKnjACdGC93
sS7eDI5YzZabkFWTb7H8mVs=
=D+qr
-----END PGP SIGNATURE-----
^ permalink raw reply
* Re: linux-2.5.40 64GB highmem BUG()
From: William Lee Irwin III @ 2002-12-19 23:36 UTC (permalink / raw)
To: Adam J. Richter; +Cc: linux-kernel
In-Reply-To: <200210071327.GAA00711@adam.yggdrasil.com>
On Mon, Oct 07, 2002 at 06:27:19AM -0700, Adam J. Richter wrote:
> Although 2.5.40 has been out for a while, I think I ought
> to post this bug as I haven't seen any other mention of it.
> When I boot an 2.5.40 x86 kernel built with CONFIG_HIGHMEM64G,
> and with a 920kB initial ramdisk (2.2MB uncompressed), I get a kernel
> BUG() at highmem.c line 480, preceded by a message saying "scheduling
> with KM_TYPE 15 held!" The machine on which I experienced this
> problem has 1.25GB of RAM. The problem occurs with and without
> CONFIG_PREEMPT. All kernels that tried were SMP kernels running on a
> uniprocessor.
This is not reproducible here with 2.5.52-mm2. Is the initrd required
to trigger this?
Thanks,
Bill
^ permalink raw reply
* Re: Bug? undefined reference to `input_event'
From: Bob Miller @ 2002-12-19 23:37 UTC (permalink / raw)
To: mdew; +Cc: Linux Kernel
In-Reply-To: <1040336538.7886.8.camel@nirvana>
On Fri, Dec 20, 2002 at 11:22:09AM +1300, mdew wrote:
> in both the 2.5.52, and bitkeeper trees, i get this error with make
> bzImage.
>
>
> Generating include/linux/compile.h (updated)
> gcc -Wp,-MD,init/.version.o.d -D__KERNEL__ -Iinclude -Wall
> -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
> -pipe -mpreferred-stack-boundary=2 -march=pentium3
> -Iarch/i386/mach-generic -fomit-frame-pointer -nostdinc -iwithprefix
> include -DKBUILD_BASENAME=version -DKBUILD_MODNAME=version -c -o
> init/version.o init/version.c
> ld -m elf_i386 -r -o init/built-in.o init/main.o init/version.o
> init/do_mounts.o init/initramfs.o
> ld -m elf_i386 -e stext -T arch/i386/vmlinux.lds.s
> arch/i386/kernel/head.o arch/i386/kernel/init_task.o init/built-in.o
> --start-group usr/built-in.o arch/i386/kernel/built-in.o
> arch/i386/mm/built-in.o arch/i386/mach-generic/built-in.o
> kernel/built-in.o mm/built-in.o fs/built-in.o ipc/built-in.o
> security/built-in.o crypto/built-in.o lib/lib.a arch/i386/lib/lib.a
Stuff deleted...
> #
> # Input device support
> #
> CONFIG_INPUT=m
>
> #
> # Userland interfaces
> #
> CONFIG_INPUT_MOUSEDEV=m
> CONFIG_INPUT_MOUSEDEV_PSAUX=y
> CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
> CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
> CONFIG_INPUT_JOYDEV=m
> # CONFIG_INPUT_TSDEV is not set
> CONFIG_INPUT_EVDEV=m
> # CONFIG_INPUT_EVBUG is not set
>
> #
> # Input I/O drivers
> #
> # CONFIG_GAMEPORT is not set
> CONFIG_SOUND_GAMEPORT=y
> CONFIG_SERIO=y
> CONFIG_SERIO_I8042=y
> CONFIG_SERIO_SERPORT=y
> # CONFIG_SERIO_CT82C710 is not set
> # CONFIG_SERIO_PARKBD is not set
>
> #
> # Input Device Drivers
> #
> CONFIG_INPUT_KEYBOARD=y
> CONFIG_KEYBOARD_ATKBD=m
> # CONFIG_KEYBOARD_SUNKBD is not set
> # CONFIG_KEYBOARD_XTKBD is not set
> # CONFIG_KEYBOARD_NEWTON is not set
> # CONFIG_INPUT_MOUSE is not set
> # CONFIG_INPUT_JOYSTICK is not set
> # CONFIG_INPUT_TOUCHSCREEN is not set
> # CONFIG_INPUT_MISC is not set
>
CONFIG_INPUT and friends can NOT be configed as modules. They must be
built into the kernel.
--
Bob Miller Email: rem@osdl.org
Open Source Development Lab Phone: 503.626.2455 Ext. 17
^ permalink raw reply
* 2.4.20: Broken AGP initialization for i845G chipset [patch]
From: Michael Milligan @ 2002-12-19 23:38 UTC (permalink / raw)
To: linux-kernel
Chipset detection for the new Intel i845G chipset was added into the AGPGART
driver, but it appears to call the wrong initialization routine. Stock
compile
causes some bad interaction that messes up the PCI bus such that, in my
case,
the follow on initialization of the Adaptec SCSI card (PCI) hangs the
box. Needless
to say, that's very bad since that's where all the hard drives live.
SCSI driver
initialization happens right after the AGP initialization... from dmesg
(after my patch):
(without the patch, it would hang before "scsi0: Adaptec ..." or before
finding
any drives)
....
Linux video capture interface: v1.00
Linux agpgart interface v0.99 (c) Jeff Hartmann
agpgart: Maximum main memory to use for agp memory: 203M
agpgart: Detected Intel i845G chipset
agpgart: AGP aperture is 256M @ 0xe0000000
SCSI subsystem driver Revision: 1.00
PCI: Found IRQ 9 for device 02:0a.0
PCI: Sharing IRQ 9 with 02:0a.1
PCI: Found IRQ 9 for device 02:0a.1
PCI: Sharing IRQ 9 with 02:0a.0
scsi0 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.8
<Adaptec 3950B Ultra2 SCSI adapter>
aic7896/97: Ultra2 Wide Channel A, SCSI Id=7, 32/253 SCBs
scsi1 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.8
<Adaptec 3950B Ultra2 SCSI adapter>
aic7896/97: Ultra2 Wide Channel B, SCSI Id=7, 32/253 SCBs
Vendor: IBM Model: DNES-309170Y Rev: SAH0
Type: Direct-Access ANSI SCSI revision: 03
(scsi0:A:0): 80.000MB/s transfers (40.000MHz, offset 30, 16bit)
....
Patch below. Calls the 845 initialization function instead of the 830MP,
and a small formatting cleanup. This is verified working.
$ diff -u kernel-source-2.4.20/drivers/char/agp/agpgart_be.c.org
kernel-source-2.4.20/drivers/char/agp/agpgart_be.c
--- kernel-source-2.4.20/drivers/char/agp/agpgart_be.c.org 2002-11-28
16:53:12.000000000 -0700
+++ kernel-source-2.4.20/drivers/char/agp/agpgart_be.c 2002-12-08
20:39:57.000000000 -0700
@@ -4551,12 +4551,12 @@
"Intel",
"i830M",
intel_830mp_setup },
- { PCI_DEVICE_ID_INTEL_845_G_0,
+ { PCI_DEVICE_ID_INTEL_845_G_0,
PCI_VENDOR_ID_INTEL,
INTEL_I845_G,
"Intel",
"i845G",
- intel_830mp_setup },
+ intel_845_setup },
{ PCI_DEVICE_ID_INTEL_840_0,
PCI_VENDOR_ID_INTEL,
INTEL_I840,
Please note... kernel version below is that of my development box (where
kernel was compiled)
-- System Information
Debian Release: testing/unstable
Kernel Version: Linux shadow 2.4.19 #3 SMP Mon Nov 25 20:48:02 MST 2002
i686 Pentium III (Coppermine) GenuineIntel GNU/Linux
Versions of the packages kernel-source-2.4.20 depends on:
ii binutils 2.13.90.0.10-1 The GNU assembler, linker and binary
utiliti
ii bzip2 1.0.2-1 A high-quality block-sorting file
compressor
ii coreutils 4.5.2-1 The GNU core utilities
ii fileutils 4.5.2-1 GNU file management utilities
Regards,
Mike
--
Michael Milligan -- Free Agent -- milli@acmeps.com
^ permalink raw reply
* Re: RFC: bus_type and device_class merge (or partial merge)
From: Greg KH @ 2002-12-19 23:37 UTC (permalink / raw)
To: Adam J. Richter; +Cc: mochel, linux-kernel
In-Reply-To: <200212192244.OAA06433@adam.yggdrasil.com>
On Thu, Dec 19, 2002 at 02:44:53PM -0800, Adam J. Richter wrote:
> >> = Adam Richter
> > = Patrick Mochel
>
> >Especially during the continuing evolution
> >of the model. At least for now, and for probably a very long time, I will
> >not consider patches to consolidate the two object types.
>
> Linux will be better if we decide things by weighing technical
> benefits rather than by attempts at diktat. I recommend you keep an
> open mind about it.
Heh, if anyone has kept an open mind around here, it's Pat. Look at the
crap that the driver writers have forced him to accommodate. Here's a
small drawing that some people did at OLS 2002 to help get across how
all of the wide range of busses, classes, devices, and drivers interact
with just one kind of subsystem:
http://www.kroah.com/linux/images/driver_model_1_ols_2002.jpg
The existing code handles monstrosities like that quite well, because he
has kept an open mind, and listened to the driver and subsystem authors.
And yes, we need to start writing more class support, it's next on my
list too. Patches to do this would be greatly appreciated.
thanks,
greg k-h
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
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.