All of lore.kernel.org
 help / color / mirror / Atom feed
* Fw: alsa-devel
From: ruczffqpma @ 2006-04-02 16:47 UTC (permalink / raw)
  To: alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 159 bytes --]


----- Original Message ----- 
From: Coulter Maritza 
To: egfnabmej@larbhigh.biblio.net 
Sent: Saturday, April 01, 2006 11:22 PM
Subject: alsa-devel



[-- Attachment #1.2: Type: text/html, Size: 1039 bytes --]

[-- Attachment #2: alsa-devel.gif --]
[-- Type: image/gif, Size: 8247 bytes --]

^ permalink raw reply

* Hang in uart_block_til_ready()
From: Michael Hanselmann @ 2006-04-02 13:51 UTC (permalink / raw)
  To: rmk+serial; +Cc: linux-serial

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

Hello Russell

I've discovered a problem where I'm not sure wether it's an error in the
kernel or in the hardware.

The hardware I'm using for the serial console is a HP Lights-Out 100
Management. It provides a (virtual) serial port which then can be used
for remote administration over the network and is available as ttyS2 in
Linux. I'm using it for a serial console.

When doing open("/dev/ttyS2", O_RDWR) from userland, like it's done by
screen(1) and by my test program, the kernel "hangs" in the schedule()
call in the function uart_block_til_ready of serial_core.c.

The patch below fixes it, but I'm not sure wether it is the correct way,
nor if it might create other problems.

The problem was reproducable with 2.6.15.6, 2.6.16 and 2.6.16-git20 (all
vanilla). I've not been able to reproduce it on another box where the
serial console is on ttyS0 and done by a common 16550A-compatible chip.

Do you or somebody else have an idea what's going on here and how to fix
it correctly?

Thanks,
Michael

---
--- linux-2.6.16-hardened/drivers/serial/serial_core.c.orig	2006-04-02 15:07:43.000000000 +0200
+++ linux-2.6.16-hardened/drivers/serial/serial_core.c	2006-04-02 15:24:52.000000000 +0200
@@ -1456,6 +1456,10 @@ uart_block_til_ready(struct file *filp, 
 			break;
 		}
 
+		/* hansmi: fixes a hang on open("/dev/ttyS2", O_RDWR) for me */
+		if (uart_console(port) && (port->cons->flags & CON_ENABLED))
+			break;
+
 		/*
 		 * Set DTR to allow modem to know we're waiting.  Do
 		 * not set RTS here - we want to make sure we catch

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

^ permalink raw reply

* Re: MCS and unconfined_t
From: KaiGai Kohei @ 2006-04-02 13:55 UTC (permalink / raw)
  To: sds, Russell Coker
  Cc: Christopher J. PeBenito, James Morris, Daniel J Walsh, selinux
In-Reply-To: <1143721917.24555.77.camel@moss-spartans.epoch.ncsc.mil>

>>It says an process can transit to more restricted categories only
>>by (h1 dom h2). I felt it's over restriction.
>>For example, a user login with 's0' cannot transit to any wider range
>>categories, even if he would be allowed to belong 's0-s0:c0.c2' at most.
>>
>>I modified my desktop environment (FC5). At a moment, the following
>>configuration seems to me working fine.
>>Do you think it's a reasonable solution ?
> 
> 
> The reason that we need the stronger restriction above is that there is
> not a one-to-one mapping from Linux users to SELinux users, and we are
> now relying on the seusers mapping and initial setup by login to bound
> what is reachable by a given Linux user.

Hmm... a one-to-one mapping between Linux users and SELinux users might
indeed cause managements nightmare.
Please forget my previous proposition.

Thanks Russell for providing modified RPM package. Now I'm using it with
a bit modification removing range_transition of su_exec_t.

By th way, do you think an additional mlsconstrain is necessary for
security : {load_policy setenforce setbool} ?
It also makes MCS invalid, I think.

Thanks,
-- 
KaiGai Kohei <kaigai@kaigai.gr.jp>

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply

* Re: [PATCH 1/1] POWERPC: Fix ppc32 compile with gcc+SSP in 2.6.16
From: John Mylchreest @ 2006-04-02 13:56 UTC (permalink / raw)
  To: Arjan van de Ven; +Cc: Olaf Hering, linux-kernel, stable, paulus
In-Reply-To: <1143983738.2994.18.camel@laptopd505.fenrus.org>

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

On Sun, Apr 02, 2006 at 03:15:38PM +0200, Arjan van de Ven <arjan@infradead.org> wrote:
> 
> > Going from that, I can push a patch for gcc upstream to remove the
> > __KERNEL__ dep, but gcc4.1 ships with ssp by standard, and the semantics
> > between the IBM patch for SSP applied to gcc-3 and ggc-4 have changed.
> > 
> > -fno-stack-protector would work for gcc4, but for gcc3 it could still be
> 
> since this is a thing you have to turn on to get it, not off to not get
> it, I think you're missing something big here ;)
> 
> > patially enabled, and requires -fno-stack-protector-all. Mind If I ask
> > whats incorrect about defining __KERNEL__ for the bootcflags?
> 
> it's silly and it's a non-standard gcc ... better get the gcc fixed to
> at least have the upstream protocol of having to turn it on not off..

It gets turned on elsewhere (gcc spec), but principle for me is that if its
enabled it still leaks and breaks this code. At the moment (following
from existing patches you put to this list) this mix will break until we
get stack-protector ported.

-- 
Role:            Gentoo Linux Kernel Lead
Gentoo Linux:    http://www.gentoo.org
Public Key:      gpg --recv-keys 9C745515
Key fingerprint: A0AF F3C8 D699 A05A EC5C  24F7 95AA 241D 9C74 5515


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

^ permalink raw reply

* Re: [PATCH 1/1] POWERPC: Fix ppc32 compile with gcc+SSP in 2.6.16
From: Olaf Hering @ 2006-04-02 14:01 UTC (permalink / raw)
  To: John Mylchreest; +Cc: Arjan van de Ven, linux-kernel, stable, paulus
In-Reply-To: <20060402135605.GB3443@getafix.willow.local>

 On Sun, Apr 02, John Mylchreest wrote:

> It gets turned on elsewhere (gcc spec), but principle for me is that if its
> enabled it still leaks and breaks this code. At the moment (following
> from existing patches you put to this list) this mix will break until we
> get stack-protector ported.

There are so many ebuild files which turn off random gcc options without
fixing the real bug in the compiler. Just add one more to the
kernel.ebuild or whatever its called.

^ permalink raw reply

* Re: Hotplug and udev - a question
From: John Que @ 2006-04-02 14:04 UTC (permalink / raw)
  To: linux-hotplug
In-Reply-To: <ada605fb0603310036s68fdb8d0x3fc6d73d135ffd7e@mail.gmail.com>

Hello,

Thanks for the link!
I read it carefully; all of it , except of the last 2
paragraphs, deal mainly with hotplug and improvements that
were made in hotplug-ng.

Now, to the last 2 paragrapghs:

>With the release of the 050 release of udev, if /sbin/udevsend is the kernel
>hotplug program (it can be changed by modifying the value of the
>/proc/sys/kernel/hotplug file), then it operates like the original
>/etc/hotplug.d multiplexer program as well as handling all of the udev device
>node generation. This ensures that the /etc/hotplug.d/ invocations
happen in the
>proper order, and in sequence for the same device. Gentoo Linux
already supports
>this mode of operation.

>However, not every user wants to use udev. Because of that, the hotplug-ng
>project is continuing, even if it seems like they are competing against each
>other in implementing the same functionality. As the same developers are doing
>the work in both programs, all users of Linux benefit with a faster module
>loading process, and further advancements in hotplug functionality.


What I don't get from here is what is exactly the advantage
of using udev solely over using udev with hotplug and what
is the exact reason that hotplug is deprecated.
Is it because there is some functionality which is duplicated
in udev and in hotplug ? or some other reason ?

Regards,
John


On 3/31/06, Chris Smith <smitty_one_each@bigfoot.com> wrote:
> >>>>> "John" = John Que <qwejohn@gmail.com> writes:
>
>     John> Hello, I saw that in the last versions of udev, hotplug is
>     John> deprecated.  Configuring of adding devices is done through
>     John> udev rules.  Can anybody say in a few sentences why was this
>     John> change done?  What are the advantages of conifguring with
>     John> udev rules over using hotplug ?
>
>     John> Best Regards, John
>
>
> John,
>  Greg KH wrote an article that summarizes things nicely about a year ago:
>  http://lwn.net/Articles/123932/
>  Beating a drum from another post of mine that hasn't seen much
>  response, I hope that the documentation for building a bootable
>  kernel with all this udev goodness catches up.  It's rather
>  mysterious at the moment.
> Best,
> Chris
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live webcast
> and join the prime developer group breaking into this new coding territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x110944&bid$1720&dat\x121642
> _______________________________________________
> Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
> Linux-hotplug-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
>


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply

* Re: [fuse-devel] Re: [parisc-linux] [PATCH] Fixs to work on ARM and PARIC platforms.
From: James Bottomley @ 2006-04-02 14:09 UTC (permalink / raw)
  To: Miklos Szeredi; +Cc: fuse-devel, parisc-linux
In-Reply-To: <E1FPyD6-0002ag-00@dorka.pomaz.szeredi.hu>

On Sun, 2006-04-02 at 10:45 +0200, Miklos Szeredi wrote:
> I'm confused.  What was the exact reason for having a separate
> function for anon pages?  Wouldn't unifying the functionality of
> flush_dcache_page() and flush_anon_page() make more sense?

No because flush_dcache_page() is designed for filesystems, which should
never see anonymous pages.

> Otherwise sparc and ppc would have to check PageAnon() from both
> flush_dcache_page() and flush_anon_page() and call a common function,
> which seems to just complicate things without any gain.

I don't think what you propose is desirable or possible:
flush_dcache_pages() is designed not to have to flush them (it can't
actually because it can't find them properly) but it may flush them by
accident if they get swept up into the implementation.  Sparc and PPC
are CAM flushing implementations, so I suspect the cache just needs to
be asked to flush a single physical address and it will find all the
virtual aliases and flush them (including the anonymous pages).

James


_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

^ permalink raw reply

* Re: 2.6.16-ck3
From: Nick Piggin @ 2006-04-02  9:37 UTC (permalink / raw)
  To: Con Kolivas; +Cc: ck list, linux list, Andrew Morton
In-Reply-To: <200604021851.39763.kernel@kolivas.org>

Con Kolivas wrote:
> On Sunday 02 April 2006 14:46, Nick Piggin wrote:
> 
> Curious. I was under the impression lowmem reserve only did anything if you 
> manually set it, and the users reporting on swap prefetch behaviour are not 
> the sort of users likely to do so. I'm happy to fix whatever the lowmem 

It is enabled by default for over a year.

> reserve bug is but I doubt this bug is making swap prefetch behave better for 
> ordinary users. Well, whatever the case is I'll have another look at lowmem 
> reserve of course. 
> 

It would potentially make swap prefetch very happy to swap pages into the
dma zone and the normal zone on highmem systems when the system is
otherwise full of pagecache. So it might easily change behaviour on those
systems.

-- 
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com 

^ permalink raw reply

* xen2 system crashing: Badness in br_fdb_cleanup at net/bridge/br_fdb.c:140
From: Hans-Christian Armingeon @ 2006-04-02 14:11 UTC (permalink / raw)
  To: xen-devel; +Cc: xen-users

Hi There,

I am having serious troubles with one of my servers.

I installed ubuntu 5.10 on a second partition.

And after that, I booted the old system.

Now I am having these errors. They appear 3 minutes after reboot.

This system has to be working on monday, so I'm in great pain.

Many thanks in advance,

Johnny

Badness in br_fdb_cleanup at net/bridge/br_fdb.c:140
 [<c8a5d49e>] br_fdb_cleanup+0xfe/0x130 [bridge]
 [<c0123b61>] run_timer_softirq+0xf1/0x220
 [<c0138470>] handle_IRQ_event+0x40/0x90
 [<c8a5d3a0>] br_fdb_cleanup+0x0/0x130 [bridge]
 [<c011f595>] __do_softirq+0x95/0xb0
 [<c011f5f5>] do_softirq+0x45/0x50
 [<c011f6c5>] irq_exit+0x35/0x40
 [<c010ec3e>] do_IRQ+0x1e/0x30
 [<c0105e7d>] evtchn_do_upcall+0x6d/0x90
 [<c0109423>] hypervisor_callback+0x37/0x40
 [<c0106f59>] xen_idle+0x29/0x50
 [<c0106fba>] cpu_idle+0x3a/0x50
 [<c0542740>] start_kernel+0x180/0x1d0
 [<c0542300>] unknown_bootoption+0x0/0x1b0
Badness in br_fdb_cleanup at net/bridge/br_fdb.c:140
 [<c8a5d49e>] br_fdb_cleanup+0xfe/0x130 [bridge]
 [<c0123b61>] run_timer_softirq+0xf1/0x220
 [<c0138470>] handle_IRQ_event+0x40/0x90
 [<c8a5d3a0>] br_fdb_cleanup+0x0/0x130 [bridge]
 [<c011f595>] __do_softirq+0x95/0xb0
 [<c011f5f5>] do_softirq+0x45/0x50
 [<c011f6c5>] irq_exit+0x35/0x40
 [<c010ec3e>] do_IRQ+0x1e/0x30
 [<c0105e7d>] evtchn_do_upcall+0x6d/0x90
 [<c0109423>] hypervisor_callback+0x37/0x40
 [<c0106f59>] xen_idle+0x29/0x50
 [<c0106fba>] cpu_idle+0x3a/0x50
 [<c0542740>] start_kernel+0x180/0x1d0
 [<c0542300>] unknown_bootoption+0x0/0x1b0
Unable to handle kernel paging request at virtual address 00200200
 printing eip:
c8a5d415
*pde = ma 00000000 pa 55555000
 [<c0123b61>] run_timer_softirq+0xf1/0x220
 [<c0138470>] handle_IRQ_event+0x40/0x90
 [<c8a5d3a0>] br_fdb_cleanup+0x0/0x130 [bridge]
 [<c011f595>] __do_softirq+0x95/0xb0
 [<c011f5f5>] do_softirq+0x45/0x50
 [<c011f6c5>] irq_exit+0x35/0x40
 [<c010ec3e>] do_IRQ+0x1e/0x30
 [<c0105e7d>] evtchn_do_upcall+0x6d/0x90
 [<c0109423>] hypervisor_callback+0x37/0x40
 [<c0106f59>] xen_idle+0x29/0x50
 [<c0106fba>] cpu_idle+0x3a/0x50
 [<c0542740>] start_kernel+0x180/0x1d0
 [<c0542300>] unknown_bootoption+0x0/0x1b0
Oops: 0002 [#1]
PREEMPT
Modules linked in: bridge atm fcdslusb2 capi capifs ipv6 tsdev evdev fcpci kernelcapi i2c_amd756 i2c_amd8111 pci_hotplug ohci_hcd usbcore aic79xx sata_sil libata w83781d i2c_sensor i2c_isa i2c_core e100 mii tg3
CPU:    0
EIP:    0061:[<c8a5d415>]    Tainted: P      VLI
EFLAGS: 00211246   (2.6.11.12-xen0)
EIP is at br_fdb_cleanup+0x75/0x130 [bridge]
eax: 00000000   ebx: c3a5144c   ecx: c04b04d8   edx: 00200200
esi: c3a51440   edi: c6227b04   ebp: c3ac7e88   esp: c0541f00
ds: 007b   es: 007b   ss: 0069
Process swapper (pid: 0, threadinfo=c0540000 task=c04aaea0)
Stack: c8a63f11 c8a63e09 c8a63efd 0000008c 00007530 c764f000 c0540000 00000101
       c3ac7a20 c0540000 c0123b61 c3ac7a20 c0138470 00000082 00000000 c8a5d3a0
       c8b443b8 c6e9d0ac c0540000 00000001 c058ab28 0000000a fbffc000 c011f595
Call Trace:
 [<c0123b61>] run_timer_softirq+0xf1/0x220
 [<c0138470>] handle_IRQ_event+0x40/0x90
 [<c8a5d3a0>] br_fdb_cleanup+0x0/0x130 [bridge]
 [<c011f595>] __do_softirq+0x95/0xb0
 [<c011f5f5>] do_softirq+0x45/0x50
 [<c011f6c5>] irq_exit+0x35/0x40
 [<c010ec3e>] do_IRQ+0x1e/0x30
 [<c0105e7d>] evtchn_do_upcall+0x6d/0x90
 [<c0109423>] hypervisor_callback+0x37/0x40
 [<c0106f59>] xen_idle+0x29/0x50
 [<c0106fba>] cpu_idle+0x3a/0x50
 [<c0542740>] start_kernel+0x180/0x1d0
 [<c0542300>] unknown_bootoption+0x0/0x1b0
Code: 65 90 8d 74 26 00 8d 73 f4 8b 54 24 10 a1 60 e0 4a c0 03 56 18 39 d0 0f 88 9c 00 00 00 80 7e 23 00 75 68 8b 43 f4 8b 56 04 85 c0 <89> 02 74 03 89 50 04 80 7e 23 00 c7 46 04 00 02 20 00 75 17 8b
 <0>Kernel panic - not syncing: Fatal exception in interrupt
 (XEN) Domain 0 shutdown: rebooting machine.
(XEN) Reboot disabled on cmdline: require manual reset


-- 
jabber:johnny@wh-netz.de
icq:236971856

^ permalink raw reply

* please pull from the trivial tree
From: Adrian Bunk @ 2006-04-02 14:15 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel

Linus, please pull from:

  git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial.git


This tree contains the following:


Adrian Bunk:
      help text: SOFTWARE_SUSPEND doesn't need ACPI
      fix a typo in the AIC7XXX_DEBUG_MASK help text
      fix the email address of Wendy Xiong
      typos: s/ducument/document/

Anders Larsen:
      MTD: remove obsolete Kconfig options

Cal Peake:
      BFP->BPF in Documentation/networking/tuntap.txt

Eric Sesterhenn:
      BUG_ON() Conversion in md/dm-target.c
      BUG_ON() Conversion in md/raid1.c
      BUG_ON() Conversion in fs/direct-io.c
      BUG_ON() Conversion in fs/exec.c
      BUG_ON() Conversion in fs/hfsplus/
      BUG_ON() Conversion in fs/jffs2/
      BUG_ON() Conversion in fs/smbfs/
      BUG_ON() Conversion in fs/sysfs/
      BUG_ON() Conversion in ipc/util.c
      BUG_ON() Conversion in kernel/printk.c
      BUG_ON() Conversion in mm/mmap.c
      BUG_ON() Conversion in mm/swap_state.c
      BUG_ON() Conversion in mm/vmalloc.c
      BUG_ON() Conversion in drivers/s390/block/dasd_erp.c
      BUG_ON() Conversion in drivers/s390/char/tape_block.c
      BUG_ON() Conversion in md/raid5.c
      BUG_ON() Conversion in md/raid6main.c
      BUG_ON() Conversion in md/raid10.c
      BUG_ON() Conversion in fs/dquot.c
      BUG_ON() Conversion in fs/fcntl.c
      BUG_ON() Conversion in fs/inode.c
      BUG_ON() Conversion in fs/sysv/
      BUG_ON() Conversion in fs/udf/
      BUG_ON() Conversion in fs/freevxfs/
      BUG_ON() Conversion in ipc/shm.c
      BUG_ON() Conversion in kernel/ptrace.c
      BUG_ON() Conversion in kernel/signal.c
      BUG_ON() Conversion in kernel/signal.c
      BUG_ON() Conversion in mm/highmem.c
      BUG_ON() Conversion in mm/slab.c
      BUG_ON() Conversion in drivers/s390/net/lcs.c
      BUG_ON() Conversion in drivers/net/

Horms:
      Documentation: Reorder documentation of nomca and nomce
      Documentation: Make fujitsu/frv/kernel-ABI.txt 80 columns wide
      kexec: grammar fix for crash_save_this_cpu()

Kalin KOZHUHAROV:
      Fix comments: s/granuality/granularity/

Martin Waitz:
      Documentation: fix minor kernel-doc warnings

Michael Hayes:
      Fix minor documentation typo

Stefan Richter:
      Doc/kernel-parameters.txt: delete false version information and history
      Doc/kernel-parameters.txt: mention modinfo and sysfs
      Doc/kernel-parameters.txt: slightly reword sentence about restrictions

Uwe Zeisberger:
      fix typo "Suposse" -> "Suppose"


 Documentation/DocBook/Makefile           |    2 
 Documentation/DocBook/kernel-api.tmpl    |    1 
 Documentation/acpi-hotkey.txt            |    2 
 Documentation/fujitsu/frv/kernel-ABI.txt |  196 +++++++++++++----------
 Documentation/kernel-parameters.txt      |   34 +--
 Documentation/networking/packet_mmap.txt |    2 
 Documentation/networking/tuntap.txt      |    2 
 arch/i386/kernel/crash.c                 |    2 
 block/ll_rw_blk.c                        |    2 
 drivers/md/dm-target.c                   |    3 
 drivers/md/raid1.c                       |    6 
 drivers/md/raid10.c                      |    6 
 drivers/md/raid5.c                       |   34 +--
 drivers/md/raid6main.c                   |   29 +--
 drivers/mtd/chips/Kconfig                |   21 --
 drivers/net/8139cp.c                     |   12 -
 drivers/net/arcnet/arcnet.c              |    3 
 drivers/net/b44.c                        |    3 
 drivers/net/chelsio/sge.c                |    3 
 drivers/net/e1000/e1000_main.c           |    3 
 drivers/net/eql.c                        |    3 
 drivers/net/irda/sa1100_ir.c             |    3 
 drivers/net/ne2k-pci.c                   |    4 
 drivers/net/ns83820.c                    |    3 
 drivers/net/starfire.c                   |    3 
 drivers/net/tg3.c                        |   15 -
 drivers/net/tokenring/abyss.c            |    3 
 drivers/net/tokenring/madgemc.c          |    3 
 drivers/net/wireless/ipw2200.c           |    9 -
 drivers/net/yellowfin.c                  |    3 
 drivers/s390/block/dasd_erp.c            |    8 
 drivers/s390/char/sclp_rw.c              |    2 
 drivers/s390/char/tape_block.c           |   13 -
 drivers/s390/net/lcs.c                   |   13 -
 drivers/scsi/aic7xxx/Kconfig.aic7xxx     |    2 
 drivers/serial/jsm/jsm.h                 |    2 
 drivers/serial/jsm/jsm_driver.c          |    2 
 drivers/serial/jsm/jsm_neo.c             |    2 
 fs/direct-io.c                           |    3 
 fs/dquot.c                               |    6 
 fs/exec.c                                |    2 
 fs/fcntl.c                               |    3 
 fs/freevxfs/vxfs_olt.c                   |    9 -
 fs/hfsplus/bnode.c                       |    6 
 fs/hfsplus/btree.c                       |    3 
 fs/inode.c                               |   15 -
 fs/jffs2/background.c                    |    3 
 fs/smbfs/file.c                          |    6 
 fs/sysfs/dir.c                           |    2 
 fs/sysfs/inode.c                         |    3 
 fs/sysv/dir.c                            |    6 
 fs/udf/inode.c                           |    6 
 include/linux/fs.h                       |    2 
 include/linux/hrtimer.h                  |    2 
 ipc/shm.c                                |   15 -
 ipc/util.c                               |    6 
 kernel/power/Kconfig                     |    2 
 kernel/printk.c                          |    6 
 kernel/ptrace.c                          |    3 
 kernel/signal.c                          |    6 
 kernel/time.c                            |    8 
 kernel/timer.c                           |    3 
 mm/highmem.c                             |   15 -
 mm/mmap.c                                |    9 -
 mm/page-writeback.c                      |    2 
 mm/slab.c                                |   18 --
 mm/swap_state.c                          |    3 
 mm/vmalloc.c                             |    3 
 68 files changed, 264 insertions(+), 371 deletions(-)


diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index 7d87dd7..5a2882d 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -2,7 +2,7 @@
 # This makefile is used to generate the kernel documentation,
 # primarily based on in-line comments in various source files.
 # See Documentation/kernel-doc-nano-HOWTO.txt for instruction in how
-# to ducument the SRC - and how to read it.
+# to document the SRC - and how to read it.
 # To add a new book the only step required is to add the book to the
 # list of DOCBOOKS.
 
diff --git a/Documentation/DocBook/kernel-api.tmpl b/Documentation/DocBook/kernel-api.tmpl
index 8c9c670..ca02e04 100644
--- a/Documentation/DocBook/kernel-api.tmpl
+++ b/Documentation/DocBook/kernel-api.tmpl
@@ -322,7 +322,6 @@ X!Earch/i386/kernel/mca.c
   <chapter id="sysfs">
      <title>The Filesystem for Exporting Kernel Objects</title>
 !Efs/sysfs/file.c
-!Efs/sysfs/dir.c
 !Efs/sysfs/symlink.c
 !Efs/sysfs/bin.c
   </chapter>
diff --git a/Documentation/acpi-hotkey.txt b/Documentation/acpi-hotkey.txt
index 744f1ae..38040fa 100644
--- a/Documentation/acpi-hotkey.txt
+++ b/Documentation/acpi-hotkey.txt
@@ -30,7 +30,7 @@ specific hotkey(event))
 echo "event_num:event_type:event_argument" > 
 	/proc/acpi/hotkey/action.
 The result of the execution of this aml method is 
-attached to /proc/acpi/hotkey/poll_method, which is dnyamically
+attached to /proc/acpi/hotkey/poll_method, which is dynamically
 created.  Please use command "cat /proc/acpi/hotkey/polling_method" 
 to retrieve it.
 
diff --git a/Documentation/fujitsu/frv/kernel-ABI.txt b/Documentation/fujitsu/frv/kernel-ABI.txt
index 0ed9b0a..8b0a5fc 100644
--- a/Documentation/fujitsu/frv/kernel-ABI.txt
+++ b/Documentation/fujitsu/frv/kernel-ABI.txt
@@ -1,17 +1,19 @@
-				 =================================
-				 INTERNAL KERNEL ABI FOR FR-V ARCH
-				 =================================
-
-The internal FRV kernel ABI is not quite the same as the userspace ABI. A number of the registers
-are used for special purposed, and the ABI is not consistent between modules vs core, and MMU vs
-no-MMU.
-
-This partly stems from the fact that FRV CPUs do not have a separate supervisor stack pointer, and
-most of them do not have any scratch registers, thus requiring at least one general purpose
-register to be clobbered in such an event. Also, within the kernel core, it is possible to simply
-jump or call directly between functions using a relative offset. This cannot be extended to modules
-for the displacement is likely to be too far. Thus in modules the address of a function to call
-must be calculated in a register and then used, requiring two extra instructions.
+			=================================
+			INTERNAL KERNEL ABI FOR FR-V ARCH
+			=================================
+
+The internal FRV kernel ABI is not quite the same as the userspace ABI. A
+number of the registers are used for special purposed, and the ABI is not
+consistent between modules vs core, and MMU vs no-MMU.
+
+This partly stems from the fact that FRV CPUs do not have a separate
+supervisor stack pointer, and most of them do not have any scratch
+registers, thus requiring at least one general purpose register to be
+clobbered in such an event. Also, within the kernel core, it is possible to
+simply jump or call directly between functions using a relative offset.
+This cannot be extended to modules for the displacement is likely to be too
+far. Thus in modules the address of a function to call must be calculated
+in a register and then used, requiring two extra instructions.
 
 This document has the following sections:
 
@@ -39,7 +41,8 @@ When a system call is made, the followin
 CPU OPERATING MODES
 ===================
 
-The FR-V CPU has three basic operating modes. In order of increasing capability:
+The FR-V CPU has three basic operating modes. In order of increasing
+capability:
 
   (1) User mode.
 
@@ -47,42 +50,46 @@ The FR-V CPU has three basic operating m
 
   (2) Kernel mode.
 
-      Normal kernel mode. There are many additional control registers available that may be
-      accessed in this mode, in addition to all the stuff available to user mode. This has two
-      submodes:
+      Normal kernel mode. There are many additional control registers
+      available that may be accessed in this mode, in addition to all the
+      stuff available to user mode. This has two submodes:
 
       (a) Exceptions enabled (PSR.T == 1).
 
-      	  Exceptions will invoke the appropriate normal kernel mode handler. On entry to the
-      	  handler, the PSR.T bit will be cleared.
+	  Exceptions will invoke the appropriate normal kernel mode
+	  handler. On entry to the handler, the PSR.T bit will be cleared.
 
       (b) Exceptions disabled (PSR.T == 0).
 
-      	  No exceptions or interrupts may happen. Any mandatory exceptions will cause the CPU to
-      	  halt unless the CPU is told to jump into debug mode instead.
+	  No exceptions or interrupts may happen. Any mandatory exceptions
+	  will cause the CPU to halt unless the CPU is told to jump into
+	  debug mode instead.
 
   (3) Debug mode.
 
-      No exceptions may happen in this mode. Memory protection and management exceptions will be
-      flagged for later consideration, but the exception handler won't be invoked. Debugging traps
-      such as hardware breakpoints and watchpoints will be ignored. This mode is entered only by
-      debugging events obtained from the other two modes.
+      No exceptions may happen in this mode. Memory protection and
+      management exceptions will be flagged for later consideration, but
+      the exception handler won't be invoked. Debugging traps such as
+      hardware breakpoints and watchpoints will be ignored. This mode is
+      entered only by debugging events obtained from the other two modes.
 
-      All kernel mode registers may be accessed, plus a few extra debugging specific registers.
+      All kernel mode registers may be accessed, plus a few extra debugging
+      specific registers.
 
 
 =================================
 INTERNAL KERNEL-MODE REGISTER ABI
 =================================
 
-There are a number of permanent register assignments that are set up by entry.S in the exception
-prologue. Note that there is a complete set of exception prologues for each of user->kernel
-transition and kernel->kernel transition. There are also user->debug and kernel->debug mode
-transition prologues.
+There are a number of permanent register assignments that are set up by
+entry.S in the exception prologue. Note that there is a complete set of
+exception prologues for each of user->kernel transition and kernel->kernel
+transition. There are also user->debug and kernel->debug mode transition
+prologues.
 
 
 	REGISTER	FLAVOUR	USE
-	===============	=======	====================================================
+	===============	=======	==============================================
 	GR1			Supervisor stack pointer
 	GR15			Current thread info pointer
 	GR16			GP-Rel base register for small data
@@ -92,10 +99,12 @@ transition prologues.
 	GR31		NOMMU	Destroyed by debug mode entry
 	GR31		MMU	Destroyed by TLB miss kernel mode entry
 	CCR.ICC2		Virtual interrupt disablement tracking
-	CCCR.CC3		Cleared by exception prologue (atomic op emulation)
+	CCCR.CC3		Cleared by exception prologue 
+				(atomic op emulation)
 	SCR0		MMU	See mmu-layout.txt.
 	SCR1		MMU	See mmu-layout.txt.
-	SCR2		MMU	Save for EAR0 (destroyed by icache insns in debug mode)
+	SCR2		MMU	Save for EAR0 (destroyed by icache insns 
+					       in debug mode)
 	SCR3		MMU	Save for GR31 during debug exceptions
 	DAMR/IAMR	NOMMU	Fixed memory protection layout.
 	DAMR/IAMR	MMU	See mmu-layout.txt.
@@ -104,18 +113,21 @@ transition prologues.
 Certain registers are also used or modified across function calls:
 
 	REGISTER	CALL				RETURN
-	===============	===============================	===============================
+	===============	===============================	======================
 	GR0		Fixed Zero			-
 	GR2		Function call frame pointer
 	GR3		Special				Preserved
 	GR3-GR7		-				Clobbered
-	GR8		Function call arg #1		Return value (or clobbered)
-	GR9		Function call arg #2		Return value MSW (or clobbered)
+	GR8		Function call arg #1		Return value 
+							(or clobbered)
+	GR9		Function call arg #2		Return value MSW 
+							(or clobbered)
 	GR10-GR13	Function call arg #3-#6		Clobbered
 	GR14		-				Clobbered
 	GR15-GR16	Special				Preserved
 	GR17-GR27	-				Preserved
-	GR28-GR31	Special				Only accessed explicitly
+	GR28-GR31	Special				Only accessed 
+							explicitly
 	LR		Return address after CALL	Clobbered
 	CCR/CCCR	-				Mostly Clobbered
 
@@ -124,46 +136,53 @@ Certain registers are also used or modif
 INTERNAL DEBUG-MODE REGISTER ABI
 ================================
 
-This is the same as the kernel-mode register ABI for functions calls. The difference is that in
-debug-mode there's a different stack and a different exception frame. Almost all the global
-registers from kernel-mode (including the stack pointer) may be changed.
+This is the same as the kernel-mode register ABI for functions calls. The
+difference is that in debug-mode there's a different stack and a different
+exception frame. Almost all the global registers from kernel-mode
+(including the stack pointer) may be changed.
 
 	REGISTER	FLAVOUR	USE
-	===============	=======	====================================================
+	===============	=======	==============================================
 	GR1			Debug stack pointer
 	GR16			GP-Rel base register for small data
-	GR31			Current debug exception frame pointer (__debug_frame)
+	GR31			Current debug exception frame pointer 
+				(__debug_frame)
 	SCR3		MMU	Saved value of GR31
 
 
-Note that debug mode is able to interfere with the kernel's emulated atomic ops, so it must be
-exceedingly careful not to do any that would interact with the main kernel in this regard. Hence
-the debug mode code (gdbstub) is almost completely self-contained. The only external code used is
-the sprintf family of functions.
-
-Futhermore, break.S is so complicated because single-step mode does not switch off on entry to an
-exception. That means unless manually disabled, single-stepping will blithely go on stepping into
-things like interrupts. See gdbstub.txt for more information.
+Note that debug mode is able to interfere with the kernel's emulated atomic
+ops, so it must be exceedingly careful not to do any that would interact
+with the main kernel in this regard. Hence the debug mode code (gdbstub) is
+almost completely self-contained. The only external code used is the
+sprintf family of functions.
+
+Futhermore, break.S is so complicated because single-step mode does not
+switch off on entry to an exception. That means unless manually disabled,
+single-stepping will blithely go on stepping into things like interrupts.
+See gdbstub.txt for more information.
 
 
 ==========================
 VIRTUAL INTERRUPT HANDLING
 ==========================
 
-Because accesses to the PSR is so slow, and to disable interrupts we have to access it twice (once
-to read and once to write), we don't actually disable interrupts at all if we don't have to. What
-we do instead is use the ICC2 condition code flags to note virtual disablement, such that if we
-then do take an interrupt, we note the flag, really disable interrupts, set another flag and resume
-execution at the point the interrupt happened. Setting condition flags as a side effect of an
-arithmetic or logical instruction is really fast. This use of the ICC2 only occurs within the
+Because accesses to the PSR is so slow, and to disable interrupts we have
+to access it twice (once to read and once to write), we don't actually
+disable interrupts at all if we don't have to. What we do instead is use
+the ICC2 condition code flags to note virtual disablement, such that if we
+then do take an interrupt, we note the flag, really disable interrupts, set
+another flag and resume execution at the point the interrupt happened.
+Setting condition flags as a side effect of an arithmetic or logical
+instruction is really fast. This use of the ICC2 only occurs within the
 kernel - it does not affect userspace.
 
 The flags we use are:
 
  (*) CCR.ICC2.Z [Zero flag]
 
-     Set to virtually disable interrupts, clear when interrupts are virtually enabled. Can be
-     modified by logical instructions without affecting the Carry flag.
+     Set to virtually disable interrupts, clear when interrupts are
+     virtually enabled. Can be modified by logical instructions without
+     affecting the Carry flag.
 
  (*) CCR.ICC2.C [Carry flag]
 
@@ -176,8 +195,9 @@ What happens is this:
 
 	ICC2.Z is 0, ICC2.C is 1.
 
- (2) An interrupt occurs. The exception prologue examines ICC2.Z and determines that nothing needs
-     doing. This is done simply with an unlikely BEQ instruction.
+ (2) An interrupt occurs. The exception prologue examines ICC2.Z and
+     determines that nothing needs doing. This is done simply with an
+     unlikely BEQ instruction.
 
  (3) The interrupts are disabled (local_irq_disable)
 
@@ -187,48 +207,56 @@ What happens is this:
 
 	ICC2.Z would be set to 0.
 
-     A TIHI #2 instruction (trap #2 if condition HI - Z==0 && C==0) would be used to trap if
-     interrupts were now virtually enabled, but physically disabled - which they're not, so the
-     trap isn't taken. The kernel would then be back to state (1).
-
- (5) An interrupt occurs. The exception prologue examines ICC2.Z and determines that the interrupt
-     shouldn't actually have happened. It jumps aside, and there disabled interrupts by setting
-     PSR.PIL to 14 and then it clears ICC2.C.
+     A TIHI #2 instruction (trap #2 if condition HI - Z==0 && C==0) would
+     be used to trap if interrupts were now virtually enabled, but
+     physically disabled - which they're not, so the trap isn't taken. The
+     kernel would then be back to state (1).
+
+ (5) An interrupt occurs. The exception prologue examines ICC2.Z and
+     determines that the interrupt shouldn't actually have happened. It
+     jumps aside, and there disabled interrupts by setting PSR.PIL to 14
+     and then it clears ICC2.C.
 
  (6) If interrupts were then saved and disabled again (local_irq_save):
 
-	ICC2.Z would be shifted into the save variable and masked off (giving a 1).
+	ICC2.Z would be shifted into the save variable and masked off 
+	(giving a 1).
 
-	ICC2.Z would then be set to 1 (thus unchanged), and ICC2.C would be unaffected (ie: 0).
+	ICC2.Z would then be set to 1 (thus unchanged), and ICC2.C would be
+	unaffected (ie: 0).
 
  (7) If interrupts were then restored from state (6) (local_irq_restore):
 
-	ICC2.Z would be set to indicate the result of XOR'ing the saved value (ie: 1) with 1, which
-	gives a result of 0 - thus leaving ICC2.Z set.
+	ICC2.Z would be set to indicate the result of XOR'ing the saved
+	value (ie: 1) with 1, which gives a result of 0 - thus leaving
+	ICC2.Z set.
 
 	ICC2.C would remain unaffected (ie: 0).
 
-     A TIHI #2 instruction would be used to again assay the current state, but this would do
-     nothing as Z==1.
+     A TIHI #2 instruction would be used to again assay the current state,
+     but this would do nothing as Z==1.
 
  (8) If interrupts were then enabled (local_irq_enable):
 
-	ICC2.Z would be cleared. ICC2.C would be left unaffected. Both flags would now be 0.
+	ICC2.Z would be cleared. ICC2.C would be left unaffected. Both
+	flags would now be 0.
 
-     A TIHI #2 instruction again issued to assay the current state would then trap as both Z==0
-     [interrupts virtually enabled] and C==0 [interrupts really disabled] would then be true.
+     A TIHI #2 instruction again issued to assay the current state would
+     then trap as both Z==0 [interrupts virtually enabled] and C==0
+     [interrupts really disabled] would then be true.
 
- (9) The trap #2 handler would simply enable hardware interrupts (set PSR.PIL to 0), set ICC2.C to
-     1 and return.
+ (9) The trap #2 handler would simply enable hardware interrupts 
+     (set PSR.PIL to 0), set ICC2.C to 1 and return.
 
 (10) Immediately upon returning, the pending interrupt would be taken.
 
-(11) The interrupt handler would take the path of actually processing the interrupt (ICC2.Z is
-     clear, BEQ fails as per step (2)).
+(11) The interrupt handler would take the path of actually processing the
+     interrupt (ICC2.Z is clear, BEQ fails as per step (2)).
 
-(12) The interrupt handler would then set ICC2.C to 1 since hardware interrupts are definitely
-     enabled - or else the kernel wouldn't be here.
+(12) The interrupt handler would then set ICC2.C to 1 since hardware
+     interrupts are definitely enabled - or else the kernel wouldn't be here.
 
 (13) On return from the interrupt handler, things would be back to state (1).
 
-This trap (#2) is only available in kernel mode. In user mode it will result in SIGILL.
+This trap (#2) is only available in kernel mode. In user mode it will
+result in SIGILL.
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index f8cb55c..b3a6187 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1,4 +1,4 @@
-February 2003             Kernel Parameters                     v2.5.59
+                          Kernel Parameters
                           ~~~~~~~~~~~~~~~~~
 
 The following is a consolidated list of the kernel parameters as implemented
@@ -17,9 +17,17 @@ are specified on the kernel command line
 
 	usbcore.blinkenlights=1
 
-The text in square brackets at the beginning of the description states the
-restrictions on the kernel for the said kernel parameter to be valid. The
-restrictions referred to are that the relevant option is valid if:
+This document may not be entirely up to date and comprehensive. The command
+"modinfo -p ${modulename}" shows a current list of all parameters of a loadable
+module. Loadable modules, after being loaded into the running kernel, also
+reveal their parameters in /sys/module/${modulename}/parameters/. Some of these
+parameters may be changed at runtime by the command
+"echo -n ${value} > /sys/module/${modulename}/parameters/${parm}".
+
+The parameters listed below are only valid if certain kernel build options were
+enabled and if respective hardware is present. The text in square brackets at
+the beginning of each description states the restrictions within which a
+parameter is applicable:
 
 	ACPI	ACPI support is enabled.
 	ALSA	ALSA sound support is enabled.
@@ -1046,10 +1054,10 @@ running once the system is up.
 	noltlbs		[PPC] Do not use large page/tlb entries for kernel
 			lowmem mapping on PPC40x.
 
-	nomce		[IA-32] Machine Check Exception
-
 	nomca		[IA-64] Disable machine check abort handling
 
+	nomce		[IA-32] Machine Check Exception
+
 	noresidual	[PPC] Don't use residual data on PReP machines.
 
 	noresume	[SWSUSP] Disables resume and restores original swap
@@ -1682,20 +1690,6 @@ running once the system is up.
 
 
 ______________________________________________________________________
-Changelog:
-
-2000-06-??	Mr. Unknown
-	The last known update (for 2.4.0) - the changelog was not kept before.
-
-2002-11-24	Petr Baudis <pasky@ucw.cz>
-		Randy Dunlap <randy.dunlap@verizon.net>
-	Update for 2.5.49, description for most of the options introduced,
-	references to other documentation (C files, READMEs, ..), added S390,
-	PPC, SPARC, MTD, ALSA and OSS category. Minor corrections and
-	reformatting.
-
-2005-10-19	Randy Dunlap <rdunlap@xenotime.net>
-	Lots of typos, whitespace, some reformatting.
 
 TODO:
 
diff --git a/Documentation/networking/packet_mmap.txt b/Documentation/networking/packet_mmap.txt
index 4fc8e98..aaf99d5 100644
--- a/Documentation/networking/packet_mmap.txt
+++ b/Documentation/networking/packet_mmap.txt
@@ -254,7 +254,7 @@ and, the number of frames be
 
 	<block number> * <block size> / <frame size>
 
-Suposse the following parameters, which apply for 2.6 kernel and an
+Suppose the following parameters, which apply for 2.6 kernel and an
 i386 architecture:
 
 	<size-max> = 131072 bytes
diff --git a/Documentation/networking/tuntap.txt b/Documentation/networking/tuntap.txt
index ec3d109..76750fb 100644
--- a/Documentation/networking/tuntap.txt
+++ b/Documentation/networking/tuntap.txt
@@ -138,7 +138,7 @@ This means that you have to read/write I
 ethernet frames when using tap.
 
 5. What is the difference between BPF and TUN/TAP driver?
-BFP is an advanced packet filter. It can be attached to existing
+BPF is an advanced packet filter. It can be attached to existing
 network interface. It does not provide a virtual network interface.
 A TUN/TAP driver does provide a virtual network interface and it is possible
 to attach BPF to this interface.
diff --git a/arch/i386/kernel/crash.c b/arch/i386/kernel/crash.c
index e3c5fca..2b0cfce 100644
--- a/arch/i386/kernel/crash.c
+++ b/arch/i386/kernel/crash.c
@@ -69,7 +69,7 @@ static void crash_save_this_cpu(struct p
 	 * for the data I pass, and I need tags
 	 * on the data to indicate what information I have
 	 * squirrelled away.  ELF notes happen to provide
-	 * all of that that no need to invent something new.
+	 * all of that, so there is no need to invent something new.
 	 */
 	buf = (u32*)per_cpu_ptr(crash_notes, cpu);
 	if (!buf)
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index 5b26af8..e112d1a 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -1740,7 +1740,7 @@ EXPORT_SYMBOL(blk_run_queue);
 
 /**
  * blk_cleanup_queue: - release a &request_queue_t when it is no longer needed
- * @q:    the request queue to be released
+ * @kobj:    the kobj belonging of the request queue to be released
  *
  * Description:
  *     blk_cleanup_queue is the pair to blk_init_queue() or
diff --git a/drivers/md/dm-target.c b/drivers/md/dm-target.c
index aecd9e0..64fd8e7 100644
--- a/drivers/md/dm-target.c
+++ b/drivers/md/dm-target.c
@@ -78,8 +78,7 @@ void dm_put_target_type(struct target_ty
 	if (--ti->use == 0)
 		module_put(ti->tt.module);
 
-	if (ti->use < 0)
-		BUG();
+	BUG_ON(ti->use < 0);
 	up_read(&_lock);
 
 	return;
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 9b374c9..6081941 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -1558,8 +1558,7 @@ static int init_resync(conf_t *conf)
 	int buffs;
 
 	buffs = RESYNC_WINDOW / RESYNC_BLOCK_SIZE;
-	if (conf->r1buf_pool)
-		BUG();
+	BUG_ON(conf->r1buf_pool);
 	conf->r1buf_pool = mempool_create(buffs, r1buf_pool_alloc, r1buf_pool_free,
 					  conf->poolinfo);
 	if (!conf->r1buf_pool)
@@ -1732,8 +1731,7 @@ static sector_t sync_request(mddev_t *md
 			    !conf->fullsync &&
 			    !test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery))
 				break;
-			if (sync_blocks < (PAGE_SIZE>>9))
-				BUG();
+			BUG_ON(sync_blocks < (PAGE_SIZE>>9));
 			if (len > (sync_blocks<<9))
 				len = sync_blocks<<9;
 		}
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index ab90a6d..617012b 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -1117,8 +1117,7 @@ static int end_sync_read(struct bio *bio
 	for (i=0; i<conf->copies; i++)
 		if (r10_bio->devs[i].bio == bio)
 			break;
-	if (i == conf->copies)
-		BUG();
+	BUG_ON(i == conf->copies);
 	update_head_pos(i, r10_bio);
 	d = r10_bio->devs[i].devnum;
 
@@ -1518,8 +1517,7 @@ static int init_resync(conf_t *conf)
 	int buffs;
 
 	buffs = RESYNC_WINDOW / RESYNC_BLOCK_SIZE;
-	if (conf->r10buf_pool)
-		BUG();
+	BUG_ON(conf->r10buf_pool);
 	conf->r10buf_pool = mempool_create(buffs, r10buf_pool_alloc, r10buf_pool_free, conf);
 	if (!conf->r10buf_pool)
 		return -ENOMEM;
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index dae740a..3184360 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -73,10 +73,8 @@ static void print_raid5_conf (raid5_conf
 static void __release_stripe(raid5_conf_t *conf, struct stripe_head *sh)
 {
 	if (atomic_dec_and_test(&sh->count)) {
-		if (!list_empty(&sh->lru))
-			BUG();
-		if (atomic_read(&conf->active_stripes)==0)
-			BUG();
+		BUG_ON(!list_empty(&sh->lru));
+		BUG_ON(atomic_read(&conf->active_stripes)==0);
 		if (test_bit(STRIPE_HANDLE, &sh->state)) {
 			if (test_bit(STRIPE_DELAYED, &sh->state))
 				list_add_tail(&sh->lru, &conf->delayed_list);
@@ -184,10 +182,8 @@ static void init_stripe(struct stripe_he
 	raid5_conf_t *conf = sh->raid_conf;
 	int i;
 
-	if (atomic_read(&sh->count) != 0)
-		BUG();
-	if (test_bit(STRIPE_HANDLE, &sh->state))
-		BUG();
+	BUG_ON(atomic_read(&sh->count) != 0);
+	BUG_ON(test_bit(STRIPE_HANDLE, &sh->state));
 	
 	CHECK_DEVLOCK();
 	PRINTK("init_stripe called, stripe %llu\n", 
@@ -269,8 +265,7 @@ static struct stripe_head *get_active_st
 				init_stripe(sh, sector, pd_idx, disks);
 		} else {
 			if (atomic_read(&sh->count)) {
-				if (!list_empty(&sh->lru))
-					BUG();
+			  BUG_ON(!list_empty(&sh->lru));
 			} else {
 				if (!test_bit(STRIPE_HANDLE, &sh->state))
 					atomic_inc(&conf->active_stripes);
@@ -465,8 +460,7 @@ static int drop_one_stripe(raid5_conf_t 
 	spin_unlock_irq(&conf->device_lock);
 	if (!sh)
 		return 0;
-	if (atomic_read(&sh->count))
-		BUG();
+	BUG_ON(atomic_read(&sh->count));
 	shrink_buffers(sh, conf->pool_size);
 	kmem_cache_free(conf->slab_cache, sh);
 	atomic_dec(&conf->active_stripes);
@@ -882,8 +876,7 @@ static void compute_parity(struct stripe
 	ptr[0] = page_address(sh->dev[pd_idx].page);
 	switch(method) {
 	case READ_MODIFY_WRITE:
-		if (!test_bit(R5_UPTODATE, &sh->dev[pd_idx].flags))
-			BUG();
+		BUG_ON(!test_bit(R5_UPTODATE, &sh->dev[pd_idx].flags));
 		for (i=disks ; i-- ;) {
 			if (i==pd_idx)
 				continue;
@@ -896,7 +889,7 @@ static void compute_parity(struct stripe
 				if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags))
 					wake_up(&conf->wait_for_overlap);
 
-				if (sh->dev[i].written) BUG();
+				BUG_ON(sh->dev[i].written);
 				sh->dev[i].written = chosen;
 				check_xor();
 			}
@@ -912,7 +905,7 @@ static void compute_parity(struct stripe
 				if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags))
 					wake_up(&conf->wait_for_overlap);
 
-				if (sh->dev[i].written) BUG();
+				BUG_ON(sh->dev[i].written);
 				sh->dev[i].written = chosen;
 			}
 		break;
@@ -995,8 +988,7 @@ static int add_stripe_bio(struct stripe_
 	if (*bip && (*bip)->bi_sector < bi->bi_sector + ((bi->bi_size)>>9))
 		goto overlap;
 
-	if (*bip && bi->bi_next && (*bip) != bi->bi_next)
-		BUG();
+	BUG_ON(*bip && bi->bi_next && (*bip) != bi->bi_next);
 	if (*bip)
 		bi->bi_next = *bip;
 	*bip = bi;
@@ -1430,8 +1422,7 @@ static void handle_stripe(struct stripe_
 		set_bit(STRIPE_HANDLE, &sh->state);
 		if (failed == 0) {
 			char *pagea;
-			if (uptodate != disks)
-				BUG();
+			BUG_ON(uptodate != disks);
 			compute_parity(sh, CHECK_PARITY);
 			uptodate--;
 			pagea = page_address(sh->dev[sh->pd_idx].page);
@@ -2096,8 +2087,7 @@ static void raid5d (mddev_t *mddev)
 
 		list_del_init(first);
 		atomic_inc(&sh->count);
-		if (atomic_read(&sh->count)!= 1)
-			BUG();
+		BUG_ON(atomic_read(&sh->count)!= 1);
 		spin_unlock_irq(&conf->device_lock);
 		
 		handled++;
diff --git a/drivers/md/raid6main.c b/drivers/md/raid6main.c
index ab64b37..bc69355 100644
--- a/drivers/md/raid6main.c
+++ b/drivers/md/raid6main.c
@@ -91,10 +91,8 @@ static void print_raid6_conf (raid6_conf
 static void __release_stripe(raid6_conf_t *conf, struct stripe_head *sh)
 {
 	if (atomic_dec_and_test(&sh->count)) {
-		if (!list_empty(&sh->lru))
-			BUG();
-		if (atomic_read(&conf->active_stripes)==0)
-			BUG();
+		BUG_ON(!list_empty(&sh->lru));
+		BUG_ON(atomic_read(&conf->active_stripes)==0);
 		if (test_bit(STRIPE_HANDLE, &sh->state)) {
 			if (test_bit(STRIPE_DELAYED, &sh->state))
 				list_add_tail(&sh->lru, &conf->delayed_list);
@@ -202,10 +200,8 @@ static void init_stripe(struct stripe_he
 	raid6_conf_t *conf = sh->raid_conf;
 	int disks = conf->raid_disks, i;
 
-	if (atomic_read(&sh->count) != 0)
-		BUG();
-	if (test_bit(STRIPE_HANDLE, &sh->state))
-		BUG();
+	BUG_ON(atomic_read(&sh->count) != 0);
+	BUG_ON(test_bit(STRIPE_HANDLE, &sh->state));
 
 	CHECK_DEVLOCK();
 	PRINTK("init_stripe called, stripe %llu\n",
@@ -284,13 +280,11 @@ static struct stripe_head *get_active_st
 				init_stripe(sh, sector, pd_idx);
 		} else {
 			if (atomic_read(&sh->count)) {
-				if (!list_empty(&sh->lru))
-					BUG();
+				BUG_ON(!list_empty(&sh->lru));
 			} else {
 				if (!test_bit(STRIPE_HANDLE, &sh->state))
 					atomic_inc(&conf->active_stripes);
-				if (list_empty(&sh->lru))
-					BUG();
+				BUG_ON(list_empty(&sh->lru));
 				list_del_init(&sh->lru);
 			}
 		}
@@ -353,8 +347,7 @@ static int drop_one_stripe(raid6_conf_t 
 	spin_unlock_irq(&conf->device_lock);
 	if (!sh)
 		return 0;
-	if (atomic_read(&sh->count))
-		BUG();
+	BUG_ON(atomic_read(&sh->count));
 	shrink_buffers(sh, conf->raid_disks);
 	kmem_cache_free(conf->slab_cache, sh);
 	atomic_dec(&conf->active_stripes);
@@ -780,7 +773,7 @@ static void compute_parity(struct stripe
 				if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags))
 					wake_up(&conf->wait_for_overlap);
 
-				if (sh->dev[i].written) BUG();
+				BUG_ON(sh->dev[i].written);
 				sh->dev[i].written = chosen;
 			}
 		break;
@@ -970,8 +963,7 @@ static int add_stripe_bio(struct stripe_
 	if (*bip && (*bip)->bi_sector < bi->bi_sector + ((bi->bi_size)>>9))
 		goto overlap;
 
-	if (*bip && bi->bi_next && (*bip) != bi->bi_next)
-		BUG();
+	BUG_ON(*bip && bi->bi_next && (*bip) != bi->bi_next);
 	if (*bip)
 		bi->bi_next = *bip;
 	*bip = bi;
@@ -1906,8 +1898,7 @@ static void raid6d (mddev_t *mddev)
 
 		list_del_init(first);
 		atomic_inc(&sh->count);
-		if (atomic_read(&sh->count)!= 1)
-			BUG();
+		BUG_ON(atomic_read(&sh->count)!= 1);
 		spin_unlock_irq(&conf->device_lock);
 
 		handled++;
diff --git a/drivers/mtd/chips/Kconfig b/drivers/mtd/chips/Kconfig
index 0f6bb2e..a7ec595 100644
--- a/drivers/mtd/chips/Kconfig
+++ b/drivers/mtd/chips/Kconfig
@@ -200,27 +200,6 @@ config MTD_CFI_AMDSTD
 	  provides support for one of those command sets, used on chips
 	  including the AMD Am29LV320.
 
-config MTD_CFI_AMDSTD_RETRY
-	int "Retry failed commands (erase/program)"
-	depends on MTD_CFI_AMDSTD
-	default "0"
-	help
-	  Some chips, when attached to a shared bus, don't properly filter
-	  bus traffic that is destined to other devices.  This broken
-	  behavior causes erase and program sequences to be aborted when
-	  the sequences are mixed with traffic for other devices.
-
-	  SST49LF040 (and related) chips are know to be broken.
-
-config MTD_CFI_AMDSTD_RETRY_MAX
-	int "Max retries of failed commands (erase/program)"
-	depends on MTD_CFI_AMDSTD_RETRY
-	default "0"
-	help
-	  If you have an SST49LF040 (or related chip) then this value should
-	  be set to at least 1.  This can also be adjusted at driver load
-	  time with the retry_cmd_max module parameter.
-
 config MTD_CFI_STAA
 	tristate "Support for ST (Advanced Architecture) flash chips"
 	depends on MTD_GEN_PROBE
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c
index ce99845..066e22b 100644
--- a/drivers/net/8139cp.c
+++ b/drivers/net/8139cp.c
@@ -539,8 +539,7 @@ rx_status_loop:
 		unsigned buflen;
 
 		skb = cp->rx_skb[rx_tail].skb;
-		if (!skb)
-			BUG();
+		BUG_ON(!skb);
 
 		desc = &cp->rx_ring[rx_tail];
 		status = le32_to_cpu(desc->opts1);
@@ -723,8 +722,7 @@ static void cp_tx (struct cp_private *cp
 			break;
 
 		skb = cp->tx_skb[tx_tail].skb;
-		if (!skb)
-			BUG();
+		BUG_ON(!skb);
 
 		pci_unmap_single(cp->pdev, cp->tx_skb[tx_tail].mapping,
 				 cp->tx_skb[tx_tail].len, PCI_DMA_TODEVICE);
@@ -1550,8 +1548,7 @@ static void cp_get_ethtool_stats (struct
 	tmp_stats[i++] = le16_to_cpu(nic_stats->tx_abort);
 	tmp_stats[i++] = le16_to_cpu(nic_stats->tx_underrun);
 	tmp_stats[i++] = cp->cp_stats.rx_frags;
-	if (i != CP_NUM_STATS)
-		BUG();
+	BUG_ON(i != CP_NUM_STATS);
 
 	pci_free_consistent(cp->pdev, sizeof(*nic_stats), nic_stats, dma);
 }
@@ -1856,8 +1853,7 @@ static void cp_remove_one (struct pci_de
 	struct net_device *dev = pci_get_drvdata(pdev);
 	struct cp_private *cp = netdev_priv(dev);
 
-	if (!dev)
-		BUG();
+	BUG_ON(!dev);
 	unregister_netdev(dev);
 	iounmap(cp->regs);
 	if (cp->wol_enabled) pci_set_power_state (pdev, PCI_D0);
diff --git a/drivers/net/arcnet/arcnet.c b/drivers/net/arcnet/arcnet.c
index 64e2caf..fabc060 100644
--- a/drivers/net/arcnet/arcnet.c
+++ b/drivers/net/arcnet/arcnet.c
@@ -765,8 +765,7 @@ irqreturn_t arcnet_interrupt(int irq, vo
 	BUGMSG(D_DURING, "in arcnet_interrupt\n");
 	
 	lp = dev->priv;
-	if (!lp)
-		BUG();
+	BUG_ON(!lp);
 		
 	spin_lock(&lp->lock);
 
diff --git a/drivers/net/b44.c b/drivers/net/b44.c
index 15032f2..c4e12b5 100644
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
@@ -608,8 +608,7 @@ static void b44_tx(struct b44 *bp)
 		struct ring_info *rp = &bp->tx_buffers[cons];
 		struct sk_buff *skb = rp->skb;
 
-		if (unlikely(skb == NULL))
-			BUG();
+		BUG_ON(skb == NULL);
 
 		pci_unmap_single(bp->pdev,
 				 pci_unmap_addr(rp, mapping),
diff --git a/drivers/net/chelsio/sge.c b/drivers/net/chelsio/sge.c
index 30ff8ea..4391bf4 100644
--- a/drivers/net/chelsio/sge.c
+++ b/drivers/net/chelsio/sge.c
@@ -1093,8 +1093,7 @@ static int process_responses(struct adap
 		if (likely(e->DataValid)) {
 			struct freelQ *fl = &sge->freelQ[e->FreelistQid];
 
-			if (unlikely(!e->Sop || !e->Eop))
-				BUG();
+			BUG_ON(!e->Sop || !e->Eop);
 			if (unlikely(e->Offload))
 				unexpected_offload(adapter, fl);
 			else
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 49cd096..add8dc4 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -3308,8 +3308,7 @@ e1000_clean(struct net_device *poll_dev,
 
 	while (poll_dev != &adapter->polling_netdev[i]) {
 		i++;
-		if (unlikely(i == adapter->num_rx_queues))
-			BUG();
+		BUG_ON(i == adapter->num_rx_queues);
 	}
 
 	if (likely(adapter->num_tx_queues == 1)) {
diff --git a/drivers/net/eql.c b/drivers/net/eql.c
index aa15691..815436c 100644
--- a/drivers/net/eql.c
+++ b/drivers/net/eql.c
@@ -203,8 +203,7 @@ static int eql_open(struct net_device *d
 	printk(KERN_INFO "%s: remember to turn off Van-Jacobson compression on "
 	       "your slave devices.\n", dev->name);
 
-	if (!list_empty(&eql->queue.all_slaves))
-		BUG();
+	BUG_ON(!list_empty(&eql->queue.all_slaves));
 
 	eql->min_slaves = 1;
 	eql->max_slaves = EQL_DEFAULT_MAX_SLAVES; /* 4 usually... */
diff --git a/drivers/net/irda/sa1100_ir.c b/drivers/net/irda/sa1100_ir.c
index 63d38fb..f530686 100644
--- a/drivers/net/irda/sa1100_ir.c
+++ b/drivers/net/irda/sa1100_ir.c
@@ -695,8 +695,7 @@ static int sa1100_irda_hard_xmit(struct 
 		/*
 		 * We must not be transmitting...
 		 */
-		if (si->txskb)
-			BUG();
+		BUG_ON(si->txskb);
 
 		netif_stop_queue(dev);
 
diff --git a/drivers/net/ne2k-pci.c b/drivers/net/ne2k-pci.c
index d11821d..ced9fdb 100644
--- a/drivers/net/ne2k-pci.c
+++ b/drivers/net/ne2k-pci.c
@@ -645,9 +645,7 @@ static void __devexit ne2k_pci_remove_on
 {
 	struct net_device *dev = pci_get_drvdata(pdev);
 
-	if (!dev)
-		BUG();
-
+	BUG_ON(!dev);
 	unregister_netdev(dev);
 	release_region(dev->base_addr, NE_IO_EXTENT);
 	free_netdev(dev);
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c
index 8e9b1a5..706aed7 100644
--- a/drivers/net/ns83820.c
+++ b/drivers/net/ns83820.c
@@ -568,8 +568,7 @@ static inline int ns83820_add_rx_skb(str
 #endif
 
 	sg = dev->rx_info.descs + (next_empty * DESC_SIZE);
-	if (unlikely(NULL != dev->rx_info.skbs[next_empty]))
-		BUG();
+	BUG_ON(NULL != dev->rx_info.skbs[next_empty]);
 	dev->rx_info.skbs[next_empty] = skb;
 
 	dev->rx_info.next_empty = (next_empty + 1) % NR_RX_DESC;
diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c
index 35b1805..45ad036 100644
--- a/drivers/net/starfire.c
+++ b/drivers/net/starfire.c
@@ -2122,8 +2122,7 @@ static void __devexit starfire_remove_on
 	struct net_device *dev = pci_get_drvdata(pdev);
 	struct netdev_private *np = netdev_priv(dev);
 
-	if (!dev)
-		BUG();
+	BUG_ON(!dev);
 
 	unregister_netdev(dev);
 
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 964c096..46f55fb 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -2966,9 +2966,7 @@ static void tg3_tx(struct tg3 *tp)
 		struct sk_buff *skb = ri->skb;
 		int i;
 
-		if (unlikely(skb == NULL))
-			BUG();
-
+		BUG_ON(skb == NULL);
 		pci_unmap_single(tp->pdev,
 				 pci_unmap_addr(ri, mapping),
 				 skb_headlen(skb),
@@ -2979,12 +2977,10 @@ static void tg3_tx(struct tg3 *tp)
 		sw_idx = NEXT_TX(sw_idx);
 
 		for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
-			if (unlikely(sw_idx == hw_idx))
-				BUG();
+			BUG_ON(sw_idx == hw_idx);
 
 			ri = &tp->tx_buffers[sw_idx];
-			if (unlikely(ri->skb != NULL))
-				BUG();
+			BUG_ON(ri->skb != NULL);
 
 			pci_unmap_page(tp->pdev,
 				       pci_unmap_addr(ri, mapping),
@@ -4935,9 +4931,8 @@ static int tg3_halt_cpu(struct tg3 *tp, 
 {
 	int i;
 
-	if (offset == TX_CPU_BASE &&
-	    (tp->tg3_flags2 & TG3_FLG2_5705_PLUS))
-		BUG();
+	BUG_ON(offset == TX_CPU_BASE &&
+	    (tp->tg3_flags2 & TG3_FLG2_5705_PLUS));
 
 	if (offset == RX_CPU_BASE) {
 		for (i = 0; i < 10000; i++) {
diff --git a/drivers/net/tokenring/abyss.c b/drivers/net/tokenring/abyss.c
index 9345e68..649d8ea 100644
--- a/drivers/net/tokenring/abyss.c
+++ b/drivers/net/tokenring/abyss.c
@@ -438,8 +438,7 @@ static void __devexit abyss_detach (stru
 {
 	struct net_device *dev = pci_get_drvdata(pdev);
 	
-	if (!dev)
-		BUG();
+	BUG_ON(!dev);
 	unregister_netdev(dev);
 	release_region(dev->base_addr-0x10, ABYSS_IO_EXTENT);
 	free_irq(dev->irq, dev);
diff --git a/drivers/net/tokenring/madgemc.c b/drivers/net/tokenring/madgemc.c
index 3a25d19..19e6f4d 100644
--- a/drivers/net/tokenring/madgemc.c
+++ b/drivers/net/tokenring/madgemc.c
@@ -735,8 +735,7 @@ static int __devexit madgemc_remove(stru
 	struct net_local *tp;
         struct card_info *card;
 
-	if (!dev)
-		BUG();
+	BUG_ON(!dev);
 
 	tp = dev->priv;
 	card = tp->tmspriv;
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c
index 9dce522..bca89cf 100644
--- a/drivers/net/wireless/ipw2200.c
+++ b/drivers/net/wireless/ipw2200.c
@@ -5573,8 +5573,7 @@ static void ipw_adhoc_create(struct ipw_
 	case IEEE80211_52GHZ_BAND:
 		network->mode = IEEE_A;
 		i = ieee80211_channel_to_index(priv->ieee, priv->channel);
-		if (i == -1)
-			BUG();
+		BUG_ON(i == -1);
 		if (geo->a[i].flags & IEEE80211_CH_PASSIVE_ONLY) {
 			IPW_WARNING("Overriding invalid channel\n");
 			priv->channel = geo->a[0].channel;
@@ -5587,8 +5586,7 @@ static void ipw_adhoc_create(struct ipw_
 		else
 			network->mode = IEEE_B;
 		i = ieee80211_channel_to_index(priv->ieee, priv->channel);
-		if (i == -1)
-			BUG();
+		BUG_ON(i == -1);
 		if (geo->bg[i].flags & IEEE80211_CH_PASSIVE_ONLY) {
 			IPW_WARNING("Overriding invalid channel\n");
 			priv->channel = geo->bg[0].channel;
@@ -6715,8 +6713,7 @@ static int ipw_qos_association(struct ip
 
 	switch (priv->ieee->iw_mode) {
 	case IW_MODE_ADHOC:
-		if (!(network->capability & WLAN_CAPABILITY_IBSS))
-			BUG();
+		BUG_ON(!(network->capability & WLAN_CAPABILITY_IBSS));
 
 		qos_data = &ibss_data;
 		break;
diff --git a/drivers/net/yellowfin.c b/drivers/net/yellowfin.c
index 75d56bf..fd0f43b 100644
--- a/drivers/net/yellowfin.c
+++ b/drivers/net/yellowfin.c
@@ -1441,8 +1441,7 @@ static void __devexit yellowfin_remove_o
 	struct net_device *dev = pci_get_drvdata(pdev);
 	struct yellowfin_private *np;
 
-	if (!dev)
-		BUG();
+	BUG_ON(!dev);
 	np = netdev_priv(dev);
 
         pci_free_consistent(pdev, STATUS_TOTAL_SIZE, np->tx_status, 
diff --git a/drivers/s390/block/dasd_erp.c b/drivers/s390/block/dasd_erp.c
index 8fd71ab..b842377 100644
--- a/drivers/s390/block/dasd_erp.c
+++ b/drivers/s390/block/dasd_erp.c
@@ -32,9 +32,8 @@ dasd_alloc_erp_request(char *magic, int 
 	int size;
 
 	/* Sanity checks */
-	if ( magic == NULL || datasize > PAGE_SIZE ||
-	     (cplength*sizeof(struct ccw1)) > PAGE_SIZE)
-		BUG();
+	BUG_ON( magic == NULL || datasize > PAGE_SIZE ||
+	     (cplength*sizeof(struct ccw1)) > PAGE_SIZE);
 
 	size = (sizeof(struct dasd_ccw_req) + 7L) & -8L;
 	if (cplength > 0)
@@ -125,8 +124,7 @@ dasd_default_erp_postaction(struct dasd_
 	struct dasd_device *device;
 	int success;
 
-	if (cqr->refers == NULL || cqr->function == NULL)
-		BUG();
+	BUG_ON(cqr->refers == NULL || cqr->function == NULL);
 
 	device = cqr->device;
 	success = cqr->status == DASD_CQR_DONE;
diff --git a/drivers/s390/char/sclp_rw.c b/drivers/s390/char/sclp_rw.c
index ac10dfb..91e93c7 100644
--- a/drivers/s390/char/sclp_rw.c
+++ b/drivers/s390/char/sclp_rw.c
@@ -24,7 +24,7 @@
 
 /*
  * The room for the SCCB (only for writing) is not equal to a pages size
- * (as it is specified as the maximum size in the the SCLP ducumentation)
+ * (as it is specified as the maximum size in the the SCLP documentation)
  * because of the additional data structure described above.
  */
 #define MAX_SCCB_ROOM (PAGE_SIZE - sizeof(struct sclp_buffer))
diff --git a/drivers/s390/char/tape_block.c b/drivers/s390/char/tape_block.c
index 5ced272..5c65cf3 100644
--- a/drivers/s390/char/tape_block.c
+++ b/drivers/s390/char/tape_block.c
@@ -198,9 +198,7 @@ tapeblock_request_fn(request_queue_t *qu
 
 	device = (struct tape_device *) queue->queuedata;
 	DBF_LH(6, "tapeblock_request_fn(device=%p)\n", device);
-	if (device == NULL)
-		BUG();
-
+	BUG_ON(device == NULL);
 	tapeblock_trigger_requeue(device);
 }
 
@@ -307,8 +305,7 @@ tapeblock_revalidate_disk(struct gendisk
 	int			rc;
 
 	device = (struct tape_device *) disk->private_data;
-	if (!device)
-		BUG();
+	BUG_ON(!device);
 
 	if (!device->blk_data.medium_changed)
 		return 0;
@@ -440,11 +437,9 @@ tapeblock_ioctl(
 
 	rc     = 0;
 	disk   = inode->i_bdev->bd_disk;
-	if (!disk)
-		BUG();
+	BUG_ON(!disk);
 	device = disk->private_data;
-	if (!device)
-		BUG();
+	BUG_ON(!device);
 	minor  = iminor(inode);
 
 	DBF_LH(6, "tapeblock_ioctl(0x%0x)\n", command);
diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c
index edcf05d..5d6b7a5 100644
--- a/drivers/s390/net/lcs.c
+++ b/drivers/s390/net/lcs.c
@@ -675,9 +675,8 @@ lcs_ready_buffer(struct lcs_channel *cha
 	int index, rc;
 
 	LCS_DBF_TEXT(5, trace, "rdybuff");
-	if (buffer->state != BUF_STATE_LOCKED &&
-	    buffer->state != BUF_STATE_PROCESSED)
-		BUG();
+	BUG_ON(buffer->state != BUF_STATE_LOCKED &&
+		buffer->state != BUF_STATE_PROCESSED);
 	spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags);
 	buffer->state = BUF_STATE_READY;
 	index = buffer - channel->iob;
@@ -701,8 +700,7 @@ __lcs_processed_buffer(struct lcs_channe
 	int index, prev, next;
 
 	LCS_DBF_TEXT(5, trace, "prcsbuff");
-	if (buffer->state != BUF_STATE_READY)
-		BUG();
+	BUG_ON(buffer->state != BUF_STATE_READY);
 	buffer->state = BUF_STATE_PROCESSED;
 	index = buffer - channel->iob;
 	prev = (index - 1) & (LCS_NUM_BUFFS - 1);
@@ -734,9 +732,8 @@ lcs_release_buffer(struct lcs_channel *c
 	unsigned long flags;
 
 	LCS_DBF_TEXT(5, trace, "relbuff");
-	if (buffer->state != BUF_STATE_LOCKED &&
-	    buffer->state != BUF_STATE_PROCESSED)
-		BUG();
+	BUG_ON(buffer->state != BUF_STATE_LOCKED &&
+		buffer->state != BUF_STATE_PROCESSED);
 	spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags);
 	buffer->state = BUF_STATE_EMPTY;
 	spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags);
diff --git a/drivers/scsi/aic7xxx/Kconfig.aic7xxx b/drivers/scsi/aic7xxx/Kconfig.aic7xxx
index 6c2c395..5517da5 100644
--- a/drivers/scsi/aic7xxx/Kconfig.aic7xxx
+++ b/drivers/scsi/aic7xxx/Kconfig.aic7xxx
@@ -86,7 +86,7 @@ config AIC7XXX_DEBUG_MASK
         default "0"
         help
 	Bit mask of debug options that is only valid if the
-	CONFIG_AIC7XXX_DEBUG_ENBLE option is enabled.  The bits in this mask
+	CONFIG_AIC7XXX_DEBUG_ENABLE option is enabled.  The bits in this mask
 	are defined in the drivers/scsi/aic7xxx/aic7xxx.h - search for the
 	variable ahc_debug in that file to find them.
 
diff --git a/drivers/serial/jsm/jsm.h b/drivers/serial/jsm/jsm.h
index dfc1e86..043f50b 100644
--- a/drivers/serial/jsm/jsm.h
+++ b/drivers/serial/jsm/jsm.h
@@ -20,7 +20,7 @@
  *
  * Contact Information:
  * Scott H Kilau <Scott_Kilau@digi.com>
- * Wendy Xiong   <wendyx@us.ltcfwd.linux.ibm.com>
+ * Wendy Xiong   <wendyx@us.ibm.com>
  *
  ***********************************************************************/
 
diff --git a/drivers/serial/jsm/jsm_driver.c b/drivers/serial/jsm/jsm_driver.c
index b1b66e7..b3e1f71 100644
--- a/drivers/serial/jsm/jsm_driver.c
+++ b/drivers/serial/jsm/jsm_driver.c
@@ -20,7 +20,7 @@
  *
  * Contact Information:
  * Scott H Kilau <Scott_Kilau@digi.com>
- * Wendy Xiong   <wendyx@us.ltcfwd.linux.ibm.com>
+ * Wendy Xiong   <wendyx@us.ibm.com>
  *
  *
  ***********************************************************************/
diff --git a/drivers/serial/jsm/jsm_neo.c b/drivers/serial/jsm/jsm_neo.c
index 87e4e2c..a5fc589 100644
--- a/drivers/serial/jsm/jsm_neo.c
+++ b/drivers/serial/jsm/jsm_neo.c
@@ -20,7 +20,7 @@
  *
  * Contact Information:
  * Scott H Kilau <Scott_Kilau@digi.com>
- * Wendy Xiong   <wendyx@us.ltcfwd.linux.ibm.com>
+ * Wendy Xiong   <wendyx@us.ibm.com>
  *
  ***********************************************************************/
 #include <linux/delay.h>	/* For udelay */
diff --git a/fs/direct-io.c b/fs/direct-io.c
index 910a8ed..b05d1b2 100644
--- a/fs/direct-io.c
+++ b/fs/direct-io.c
@@ -929,8 +929,7 @@ do_holes:
 			block_in_page += this_chunk_blocks;
 			dio->blocks_available -= this_chunk_blocks;
 next_block:
-			if (dio->block_in_file > dio->final_block_in_request)
-				BUG();
+			BUG_ON(dio->block_in_file > dio->final_block_in_request);
 			if (dio->block_in_file == dio->final_block_in_request)
 				break;
 		}
diff --git a/fs/dquot.c b/fs/dquot.c
index 6b38869..81d87a4 100644
--- a/fs/dquot.c
+++ b/fs/dquot.c
@@ -590,8 +590,7 @@ we_slept:
 	atomic_dec(&dquot->dq_count);
 #ifdef __DQUOT_PARANOIA
 	/* sanity check */
-	if (!list_empty(&dquot->dq_free))
-		BUG();
+	BUG_ON(!list_empty(&dquot->dq_free));
 #endif
 	put_dquot_last(dquot);
 	spin_unlock(&dq_list_lock);
@@ -666,8 +665,7 @@ we_slept:
 		return NODQUOT;
 	}
 #ifdef __DQUOT_PARANOIA
-	if (!dquot->dq_sb)	/* Has somebody invalidated entry under us? */
-		BUG();
+	BUG_ON(!dquot->dq_sb);	/* Has somebody invalidated entry under us? */
 #endif
 
 	return dquot;
diff --git a/fs/exec.c b/fs/exec.c
index 950ebd4..0291a68 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -561,7 +561,7 @@ static int exec_mmap(struct mm_struct *m
 	arch_pick_mmap_layout(mm);
 	if (old_mm) {
 		up_read(&old_mm->mmap_sem);
-		if (active_mm != old_mm) BUG();
+		BUG_ON(active_mm != old_mm);
 		mmput(old_mm);
 		return 0;
 	}
diff --git a/fs/fcntl.c b/fs/fcntl.c
index 2a24791..d35cbc6 100644
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -453,8 +453,7 @@ static void send_sigio_to_task(struct ta
 			/* Make sure we are called with one of the POLL_*
 			   reasons, otherwise we could leak kernel stack into
 			   userspace.  */
-			if ((reason & __SI_MASK) != __SI_POLL)
-				BUG();
+			BUG_ON((reason & __SI_MASK) != __SI_POLL);
 			if (reason - POLL_IN >= NSIGPOLL)
 				si.si_band  = ~0L;
 			else
diff --git a/fs/freevxfs/vxfs_olt.c b/fs/freevxfs/vxfs_olt.c
index 76a0708..0495008 100644
--- a/fs/freevxfs/vxfs_olt.c
+++ b/fs/freevxfs/vxfs_olt.c
@@ -42,24 +42,21 @@
 static inline void
 vxfs_get_fshead(struct vxfs_oltfshead *fshp, struct vxfs_sb_info *infp)
 {
-	if (infp->vsi_fshino)
-		BUG();
+	BUG_ON(infp->vsi_fshino);
 	infp->vsi_fshino = fshp->olt_fsino[0];
 }
 
 static inline void
 vxfs_get_ilist(struct vxfs_oltilist *ilistp, struct vxfs_sb_info *infp)
 {
-	if (infp->vsi_iext)
-		BUG();
+	BUG_ON(infp->vsi_iext);
 	infp->vsi_iext = ilistp->olt_iext[0]; 
 }
 
 static inline u_long
 vxfs_oblock(struct super_block *sbp, daddr_t block, u_long bsize)
 {
-	if (sbp->s_blocksize % bsize)
-		BUG();
+	BUG_ON(sbp->s_blocksize % bsize);
 	return (block * (sbp->s_blocksize / bsize));
 }
 
diff --git a/fs/hfsplus/bnode.c b/fs/hfsplus/bnode.c
index 8f07e8f..746abc9 100644
--- a/fs/hfsplus/bnode.c
+++ b/fs/hfsplus/bnode.c
@@ -466,8 +466,7 @@ void hfs_bnode_unhash(struct hfs_bnode *
 	for (p = &node->tree->node_hash[hfs_bnode_hash(node->this)];
 	     *p && *p != node; p = &(*p)->next_hash)
 		;
-	if (!*p)
-		BUG();
+	BUG_ON(!*p);
 	*p = node->next_hash;
 	node->tree->node_hash_cnt--;
 }
@@ -622,8 +621,7 @@ void hfs_bnode_put(struct hfs_bnode *nod
 
 		dprint(DBG_BNODE_REFS, "put_node(%d:%d): %d\n",
 		       node->tree->cnid, node->this, atomic_read(&node->refcnt));
-		if (!atomic_read(&node->refcnt))
-			BUG();
+		BUG_ON(!atomic_read(&node->refcnt));
 		if (!atomic_dec_and_lock(&node->refcnt, &tree->hash_lock))
 			return;
 		for (i = 0; i < tree->pages_per_bnode; i++) {
diff --git a/fs/hfsplus/btree.c b/fs/hfsplus/btree.c
index a67edfa..effa899 100644
--- a/fs/hfsplus/btree.c
+++ b/fs/hfsplus/btree.c
@@ -269,8 +269,7 @@ void hfs_bmap_free(struct hfs_bnode *nod
 	u8 *data, byte, m;
 
 	dprint(DBG_BNODE_MOD, "btree_free_node: %u\n", node->this);
-	if (!node->this)
-		BUG();
+	BUG_ON(!node->this);
 	tree = node->tree;
 	nidx = node->this;
 	node = hfs_bnode_find(tree, 0);
diff --git a/fs/inode.c b/fs/inode.c
index 32b7c33..3a2446a 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -172,8 +172,7 @@ static struct inode *alloc_inode(struct 
 
 void destroy_inode(struct inode *inode) 
 {
-	if (inode_has_buffers(inode))
-		BUG();
+	BUG_ON(inode_has_buffers(inode));
 	security_inode_free(inode);
 	if (inode->i_sb->s_op->destroy_inode)
 		inode->i_sb->s_op->destroy_inode(inode);
@@ -249,12 +248,9 @@ void clear_inode(struct inode *inode)
 	might_sleep();
 	invalidate_inode_buffers(inode);
        
-	if (inode->i_data.nrpages)
-		BUG();
-	if (!(inode->i_state & I_FREEING))
-		BUG();
-	if (inode->i_state & I_CLEAR)
-		BUG();
+	BUG_ON(inode->i_data.nrpages);
+	BUG_ON(!(inode->i_state & I_FREEING));
+	BUG_ON(inode->i_state & I_CLEAR);
 	wait_on_inode(inode);
 	DQUOT_DROP(inode);
 	if (inode->i_sb && inode->i_sb->s_op->clear_inode)
@@ -1054,8 +1050,7 @@ void generic_delete_inode(struct inode *
 	hlist_del_init(&inode->i_hash);
 	spin_unlock(&inode_lock);
 	wake_up_inode(inode);
-	if (inode->i_state != I_CLEAR)
-		BUG();
+	BUG_ON(inode->i_state != I_CLEAR);
 	destroy_inode(inode);
 }
 
diff --git a/fs/jffs2/background.c b/fs/jffs2/background.c
index 7b77a95..ff2a872 100644
--- a/fs/jffs2/background.c
+++ b/fs/jffs2/background.c
@@ -35,8 +35,7 @@ int jffs2_start_garbage_collect_thread(s
 	pid_t pid;
 	int ret = 0;
 
-	if (c->gc_task)
-		BUG();
+	BUG_ON(c->gc_task);
 
 	init_completion(&c->gc_thread_start);
 	init_completion(&c->gc_thread_exit);
diff --git a/fs/smbfs/file.c b/fs/smbfs/file.c
index c56bd99..ed9a24d 100644
--- a/fs/smbfs/file.c
+++ b/fs/smbfs/file.c
@@ -178,11 +178,9 @@ smb_writepage(struct page *page, struct 
 	unsigned offset = PAGE_CACHE_SIZE;
 	int err;
 
-	if (!mapping)
-		BUG();
+	BUG_ON(!mapping);
 	inode = mapping->host;
-	if (!inode)
-		BUG();
+	BUG_ON(!inode);
 
 	end_index = inode->i_size >> PAGE_CACHE_SHIFT;
 
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index f26880a..6cfdc9a 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -50,7 +50,7 @@ static struct sysfs_dirent * sysfs_new_d
 	return sd;
 }
 
-/**
+/*
  *
  * Return -EEXIST if there is already a sysfs element with the same name for
  * the same parent.
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c
index 4c29ac4..f0b347b 100644
--- a/fs/sysfs/inode.c
+++ b/fs/sysfs/inode.c
@@ -175,8 +175,7 @@ const unsigned char * sysfs_get_name(str
 	struct bin_attribute * bin_attr;
 	struct sysfs_symlink  * sl;
 
-	if (!sd || !sd->s_element)
-		BUG();
+	BUG_ON(!sd || !sd->s_element);
 
 	switch (sd->s_type) {
 		case SYSFS_DIR:
diff --git a/fs/sysv/dir.c b/fs/sysv/dir.c
index 8c66e92..d707434 100644
--- a/fs/sysv/dir.c
+++ b/fs/sysv/dir.c
@@ -253,8 +253,7 @@ int sysv_delete_entry(struct sysv_dir_en
 
 	lock_page(page);
 	err = mapping->a_ops->prepare_write(NULL, page, from, to);
-	if (err)
-		BUG();
+	BUG_ON(err);
 	de->inode = 0;
 	err = dir_commit_chunk(page, from, to);
 	dir_put_page(page);
@@ -353,8 +352,7 @@ void sysv_set_link(struct sysv_dir_entry
 
 	lock_page(page);
 	err = page->mapping->a_ops->prepare_write(NULL, page, from, to);
-	if (err)
-		BUG();
+	BUG_ON(err);
 	de->inode = cpu_to_fs16(SYSV_SB(inode->i_sb), inode->i_ino);
 	err = dir_commit_chunk(page, from, to);
 	dir_put_page(page);
diff --git a/fs/udf/inode.c b/fs/udf/inode.c
index 81e0e84..2983afd 100644
--- a/fs/udf/inode.c
+++ b/fs/udf/inode.c
@@ -312,12 +312,10 @@ static int udf_get_block(struct inode *i
 	err = 0;
 
 	bh = inode_getblk(inode, block, &err, &phys, &new);
-	if (bh)
-		BUG();
+	BUG_ON(bh);
 	if (err)
 		goto abort;
-	if (!phys)
-		BUG();
+	BUG_ON(!phys);
 
 	if (new)
 		set_buffer_new(bh_result);
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 4ed7e60..1e9ebab 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -864,7 +864,7 @@ struct super_block {
 	 */
 	struct mutex s_vfs_rename_mutex;	/* Kludge */
 
-	/* Granuality of c/m/atime in ns.
+	/* Granularity of c/m/atime in ns.
 	   Cannot be worse than a second */
 	u32		   s_time_gran;
 };
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index b209392..306acf1 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -80,7 +80,7 @@ struct hrtimer_sleeper {
  * @first:		pointer to the timer node which expires first
  * @resolution:		the resolution of the clock, in nanoseconds
  * @get_time:		function to retrieve the current time of the clock
- * @get_sofirq_time:	function to retrieve the current time from the softirq
+ * @get_softirq_time:	function to retrieve the current time from the softirq
  * @curr_timer:		the timer which is executing a callback right now
  * @softirq_time:	the time when running the hrtimer queue in the softirq
  */
diff --git a/ipc/shm.c b/ipc/shm.c
index f806a2e..6b0c9af 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -91,8 +91,8 @@ static inline int shm_addid(struct shmid
 static inline void shm_inc (int id) {
 	struct shmid_kernel *shp;
 
-	if(!(shp = shm_lock(id)))
-		BUG();
+	shp = shm_lock(id);
+	BUG_ON(!shp);
 	shp->shm_atim = get_seconds();
 	shp->shm_lprid = current->tgid;
 	shp->shm_nattch++;
@@ -142,8 +142,8 @@ static void shm_close (struct vm_area_st
 
 	mutex_lock(&shm_ids.mutex);
 	/* remove from the list of attaches of the shm segment */
-	if(!(shp = shm_lock(id)))
-		BUG();
+	shp = shm_lock(id);
+	BUG_ON(!shp);
 	shp->shm_lprid = current->tgid;
 	shp->shm_dtim = get_seconds();
 	shp->shm_nattch--;
@@ -283,8 +283,7 @@ asmlinkage long sys_shmget (key_t key, s
 		err = -EEXIST;
 	} else {
 		shp = shm_lock(id);
-		if(shp==NULL)
-			BUG();
+		BUG_ON(shp==NULL);
 		if (shp->shm_segsz < size)
 			err = -EINVAL;
 		else if (ipcperms(&shp->shm_perm, shmflg))
@@ -774,8 +773,8 @@ invalid:
 	up_write(&current->mm->mmap_sem);
 
 	mutex_lock(&shm_ids.mutex);
-	if(!(shp = shm_lock(shmid)))
-		BUG();
+	shp = shm_lock(shmid);
+	BUG_ON(!shp);
 	shp->shm_nattch--;
 	if(shp->shm_nattch == 0 &&
 	   shp->shm_perm.mode & SHM_DEST)
diff --git a/ipc/util.c b/ipc/util.c
index 23151ef..5e785a2 100644
--- a/ipc/util.c
+++ b/ipc/util.c
@@ -266,8 +266,7 @@ struct kern_ipc_perm* ipc_rmid(struct ip
 {
 	struct kern_ipc_perm* p;
 	int lid = id % SEQ_MULTIPLIER;
-	if(lid >= ids->entries->size)
-		BUG();
+	BUG_ON(lid >= ids->entries->size);
 
 	/* 
 	 * do not need a rcu_dereference()() here to force ordering
@@ -275,8 +274,7 @@ struct kern_ipc_perm* ipc_rmid(struct ip
 	 */	
 	p = ids->entries->p[lid];
 	ids->entries->p[lid] = NULL;
-	if(p==NULL)
-		BUG();
+	BUG_ON(p==NULL);
 	ids->in_use--;
 
 	if (lid == ids->max_id) {
diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
index 9fd8d4f..ce0dfb8 100644
--- a/kernel/power/Kconfig
+++ b/kernel/power/Kconfig
@@ -41,7 +41,7 @@ config SOFTWARE_SUSPEND
 	depends on PM && SWAP && (X86 && (!SMP || SUSPEND_SMP)) || ((FRV || PPC32) && !SMP)
 	---help---
 	  Enable the possibility of suspending the machine.
-	  It doesn't need APM.
+	  It doesn't need ACPI or APM.
 	  You may suspend your machine by 'swsusp' or 'shutdown -z <time>' 
 	  (patch for sysvinit needed). 
 
diff --git a/kernel/printk.c b/kernel/printk.c
index 8cc1943..c056f33 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -360,8 +360,7 @@ static void call_console_drivers(unsigne
 	unsigned long cur_index, start_print;
 	static int msg_level = -1;
 
-	if (((long)(start - end)) > 0)
-		BUG();
+	BUG_ON(((long)(start - end)) > 0);
 
 	cur_index = start;
 	start_print = start;
@@ -708,8 +707,7 @@ int __init add_preferred_console(char *n
  */
 void acquire_console_sem(void)
 {
-	if (in_interrupt())
-		BUG();
+	BUG_ON(in_interrupt());
 	down(&console_sem);
 	console_locked = 1;
 	console_may_schedule = 1;
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index 86a7f6c..0eeb7e6 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -30,8 +30,7 @@
  */
 void __ptrace_link(task_t *child, task_t *new_parent)
 {
-	if (!list_empty(&child->ptrace_list))
-		BUG();
+	BUG_ON(!list_empty(&child->ptrace_list));
 	if (child->parent == new_parent)
 		return;
 	list_add(&child->ptrace_list, &child->parent->ptrace_children);
diff --git a/kernel/signal.c b/kernel/signal.c
index 92025b1..5ccaac5 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -769,8 +769,7 @@ specific_send_sig_info(int sig, struct s
 {
 	int ret = 0;
 
-	if (!irqs_disabled())
-		BUG();
+	BUG_ON(!irqs_disabled());
 	assert_spin_locked(&t->sighand->siglock);
 
 	/* Short-circuit ignored signals.  */
@@ -1384,8 +1383,7 @@ send_group_sigqueue(int sig, struct sigq
 		 * the overrun count.  Other uses should not try to
 		 * send the signal multiple times.
 		 */
-		if (q->info.si_code != SI_TIMER)
-			BUG();
+		BUG_ON(q->info.si_code != SI_TIMER);
 		q->info.si_overrun++;
 		goto out;
 	} 
diff --git a/kernel/time.c b/kernel/time.c
index ff8e701..b00ddc7 100644
--- a/kernel/time.c
+++ b/kernel/time.c
@@ -410,7 +410,7 @@ EXPORT_SYMBOL(current_kernel_time);
  * current_fs_time - Return FS time
  * @sb: Superblock.
  *
- * Return the current time truncated to the time granuality supported by
+ * Return the current time truncated to the time granularity supported by
  * the fs.
  */
 struct timespec current_fs_time(struct super_block *sb)
@@ -421,11 +421,11 @@ struct timespec current_fs_time(struct s
 EXPORT_SYMBOL(current_fs_time);
 
 /**
- * timespec_trunc - Truncate timespec to a granuality
+ * timespec_trunc - Truncate timespec to a granularity
  * @t: Timespec
- * @gran: Granuality in ns.
+ * @gran: Granularity in ns.
  *
- * Truncate a timespec to a granuality. gran must be smaller than a second.
+ * Truncate a timespec to a granularity. gran must be smaller than a second.
  * Always rounds down.
  *
  * This function should be only used for timestamps returned by
diff --git a/kernel/timer.c b/kernel/timer.c
index 6b812c0..c3a874f 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -1479,8 +1479,7 @@ register_time_interpolator(struct time_i
 	unsigned long flags;
 
 	/* Sanity check */
-	if (ti->frequency == 0 || ti->mask == 0)
-		BUG();
+	BUG_ON(ti->frequency == 0 || ti->mask == 0);
 
 	ti->nsec_per_cyc = ((u64)NSEC_PER_SEC << ti->shift) / ti->frequency;
 	spin_lock(&time_interpolator_lock);
diff --git a/mm/highmem.c b/mm/highmem.c
index 55885f6..9b274fd 100644
--- a/mm/highmem.c
+++ b/mm/highmem.c
@@ -74,8 +74,7 @@ static void flush_all_zero_pkmaps(void)
 		pkmap_count[i] = 0;
 
 		/* sanity check */
-		if (pte_none(pkmap_page_table[i]))
-			BUG();
+		BUG_ON(pte_none(pkmap_page_table[i]));
 
 		/*
 		 * Don't need an atomic fetch-and-clear op here;
@@ -158,8 +157,7 @@ void fastcall *kmap_high(struct page *pa
 	if (!vaddr)
 		vaddr = map_new_virtual(page);
 	pkmap_count[PKMAP_NR(vaddr)]++;
-	if (pkmap_count[PKMAP_NR(vaddr)] < 2)
-		BUG();
+	BUG_ON(pkmap_count[PKMAP_NR(vaddr)] < 2);
 	spin_unlock(&kmap_lock);
 	return (void*) vaddr;
 }
@@ -174,8 +172,7 @@ void fastcall kunmap_high(struct page *p
 
 	spin_lock(&kmap_lock);
 	vaddr = (unsigned long)page_address(page);
-	if (!vaddr)
-		BUG();
+	BUG_ON(!vaddr);
 	nr = PKMAP_NR(vaddr);
 
 	/*
@@ -220,8 +217,7 @@ static __init int init_emergency_pool(vo
 		return 0;
 
 	page_pool = mempool_create_page_pool(POOL_SIZE, 0);
-	if (!page_pool)
-		BUG();
+	BUG_ON(!page_pool);
 	printk("highmem bounce pool size: %d pages\n", POOL_SIZE);
 
 	return 0;
@@ -264,8 +260,7 @@ int init_emergency_isa_pool(void)
 
 	isa_page_pool = mempool_create(ISA_POOL_SIZE, mempool_alloc_pages_isa,
 				       mempool_free_pages, (void *) 0);
-	if (!isa_page_pool)
-		BUG();
+	BUG_ON(!isa_page_pool);
 
 	printk("isa bounce pool size: %d pages\n", ISA_POOL_SIZE);
 	return 0;
diff --git a/mm/mmap.c b/mm/mmap.c
index 4f5b570..e780d19 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -294,8 +294,7 @@ void validate_mm(struct mm_struct *mm)
 	i = browse_rb(&mm->mm_rb);
 	if (i != mm->map_count)
 		printk("map_count %d rb %d\n", mm->map_count, i), bug = 1;
-	if (bug)
-		BUG();
+	BUG_ON(bug);
 }
 #else
 #define validate_mm(mm) do { } while (0)
@@ -432,8 +431,7 @@ __insert_vm_struct(struct mm_struct * mm
 	struct rb_node ** rb_link, * rb_parent;
 
 	__vma = find_vma_prepare(mm, vma->vm_start,&prev, &rb_link, &rb_parent);
-	if (__vma && __vma->vm_start < vma->vm_end)
-		BUG();
+	BUG_ON(__vma && __vma->vm_start < vma->vm_end);
 	__vma_link(mm, vma, prev, rb_link, rb_parent);
 	mm->map_count++;
 }
@@ -813,8 +811,7 @@ try_prev:
 	 * (e.g. stash info in next's anon_vma_node when assigning
 	 * an anon_vma, or when trying vma_merge).  Another time.
 	 */
-	if (find_vma_prev(vma->vm_mm, vma->vm_start, &near) != vma)
-		BUG();
+	BUG_ON(find_vma_prev(vma->vm_mm, vma->vm_start, &near) != vma);
 	if (!near)
 		goto none;
 
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 893d767..6dcce3a 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -258,7 +258,7 @@ static void balance_dirty_pages(struct a
 /**
  * balance_dirty_pages_ratelimited_nr - balance dirty memory state
  * @mapping: address_space which was dirtied
- * @nr_pages: number of pages which the caller has just dirtied
+ * @nr_pages_dirtied: number of pages which the caller has just dirtied
  *
  * Processes which are dirtying memory should call in here once for each page
  * which was newly dirtied.  The function will periodically check the system's
diff --git a/mm/slab.c b/mm/slab.c
index 4cbf8bb..f055c14 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1297,8 +1297,7 @@ void __init kmem_cache_init(void)
 		if (cache_cache.num)
 			break;
 	}
-	if (!cache_cache.num)
-		BUG();
+	BUG_ON(!cache_cache.num);
 	cache_cache.gfporder = order;
 	cache_cache.colour = left_over / cache_cache.colour_off;
 	cache_cache.slab_size = ALIGN(cache_cache.num * sizeof(kmem_bufctl_t) +
@@ -1974,8 +1973,7 @@ kmem_cache_create (const char *name, siz
 	 * Always checks flags, a caller might be expecting debug support which
 	 * isn't available.
 	 */
-	if (flags & ~CREATE_MASK)
-		BUG();
+	BUG_ON(flags & ~CREATE_MASK);
 
 	/*
 	 * Check that size is in terms of words.  This is needed to avoid
@@ -2206,8 +2204,7 @@ static int __node_shrink(struct kmem_cac
 
 		slabp = list_entry(l3->slabs_free.prev, struct slab, list);
 #if DEBUG
-		if (slabp->inuse)
-			BUG();
+		BUG_ON(slabp->inuse);
 #endif
 		list_del(&slabp->list);
 
@@ -2248,8 +2245,7 @@ static int __cache_shrink(struct kmem_ca
  */
 int kmem_cache_shrink(struct kmem_cache *cachep)
 {
-	if (!cachep || in_interrupt())
-		BUG();
+	BUG_ON(!cachep || in_interrupt());
 
 	return __cache_shrink(cachep);
 }
@@ -2277,8 +2273,7 @@ int kmem_cache_destroy(struct kmem_cache
 	int i;
 	struct kmem_list3 *l3;
 
-	if (!cachep || in_interrupt())
-		BUG();
+	BUG_ON(!cachep || in_interrupt());
 
 	/* Don't let CPUs to come and go */
 	lock_cpu_hotplug();
@@ -2477,8 +2472,7 @@ static int cache_grow(struct kmem_cache 
 	 * Be lazy and only check for valid flags here,  keeping it out of the
 	 * critical path in kmem_cache_alloc().
 	 */
-	if (flags & ~(SLAB_DMA | SLAB_LEVEL_MASK | SLAB_NO_GROW))
-		BUG();
+	BUG_ON(flags & ~(SLAB_DMA | SLAB_LEVEL_MASK | SLAB_NO_GROW));
 	if (flags & SLAB_NO_GROW)
 		return 0;
 
diff --git a/mm/swap_state.c b/mm/swap_state.c
index d7af296..e0e1583 100644
--- a/mm/swap_state.c
+++ b/mm/swap_state.c
@@ -148,8 +148,7 @@ int add_to_swap(struct page * page, gfp_
 	swp_entry_t entry;
 	int err;
 
-	if (!PageLocked(page))
-		BUG();
+	BUG_ON(!PageLocked(page));
 
 	for (;;) {
 		entry = get_swap_page();
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 729eb3e..c0504f1 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -321,8 +321,7 @@ void __vunmap(void *addr, int deallocate
 		int i;
 
 		for (i = 0; i < area->nr_pages; i++) {
-			if (unlikely(!area->pages[i]))
-				BUG();
+			BUG_ON(!area->pages[i]);
 			__free_page(area->pages[i]);
 		}
 


^ permalink raw reply related

* Re: [PATCH 09/10] Enable clustering and large transfers
From: Kai Makisara @ 2006-04-02 14:18 UTC (permalink / raw)
  To: Douglas Gilbert; +Cc: Matthew Wilcox, linux-scsi, Jens Axboe
In-Reply-To: <442EE0F0.7000102@torque.net>

On Sat, 1 Apr 2006, Douglas Gilbert wrote:

> Kai Makisara wrote:
> > On Tue, 28 Mar 2006, Matthew Wilcox wrote:
> > 
> > 
> >>This patch enables clustering and sets max_sectors to 0xffff to enable
> >>reading and writing of large blocks with tapes (and large transfers with
> >>sg). This change is needed after the sg and st drivers started using
> >>chained bios through scsi_request_async() in 2.6.16.
> >>
> >>Signed-off-by: Kai Makisara <kai.makisara@kolumbus.fi>
> >>Signed-off-by: Matthew Wilcox <matthew@wil.cx>
> >>
> >>---
> >>
> >> drivers/scsi/sym53c8xx_2/sym_glue.c |    3 ++-
> >> 1 files changed, 2 insertions(+), 1 deletions(-)
> >>
> >>1c573ec4648b4b4ddadcbd1945a9a608977df513
> >>diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c
> >>index e48409e..2c4e5f1 100644
> >>--- a/drivers/scsi/sym53c8xx_2/sym_glue.c
> >>+++ b/drivers/scsi/sym53c8xx_2/sym_glue.c
> >>@@ -1870,7 +1870,8 @@ static struct scsi_host_template sym2_te
> >> 	.eh_bus_reset_handler	= sym53c8xx_eh_bus_reset_handler,
> >> 	.eh_host_reset_handler	= sym53c8xx_eh_host_reset_handler,
> >> 	.this_id		= 7,
> >>-	.use_clustering		= DISABLE_CLUSTERING,
> >>+	.use_clustering		= ENABLE_CLUSTERING,
> >>+	.max_sectors		= 0xFFFF,
> >> #ifdef SYM_LINUX_PROC_INFO_SUPPORT
> >> 	.proc_info		= sym53c8xx_proc_info,
> >> 	.proc_name		= NAME53C8XX,
> >>
...
> Kai + Matthew,
> In my testing with lk 2.6.16 the 16 MB boundary is a
> hard limit, after several other things are tweaked.
> 
> The sym53c8xx driver won't even come close due to:
>   #define SYM_CONF_MAX_SG             (96)
>  ...
>   instance->sg_tablesize  = SYM_CONF_MAX_SG;
> 
I was able to read 65535 blocks (32 MB - 512 B) for each SCSI command from 
my disk using the sym53c8xx_2 driver and SG_IO through the sg driverv. I 
did not change SYM_CONF_MAX but I did add

	blk_queue_max_segment_size(sdev->request_queue, 256 * 1024);

to sym53c8xx_slave_configure to increase the maximum segment size for the 
queue. Did you do also this?

> I assume that the st driver (like sg) limits on .sg_tablesize .
> Matthew, if you change this please set it at 256 (not SG_ALL
> which is 255).
> 
> I have attempted to capture the current (overly complex)
> constraints on maximum transfer size at:
> http://www.torque.net/sg/sg_io.html
> in the section on "Maximum transfer size per command".
> 
The maximum segments size limitation is mentioned on your page. Maybe you 
emphasize that without changing this you can't get beyond 16 MB with only 
128 segments.

-- 
Kai

^ permalink raw reply

* [ALSA - driver 0001987]: Upmix Feature Request
From: bugtrack @ 2006-04-02 14:26 UTC (permalink / raw)
  To: alsa-devel


A NOTE has been added to this issue.
======================================================================
<https://bugtrack.alsa-project.org/alsa-bug/view.php?id=1987> 
======================================================================
Reported By:                the-me
Assigned To:                
======================================================================
Project:                    ALSA - driver
Issue ID:                   1987
Category:                   CORE - control
Reproducibility:            always
Severity:                   feature
Priority:                   normal
Status:                     feedback
Distribution:               Debian
Kernel Version:             2.6.16.1
======================================================================
Date Submitted:             03-31-2006 20:38 CEST
Last Modified:              04-02-2006 16:26 CEST
======================================================================
Summary:                    Upmix Feature Request
Description: 
Hi,

I, and many users more, want a feature at the alsamixer, called Upmix.
I've got an Terratec Aureon 5.1 Fun and I tried many things, but it's not
able, that I can hear an mp3 with upmixed 5.1 sound. Here is my actual
.asoundrc:

pcm.ch51upmix {
        type route
        slave.pcm surround51
        slave.channels 6
        ttable.0.0 1
        ttable.1.1 1
        ttable.0.2 1
        ttable.1.3 1
        ttable.0.4 0.5
        ttable.1.4 0.5
        ttable.0.5 0.5
        ttable.1.5 0.5
}
pcm.!default
{
        type plug
        slave.pcm ch51upmix
}
pcm.lowpass {
type ladspa
path "/usr/lib/ladspa"
plugins [ {
label lpf
input {
controls [ 50 ]
}
} ]
}


With this .asoundrc, all speakers work, but my subwoofer doesn't play only
low frequen...

Can you please add such a feature?


Greetz, Patrick
======================================================================

----------------------------------------------------------------------
 the-me - 04-02-06 14:57 
----------------------------------------------------------------------
it's working, but I haven't got an USB audio card, its an pci card.

----------------------------------------------------------------------
 Raymond - 04-02-06 16:26 
----------------------------------------------------------------------
the lowpass filter with 50Hz cutoff seem unable to filter the human voice,
I still see peaks above 125Hz on the 10-bands graphic equalizer of
au8830.



aplay -v -Dplug:lowpass test.wav
Playing WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz,
Stereo
Plug PCM: Linear Integer <-> Linear Float conversion PCM (FLOAT_LE)
Its setup is:
  stream       : PLAYBACK
  access       : RW_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 44100
  exact rate   : 44100 (44100/1)
  msbits       : 16
  buffer_size  : 16384
  period_size  : 1024
  period_time  : 23219
  tick_time    : 10000
  tstamp_mode  : NONE
  period_step  : 1
  sleep_min    : 0
  avail_min    : 1024
  xfer_align   : 1024
  start_threshold  : 16384
  stop_threshold   : 16384
  silence_threshold: 0
  silence_size : 0
  boundary     : 1073741824
Slave: LADSPA PCM
  Playback:
    Policy: duplicate
    Filename: /usr/local/lib/ladspa/filter.so
    Plugin Name: Simple Low Pass Filter
    Plugin Label: lpf
    Plugin Unique ID: 1041
    Instances:
      Depth: 0
         InChannels: 0
         InPorts: 1 "Input"
         OutChannels: 0
         OutPorts: 2 "Output"
      Depth: 0
         InChannels: 1
         InPorts: 1 "Input"
         OutChannels: 1
         OutPorts: 2 "Output"
    Control input port initial values:
      0 "Cutoff Frequency (Hz)" = 50.00000000
  Capture:
Its setup is:
  stream       : PLAYBACK
  access       : MMAP_NONINTERLEAVED
  format       : FLOAT_LE
  subformat    : STD
  channels     : 2
  rate         : 44100
  exact rate   : 44100 (44100/1)
  msbits       : 32
  buffer_size  : 16384
  period_size  : 1024
  period_time  : 23219
  tick_time    : 10000
  tstamp_mode  : NONE
  period_step  : 1
  sleep_min    : 0
  avail_min    : 1024
  xfer_align   : 1024
  start_threshold  : 16384
  stop_threshold   : 16384
  silence_threshold: 0
  silence_size : 0
  boundary     : 1073741824
Slave: Plug PCM: Linear Integer <-> Linear Float conversion PCM (S16_LE)
Its setup is:
  stream       : PLAYBACK
  access       : MMAP_NONINTERLEAVED
  format       : FLOAT_LE
  subformat    : STD
  channels     : 2
  rate         : 44100
  exact rate   : 44100 (44100/1)
  msbits       : 32
  buffer_size  : 16384
  period_size  : 1024
  period_time  : 23219
  tick_time    : 10000
  tstamp_mode  : NONE
  period_step  : 1
  sleep_min    : 0
  avail_min    : 1024
  xfer_align   : 1024
  start_threshold  : 16384
  stop_threshold   : 16384
  silence_threshold: 0
  silence_size : 0
  boundary     : 1073741824
Slave: Hardware PCM card 0 'au8830' device 0 subdevice 0
Its setup is:
  stream       : PLAYBACK
  access       : MMAP_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 44100
  exact rate   : 44100 (44100/1)
  msbits       : 16
  buffer_size  : 16384
  period_size  : 1024
  period_time  : 23219
  tick_time    : 10000
  tstamp_mode  : NONE
  period_step  : 1
  sleep_min    : 0
  avail_min    : 1024
  xfer_align   : 1024
  start_threshold  : 16384
  stop_threshold   : 16384
  silence_threshold: 0
  silence_size : 0
  boundary     : 1073741824

Issue History
Date Modified  Username       Field                    Change              
======================================================================
03-31-06 20:38 the-me         New Issue                                    
03-31-06 20:38 the-me         Distribution              => Debian          
03-31-06 20:38 the-me         Kernel Version            => 2.6.16.1        
03-31-06 20:40 the-me         Note Added: 0009048                          
03-31-06 21:02 rlrevell       Status                   new => closed       
03-31-06 21:02 rlrevell       Note Added: 0009049                          
03-31-06 21:15 the-me         Status                   closed => feedback  
03-31-06 21:15 the-me         Resolution               open => reopened    
03-31-06 21:15 the-me         Note Added: 0009050                          
04-01-06 01:03 Raymond        Note Added: 0009052                          
04-01-06 10:39 the-me         Note Added: 0009053                          
04-02-06 10:42 Raymond        Note Added: 0009059                          
04-02-06 11:44 the-me         Note Added: 0009060                          
04-02-06 14:36 Raymond        Note Added: 0009061                          
04-02-06 14:57 the-me         Note Added: 0009062                          
04-02-06 16:26 Raymond        Note Added: 0009063                          
======================================================================




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

^ permalink raw reply

* stack backtrace
From: Fuxin Zhang @ 2006-04-02 14:38 UTC (permalink / raw)
  To: Linux/MIPS Development

hi Ralf,

    The dwarf unwinding code is too complex and I have no time to port
it. And I doubt it will be important enough to deserve the space costs,
the -gdwarf-2 kernel is more than 20MB.

    Instead for my need I just hack up a simple version of way 1, with
frame pointer kept on: CONFIG_FRAME_POINTER.

BTW:It seems nobody use this option for MIPS? Is it dangerous? The size
and performance overhead should be barable at most time for debugging?

here is the code patch(just for reference), it depends on
CONFIG_KALLSYMS too.


--- traps.c.orig	2006-04-02 21:39:01.000000000 +0800
+++ traps.c	2006-04-02 22:38:03.000000000 +0800
@@ -116,8 +116,129 @@
 	printk("\n");
 }

-void show_trace(struct task_struct *task, unsigned long *stack)
+#include <asm/inst.h>
+
+static struct mips_frame_info {
+	void *func;
+	int omit_fp;	/* compiled without fno-omit-frame-pointer */
+	int frame_offset;
+	int pc_offset;
+} tmp_frame;
+
+static int get_frame_info(void *func,struct mips_frame_info *info)
+{
+	int i;
+	union mips_instruction *ip = (union mips_instruction *)func;
+	info->pc_offset = -1;
+	info->frame_offset = -1;
+	for (i = 0; i < 128; i++, ip++) {
+		/* if jal, jalr, jr, stop. */
+		if (ip->j_format.opcode == jal_op ||
+		    (ip->r_format.opcode == spec_op &&
+		     (ip->r_format.func == jalr_op ||
+		      ip->r_format.func == jr_op)))
+			break;
+
+		if (
+#ifdef CONFIG_32BIT
+		    ip->i_format.opcode == sw_op &&
+#endif
+#ifdef CONFIG_64BIT
+		    ip->i_format.opcode == sd_op &&
+#endif
+		    ip->i_format.rs == 29)
+		{
+			/* sw / sd $ra, offset($sp) */
+			if (ip->i_format.rt == 31) {
+				if (info->pc_offset != -1)
+					continue;
+				info->pc_offset =
+					ip->i_format.simmediate / sizeof(long);
+			}
+			/* sw / sd $s8, offset($sp) */
+			if (ip->i_format.rt == 30) {
+//#if 0	/* gcc 3.4 does aggressive optimization... */
+				if (info->frame_offset != -1)
+					continue;
+//#endif
+				info->frame_offset =
+					ip->i_format.simmediate / sizeof(long);
+			}
+		}
+	}
+	if (info->pc_offset == -1 || info->frame_offset == -1) {
+		printk("Can't analyze prologue code at %p\n", func);
+		info->pc_offset = -1;
+		info->frame_offset = -1;
+		return -1;
+	}
+
+	return 0;
+}
+
+static void show_trace(struct task_struct *task, void *regs_in)
 {
+	unsigned long prev_sp,stack_top;
+	unsigned long count = 0;
+	unsigned long frame, pc;
+	char namebuf[KSYM_NAME_LEN+1];
+	const char *name;
+	char *modname;
+	unsigned long size,offset;
+	struct pt_regs *regs;
+	int in_exception = 0;
+
+	if (regs_in) /* called from show_registers */
+	  regs = (struct pt_regs*) regs_in;
+	else
+	  regs = (struct pt_regs *) ((unsigned long) task->thread_info +
+	      THREAD_SIZE - 32 - sizeof(struct pt_regs));
+
+	printk("Call Trace:\n");
+
+	prev_sp = (unsigned long) (task->thread_info + 1);
+	stack_top = (unsigned long) task->thread_info + THREAD_SIZE;
+
+	pc = (unsigned long)show_trace;
+
+	if (get_frame_info((void*)pc,&tmp_frame))
+	  return;
+
+	__asm__ volatile ("addu %0,$0,$30" : "=r" (frame));
+
+	do {
+		pc = ((unsigned long *)frame)[tmp_frame.pc_offset];
+		frame = ((unsigned long *)frame)[tmp_frame.frame_offset];
+		if (frame < prev_sp || frame > stack_top) {
+		  printk("out of range sp %08lx,give up!\n",frame);
+		  break;
+		}
+
+	    retry_pc:
+		if (!__kernel_text_address(pc)) {
+		  printk("out of text addr %08lx,give up!\n",pc);
+		  break;
+		}
+
+		name = kallsyms_lookup(pc, &size, &offset, &modname, namebuf);
+		if (!name) {
+		  printk("no function found at %08lx\n",pc);
+		  return;
+		}
+		printk("%s at %08lx,frame=%08lx",name,pc,frame);
+
+		pc = pc - offset;
+		if (get_frame_info((void*)pc,&tmp_frame) && !in_exception) {
+		  printk("get frame information failed, assume exceptions\n");
+		  in_exception = 1;
+		  pc = regs->cp0_epc;
+		  frame = regs->regs[30];
+		  printk("epc = %08lx,frame=%08lx\n",pc,frame);
+		  goto retry_pc;
+		}
+	} while (count++ < 16);
+
+#if 0
 	const int field = 2 * sizeof(unsigned long);
 	unsigned long addr;

@@ -140,6 +261,7 @@
 		}
 	}
 	printk("\n");
+#endif
 }

 /*
@@ -147,9 +269,10 @@
  */
 void dump_stack(void)
 {
-	unsigned long stack;
+	//unsigned long stack;

-	show_trace(current, &stack);
+	//show_trace(current, &stack);
+	show_trace(current, NULL);
 }

 EXPORT_SYMBOL(dump_stack);
@@ -269,7 +392,8 @@
 	printk("Process %s (pid: %d, threadinfo=%p, task=%p)\n",
 	        current->comm, current->pid, current_thread_info(), current);
 	show_stack(current, (long *) regs->regs[29]);
-	show_trace(current, (long *) regs->regs[29]);
+	//show_trace(current, (long *) regs->regs[29]);
+	show_trace(current,(void*) regs);
 	show_code((unsigned int *) regs->cp0_epc);
 	printk("\n");
 }



--- process.c.orig	2006-04-02 21:38:51.000000000 +0800
+++ process.c	2006-03-23 22:56:46.000000000 +0800
@@ -314,6 +314,9 @@
 	int i;
 	void *func = info->func;
 	union mips_instruction *ip = (union mips_instruction *)func;
+#ifdef CONFIG_FRAME_POINTER
+	info->omit_fp = 0;
+#endif
 	info->pc_offset = -1;
 	info->frame_offset = info->omit_fp ? 0 : -1;
 	for (i = 0; i < 128; i++, ip++) {

^ permalink raw reply

* Re: [parisc-linux] Strange newest LAB msg?
From: Joel Soete @ 2006-04-02 14:29 UTC (permalink / raw)
  To: Helge Deller; +Cc: parisc-linux
In-Reply-To: <200604021515.04424.deller@gmx.de>



Helge Deller wrote:
> On Sunday 02 April 2006 13:18, Joel Soete wrote:
> 
[snip]
> 
>>EXT3-fs: mounted filesystem with ordered data mode.
>>VFS: Mounted root (ext3 filesystem) readonly.
>>Freeing unused kernel memory: Badness in smp_call_function at /usr/src/linux-2.6.16.1-pa10/arch/parisc/kernel/smp.c:348
>>Backtrace:
>>  [<0000000010112900>] dump_stack+0x18/0x28
>>  [<000000001011d9b4>] smp_call_function+0x37c/0x3c0
>>  [<0000000010111c5c>] flush_data_cache+0x2c/0x48
>>  [<00000000101109a8>] free_initmem+0x68/0x2f8
>>  [<000000001010fb20>] init+0x858/0x8c8
>>  [<000000001010347c>] ret_from_kernel_
>>(this latest 'Badness in smp_call_function ...' was there but seems to be harmless and the boot continue without showing any more 
>>IOREMAP info ;-) )
> 
> 
> WHAT'S THAT ?
> Do we have some __init too much ?
     337 smp_call_function (void (*func) (void *info), void *info, int retry, int wait)
     338 {
     339         struct smp_call_struct data;
     340         unsigned long timeout;
     341         static DEFINE_SPINLOCK(lock);
     342         int retries = 0;
     343
     344         if (num_online_cpus() < 2)
     345                 return 0;
     346
     347         /* Can deadlock when called with interrupts disabled */
     348         WARN_ON(irqs_disabled());
     349

> I never tested SMP.
> 
No pb ;-)

> 
> 
>>PS: btw, rm CONFIG_DETECT_SOFTLOCKUP in the config doesn't help on this system ;<(:
>>still hanging (this time without Softlockup msg) after only:
>>top - 09:04:58 up 1 day, 16:26,  3 users,  load average: 2.40, 2.26, 2.20
> 
> 
> I think the softlockups don't really matter.
> Does your box hangs without SMP as well ?
> 
well it did with b2k and n4k runing 64bit kernel with CONFIG_DETECT_SOFTLOCKUP=y && # CONFIG_SMP is not set

but I need to verify now without CONFIG_DETECT_SOFTLOCKUP.
(sorry I couldn't do it now but tomorrow morming; ok?

Thanks,
	Joel

^ permalink raw reply

* Re: [ck] Re: 2.6.16-ck3
From: Nick Piggin @ 2006-04-02  9:51 UTC (permalink / raw)
  To: Con Kolivas; +Cc: ck, Andrew Morton, linux list
In-Reply-To: <200604021939.21729.kernel@kolivas.org>

Con Kolivas wrote:

> Ok I can't see what I'm doing wrong.
> 
> here are my watermarks
> 
> idx = zone_idx(z);
> ns->lowfree[idx] = z->pages_high * 3 + z->lowmem_reserve[idx];
> ns->highfree[idx] = ns->lowfree[idx] + z->pages_high;
> 
> It's (3 * pages_high) +lowmem_reserve which is well in excess of the reserve 
> so I can't see any problem. Am I missing something?
> 

That zone->lowmem_reserve[zone_idx(zone)] == 0 ?

;)

lowmem_reserve could be much bigger than zone->high*3, when higher
zones are much larger.

-- 
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com 

^ permalink raw reply

* yaboot load address
From: Ingmar @ 2006-04-02 13:43 UTC (permalink / raw)
  To: linuxppc-dev

Hi,

I have a issue with the load address of the yaboot loader, I need it to be
loaded higher in memory than 2MB, at about 10MB. Recompiling the yaboot loader
is no problem, but I need to get into the part of code that calls (and loads)
the yaboot program. Editing the ofboot file, (forth script) does not
(completely?) solve the problem. Updates to the ToolBox ROM image have to be
made to?

Any ideas on steps I need to make to (recompile?) edit the tbxi file to let it
load yaboot at another address?


Ingmar

^ permalink raw reply

* xen2 system crashing: Badness in br_fdb_cleanup at net/bridge/br_fdb.c:140
From: Hans-Christian Armingeon @ 2006-04-02 14:33 UTC (permalink / raw)
  To: xen-devel; +Cc: xen-users

Hi There,

I am having serious troubles with one of my servers.

I installed ubuntu 5.10 on a second partition.

And after that, I booted the old system.

Now I am having these errors. They appear 3 minutes after reboot.

This system has to be working on monday, so I'm in great pain.

Many thanks in advance,

Johnny

Badness in br_fdb_cleanup at net/bridge/br_fdb.c:140
 [<c8a5d49e>] br_fdb_cleanup+0xfe/0x130 [bridge]
 [<c0123b61>] run_timer_softirq+0xf1/0x220
 [<c0138470>] handle_IRQ_event+0x40/0x90
 [<c8a5d3a0>] br_fdb_cleanup+0x0/0x130 [bridge]
 [<c011f595>] __do_softirq+0x95/0xb0
 [<c011f5f5>] do_softirq+0x45/0x50
 [<c011f6c5>] irq_exit+0x35/0x40
 [<c010ec3e>] do_IRQ+0x1e/0x30
 [<c0105e7d>] evtchn_do_upcall+0x6d/0x90
 [<c0109423>] hypervisor_callback+0x37/0x40
 [<c0106f59>] xen_idle+0x29/0x50
 [<c0106fba>] cpu_idle+0x3a/0x50
 [<c0542740>] start_kernel+0x180/0x1d0
 [<c0542300>] unknown_bootoption+0x0/0x1b0
Badness in br_fdb_cleanup at net/bridge/br_fdb.c:140
 [<c8a5d49e>] br_fdb_cleanup+0xfe/0x130 [bridge]
 [<c0123b61>] run_timer_softirq+0xf1/0x220
 [<c0138470>] handle_IRQ_event+0x40/0x90
 [<c8a5d3a0>] br_fdb_cleanup+0x0/0x130 [bridge]
 [<c011f595>] __do_softirq+0x95/0xb0
 [<c011f5f5>] do_softirq+0x45/0x50
 [<c011f6c5>] irq_exit+0x35/0x40
 [<c010ec3e>] do_IRQ+0x1e/0x30
 [<c0105e7d>] evtchn_do_upcall+0x6d/0x90
 [<c0109423>] hypervisor_callback+0x37/0x40
 [<c0106f59>] xen_idle+0x29/0x50
 [<c0106fba>] cpu_idle+0x3a/0x50
 [<c0542740>] start_kernel+0x180/0x1d0
 [<c0542300>] unknown_bootoption+0x0/0x1b0
Unable to handle kernel paging request at virtual address 00200200
 printing eip:
c8a5d415
*pde = ma 00000000 pa 55555000
 [<c0123b61>] run_timer_softirq+0xf1/0x220
 [<c0138470>] handle_IRQ_event+0x40/0x90
 [<c8a5d3a0>] br_fdb_cleanup+0x0/0x130 [bridge]
 [<c011f595>] __do_softirq+0x95/0xb0
 [<c011f5f5>] do_softirq+0x45/0x50
 [<c011f6c5>] irq_exit+0x35/0x40
 [<c010ec3e>] do_IRQ+0x1e/0x30
 [<c0105e7d>] evtchn_do_upcall+0x6d/0x90
 [<c0109423>] hypervisor_callback+0x37/0x40
 [<c0106f59>] xen_idle+0x29/0x50
 [<c0106fba>] cpu_idle+0x3a/0x50
 [<c0542740>] start_kernel+0x180/0x1d0
 [<c0542300>] unknown_bootoption+0x0/0x1b0
Oops: 0002 [#1]
PREEMPT
Modules linked in: bridge atm fcdslusb2 capi capifs ipv6 tsdev evdev fcpci kernelcapi i2c_amd756 i2c_amd8111 pci_hotplug ohci_hcd usbcore aic79xx sata_sil libata w83781d i2c_sensor i2c_isa i2c_core e100 mii tg3
CPU:    0
EIP:    0061:[<c8a5d415>]    Tainted: P      VLI
EFLAGS: 00211246   (2.6.11.12-xen0)
EIP is at br_fdb_cleanup+0x75/0x130 [bridge]
eax: 00000000   ebx: c3a5144c   ecx: c04b04d8   edx: 00200200
esi: c3a51440   edi: c6227b04   ebp: c3ac7e88   esp: c0541f00
ds: 007b   es: 007b   ss: 0069
Process swapper (pid: 0, threadinfo=c0540000 task=c04aaea0)
Stack: c8a63f11 c8a63e09 c8a63efd 0000008c 00007530 c764f000 c0540000 00000101
       c3ac7a20 c0540000 c0123b61 c3ac7a20 c0138470 00000082 00000000 c8a5d3a0
       c8b443b8 c6e9d0ac c0540000 00000001 c058ab28 0000000a fbffc000 c011f595
Call Trace:
 [<c0123b61>] run_timer_softirq+0xf1/0x220
 [<c0138470>] handle_IRQ_event+0x40/0x90
 [<c8a5d3a0>] br_fdb_cleanup+0x0/0x130 [bridge]
 [<c011f595>] __do_softirq+0x95/0xb0
 [<c011f5f5>] do_softirq+0x45/0x50
 [<c011f6c5>] irq_exit+0x35/0x40
 [<c010ec3e>] do_IRQ+0x1e/0x30
 [<c0105e7d>] evtchn_do_upcall+0x6d/0x90
 [<c0109423>] hypervisor_callback+0x37/0x40
 [<c0106f59>] xen_idle+0x29/0x50
 [<c0106fba>] cpu_idle+0x3a/0x50
 [<c0542740>] start_kernel+0x180/0x1d0
 [<c0542300>] unknown_bootoption+0x0/0x1b0
Code: 65 90 8d 74 26 00 8d 73 f4 8b 54 24 10 a1 60 e0 4a c0 03 56 18 39 d0 0f 88 9c 00 00 00 80 7e 23 00 75 68 8b 43 f4 8b 56 04 85 c0 <89> 02 74 03 89 50 04 80 7e 23 00 c7 46 04 00 02 20 00 75 17 8b
 <0>Kernel panic - not syncing: Fatal exception in interrupt
 (XEN) Domain 0 shutdown: rebooting machine.
(XEN) Reboot disabled on cmdline: require manual reset


-- 
jabber:johnny@wh-netz.de
icq:236971856

^ permalink raw reply

* Re: [PATCHSET] libata: improve ata_bus_probe failure handling, take 2
From: Jeff Garzik @ 2006-04-02 14:35 UTC (permalink / raw)
  To: Tejun Heo, Albert Lee; +Cc: alan, linux-ide
In-Reply-To: <11439680863256-git-send-email-htejun@gmail.com>

Applied both series to #upstream.

Albert, please check the irq-pio branch and make sure my merge is correct.

	Jeff




^ permalink raw reply

* Re: [PATCH 1/1] POWERPC: Fix ppc32 compile with gcc+SSP in 2.6.16
From: John Mylchreest @ 2006-04-02 14:35 UTC (permalink / raw)
  To: Olaf Hering; +Cc: Arjan van de Ven, linux-kernel, stable, paulus
In-Reply-To: <20060402140129.GA31403@suse.de>

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

On Sun, Apr 02, 2006 at 04:01:29PM +0200, Olaf Hering <olh@suse.de> wrote:
>  On Sun, Apr 02, John Mylchreest wrote:
> 
> > It gets turned on elsewhere (gcc spec), but principle for me is that if its
> > enabled it still leaks and breaks this code. At the moment (following
> > from existing patches you put to this list) this mix will break until we
> > get stack-protector ported.
> 
> There are so many ebuild files which turn off random gcc options without
> fixing the real bug in the compiler. Just add one more to the
> kernel.ebuild or whatever its called.

That's just showing the ignorance to how kernel-sources are hendled from
within gentoo (but this isnt gentoo specific anyways. Its relative to
the gcc spec file were using). Once I get a little time this afternoon I
will look at a cleaner fix.

-- 
Role:            Gentoo Linux Kernel Lead
Gentoo Linux:    http://www.gentoo.org
Public Key:      gpg --recv-keys 9C745515
Key fingerprint: A0AF F3C8 D699 A05A EC5C  24F7 95AA 241D 9C74 5515


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

^ permalink raw reply

* Re: Hang in uart_block_til_ready()
From: Russell King @ 2006-04-02 14:38 UTC (permalink / raw)
  To: Michael Hanselmann; +Cc: linux-serial
In-Reply-To: <20060402135138.GC2954@hansmi.ch>

On Sun, Apr 02, 2006 at 03:51:38PM +0200, Michael Hanselmann wrote:
> I've discovered a problem where I'm not sure wether it's an error in the
> kernel or in the hardware.

It's neither - it's a bug in your test program.  If you want "callout"
semantics, open the port using O_NONBLOCK mode.

If you don't open the port using O_NONBLOCK then the port will wait for
the DCD line (or virtual DCD line) to be asserted by the hardware before
exiting uart_block_til_ready().  This is used for gettys on UARTs so
they don't display the login banner until someone connects to the port.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core

^ permalink raw reply

* Re: [PATCH] Add prctl to change endian of a task
From: Ingo Oeser @ 2006-04-02 14:37 UTC (permalink / raw)
  To: Anton Blanchard; +Cc: linux-kernel, Andrew Morton
In-Reply-To: <20060401222921.GI23416@krispykreme>

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

Hi Anton,

On Sunday, 2. April 2006 00:29, you wrote:
> Add a prctl to change a tasks endian. While we only have powerpc code to
> implement this so far, it seems like something that warrants a generic
> interface (like setting floating point mode bits).

Most programmers (and thus programs) expect this to be a compile time 
decision.

What are the reasons of allowing to change it so dynamic at all?

What are the security implications of this?
My naive guess is, that it might defeat range checking of values 
in user space code.

What about limiting this to be called once per task or VM?
This will prevent most abuse scenarios, I can think of.


Regards

Ingo Oeser

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

^ permalink raw reply

* Occasional APC Smart-UPS CS 500 USB UPS troubles
From: Chris Boot @ 2006-04-02 14:39 UTC (permalink / raw)
  To: kernel list

Hi all,

I have an APC Smart-UPS CS 500, and most of the time it works really 
nicely. I was stupefied to find it worked out of the box in Ubuntu 
Dapper and pops up a nice little icon when the power goes out, etc... 
The trouble is, that's only most of the time.

I'm guessing the USB controller in the device is buggy or something, 
because occasionally, when I reboot my machine with the UPS plugged in, 
the boot hangs or produces strange errors when detecting USB devices. 
All it takes to get the machine to boot properly is yank the USB plug on 
the UPS, plug it in again, and reboot.

Has anyone seen this before?

Not exactly kernel related I must admit, but this never seems to happen 
on *shudder* Windows, and I wouldn't expect such severe behaviour in 
case of trouble...

I've seen this on all sorts of kernels starting with the early 2.6 
series up to 2.6.16.1 and 2.6.16-ck3. My latest hang was with the latter 
kernel, and modprobe got stuck with the following trace:

modprobe      D ED465280     0   819    815                     (NOTLB)
f7cfade4 f7d0366c f7d03540 ed465280 000f41fd 005b8d80 00000000 f7794d1c
        00000292 f7cfa000 f7d03540 c02d0e0e 00000001 f7d03540 c0113f02 
f7794d24
        f7794d24 f6e31c58 f9734f40 f97e2f44 c0257dc6 c02cf89f f97e2f44 
f7794c58
Call Trace:
  [__down+202/240] __down+0xca/0xf0
  [default_wake_function+0/12] default_wake_function+0x0/0xc
  [__driver_attach+0/89] __driver_attach+0x0/0x59
  [__sched_text_start+7/12] __down_failed+0x7/0xc
  [.text.lock.dd+39/188] .text.lock.dd+0x27/0xbc
  [bus_for_each_dev+55/89] bus_for_each_dev+0x37/0x59
  [driver_attach+17/19] driver_attach+0x11/0x13
  [__driver_attach+0/89] __driver_attach+0x0/0x59
  [bus_add_driver+90/211] bus_add_driver+0x5a/0xd3
  [pg0+959850838/1069790208] usb_register_driver+0x50/0xae [usbcore]
  [pg0+949030918/1069790208] hid_init+0x6/0x3d [usbhid]
  [sys_init_module+4905/5197] sys_init_module+0x1329/0x144d
  [cp_new_stat64+237/255] cp_new_stat64+0xed/0xff
  [vma_prio_tree_insert+23/42] vma_prio_tree_insert+0x17/0x2a
  [vma_link+162/223] vma_link+0xa2/0xdf
  [do_mmap_pgoff+1202/1535] do_mmap_pgoff+0x4b2/0x5ff
  [sys_mmap2+97/144] sys_mmap2+0x61/0x90
  [sysenter_past_esp+84/117] sysenter_past_esp+0x54/0x75

Let me know if you need more info!

Thanks,
Chris

-- 
Chris Boot
bootc@bootc.net
http://www.bootc.net/

^ permalink raw reply

* Anyone using marvell 64420 system controller
From: Fuxin Zhang @ 2006-04-02 14:57 UTC (permalink / raw)
  To: Linux/MIPS Development

hi,

  We have been puzzled by the strange problems with our new board with
marvell 64420 for nearly one month.

The board is unstable in linux. Using a 2.6.14 kernel it dies very
easily with file system operations;with a 2.4.22 kernel it can survive
a "cp -a /usr /usr1", but diffing two identical files with sizes > 50M
often mistakely reports difference.The diff result is often 32 bytes,but
the first byte is not cache line aligned(in fact,almost always
%cachelinesize == 1).

The results remain true even with ramdisk only and any other pci device
removed from the board. The same mips CPU works well on other boards,
the same kernel with different platform chosen is very stable too. So I
tend to doubt the bridge or its DDR controller.( Is there any possiblity
of platform related code that lead to such problem? )


If anyone has experiences on this chip, could you point us some way out?
It seems we cannot easily reach the marvell's core developers.

Thanks a lot.

^ permalink raw reply

* Re: [PATCH] Add prctl to change endian of a task
From: Alan Cox @ 2006-04-02 14:56 UTC (permalink / raw)
  To: Ingo Oeser; +Cc: Anton Blanchard, linux-kernel, Andrew Morton
In-Reply-To: <200604021637.49759.ioe-lkml@rameria.de>

On Sul, 2006-04-02 at 16:37 +0200, Ingo Oeser wrote:
> What about limiting this to be called once per task or VM?
> This will prevent most abuse scenarios, I can think of.

Abuse is a possible problem but you can deal with that. If you don't
inherit endian changes then the problem doesn't occur. If you must
inherit them then drop the inheritance when an suid/sgid exec occurs as
we do with some other properties.

Can you explain however why you can't do this simply by using a binary
magic number in the executable to indicate which endian it is, or do you
really need to flip it ?

Alan


^ permalink raw reply

* Re: [patch] avoid unaligned access when accessing poll stack
From: Jes Sorensen @ 2006-04-02 14:49 UTC (permalink / raw)
  To: Andrew Morton; +Cc: torvalds, ak, linux-kernel, linux-ia64
In-Reply-To: <20060331102053.2a440f81.akpm@osdl.org>

Andrew Morton wrote:
> Jes Sorensen <jes@sgi.com> wrote:
>>   [PATCH] Optimize select/poll by putting small data sets on the stack
>>  resulted in the poll stack being 4-byte aligned on 64-bit
>>  architectures, causing misaligned accesses to elements in the array.
> 
> How come you noticed this but I did not?

Heh,

The ia64 kernel spits out nifty little messages moaning about this since
it goes to firmware emulation. They were all in the middle of the bootup
messages making them a bit harder to notice as well.

Cheers,
Jes

^ permalink raw reply


This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.