17 Oct, 2008

6 commits

  • There are off-by-one errors in decompress_exec() when calculating the length of
    optional "original file name" and "comment" fields: the "ret" index is not
    incremented when terminating '\0' character is reached. The check of the buffer
    overflow (after an "extra-field" length was taken into account) is also fixed.

    I've encountered this off-by-one error when tried to reuse
    gzip-header-parsing part of the decompress_exec() function. There was an
    "original file name" field in the payload (with miscalculated length) and
    zlib_inflate() returned Z_DATA_ERROR. But after the fix similar to this
    one all worked fine.

    Signed-off-by: Volodymyr G Lukiianyk
    Acked-by: Greg Ungerer
    Acked-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Volodymyr G. Lukiianyk
     
  • The 'filp' argument to do_generic_file_read() is never NULL.

    Signed-off-by: Krishna Kumar
    Reviewed-by: KOSAKI Motohiro
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krishna Kumar
     
  • The page fault path for normal pages, if the fault is neither a no-page
    fault nor a write-protect fault, will update the DIRTY and ACCESSED bits
    in the page table appropriately.

    The hugepage fault path, however, does not do this, handling only no-page
    or write-protect type faults. It assumes that either the ACCESSED and
    DIRTY bits are irrelevant for hugepages (usually true, since they are
    never swapped) or that they are handled by the arch code.

    This is inconvenient for some software-loaded TLB architectures, where the
    _PAGE_ACCESSED (_PAGE_DIRTY) bits need to be set to enable read (write)
    access to the page at the TLB miss. This could be worked around in the
    arch TLB miss code, but the TLB miss fast path can be made simple more
    easily if the hugetlb_fault() path handles this, as the normal page fault
    path does.

    Signed-off-by: David Gibson
    Cc: William Lee Irwin III
    Cc: Hugh Dickins
    Cc: Adam Litke
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Gibson
     
  • Local variable `i' is a) misleadingly-named for an `enum zone_type' and b)
    used for indexing zones as well as nodes as well as node_maps.

    Make it an `int'.

    Reported-by: Frans Pop
    Cc: Mel Gorman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • This patch adds an additional field to the mm_owner callbacks. This field
    is required to get to the mm that changed. Hold mmap_sem in write mode
    before calling the mm_owner_changed callback

    [hugh@veritas.com: fix mmap_sem deadlock]
    Signed-off-by: Balbir Singh
    Cc: Sudhir Kumar
    Cc: YAMAMOTO Takashi
    Cc: Paul Menage
    Cc: Li Zefan
    Cc: Pavel Emelianov
    Cc: Balbir Singh
    Cc: KAMEZAWA Hiroyuki
    Cc: David Rientjes
    Cc: Vivek Goyal
    Signed-off-by: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Balbir Singh
     
  • A series of patches introduce a generic header file for the software
    IO/TLB implementation in lib/swiotlb.c. Currently each architecture using
    this code defines the prototypes itself. The prototypes are moved to
    include/linux/swiotlb.h and this file is included in architecture specific
    code for X86 and IA64.

    This patch:

    Create include/linux/swiotlb.h file which contains all function prototypes
    for the lib/swiotlb.c file.

    (akpm: the dependent patches will be trickled through arch trees)

    Signed-off-by: Joerg Roedel
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "Luck, Tony"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joerg Roedel
     

16 Oct, 2008

5 commits

  • As policy->governor is already set to CPUFREQ_DEFAULT_GOVERNOR in the
    (always built-in) cpufreq core, we do not need to set it in the drivers.
    This fixes the sparc64 allmodconfig build failure.

    Also, remove a totally useles setting of ->policy in cpufreq-pxa3xx.c.

    Signed-off-by: Dominik Brodowski
    Acked-by: David S. Miller
    Signed-off-by: Linus Torvalds

    Dominik Brodowski
     
  • * 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
    MIPS: Kill unused inclusions
    MIPS: IP32: Add platform device for CMOS RTC; remove dead code
    RTC: M48T35: new RTC driver
    MIPS: IP27: Switch over to RTC class driver
    MIPS: DS1286: New RTC driver
    MIPS: IP22/28: Switch over to RTC class driver
    MIPS: PCI: Scan busses when they are registered
    MIPS: WGT634U: Add reset button support
    MIPS: BCM47xx: Use the new SSB GPIO API
    MIPS: BCM47xx: Remove references to BCM947XX
    MIPS: WGT634U: Add machine detection message
    MIPS: Align .data.cacheline_aligned based on CONFIG_MIPS_L1_CACHE_SHIFT
    MIPS: show_cpuinfo prints the type of the calling CPU
    MIPS: Fix wrong branch target in new spin_lock code.
    MIPS: Have a heart for a lonely, lost header file ...

    Linus Torvalds
     
  • proc_clear_tty() gets called with interrupts off (while holding the task list
    lock) from sys_setid. This means that it needs the _irqsave version of the
    locking primitives.

    Reported-by: Marcin Slusarz
    Tested-by: Marcin Slusarz
    Signed-off-by: Arjan van de Ven
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     
  • The metronome driver produces warnings when built on x86-64 as it assumes that
    size_t is an int. Use %Zd instead.

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • When we skip unrecognized options in xfs_fs_remount we should just break
    out of the switch and not return because otherwise we may skip clearing
    the xfs-internal read-only flag. This will only show up on some
    operations like touch because most read-only checks are done by the VFS
    which thinks this filesystem is r/w. Eventually we should replace the
    XFS read-only flag with a helper that always checks the VFS flag to make
    sure they can never get out of sync.

    Bug reported and fix verified by Marcel Beister on #xfs.
    Bug fix verified by updated xfstests/189.

    Signed-off-by: Christoph Hellwig
    Acked-by: Eric Sandeen
    Signed-off-by: Timothy Shimmin
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     

15 Oct, 2008

29 commits

  • * 'build_fix' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2:
    ocfs2: fix build error

    Linus Torvalds
     
  • * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (158 commits)
    powerpc: Fix CHRP PCI config access for indirect_pci
    powerpc/chrp: Fix detection of Python PCI host bridge on IBM CHRPs
    powerpc: Fix 32-bit SMP boot on CHRP
    powerpc: Fix link errors on 32-bit machines using legacy DMA
    powerpc/pci: Improve detection of unassigned bridge resources
    hvc_console: Fix free_irq in spinlocked section
    powerpc: Get USE_STRICT_MM_TYPECHECKS working again
    powerpc: Reflect the used arguments in machine_init() prototype
    powerpc: Fix DMA offset for non-coherent DMA
    powerpc: fix fsl_upm nand driver modular build
    powerpc/83xx: add NAND support for the MPC8360E-RDK boards
    powerpc: FPGA support for GE Fanuc SBC610
    i2c: MPC8349E-mITX Power Management and GPIO expander driver
    powerpc: reserve two DMA channels for audio in MPC8610 HPCD device tree
    powerpc: document the "fsl,ssi-dma-channel" compatible property
    powerpc: disable CHRP and PMAC support in various defconfigs
    OF: add fsl,mcu-mpc8349emitx to the exception list
    powerpc/83xx: add DS1374 RTC support for the MPC837xE-MDS boards
    powerpc: remove support for bootmem-allocated memory for the DIU driver
    powerpc: remove non-dependent load fsl_booke PTE_64BIT
    ...

    Linus Torvalds
     
  • Signed-off-by: Shinya Kuribayashi
    Signed-off-by: Ralf Baechle

    Shinya Kuribayashi
     
  • Signed-off-by: Thomas Bogendoerfer
    Signed-off-by: Ralf Baechle

    Thomas Bogendoerfer
     
  • This driver replaces the broken ip27-rtc driver in drivers/char and
    gives back RTC support for SGI IP27 machines.

    Signed-off-by: Thomas Bogendoerfer
    Acked-by: Alessandro Zummo
    Signed-off-by: Ralf Baechle

    Thomas Bogendoerfer
     
  • This patchset removes some dead code and creates a platform device
    for the RTC class driver.

    Signed-off-by: Thomas Bogendoerfer
    Signed-off-by: Ralf Baechle

    Thomas Bogendoerfer
     
  • This driver replaces the broken DS1286 driver in drivers/char and gives back
    RTC support for SGI IP22 and IP28 machines.

    Signed-off-by: Thomas Bogendoerfer
    Acked-by: Alessandro Zummo
    Signed-off-by: Ralf Baechle

    Thomas Bogendoerfer
     
  • This patchset removes some dead code and creates a platform device
    for the RTC class driver.

    Signed-off-by: Thomas Bogendoerfer
    Signed-off-by: Ralf Baechle

    Thomas Bogendoerfer
     
  • The patch below changes register_pci_controller() such that controllers
    being added after pcibios_init() has run are be scanned immediately.

    This is needed for example by the BCM47xx PCI controller, which is located
    on the SSB bus, which is now initialized after the PCI subsystem.

    Signed-off-by: Aurelien Jarno
    Signed-off-by: Ralf Baechle

    Aurelien Jarno
     
  • This patch adds support for the reset button of WGT634U machine, using
    GPIO interrupts. Based on a patch from Michel Lespinasse.

    Signed-off-by: Aurelien Jarno
    Signed-off-by: Ralf Baechle

    Aurelien Jarno
     
  • This patch simplifies the BCM47xx GPIO code by using the new SSB GPIO
    API, which does a lot things that were implemented directly in the
    BCM47xx code.

    Signed-off-by: Aurelien Jarno
    Signed-off-by: Ralf Baechle

    Aurelien Jarno
     
  • This patch removes the remaining reference to the BCM947xx development
    board codename.

    Signed-off-by: Florian Fainelli
    Signed-off-by: Aurelien Jarno
    Signed-off-by: Ralf Baechle

    Aurelien Jarno
     
  • This adds a printk message when a WGT634U machine is detected.

    Signed-off-by: Aurelien Jarno
    Signed-off-by: Ralf Baechle

    Aurelien Jarno
     
  • Signed-off-by: David Daney
    Signed-off-by: Tomaso Paoletti
    Signed-off-by: Ralf Baechle

    David Daney
     
  • It should print the type of the Nth processor.

    Signed-off-by: Johannes Dickgreber
    Signed-off-by: Ralf Baechle

    Johannes Dickgreber
     
  • Signed-off-by: Johannes Dickgreber
    Signed-off-by: Ralf Baechle

    Johannes Dickgreber
     
  • ... and move it to where all its brothers and sisters reside. Requested by
    Shane McDonald .

    Signed-off-by: Ralf Baechle

    Ralf Baechle
     
  • I merged the latest ocfs2_read_blocks() changes in xattr.c wrong. This makes
    Ocfs2 compile again.

    Signed-off-by: Mark Fasheh

    Mark Fasheh
     
  • Manual fixup of conflicts on:

    arch/powerpc/include/asm/dcr-regs.h
    drivers/net/ibm_newemac/core.h

    Benjamin Herrenschmidt
     
  • * 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
    i2c-viapro: Add support for SMBus Process Call transactions
    i2c: Restore i2c_smbus_process_call function
    i2c: Do earlier driver model init
    i2c: Only build Tyan SMBus mux drivers on x86
    i2c: Guard against oopses from bad init sequences
    i2c: Document the implementation details of the /dev interface
    i2c: Improve dev-interface documentation
    i2c-parport-light: Don't register a platform device resource
    hwmon: (dme1737) Convert to a new-style i2c driver
    hwmon: (dme1737) Be less i2c-centric
    i2c/tps65010: Vibrator hookup to gpiolib
    i2c-viapro: Add VX800/VX820 support
    i2c: Renesas Highlander FPGA SMBus support
    i2c-pca-isa: Don't grab arbitrary resources
    i2c/isp1301_omap: Convert to a new-style i2c driver, part 2
    i2c/isp1301_omap: Convert to a new-style i2c driver, part 1

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (55 commits)
    HID: build drivers for all quirky devices by default
    HID: add missing blacklist entry for Apple ATV ircontrol
    HID: add support for Bright ABNT2 brazilian device
    HID: Don't let Avermedia Radio FM800 be handled by usb hid drivers
    HID: fix numlock led on Dell device 0x413c/0x2105
    HID: remove warn() macro from usb hid drivers
    HID: remove info() macro from usb HID drivers
    HID: add appletv IR receiver quirk
    HID: fix a lockup regression when using force feedback on a PID device
    HID: hiddev.h: Fix example code.
    HID: hiddev.h: Fix mixed space and tabs in example code.
    HID: convert to dev_* prints
    HID: remove hid-ff
    HID: move zeroplus FF processing
    HID: move thrustmaster FF processing
    HID: move pantherlord FF processing
    HID: fix incorrent length condition in hidraw_write()
    HID: fix ttyhid deadlock
    HID: ignore iBuddy devices
    HID: report descriptor fix for remaining MacBook JIS keyboards
    ...

    Linus Torvalds
     
  • * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2: (56 commits)
    ocfs2: Make cached block reads the common case.
    ocfs2: Kill the last naked wait_on_buffer() for cached reads.
    ocfs2: Move ocfs2_bread() into dir.c
    ocfs2: Simplify ocfs2_read_block()
    ocfs2: Require an inode for ocfs2_read_block(s)().
    ocfs2: Separate out sync reads from ocfs2_read_blocks()
    ocfs2: Refactor xattr list and remove ocfs2_xattr_handler().
    ocfs2: Calculate EA hash only by its suffix.
    ocfs2: Move trusted and user attribute support into xattr.c
    ocfs2: Uninline ocfs2_xattr_name_hash()
    ocfs2: Don't check for NULL before brelse()
    ocfs2: use smaller counters in ocfs2_remove_xattr_clusters_from_cache
    ocfs2: Documentation update for user_xattr / nouser_xattr mount options
    ocfs2: make la_debug_mutex static
    ocfs2: Remove pointless !!
    ocfs2: Add empty bucket support in xattr.
    ocfs2/xattr.c: Fix a bug when inserting xattr.
    ocfs2: Add xattr mount option in ocfs2_show_options()
    ocfs2: Switch over to JBD2.
    ocfs2: Add the 'inode64' mount option.
    ...

    Linus Torvalds
     
  • We shouldn't rely on "pnp_platform_devices" to tell us whether there
    is a PNP RTC device.

    I introduced "pnp_platform_devices", but I think it was a mistake.
    All it tells us is whether we found any PNPBIOS or PNPACPI devices.
    Many machines have some PNP devices, but do not describe the RTC
    via PNP. On those machines, we need to do the platform driver probe
    to find the RTC.

    We should just register the PNP driver and see whether it claims anything.
    If we don't find a PNP RTC, fall back to the platform driver probe.

    This (in conjunction with the arch/x86/kernel/rtc.c patch to add
    a platform RTC device when PNP doesn't have one) should resolve
    these issues:

    http://bugzilla.kernel.org/show_bug.cgi?id=11580
    https://bugzilla.redhat.com/show_bug.cgi?id=451188

    Signed-off-by: Bjorn Helgaas
    Acked-by: Rafael J. Wysocki
    Acked-by: David Brownell
    Reported-by: Rik Theys
    Reported-by: shr_msn@yahoo.com.tw
    Signed-off-by: Linus Torvalds

    Bjorn Helgaas
     
  • Most if not all x86 platforms have an RTC device, but sometimes the RTC
    is not exposed as a PNP0b00/PNP0b01/PNP0b02 device in PNPBIOS or ACPI:

    http://bugzilla.kernel.org/show_bug.cgi?id=11580
    https://bugzilla.redhat.com/show_bug.cgi?id=451188

    It's best if we can discover the RTC via PNP because then we know
    which flavor of device it is, where it lives, and which IRQ it uses.

    But if we can't, we should register a platform device using the
    compiled-in RTC_PORT/RTC_IRQ resource assumptions.

    Signed-off-by: Bjorn Helgaas
    Acked-by: Rafael J. Wysocki
    Acked-by: David Brownell
    Reported-by: Rik Theys
    Reported-by: shr_msn@yahoo.com.tw
    Signed-off-by: Linus Torvalds

    Bjorn Helgaas
     
  • Recently, indirect_pci was changed to test if the bus number requested
    is the one hanging straight off the PHB, then it substitutes the bus
    number with another one contained in a new "self_busno" field of the
    pci_controller structure.

    However, this breaks CHRP which didn't initialize this new field, and
    which relies on having the right bus number passed to the hardware.

    This fixes it by initializing this variable properly for all CHRP bridges

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     
  • The detection of the IBM "Python" PCI host bridge on IBM CHRP
    machines such as old RS6000 was broken when we changed
    of_device_is_compatible() from strncasecmp to strcasecmp (dropped
    the "n" variant) due to the way IBM encodes the chip version.

    We fix that by instead doing a match on the model property like
    we do for others bridges in that file. It should be good enough
    for those machines. If yours is still broken, let me know.

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     
  • prom_init was changed to take a new argument, the address
    where the kernel is loaded, which is now used to copy the
    SMP spin loop down before use.

    However, only head_64.S was adapted to pass this new value,
    not head_32.S, thus breaking SMP boot on 32-bit SMP CHRP
    machines.

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     
  • The new merged DMA code will try to access isa_bridge_pcidev when
    trying to DMA to/from legacy devices. This is however only defined
    on 64-bit. Fixes this for now by adding the variable, even if it
    stays NULL. In the long run, we'll make isa-bridge.c common to
    32 and 64-bit.

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     
  • When the powerpc PCI layer is not configured to re-assign everything,
    it currently fails to detect that a PCI to PCI bridge has been left
    unassigned by the firmware and tries to allocate resource for the
    default window values in the bridge (0...X) (with the notable exception
    of a hack we have in there that detects some Apple firmware unassigned
    bridge resources).

    This results in resource allocation failures, which are generally
    fixed up later on but it causes scary warnings in the logs and we
    have seen the fixup code fall over in some circumstances (a different
    issue to fix as well).

    This code improves that by providing a more complete & useful function
    to intuit that a bridge was left unassigned by the firmware, and thus
    force a full re-allocation by the PCI code without trying to allocate
    the existing useless resources first.

    The algorithm we use basically considers unassigned a window that
    starts at 0 (PCI address) if the corresponding address space enable
    bit is not set. In addition, for memory space, it considers such a
    resource unassigned also if the host bridge isn't configured to
    forward cycles to address 0 (ie, the resource basically overlaps
    main memory).

    This fixes a range of problems with things like Bare-Metal support
    on pSeries machines, or attempt to use partial firmware PCI setup.

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt