All of lore.kernel.org
 help / color / mirror / Atom feed
* DiskOnChip GRUB menu fall-back fix
From: Ilguiz Latypov @ 2003-01-10 20:57 UTC (permalink / raw)
  To: Linux MTD mailing list

I submitted a modification to the David Woodhouse's GRUB patch,
patches/grub-2003-01-08-doc.patch in the MTD CVS tree.  It is the same as
the previous one posted by Mark Meade plus the fix for a fall-back menu 
option.  When the default drive (DiskOnChip) doesn't contain the menu.lst 
file, the menu will be looked for among the first hard disk and the floppy 
disk.  The bug was that selecting an item of the fall-back menu barked 
about non-existent disk.

I hope I didn't break anything by fixing this bug.

-- 
Ilguiz Latypov
Montreal, Quebec
Canada

+1 (514) 526-6911 (home)
+1 (514) 281-9191 x 117 (work)

^ permalink raw reply

* Re: Where is lilo.conf in the kernel source tree?
From: Der Herr Hofrat @ 2003-01-10 20:33 UTC (permalink / raw)
  To: Khai Trinh; +Cc: linuxppc-embedded
In-Reply-To: <20030110191126.74442.qmail@web11508.mail.yahoo.com>


>
> I would like to reserve a piece of High RAM memory for
> DMA. The Linux 2.4 Drivers book show to appand
> MEM=reserve_size to the lilo.conf file.
>
> Would someone please let me know where this file is in
> the kernel tree? I couldn't seem to locate it.

its in /etc/ by default not in the kernel tree.

hofrat

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply

* Re: 2.4.20, .text.lock.swap cpu usage? (ibm x440)
From: Chris Wood @ 2003-01-10 20:42 UTC (permalink / raw)
  To: Andrew Morton; +Cc: William Lee Irwin III, linux-kernel
In-Reply-To: <3E1DD913.2571469F@digeo.com>

Andrew Morton wrote:
> Chris Wood wrote:
> 
>>..
>>The server ran fine for 3 days, so it took a bit to get this info.
> 
> 
> Is appreciated, thanks.
>  
> 
>>Is there a list of which patches I can apply if I don't want to apply
>>the entire 2.4.20aa1?  I'm nervous about breaking other things, but may
>>give it a try anyway.
> 
> 
> http://www.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.20aa1/05_vm_16_active_free_zone_bhs-1
> http://www.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.20aa1/10_inode-highmem-2
> 
> The former is the most important and, alas, has dependencies on
> earlier patches.
> 
> hm, OK.  I've pulled all Andrea's VM changes and the inode-highmem fix
> into a standalone diff.  I'll beat on that a bit tonight before unleashing
> it.
> 

I tried to apply 2.4.20aa1 to my /usr/src/linux and then compile it, but 
it failed to compile.  I do have the IBM x440 (NUMA) patches applied to 
this tree, I don't know if that caused any problems but I didn't see any 
when I applied the patch.  I'll attach a snip at the end of this email 
just in case it may point to something (there was more than this).

> 
>>Thanks for the help!
>>
>>Here is a /proc/meminfo when it is running fine:
> 
> 
> These numbers are a little odd.  You seem to have only lost 200M of
> lowmem to buffer_heads.  Bill, what's your take on this?
> 
> Maybe we're looking at the wrong thing.  Are any of your applications
> using mlock(), mlockall(), etc?

I'm not sure, other than our services our main programs are in Cobol 
(iCobol and AcuCobol).  I could ask the vendors if that would help.


------- sorry if this is an ugly paste -------

/usr/src/linux-2.4.20/include/asm/pgalloc.h: In function `get_pgd_slow':
/usr/src/linux-2.4.20/include/asm/pgalloc.h:49: `PAGE_OFFSET_RAW' 
undeclared (fi
rst use in this function)
/usr/src/linux-2.4.20/include/asm/pgalloc.h:54: warning: implicit 
declaration of
  function `set_64bit'
/usr/src/linux-2.4.20/include/asm/pgalloc.h: In function `free_pgd_slow':
/usr/src/linux-2.4.20/include/asm/pgalloc.h:110: `PAGE_OFFSET_RAW' 
undeclared (f
irst use in this function)
In file included from /usr/src/linux-2.4.20/include/linux/blkdev.h:11,
                  from /usr/src/linux-2.4.20/include/linux/blk.h:4,
                  from init/main.c:25:
/usr/src/linux-2.4.20/include/asm/io.h: In function `virt_to_phys':
/usr/src/linux-2.4.20/include/asm/io.h:78: `PAGE_OFFSET_RAW' undeclared 
(first u
se in this function)
/usr/src/linux-2.4.20/include/asm/io.h:79: warning: control reaches end 
of non-v
oid function
/usr/src/linux-2.4.20/include/asm/io.h: In function `phys_to_virt':
/usr/src/linux-2.4.20/include/asm/io.h:96: `PAGE_OFFSET_RAW' undeclared 
(first u
se in this function)
/usr/src/linux-2.4.20/include/asm/io.h:97: warning: control reaches end 
of non-v
oid function
/usr/src/linux-2.4.20/include/asm/io.h: In function `isa_check_signature':
/usr/src/linux-2.4.20/include/asm/io.h:280: `PAGE_OFFSET_RAW' undeclared 
(first
use in this function)
init/main.c: In function `start_kernel':
init/main.c:381: `PAGE_OFFSET_RAW' undeclared (first use in this function)
make: *** [init/main.o] Error 1
In file included from eni.c:9:
/usr/src/linux-2.4.20/include/linux/mm.h: In function `pmd_alloc':
/usr/src/linux-2.4.20/include/linux/mm.h:521: `PAGE_OFFSET_RAW' 
undeclared (firs
t use in this function)
/usr/src/linux-2.4.20/include/linux/mm.h:521: (Each undeclared 
identifier is rep
orted only once
/usr/src/linux-2.4.20/include/linux/mm.h:521: for each function it 
appears in.)
/usr/src/linux-2.4.20/include/linux/mm.h:522: warning: control reaches 
end of no
n-void function
In file included from /usr/src/linux-2.4.20/include/linux/highmem.h:5,
                  from /usr/src/linux-2.4.20/include/linux/vmalloc.h:8,
                  from /usr/src/linux-2.4.20/include/asm/io.h:47,
                  from /usr/src/linux-2.4.20/include/asm/pci.h:35,
                  from /usr/src/linux-2.4.20/include/linux/pci.h:622,
                  from eni.c:10:
/usr/src/linux-2.4.20/include/asm/pgalloc.h: In function `get_pgd_slow':
/usr/src/linux-2.4.20/include/asm/pgalloc.h:49: `PAGE_OFFSET_RAW' 
undeclared (fi
rst use in this function)
/usr/src/linux-2.4.20/include/asm/pgalloc.h:54: warning: implicit 
declaration of
  function `set_64bit'
/usr/src/linux-2.4.20/include/asm/pgalloc.h: In function `free_pgd_slow':
/usr/src/linux-2.4.20/include/asm/pgalloc.h:110: `PAGE_OFFSET_RAW' 
undeclared (f
irst use in this function)
In file included from /usr/src/linux-2.4.20/include/asm/pci.h:35,
                  from /usr/src/linux-2.4.20/include/linux/pci.h:622,
                  from eni.c:10:
/usr/src/linux-2.4.20/include/asm/io.h: In function `virt_to_phys':
/usr/src/linux-2.4.20/include/asm/io.h:78: `PAGE_OFFSET_RAW' undeclared 
(first u
se in this function)
/usr/src/linux-2.4.20/include/asm/io.h:79: warning: control reaches end 
of non-v
oid function
/usr/src/linux-2.4.20/include/asm/io.h: In function `phys_to_virt':
/usr/src/linux-2.4.20/include/asm/io.h:96: `PAGE_OFFSET_RAW' undeclared 
(first u
se in this function)
/usr/src/linux-2.4.20/include/asm/io.h:97: warning: control reaches end 
of non-v
oid function
/usr/src/linux-2.4.20/include/asm/io.h: In function `isa_check_signature':
/usr/src/linux-2.4.20/include/asm/io.h:280: `PAGE_OFFSET_RAW' undeclared 
(first
use in this function)
make[2]: *** [eni.o] Error 1
make[1]: *** [_modsubdir_atm] Error 2
make: *** [_mod_drivers] Error 2




^ permalink raw reply

* [PATCH] HAL2: fix LE stream playback
From: Ladislav Michl @ 2003-01-10 20:43 UTC (permalink / raw)
  To: linux-mips; +Cc: Ralf Baechle, Ulf Karlsson

Hi,

several people complained about it on IRC, so here is a patch against
linux_2_4 branch. Please apply.

Side note: recording still doesn't work. while ago i tried to play with
PBUS configuration and found following (refer to hpc3.ps):
1) writing 0x08248844 (ie. 16bit DMA stream) into pbus_dmacfgs produces
   noise at output.
2) writing 0x082c8844 (ie. 16bit with EVEN_HIGH bit set) make playback
   two times faster.
3) writing 0x08248844 (ie. 8 bit stream) works as expected. That is
   strange, because I still believe that HAL2 is 16bit device. I'd guess
   that there are two bugs in driver which neutralizes each other.
In all cases DMA stream wasn't started for recording.


--- XXX/drivers/sound/hal2.c	Mon Aug  5 19:40:50 2002
+++ linux/drivers/sound/hal2.c	Fri Jan 10 21:06:27 2003
@@ -1,6 +1,6 @@
 /*
  *  Driver for HAL2 sound processors
- *  Copyright (c) 2001, 2002 Ladislav Michl <ladis@psi.cz>
+ *  Copyright (c) 2001-2003 Ladislav Michl <ladis@linux-mips.org>
  *  
  *  Based on Ulf Carlsson's code.
  *
@@ -394,7 +394,8 @@
 	fifobeg = 0;				/* playback is first */
 	fifoend = (sample_size * 4) >> 3;	/* doublewords */
 	pbus->ctrl = HPC3_PDMACTRL_RT | HPC3_PDMACTRL_LD |
-		     (highwater << 8) | (fifobeg << 16) | (fifoend << 24);
+		     (highwater << 8) | (fifobeg << 16) | (fifoend << 24) |
+		     (hal2->dac.format & AFMT_S16_LE ? HPC3_PDMACTRL_SEL : 0);
 	/* We disable everything before we do anything at all */
 	pbus->pbus->pbdma_ctrl = HPC3_PDMACTRL_LD;
 	hal2_i_clearbit16(hal2, H2I_DMA_PORT_EN, H2I_DMA_PORT_EN_CODECTX);
@@ -420,7 +421,8 @@
 	fifobeg = (4 * 4) >> 3;				/* record is second */
 	fifoend = (4 * 4 + sample_size * 4) >> 3;	/* doublewords */
 	pbus->ctrl = HPC3_PDMACTRL_RT | HPC3_PDMACTRL_RCV | HPC3_PDMACTRL_LD | 
-		     (highwater << 8) | (fifobeg << 16) | (fifoend << 24);
+		     (highwater << 8) | (fifobeg << 16) | (fifoend << 24) |
+		     (hal2->adc.format & AFMT_S16_LE ? HPC3_PDMACTRL_SEL : 0);
 	pbus->pbus->pbdma_ctrl = HPC3_PDMACTRL_LD;
 	hal2_i_clearbit16(hal2, H2I_DMA_PORT_EN, H2I_DMA_PORT_EN_CODECR);
 	hal2_i_clearbit16(hal2, H2I_DMA_DRV, (1 << pbus->pbusnr));

^ permalink raw reply

* Re: ipv6 stack seems to forget to send ACKs
From: Paul Jakma @ 2003-01-10 20:59 UTC (permalink / raw)
  To: Fabio Massimo Di Nitto
  Cc: Wichert Akkerman, Andrew McGregor, netdev, linux-kernel
In-Reply-To: <Pine.LNX.4.51.0301091041390.20149@trider-g7.ext.fabbione.net>

On Thu, 9 Jan 2003, Fabio Massimo Di Nitto wrote:

> hmmmm strange because now I have forced the route to ipv6.lkml.org
> via another ISP (bypassing xs26.net) 

xs26.net posted to the 6bone list not so long that ago that they have 
IPv6 routing stability problems. (they're ditching OSPFv3/ospfd and 
implementing an inhouse IPv6 link-state IGP instead apparently).

> Fabio

regards,
-- 
Paul Jakma	Sys Admin	Alphyra
	paulj@alphyra.ie
Warning: /never/ send email to spam@dishone.st or trap@dishone.st


^ permalink raw reply

* Using lilo to boot off any drive ...
From: Manish Lachwani @ 2003-01-10 21:00 UTC (permalink / raw)
  To: linux-kernel

In my current setup, I am having 12 ide drives
connected to a 3ware controller labelled sda to sdl.
Suppose sde is the drive we want the system to boot
off. What I do is modify the lilo.conf on sda, sdb,
sdc etc. to have the "boot" entry point to /dev/sde.

This way when the controller is transferred to lilo on
sda, it will load the kernel from sde. 

consider this. If sda is bad and is not exported to
the OS or is not detected in the BIOS due to a bad
cable etc. In this scenario, the OS mappings would
change. Now, sdb will become sda. The lilo.conf on sdb
(now sda) would have "boot" parameter still point to
sde, which is now sdd. 

When the control is transferred to lilo on sda (sdb
actually), is there a way for me to boot off sdd now
(which was previously sde)? I mean, is there any way
that lilo can load the appropriate kernel image?

One of the ways I was thinking of was to modify the
lilo sources to scan for drive serial# and we boot off
that drive for which the serial# matches. But, does
anyone have a better alternative?

Thanks
Manish

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

^ permalink raw reply

* Re: FW: Fastest possible UDMA - how?
From: Andre Hedrick @ 2003-01-10 20:48 UTC (permalink / raw)
  To: Manish Lachwani, Manish Lachwani; +Cc: linux-kernel, Michael.Knigge
In-Reply-To: <20030110190403.2127.qmail@web20510.mail.yahoo.com>


I guess if Google can publish their patches to the driver they ship,
Zambeel should consider publishing the known changes they ship with
products.  Zambeel should decide if it is going to contribute or just
take.

Cheers,

Andre Hedrick
LAD Storage Consulting Group

On Fri, 10 Jan 2003, Manish Lachwani wrote:

> Take a look at the drive IDENTIFY data. From the ATA
> spec, it can be seen that word# 88 in the IDENTIFY
> data can help you find out the UDMA mode selected and
> UDMA mode supported. 
> 
> The UDMA mode supported is the maximum supported by
> the drive. 
> 
> Thanks
> Manish
> 
> > Hi all,
> > 
> > is it somehow possible to determine what is the
> > fastest UDMA-Mode my 
> > IDE-Controller supports - independant of the
> > chipset?
> > 
> > Thanks,
> >   Michael
> > 
> > 
> > 
> > -
> > 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/
> > 
> 
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
> -
> 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/
> 


^ permalink raw reply

* JFFS linker error in kernel 2.4.19
From: Frank R Callaghan @ 2003-01-10 21:27 UTC (permalink / raw)
  To: LinuxMTD

Hi List,

I'm compiling linux 2.4.19 patched with today's CVS MTD patched
with the patching script
(that states 'no Include Filesytems: yes; Zlib-Patch needed: no)

ld -m elf_i386 -T /home/rtlinux/rtai/linux-2.4.19/arch/i386/vmlinux.lds -e 
stext arch/i386/kernel/head.o arch/i386/kernel/init_task.o init/main.o 
init/version.o init/do_mounts.o \
        --start-group \
        arch/i386/kernel/kernel.o arch/i386/mm/mm.o kernel/kernel.o mm/mm.o 
fs/fs.o ipc/ipc.o \
         drivers/char/char.o drivers/block/block.o drivers/misc/misc.o 
drivers/net/net.o drivers/media/media.o drivers/ide/idedriver.o 
drivers/mtd/mtdlink.o \
        net/network.o \
        /home/rtlinux/rtai/linux-2.4.19/arch/i386/lib/lib.a 
/home/rtlinux/rtai/linux-2.4.19/lib/lib.a 
/home/rtlinux/rtai/linux-2.4.19/arch/i386/lib/lib.a \
        --end-group \
        -o vmlinux
fs/fs.o: In function `jffs2_compress':
fs/fs.o(.text+0x5fc59): undefined reference to `zlib_compress'
fs/fs.o: In function `jffs2_decompress':
fs/fs.o(.text+0x5fced): undefined reference to `zlib_decompress'
fs/fs.o(.text+0x5fd18): undefined reference to `dynrubin_decompress'
make: *** [vmlinux] Error 1


Any Ideas ?

TIA,
    Frank.

^ permalink raw reply

* Interrupt Routing
From: Stephen L Johnson @ 2003-01-10 20:59 UTC (permalink / raw)
  To: ACPI Dev Mailing List

Somewhere along the way, the interrupt routing on my laptopn has gone
back to cramming everything onto the same interrupt. Here is my
/proc/interrupts output:

sjohnson@rodan:~> cat /proc/interrupts 
           CPU0       
  0:     565260          XT-PIC  timer
  1:       6943          XT-PIC  keyboard
  2:          0          XT-PIC  cascade
  9:      72990          XT-PIC  acpi, ohci1394, usb-uhci, usb-uhci,
usb-uhci, Ricoh Co Ltd RL5c475, Texas Instruments PCI1410 PC card
Cardbus Controller, Intel 82801CA-ICH3, eth0
 11:        484          XT-PIC  sonypi
 12:      76803          XT-PIC  PS/2 Mouse
 14:      29615          XT-PIC  ide0
NMI:          0 
LOC:     565211 
ERR:          0
MIS:          0

This is on a Sony Vaio R505-ES running 2.4.20 with acpi-20021212.


-- 
Stephen L Johnson <sjohnson-WpdXj7kV/NVg9hUCZPvPmw@public.gmane.org>



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com

^ permalink raw reply

* RE: Kernel 2.5.55 failed to boot with ACPI support
From: Grover, Andrew @ 2003-01-10 21:10 UTC (permalink / raw)
  To: Ole J. Hagen, Linux Kernel Mailing List

> From: Ole J. Hagen [mailto:olehag_2001@yahoo.no] 
> I just wanted to inform that kernel-2.5.55 failes to boot 
> when ACPI support is 
> compiled in the kernel. 
> 
> I have following configuration; Dell Optiplex GX-240, Pentium 
> 4 (1.5 GHz), ATI 
> RAGE 128.

How exactly does it fail?

-- Andy

^ permalink raw reply

* Fragmentation
From: Gérard Parat / F6FGZ @ 2003-01-10 21:08 UTC (permalink / raw)
  To: Linux-Hams

Hello,

I am wondering how to tweak mss/mtu/window/packet lenght etc ... to avoid
TCP/IP fragmentation for a 1200 bds link. I am trying to send 256 byte size
AX25 packet, here an example:

vhf: fm F6FGZ-4 to F6KBS-1 ctl I37^ pid=8(segment) len 255 22:05:44 First seg;
remain 1
IP: len 328 44.151.78.19->44.151.91.49 ihl 20 ttl 64 DF prot TCP
TCP: 46755->http Seq x74f3e657 Ack x86439001 ACK PSH Wnd 472 Data 213
0000  GET / HTTP/1.0M.Connection: Keep-AliveM.User-Agent: Mozilla/4.78
0040   [fr] (X11; U; Linux 2.4.18 i686)M.Host: f6bgr.ampr.orgM.Accept:
0080   image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png,
00C0   */*M.Accept-Encoding
vhf: fm F6FGZ-4 to F6KBS-1 ctl I30^ pid=8(segment) len 76 22:05:45 remain 0
0000  : gzipM.Accept-Language: fr, en, zhM.Accept-Charset: iso-8859-1,
0040  *,utf-8M.M.

Data are splitted ...

--
73 Gérard F6FGZ



-
To unsubscribe from this list: send the line "unsubscribe linux-hams" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* [2.5.55] unresolved symbols
From: Nico Schottelius @ 2003-01-09 21:02 UTC (permalink / raw)
  To: Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 1122 bytes --]

Hello!

I am wondering how soundcore.ko can contain errno. Is it possible that 
sound_core.c includes it with linux/errno.h ?
But why does only soundcore.ko has the unknown symbol ?

Greetings,

Nico

p.s.: output of depmod from modules_install:

if [ -r System.map ]; then /sbin/depmod -ae -F System.map  2.5.55; fi
WARNING: /lib/modules/2.5.55/kernel/sound/soundcore.ko needs unknown symbol errno
WARNING: /lib/modules/2.5.55/kernel/drivers/message/i2o/i2o_pci.ko needs unknown symbol i2o_sys_init
WARNING: /lib/modules/2.5.55/kernel/security/root_plug.ko needs unknown symbol usb_bus_list_lock
WARNING: /lib/modules/2.5.55/kernel/security/root_plug.ko needs unknown symbol usb_bus_list
WARNING: /lib/modules/2.5.55/kernel/fs/nfsd/nfsd.ko needs unknown symbol hash_mem
WARNING: /lib/modules/2.5.55/kernel/arch/i386/kernel/microcode.ko needs unknown
symbol devfs_set_file_size


-- 
Please send your messages pgp-signed and/or pgp-encrypted (don't encrypt mails
to mailing list!). If you don't know what pgp is visit www.gnupg.org.
(public pgp key: ftp.schottelius.org/pub/familiy/nico/pgp-key)

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply

* Re: Linus BK tree crashes with PANIC: INIT: segmentation violation
From: Tomas Szepe @ 2003-01-10 21:20 UTC (permalink / raw)
  To: Derek Atkins; +Cc: linux-kernel
In-Reply-To: <sjmlm1t5489.fsf@kikki.mit.edu>

> [warlord@MIT.EDU]
> 
> PANIC: INIT: segmentation violation at 0x804a08c (code)! sleeping for 30 seconds!

I'm seeing the same problem with vanilla 2.5.56 booting in vmware
workstation 3.2.0.

-- 
Tomas Szepe <szepe@pinerecords.com>

^ permalink raw reply

* Re: Using lilo to boot off any drive ...
From: Randy.Dunlap @ 2003-01-10 21:20 UTC (permalink / raw)
  To: Manish Lachwani; +Cc: linux-kernel
In-Reply-To: <20030110210035.76482.qmail@web20502.mail.yahoo.com>

On Fri, 10 Jan 2003, Manish Lachwani wrote:

| In my current setup, I am having 12 ide drives
| connected to a 3ware controller labelled sda to sdl.
| Suppose sde is the drive we want the system to boot
| off. What I do is modify the lilo.conf on sda, sdb,
| sdc etc. to have the "boot" entry point to /dev/sde.
|
| This way when the controller is transferred to lilo on
| sda, it will load the kernel from sde.
|
| consider this. If sda is bad and is not exported to
| the OS or is not detected in the BIOS due to a bad
| cable etc. In this scenario, the OS mappings would
| change. Now, sdb will become sda. The lilo.conf on sdb
| (now sda) would have "boot" parameter still point to
| sde, which is now sdd.
|
| When the control is transferred to lilo on sda (sdb
| actually), is there a way for me to boot off sdd now
| (which was previously sde)? I mean, is there any way
| that lilo can load the appropriate kernel image?
|
| One of the ways I was thinking of was to modify the
| lilo sources to scan for drive serial# and we boot off
| that drive for which the serial# matches. But, does
| anyone have a better alternative?

I'm missing some info about how a BIOS addresses a large
number of IDE drives.  I know about the basic 0x80 = hda
(or C:) and 0x81 = hdb.  Is this still used?
Is it extended for even many more drives?

-- 
~Randy


^ permalink raw reply

* Re: Using lilo to boot off any drive ...
From: Richard B. Johnson @ 2003-01-10 21:28 UTC (permalink / raw)
  To: Manish Lachwani; +Cc: linux-kernel
In-Reply-To: <20030110210035.76482.qmail@web20502.mail.yahoo.com>

On Fri, 10 Jan 2003, Manish Lachwani wrote:

> In my current setup, I am having 12 ide drives
> connected to a 3ware controller labelled sda to sdl.
> Suppose sde is the drive we want the system to boot
> off. What I do is modify the lilo.conf on sda, sdb,
> sdc etc. to have the "boot" entry point to /dev/sde.
> 
> This way when the controller is transferred to lilo on
> sda, it will load the kernel from sde. 
> 
> consider this. If sda is bad and is not exported to
> the OS or is not detected in the BIOS due to a bad
> cable etc. In this scenario, the OS mappings would
> change. Now, sdb will become sda. The lilo.conf on sdb
> (now sda) would have "boot" parameter still point to
> sde, which is now sdd. 
> 
> When the control is transferred to lilo on sda (sdb
> actually), is there a way for me to boot off sdd now
> (which was previously sde)? I mean, is there any way
> that lilo can load the appropriate kernel image?
> 
> One of the ways I was thinking of was to modify the
> lilo sources to scan for drive serial# and we boot off
> that drive for which the serial# matches. But, does
> anyone have a better alternative?
> 
> Thanks
> Manish
> 

When LILO boots, there is no file-system (anywhere)! The
boot-record of LILO contains a table which points to the
contents of the map file. This file exist only when
LILO is being configured, i.e., when Linux is up with a
mounted file-system. The contents of this file describe
the location of all of the pieces of the operating system,
the boot message, and any RAM-disk data. All of these
pieces, plus the data of this file, itself, must be accessible
from the INT 0x13 disk software interrupt when the machine
is being booted.

Since these pieces are known just as:
		BIOS device;
		device_offset;
		data_length;

... not as file-system directory entries that can be "scanned for",
you will not be able to substitute anything. LILO recommends that
all of the boot components be put on one physical drive so you
don't have problems with controllers or the BIOS rearranging
things.

If you want to perform a "smart" boot, then you boot an initial
RAM disk. This allows you to configure the system in way you
want, rearranging disk-drives, even mounting network file-systems
for the root file-system or even falling-back to alternative
file-systems when certain ones are off-line.



Cheers,
Dick Johnson
Penguin : Linux version 2.4.18 on an i686 machine (797.90 BogoMips).
Why is the government concerned about the lunatic fringe? Think about it.



^ permalink raw reply

* Reasonable chunk-size for RAID-5
From: Ian Pilcher @ 2003-01-10 21:17 UTC (permalink / raw)
  To: linux-raid

Can someone suggest a reasonable chunk-size for a RAID-5 array that
spans 3 120GB IDE disks?

Everything I read says that I should spend a day benchmarking things to
find the absolute best value, but I don't need the best value (the array
will be storing a bunch of read-only music files), and I don't feel like
wasting a day on this.

So what values are other folks using for similar arrays?

Thanks!
-- 
========================================================================
Ian Pilcher                                           pilchman@attbi.com
========================================================================


^ permalink raw reply

* [PATCH] Eliminate signals entirely from the mid-layer
From: James Bottomley @ 2003-01-10 21:19 UTC (permalink / raw)
  To: linux-scsi

[-- Attachment #1: Type: text/plain, Size: 346 bytes --]

the attached patch removes SCSI's use of signals for killing the error handler 
thread.  It also:

- changes the eh_notify semaphore to a completion
- adds complete_and_exit() to the thread
- uses a host structure flag to signal thread death instead of the signal

I'm currently travelling, so could someone test it out for me?  Thanks,

James



[-- Attachment #2: tmp.diff --]
[-- Type: text/plain , Size: 5782 bytes --]

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.947   -> 1.948  
#	drivers/scsi/scsi_error.c	1.26    -> 1.27   
#	drivers/scsi/hosts.c	1.42    -> 1.43   
#	drivers/scsi/hosts.h	1.47    -> 1.48   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/01/10	jejb@mulgrave.(none)	1.948
# remove SCSI's use of signals for killing the error handler thread
# 
# - change the eh_notify semaphore to a completion
# - add complete_and_exit() to the thread
# - use a host structure flag to signal thread death instead of the signal
# --------------------------------------------
#
diff -Nru a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
--- a/drivers/scsi/hosts.c	Fri Jan 10 16:14:02 2003
+++ b/drivers/scsi/hosts.c	Fri Jan 10 16:14:02 2003
@@ -36,6 +36,7 @@
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/list.h>
+#include <linux/completion.h>
 
 #define __KERNEL_SYSCALLS__
 
@@ -335,10 +336,10 @@
 	 * Next, kill the kernel error recovery thread for this host.
 	 */
 	if (shost->ehandler) {
-		DECLARE_MUTEX_LOCKED(sem);
+		DECLARE_COMPLETION(sem);
 		shost->eh_notify = &sem;
-		send_sig(SIGPWR, shost->ehandler, 1);
-		down(&sem);
+		up(shost->eh_wait);
+		wait_for_completion(&sem);
 		shost->eh_notify = NULL;
 	}
 
@@ -368,7 +369,7 @@
 {
 	struct Scsi_Host *shost, *shost_scr;
 	int gfp_mask;
-	DECLARE_MUTEX_LOCKED(sem);
+	DECLARE_COMPLETION(sem);
 
         /* Check to see if this host has any error handling facilities */
         if(shost_tp->eh_strategy_handler == NULL &&
@@ -464,7 +465,7 @@
 	 * Now wait for the kernel error thread to initialize itself
 	 * as it might be needed when we scan the bus.
 	 */
-	down(&sem);
+	wait_for_completion(&sem);
 	shost->eh_notify = NULL;
 
 	shost->hostt->present++;
diff -Nru a/drivers/scsi/hosts.h b/drivers/scsi/hosts.h
--- a/drivers/scsi/hosts.h	Fri Jan 10 16:14:02 2003
+++ b/drivers/scsi/hosts.h	Fri Jan 10 16:14:02 2003
@@ -381,11 +381,12 @@
     struct task_struct    * ehandler;  /* Error recovery thread. */
     struct semaphore      * eh_wait;   /* The error recovery thread waits on
                                           this. */
-    struct semaphore      * eh_notify; /* wait for eh to begin */
+    struct completion     * eh_notify; /* wait for eh to begin or end */
     struct semaphore      * eh_action; /* Wait for specific actions on the
                                           host. */
     unsigned int            eh_active:1; /* Indicates the eh thread is awake and active if
                                           this is true. */
+    unsigned int            eh_kill:1; /* set when killing the eh thread */
     wait_queue_head_t       host_wait;
     Scsi_Host_Template    * hostt;
     atomic_t                host_active; /* commands checked out */
diff -Nru a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
--- a/drivers/scsi/scsi_error.c	Fri Jan 10 16:14:02 2003
+++ b/drivers/scsi/scsi_error.c	Fri Jan 10 16:14:02 2003
@@ -27,6 +27,7 @@
 #include <linux/interrupt.h>
 #include <linux/delay.h>
 #include <linux/smp_lock.h>
+#include <linux/completion.h>
 
 #define __KERNEL_SYSCALLS__
 
@@ -41,24 +42,6 @@
 
 #include <scsi/scsi_ioctl.h> /* grr */
 
-/*
- * We must always allow SHUTDOWN_SIGS.  Even if we are not a module,
- * the host drivers that we are using may be loaded as modules, and
- * when we unload these,  we need to ensure that the error handler thread
- * can be shut down.
- *
- * Note - when we unload a module, we send a SIGHUP.  We mustn't
- * enable SIGTERM, as this is how the init shuts things down when you
- * go to single-user mode.  For that matter, init also sends SIGKILL,
- * so we mustn't enable that one either.  We use SIGHUP instead.  Other
- * options would be SIGPWR, I suppose.
- *
- * Changed behavior 1/1/2003 - it turns out, that SIGHUP can get sent
- * to error handlers from a process responsible for their creation.
- * To sidestep that issue, we now use SIGPWR as suggested above.
- */
-#define SHUTDOWN_SIGS	(sigmask(SIGPWR))
-
 #ifdef DEBUG
 #define SENSE_TIMEOUT SCSI_TIMEOUT
 #else
@@ -1593,12 +1576,10 @@
 	int rtn;
 	DECLARE_MUTEX_LOCKED(sem);
 
-	/*
-	 * We only listen to signals if the HA was loaded as a module.
-	 * If the HA was compiled into the kernel, then we don't listen
-	 * to any signals.
-	 */
-	siginitsetinv(&current->blocked, SHUTDOWN_SIGS);
+	spin_lock_irq(&current->sig->siglock);
+	sigfillset(&current->blocked);
+	recalc_sigpending();
+	spin_unlock_irq(&current->sig->siglock);
 
 	lock_kernel();
 
@@ -1624,7 +1605,7 @@
 	 */
 	SCSI_LOG_ERROR_RECOVERY(3, printk("Wake up parent of scsi_eh_%d\n",shost->host_no));
 
-	up(shost->eh_notify);
+	complete(shost->eh_notify);
 
 	while (1) {
 		/*
@@ -1644,7 +1625,7 @@
 		 * semaphores isn't unreasonable.
 		 */
 		down_interruptible(&sem);
-		if (signal_pending(current))
+		if (shost->eh_kill)
 			break;
 
 		SCSI_LOG_ERROR_RECOVERY(1, printk("Error handler scsi_eh_%d waking up\n",shost->host_no));
@@ -1695,13 +1676,9 @@
 	/*
 	 * If anyone is waiting for us to exit (i.e. someone trying to unload
 	 * a driver), then wake up that process to let them know we are on
-	 * the way out the door.  This may be overkill - I *think* that we
-	 * could probably just unload the driver and send the signal, and when
-	 * the error handling thread wakes up that it would just exit without
-	 * needing to touch any memory associated with the driver itself.
+	 * the way out the door.
 	 */
-	if (shost->eh_notify != NULL)
-		up(shost->eh_notify);
+	complete_and_exit(shost->eh_notify, 0);
 }
 
 /**

^ permalink raw reply

* Re: Using lilo to boot off any drive ...
From: Manish Lachwani @ 2003-01-10 21:39 UTC (permalink / raw)
  To: root; +Cc: linux-kernel
In-Reply-To: <Pine.LNX.3.95.1030110161101.10394A-100000@chaos.analogic.com>

Richard,

Thanks for the response. 

Even if I can get the map information using the INT
0x13h disk interrupt, I would still need some way of
knowing if sda has indeed failed. 

What I am thinking of if it is possible to make the
"boot" option in lilo.conf variable. Or better,
introduce a serial# option and the serial# can be
scanned for on startup. Or make use of a lun# option. 

I was also thinking if BIOS id's for the disks can be
used here. Are BIOS id's assigned for all drives?

Thanks
Manish

--- "Richard B. Johnson" <root@chaos.analogic.com>
wrote:
> On Fri, 10 Jan 2003, Manish Lachwani wrote:
> 
> > In my current setup, I am having 12 ide drives
> > connected to a 3ware controller labelled sda to
> sdl.
> > Suppose sde is the drive we want the system to
> boot
> > off. What I do is modify the lilo.conf on sda,
> sdb,
> > sdc etc. to have the "boot" entry point to
> /dev/sde.
> > 
> > This way when the controller is transferred to
> lilo on
> > sda, it will load the kernel from sde. 
> > 
> > consider this. If sda is bad and is not exported
> to
> > the OS or is not detected in the BIOS due to a bad
> > cable etc. In this scenario, the OS mappings would
> > change. Now, sdb will become sda. The lilo.conf on
> sdb
> > (now sda) would have "boot" parameter still point
> to
> > sde, which is now sdd. 
> > 
> > When the control is transferred to lilo on sda
> (sdb
> > actually), is there a way for me to boot off sdd
> now
> > (which was previously sde)? I mean, is there any
> way
> > that lilo can load the appropriate kernel image?
> > 
> > One of the ways I was thinking of was to modify
> the
> > lilo sources to scan for drive serial# and we boot
> off
> > that drive for which the serial# matches. But,
> does
> > anyone have a better alternative?
> > 
> > Thanks
> > Manish
> > 
> 
> When LILO boots, there is no file-system (anywhere)!
> The
> boot-record of LILO contains a table which points to
> the
> contents of the map file. This file exist only when
> LILO is being configured, i.e., when Linux is up
> with a
> mounted file-system. The contents of this file
> describe
> the location of all of the pieces of the operating
> system,
> the boot message, and any RAM-disk data. All of
> these
> pieces, plus the data of this file, itself, must be
> accessible
> from the INT 0x13 disk software interrupt when the
> machine
> is being booted.
> 
> Since these pieces are known just as:
> 		BIOS device;
> 		device_offset;
> 		data_length;
> 
> ... not as file-system directory entries that can be
> "scanned for",
> you will not be able to substitute anything. LILO
> recommends that
> all of the boot components be put on one physical
> drive so you
> don't have problems with controllers or the BIOS
> rearranging
> things.
> 
> If you want to perform a "smart" boot, then you boot
> an initial
> RAM disk. This allows you to configure the system in
> way you
> want, rearranging disk-drives, even mounting network
> file-systems
> for the root file-system or even falling-back to
> alternative
> file-systems when certain ones are off-line.
> 
> 
> 
> Cheers,
> Dick Johnson
> Penguin : Linux version 2.4.18 on an i686 machine
> (797.90 BogoMips).
> Why is the government concerned about the lunatic
> fringe? Think about it.
> 
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

^ permalink raw reply

* Re: Interrupt Routing
From: Dominik Brodowski @ 2003-01-10 21:31 UTC (permalink / raw)
  To: Stephen L Johnson; +Cc: ACPI Dev Mailing List
In-Reply-To: <1042232352.2868.31.camel-EWEM0Crkbjs/2vX+WiJxEB2eb7JE58TQ@public.gmane.org>

Hi Stephen,

Could you please send me a dmesg? CONFIG_ACPI_DEBUG should be enabled :-)

	Dominik

On Fri, Jan 10, 2003 at 02:59:12PM -0600, Stephen L Johnson wrote:
> Somewhere along the way, the interrupt routing on my laptopn has gone
> back to cramming everything onto the same interrupt. Here is my
> /proc/interrupts output:
> 
> sjohnson@rodan:~> cat /proc/interrupts 
>            CPU0       
>   0:     565260          XT-PIC  timer
>   1:       6943          XT-PIC  keyboard
>   2:          0          XT-PIC  cascade
>   9:      72990          XT-PIC  acpi, ohci1394, usb-uhci, usb-uhci,
> usb-uhci, Ricoh Co Ltd RL5c475, Texas Instruments PCI1410 PC card
> Cardbus Controller, Intel 82801CA-ICH3, eth0
>  11:        484          XT-PIC  sonypi
>  12:      76803          XT-PIC  PS/2 Mouse
>  14:      29615          XT-PIC  ide0
> NMI:          0 
> LOC:     565211 
> ERR:          0
> MIS:          0
> 
> This is on a Sony Vaio R505-ES running 2.4.20 with acpi-20021212.
> 
> 
> -- 
> Stephen L Johnson <sjohnson-WpdXj7kV/NVg9hUCZPvPmw@public.gmane.org>
> 
> 
> 
> -------------------------------------------------------
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.com
> _______________________________________________
> Acpi-devel mailing list
> Acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/acpi-devel


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com

^ permalink raw reply

* [PATCH 2.5.56] cpufreq: new p4-m stepping 7
From: Dominik Brodowski @ 2003-01-10 21:43 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, cpufreq


Add support for mobile Pentium IV processors with stepping 7.

        Dominik

diff -ruN linux-original/arch/i386/kernel/cpu/cpufreq/speedstep.c linux/arch/i386/kernel/cpu/cpufreq/speedstep.c
--- linux-original/arch/i386/kernel/cpu/cpufreq/speedstep.c	2003-01-10 21:55:28.000000000 +0100
+++ linux/arch/i386/kernel/cpu/cpufreq/speedstep.c	2003-01-10 22:13:33.000000000 +0100
@@ -447,7 +447,7 @@
 		if (c->x86_model != 2)
 			return 0;
 
-		if (c->x86_mask != 4)
+		if ((c->x86_mask != 4) && (c->x86_mask != 7))
 			return 0;
 
 		ebx = cpuid_ebx(0x00000001);

^ permalink raw reply

* [PATCH 2.5.56] cpufreq: #defines update
From: Dominik Brodowski @ 2003-01-10 21:41 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, cpufreq, akpm


Make gcc-2.91.66 happy. Noted by Andrew Morton - thanks.

        Dominik

diff -ruN linux-original/kernel/cpufreq.c linux/kernel/cpufreq.c
--- linux-original/kernel/cpufreq.c	2003-01-10 21:56:32.000000000 +0100
+++ linux/kernel/cpufreq.c	2003-01-10 22:11:24.000000000 +0100
@@ -734,8 +734,8 @@
 }
 
 #else
-#define cpufreq_sysctl_init()
-#define cpufreq_sysctl_exit()
+#define cpufreq_sysctl_init() do {} while(0)
+#define cpufreq_sysctl_exit() do {} while(0)
 #endif /* CONFIG_SYSCTL */
 #endif /* CONFIG_CPU_FREQ_24_API */
 
@@ -946,7 +946,7 @@
 		loops_per_jiffy = cpufreq_scale(l_p_j_ref, l_p_j_ref_freq, ci->new);
 }
 #else
-#define adjust_jiffies(...)
+#define adjust_jiffies(x...) do {} while (0)
 #endif
 
 
@@ -1131,6 +1131,6 @@
 }
 EXPORT_SYMBOL_GPL(cpufreq_restore);
 #else
-#define cpufreq_restore()
+#define cpufreq_restore() do {} while (0)
 #endif /* CONFIG_PM */
 

^ permalink raw reply

* Re: 2.5: Link errors are shown in the wrong files
From: Kai Germaschewski @ 2003-01-10 21:42 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Sam Ravnborg, linux-kernel
In-Reply-To: <20030110202649.GP6626@fs.tum.de>

On Fri, 10 Jan 2003, Adrian Bunk wrote:

> I'm doing regular compile tests with 2.4 and 2.5 kernels to catch and 
> either fix or report compile errors.
> 
> Since several revisions 2.5 has the _very_ annoying behavior of showing 
> link errors in the wrong files. This makes finding the cause of the 
> problems harder.

> drivers/built-in.o(.init.text+0x51901):/home/bunk/linux/kernel-2.5/linux-2.5.55/drivers/atm/lanai.c: 
> undefined reference to `_ebss'
> [...]

> I'm using the gcc 2.95 and binutils 2.13.90.0.16 from Debian unstable.

Here I get e.g.

drivers/built-in.o: In function `isdn_audio_put_dle_code':
drivers/built-in.o(.text+0xe2247): undefined reference to `save_flags'
drivers/built-in.o(.text+0xe224c): undefined reference to `cli'
drivers/built-in.o(.text+0xe226f): undefined reference to `restore_flags'

which is actually correct. My ld doesn't output the name of the file the 
function was in at all, though. I'm rather sure that you're hitting a 
binutils bug, possibly triggered by the use of the ld during the kernel 
build, which creates multiple levels of composite objects (ld -r) before 
the final link.

Maybe you updated binutils and that's when the problems started?

--Kai




^ permalink raw reply

* Re: SSH doesnt properly logout
From: Milan P. Stanic @ 2003-01-10 21:34 UTC (permalink / raw)
  To: linux-admin
In-Reply-To: <Pine.LNX.4.44.0301101716460.199-100000@frontdoor.tjfisher.co.uk>

On Fri, Jan 10, 2003 at 05:18:02PM +0000, Toby Fisher wrote:
> > nohup make bootstrap >& build.log &
> 
> nohup does not require the trailing &, and you could tell nohup to use
> build.log without the redirection, see the nohup man page.

Hmmmm... strange. Info page for nohup on Debian/Woody says just
opposite. Here it is:
---------------------------------------------------------------------
   `nohup' does not automatically put the command it runs in the
background; you must do that explicitly, by ending the command line
with an `&'.
---------------------------------------------------------------------

Milan

^ permalink raw reply

* [PATCH 2.5.56] cpufreq: frequency table helpers
From: Dominik Brodowski @ 2003-01-10 21:45 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, cpufreq

This patch adds "frequency table helpers" to kernel/cpufreq.c and
updates some drivers to use them.

Most CPU frequency scaling methods only support a few static
frequencies. In these drivers a lot of duplicated code existed in the
->setpolicy and ->verify calls.

Please note that this in no way changes the behaviour of cpufreq or of
the ->setpolicy or ->verify calls. These "frequency table helpers"
aren't for drivers which either only support policies (longrun) or
really many frequency states (ARM, gx-suspmod).

       Dominik

 arch/i386/kernel/cpu/cpufreq/elanfreq.c    |   83 ++++++-------------
 arch/i386/kernel/cpu/cpufreq/p4-clockmod.c |   97 +++++++----------------
 arch/i386/kernel/cpu/cpufreq/powernow-k6.c |  122 ++++++++---------------------
 arch/i386/kernel/cpu/cpufreq/speedstep.c   |   57 +++++--------
 include/linux/cpufreq.h                    |   23 +++++
 kernel/cpufreq.c                           |  117 +++++++++++++++++++++++++++
6 files changed, 257 insertions(+), 242 deletions(-)

diff -ruN linux-original/arch/i386/kernel/cpu/cpufreq/elanfreq.c linux/arch/i386/kernel/cpu/cpufreq/elanfreq.c
--- linux-original/arch/i386/kernel/cpu/cpufreq/elanfreq.c	2003-01-10 21:55:28.000000000 +0100
+++ linux/arch/i386/kernel/cpu/cpufreq/elanfreq.c	2003-01-10 22:16:10.000000000 +0100
@@ -61,6 +61,18 @@
 	{99000,	0x01,	0x05}
 };
 
+static struct cpufreq_frequency_table elanfreq_table[] = {
+	{0,	1000},
+	{1,	2000},
+	{2,	4000},
+	{3,	8000},
+	{4,	16000},
+	{5,	33000},
+	{6,	66000},
+	{7,	99000},
+	{0,	CPUFREQ_TABLE_END},
+};
+
 
 /**
  *	elanfreq_get_cpu_frequency: determine current cpu speed
@@ -172,63 +184,17 @@
 
 static int elanfreq_verify (struct cpufreq_policy *policy)
 {
-	unsigned int    number_states = 0;
-	unsigned int    i;
-
-	if (!policy || !max_freq)
-		return -EINVAL;
-
-	policy->cpu = 0;
-
-	cpufreq_verify_within_limits(policy, 1000, max_freq);
-
-	for (i=7; i>=0; i--)
-		if ((elan_multiplier[i].clock >= policy->min) &&
-		    (elan_multiplier[i].clock <= policy->max))
-			number_states++;
-
-	if (number_states)
-		return 0;
-
-	for (i=7; i>=0; i--)
-		if (elan_multiplier[i].clock < policy->max)
-			break;
-
-	policy->max = elan_multiplier[i+1].clock;
-
-	cpufreq_verify_within_limits(policy, 1000, max_freq);
-
-	return 0;
+	return cpufreq_frequency_table_verify(policy, &elanfreq_table[0]);
 }
 
 static int elanfreq_setpolicy (struct cpufreq_policy *policy)
 {
-	unsigned int    i;
-	unsigned int    optimal = 8;
-
-	if (!elanfreq_driver)
-		return -EINVAL;
+	unsigned int    newstate = 0;
 
-	for (i=0; i<8; i++) {
-		if ((elan_multiplier[i].clock > policy->max) ||
-		    (elan_multiplier[i].clock < policy->min))
-			continue;
-		switch(policy->policy) {
-		case CPUFREQ_POLICY_POWERSAVE:
-			if (optimal == 8)
-				optimal = i;
-			break;
-		case CPUFREQ_POLICY_PERFORMANCE:
-			optimal = i;
-			break;
-		default:
-			return -EINVAL;
-		}
-	}
-	if ((optimal == 8) || (elan_multiplier[optimal].clock > max_freq))
+	if (cpufreq_frequency_table_setpolicy(policy, &elanfreq_table[0], &newstate))
 		return -EINVAL;
 
-	elanfreq_set_cpu_state(optimal);
+	elanfreq_set_cpu_state(newstate);
 
 	return 0;
 }
@@ -262,7 +228,7 @@
 {	
 	struct cpuinfo_x86 *c = cpu_data;
 	struct cpufreq_driver *driver;
-	int ret;
+	int ret, i;
 
 	/* Test if we have the right hardware */
 	if ((c->x86_vendor != X86_VENDOR_AMD) ||
@@ -282,6 +248,12 @@
 	if (!max_freq)
 		max_freq = elanfreq_get_cpu_frequency();
 
+	/* table init */
+ 	for (i=0; (elanfreq_table[i].frequency != CPUFREQ_TABLE_END); i++) {
+		if (elanfreq_table[i].frequency > max_freq)
+			elanfreq_table[i].frequency = CPUFREQ_ENTRY_INVALID;
+	}
+
 #ifdef CONFIG_CPU_FREQ_24_API
 	driver->cpu_cur_freq[0] = elanfreq_get_cpu_frequency();
 #endif
@@ -290,11 +262,12 @@
 	driver->setpolicy     = &elanfreq_setpolicy;
 
 	driver->policy[0].cpu    = 0;
-	driver->policy[0].min    = 1000;
-	driver->policy[0].max    = max_freq;
+	ret = cpufreq_frequency_table_cpuinfo(&driver->policy[0], &elanfreq_table[0]);
+	if (ret) {
+		kfree(driver);
+		return ret;
+	}
 	driver->policy[0].policy = CPUFREQ_POLICY_PERFORMANCE;
-	driver->policy[0].cpuinfo.max_freq = max_freq;
-	driver->policy[0].cpuinfo.min_freq = 1000;
 	driver->policy[0].cpuinfo.transition_latency = CPUFREQ_ETERNAL;
 
 	elanfreq_driver = driver;
diff -ruN linux-original/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c linux/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c
--- linux-original/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c	2003-01-10 21:55:28.000000000 +0100
+++ linux/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c	2003-01-10 22:16:10.000000000 +0100
@@ -141,39 +141,27 @@
 }
 
 
+static struct cpufreq_frequency_table p4clockmod_table[] = {
+	{DC_RESV, CPUFREQ_ENTRY_INVALID},
+	{DC_DFLT, 0},
+	{DC_25PT, 0},
+	{DC_38PT, 0},
+	{DC_50PT, 0},
+	{DC_64PT, 0},
+	{DC_75PT, 0},
+	{DC_88PT, 0},
+	{DC_DISABLE, 0},
+	{DC_RESV, CPUFREQ_TABLE_END},
+};
+
+
 static int cpufreq_p4_setpolicy(struct cpufreq_policy *policy)
 {
-	unsigned int    i;
-	unsigned int    newstate = 0;
-	unsigned int    number_states = 0;
-	unsigned int    minstate = 1;
+	unsigned int    newstate = DC_RESV;
 
-	if (!cpufreq_p4_driver || !stock_freq || 
-	    !policy || !cpu_online(policy->cpu))
+	if (cpufreq_frequency_table_setpolicy(policy, &p4clockmod_table[0], &newstate))
 		return -EINVAL;
 
-	if (has_N44_O17_errata)
-		minstate = 3;
-
-	if (policy->policy == CPUFREQ_POLICY_POWERSAVE)
-	{
-		for (i=8; i>=minstate; i--)
-			if ((policy->min <= ((stock_freq / 8) * i)) &&
-			    (policy->max >= ((stock_freq / 8) * i))) 
-			{
-				newstate = i;
-				number_states++;
-			}
-	} else {
-		for (i=minstate; i<=8; i++)
-			if ((policy->min <= ((stock_freq / 8) * i)) &&
-			    (policy->max >= ((stock_freq / 8) * i))) 
-			{
-				newstate = i;
-				number_states++;
-			}
-	}
-
 	cpufreq_p4_setdc(policy->cpu, newstate);
 
 	return 0;
@@ -182,34 +170,7 @@
 
 static int cpufreq_p4_verify(struct cpufreq_policy *policy)
 {
-	unsigned int    number_states = 0;
-	unsigned int    i = 1;
-
-	if (!cpufreq_p4_driver || !stock_freq || 
-	    !policy || !cpu_online(policy->cpu))
-		return -EINVAL;
-
-	cpufreq_verify_within_limits(policy, 
-				     policy->cpuinfo.min_freq, 
-				     policy->cpuinfo.max_freq);
-
-	if (has_N44_O17_errata)
-		i = 3;
-
-	/* is there at least one state within the limit? */
-	for (; i<=8; i++)
-		if ((policy->min <= ((stock_freq / 8) * i)) &&
-		    (policy->max >= ((stock_freq / 8) * i)))
-			number_states++;
-
-	if (number_states)
-		return 0;
-
-	policy->max = (stock_freq / 8) * (((unsigned int) ((policy->max * 8) / stock_freq)) + 1);
-	cpufreq_verify_within_limits(policy, 
-				     policy->cpuinfo.min_freq, 
-				     policy->cpuinfo.max_freq);
-	return 0;
+	return cpufreq_frequency_table_verify(policy, &p4clockmod_table[0]);
 }
 
 
@@ -262,6 +223,15 @@
 
 	driver->policy = (struct cpufreq_policy *) (driver + 1);
 
+	/* table init */
+	for (i=1; (p4clockmod_table[i].frequency != CPUFREQ_TABLE_END); i++) {
+		if ((i<2) && (has_N44_O17_errata))
+			p4clockmod_table[i].frequency = CPUFREQ_ENTRY_INVALID;
+		else
+			p4clockmod_table[i].frequency = (stock_freq * i)/8;
+	}
+	
+
 #ifdef CONFIG_CPU_FREQ_24_API
 	for (i=0;i<NR_CPUS;i++) {
 		driver->cpu_cur_freq[i] = stock_freq;
@@ -272,17 +242,14 @@
 	driver->setpolicy     = &cpufreq_p4_setpolicy;
 
 	for (i=0;i<NR_CPUS;i++) {
-		if (has_N44_O17_errata)
-			driver->policy[i].min    = (stock_freq * 3) / 8;
-		else
-			driver->policy[i].min    = stock_freq / 8;
-		driver->policy[i].max    = stock_freq;
+		driver->policy[i].cpu    = i;
+		ret = cpufreq_frequency_table_cpuinfo(&driver->policy[i], &p4clockmod_table[0]);
+		if (ret) {
+			kfree(driver);
+			return ret;
+		}
 		driver->policy[i].policy = CPUFREQ_POLICY_PERFORMANCE;
-		driver->policy[i].cpuinfo.min_freq  = driver->policy[i].min;
-		driver->policy[i].cpuinfo.max_freq  = stock_freq;
 		driver->policy[i].cpuinfo.transition_latency = CPUFREQ_ETERNAL;
-
-		driver->policy[i].cpu    = i;
 	}
 
 	cpufreq_p4_driver = driver;
diff -ruN linux-original/arch/i386/kernel/cpu/cpufreq/powernow-k6.c linux/arch/i386/kernel/cpu/cpufreq/powernow-k6.c
--- linux-original/arch/i386/kernel/cpu/cpufreq/powernow-k6.c	2003-01-10 21:55:28.000000000 +0100
+++ linux/arch/i386/kernel/cpu/cpufreq/powernow-k6.c	2003-01-10 22:16:10.000000000 +0100
@@ -31,15 +31,16 @@
 
 
 /* Clock ratio multiplied by 10 - see table 27 in AMD#23446 */
-static int clock_ratio[8] = {
-	45,  /* 000 -> 4.5x */
-	50,  /* 001 -> 5.0x */
-	40,  /* 010 -> 4.0x */
-	55,  /* 011 -> 5.5x */
-	20,  /* 100 -> 2.0x */
-	30,  /* 101 -> 3.0x */
-	60,  /* 110 -> 6.0x */
-	35   /* 111 -> 3.5x */
+static struct cpufreq_frequency_table clock_ratio[] = {
+	{45,  /* 000 -> 4.5x */ 0},
+	{50,  /* 001 -> 5.0x */ 0},
+	{40,  /* 010 -> 4.0x */ 0},
+	{55,  /* 011 -> 5.5x */ 0},
+	{20,  /* 100 -> 2.0x */ 0},
+	{30,  /* 101 -> 3.0x */ 0},
+	{60,  /* 110 -> 6.0x */ 0},
+	{35,  /* 111 -> 3.5x */ 0},
+	{0, CPUFREQ_TABLE_END}
 };
 
 
@@ -60,7 +61,7 @@
 	msrval = POWERNOW_IOPORT + 0x0;
 	wrmsr(MSR_K6_EPMR, msrval, 0); /* disable it again */
 
-	return clock_ratio[(invalue >> 5)&7];
+	return clock_ratio[(invalue >> 5)&7].index;
 }
 
 
@@ -82,7 +83,7 @@
 	}
 
 	freqs.old = busfreq * powernow_k6_get_cpu_multiplier();
-	freqs.new = busfreq * clock_ratio[best_i];
+	freqs.new = busfreq * clock_ratio[best_i].index;
 	freqs.cpu = 0; /* powernow-k6.c is UP only driver */
 	
 	cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
@@ -115,39 +116,7 @@
  */
 static int powernow_k6_verify(struct cpufreq_policy *policy)
 {
-	unsigned int    number_states = 0;
-	unsigned int    i, j;
-
-	if (!policy || !busfreq)
-		return -EINVAL;
-
-	policy->cpu = 0;
-	cpufreq_verify_within_limits(policy, (20 * busfreq),
-				     (max_multiplier * busfreq));
-
-	for (i=0; i<8; i++)
-		if ((policy->min <= (busfreq * clock_ratio[i])) &&
-		    (policy->max >= (busfreq * clock_ratio[i])))
-			number_states++;
-
-	if (number_states)
-		return 0;
-
-	/* no state is available within range -- find next larger state */
-
-	j = 6;
-
-	for (i=0; i<8; i++)
-		if (((clock_ratio[i] * busfreq) >= policy->min) &&
-		    (clock_ratio[i] < clock_ratio[j]))
-			j = i;
-
-	policy->max = clock_ratio[j] * busfreq;
-
-	cpufreq_verify_within_limits(policy, (20 * busfreq),
-				     (max_multiplier * busfreq));
-
-	return 0;
+	return cpufreq_frequency_table_verify(policy, &clock_ratio[0]);
 }
 
 
@@ -159,43 +128,12 @@
  */
 static int powernow_k6_setpolicy (struct cpufreq_policy *policy)
 {
-	unsigned int    i;
-	unsigned int    optimal;
+	unsigned int    newstate = 0;
 
-	if (!powernow_driver || !policy || policy->cpu)
+	if (cpufreq_frequency_table_setpolicy(policy, &clock_ratio[0], &newstate))
 		return -EINVAL;
 
-	switch(policy->policy) {
-	case CPUFREQ_POLICY_POWERSAVE:
-		optimal = 6;
-		break;
-	case CPUFREQ_POLICY_PERFORMANCE:
-		optimal = max_multiplier;
-		break;
-	default:
-		return -EINVAL;
-	}
-
-	for (i=0;i<8;i++) {
-		unsigned int freq = busfreq * clock_ratio[i];
-		if (clock_ratio[i] > max_multiplier)
-			continue;
-		if ((freq > policy->max) ||
-		    (freq < policy->min))
-			continue;
-		switch(policy->policy) {
-		case CPUFREQ_POLICY_POWERSAVE:
-			if (freq < (clock_ratio[optimal] * busfreq))
-				optimal = i;
-			break;
-		case CPUFREQ_POLICY_PERFORMANCE:
-			if (freq > (clock_ratio[optimal] * busfreq))
-				optimal = i;
-			break;
-		}
-	}
-
-	powernow_k6_set_state(optimal);
+	powernow_k6_set_state(newstate);
 
 	return 0;
 }
@@ -213,6 +151,7 @@
 	struct cpuinfo_x86      *c = cpu_data;
 	struct cpufreq_driver   *driver;
 	unsigned int            result;
+	unsigned int            i;
 
 	if ((c->x86_vendor != X86_VENDOR_AMD) || (c->x86 != 5) ||
 		((c->x86_model != 12) && (c->x86_model != 13)))
@@ -235,20 +174,29 @@
 	}
 	driver->policy = (struct cpufreq_policy *) (driver + 1);
 
-#ifdef CONFIG_CPU_FREQ_24_API
-	driver->cpu_cur_freq[0]  = busfreq * max_multiplier;
-#endif
+	/* table init */
+ 	for (i=0; (clock_ratio[i].frequency != CPUFREQ_TABLE_END); i++) {
+		if (clock_ratio[i].index > max_multiplier)
+			clock_ratio[i].frequency = CPUFREQ_ENTRY_INVALID;
+		else
+			clock_ratio[i].frequency = busfreq * clock_ratio[i].index;
+	}
 
 	driver->verify        = &powernow_k6_verify;
 	driver->setpolicy     = &powernow_k6_setpolicy;
 
+	/* cpuinfo and default policy values */
 	driver->policy[0].cpu    = 0;
-	driver->policy[0].min    = busfreq * 20;
-	driver->policy[0].max    = busfreq * max_multiplier;
-	driver->policy[0].policy = CPUFREQ_POLICY_PERFORMANCE;
-	driver->policy[0].cpuinfo.max_freq = busfreq * max_multiplier;
-	driver->policy[0].cpuinfo.min_freq = busfreq * 20;
 	driver->policy[0].cpuinfo.transition_latency = CPUFREQ_ETERNAL;
+	driver->policy[0].policy = CPUFREQ_POLICY_PERFORMANCE;
+#ifdef CONFIG_CPU_FREQ_24_API
+	driver->cpu_cur_freq[0]  = busfreq * max_multiplier;
+#endif
+	result = cpufreq_frequency_table_cpuinfo(&driver->policy[0], &clock_ratio[0]);
+	if (result) {
+		kfree(driver);
+		return result;
+	}
 
 	powernow_driver = driver;
 
@@ -274,7 +222,7 @@
 
 	if (powernow_driver) {
 		for (i=0;i<8;i++)
-			if (clock_ratio[i] == max_multiplier)
+			if (clock_ratio[i].index == max_multiplier)
 				powernow_k6_set_state(i);		
 		cpufreq_unregister();
 		kfree(powernow_driver);
diff -ruN linux-original/arch/i386/kernel/cpu/cpufreq/speedstep.c linux/arch/i386/kernel/cpu/cpufreq/speedstep.c
--- linux-original/arch/i386/kernel/cpu/cpufreq/speedstep.c	2003-01-10 22:15:01.000000000 +0100
+++ linux/arch/i386/kernel/cpu/cpufreq/speedstep.c	2003-01-10 22:16:10.000000000 +0100
@@ -58,12 +58,18 @@
  *   There are only two frequency states for each processor. Values
  * are in kHz for the time being.
  */
-static unsigned int                     speedstep_low_freq;
-static unsigned int                     speedstep_high_freq;
-
 #define SPEEDSTEP_HIGH                  0x00000000
 #define SPEEDSTEP_LOW                   0x00000001
 
+static struct cpufreq_frequency_table speedstep_freqs[] = {
+	{SPEEDSTEP_HIGH, 	0},
+	{SPEEDSTEP_LOW,		0},
+	{0,			CPUFREQ_TABLE_END},
+};
+
+#define speedstep_low_freq	speedstep_freqs[SPEEDSTEP_LOW].frequency
+#define speedstep_high_freq	speedstep_freqs[SPEEDSTEP_HIGH].frequency
+
 
 /* DEBUG
  *   Define it if you want verbose debug output, e.g. for bug reporting
@@ -569,22 +575,13 @@
  */
 static int speedstep_setpolicy (struct cpufreq_policy *policy)
 {
-	if (!speedstep_driver || !policy)
+	unsigned int    newstate = 0;
+
+	if (cpufreq_frequency_table_setpolicy(policy, &speedstep_freqs[0], &newstate))
 		return -EINVAL;
 
-	if (policy->min > speedstep_low_freq) 
-		speedstep_set_state(SPEEDSTEP_HIGH, 1);
-	else {
-		if (policy->max < speedstep_high_freq)
-			speedstep_set_state(SPEEDSTEP_LOW, 1);
-		else {
-			/* both frequency states are allowed */
-			if (policy->policy == CPUFREQ_POLICY_POWERSAVE)
-				speedstep_set_state(SPEEDSTEP_LOW, 1);
-			else
-				speedstep_set_state(SPEEDSTEP_HIGH, 1);
-		}
-	}
+	speedstep_set_state(newstate, 1);
+
 	return 0;
 }
 
@@ -598,19 +595,7 @@
  */
 static int speedstep_verify (struct cpufreq_policy *policy)
 {
-	if (!policy || !speedstep_driver || 
-	    !speedstep_low_freq || !speedstep_high_freq)
-		return -EINVAL;
-
-	policy->cpu = 0; /* UP only */
-
-	cpufreq_verify_within_limits(policy, speedstep_low_freq, speedstep_high_freq);
-
-	if ((policy->min > speedstep_low_freq) && 
-	    (policy->max < speedstep_high_freq))
-		policy->max = speedstep_high_freq;
-	
-	return 0;
+	return cpufreq_frequency_table_verify(policy, &speedstep_freqs[0]);
 }
 
 
@@ -692,6 +677,13 @@
 
 	driver->policy = (struct cpufreq_policy *) (driver + 1);
 
+	driver->policy[0].cpu    = 0;
+	result = cpufreq_frequency_table_cpuinfo(&driver->policy[0], &speedstep_freqs[0]);
+	if (result) {
+		kfree(driver);
+		return result;
+	}
+
 #ifdef CONFIG_CPU_FREQ_24_API
 	driver->cpu_cur_freq[0] = speed;
 #endif
@@ -699,11 +691,6 @@
 	driver->verify      = &speedstep_verify;
 	driver->setpolicy   = &speedstep_setpolicy;
 
-	driver->policy[0].cpu    = 0;
-	driver->policy[0].min    = speedstep_low_freq;
-	driver->policy[0].max    = speedstep_high_freq;
-	driver->policy[0].cpuinfo.min_freq = speedstep_low_freq;
-	driver->policy[0].cpuinfo.max_freq = speedstep_high_freq;
 	driver->policy[0].cpuinfo.transition_latency = CPUFREQ_ETERNAL;
 
 	driver->policy[0].policy = (speed == speedstep_low_freq) ? 
diff -ruN linux-original/include/linux/cpufreq.h linux/include/linux/cpufreq.h
--- linux-original/include/linux/cpufreq.h	2003-01-10 21:56:23.000000000 +0100
+++ linux/include/linux/cpufreq.h	2003-01-10 22:16:10.000000000 +0100
@@ -241,4 +241,27 @@
 
 #endif /* CONFIG_CPU_FREQ_24_API */
 
+/*********************************************************************
+ *                     FREQUENCY TABLE HELPERS                       *
+ *********************************************************************/
+
+#define CPUFREQ_ENTRY_INVALID ~0
+#define CPUFREQ_TABLE_END     ~1
+
+struct cpufreq_frequency_table {
+	unsigned int	index;     /* any */
+	unsigned int	frequency; /* kHz - doesn't need to be in ascending
+				    * order */
+};
+
+int cpufreq_frequency_table_cpuinfo(struct cpufreq_policy *policy,
+				    struct cpufreq_frequency_table *table);
+
+int cpufreq_frequency_table_verify(struct cpufreq_policy *policy,
+				   struct cpufreq_frequency_table *table);
+
+int cpufreq_frequency_table_setpolicy(struct cpufreq_policy *policy,
+				      struct cpufreq_frequency_table *table,
+				      unsigned int *index);
+
 #endif /* _LINUX_CPUFREQ_H */
diff -ruN linux-original/kernel/cpufreq.c linux/kernel/cpufreq.c
--- linux-original/kernel/cpufreq.c	2003-01-10 22:13:42.000000000 +0100
+++ linux/kernel/cpufreq.c	2003-01-10 22:16:10.000000000 +0100
@@ -1134,3 +1134,120 @@
 #define cpufreq_restore() do {} while (0)
 #endif /* CONFIG_PM */
 
+
+/*********************************************************************
+ *                     FREQUENCY TABLE HELPERS                       *
+ *********************************************************************/
+
+int cpufreq_frequency_table_cpuinfo(struct cpufreq_policy *policy,
+				    struct cpufreq_frequency_table *table)
+{
+	unsigned int min_freq = ~0;
+	unsigned int max_freq = 0;
+	unsigned int i = 0;
+
+	for (i=0; (table[i].frequency != CPUFREQ_TABLE_END); i++) {
+		unsigned int freq = table[i].frequency;
+		if (freq == CPUFREQ_ENTRY_INVALID)
+			continue;
+		if (freq < min_freq)
+			min_freq = freq;
+		if (freq > max_freq)
+			max_freq = freq;
+	}
+
+	policy->min = policy->cpuinfo.min_freq = min_freq;
+	policy->max = policy->cpuinfo.max_freq = max_freq;
+
+	if (policy->min == ~0)
+		return -EINVAL;
+	else
+		return 0;
+}
+EXPORT_SYMBOL_GPL(cpufreq_frequency_table_cpuinfo);
+
+
+int cpufreq_frequency_table_verify(struct cpufreq_policy *policy,
+				   struct cpufreq_frequency_table *table)
+{
+	unsigned int next_larger = ~0;
+	unsigned int i = 0;
+	unsigned int count = 0;
+
+	if (!cpu_online(policy->cpu))
+		return -EINVAL;
+
+	cpufreq_verify_within_limits(policy, 
+				     policy->cpuinfo.min_freq, 
+				     policy->cpuinfo.max_freq);
+
+	for (i=0; (table[i].frequency != CPUFREQ_TABLE_END); i++) {
+		unsigned int freq = table[i].frequency;
+		if (freq == CPUFREQ_ENTRY_INVALID)
+			continue;
+		if ((freq >= policy->min) && (freq <= policy->max))
+			count++;
+		else if ((next_larger > freq) && (freq > policy->max))
+			next_larger = freq;
+	}
+
+	if (!count)
+		policy->max = next_larger;
+
+	cpufreq_verify_within_limits(policy, 
+				     policy->cpuinfo.min_freq, 
+				     policy->cpuinfo.max_freq);
+
+	return 0;
+}
+EXPORT_SYMBOL_GPL(cpufreq_frequency_table_verify);
+
+
+int cpufreq_frequency_table_setpolicy(struct cpufreq_policy *policy,
+				      struct cpufreq_frequency_table *table,
+				      unsigned int *index)
+{
+	struct cpufreq_frequency_table optimal = { .index = ~0, };
+	unsigned int i;
+
+	switch (policy->policy) {
+	case CPUFREQ_POLICY_PERFORMANCE:
+		optimal.frequency = 0;
+		break;
+	case CPUFREQ_POLICY_POWERSAVE:
+		optimal.frequency = ~0;
+		break;
+	}
+
+	if (!cpu_online(policy->cpu))
+		return -EINVAL;
+
+	for (i=0; (table[i].frequency != CPUFREQ_TABLE_END); i++) {
+		unsigned int freq = table[i].frequency;
+		if (freq == CPUFREQ_ENTRY_INVALID)
+			continue;
+		if ((freq < policy->min) || (freq > policy->max))
+			continue;
+		switch(policy->policy) {
+		case CPUFREQ_POLICY_PERFORMANCE:
+			if (optimal.frequency <= freq) {
+				optimal.frequency = freq;
+				optimal.index = i;
+			}
+			break;
+		case CPUFREQ_POLICY_POWERSAVE:
+			if (optimal.frequency >= freq) {
+				optimal.frequency = freq;
+				optimal.index = i;
+			}
+			break;
+		}
+	}
+	if (optimal.index > i)
+		return -EINVAL;
+
+	*index = optimal.index;
+	
+	return 0;
+}
+EXPORT_SYMBOL_GPL(cpufreq_frequency_table_setpolicy);

^ permalink raw reply

* Re: [patch 2.5] 2-pass PCI probing, generic part
From: Ivan Kokshaysky @ 2003-01-10 21:42 UTC (permalink / raw)
  To: Grant Grundler
  Cc: Eric W. Biederman, Linus Torvalds, Ivan Kokshaysky,
	Benjamin Herrenschmidt, Alan Cox, Paul Mackerras, davidm,
	Linux Kernel Mailing List, greg
In-Reply-To: <20030110190030.GA23108@cup.hp.com>

On Fri, Jan 10, 2003 at 11:00:30AM -0800, Grant Grundler wrote:
> Or dynamically assigns windows to PCI Bus controllers as PCI devices
> are brought on-line.

Eh? In general case, to make room for newly added device, you have
to shutdown the whole PCI bus starting from level 0, reassign _all_
BARs and bridge windows and then restart...
The "hotplug resource reservation" is the only viable approach, it has
been discussed numerous times.

> For PCI Hotplug, the role of managing MMIO/IRQ
> resources has moved to the OS since these services are needed
> after the OS has taken control of the box.

100% agree. :-)

> One 256MB BAR isn't so bad. It's when the customer wants to have a central
> server that has 2 or more such cards...64-bit BARs on 64-bit architecture
> make life alot easier.

I believe 1GB is a theoretical maximum for a 32-bit BAR. Everything above
that has to be 64-bit.

Ivan.

^ permalink raw reply


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.