linux-flexiantxendom0-3.2.10.git
20 years ago[PATCH] Fix sprintf modifiers in usr/gen_init_cpio.c for cygwin
Andrew Morton [Wed, 18 Feb 2004 12:59:24 +0000 (04:59 -0800)]
[PATCH] Fix sprintf modifiers in usr/gen_init_cpio.c for cygwin

From: Pragnesh Sampat <pragnesh.sampat@timesys.com>

The file initramfs_data.cpio is slightly different when generated on
cygwin, compared to linux, which causes the kernel to panic with the
message "no cpio magic" (See Documentation/early-userspace/README).

The problem in cpio generation is due to the difference in sprintf
modifiers on cygwin.  The code uses "%08ZX" for strlen of a device node.
printf man pages discourages "Z" and has 'z' instead.  Both of these are
not available on cygwin sprintf (at least some versions of cygwin).  The
net result of all of this is that the generated file literally contains
"ZX" and then the strlen after that and messes up that 110 offset etc.  The
file is 516 bytes long on the system that I tested and on linux it is 512
bytes.

The fix below just uses "%08X" for that field.

20 years ago[PATCH] smbfs: support the loop driver
Andrew Morton [Wed, 18 Feb 2004 12:59:15 +0000 (04:59 -0800)]
[PATCH] smbfs: support the loop driver

From: Urban Widmark <urban@teststation.com>

Add the necessary bits for loop-over-smbfs.

20 years ago[PATCH] Codingstyle update
Andrew Morton [Wed, 18 Feb 2004 12:59:06 +0000 (04:59 -0800)]
[PATCH] Codingstyle update

From: Michael Frank <mhf@linuxmail.org>

20 years ago[PATCH] Remove overenthusiastic BUG in smp_boot_cpus
Andrew Morton [Wed, 18 Feb 2004 12:58:57 +0000 (04:58 -0800)]
[PATCH] Remove overenthusiastic BUG in smp_boot_cpus

From: "Martin J. Bligh" <mbligh@aracnet.com>

There's no real need to BUG and stop the system from booting if the BIOS
spec'ed apicid for the boot CPU isn't correct - we can continue perfectly
well with the real one.

20 years ago[PATCH] sf16fmr2 radio card driver
Andrew Morton [Wed, 18 Feb 2004 12:58:48 +0000 (04:58 -0800)]
[PATCH] sf16fmr2 radio card driver

From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio@vodafone.com>

Add a new driver for the SF16FMR2 Radio card.

20 years ago[PATCH] Inefficient TLB flush fix
Andrew Morton [Wed, 18 Feb 2004 12:58:38 +0000 (04:58 -0800)]
[PATCH] Inefficient TLB flush fix

From: Martin Hicks <mort@wildopensource.com>

This is a patch based on one that Jack Steiner sent to the ia64 list in
November.  The original thread can be found at:

http://marc.theaimsgroup.com/?l=linux-ia64&m=106869606922555&w=2

I created the little wrapper function that was requested.  I think the only
other arch, other than ia64, that doesn't at least include asm-generic/tlb.h
is arm.

Something appears broken in TLB flushing on IA64 (& possibly other
architectures).  Functionally, it works but performance is bad on systems
with large cpu counts.

The result is that TLB flushing in exit_mmap() is frequently being done via
IPIs to all cpus rather than with a "ptc" instruction or with a new
context..

20 years ago[PATCH] menuconfig: fix the check for ncurses-devel
Andrew Morton [Wed, 18 Feb 2004 12:58:29 +0000 (04:58 -0800)]
[PATCH] menuconfig: fix the check for ncurses-devel

From: Sam Ravnborg <sam@ravnborg.org>

Corrected check for missing ncurses-devel when executing "make menuconfig".
Now tell user to install 'ncurses-devel' if check fails.

20 years ago[PATCH] Fix make rpm when using RH9 or Fedora..
Andrew Morton [Wed, 18 Feb 2004 12:58:20 +0000 (04:58 -0800)]
[PATCH] Fix make rpm when using RH9 or Fedora..

From: Thomas Davis <tadavis@lbl.gov>

Doing a 'make rpm' will fail with the current RH9/Fedora RPM macros.

The failure message is this:

Processing files: kernel-debuginfo-2.6.3rc1mm1-12
error: Could not open %files file /usr/src/redhat/BUILD/kernel-2.6.3rc1mm1/debugfiles.list: No such file or directory

The fix is this patch:

20 years ago[PATCH] dm-crypt
Andrew Morton [Wed, 18 Feb 2004 12:58:11 +0000 (04:58 -0800)]
[PATCH] dm-crypt

From: Christophe Saout <christophe@saout.de>

Adds a crypto module for device-mapper.  The intent here is to remove
cryptoloop ASAP, to pull the remapping gunk out of the loops driver and to
migrate people onto dm-crypt.  It is on-disk compatible with existing
cryptolop installations.

See http://www.saout.de/misc/dm-crypt/ for usage details.

20 years ago[PATCH] Disable bootmem warning
Andrew Morton [Wed, 18 Feb 2004 12:58:01 +0000 (04:58 -0800)]
[PATCH] Disable bootmem warning

From: Andi Kleen <ak@suse.de>

Make the "hm, page reserved twice" message dependent on CONFIG_DEBUG_BOOTMEM.

20 years ago[PATCH] ide-tape: remove obsolete onstream support
Andrew Morton [Wed, 18 Feb 2004 12:57:52 +0000 (04:57 -0800)]
[PATCH] ide-tape: remove obsolete onstream support

From: Willem Riede <wrlk@riede.org>

The onstream drives, be they scsi, atapi, ieee1394 or usb, are supported by the
osst driver.  When the drives were new, code was introduced in ide-tape
independently, but never really maintained since.  There are issues with the
drives I found and dealt with in osst, that ide-tape doesn't address.

So this code in ide-tape is both redundant and imperfect.  I assumed from
http://marc.theaimsgroup.com/?l=linux-kernel&m=107550547613846&w=2 that there
was buy in for removing it.

When this patch is applied, ide-tape will refuse to attach to an onstream DI
drive, and will write to syslog to use ide-scsi + osst instead.

20 years ago[PATCH] do_swap_page() return value fix
Andrew Morton [Wed, 18 Feb 2004 12:57:43 +0000 (04:57 -0800)]
[PATCH] do_swap_page() return value fix

From: BlaisorBlade <blaisorblade_spam@yahoo.it>

An exhausted do_swap_page() should return VM_FAULT_OOM rather than -ENOMEM.

20 years ago[PATCH] slab: remove extraneous printk
Andrew Morton [Wed, 18 Feb 2004 12:57:34 +0000 (04:57 -0800)]
[PATCH] slab: remove extraneous printk

From: "David S. Miller" <davem@redhat.com>

From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>

If I create some kmem cache on 64-bit with like 3 u32's in it, it should
silently just work and not warn.

20 years ago[PATCH] Fix race in epoll_ctl(EPOLL_CTL_MOD)
Andrew Morton [Wed, 18 Feb 2004 12:57:25 +0000 (04:57 -0800)]
[PATCH] Fix race in epoll_ctl(EPOLL_CTL_MOD)

From: Davide Libenzi <davidel@xmailserver.org>

A potential race can happen in epoll_ctl(EPOLL_CTL_MOD) where an event can
happen in between f_op->poll() and the lock on ep->lock (we cannot call
f_op->poll() inside a lock, and the f_op->poll() callback does not carry
any info at the current time - missing wake_up_info() already ;).  In that
case the event would be removed.  We can easily leave the event inside the
ready list and have the ep_send_events() logic do the job for us at later
time.  (Thanks to david.lee@teracruz.com for reporting the thing, since it
shouldn't have been a nice one ;)

20 years ago[PATCH] add clock_was_set() to all architectures
Andrew Morton [Wed, 18 Feb 2004 12:57:16 +0000 (04:57 -0800)]
[PATCH] add clock_was_set() to all architectures

From: Anton Blanchard <anton@samba.org>

Add clock_was_set to all architectures.  I'm disappointed this wasnt done by
whoever wrote the code.

(It is a callback which the arch-specific RTC-updating code must make when
someone sets the time).

20 years ago[PATCH] Module headers cleanup
Andrew Morton [Wed, 18 Feb 2004 12:57:07 +0000 (04:57 -0800)]
[PATCH] Module headers cleanup

From: Brian Gerst <bgerst@didntduck.org>

Cleans up some leftovers from the old module loader:

- Remove unused defines from modules.h

- Remove unused file modsetver.h

20 years ago[PATCH] Documentation on how to debug modules
Andrew Morton [Wed, 18 Feb 2004 12:56:58 +0000 (04:56 -0800)]
[PATCH] Documentation on how to debug modules

From: Alex Goddard <agoddard@purdue.edu>

How to debug module loading problems.  The wording is a slightly changed
version of what Rusty said.

20 years ago[PATCH] Fix __release_region() race
Andrew Morton [Wed, 18 Feb 2004 12:56:48 +0000 (04:56 -0800)]
[PATCH] Fix __release_region() race

From: MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>

I am testing PCI hot-plug in 2.6.2 kernel, but sometimes a struct resource
tree in kernel/resource.c was broken if multiple hot-plug requests are
issued at the same time.

The reason is lots of drivers call release_region() on hot removal, and
__release_region(), which is invoked by release_region() macro, changes the
tree without holding a writer lock for resource_lock.

I think __release_region() must hold a writer lock as well as
__request_region() does.

A following patch fixes the issue in my environment.

20 years ago[PATCH] remove max_anon limit
Andrew Morton [Wed, 18 Feb 2004 12:56:39 +0000 (04:56 -0800)]
[PATCH] remove max_anon limit

From: Tim Hockin <thockin@sun.com>

Remove the max_anon via dynamically allocation.  We also change the
idr_pre_get() interface to take a gfp mask, which should have always been
there.

20 years ago[PATCH] oprofile: add Pentium Mobile support
Andrew Morton [Wed, 18 Feb 2004 12:56:30 +0000 (04:56 -0800)]
[PATCH] oprofile: add Pentium Mobile support

From: Philippe Elie <phil.el@wanadoo.fr>

From: Will Cohen <wcohen@redhat.com>

Add oprofile support for Pentium Mobile (P6 core).  Pentium Mobile needs to
unmask LVPTC vector, since it doesn't hurt other P6 core based cpus we do
it unconditionally for all these.

This patch require userspace tools >= 0.8 (only in sourceforge cvs currently)

20 years ago[PATCH] oprofile: ARM infrastructure
Andrew Morton [Wed, 18 Feb 2004 12:56:21 +0000 (04:56 -0800)]
[PATCH] oprofile: ARM infrastructure

From: Philippe Elie <phil.el@wanadoo.fr>

From: Zwane Mwaikambo <zwane@arm.linux.org.uk>

This patch adds infrastructure code and enables ARM to utilise the timer
int oprofile driver.  There is PMU code under development for the XScale
but that is still forthcoming.  In the meantime you can use the timer int
driver with an updated Oprofile-CVS userspace (SF is a bit slow, please
allow 24hrs).

20 years ago[PATCH] Oprofile: fix nmi_timer_int detection
Andrew Morton [Wed, 18 Feb 2004 12:56:11 +0000 (04:56 -0800)]
[PATCH] Oprofile: fix nmi_timer_int detection

From: Philippe Elie <phil.el@wanadoo.fr>

From: Zwane Mwaikambo <zwane@arm.linux.org.uk>

The nmi_timer_int oprofile driver was enabling itself unconditionally if an
SMP kernel was being used on a UP system without an IOAPIC.

Tested on a P5 using NMI timer int driver and UP system using timer int
driver both running an SMP kernel.

2004-02-11  Zwane Mwaikambo <zwane@arm.linux.org.uk>

* arch/i386/kernel/nmi.c: export nmi_active
* arch/i386/oprofile/nmi_timer_int.c: use it to check if owe can use
  an nmi interrupt

20 years ago[PATCH] 3c59x: bring back the `enable_wol' option
Andrew Morton [Wed, 18 Feb 2004 12:56:02 +0000 (04:56 -0800)]
[PATCH] 3c59x: bring back the `enable_wol' option

Some machines appear to have BIOS problems which are causing 3c59x adapters
to come up in a powered-off state when WOL and PM are enabled.

So bring back the 2.4 `enable_wol' module option which disables wake-on-lan
unless the user specifically asked for it.

20 years ago[PATCH] cleanup patch that prepares for 4Kb stacks
Andrew Morton [Wed, 18 Feb 2004 12:55:53 +0000 (04:55 -0800)]
[PATCH] cleanup patch that prepares for 4Kb stacks

From: Arjan van de Ven <arjanv@redhat.com>

I have 4Kb stacks + IRQ stacks working in my tree.  The biggest part of the
4K-stacks work is changing hardcoded 8Kb assumptions to the proper,
pre-existing define for this.  That part of the patch is appropriate in
general, even when 4Kb stacks might not be.

20 years ago[PATCH] fix display of NBD in /proc/partitions
Andrew Morton [Wed, 18 Feb 2004 12:55:44 +0000 (04:55 -0800)]
[PATCH] fix display of NBD in /proc/partitions

The recent change to /proc/partitions which prevents it from displaying
removeable media accidentally caused 128 NBD and 16 ramdisk partitions to
appear in /proc/partitions instead.

So add a specific gendisk flag which says "don't show me in /proc/partitions"
and use that.

20 years ago[PATCH] skip offline CPUs in show_free_areas
Andrew Morton [Wed, 18 Feb 2004 12:55:35 +0000 (04:55 -0800)]
[PATCH] skip offline CPUs in show_free_areas

From: Christoph Hellwig <hch@lst.de>

Don't try to display the per-cpu information for CPUs which aren't there.

20 years ago[PATCH] off_t in nfsd_commit needs to be loff_t
Andrew Morton [Wed, 18 Feb 2004 12:55:26 +0000 (04:55 -0800)]
[PATCH] off_t in nfsd_commit needs to be loff_t

From: Neil Brown <neilb@cse.unsw.edu.au>,

From: Miquel van Smoorenburg <miquels@cistron.nl>

While I was stress-testing NFS/XFS on 2.6.1/2.6.2-rc, I found that
sometimes my "dd" would exit with:

#  dd if=/dev/zero bs=4096 > /mnt/file
dd: writing `standard output': Invalid argument
1100753+0 records in
1100752+0 records out

After adding some debug printk's to the server and client code and some
tcpdump-ing, I found that the NFSERR_INVAL was returned by nfsd_commit on
the server.

Turns out that the "offset" argument is off_t instead of loff_t.  It isn't
used at all (unfortunately), but it _is_ checked for sanity, so that's
where the error came from.

20 years ago[PATCH] drivers/char/vt possible race
Andrew Morton [Wed, 18 Feb 2004 12:55:17 +0000 (04:55 -0800)]
[PATCH] drivers/char/vt possible race

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>

I falled again on the crash in con_do_write() with driver->data beeing
NULL.  It happens during boot, when userland is playing open/close games
with tty's, I was intentionally typing keys like mad during boot trying to
trigger another problem when this one poped up.

Looking at the code, I'm not sure how protected we are by the above (tty)
layer, paulus told me to not rely on anything like locking coming from
there, so I decided to extend the scope of the console semaphore one more
bit to cover races between calls to con_open, con_close and con_write.
Note that in con_do_write, I intentionally drop the semaphore to avoid
keeping it held when waiting on the local buffer, and I added some sanity
checks on tty->driver_data with some printk's in case we still have an open
race by the tty layer.  At least, now, the couple vc_allocated &
tty->driver_data should be protected though.

20 years ago[PATCH] /proc thread visibility fixes
Andrew Morton [Wed, 18 Feb 2004 12:55:08 +0000 (04:55 -0800)]
[PATCH] /proc thread visibility fixes

From: Kingsley Cheung <kingsley@aurema.com>

Is is possible to examine the data of tasks currently existing in the system
which are not threads of the same thread group.

For example, the only task in the group where init is group leader is itself:

gen2 02:50:44 ~: ls /proc/1/task
1

However, I can then read the contents of 'stat' for any other task in the
system:

gen2 02:49:45 ~: cat /proc/1/task/$$/stat
1669 (bash) S 1668 1669 1669 34816 1730 256 1480 6479 12 4 8 5 5 17 15 0 1 0
+8065 3252224 451 4294967295 134512640 134955932 3221225104 3221222840
+4294960144 0 65536 3686404 1266761467 3222442959 0 0 17 0 0 0

I had a look at fs/proc/base.c and found that the 'lookup' functions for
these directories were checking that the task in question existed, but
overlooked the following:

1.  In the function proc_pid_lookup, a check is required to ensure that
    the task in question is a thread group leader.  Without the check, any
    task can have its data retrieved accordingly.  Consider the following.
    There is a multithreaded process 1777.

gen2 23:22:47 /proc/1777: ls task
1777  1778  1779  1780  1781  1782  1783  1784  1785  1786  1787  1788

However, I can read the stat file for its thread 1778 as follows:

gen2 23:22:50 /proc/1777: cat /proc/1778/stat
1778 (multithreadtest) T 1777 1777 1672 34816 1672 64 0 0 0 0 14 17 0 0 15 0 12 0 8871 24727552 104 4294967295 134512640 134515104 3221222496 1077365276 4294960144 0 0 0 0 3222479248 0 0 -1 1 0 0

But 1778 is not meant to show up in /proc/, as intended right?:

gen2 23:22:56 /proc/1777: ls /proc/
1     1365  1661  1793  881        dma          kcore       scsi
10    1371  1662  18    9          driver       kmsg        self
1014  1372  1663  2     909        execdomains  loadavg     slabinfo
1032  14    1664  3     963        fb           locks       stat
1062  15    1665  4     966        filesystems  mdstat      swaps
1066  16    1666  5     buddyinfo  fs           meminfo     sys
1067  1605  1669  6     bus        ide          misc        sysrq-trigger
1087  1610  1670  7     cmdline    interrupts   modules     sysvipc
1095  1611  1671  736   cpuinfo    iomem        mounts      tty
11    1641  1672  8     crypto     ioports      mtrr        uptime
12    1658  17    807   devices    irq          net         version
13    1660  1777  810   diskstats  kallsyms     partitions  vmstat

2.  The other part of the bug is in the function proc_task_lookup.  Here
    there needs to be a check that the task X is indeed a thread of the
    thread group Y when we read /proc/<Y>/task/<X>.

Right now, this check does not exist, which allows for any existing
task to have its data read from another thread group directory.  The
following reads the stat directory of my bash shell from the thread
group 1.

gen2 23:28:07 ~: cd /proc/1
gen2 23:28:10 /proc/1: ls
auxv     cwd      exe  maps  mounts  stat   status  wchan
cmdline  environ  fd   mem   root    statm  task
gen2 23:28:11 /proc/1: ls task
1
gen2 23:28:27 /proc/1: cat task/$$/stat
1671 (bash) S 1670 1671 1671 34817 1802 256 1953 8101 12 4 10 6 9 26 15 0 1 0 5789 3252224 454 4294967295 134512640 134955932 3221225104 3221222840 4294960144 0 65536 3686404 1266761467 3222442959 0 0 17 0 0 0

20 years ago[PATCH] Minor cross-compile issues
Andrew Morton [Wed, 18 Feb 2004 12:54:59 +0000 (04:54 -0800)]
[PATCH] Minor cross-compile issues

From: Pratik Solanki <pratik.solanki@timesys.com>

- Fix include path for build.c so that it finds asm/boot.h.
  /usr/include/asm/boot.h may not be present when cross-compiling on a
  non-Linux machine.

- $(CONFIG_SHELL) instead of sh.

20 years ago[PATCH] cpufreq_scale() fixes
Andrew Morton [Wed, 18 Feb 2004 12:54:50 +0000 (04:54 -0800)]
[PATCH] cpufreq_scale() fixes

From: Dominik Brodowski <linux@dominikbrodowski.de>

Use do_div on 32-bit archs in cpufreq_scale, and native "/" on 64-bit
archs.

20 years ago[PATCH] defer panic for too many items in boot parameter line
Andrew Morton [Wed, 18 Feb 2004 12:54:41 +0000 (04:54 -0800)]
[PATCH] defer panic for too many items in boot parameter line

From: Werner Almesberger <werner@almesberger.net>

When passing too many unrecognized boot command line options (which become
arguments or environment variables), the 2.6 kernel panics (unlike 2.4,
which just ignores the extra items).  Unfortunately, this happens before
the console is initialized, so all you get is a kernel that dies quickly,
for no apparent reason.

This is particularly irritating if using UML with
init=something wi th a lot of ar gu men t s

The patch below delays the panic until after console_init.

(akpm: I mainly added this in because we have other places where the
panic-later-on machinery is needed).

20 years ago[PATCH] adfs: remove a kernel 2.2 #ifdef
Andrew Morton [Wed, 18 Feb 2004 12:54:32 +0000 (04:54 -0800)]
[PATCH] adfs: remove a kernel 2.2 #ifdef

From: Adrian Bunk <bunk@fs.tum.de>

The patch below removes a kernel 2.2 #ifdef from fs/adfs/adfs.h .

Note that this #ifdef was only present in the header, the implementation
of adfs_bmap was already removed.

20 years ago[PATCH] kbuild documentation fix
Andrew Morton [Wed, 18 Feb 2004 12:54:23 +0000 (04:54 -0800)]
[PATCH] kbuild documentation fix

From: Ryan Boder <icanoop@bitwiser.org>

Explains how to compile external modules in
Documentation/kbuild/modules.txt.

20 years ago[PATCH] remove kernel 2.2 #ifdef's from {i,}stallion.h
Andrew Morton [Wed, 18 Feb 2004 12:54:14 +0000 (04:54 -0800)]
[PATCH] remove kernel 2.2 #ifdef's from {i,}stallion.h

From: Adrian Bunk <bunk@fs.tum.de>

The patch below removeskernel 2.2 #ifdef's from {i,}stallion.h .

20 years ago[PATCH] OSS: remove #ifdef's for kernel 2.0
Andrew Morton [Wed, 18 Feb 2004 12:54:05 +0000 (04:54 -0800)]
[PATCH] OSS: remove #ifdef's for kernel 2.0

From: Adrian Bunk <bunk@fs.tum.de>

The patch below removes two #ifdef's for kernel 2.0 from OSS.

20 years ago[PATCH] Rename bitmap_snprintf() and cpumask_snprintf() to *_scnprintf()
Andrew Morton [Wed, 18 Feb 2004 12:53:55 +0000 (04:53 -0800)]
[PATCH] Rename bitmap_snprintf() and cpumask_snprintf() to *_scnprintf()

From: Joe Korty <joe.korty@ccur.com>

Rename bitmap_snprintf() to bitmap_scnprintf() and cpumask_snprintf() to
cpumask_scnprintf(), as these functions now belong to the scnprintf family
of functions.

20 years ago[PATCH] MCE fixes and cleanups
Andrew Morton [Wed, 18 Feb 2004 12:53:46 +0000 (04:53 -0800)]
[PATCH] MCE fixes and cleanups

Andi notes that the

smp_call_function(foo);
foo();

in there is incorrect on preemptible kernels.

Fix that by using on_each_cpu(), which takes care of such things.

Also, remove the open-coded timer from here.  We have
schedule_delayed_work().

And remove the `timerset' variable, which doesn't do anything.

20 years ago[PATCH] Fix printk level on non fatal MCEs
Andrew Morton [Wed, 18 Feb 2004 12:53:37 +0000 (04:53 -0800)]
[PATCH] Fix printk level on non fatal MCEs

From: Andi Kleen <ak@suse.de>

For various reasons non fatal Machine Checks can happen on Athlons (e.g.
we have reports that laptops like to trigger them on suspend/resume)

They are not necessarily fatal and often only minor hardware glitches.

But what's annoying is that they're KERN_EMERG and pollute your console and
scare the user into writing confused kernel bug reports.

This patch just replaces the KERN_EMERGs with KERN_INFO for now.  Longer
term I think it would be better to log this stuff into a separate log.

20 years ago[PATCH] 8259 timer ack fix
Andrew Morton [Wed, 18 Feb 2004 12:53:28 +0000 (04:53 -0800)]
[PATCH] 8259 timer ack fix

From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>

Fix up the 8259 ack handling for buggy SMM firmware.

See http://www.ussg.iu.edu/hypermail/linux/kernel/0203.2/0956.html

Apparently the embedded 8259A-compatible core is not fully functional.
This patch lets the I/O APIC-driven NMI watchdog to function correctly.
Credit to Ross Dickson for discovering this.

20 years ago[PATCH] dm: drop BIO_SEG_VALID bit
Andrew Morton [Wed, 18 Feb 2004 12:53:19 +0000 (04:53 -0800)]
[PATCH] dm: drop BIO_SEG_VALID bit

From: Joe Thornber <thornber@redhat.com>

I just noticed that bio_clone copies the BIO_SEG_VALID bit from the original
bio when it was set.  When we modify bi_idx or bi_vcnt afterwards the segment
counts are invalid and the bit must be dropped (though it is fairly unlikely
that it has already been set).  [Christophe Saout]

20 years ago[PATCH] dm: Remove redundant spin lock in dec_pending()
Andrew Morton [Wed, 18 Feb 2004 12:53:10 +0000 (04:53 -0800)]
[PATCH] dm: Remove redundant spin lock in dec_pending()

From: Joe Thornber <thornber@redhat.com>

Remove redundant spin lock in dec_pending()

20 years ago[PATCH] dm: Zero size target sanity check
Andrew Morton [Wed, 18 Feb 2004 12:53:01 +0000 (04:53 -0800)]
[PATCH] dm: Zero size target sanity check

From: Joe Thornber <thornber@redhat.com>

Add sanity check to dm_table_add_target() against zero length targets.
[Christophe Saout]

20 years ago[PATCH] dm: Correct GFP flag in dm_table_create()
Andrew Morton [Wed, 18 Feb 2004 12:52:52 +0000 (04:52 -0800)]
[PATCH] dm: Correct GFP flag in dm_table_create()

From: Joe Thornber <thornber@redhat.com>

For some reason dm_table_create() was allocating GFP_NOIO rather than
GFP_KERNEL.

20 years ago[PATCH] dm: Tidy up the error path for alloc_dev()
Andrew Morton [Wed, 18 Feb 2004 12:52:43 +0000 (04:52 -0800)]
[PATCH] dm: Tidy up the error path for alloc_dev()

From: Joe Thornber <thornber@redhat.com>

Tidy up the error path for alloc_dev()

20 years ago[PATCH] dm: Maintain ordering when deferring bios
Andrew Morton [Wed, 18 Feb 2004 12:52:34 +0000 (04:52 -0800)]
[PATCH] dm: Maintain ordering when deferring bios

From: Joe Thornber <thornber@redhat.com>

Make sure that we maintain ordering when deferring bios.

20 years ago[PATCH] dm: Get rid of struct dm_deferred_io in dm.c
Andrew Morton [Wed, 18 Feb 2004 12:52:25 +0000 (04:52 -0800)]
[PATCH] dm: Get rid of struct dm_deferred_io in dm.c

From: Joe Thornber <thornber@redhat.com>

Remove struct dm_deferred_io from dm.c.  [Christophe Saout]

20 years ago[PATCH] dm: Move to_bytes() and to_sectors() into dm.h
Andrew Morton [Wed, 18 Feb 2004 12:52:16 +0000 (04:52 -0800)]
[PATCH] dm: Move to_bytes() and to_sectors() into dm.h

From: Joe Thornber <thornber@redhat.com>

Move to_bytes() and to_sectors() into dm.h

20 years ago[PATCH] dm: Export dm_vcalloc()
Andrew Morton [Wed, 18 Feb 2004 12:52:07 +0000 (04:52 -0800)]
[PATCH] dm: Export dm_vcalloc()

From: Joe Thornber <thornber@redhat.com>

Export dm_vcalloc()

20 years ago[PATCH] md: Allow partitioning of MD devices.
Andrew Morton [Wed, 18 Feb 2004 12:51:58 +0000 (04:51 -0800)]
[PATCH] md: Allow partitioning of MD devices.

From: NeilBrown <neilb@cse.unsw.edu.au>

With this patch, md used two major numbers for arrays.

One Major is number 9 with name 'md' have unpartitioned md arrays, one per
minor number.

The other Major is allocated dynamically with name 'mdp' and had on array for
every 64 minors, allowing for upto 63 partitions.

The arrays under one major are completely separate from the arrays under the
other.

The preferred name for devices with the new major are of the form:

  /dev/md/d1p3  # partion 3 of device 1 - minor 67

When a paritioned md device is assembled, the partitions are not recognised
until after the whole-array device is opened again.  A future version of
mdadm will perform this open so that the need will be transparent.

20 years ago[PATCH] md: Dynamically limit size of bio requests used for raid1 resync
Andrew Morton [Wed, 18 Feb 2004 12:51:49 +0000 (04:51 -0800)]
[PATCH] md: Dynamically limit size of bio requests used for raid1 resync

From: NeilBrown <neilb@cse.unsw.edu.au>

Currently raid1 uses PAGE_SIZE read/write requests for resync, as it doesn't
know how to honour per-device restrictions.  This patch uses to bio_add_page
to honour those restrictions and ups the limit on request size to 64K.  This
has a measurable impact on rebuild speed (25M/s -> 60M/s)

20 years ago[PATCH] md: Avoid unnecessary bio allocation during raid1 resync
Andrew Morton [Wed, 18 Feb 2004 12:51:40 +0000 (04:51 -0800)]
[PATCH] md: Avoid unnecessary bio allocation during raid1 resync

From: NeilBrown <neilb@cse.unsw.edu.au>

For each resync request, we allocate a "r1_bio" which has a bio "master_bio"
attached that goes largely unused.  We also allocate a read_bio which is
used.  This patch removes the read_bio and just uses the master_bio instead.

This fixes a bug wherein bi_bdev of the master_bio wasn't being set, but was
being used.

We also introduce a new "sectors" field into the r1_bio as we can no-longer
rely in master_bio->bi_sectors.

20 years ago[PATCH] md: Remove some un-needed fields from r1bio_s
Andrew Morton [Wed, 18 Feb 2004 12:51:31 +0000 (04:51 -0800)]
[PATCH] md: Remove some un-needed fields from r1bio_s

From: NeilBrown <neilb@cse.unsw.edu.au>

next_r1 is never used, so it can just go.

read_bio isn't needed as we can easily use one of the pointers in the
write_bios array - write_bios[->read_disk].  So rename "write_bios" to "bios"
and store the pointer to the read bio in there.

20 years ago[PATCH] md: Discard the cmd field from r1_bio structure
Andrew Morton [Wed, 18 Feb 2004 12:51:22 +0000 (04:51 -0800)]
[PATCH] md: Discard the cmd field from r1_bio structure

From: NeilBrown <neilb@cse.unsw.edu.au>

The only time it is really needed is to differentiate a retry-on-fail from a
write-after-read-for-resync request to raid1d.  So we use a bit in 'state'
for that.

20 years ago[PATCH] md: Split read and write end_request handlers
Andrew Morton [Wed, 18 Feb 2004 12:51:13 +0000 (04:51 -0800)]
[PATCH] md: Split read and write end_request handlers

From: NeilBrown <neilb@cse.unsw.edu.au>

Instead of having a single end_request handler that must determine whether it
was a read or a write request, we have two separate handlers, which makes
each of them easier to follow.

20 years ago[PATCH] md: Print "deprecated" warning when START_ARRAY is used.
Andrew Morton [Wed, 18 Feb 2004 12:51:04 +0000 (04:51 -0800)]
[PATCH] md: Print "deprecated" warning when START_ARRAY is used.

From: NeilBrown <neilb@cse.unsw.edu.au>

The "START_ARRAY" ioctl depends on major/minor numbers (as stored in the raid
superblock) are stable over reboots, which is increasingly untrue.

There are better ways to start an array (e.g.  with mdadm) so we mark the
ioctl as deprecated for 2.6, and will remove it in 2.7.

20 years ago[PATCH] kNFSd:fix build problems in nfs w/o proc_fs on 2.6.0-test5
Andrew Morton [Wed, 18 Feb 2004 12:50:55 +0000 (04:50 -0800)]
[PATCH] kNFSd:fix build problems in nfs w/o proc_fs on 2.6.0-test5

From: NeilBrown <neilb@cse.unsw.edu.au>

From: Stephen Hemminger <shemminger@osdl.org>
Date: Fri, 12 Sep 2003 11:31:06 -0700

NFS won't build w/o CONFIG_PROC_FS.  Looks like typo's (or a C++
programmer) in stats.h

20 years ago[PATCH] kNFSd: convert NFS /proc interfaces to seq_file
Andrew Morton [Wed, 18 Feb 2004 12:50:46 +0000 (04:50 -0800)]
[PATCH] kNFSd: convert NFS /proc interfaces to seq_file

From: NeilBrown <neilb@cse.unsw.edu.au>

From: shemminger@osdl.org Sat Sep  6 09:19:50 2003
Date: Fri, 5 Sep 2003 16:19:30 -0700

Converts /proc/net/rpc/nfs and /proc/net/rpc/nfsd to use the simpler
seq_file interface.

20 years ago[PATCH] kNFSd: ip_map_init does a kmalloc which isn't checked...
Andrew Morton [Wed, 18 Feb 2004 12:50:37 +0000 (04:50 -0800)]
[PATCH] kNFSd: ip_map_init does a kmalloc which isn't checked...

From: NeilBrown <neilb@cse.unsw.edu.au>

There is no way to return an error from a cache init routine, so instead we
make sure to pre-allocate the memory needed, and free it after the lookup
if the lookup failed.

20 years ago[PATCH] kNFSd: Allow sunrpc/svc cache init function to modify the "key"
Andrew Morton [Wed, 18 Feb 2004 12:50:28 +0000 (04:50 -0800)]
[PATCH] kNFSd: Allow sunrpc/svc cache init function to modify the "key"

From: NeilBrown <neilb@cse.unsw.edu.au>

When adding a item to a sunrpc/svc cache that contains kmalloced data it is
usefully to move the malloced data out of the key object into the new cache
object rather than copying (as then we would need to cope with kmalloc
failure and such).  This means modifying the original.

If the kmalloced data forms part of the key, then we must not move the data
out until after the key isn't needed any more.  So this patch moves the
call to "INIT" on a new item (which fills in the key) to *after* the item
has been found (or not), and also makes sure we only call the HASH function
once.

Thanks to "J.  Bruce Fields" <bfields@fieldses.org>

also

 1/ remove unnecessary assignment
 2/ fix comments that lag behind implementation.

20 years ago[PATCH] kNFSd: Fix possible scheduling_while_atomic in cache.c
Andrew Morton [Wed, 18 Feb 2004 12:50:19 +0000 (04:50 -0800)]
[PATCH] kNFSd: Fix possible scheduling_while_atomic in cache.c

From: NeilBrown <neilb@cse.unsw.edu.au>

We currently call cache_put, which can schedule(), under a spin_lock.  This
patch moves that call outside the spinlock.

20 years ago[PATCH] #if versus #ifdef cleanup
Andrew Morton [Wed, 18 Feb 2004 12:50:10 +0000 (04:50 -0800)]
[PATCH] #if versus #ifdef cleanup

From: Valdis.Kletnieks@vt.edu

15 changes of #if to #ifdef and 2 places CONFIG_FOO should be
defined(CONFIG_FOO).  This gets rid of spurious warnings if you build with
"-Wundef" so you get a warning if you have a preprocessor command like:

#if CONFIG_ETRAX_DS1302_RSTBIT == 27

and you'll be told if it's substituting a zero rather than silent
weirdness and unexpected code generation.

20 years ago[PATCH] MIPS: New 2.6 serial drivers
Andrew Morton [Wed, 18 Feb 2004 12:50:01 +0000 (04:50 -0800)]
[PATCH] MIPS: New 2.6 serial drivers

From: Ralf Baechle <ralf@linux-mips.org>

Three new MIPS-specific serial drivers.  ip22.c is derived from the sparc
zilog driver; guess we should write a generic Zilog driver somewhen ...

20 years ago[PATCH] Enable coredumps > 2GB
Andrew Morton [Wed, 18 Feb 2004 12:49:52 +0000 (04:49 -0800)]
[PATCH] Enable coredumps > 2GB

From: Andi Kleen <ak@muc.de>

Some x86-64 users were complaining that coredumps >2GB don't work.

This will enable large coredump for everybody.  Apparently the 32bit
gdb/binutils cannot handle them, but I hear the binutils people are working
on fixing that.  I doubt it will harm people - unreadable coredumps are not
worse than no coredump and it won't make any difference in space usage if
you get a 1.99GB or a 2.5GB coredump.  So just enable it unconditionally.
If it should be really a problem for 32bit the rlimit defaults in
resource.h could be changed.

For file systems that don't support O_LARGEFILE you should just get an
truncated coredumps for big address spaces.

20 years ago[PATCH] devfs: race fixes and cleanup
Andrew Morton [Wed, 18 Feb 2004 12:49:43 +0000 (04:49 -0800)]
[PATCH] devfs: race fixes and cleanup

From: Andrey Borzenkov <arvidjaar@mail.ru>

- use struct nameidata in devfs_d_revalidate_wait to detect when it is
  called without i_sem hold; take i_sem on parent in this case.  This
  prevents both deadlock with devfs_lookup by allowing it to drop i_sem
  consistently and oops in d_instantiate by ensuring that it always runs
  protected

- remove dead code that deals with major number allocation.  The only
  remaining user was devfs itself and patch changes it to

- use register_chardev to get device number for internal /dev/.devfsd and
  /dev/.statd.

- remove dead auto allocation flag as well

- remove code that does module get on dev open - it is handled by fops_get.
   Use init_special_inode consistently

- get rid of struct cdev_type and bdev_type - both have just single dev_t
  now

20 years ago[PATCH] snprintf fixes
Andrew Morton [Wed, 18 Feb 2004 12:49:34 +0000 (04:49 -0800)]
[PATCH] snprintf fixes

From: Juergen Quade <quade@hsnr.de>

Lots of places in the kernel are using [v]snprintf wrongly: they assume it
returns the number of characters copied.  It doesn't.  It returns the
number of characters which _would_ have been copied had the buffer not been
filled up.

So create new functions vscnprintf() and scnprintf() which have the
expected (sane) semaptics, and migrate callers over to using them.

20 years ago[PATCH] bd_set_size i_size handling
Andrew Morton [Wed, 18 Feb 2004 12:49:23 +0000 (04:49 -0800)]
[PATCH] bd_set_size i_size handling

We need to hold i_sem while running i_size_write().  But that seems like a
lot of fuss and deadlock potential.  So just write the dang thing.

20 years ago[PATCH] Mark intermezzo as broken
Andrew Morton [Wed, 18 Feb 2004 12:49:14 +0000 (04:49 -0800)]
[PATCH] Mark intermezzo as broken

The NGROUPS changes broke it, and we're not sure how to fixit, and nobody
appears to be working on or testing intermezzo.

20 years ago[PATCH] NGROUPS 2.6.2rc2 + fixups
Andrew Morton [Wed, 18 Feb 2004 12:49:05 +0000 (04:49 -0800)]
[PATCH] NGROUPS 2.6.2rc2 + fixups

From: Tim Hockin <thockin@sun.com>,
      Neil Brown <neilb@cse.unsw.edu.au>,
      me

New groups infrastructure.  task->groups and task->ngroups are replaced by
task->group_info.  Group)info is a refcounted, dynamic struct with an array
of pages.  This allows for large numbers of groups.  The current limit of
32 groups has been raised to 64k groups.  It can be raised more by changing
the NGROUPS_MAX constant in limits.h

20 years ago[PATCH] bonding alias revert and documentation fix
Andrew Morton [Wed, 18 Feb 2004 12:48:54 +0000 (04:48 -0800)]
[PATCH] bonding alias revert and documentation fix

From: Rusty Russell <rusty@rustcorp.com.au>

Jeff Garzik disliked the bonding driver knowing it was called "bond0".
Remove that alias, and revert documentation.

20 years ago[PATCH] add some more MODULE_ALIASes
Andrew Morton [Wed, 18 Feb 2004 12:48:45 +0000 (04:48 -0800)]
[PATCH] add some more MODULE_ALIASes

From: Rusty Russell <rusty@rustcorp.com.au>

New MODULE_ALIASes in:
1) arch/i386/kernel/microcode.c
2) drivers/char/genrtc.c
3) drivers/ide/ide-tape.c
4) drivers/net/bonding/bond_main.c
5) drivers/net/bsd_comp.c
6) drivers/net/ppp_deflate.c
7) drivers/net/ppp_generic.c

20 years ago[PATCH] Documentation: remove /etc/modules.conf refs
Andrew Morton [Wed, 18 Feb 2004 12:48:35 +0000 (04:48 -0800)]
[PATCH] Documentation: remove /etc/modules.conf refs

From: Rusty Russell <rusty@rustcorp.com.au>

Someone complained about the number of references to /etc/modules.conf in
the documentation.  While fixing them up (and examples where changed),
removed those which are redundant due to MODULE_ALIAS.

20 years ago[PATCH] AMD Elan is a different subarch
Andrew Morton [Wed, 18 Feb 2004 12:48:24 +0000 (04:48 -0800)]
[PATCH] AMD Elan is a different subarch

From: Adrian Bunk <bunk@fs.tum.de>

- AMD Elan is a different subarch, you can't configure a kernel that runs
  on both the AMD Elan and other i386 CPUs

- added optimizing CFLAGS for the AMD Elan

20 years ago[PATCH] gcc 2.95 supports -march=k6 (no need for check_gcc)
Andrew Morton [Wed, 18 Feb 2004 12:48:15 +0000 (04:48 -0800)]
[PATCH] gcc 2.95 supports -march=k6 (no need for check_gcc)

From: Adrian Bunk <bunk@fs.tum.de>

gcc 2.95 supports -march=k6 (no need for check_gcc)

20 years ago[PATCH] add Pentium M and Pentium-4 M options
Andrew Morton [Wed, 18 Feb 2004 12:48:05 +0000 (04:48 -0800)]
[PATCH] add Pentium M and Pentium-4 M options

From: Adrian Bunk <bunk@fs.tum.de>

add Pentium M and Pentium-4 M options:

- add MPENTIUMM (equivalent to PENTIUMIII except for a bigger
  X86_L1_CACHE_SHIFT)

- document that MPENTIUM4 is the right choice for a Pentium-4 M

20 years ago[PATCH] Limit hashtable sizes
Andrew Morton [Wed, 18 Feb 2004 12:47:56 +0000 (04:47 -0800)]
[PATCH] Limit hashtable sizes

From: "Chen, Kenneth W" <kenneth.w.chen@intel.com>

The issue of exceedingly large hash tables has been discussed on the
mailing list a while back, but seems to slip through the cracks.

What we found is it's not a problem for x86 (and most other
architectures) because __get_free_pages won't be able to get anything
beyond order MAX_ORDER-1 (10) which means at most those hash tables are
4MB each (assume 4K page size).  However, on ia64, in order to support
larger hugeTLB page size, the MAX_ORDER is bumped up to 18, which now
means a 2GB upper limits enforced by the page allocator (assume 16K page
size).  PPC64 is another example that bumps up MAX_ORDER.

Last time I checked, the tcp ehash table is taking a whooping (insane!)
2GB on one of our large machine.  dentry and inode hash tables also take
considerable amount of memory.

Setting the size of these tables is difficult: they need to be constrained on
many-zone ia64 machines, but this could cause significant performance
problems when there are (for example) 100 million dentries in cache.
Large-memory machines which do not slice that memory up into huge numbers of
zones do not need to run the risk of this slowdown.

So the sizing algorithms remain essentially unchanged, and boot-time options
are provided which permit the tables to be scaled down.

20 years ago[PATCH] Use CPU_UP_PREPARE properly
Andrew Morton [Wed, 18 Feb 2004 12:47:47 +0000 (04:47 -0800)]
[PATCH] Use CPU_UP_PREPARE properly

From: Rusty Russell <rusty@rustcorp.com.au>

The cpu hotplug code actually provides two notifiers: CPU_UP_PREPARE
which preceeds the online and can fail, and CPU_ONLINE which can't.

Current usage is only done at boot, so this distinction doesn't
matter, but it's a bad example to set.  This also means that the
migration threads do not have to be higher priority than the
others, since they are ready to go before any CPU_ONLINE callbacks
are done.

This patch is experimental but fairly straight foward: I haven't been
able to test it since extracting it from the hotplug cpu code, so it's
possible I screwed something up.

20 years ago[PATCH] Remove More Unneccessary CPU Notifiers
Andrew Morton [Wed, 18 Feb 2004 12:47:38 +0000 (04:47 -0800)]
[PATCH] Remove More Unneccessary CPU Notifiers

From: Rusty Russell <rusty@rustcorp.com.au>

Three more removed CPU notifiers extracted from the hotplug CPU patch.

kernel/softirq.c: the tasklet cpu prepration callback is useless:
the vectors are already initialized to NULL.  Even with the hotplug
CPU patches, they're of little or no use.

fs/buffer.c: once again, they are already initialized to zero.

mm/page_alloc.c: once again, already initialized to zero.

20 years ago[PATCH] Minor workqueue.c cleanup
Andrew Morton [Wed, 18 Feb 2004 12:47:29 +0000 (04:47 -0800)]
[PATCH] Minor workqueue.c cleanup

From: Rusty Russell <rusty@rustcorp.com.au>

Move duplicated code to __queue_work(), and don't set the CPU for
queue_delayed_work() until the timer goes off.  The second one only has an
effect on CONFIG_HOTPLUG_CPU where the CPU goes down and the timer goes off
on a different CPU than it was scheduled on.

20 years ago[PATCH] Remove kstat cpu notifiers
Andrew Morton [Wed, 18 Feb 2004 12:47:20 +0000 (04:47 -0800)]
[PATCH] Remove kstat cpu notifiers

From: Rusty Russell <rusty@rustcorp.com.au>

Some well-meaning person put a notifier in for CPUs to update the kstat
structures in sched.c.  However, it does nothing, and even with the full
hotplug CPU patch, it still does nothing.

Simple counters very rarely need anything done when CPUs come up or go
down.  If you have per-cpu caches, or per-cpu threads, you need to do
something.  But very rarely for stats.

20 years ago[PATCH] kthread primitive
Andrew Morton [Wed, 18 Feb 2004 12:47:11 +0000 (04:47 -0800)]
[PATCH] kthread primitive

From: Rusty Russell <rusty@rustcorp.com.au>

These two patches provide the framework for stopping kernel threads to
allow hotplug CPU.  This one just adds kthread.c and kthread.h, next
one uses it.

Most importantly, adds a Monty Python quote to the kernel.

Details:

The hotplug CPU code introduces two major problems:

1) Threads which previously never stopped (migration thread,
   ksoftirqd, keventd) have to be stopped cleanly as CPUs go offline.
2) Threads which previously never had to be created now have
   to be created when a CPU goes online.

Unfortunately, stopping a thread is fairly baroque, involving memory
barriers, a completion and spinning until the task is actually dead
(for example, complete_and_exit() must be used if inside a module).

There are also three problems in starting a thread:
1) Doing it from a random process context risks environment contamination:
   better to do it from keventd to guarantee a clean environment, a-la
   call_usermodehelper.
2) Getting the task struct without races is a hard: see kernel/sched.c
   migration_call(), kernel/workqueue.c create_workqueue_thread().
3) There are races in starting a thread for a CPU which is not yet
   online: migration thread does a complex dance at the moment for
   a similar reason (there may be no migration thread to migrate us).

Place all this logic in some primitives to make life easier:
kthread_create() and kthread_stop().  These primitives require no
extra data-structures in the caller: they operate on normal "struct
task_struct"s.

Other changes:

- Expose keventd_up(), as keventd and migration threads will use kthread to
  launch, and kthread normally uses workqueues and must recognize this case.

- Kthreads created at boot before "keventd" are spawned directly.  However,
  this means that they don't have all signals blocked, and hence can be
  killed.  The simplest solution is to always explicitly block all signals in
  the kthread.

- Change over the migration threads, the workqueue threads and the
  ksoftirqd threads to use kthread.

- module.c currently spawns threads directly to stop the machine, so a
  module can be atomically tested for removal.

- Unfortunately, this means that the current task is manipulated (which
  races with set_cpus_allowed, for example), and it can't set its priority
  artificially high.  Using a kernel thread can solve this cleanly, and with
  kthread_run, it's simple.

- kthreads use keventd, so they inherit its cpus_allowed mask.  Unset it.
  All current users set it explicity anyway, but it's nice to fix.

- call_usermode_helper uses keventd, so the process created inherits its
  cpus_allowed mask.  Unset it.

- Prevent errors in boot when cpus_possible() contains a cpu which is not
  online (ie.  a cpu didn't come up).  This doesn't happen on x86, since a
  boot failure makes that CPU no longer possible (hacky, but it works).

- When the cpu fails to come up, some callbacks do kthread_stop(), which
  doesn't work without keventd (which hasn't started yet).  Call it directly,
  and take care that it restores signal state (note: do_sigaction does a
  flush on blocked signals, so we don't need to repeat it).

20 years ago[PATCH] ACPI PM timer
Andrew Morton [Wed, 18 Feb 2004 12:47:01 +0000 (04:47 -0800)]
[PATCH] ACPI PM timer

From: Dominik Brodowski <linux@dominikbrodowski.de>,
      John Stultz <johnstul@us.ibm.com>,
      Dmitry Torokhov

Add the ACPI Powermanagement Timer as x86 kernel timing source.  Unlike the
Time Stamp Counter, it is a reliable timing source which does not get
affected by aggressive powermanagement features like CPU frequency scaling.

Some ideas and some code are based on Arjan van de Ven's implementation for
2.4, and on R.  Byron Moore's drivers/acpi/hardware/hwtimer.c.

We also replace the loop based delay_pmtmr with a TSC based delay_pmtmr,
which resolves a number of issues caused by the loop based delay.  Unsynced
TSCs as well frequency changing TSCs will effect the length of __delay(), but
it seems this method works best.

20 years ago[PATCH] loop: remove redundant initialisation
Andrew Morton [Wed, 18 Feb 2004 12:46:52 +0000 (04:46 -0800)]
[PATCH] loop: remove redundant initialisation

From: "Yury V. Umanets" <umka@namesys.com>

This removes a redundant assignment in loop.

20 years ago[PATCH] loop.c doesn't fail init gracefully
Andrew Morton [Wed, 18 Feb 2004 12:46:43 +0000 (04:46 -0800)]
[PATCH] loop.c doesn't fail init gracefully

From: BlaisorBlade <blaisorblade_spam@yahoo.it>

loop_init doesn't fail gracefully for two reasons:

1) If initialization of loop driver fails, we have an call to
   devfs_add("loop") without any devfs_remove; I add that.

2) On lwn.net 2.6 kernel docs, Jonathan Corbet says: "If you are calling
   add_disk() in your driver initialization routine, you should not fail
   the initialization process after the first call."

So I make loop.c conform to this request by moving add_disk after all
memory allocations.

20 years ago[PATCH] loop: BIO handling fix
Andrew Morton [Wed, 18 Feb 2004 12:46:34 +0000 (04:46 -0800)]
[PATCH] loop: BIO handling fix

From: Ben Slusky <sluskyb@paranoiacs.org>

One more patch --- this fixes a minor bio handling bug in the filebacked
code path. I'd fixed it incidentally in the loop-recycle patch.

I don't think you could actually see damage from this bug unless you
run device mapper on top of loop devices, but still this is the correct
behavior.

20 years ago[PATCH] remove useless highmem bounce from loop/cryptoloop
Andrew Morton [Wed, 18 Feb 2004 12:46:25 +0000 (04:46 -0800)]
[PATCH] remove useless highmem bounce from loop/cryptoloop

From: Ben Slusky <sluskyb@paranoiacs.org>

The attached patch changes the loop device transfer functions (including
cryptoloop transfers) to accept page/offset pairs instead of virtual
addresses, and removes the redundant kmaps in do_lo_send, do_lo_receive,
and loop_transfer_bio. Per Andrew Morton's request a while back.

20 years ago[PATCH] loop: remove the bio remapping capability
Andrew Morton [Wed, 18 Feb 2004 12:46:16 +0000 (04:46 -0800)]
[PATCH] loop: remove the bio remapping capability

This patch removes the loop feature wherein we remap BIOs for block-backed
loop.  So file-backed and block-backed loop are handled identically.

It cleans up the code a lot and fixes the low-on-memory lockups which
block-backed loop currently suffers.

What we lose is the journalling ordering guarantees which
exts-on-loop-on-blockdev had.  But dm-crypt provides that.

20 years ago[PATCH] ppc64: iseries IRQ fix
Andrew Morton [Wed, 18 Feb 2004 12:46:08 +0000 (04:46 -0800)]
[PATCH] ppc64: iseries IRQ fix

From: Stephen Rothwell <sfr@canb.auug.org.au>

This patch lets 2.6.3-rc4 build and boot on an PPC64 iSeries box (at least
for my configuration).  The veth.o bit in the networking Makefile got there
by accident and should be removed anyway ...

There is more to make it work properly (note the "Temporary hack"), but
this gets us closer.

20 years ago[PATCH] ppc64: fix debugger() warnings
Andrew Morton [Wed, 18 Feb 2004 12:45:59 +0000 (04:45 -0800)]
[PATCH] ppc64: fix debugger() warnings

From: Anton Blanchard <anton@samba.org>

Fix compile warnings and add some type safety to debugger macros.

20 years ago[PATCH] ppc64: fix saved_command_line/cmd_line lengths
Andrew Morton [Wed, 18 Feb 2004 12:45:50 +0000 (04:45 -0800)]
[PATCH] ppc64: fix saved_command_line/cmd_line lengths

From: Anton Blanchard <anton@samba.org>

cmd_line was twice the size of saved_command_line but we did a strcpy from
the larger into the smaller.  Create COMMAND_LINE_SIZE and use it.

20 years ago[PATCH] ppc64: Fix prom.c warnings
Andrew Morton [Wed, 18 Feb 2004 12:45:41 +0000 (04:45 -0800)]
[PATCH] ppc64: Fix prom.c warnings

arch/ppc64/kernel/prom.c:200: warning: missing braces around initializer
arch/ppc64/kernel/prom.c:200: warning: (near initialization for `hmt_thread_data[0]')
arch/ppc64/kernel/prom.c: In function `prom_hold_cpus':
arch/ppc64/kernel/prom.c:1090: warning: implicit declaration of function `_get_PIR'

20 years ago[PATCH] msg.h needs list.h
Andrew Morton [Wed, 18 Feb 2004 12:45:32 +0000 (04:45 -0800)]
[PATCH] msg.h needs list.h

msg.h uses list_head.  (I'm not sure what config actually required this, but
it is legit).

20 years ago[PATCH] Remove BDEV_RAW and friends
Andrew Morton [Wed, 18 Feb 2004 12:45:23 +0000 (04:45 -0800)]
[PATCH] Remove BDEV_RAW and friends

These no longer do anything.

This patch changes modules API.  It was acked by Arjan@RH and Hubert@Suse.

20 years ago[PATCH] early printk tweaks
Andrew Morton [Wed, 18 Feb 2004 12:45:13 +0000 (04:45 -0800)]
[PATCH] early printk tweaks

- Use __pa() around the VGA base address: more friendly for the 4g/4g split.

- Use cpu_relax() rather than open-coding rep_nop().

- Default to 9600 baud

- Move documentation to Documentation/kernel-parameters.txt

- Make CONFIG_EARLY_PRINTK disableable if CONFIG_EMBEDDED

20 years ago[PATCH] ia32 early printk
Andrew Morton [Wed, 18 Feb 2004 12:45:04 +0000 (04:45 -0800)]
[PATCH] ia32 early printk

From: Andi Kleen <ak@muc.de>

Implement VGA and serial early printk on x86.  We just include the x86_64
version.

20 years ago[PATCH] Fix for PPP activ/passiv filter
Andrew Morton [Wed, 18 Feb 2004 12:44:55 +0000 (04:44 -0800)]
[PATCH] Fix for PPP activ/passiv filter

From: Karsten Keil <kkeil@suse.de>

I found a bug in the PPPIOCSPASS PPPIOCSACTIVE IOCTL implementation in
kernel 2.5/2.6.

The current pppd code use a empty filter (uprog.len=0) to detach the filter
in the kernel, but this code was removed in 2.5.71 while fixing a compiler
warning.

Here the new patch, also with better limit checking.

The second patch check for flen == 0 in the filter check too, since later
in this code a filter[flen - 1] access is done, which is not so funny with
flen 0.  Maybe it's not really needed anymore, since with the first patch
it would not longer called with flen=0.

paulus says:

    It looks correct.  Previously we had (and in 2.4 we still have)

        if (uprog.len > 0 && uprog.len < 65536) {
...

    which gave warnings since uprog.len is unsigned short.  So someone
    decided that both parts of the condition were redundant.

20 years ago[PATCH] i4l: hisax deadlock fix
Andrew Morton [Wed, 18 Feb 2004 12:44:45 +0000 (04:44 -0800)]
[PATCH] i4l: hisax deadlock fix

From: Karsten Keil <kkeil@suse.de>

This patch fix a deadlock in HiSax (reported from David Woodhouse
<dwmw2@infradead.org>).  upper layer was called back while holding the card
lock fix is to move the wakeup call into BH handler to avoid direct
callbacks.

20 years ago[PATCH] ISDN udpate
Andrew Morton [Wed, 18 Feb 2004 12:44:35 +0000 (04:44 -0800)]
[PATCH] ISDN udpate

From: Karsten Keil <kkeil@suse.de>

- new port of 2.4 I4L core to 2.6

- new port of 2.4 I4L HiSax to 2.6

- fixes for I4L CAPI subsystem to make it stable in 2.6

- fix parameter handling of AVM ISA cards (calle)

- cleanup ISDN config variables

- SMP in act2000 and pcbit driver

- remove check_region in act2000

- mark hysdn, isdnloop and divert as BROKEN_ON_SMP

20 years agoMerge bk://linux-dj.bkbits.net/cpufreq
Linus Torvalds [Wed, 18 Feb 2004 11:13:32 +0000 (03:13 -0800)]
Merge bk://linux-dj.bkbits.net/cpufreq
into ppc970.osdl.org:/home/torvalds/v2.5/linux

20 years ago[CPUFREQ] Add extra __init markers to longrun driver.
Dave Jones [Thu, 19 Feb 2004 02:48:43 +0000 (02:48 +0000)]
[CPUFREQ] Add extra __init markers to longrun driver.
Caught by Randy Dunlap.
longrun_cpu_init() only gets called during startup, and calls
other __init routines.