04 Jul, 2006

29 commits

  • With the lock validator we detect mutex deadlocks (and more), the mutex
    deadlock checking code is both redundant and slower. So remove it.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • cleanup: remove unused DEBUG_BUG_ON() defines.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • Rename DEBUG_WARN_ON() to the less generic DEBUG_LOCKS_WARN_ON() name, so that
    it's clear that this is a lock-debugging internal mechanism.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • RWSEM_DEBUG used to be a printk based 'tracing' facility, probably used for
    very early prototypes of the rwsem code. Remove it.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • Clean up rwsems.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • lockdep needs to have the waitqueue lock initialized for on-stack waitqueues
    implicitly initialized by DECLARE_COMPLETION(). Introduce the API.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • Introduce local_irq_enable_in_hardirq() API. It is currently aliased to
    local_irq_enable(), hence has no functional effects.

    This API will be used by lockdep, but even without lockdep this will better
    document places in the kernel where a hardirq context enables hardirqs.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • lockdep wants to use the disable_irq()/enable_irq() prototypes before they are
    provied by the platform's asm/irq.h. So move them out of the
    CONFIG_GENERIC_HARDIRQS define - all architectures have a common prototype for
    this anyway.

    Add special lockdep variants of irq line disabling/enabling.

    These should be used for locking constructs that know that a particular irq
    context which is disabled, and which is the only irq-context user of a lock,
    that it's safe to take the lock in the irq-disabled section without disabling
    hardirqs.

    [akpm@osdl.org: build fix]
    Signed-off-by: Ingo Molnar
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • Add the per_cpu_offset() generic method. (used by the lock validator)

    Signed-off-by: Ingo Molnar
    Signed-off-by: Arjan van de Ven
    Cc: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • Provide a common print_ip_sym() function that prints the passed instruction
    pointer as well as the symbol belonging to it. Avoids adding a bunch of
    #ifdef CONFIG_64BIT in order to get the printk format right on 32/64 bit
    platforms.

    Acked-by: Ingo Molnar
    Cc: Arjan van de Ven
    Signed-off-by: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Heiko Carstens
     
  • Add is_module_address() method - to be used by lockdep.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Arjan van de Ven
    Cc: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • s390's console_init must enable interrupts, but early_boot_irqs_on() gets
    called later. To avoid problems move console_init() after local_irq_enable().

    Signed-off-by: Heiko Carstens
    Acked-by: Ingo Molnar
    Cc: Martin Schwidefsky
    Cc: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Heiko Carstens
     
  • The lock validator triggered a number of bugs in the floppy driver, all
    related to the floppy driver allocating and freeing irq and dma resources from
    interrupt context. The initial solution was to use schedule_work() to push
    this into process context, but this caused further problems: for example the
    current floppy driver in -mm2 is totally broken and all floppy commands time
    out with an error. (as reported by Barry K. Nathan)

    This patch tries another solution: simply get rid of all that dynamic IRQ and
    DMA allocation/freeing. I doubt it made much sense back in the heydays of
    floppies (if two devices raced for DMA or IRQ resources then we didnt handle
    those cases too gracefully anyway), and today it makes near zero sense.

    So the new code does the simplest and most straightforward thing: allocate IRQ
    and DMA resources at module init time, and free them at module removal time.
    Dont try to release while the driver is operational. This, besides making the
    floppy driver functional again has an added bonus, floppy IRQ stats are
    finally persistent and visible in /proc/interrupts:

    6: 63 XT-PIC-level floppy

    Besides normal floppy IO i have also tested IO error handling, motor-off
    timeouts, etc. - and everything seems to be working fine.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • sound/sparc/amd7930.c: In function 'amd7930_attach_common':
    sound/sparc/amd7930.c:1040: warning: format '%08lx' expects type 'long unsigned int', but argument 5 has type 'resource_size_t'

    sound/sparc/cs4231.c:2043: warning: format '%016lx' expects type 'long unsigned int', but argument 5 has type 'resource_size_t'

    sound/sparc/dbri.c: In function 'dbri_attach':
    sound/sparc/dbri.c:2650: warning: format '%016lx' expects type 'long unsigned int', but argument 5 has type 'resource_size_t'

    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • drivers/input/serio/i8042-sparcio.h:91: error: '__mod_of_device_table' aliased to undefined symbol 'i8042_match'

    Cc: Dmitry Torokhov
    DESC
    sparc: resource warning fix
    EDESC
    From: Andrew Morton

    sound/sparc/amd7930.c: In function 'amd7930_attach_common':
    sound/sparc/amd7930.c:1040: warning: format '%08lx' expects type 'long unsigned int', but argument 5 has type 'resource_size_t'

    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Mark the static struct file_operations in drivers/char as const. Making
    them const prevents accidental bugs, and moves them to the .rodata section
    so that they no longer do any false sharing; in addition with the proper
    debug option they are then protected against corruption..

    [akpm@osdl.org: build fix]
    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     
  • When a VT is newly allocated, the module reference count of the backend
    will be incremented. This should be balanced by a module_put() when this
    VT is deallocated.

    Signed-off-by: Antonino Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Antonino A. Daplas
     
  • Add support for Display Update Module and RGB framebuffer device on Philips
    PNX4008 ARM board.

    Signed-off-by: Grigory Tolstolytkin
    Signed-off-by: Vitaly Wool
    Signed-off-by: Antonino Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vitaly Wool
     
  • Update MAINTAINERS with contact info for Mike Isely, the PVRUSB2
    maintainer, while also adding the pvrusb2 mailing list and web site.

    Signed-off-by: Mike Isely
    Signed-off-by: Michael Krufky
    Cc: Mauro Carvalho Chehab
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Krufky
     
  • Martin says that I can add self to MAINTAINERS.

    Signed-off-by: Randy Dunlap
    Cc: Martin Waitz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • Fix check for bad address; use macro instead of open-coding two checks.

    Taken from RHEL4 kernel update.

    From: Ernie Petrides

    For background, the BAD_ADDR() macro should return TRUE if the address is
    TASK_SIZE, because that's the lowest address that is *not* valid for
    user-space mappings. The macro was correct in binfmt_aout.c but was wrong
    for the "equal to" case in binfmt_elf.c. There were two in-line validations
    of user-space addresses in binfmt_elf.c, which have been appropriately
    converted to use the corrected BAD_ADDR() macro in the patch you posted
    yesterday. Note that the size checks against TASK_SIZE are okay as coded.

    The additional changes that I propose are below. These are in the error
    paths for bad ELF entry addresses once load_elf_binary() has already
    committed to exec'ing the new image (following the tearing down of the
    task's original address space).

    The 1st hunk deals with the interp-side of the outer "if". There were two
    problems here. The printk() should be removed because this path can be
    triggered at will by a bogus interpreter image created and used by a
    malicious user. Further, the error code should not be ENOEXEC, because that
    causes the loop in search_binary_handler() to continue trying other exec
    handlers (twice, in fact). But it's too late for this to work correctly,
    because the user address space has already been torn down, and an exec()
    failure cannot be returned to the user code because the code no longer
    exists. The only recovery is to force a SIGSEGV, but it's best to terminate
    the search loop immediately. I somewhat arbitrarily chose EINVAL as a
    fallback error code, but any error returned by load_elf_interp() will
    override that (but this value will never be seen by user-space).

    The 2nd hunk deals with the non-interp-side of the outer "if". There were
    two problems here as well. The SIGSEGV needs to be forced, because a prior
    sigaction() syscall might have set the associated disposition to SIG_IGN.
    And the ENOEXEC should be changed to EINVAL as described above.

    Signed-off-by: Chuck Ebbert
    Signed-off-by: Ernie Petrides
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chuck Ebbert
     
  • It turns out that it is advantageous to leave a small portion of unmapped file
    backed pages if all of a zone's pages (or almost all pages) are allocated and
    so the page allocator has to go off-node.

    This allows recently used file I/O buffers to stay on the node and
    reduces the times that zone reclaim is invoked if file I/O occurs
    when we run out of memory in a zone.

    The problem is that zone reclaim runs too frequently when the page cache is
    used for file I/O (read write and therefore unmapped pages!) alone and we have
    almost all pages of the zone allocated. Zone reclaim may remove 32 unmapped
    pages. File I/O will use these pages for the next read/write requests and the
    unmapped pages increase. After the zone has filled up again zone reclaim will
    remove it again after only 32 pages. This cycle is too inefficient and there
    are potentially too many zone reclaim cycles.

    With the 1% boundary we may still remove all unmapped pages for file I/O in
    zone reclaim pass. However. it will take a large number of read and writes
    to get back to 1% again where we trigger zone reclaim again.

    The zone reclaim 2.6.16/17 does not show this behavior because we have a 30
    second timeout.

    [akpm@osdl.org: rename the /proc file and the variable]
    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • PNP devices can use shared interrupts, so check to see whether we'll need
    SA_SHIRQ for request_irq().

    The builtin PDH UART on the HP rx8640 is an example of an ACPI/PNP device
    that uses a shareable level-triggered, active-low interrupt. The interrupt
    can be shared in very large I/O configurations or by artificially lowering
    IA64_DEF_LAST_DEVICE_VECTOR.

    Signed-off-by: Bjorn Helgaas
    Cc: Adam Belay
    Cc: Matthieu Castet
    Cc: Li Shaohua
    Cc: Len Brown
    Acked-by: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bjorn Helgaas
     
  • ACPI supplies a "shareable" indication, but PNPACPI ignores it. If a PNP
    device uses a shared interrupt, request_irq() fails because the PNP driver
    can't tell whether to supply SA_SHIRQ.

    This patch allows PNP drivers to test
    (pnp_irq_flags(dev, 0) & IORESOURCE_IRQ_SHAREABLE)

    Signed-off-by: Bjorn Helgaas
    Cc: Adam Belay
    Cc: Matthieu Castet
    Cc: Li Shaohua
    Cc: Len Brown
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bjorn Helgaas
     
  • This is needed to fix UML compilation given that alternatives_smp_module_add
    and alternatives_smp_module_del are null inline functions if !CONFIG_SMP.

    Signed-off-by: "Theodore Ts'o"
    Cc: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Theodore Tso
     
  • reported by Jure Repinc:

    > > http://bugzilla.kernel.org/show_bug.cgi?id=6773

    > > checked out dmesg output and found the message
    > >
    > > ======================================================
    > > [ BUG: hard-safe -> hard-unsafe lock order detected! ]
    > > ------------------------------------------------------
    > >
    > > starting at line 660 of the dmesg.txt that I will attach.

    The patch below should fix the deadlock, albeit I suspect it's not the
    "right" fix; the right fix may well be to move the rx processing in bcm43xx
    to softirq context. [it's debatable, ipw2200 hit this exact same bug; at
    some point it's better to bite the bullet and move this to the common layer
    as my patch below does]

    Make the nl_table_lock irq-safe; it's taken for read in various netlink
    functions, including functions that several wireless drivers (ipw2200,
    bcm43xx) want to call from hardirq context.

    The deadlock was found by the lock validator.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Ingo Molnar
    Signed-off-by: Herbert Xu
    Cc: Michael Buesch
    Cc: "John W. Linville"
    Cc: Jeff Garzik
    Acked-by: "David S. Miller"
    Cc: jamal
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     
  • Have a special version of print_symbol() for s390 which clears the most
    significant bit of addr before calling __print_symbol(). This seems to be
    better than checking/changing each place in the kernel that saves an
    instruction pointer.

    Without this the output would look like:

    hardirqs last enabled at (30907): [] 0x80018c6a
    hardirqs last disabled at (30908): [] 0x8001e48c
    softirqs last enabled at (30904): [] 0x8001dc96
    softirqs last disabled at (30897): [] 0x8001dc50

    instead of this:

    hardirqs last enabled at (19421): [] cpu_idle+0x176/0x1c4
    hardirqs last disabled at (19422): [] io_no_vtime+0xa/0x1a
    softirqs last enabled at (19418): [] do_softirq+0xa6/0xe8
    softirqs last disabled at (19411): [] do_softirq+0x60/0xe8

    Acked-by: Ingo Molnar
    Cc: Arjan van de Ven
    Cc: Martin Schwidefsky
    Signed-off-by: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Heiko Carstens
     
  • Remove duplicate/redundant/wrong IRQF_PERCPU definition.

    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • We're not reay to take a timer interrupt until timekeeping_init() has run.
    But time_init() will start the time interrupt and if it is called with
    local interrupts enabled we'll immediately take an interrupt and die.

    Fix that by running timekeeping_init() prior to time_init().

    We don't know _why_ local interrupts got enabled on Jesse Brandeburg's
    machine. That's a separate as-yet-unsolved problem. THe patch adds a little
    bit of debugging to detect that.

    This whole requirement that local interrupts be held off during early boot
    keeps on biting us.

    Signed-off-by: John Stultz
    Cc: Jesse Brandeburg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    john stultz
     

03 Jul, 2006

11 commits

  • ARM devel merge introduced new machine functionality which was not
    covered by the ARM -> genirq patches. Fix it up and make it compile
    again.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • For several proc-.S files the include of proc-macros.S is
    missing. Make it compile and work again.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • The irqflags consolidation converted SA_PERCPU_IRQ to IRQF_PERCPU but
    did not define the new constant.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • The irgflags consolidation did conflict with the ARM to generic IRQ
    conversion and was not applied for ARM. Fix it up.

    Use the new IRQF_ constants and remove the SA_INTERRUPT define

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • Linus: "The hacks in kernel/irq/handle.c are really horrid. REALLY
    horrid."

    They are indeed. Move the dyntick quirks to ARM where they belong.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • * 'devel' of master.kernel.org:/home/rmk/linux-2.6-mmc:
    [MMC] sdhci: remove duplicate error message
    [MMC] sdhci: force DMA on some controllers
    [MMC] sdhci: quirk for broken reset
    [MMC] sdhci: Add SDHCI controller ids

    Linus Torvalds
     
  • This fixes a bug in fs/nfs which makes it impossible to build nfs
    without having procfs enabled.

    Signed-off-by: Dominik Hackl
    Signed-off-by: Linus Torvalds

    Dominik Hackl
     
  • * 'genirq' of master.kernel.org:/home/rmk/linux-2.6-arm: (24 commits)
    [ARM] 3683/2: ARM: Convert at91rm9200 to generic irq handling
    [ARM] 3682/2: ARM: Convert ixp4xx to generic irq handling
    [ARM] 3702/1: ARM: Convert ixp23xx to generic irq handling
    [ARM] 3701/1: ARM: Convert plat-omap to generic irq handling
    [ARM] 3700/1: ARM: Convert lh7a40x to generic irq handling
    [ARM] 3699/1: ARM: Convert s3c2410 to generic irq handling
    [ARM] 3698/1: ARM: Convert sa1100 to generic irq handling
    [ARM] 3697/1: ARM: Convert shark to generic irq handling
    [ARM] 3696/1: ARM: Convert clps711x to generic irq handling
    [ARM] 3694/1: ARM: Convert ecard driver to generic irq handling
    [ARM] 3693/1: ARM: Convert omap1 to generic irq handling
    [ARM] 3691/1: ARM: Convert imx to generic irq handling
    [ARM] 3688/1: ARM: Convert clps7500 to generic irq handling
    [ARM] 3687/1: ARM: Convert integrator to generic irq handling
    [ARM] 3685/1: ARM: Convert pxa to generic irq handling
    [ARM] 3684/1: ARM: Convert l7200 to generic irq handling
    [ARM] 3681/1: ARM: Convert ixp2000 to generic irq handling
    [ARM] 3680/1: ARM: Convert footbridge to generic irq handling
    [ARM] 3695/1: ARM drivers/pcmcia: Fixup includes
    [ARM] 3689/1: ARM drivers/input/touchscreen: Fixup includes
    ...

    Manual conflict resolved in kernel/irq/handle.c (butt-ugly ARM tickless
    code).

    Linus Torvalds
     
  • * 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (44 commits)
    [ARM] 3541/2: workaround for PXA27x erratum E7
    [ARM] nommu: provide a way for correct control register value selection
    [ARM] 3705/1: add supersection support to ioremap()
    [ARM] 3707/1: iwmmxt: use the generic thread notifier infrastructure
    [ARM] 3706/2: ep93xx: add cirrus logic edb9315a support
    [ARM] 3704/1: format IOP Kconfig with tabs, create more consistency
    [ARM] 3703/1: Add help description for ARCH_EP80219
    [ARM] 3678/1: MMC: Make OMAP MMC work
    [ARM] 3677/1: OMAP: Update H2 defconfig
    [ARM] 3676/1: ARM: OMAP: Fix dmtimers and timer32k to compile on OMAP1
    [ARM] Add section support to ioremap
    [ARM] Fix sa11x0 SDRAM selection
    [ARM] Set bit 4 on section mappings correctly depending on CPU
    [ARM] 3666/1: TRIZEPS4 [1/5] core
    ARM: OMAP: Multiplexing for 24xx GPMC wait pin monitoring
    ARM: OMAP: Fix SRAM to use MT_MEMORY instead of MT_DEVICE
    ARM: OMAP: Update dmtimers
    ARM: OMAP: Make clock variables static
    ARM: OMAP: Fix GPMC compilation when DEBUG is defined
    ARM: OMAP: Mux updates for external DMA and GPIO
    ...

    Linus Torvalds
     
  • * 'devel' of master.kernel.org:/home/rmk/linux-2.6-mmc:
    [MMC] sdhci: version bump sdhci
    [MMC] sdhci: support controller specific quirks
    [MMC] sdhci: more DMA capabilities tests
    [MMC] sdhci: reset sdhci controller early
    [MMC] sdhci: check controller version
    [MMC] sdhci: check only relevant inhibit bits
    [MMC] sdhci: Test for invalid block size
    [MMC] sdhci: Avoid sdhci DMA boundaries
    [MMC] Fix sdhci PIO routines
    [MMC] sdhci: fix interrupt handling
    [MMC] sdhci: correct register order
    [MMC] sdhci: proper timeout handling
    [MMC] sdhci: fix sdhci reset timeout
    [MMC] sdhci: fix timeout loops in sdhci
    [MMC] sdhci: support for multiple voltages
    [MMC] sdhci: print device id
    [MMC] sdhci: check SDHCI base clock

    Linus Torvalds
     
  • Signed-off-by: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "David S. Miller"
    Cc: Benjamin Herrenschmidt
    Cc: "Randy.Dunlap"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner