* Re: "Mother" == "computer-illiterate"
From: Henning P. Schmiedehausen @ 2003-01-10 10:35 UTC (permalink / raw)
To: linux-kernel
In-Reply-To: <1042153890.28469.21.camel@irongate.swansea.linux.org.uk>
Alan Cox <alan@lxorguk.ukuu.org.uk> writes:
>On Thu, 2003-01-09 at 19:40, Val Henson wrote:
>> P.S. For extra credit (but no ThinkGeek certificate) you can look up
>> the following women in computer science, some of whom are mothers:
>> Mary Baker, Margo Seltzer, Monica Lam, Ellen Spertus, Carla Ellis, and
>> Barbara Simons.
>and of course Sally Floyd, and even Hedy Lamarr (bonus points for those
>who know what her networking related patent is on)
Come on, she actually has a homepage: http://www.hedylamarr.at/
-> frequency hopping
Regards
Henning
--
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen -- Geschaeftsfuehrer
INTERMETA - Gesellschaft fuer Mehrwertdienste mbH hps@intermeta.de
Am Schwabachgrund 22 Fon.: 09131 / 50654-0 info@intermeta.de
D-91054 Buckenhof Fax.: 09131 / 50654-20
^ permalink raw reply
* Re: [Linux-fbdev-devel] rotation.
From: Antonino Daplas @ 2003-01-10 10:26 UTC (permalink / raw)
To: James Simmons
Cc: Linux Fbdev development list, Linux Kernel Mailing List,
Geert Uytterhoeven
In-Reply-To: <Pine.LNX.4.44.0301091949560.5660-100000@phoenix.infradead.org>
On Fri, 2003-01-10 at 03:54, James Simmons wrote:
>
> > However, as Geert mentioned, if you want to support rotation
> > generically, then you have to do it in the fbcon level. The driver need
> > not know if the display is rotated or not. All it needs to do is fill a
> > region with color, color expand a bitmap and move blocks of data, and
> > optionally 'pan' the window. Fbcon will pass the correct (ie, oriented)
> > information for the driver.
>
> Yes. Hardware rotation shouldn't also not effect the way accel
> operatations are done.
The main difference is if the hardware supports rotation, fbcon will
present it with "normal" data. With the generic implementation, fbcon
will present the driver with rotated data.
So we need a driver capabilities field either in fb_info or
fb_fix_screeninfo.
>
> > This will not be too processor intensive as long as some data is
> > prepared beforehand, like a rotated fontdata.
>
> Yeap!! The only thing is we could end up with 4 times the amount of data.
>
Not really. We can dynamically rotate the fontdata using the default
display->fontdata into another buffer. I believe I have functions that
do that in the patch I submitted. (Sorry, I lost it when one of my
drives crashed :-(.
Tony
^ permalink raw reply
* Re: handling of s-record images by bootloader
From: Jon Burgess @ 2003-01-10 10:21 UTC (permalink / raw)
To: atul srivastava; +Cc: linux-mips
> I am umware that, how differently s-record image need
> to be handled..?
> i just need some idea or if possible any example code for that..
Have you tried looking at binutils? objcopy can convert Binary<->S-Record
Jon
^ permalink raw reply
* handling of s-record images by bootloader
From: atul srivastava @ 2003-01-10 10:17 UTC (permalink / raw)
To: linux-mips
Hello .
A quick question..
I have developed a primitive bootloader for custom board, that is
successfuly doing the board bringup and loads linux os image
currently through serial link (kermit) only.
network link is also likely to be up soon.
but through serial it loads kernel image only in raw binary
format.
now i want to extend this for s-record images as well..
I am umware that, how differently s-record image need to be
handled..?
i just need some idea or if possible any example code for that..
Best Reagards,
Atul
^ permalink raw reply
* handling of s-record images by bootloader
From: atul srivastava @ 2003-01-10 10:14 UTC (permalink / raw)
To: linux-mips
Hello .
A quick question..
I have developed a primitive bootloader for custom board, that is
successfuly doing the board bringup and loads linux os image
currently through serial link (kermit) only.
network link is also likely to be up soon.
but through serial it loads kernel image only in raw binary
format.
now i want to extend this for s-record images as well..
I am umware that, how differently s-record image need to be
handled..?
i just need some idea or if possible any example code for that..
Best Reagards,
Atul
^ permalink raw reply
* Re: Another idea for simplifying locking in kernel/module.c
From: Rusty Russell @ 2003-01-10 10:15 UTC (permalink / raw)
To: Andre Hedrick; +Cc: rusty, linux-kernel
In-Reply-To: <Pine.LNX.4.10.10301100138270.31168-100000@master.linux-ide.org>
In message <Pine.LNX.4.10.10301100138270.31168-100000@master.linux-ide.org> you
write:
>
> I'll bite .... what the flip is [unsafe] ??
Use of obsolete (racy) module reference count interface. ie. someone's
upping the reference count with __MOD_INC_USE_COUNT() or
MOD_INC_USE_COUNT(), not "try_module_get()", so we can't tell them
that the module is going away so they couldn't get a reference.
Going through and fixing these up is generally fairly easy.
Hope that clarifies,
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
^ permalink raw reply
* Re: [PATCH] Make `obsolete params' work correctly if MODULE_SYMBOL_PREFIX is non-empty
From: Rusty Russell @ 2003-01-10 10:20 UTC (permalink / raw)
To: Richard Henderson; +Cc: Miles Bader, linux-kernel, torvalds
In-Reply-To: <20030110015203.A16268@twiddle.net>
In message <20030110015203.A16268@twiddle.net> you write:
> On Wed, Jan 08, 2003 at 10:56:51PM +1100, Rusty Russell wrote:
> > + char sym_name[strlen(obsparm[i].name) + 2];
>
> Are you really intending to use variable sized allocation
> on the kernel stack?
Yep. Maximum length of obsolete parameter name in current kernel:
seq_default_timer_resolution (28 chars).
It's far more likely that someone will hit the unchecked kmalloc
allocations in arch/alpha/kernel/modules.c 8)
Hope that helps,
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
^ permalink raw reply
* Re: Another idea for simplifying locking in kernel/module.c
From: Rusty Russell @ 2003-01-10 10:11 UTC (permalink / raw)
To: Adam J. Richter; +Cc: linux-kernel, davem
In-Reply-To: <200301100910.BAA31409@adam.yggdrasil.com>
In message <200301100910.BAA31409@adam.yggdrasil.com> you write:
> Rusty Russell wrote:
> >In message <200301070219.SAA12905@adam.yggdrasil.com> you write:
> >> Here is a way to replace all of the specialized "stop CPU"
> >> locking code in kernel/module.c with an rw_semaphore by using
> >> down_read_trylock in try_module_get() and down_write when beginning to
> >> unload the module.
>
> >And now you can't modularize netfilter modules.
>
> Why not? Last time you went looking in the networking code
> for an example of something that had to increment a module reference
> in a context where blocking was not allowed you ended up conceding
> that you example was incorrect.
No, you're thinking of the IPv4 stack. I didn't use netfilter as an
example, because that opens me to "well, FIX NETFILTER then!". If it
were the only case, it's probably arguable.
The problems with netfilter modules are exactly why I started looking
at module locking over two years ago.
> I just booted my gateway machine to a kernel using my
> aforemetioned patch and various netfilter modules. I've surfed the
> web, FTP'ed file and run irc through it. It seems to be okay.
Sure! That's because the netfilter modules use a horrific hack, by
keeping their own "usage" counts and then spinning (potentially
forever) on unload until it hits zero.
Logically the skb->nfct would have an owner field in it.
Now, performance. You want a brlock, at least: the performance of
either the security infrastructure or netfilter modules is going to
suck horribly with anything else. And the bogolock used in module.c
is even lighter weight than a brlock, with its associated atomic ops.
Hope that clarifies...
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
^ permalink raw reply
* Re: Problem in IDE Disks cache handling in kernel 2.4.XX
From: John Bradford @ 2003-01-10 10:19 UTC (permalink / raw)
To: fverscheure; +Cc: marcelo, linux-kernel
In-Reply-To: <20030110095558.E144CFF11@postfix4-1.free.fr>
> And by the way how are powered off the IDE drives ?
> Because a FLUSH CACHE or STANDY or SLEEP is MANDATORY before
> powering off the drive with cache enabled or you will enjoy lost
> data.
This was discussed on the list a few months ago:
http://marc.theaimsgroup.com/?l=linux-kernel&m=103188486216124&w=2
I'm not sure it really got fully resolved, I had disks that would
spin down and then spin up again, because of the order that the
standby and flush cache commands were sent.
John
^ permalink raw reply
* Re: VIA8233/8235 testers wanted
From: Joachim Blaabjerg @ 2003-01-10 10:09 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
In-Reply-To: <s5hznq973t7.wl@alsa2.suse.de>
On Friday 10 January 2003 10:27, you wrote:
> there are small bugs regarding the calculation of hw-pointer.
> i hope now this choppy sounds fixed. could you try to grab via82xx.c
> again from the same url?
Yes, works great! Everything I use my card for works 100% now, for the first
time I can remember. On my previous box, I had an Aureal card that didn't
really have any good drivers either.
> also, there is the secondary pcm device (hw:0,1) for the multi-channel
> playback, i.e. 4 and 6-channel playback. if your board has rear or
> center/lfe jacks, please give a try.
> i guess this is exclusive with the first device, but not sure. please
> check whether both twos can play at the same time.
Unfortunately, my board hasn't got that (to my knowledge).
> ah, one more thing. via8235 has the secondary capture device. it's
> assigned to hw:0,1. it would be helpful if you can check both hw:0,0
> and hw:0,1 can capture properly, or whether only one of them works.
I'll check this out if I can get my hands on a proper microphone. I guess I
could try that headphone trick, but I'd rather try getting a mic first. In a
couple of days, perhaps?
Regards,
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
^ permalink raw reply
* [2.5 patch] remove kernel 2.0 code from arch/arm/nwfpe/fpmodule.c
From: Adrian Bunk @ 2003-01-10 10:15 UTC (permalink / raw)
To: Scott Bambrough, rmk; +Cc: linux-kernel
The patch below removes a #if for kernel 2.0 from
arch/arm/nwfpe/fpmodule.c in 2.5.55.
Please apply
Adrian
--- linux-2.5.55/arch/arm/nwfpe/fpmodule.c.old 2003-01-10 11:12:13.000000000 +0100
+++ linux-2.5.55/arch/arm/nwfpe/fpmodule.c 2003-01-10 11:12:33.000000000 +0100
@@ -44,10 +44,9 @@
/* kernel symbols required for signal handling */
#ifdef MODULE
void fp_send_sig(unsigned long sig, struct task_struct *p, int priv);
-#if LINUX_VERSION_CODE > 0x20115
+
MODULE_AUTHOR("Scott Bambrough <scottb@rebel.com>");
MODULE_DESCRIPTION("NWFPE floating point emulator");
-#endif
#else
#define fp_send_sig send_sig
^ permalink raw reply
* unexpected IO-APIC
From: frontal @ 2003-01-10 10:04 UTC (permalink / raw)
To: linux-smp
Hi,
Since running kernel 2.4.20 I'm getting the following messages:
=====================================================================
Jan 10 09:54:26 p2 syslogd 1.4.1: restart.
Jan 10 09:54:26 p2 syslog: syslogd startup succeeded
Jan 10 09:54:26 p2 kernel: klogd 1.4.1, log source = /proc/kmsg started.
Jan 10 09:54:26 p2 kernel: Inspecting /boot/System.map-2.4.20
Jan 10 09:54:26 p2 syslog: klogd startup succeeded
Jan 10 09:54:26 p2 portmap: portmap startup succeeded
Jan 10 09:54:26 p2 kernel: Loaded 18008 symbols from /boot/System.map-2.4.20.
Jan 10 09:54:26 p2 kernel: Symbols match kernel version 2.4.20.
Jan 10 09:54:26 p2 kernel: Loaded 21 symbols from 4 modules.
Jan 10 09:54:26 p2 kernel: Linux version 2.4.20 (root@p2) (gcc version 3.2) #6 Sun Dec 1 19:17:11 CET 2002
Jan 10 09:54:26 p2 kernel: BIOS-provided physical RAM map:
Jan 10 09:54:26 p2 kernel: BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
Jan 10 09:54:26 p2 kernel: BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
Jan 10 09:54:26 p2 kernel: BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
Jan 10 09:54:26 p2 kernel: BIOS-e820: 0000000000100000 - 000000001fff0000 (usable)
Jan 10 09:54:26 p2 kernel: BIOS-e820: 000000001fff0000 - 000000001fff8000 (ACPI data)
Jan 10 09:54:26 p2 kernel: BIOS-e820: 000000001fff8000 - 0000000020000000 (ACPI NVS)
Jan 10 09:54:26 p2 kernel: BIOS-e820: 00000000fec00000 - 00000000fec01000 (reserved)
Jan 10 09:54:26 p2 kernel: BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
Jan 10 09:54:26 p2 kernel: BIOS-e820: 00000000fff80000 - 0000000100000000 (reserved)
Jan 10 09:54:26 p2 kernel: 511MB LOWMEM available.
Jan 10 09:54:26 p2 kernel: found SMP MP-table at 000fb940
Jan 10 09:54:26 p2 kernel: hm, page 000fb000 reserved twice.
Jan 10 09:54:26 p2 kernel: hm, page 000fc000 reserved twice.
Jan 10 09:54:26 p2 kernel: hm, page 000f6000 reserved twice.
Jan 10 09:54:26 p2 kernel: hm, page 000f7000 reserved twice.
Jan 10 09:54:26 p2 kernel: On node 0 totalpages: 131056
Jan 10 09:54:26 p2 kernel: zone(0): 4096 pages.
Jan 10 09:54:26 p2 kernel: zone(1): 126960 pages.
Jan 10 09:54:26 p2 kernel: zone(2): 0 pages.
Jan 10 09:54:26 p2 kernel: Intel MultiProcessor Specification v1.4
Jan 10 09:54:26 p2 kernel: Virtual Wire compatibility mode.
Jan 10 09:54:26 p2 kernel: OEM ID: VIA Product ID: VT5440B APIC at: 0xFEE00000
Jan 10 09:54:26 p2 kernel: Processor #0 Pentium(tm) Pro APIC version 17
Jan 10 09:54:26 p2 kernel: I/O APIC #2 Version 3 at 0xFEC00000.
Jan 10 09:54:26 p2 kernel: Processors: 1
Jan 10 09:54:26 p2 kernel: Kernel command line: auto BOOT_IMAGE=linux ro root=341 BOOT_FILE=/boot/vmlinuz-2.4.20 video=matrox:vesa:0x111
Jan 10 09:54:26 p2 kernel: Initializing CPU#0
Jan 10 09:54:26 p2 kernel: Detected 1800.119 MHz processor.
Jan 10 09:54:26 p2 kernel: Console: colour VGA+ 80x25
Jan 10 09:54:26 p2 kernel: Calibrating delay loop... 3591.37 BogoMIPS
Jan 10 09:54:26 p2 kernel: Memory: 515728k/524224k available (1552k kernel code, 8108k reserved, 549k data, 120k init, 0k highmem)
Jan 10 09:54:26 p2 kernel: Dentry cache hash table entries: 65536 (order: 7, 524288 bytes)
Jan 10 09:54:26 p2 kernel: Inode cache hash table entries: 32768 (order: 6, 262144 bytes)
Jan 10 09:54:26 p2 kernel: Mount-cache hash table entries: 8192 (order: 4, 65536 bytes)
Jan 10 09:54:26 p2 kernel: Buffer-cache hash table entries: 32768 (order: 5, 131072 bytes)
Jan 10 09:54:26 p2 kernel: Page-cache hash table entries: 131072 (order: 7, 524288 bytes)
Jan 10 09:54:26 p2 kernel: CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
Jan 10 09:54:26 p2 kernel: CPU: L2 Cache: 256K (64 bytes/line)
Jan 10 09:54:26 p2 kernel: Intel machine check architecture supported.
Jan 10 09:54:26 p2 kernel: Intel machine check reporting enabled on CPU#0.
Jan 10 09:54:26 p2 kernel: CPU: AMD Athlon(tm) XP 2200+ stepping 00
Jan 10 09:54:26 p2 kernel: Enabling fast FPU save and restore... done.
Jan 10 09:54:26 p2 kernel: Enabling unmasked SIMD FPU exception support... done.
Jan 10 09:54:26 p2 kernel: Checking 'hlt' instruction... OK.
Jan 10 09:54:26 p2 kernel: POSIX conformance testing by UNIFIX
Jan 10 09:54:26 p2 kernel: enabled ExtINT on CPU#0
Jan 10 09:54:26 p2 kernel: ESR value before enabling vector: 00000080
Jan 10 09:54:26 p2 keytable: Loading keymap: succeeded
Jan 10 09:54:26 p2 kernel: ESR value after enabling vector: 00000000
Jan 10 09:54:26 p2 kernel: ENABLING IO-APIC IRQs
Jan 10 09:54:26 p2 kernel: Setting 2 in the phys_id_present_map
Jan 10 09:54:26 p2 kernel: ...changing IO-APIC physical APIC ID to 2 ... ok.
Jan 10 09:54:26 p2 kernel: ..TIMER: vector=0x31 pin1=2 pin2=0
Jan 10 09:54:27 p2 kernel: testing the IO APIC.......................
Jan 10 09:54:27 p2 kernel:
Jan 10 09:54:27 p2 keytable: Loading system font: succeeded
Jan 10 09:54:27 p2 kernel: WARNING: unexpected IO-APIC, please mail
Jan 10 09:54:27 p2 kernel: to linux-smp@vger.kernel.org
Jan 10 09:54:27 p2 kernel: .................................... done.
=====================================================================
My system is:
PROC: AMD Athlon 2200 XP
MAINBOARD: MSI KT3 Ultra 2R
CHIPSETS:
VIA KT333
VIA VT8235
I hope this is enough information, if not you can ofcourse mail me.
1 question (I rarely mail people for questions):
Could this warning cause lockups?
Since running kernel 2.4.20 I often get lockups while burning cd's.
It almost never happens with writing files from hd to cd, but often
when finalizing a cd after a direct copy or from an ISO my system
locks up and starts flashing the CapsLock- and ScrollLock-key on my kb.
I can at least get my hd's synched with the magic-sysrq, but a
reboot is required after it.
It looks like its a time-out which causes the lockup:
=====================================================================
Jan 10 09:45:55 p2 kernel: scsi : aborting command due to timeout : pid 301468, scsi1, channel 0, id 0, lun 0 Read (10) 00 00 03 78 47 00
00 3f 00
Jan 10 09:45:55 p2 kernel: scsi : aborting command due to timeout : pid 301469, scsi1, channel 0, id 0, lun 0 Read (10) 00 00 03 78 86 00
00 01 00
=====================================================================
Well, if the warning has nothing to do with it I'll continue experimenting
or switch back to a previous kernel.
Thanks in advance.
W. Tellier
^ permalink raw reply
* [2.5 patch] remove LINUX_VERSION_CODE from arch/mips/au1000/common/serial.c
From: Adrian Bunk @ 2003-01-10 10:07 UTC (permalink / raw)
To: ralf; +Cc: linux-kernel
Hi Ralf,
the patch below removes two no longer needed LINUX_VERSION_CODE from
arch/mips/au1000/common/serial.c (not needed since CONFIG_DEVFS_FS is
never defined on 2.2 kernels). It applies against 2.5.55 and current
MIPS cvs.
cu
Adrian
--- linux-2.5.55/arch/mips/au1000/common/serial.c.old 2003-01-10 10:56:15.000000000 +0100
+++ linux-2.5.55/arch/mips/au1000/common/serial.c 2003-01-10 10:57:08.000000000 +0100
@@ -2588,7 +2588,7 @@
memset(&serial_driver, 0, sizeof(struct tty_driver));
serial_driver.magic = TTY_DRIVER_MAGIC;
serial_driver.driver_name = "serial";
-#if (LINUX_VERSION_CODE > 0x2032D && defined(CONFIG_DEVFS_FS))
+#if defined(CONFIG_DEVFS_FS)
serial_driver.name = "tts/%d";
#else
serial_driver.name = "ttyS";
@@ -2632,7 +2632,7 @@
* major number and the subtype code.
*/
callout_driver = serial_driver;
-#if (LINUX_VERSION_CODE > 0x2032D && defined(CONFIG_DEVFS_FS))
+#if defined(CONFIG_DEVFS_FS)
callout_driver.name = "cua/%d";
#else
callout_driver.name = "cua";
^ permalink raw reply
* [PATCH 2.5.55] cpufreq: frequency table helpers
From: Dominik Brodowski @ 2003-01-10 10:05 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel, davej, 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-09 19:15:40.000000000 +0100
+++ linux/arch/i386/kernel/cpu/cpufreq/elanfreq.c 2003-01-10 10:15:57.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-09 19:15:40.000000000 +0100
+++ linux/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c 2003-01-10 09:56:09.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-09 19:15:40.000000000 +0100
+++ linux/arch/i386/kernel/cpu/cpufreq/powernow-k6.c 2003-01-10 10:08:05.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-09 19:32:00.000000000 +0100
+++ linux/arch/i386/kernel/cpu/cpufreq/speedstep.c 2003-01-10 10:04:22.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-09 19:15:52.000000000 +0100
+++ linux/include/linux/cpufreq.h 2003-01-09 20:09:17.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-09 19:19:58.000000000 +0100
+++ linux/kernel/cpufreq.c 2003-01-09 20:07:31.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: Can't start raid 5 when device names have changed
From: Stephan van Hienen @ 2003-01-10 9:49 UTC (permalink / raw)
To: bugzilla; +Cc: linux-raid
In-Reply-To: <200301100335.h0A3ZHt02424@dns1.watkins-home.com>
On Thu, 9 Jan 2003 bugzilla@watkins-home.com wrote:
> Please help! I can resolve the problem by addressing the new disks so they
> will be sde and sdf. But this seems like it could be a major problem for
> others in the future. You should be able to add disks to a system without
> such problems.
Hi,
solution is to use mdadm :
mdadm -A /dev/md3 --force /dev/sda1 /dev/sdc1 /dev/sde1 /dev/sdf1
(make sure these are the correct disks with mdadm -Q /dev/sda1 (and
sdc1...))
^ permalink raw reply
* Problem in IDE Disks cache handling in kernel 2.4.XX
From: Francis Verscheure @ 2003-01-10 9:54 UTC (permalink / raw)
To: linux-kernel; +Cc: marcelo
Hello to everybody and a Happy New Year.
Thanks a lot for all the great job you are all doing.
Having EXT2 file system corruption after suspend on a notebook I investigate
kernel code and it seems to me that IDE Disk cache handling is wrong in
kernel 2.4.XX.
Sources extracts are from kernel 2.4.20.
If you look at struct hd_driveid in hdreg.h you will find :
unsigned short command_set_1; /* (word 82) supported
* 6: look-ahead
* 5: write cache ==== this means the Disk has a disk cache =====
unsigned short command_set_2; /* (word 83)
* 13: FLUSH CACHE EXT ==== Those fields were RESERVED in ATA/ATAPI 5
* 12: FLUSH CACHE ==== and are used ONLY in ATA/ATAPI 6 ====
* 10: 48-bit Address Feature Set
unsigned short cfs_enable_1; /* (word 85)
* 6: look-ahead
* 5: write cache ==== this means the Disk cache is enabled or disabled
*/
unsigned short cfs_enable_2; /* (word 86)
* 13: FLUSH CACHE EXT ==== Those fields were RESERVED in ATA/ATAPI 5
* 12: FLUSH CACHE ==== and are used ONLY in ATA/ATAPI 6 ====
* 10: 48-bit Address Feature Set
In ide-disk.c you have
static int write_cache (ide_drive_t *drive, int arg)
{
struct hd_drive_task_hdr taskfile;
struct hd_drive_hob_hdr hobfile;
memset(&taskfile, 0, sizeof(struct hd_drive_task_hdr));
memset(&hobfile, 0, sizeof(struct hd_drive_hob_hdr));
taskfile.feature = (arg) ? SETFEATURES_EN_WCACHE : SETFEATURES_DIS_WCACHE;
taskfile.command = WIN_SETFEATURES;
if (!(drive->id->cfs_enable_2 & 0x3000)) <==== WRONG ! ONLY FOR ATA/ATAPI 6
return 1;
(void) ide_wait_taskfile(drive, &taskfile, &hobfile, NULL);
drive->wcache = arg;
return 0;
}
In fact for ATA/ATAPI 5 cfs_enable_2 has no meaning. The fields to test are
write cache bits in command_set_1 and cfs_enable_1.
And in both cases the FLUSH CACHE command ALWAYS EXISTS !
The test of cfs_enable_2 must only be used for ATA/ATAPI 6 drives to use
FLUSH CACHE or FLUSH CACHE EXT in case of 48 bit addressing mode.
And it seems to me that when an IDE drive has a cache enabled wcache must be
initialized to say so ? Or you have to do a STANDY or SLEEP before APM
suspend or power off to be sure that the cache has been written to the disk.
I had a look at patch 2.4.21pre3 and the code looks the same.
And by the way how are powered off the IDE drives ?
Because a FLUSH CACHE or STANDY or SLEEP is MANDATORY before powering off the
drive with cache enabled or you will enjoy lost data.
I am not on the list so thank you to CC me.
Best regards to all.
Francis Verscheure
^ permalink raw reply
* Re: Nvidia and its choice to read the GPL "differently"
From: Richard Stallman @ 2003-01-10 9:52 UTC (permalink / raw)
To: jalvo; +Cc: linux-kernel
In-Reply-To: <nbdq1vo9enjh9c6gnh68mpg0ebt7n22fhi@4ax.com>
If there was an ATT/Linux and an Intel/Linux,
having a GNU/Linux would make some sense... but that is not the way it
is. GNU/Linux is singular, so Linux makes a reasonable contraction.
It would be reasonable, if not for the fact that it gives the wrong
idea of who developed the system and--above all--why.
Another puzzling aspect to me is that GNU really goes beyond what I
think of as an operating system. I have a suite of GNU tools installed
on a Windows NT machine and I use make, ls, cp, mv all day. So I am
using GNU on a foreign operating system... or does my usage needs to
be labeled as GNU/Windows NT?
The tools are just a part of the GNU software packages, which is only
part of the GNU system. And underneath those tools would be another
entire operating system, entirely different from GNU. All in all,
that's a very different situation from GNU/Linux. We wouldn't call it
"GNU/Windows".
(I'm going to add this to http://www.gnu.org/gnu/gnu-linux-faq.html;
thanks.)
^ permalink raw reply
* [PATCH 2.5] speedup kallsyms_lookup
From: Daniel Ritz @ 2003-01-10 9:53 UTC (permalink / raw)
To: linux-kernel, hugh, ak; +Cc: daniel.ritz
[please cc...you know why]
a patch to speed up the kallsyms_lookup() function while still doing
compression.
- make 4 sections: addresses, lens, stem, strings
- only strncpy() when needed
- no strlen() at all (only in the script)
- save space we lose for len table by not making strings zero terminated
not yet included is hugh's patch to sort the symbols by name, i didn't
look at it yet. but at least it should not be off-by-one...i din't test
it that much, but it looks quiet ok..
not yet sent to linus. comments first. against 2.5.55.
beep
-daniel
--- 2555-clean/scripts/kallsyms.c 2003-01-09 05:04:27.000000000 +0100
+++ 2555/scripts/kallsyms.c 2003-01-10 10:16:41.000000000 +0100
@@ -26,7 +26,8 @@
static void
usage(void)
{
- fprintf(stderr, "Usage: kallsyms < in.map > out.S\n");
+ fprintf(stderr, "Usage: kallsyms out.S < in.map\n");
+ fprintf(stderr, " Generates out.S.[123], cat them together.\n");
exit(1);
}
@@ -89,26 +90,42 @@
}
static void
-write_src(void)
+write_src(char *name)
{
unsigned long long last_addr;
int i, valid = 0;
char *prev;
- printf("#include <asm/types.h>\n");
- printf("#if BITS_PER_LONG == 64\n");
- printf("#define PTR .quad\n");
- printf("#define ALGN .align 8\n");
- printf("#else\n");
- printf("#define PTR .long\n");
- printf("#define ALGN .align 4\n");
- printf("#endif\n");
+ char *tname;
+ int len;
+ FILE *f1, *f2, *f3;
- printf(".data\n");
+ len = strlen(name);
+ tname = malloc(len + 3);
+ strcpy(tname, name);
- printf(".globl kallsyms_addresses\n");
- printf("\tALGN\n");
- printf("kallsyms_addresses:\n");
+ strcpy(tname + len, ".1");
+ f1 = fopen(tname, "w");
+ strcpy(tname + len, ".2");
+ f2 = fopen(tname, "w");
+ strcpy(tname + len, ".3");
+ f3 = fopen(tname, "w");
+ free(tname);
+
+ fprintf(f1, "#include <asm/types.h>\n");
+ fprintf(f1, "#if BITS_PER_LONG == 64\n");
+ fprintf(f1, "#define PTR .quad\n");
+ fprintf(f1, "#define ALGN .align 8\n");
+ fprintf(f1, "#else\n");
+ fprintf(f1, "#define PTR .long\n");
+ fprintf(f1, "#define ALGN .align 4\n");
+ fprintf(f1, "#endif\n");
+
+ fprintf(f1, ".data\n");
+
+ fprintf(f1, ".globl kallsyms_addresses\n");
+ fprintf(f1, "\tALGN\n");
+ fprintf(f1, "kallsyms_addresses:\n");
for (i = 0, last_addr = 0; i < cnt; i++) {
if (!symbol_valid(&table[i]))
continue;
@@ -116,21 +133,29 @@
if (table[i].addr == last_addr)
continue;
- printf("\tPTR\t%#llx\n", table[i].addr);
+ fprintf(f1, "\tPTR\t%#llx\n", table[i].addr);
valid++;
last_addr = table[i].addr;
}
- printf("\n");
+ fprintf(f1, "\n");
- printf(".globl kallsyms_num_syms\n");
- printf("\tALGN\n");
- printf("kallsyms_num_syms:\n");
- printf("\tPTR\t%d\n", valid);
- printf("\n");
+ fprintf(f1, ".globl kallsyms_num_syms\n");
+ fprintf(f1, "\tALGN\n");
+ fprintf(f1, "kallsyms_num_syms:\n");
+ fprintf(f1, "\tPTR\t%d\n", valid);
+ fprintf(f1, "\n");
- printf(".globl kallsyms_names\n");
- printf("\tALGN\n");
- printf("kallsyms_names:\n");
+ fprintf(f1, ".globl kallsyms_lens\n");
+ fprintf(f1, "\tALGN\n");
+ fprintf(f1, "kallsyms_lens:\n");
+
+ fprintf(f2, ".globl kallsyms_stem\n");
+ fprintf(f2, "\tALGN\n");
+ fprintf(f2, "kallsyms_stem:\n");
+
+ fprintf(f3, ".globl kallsyms_names\n");
+ fprintf(f3, "\tALGN\n");
+ fprintf(f3, "kallsyms_names:\n");
prev = "";
for (i = 0, last_addr = 0; i < cnt; i++) {
int k;
@@ -144,21 +169,29 @@
for (k = 0; table[i].sym[k] && table[i].sym[k] == prev[k]; ++k)
;
- printf("\t.byte 0x%02x ; .asciz\t\"%s\"\n", k, table[i].sym + k);
+ fprintf(f1, "\t.byte 0x%02x\n", strlen(table[i].sym) - k);
+ fprintf(f2, "\t.byte 0x%02x\n", k);
+ fprintf(f3, "\t.ascii\t\"%s\"\n", table[i].sym + k);
last_addr = table[i].addr;
prev = table[i].sym;
}
- printf("\n");
+ fprintf(f1, "\n");
+ fprintf(f2, "\n");
+ fprintf(f3, "\n");
+
+ fclose(f1);
+ fclose(f2);
+ fclose(f3);
}
int
main(int argc, char **argv)
{
- if (argc != 1)
+ if (argc != 2)
usage();
read_map(stdin);
- write_src();
+ write_src(argv[1]);
return 0;
}
--- 2555-clean/Makefile 2003-01-09 05:03:54.000000000 +0100
+++ 2555/Makefile 2003-01-10 00:14:21.000000000 +0100
@@ -355,7 +355,7 @@
kallsyms.o := .tmp_kallsyms2.o
quiet_cmd_kallsyms = KSYM $@
-cmd_kallsyms = $(NM) -n $< | scripts/kallsyms > $@
+cmd_kallsyms = $(NM) -n $< | scripts/kallsyms $@; cat $@.1 $@.2 $@.3 > $@
.tmp_kallsyms1.o .tmp_kallsyms2.o: %.o: %.S scripts FORCE
$(call if_changed_dep,as_o_S)
--- 2555-clean/kernel/kallsyms.c 2003-01-09 05:04:26.000000000 +0100
+++ 2555/kernel/kallsyms.c 2003-01-10 01:32:00.000000000 +0100
@@ -14,6 +14,8 @@
/* These will be re-linked against their real values during the second link stage */
extern unsigned long kallsyms_addresses[1] __attribute__((weak, alias("kallsyms_dummy")));
extern unsigned long kallsyms_num_syms __attribute__((weak, alias("kallsyms_dummy")));
+extern char kallsyms_lens[1] __attribute__((weak, alias("kallsyms_dummy")));
+extern char kallsyms_stem[1] __attribute__((weak, alias("kallsyms_dummy")));
extern char kallsyms_names[1] __attribute__((weak, alias("kallsyms_dummy")));
/* Defined by the linker script. */
@@ -26,6 +28,7 @@
char **modname, char *namebuf)
{
unsigned long i, best = 0;
+ unsigned long sym_offs = 0, stem = 0, stem_tmp, len;
/* This kernel should never had been booted. */
if ((void *)kallsyms_addresses == &kallsyms_dummy)
@@ -45,13 +48,31 @@
best = i;
}
- /* Grab name */
- for (i = 0; i < best; i++) {
- unsigned prefix = *name++;
- strncpy(namebuf + prefix, name, 127 - prefix);
- name += strlen(name) + 1;
+ /* find name offset */
+ for (i = 0; i < best; i++)
+ sym_offs += (unsigned long) kallsyms_lens[i];
+
+ /* go for the end of the name */
+ name = kallsyms_names + sym_offs;
+ stem = (unsigned long) kallsyms_stem[best];
+ len = (unsigned long) kallsyms_lens[best];
+ strncpy(namebuf + stem, name, len);
+ namebuf[stem + len] = '\0';
+
+ /* go back, find the beginning */
+ if (stem) {
+ i = best;
+ do {
+ i--;
+ name -= kallsyms_lens[i];
+ stem_tmp = (unsigned long) kallsyms_stem[i];
+
+ if (stem_tmp < stem)
+ strncpy(namebuf + stem_tmp, name, stem - stem_tmp);
+ } while (stem_tmp);
}
+
/* Base symbol size on next symbol. */
if (best + 1 < kallsyms_num_syms)
symbol_end = kallsyms_addresses[best + 1];
^ permalink raw reply
* Re: [PATCH] Make `obsolete params' work correctly if MODULE_SYMBOL_PREFIX is non-empty
From: Richard Henderson @ 2003-01-10 9:52 UTC (permalink / raw)
To: Rusty Russell; +Cc: Miles Bader, linux-kernel, torvalds
In-Reply-To: <20030110073328.D41A52C310@lists.samba.org>
On Wed, Jan 08, 2003 at 10:56:51PM +1100, Rusty Russell wrote:
> + char sym_name[strlen(obsparm[i].name) + 2];
Are you really intending to use variable sized allocation
on the kernel stack?
r~
^ permalink raw reply
* Re: Linux 2.4.21pre3-ac2
From: Ralf Hildebrandt @ 2003-01-10 9:45 UTC (permalink / raw)
To: linux-kernel
In-Reply-To: <200301090139.h091d9G26412@devserv.devel.redhat.com>
* Alan Cox <alan@redhat.com>:
> The skb_padto bug is quite ugly so people really want to be using ac2 not
> ac1.
I got an oops with that kernel on two different machines:
ksymoops 2.4.8 on i686 2.4.21-pre3-ac2. Options used
-V (default)
-k /proc/ksyms (default)
-l /proc/modules (default)
-o /lib/modules/2.4.21-pre3-ac2/ (default)
-m /boot/System.map-2.4.21-pre3-ac2 (default)
Warning: You did not tell me where to find symbol information. I will
assume that the log matches the kernel and modules that are running
right now and I'll use the default options above for symbol resolution.
If the current kernel and/or modules do not match the log, you can get
more accurate output by telling me the kernel version and where to find
map, modules, ksyms etc. ksymoops -h explains the options.
cs: IO port probe 0x0c00-0x0cff: clean.
cs: IO port probe 0x0800-0x08ff: clean.
cs: IO port probe 0x0100-0x04ff: excluding 0x220-0x22f 0x330-0x337 0x378-0x37f 0x388-0x38f 0x3c0-0x3df 0x4d0-0x4d7
cs: IO port probe 0x0a00-0x0aff: clean.
cs: memory probe 0xa0000000-0xa0ffffff: clean.
ad1848: No ISAPnP cards found, trying standard ones...
Unable to handle kernel NULL pointer dereference at virtual address 00000004
c0132d7d
*pde = 00000000
Oops: 0002
CPU: 0
EIP: 0010:[<c0132d7d>] Not tainted
Using defaults from ksymoops -t elf32-i386 -a i386
EFLAGS: 00010246
eax: 00000000 ebx: c117b874 ecx: c7cc8000 edx: c7cc805c
esi: 00000000 edi: 00000000 ebp: c0271030 esp: c7cc9e40
ds: 0018 es: 0018 ss: 0018
Process apt-get (pid: 1352, stackpage=c7cc9000)
Stack: 00000001 00000286 c898f420 c898f420 c898f420 c117b874 c013e66e c898f420
c88b2e68 c117b874 000011d1 c0271030 c0131f0f c117b874 000001d2 c7cc8000
000001c8 000001d2 00000020 00000020 000001d2 00000020 00000006 c0132153
Call Trace: [<c013e66e>] [<c0131f0f>] [<c0132153>] [<c01321c6>] [<c0133067>]
[<c01332f3>] [<c012dd70>] [<c015f5d9>] [<c013a173>] [<c0107307>]
Code: 89 58 04 89 03 89 53 04 89 59 5c 89 73 0c ff 41 68 eb bf 0f
>>EIP; c0132d7d <__free_pages_ok+27d/2a0> <=====
>>ebx; c117b874 <_end+e88fbc/c9937a8>
>>ecx; c7cc8000 <_end+79d5748/c9937a8>
>>edx; c7cc805c <_end+79d57a4/c9937a8>
>>ebp; c0271030 <contig_page_data+b0/340>
>>esp; c7cc9e40 <_end+79d7588/c9937a8>
Trace; c013e66e <try_to_free_buffers+8e/100>
Trace; c0131f0f <shrink_cache+21f/310>
Trace; c0132153 <shrink_caches+63/a0>
Trace; c01321c6 <try_to_free_pages_zone+36/50>
Trace; c0133067 <balance_classzone+57/1f0>
Trace; c01332f3 <__alloc_pages+f3/190>
Trace; c012dd70 <generic_file_write+370/760>
Trace; c015f5d9 <ext3_file_write+39/d0>
Trace; c013a173 <sys_write+a3/140>
Trace; c0107307 <system_call+33/38>
Code; c0132d7d <__free_pages_ok+27d/2a0>
00000000 <_EIP>:
Code; c0132d7d <__free_pages_ok+27d/2a0> <=====
0: 89 58 04 mov %ebx,0x4(%eax) <=====
Code; c0132d80 <__free_pages_ok+280/2a0>
3: 89 03 mov %eax,(%ebx)
Code; c0132d82 <__free_pages_ok+282/2a0>
5: 89 53 04 mov %edx,0x4(%ebx)
Code; c0132d85 <__free_pages_ok+285/2a0>
8: 89 59 5c mov %ebx,0x5c(%ecx)
Code; c0132d88 <__free_pages_ok+288/2a0>
b: 89 73 0c mov %esi,0xc(%ebx)
Code; c0132d8b <__free_pages_ok+28b/2a0>
e: ff 41 68 incl 0x68(%ecx)
Code; c0132d8e <__free_pages_ok+28e/2a0>
11: eb bf jmp ffffffd2 <_EIP+0xffffffd2>
Code; c0132d90 <__free_pages_ok+290/2a0>
13: 0f 00 00 sldtl (%eax)
<1>Unable to handle kernel NULL pointer dereference at virtual address 00000004
c0132d7d
*pde = 00000000
Oops: 0002
CPU: 0
EIP: 0010:[<c0132d7d>] Not tainted
EFLAGS: 00010246
eax: 00000000 ebx: c10cc138 ecx: c7cc8000 edx: c7cc805c
esi: 00000000 edi: 00000000 ebp: 00000000 esp: c7cc9c64
ds: 0018 es: 0018 ss: 0018
Process apt-get (pid: 1352, stackpage=c7cc9000)
Stack: 0000002f 00000082 00000082 c02d93b4 00000020 00000000 c01911b3 c02d93b4
00000000 c9ed51a8 00004000 00000001 c0129027 c10cc138 00000000 00000001
cbf7ef00 c10cc138 08400000 c436a084 0806e000 00000000 c012787b cb0887a0
Call Trace: [<c01911b3>] [<c0129027>] [<c012787b>] [<c012a769>] [<c01171b7>]
[<c011c09f>] [<c0107992>] [<c0114ad4>] [<c01643d2>] [<c016b21b>] [<c016a896>]
[<c016b21b>] [<c016a896>] [<c0114830>] [<c01073f8>] [<c0132d7d>] [<c013e66e>]
[<c0131f0f>] [<c0132153>] [<c01321c6>] [<c0133067>] [<c01332f3>] [<c012dd70>]
[<c015f5d9>] [<c013a173>] [<c0107307>]
Code: 89 58 04 89 03 89 53 04 89 59 5c 89 73 0c ff 41 68 eb bf 0f
>>EIP; c0132d7d <__free_pages_ok+27d/2a0> <=====
>>ebx; c10cc138 <_end+dd9880/c9937a8>
>>ecx; c7cc8000 <_end+79d5748/c9937a8>
>>edx; c7cc805c <_end+79d57a4/c9937a8>
>>esp; c7cc9c64 <_end+79d73ac/c9937a8>
Trace; c01911b3 <poke_blanked_console+53/70>
Trace; c0129027 <zap_pte_range+f7/120>
Trace; c012787b <zap_page_range+8b/f0>
Trace; c012a769 <exit_mmap+b9/160>
Trace; c01171b7 <mmput+47/a0>
Trace; c011c09f <do_exit+8f/240>
Trace; c0107992 <die+72/80>
Trace; c0114ad4 <do_page_fault+2a4/4cf>
Trace; c01643d2 <ext3_mark_iloc_dirty+42/70>
Trace; c016b21b <journal_dirty_metadata+17b/210>
Trace; c016a896 <do_get_write_access+296/520>
Trace; c016b21b <journal_dirty_metadata+17b/210>
Trace; c016a896 <do_get_write_access+296/520>
Trace; c0114830 <do_page_fault+0/4cf>
Trace; c01073f8 <error_code+34/3c>
Trace; c0132d7d <__free_pages_ok+27d/2a0>
Trace; c013e66e <try_to_free_buffers+8e/100>
Trace; c0131f0f <shrink_cache+21f/310>
Trace; c0132153 <shrink_caches+63/a0>
Trace; c01321c6 <try_to_free_pages_zone+36/50>
Trace; c0133067 <balance_classzone+57/1f0>
Trace; c01332f3 <__alloc_pages+f3/190>
Trace; c012dd70 <generic_file_write+370/760>
Trace; c015f5d9 <ext3_file_write+39/d0>
Trace; c013a173 <sys_write+a3/140>
Trace; c0107307 <system_call+33/38>
Code; c0132d7d <__free_pages_ok+27d/2a0>
00000000 <_EIP>:
Code; c0132d7d <__free_pages_ok+27d/2a0> <=====
0: 89 58 04 mov %ebx,0x4(%eax) <=====
Code; c0132d80 <__free_pages_ok+280/2a0>
3: 89 03 mov %eax,(%ebx)
Code; c0132d82 <__free_pages_ok+282/2a0>
5: 89 53 04 mov %edx,0x4(%ebx)
Code; c0132d85 <__free_pages_ok+285/2a0>
8: 89 59 5c mov %ebx,0x5c(%ecx)
Code; c0132d88 <__free_pages_ok+288/2a0>
b: 89 73 0c mov %esi,0xc(%ebx)
Code; c0132d8b <__free_pages_ok+28b/2a0>
e: ff 41 68 incl 0x68(%ecx)
Code; c0132d8e <__free_pages_ok+28e/2a0>
11: eb bf jmp ffffffd2 <_EIP+0xffffffd2>
Code; c0132d90 <__free_pages_ok+290/2a0>
13: 0f 00 00 sldtl (%eax)
1 warning issued. Results may not be reliable.
--
Ralf Hildebrandt (Im Auftrag des Referat V a) Ralf.Hildebrandt@charite.de
Charite Campus Mitte Tel. +49 (0)30-450 570-155
Referat V a - Kommunikationsnetze - Fax. +49 (0)30-450 570-916
Why you can't find your system administrators:
(S)he's catching twenty winks under the floorboards, tread gingerly.
^ permalink raw reply
* Does file read-ahead in 2.4 really read ahead?
From: Andrey Borzenkov @ 2003-01-10 9:41 UTC (permalink / raw)
To: linux-kernel; +Cc: quintela, chmouel
The following analysis is based on Mandrake 2.4.20-2mdk kernel, but the problems exists since 2.4.18 and probably earlier so it is unlikely to be a Mandrake-specific. I have pure IDE hardware; situation may be different on SCSI.
It appears that when do_generic_file_read queues readahead requests, it never ever runs tq_disk to trigger actual read. And in the worst case (when it is the first request in queue) it means that device queue remains plugged until next run_task_queue run. The effects are
- read-ahead may be delayed for as long as next read from device. In case of busy system doing much disk IO it is not as obvious (because tq_disk is run often); in case of single-user system running single-threaded aplication it makes read-ahead actually useless.
- it kills supermount. Supermount checks for media change on every file operation (sans actual read). For IDE ide_do_request blocks until queue is unplugged. In the worst case it happens first on next kupdated run i.e. 5 seconds. That explains terrible performance of supermount on CDs under some usage patterns (rpm /mnt/cdrom/*.rpm being the best example).
Comment at the end of generic_file_readahead suggets that it should unplug the queue:
/*
* If we tried to read ahead some pages,
* If we tried to read ahead asynchronously,
* Try to force unplug of the device in order to start an asynchronous
* read IO request.
but it never happens as far as I can tell.
Is it intended behaviour?
-andrey
P.S. Please Cc on replies as I am not on lkml
P.P.S. Juan, Chmouel, I have patch for yet another bug that makes IDE CD-ROMs usable with supermount again, need to verify it. Unfortunately it cannot be generalized for HDs or SCSI devices.
^ permalink raw reply
* Re: Another idea for simplifying locking in kernel/module.c
From: Andre Hedrick @ 2003-01-10 9:38 UTC (permalink / raw)
To: Adam J. Richter; +Cc: rusty, linux-kernel
In-Reply-To: <200301100910.BAA31409@adam.yggdrasil.com>
I'll bite .... what the flip is [unsafe] ??
On Fri, 10 Jan 2003, Adam J. Richter wrote:
> Rusty Russell wrote:
> >In message <200301070219.SAA12905@adam.yggdrasil.com> you write:
> >> Here is a way to replace all of the specialized "stop CPU"
> >> locking code in kernel/module.c with an rw_semaphore by using
> >> down_read_trylock in try_module_get() and down_write when beginning to
> >> unload the module.
>
> >And now you can't modularize netfilter modules.
>
> Why not? Last time you went looking in the networking code
> for an example of something that had to increment a module reference
> in a context where blocking was not allowed you ended up conceding
> that you example was incorrect. If you've now found an example,
> please let me know.
>
> I just booted my gateway machine to a kernel using my
> aforemetioned patch and various netfilter modules. I've surfed the
> web, FTP'ed file and run irc through it. It seems to be okay.
> Here is the lsmod listing from it.
>
> Module Size Used by
> iptable_nat 28324 1 [unsafe],
> ip_conntrack 39788 2 iptable_nat,[unsafe],
> ext2 60712 0 -
> pcmcia_core 55744 0 -
> i810 65816 0 -
> atkbd 6820 0 -
> i8042 8864 0 -
> serio 4564 2 atkbd,i8042,
> autofs 14992 1 -
> ipt_TCPMSS 3568 1 [unsafe],
> iptable_filter 2272 1 [unsafe],
> ip_tables 17296 8 iptable_nat,ipt_TCPMSS,iptable_filter,[unsafe],
> nfsd 111824 1 [unsafe],
> exportfs 6160 1 nfsd,
> nfs 132092 0 -
> lockd 58736 3 nfsd,nfs,[unsafe],
> sunrpc 114136 4 nfsd,nfs,lockd,[unsafe],
> pppoe 14336 1 [unsafe],
> pppox 3480 1 pppoe,
> af_packet 20760 2 [unsafe],
> ppp_async 11296 0 -
> ppp_generic 30264 5 pppoe,pppox,ppp_async,
> slhc 6576 1 ppp_generic,
> ipv4 392804 88 iptable_nat,ip_conntrack,sunrpc,af_packet,[unsafe],
> unix 23884 11 [unsafe],
> sis_agp 4224 0 -
> agpgart 23248 2 sis_agp,
> ohci_hcd 28400 0 -
> usbcore 101108 3 ohci_hcd,
> ac97_codec 12432 0 -
> sis900 16548 0 -
> tulip 52960 2 [unsafe],
> crc32 4272 2 sis900,tulip,
> ext3 112232 3 -
> jbd 65840 1 ext3,
> mbcache 7764 2 ext2,ext3,
> ide_disk 17332 5 -
> ide_mod 143684 1 ide_disk,[unsafe],
>
>
> Adam J. Richter __ ______________ 575 Oroville Road
> adam@yggdrasil.com \ / Milpitas, California 95035
> +1 408 309-6081 | g g d r a s i l United States of America
> "Free Software For The Rest Of Us."
> -
> 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/
>
Andre Hedrick
LAD Storage Consulting Group
^ permalink raw reply
* Re: [PATCH] Prevent .gnu.linkonce.this_module section from being merged with other sections
From: Miles Bader @ 2003-01-10 9:39 UTC (permalink / raw)
To: Rusty Russell; +Cc: linux-kernel
In-Reply-To: <20030110091012.0E15E2C2AF@lists.samba.org>
Rusty Russell <rusty@rustcorp.com.au> writes:
> > +++ linux-2.5.55-moo/Makefile 2003-01-09 14:07:36.000000000 +0900
> > -LDFLAGS_MODULE = -r
> > +LDFLAGS_MODULE = -r --unique=.gnu.linkonce.this_module
>
> No! Does this not work?
>
> +++ working-2.5.55-strlen/arch/v850/Makefile 2003-01-10 19:32:09.000000000 +1100
> +LDFLAGS_MODULE += --unique=.gnu.linkonce.this_module
That'll probably work too.
[Though since the module loader depends on .gnu.linkonce.this_module
being a unique section, I think the global option should be OK as well]
-Miles
--
Is it true that nothing can be known? If so how do we know this? -Woody Allen
^ permalink raw reply
* Re: Another idea for simplifying locking in kernel/module.c
From: Adam J. Richter @ 2003-01-10 9:38 UTC (permalink / raw)
To: maxk; +Cc: linux-kernel, rusty
On Thu, 09 Jan 2003, Max Krasnyansky wrote:
>At 12:53 AM 1/7/2003 -0800, Adam J. Richter wrote:
>>I wrote:
>>> Here is a way to replace all of the specialized "stop CPU"
>>>locking code in kernel/module.c with an rw_semaphore by using
>>>down_read_trylock in try_module_get() and down_write when beginning to
>>>unload the module.
>>>
>>> The following UNTESTED patch, a net deletion of 136 lines,
>>
>> I am running that patch now on two computers. It seems to
>>be OK.
>>
>> Rusty, I'd be interested in knowing what you think of the
>>patch (likewise for other lkml readers).
>We have to be able to call try_module_get() from interrupt context.
Where? Why? Please show me one or more examples.
Adam J. Richter __ ______________ 575 Oroville Road
adam@yggdrasil.com \ / Milpitas, California 95035
+1 408 309-6081 | g g d r a s i l United States of America
"Free Software For The Rest Of Us."
^ permalink raw reply
* Re: VIA8233/8235 testers wanted
From: Takashi Iwai @ 2003-01-10 9:27 UTC (permalink / raw)
To: Joachim Blaabjerg; +Cc: alsa-devel
In-Reply-To: <200301101013.58151.styx@gentoo.org>
At Fri, 10 Jan 2003 10:13:58 +0100,
Joachim Blaabjerg wrote:
>
> On Friday 10 January 2003 09:37, Takashi Iwai wrote:
> > At Fri, 10 Jan 2003 09:17:28 +0100,
> >
> > Joachim Blaabjerg wrote:
> > > On Thursday 09 January 2003 18:01, Takashi Iwai wrote:
> > > > Hi,
> > > >
> > > > if someone has VIA8233, VIA8233A, VIA8233C or VIA8235 chipset, could
> > > > you help the testing of the new driver?
> > > > the new driver code is found at
> > > >
> > > > http://www.alsa-project.org/~iwai/via82xx.c
> > > > [...]
> > >
> > > I'm getting an unresolved symbol: snd_pcm_substream_sgbuf, and a
> > > recursive grep in the alsa-driver sources show only one match in, you
> > > guessed it, snd-via82xx.c.
> >
> > please try the very latest cvs version.
> > (the best is to get the source via cvs, not cvs-snapshot).
> > there are many changes recently.
>
> Ah yes, thanks.
>
> It compiles and loads nicely, but there are some problems using it. I tried
> starting UT2003 while XMMS was playing, and there was indeed sound from both,
> but the UT2003 sound was quite choppy. When I exited UT2003, the last sound
> it played is still there, and plays over and over again (ut2003-bin hangs). I
> get the following warning from ALSA:
>
> ALSA lib pcm_hw.c:398:(snd_pcm_hw_prepare) SNDRV_PCM_IOCTL_PREPARE failed:
> Device or resource busy
>
> I figured UT2003 and its sound system was probably rather weird, so I tried
> again with mpg231 and mplayer, which worked beautifully. Thanks! :)
>
> Btw, this is a VT-8235 sound chip.
there are small bugs regarding the calculation of hw-pointer.
i hope now this choppy sounds fixed. could you try to grab via82xx.c
again from the same url?
the error shown above is perhaps because the applications tried to set
up the different sample rates at the same time.
since the sample rate is configured on ac97 codec, the sample rate
must be identical among all applications playing simultaneously.
also, there is the secondary pcm device (hw:0,1) for the multi-channel
playback, i.e. 4 and 6-channel playback. if your board has rear or
center/lfe jacks, please give a try.
i guess this is exclusive with the first device, but not sure. please
check whether both twos can play at the same time.
ah, one more thing. via8235 has the secondary capture device. it's
assigned to hw:0,1. it would be helpful if you can check both hw:0,0
and hw:0,1 can capture properly, or whether only one of them works.
ciao,
Takashi
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
^ 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.