07 Jan, 2012

1 commit

  • Some Dell BIOSes have MCFG tables that don't report the entire
    MMCONFIG area claimed by the chipset. If we move PCI devices into
    that claimed-but-unreported area, they don't work.

    This quirk reads the AMD MMCONFIG MSRs and adds PNP0C01 resources as
    needed to cover the entire area.

    Example problem scenario:

    BIOS-e820: 00000000cfec5400 - 00000000d4000000 (reserved)
    Fam 10h mmconf [d0000000, dfffffff]
    PCI: MMCONFIG for domain 0000 [bus 00-3f] at [mem 0xd0000000-0xd3ffffff] (base 0xd0000000)
    pnp 00:0c: [mem 0xd0000000-0xd3ffffff]
    pci 0000:00:12.0: reg 10: [mem 0xffb00000-0xffb00fff]
    pci 0000:00:12.0: no compatible bridge window for [mem 0xffb00000-0xffb00fff]
    pci 0000:00:12.0: BAR 0: assigned [mem 0xd4000000-0xd40000ff]

    Reported-by: Lisa Salimbas
    Reported-by:
    Tested-by: dann frazier
    References: https://bugzilla.kernel.org/show_bug.cgi?id=31602
    References: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/647043
    References: https://bugzilla.redhat.com/show_bug.cgi?id=770308
    Cc: stable@kernel.org # 2.6.34+
    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Jesse Barnes

    Bjorn Helgaas
     

08 Nov, 2011

1 commit

  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
    cpuidle: Single/Global registration of idle states
    cpuidle: Split cpuidle_state structure and move per-cpu statistics fields
    cpuidle: Remove CPUIDLE_FLAG_IGNORE and dev->prepare()
    cpuidle: Move dev->last_residency update to driver enter routine; remove dev->last_state
    ACPI: Fix CONFIG_ACPI_DOCK=n compiler warning
    ACPI: Export FADT pm_profile integer value to userspace
    thermal: Prevent polling from happening during system suspend
    ACPI: Drop ACPI_NO_HARDWARE_INIT
    ACPI atomicio: Convert width in bits to bytes in __acpi_ioremap_fast()
    PNPACPI: Simplify disabled resource registration
    ACPI: Fix possible recursive locking in hwregs.c
    ACPI: use kstrdup()
    mrst pmu: update comment
    tools/power turbostat: less verbose debugging

    Linus Torvalds
     

07 Nov, 2011

1 commit

  • The attached patch simplifies 29df8d8f8702f0f53c1375015f09f04bc8d023c1. As
    the "pnp_xxx" structs are not designed to cope with IORESOURCE_DISABLED, and
    hence no code can test for this value, setting this value is actually a "no op"
    and can be skipped altogether. It is sufficient to remove the checks for
    "empty" resources and continue processing.

    The patch is applied against 3.1.

    Signed-off-by: Witold Szczeponik
    Acked-by: Bjorn Helgaas
    Signed-off-by: Len Brown

    Witold Szczeponik
     

01 Nov, 2011

1 commit


26 Jul, 2011

2 commits

  • * Merge akpm patch series: (122 commits)
    drivers/connector/cn_proc.c: remove unused local
    Documentation/SubmitChecklist: add RCU debug config options
    reiserfs: use hweight_long()
    reiserfs: use proper little-endian bitops
    pnpacpi: register disabled resources
    drivers/rtc/rtc-tegra.c: properly initialize spinlock
    drivers/rtc/rtc-twl.c: check return value of twl_rtc_write_u8() in twl_rtc_set_time()
    drivers/rtc: add support for Qualcomm PMIC8xxx RTC
    drivers/rtc/rtc-s3c.c: support clock gating
    drivers/rtc/rtc-mpc5121.c: add support for RTC on MPC5200
    init: skip calibration delay if previously done
    misc/eeprom: add eeprom access driver for digsy_mtc board
    misc/eeprom: add driver for microwire 93xx46 EEPROMs
    checkpatch.pl: update $logFunctions
    checkpatch: make utf-8 test --strict
    checkpatch.pl: add ability to ignore various messages
    checkpatch: add a "prefer __aligned" check
    checkpatch: validate signature styles and To: and Cc: lines
    checkpatch: add __rcu as a sparse modifier
    checkpatch: suggest using min_t or max_t
    ...

    Did this as a merge because of (trivial) conflicts in
    - Documentation/feature-removal-schedule.txt
    - arch/xtensa/include/asm/uaccess.h
    that were just easier to fix up in the merge than in the patch series.

    Linus Torvalds
     
  • When parsing PnP ACPI resource structures, it may happen that some of
    the resources are disabled (in which case "the size" of the resource
    equals zero).

    The current solution is to skip these resources completely - with the
    unfortunate side effect that they are not registered despite the fact
    that they exist, after all. (The downside of this approach is that
    these resources cannot be used as templates for setting the actual
    device's resources because they are missing from the template.) The
    kernel's APM implementation does not suffer from this problem and
    registers all resources regardless of "their size".

    This patch fixes a problem with (at least) the vintage IBM ThinkPad 600E
    (and most likely also with the 600, 600X, and 770X which have a very
    similar layout) where some of its PnP devices support options where
    either an IRQ, a DMA, or an IO port is disabled. Without this patch,
    the devices can not be configured using the
    "/sys/bus/pnp/devices/*/resources" interface.

    The manipulation of these resources is important because the 600E has
    very demanding requirements. For instance, the number of IRQs is not
    sufficient to support all devices of the 600E. Fortunately, some of the
    devices, like the sound card's MPU-401 UART, can be configured to not
    use any IRQ, hence freeing an IRQ for a device that requires one.
    (Still, the device's "ResourceTemplate" requires an IRQ resource
    descriptor which cannot be created if the resource has not been
    registered in the first place.)

    As an example, the dependent sets of the 600E's CSC0103 device (the
    MPU-401 UART) are listed, with the patch applied, as:

    Dependent: 00 - Priority preferred
    port 0x300-0x330, align 0xf, size 0x4, 16-bit address decoding
    irq High-Edge
    Dependent: 01 - Priority acceptable
    port 0x300-0x330, align 0xf, size 0x4, 16-bit address decoding
    irq 5,7,2/9,10,11,15 High-Edge

    (The same result is obtained when PNPBIOS is used instead of PnP ACPI.)
    Without the patch, the IRQ resource in the preferred option is not
    listed at all:

    Dependent: 00 - Priority preferred
    port 0x300-0x330, align 0xf, size 0x4, 16-bit address decoding
    Dependent: 01 - Priority acceptable
    port 0x300-0x330, align 0xf, size 0x4, 16-bit address decoding
    irq 5,7,2/9,10,11,15 High-Edge

    And in fact, the 600E's DSDT lists the disabled IRQ as an option, as can
    be seen from the following excerpt from the DSDT:

    Name (_PRS, ResourceTemplate ()
    {
    StartDependentFn (0x00, 0x00)
    {
    IO (Decode16, 0x0300, 0x0330, 0x10, 0x04)
    IRQNoFlags () {}
    }
    StartDependentFn (0x01, 0x00)
    {
    IO (Decode16, 0x0300, 0x0330, 0x10, 0x04)
    IRQNoFlags () {5,7,9,10,11,15}
    }
    EndDependentFn ()
    })

    With this patch applied, a user space program - or maybe even the kernel
    - can allocate all devices' resources optimally. For the 600E, this
    means to find optimal resources for (at least) the serial port, the
    parallel port, the infrared port, the MWAVE modem, the sound card, and
    the MPU-401 UART.

    The patch applies the idea to register disabled resources to all types
    of resources, not just to IRQs, DMAs, and IO ports. At the same time,
    it mimics the behavior of the "pnp_assign_xxx" functions from
    "drivers/pnp/manager.c" where resources with "no size" are considered
    disabled.

    No regressions were observed on hardware that does not require this
    patch.

    The patch is applied against 2.6.39.

    NB: The kernel's current PnP interface does not allow for disabling individual
    resources using the "/sys/bus/pnp/devices/$device/resources" file. Assuming
    this could be done, a device could be configured to use a disabled resource
    using a simple series of calls:

    echo disable > /sys/bus/pnp/devices/$device/resources
    echo clear > /sys/bus/pnp/devices/$device/resources
    echo set irq disabled > /sys/bus/pnp/devices/$device/resources
    echo fill > /sys/bus/pnp/devices/$device/resources
    echo activate > /sys/bus/pnp/devices/$device/resources

    This patch addresses only the parsing of PnP ACPI devices.

    ChangeLog (v1 -> v2):
    - extend patch description
    - fix typo in patch itself

    Signed-off-by: Witold Szczeponik
    Cc: Len Brown
    Cc: Adam Belay
    Cc: Bjorn Helgaas
    Cc: Bjorn Helgaas
    Cc: Henrique de Moraes Holschuh
    Cc: Matthew Garrett
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Witold Szczeponik
     

10 Jun, 2011

1 commit


31 Mar, 2011

1 commit


23 Mar, 2011

1 commit

  • IORESOURCE_DMA cannot be assigned without utilizing the interface
    provided by CONFIG_ISA_DMA_API, specifically request_dma() and
    free_dma(). Thus, there's a strict dependency on the config option and
    limits IORESOURCE_DMA only to architectures that support ISA-style DMA.

    ia64 is not one of those architectures, so pnp_check_dma() no longer
    needs to be special-cased for that architecture.

    pnp_assign_resources() will now return -EINVAL if IORESOURCE_DMA is
    attempted on such a kernel.

    Signed-off-by: David Rientjes
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Thomas Gleixner
    Cc: Bjorn Helgaas
    Cc: Russell King
    Cc: "Luck, Tony"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     

12 Jan, 2011

2 commits

  • Len Brown
     
  • The PNP ACPI driver squirrels the ACPI handles of PNP devices' ACPI
    companions, but this isn't correct, because those handles should be
    accessed using the DEVICE_ACPI_HANDLE() macro operating on struct
    device objects.

    Using DEVICE_ACPI_HANDLE() in the PNP ACPI driver instead of the
    driver's own copies of the ACPI handles allows us to avoid a problem
    with docking stations where a machine docked before suspend to RAM
    and undocked while suspended crashes during the subsequent resume (in
    that case the ACPI companion of the PNP device in question doesn't
    exist any more while the device is being resumed). It also allows us
    to avoid the problem where suspend to RAM fails when the machine was
    undocked while suspended before (again, the ACPI companion of the PNP
    device is not present any more while it is being suspended).

    This change doesn't fix all of the the PNP ACPI driver's problems
    with PNP devices in docking stations (generally speaking, the driver
    has no idea that devices can come and go and doesn't even attempt to
    handle such events), but at least it makes suspend work for the
    users of docking stations who don't use the PNP devices located in
    there.

    References: https://bugzilla.kernel.org/show_bug.cgi?id=15100

    Reported-and-tested-by: Toralf Förster
    Signed-off-by: Rafael J. Wysocki
    Acked-by: Bjorn Helgaas
    Signed-off-by: Len Brown

    Rafael J. Wysocki
     

11 Dec, 2010

1 commit


18 Nov, 2010

1 commit


27 Oct, 2010

3 commits

  • Cleanup only, no functional change (pnp.debug can be enabled
    and disabled at runtime, but that's not a real enhancement).

    This one depends on another PNP cleanup patch:
    PNP: Compile all pnp built-in stuff in one module namespace

    Signed-off-by: Thomas Renninger
    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Len Brown

    Thomas Renninger
     
  • This is cleanup mostly, nothing urgent.
    I came up with it when looking at dynamic debug which can
    enable pr_debug messages at runtime or boot param
    for a specific module.

    Advantages:
    - Any pnp code can make use of the moduleparam.h interface, the modules
    will show up as pnp.param.
    - Passing pnp.ddebug as kernel boot param will enable all pnp debug messages
    with my previous patch and CONFIG_DYNAMIC_DEBUG enabled.

    Signed-off-by: Thomas Renninger
    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Len Brown

    Thomas Renninger
     
  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (53 commits)
    ACPI: install ACPI table handler before any dynamic tables being loaded
    ACPI / PM: Blacklist another machine that needs acpi_sleep=nonvs
    ACPI: Page based coalescing of I/O remappings optimization
    ACPI: Convert simple locking to RCU based locking
    ACPI: Pre-map 'system event' related register blocks
    ACPI: Add interfaces for ioremapping/iounmapping ACPI registers
    ACPI: Maintain a list of ACPI memory mapped I/O remappings
    ACPI: Fix ioremap size for MMIO reads and writes
    ACPI / Battery: Return -ENODEV for unknown values in get_property()
    ACPI / PM: Fix reference counting of power resources
    Subject: [PATCH] ACPICA: Fix Scope() op in module level code
    ACPI battery: support percentage battery remaining capacity
    ACPI: Make Embedded Controller command timeout delay configurable
    ACPI dock: move some functions to .init.text
    ACPI: thermal: remove unused limit code
    ACPI: static sleep_states[] and acpi_gts_bfs_check
    ACPI: remove dead code
    ACPI: delete dedicated MAINTAINERS entries for ACPI EC and BATTERY drivers
    ACPI: Only processor needs CPU_IDLE
    ACPICA: Update version to 20101013
    ...

    Linus Torvalds
     

25 Oct, 2010

3 commits

  • Len Brown
     
  • Len Brown
     
  • * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
    Update broken web addresses in arch directory.
    Update broken web addresses in the kernel.
    Revert "drivers/usb: Remove unnecessary return's from void functions" for musb gadget
    Revert "Fix typo: configuation => configuration" partially
    ida: document IDA_BITMAP_LONGS calculation
    ext2: fix a typo on comment in ext2/inode.c
    drivers/scsi: Remove unnecessary casts of private_data
    drivers/s390: Remove unnecessary casts of private_data
    net/sunrpc/rpc_pipe.c: Remove unnecessary casts of private_data
    drivers/infiniband: Remove unnecessary casts of private_data
    drivers/gpu/drm: Remove unnecessary casts of private_data
    kernel/pm_qos_params.c: Remove unnecessary casts of private_data
    fs/ecryptfs: Remove unnecessary casts of private_data
    fs/seq_file.c: Remove unnecessary casts of private_data
    arm: uengine.c: remove C99 comments
    arm: scoop.c: remove C99 comments
    Fix typo configue => configure in comments
    Fix typo: configuation => configuration
    Fix typo interrest[ing|ed] => interest[ing|ed]
    Fix various typos of valid in comments
    ...

    Fix up trivial conflicts in:
    drivers/char/ipmi/ipmi_si_intf.c
    drivers/usb/gadget/rndis.c
    net/irda/irnet/irnet_ppp.c

    Linus Torvalds
     

18 Oct, 2010

1 commit

  • The patch below updates broken web addresses in the kernel

    Signed-off-by: Justin P. Mattock
    Cc: Maciej W. Rozycki
    Cc: Geert Uytterhoeven
    Cc: Finn Thain
    Cc: Randy Dunlap
    Cc: Matt Turner
    Cc: Dimitry Torokhov
    Cc: Mike Frysinger
    Acked-by: Ben Pfaff
    Acked-by: Hans J. Koch
    Reviewed-by: Finn Thain
    Signed-off-by: Jiri Kosina

    Justin P. Mattock
     

02 Oct, 2010

1 commit


01 Oct, 2010

2 commits

  • If primary ID (HID) is invalid try locating first valid ID on compatible
    ID list before giving up.

    This helps, for example, to recognize i8042 AUX port on Sony Vaio VPCZ1
    which uses SNYSYN0003 as HID. Without the patch users are forced to
    boot with i8042.nopnp to make use of their touchpads.

    Tested-by: Jan-Hendrik Zab
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Len Brown

    Dmitry Torokhov
     
  • ACPI devices are often involved in address space conflicts with PCI devices,
    so I think it's worth logging the resources they use. Otherwise we have to
    depend on lspnp or groping around in sysfs to find them.

    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Len Brown

    Bjorn Helgaas
     

26 Sep, 2010

1 commit

  • Remove BKL use from isapnp_proc_bus_lseek(), like was done for
    proc_bus_pci_lseek() a long time ago and recently for Zorro
    by Geert Uytterhoeven.

    Signed-off-by: Arnd Bergmann
    Cc: Geert Uytterhoeven
    Cc: Jaroslav Kysela

    Arnd Bergmann
     

19 Jul, 2010

1 commit

  • This patch (as1354) adds remote-wakeup support to the pnpacpi driver.
    The new can_wakeup method also allows other PNP protocol drivers
    (pnpbios or iaspnp) to add wakeup support, but I don't know enough
    about how they work to actually do it.

    Signed-off-by: Alan Stern
    Reviewed-by: Bjorn Helgaas
    Signed-off-by: Rafael J. Wysocki

    Alan Stern
     

07 May, 2010

1 commit


06 May, 2010

1 commit

  • With fa35b4926, I broke a lot of PNP resource assignment. That commit made
    PNPACPI include bridge windows as PNP resources, and PNP resource assignment
    treats any enabled overlapping PNP resources as conflicts. Since PCI host
    bridge windows typically include most of the I/O port space, this makes PNP
    port assigments fail.

    The PCI host bridge driver will eventually use those PNP window resources,
    so we should make PNP ignore them when checking for conflicts.

    This fixes https://bugzilla.kernel.org/show_bug.cgi?id=15903

    Reported-and-tested-by: Pavel Kysilka
    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Len Brown

    Bjorn Helgaas
     

29 Apr, 2010

1 commit

  • ACPI _CRS Address Space Descriptors have _MIN, _MAX, and _LEN. Linux has
    been computing Address Spaces as [_MIN to _MIN + _LEN - 1]. Based on the
    tests in the bug reports below, Windows apparently uses [_MIN to _MAX].

    Per spec (ACPI 4.0, Table 6-40), for _CRS fixed-size, fixed location
    descriptors, "_LEN must be (_MAX - _MIN + 1)", and when that's true, it
    doesn't matter which way we compute the end. But of course, there are
    BIOSes that don't follow this rule, and we're better off if Linux handles
    those exceptions the same way as Windows.

    This patch makes Linux use [_MIN to _MAX], as Windows seems to do. This
    effectively reverts 3162b6f0c5e and replaces it with simpler code.

    https://bugzilla.kernel.org/show_bug.cgi?id=14337 (round)
    https://bugzilla.kernel.org/show_bug.cgi?id=15480 (truncate)

    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Len Brown

    Bjorn Helgaas
     

07 Apr, 2010

1 commit


04 Apr, 2010

1 commit


30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

15 Mar, 2010

2 commits

  • Add support for bus number resources. This is for bridges with a range of
    bus numbers behind them. Previously, PNP ignored bus number resources.

    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Len Brown

    Bjorn Helgaas
     
  • Add support for resource windows. This is for bridge resources, i.e.,
    regions where a bridge forwards transactions from the primary to the
    secondary side. This does not add support for *setting* windows via
    the /proc interface.

    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Len Brown

    Bjorn Helgaas
     

17 Dec, 2009

1 commit

  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (117 commits)
    ACPI processor: Fix section mismatch for processor_add()
    ACPI: Add platform-wide _OSC support.
    ACPI: cleanup pci_root _OSC code.
    ACPI: Add a generic API for _OSC -v2
    msi-wmi: depend on backlight and fix corner-cases problems
    msi-wmi: switch to using input sparse keymap library
    msi-wmi: replace one-condition switch-case with if statement
    msi-wmi: remove unused field 'instance' in key_entry structure
    msi-wmi: remove custom runtime debug implementation
    msi-wmi: rework init
    msi-wmi: remove useless includes
    X86 drivers: Introduce msi-wmi driver
    Toshiba Bluetooth Enabling driver (RFKill handler v3)
    ACPI: fix for lapic_timer_propagate_broadcast()
    acpi_pad: squish warning
    ACPI: dock: minor whitespace and style cleanups
    ACPI: dock: add struct dock_station * directly to platform device data
    ACPI: dock: dock_add - hoist up platform_device_register_simple()
    ACPI: dock: remove global 'dock_device_name'
    ACPI: dock: combine add|alloc_dock_dependent_device (v2)
    ...

    Linus Torvalds
     

16 Dec, 2009

4 commits

  • Convert code away from ->read_proc/->write_proc interfaces. Switch to
    proc_create()/proc_create_data() which make addition of proc entries
    reliable wrt NULL ->proc_fops, NULL ->data and so on.

    Problem with ->read_proc et al is described here commit
    786d7e1612f0b0adb6046f19b906609e4fe8b1ba "Fix rmmod/read/write races in
    /proc entries"

    Signed-off-by: Alexey Dobriyan
    Cc: Adam Belay
    Cc: Bjorn Helgaas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • Len Brown
     
  • Add pnp_acpi_device(pnp_dev), which takes a PNP device and returns the
    associated ACPI device (or NULL, if the device is not a PNPACPI device).

    This allows us to write a PNP driver that can manage both traditional
    PNPBIOS and ACPI devices, treating ACPI-only functionality as an optional
    extension.

    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Len Brown

    Bjorn Helgaas
     
  • Makes use of skip_spaces() defined in lib/string.c for removing leading
    spaces from strings all over the tree.

    It decreases lib.a code size by 47 bytes and reuses the function tree-wide:
    text data bss dec hex filename
    64688 584 592 65864 10148 (TOTALS-BEFORE)
    64641 584 592 65817 10119 (TOTALS-AFTER)

    Also, while at it, if we see (*str && isspace(*str)), we can be sure to
    remove the first condition (*str) as the second one (isspace(*str)) also
    evaluates to 0 whenever *str == 0, making it redundant. In other words,
    "a char equals zero is never a space".

    Julia Lawall tried the semantic patch (http://coccinelle.lip6.fr) below,
    and found occurrences of this pattern on 3 more files:
    drivers/leds/led-class.c
    drivers/leds/ledtrig-timer.c
    drivers/video/output.c

    @@
    expression str;
    @@

    ( // ignore skip_spaces cases
    while (*str && isspace(*str)) { \(str++;\|++str;\) }
    |
    - *str &&
    isspace(*str)
    )

    Signed-off-by: André Goddard Rosa
    Cc: Julia Lawall
    Cc: Martin Schwidefsky
    Cc: Jeff Dike
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Cc: Richard Purdie
    Cc: Neil Brown
    Cc: Kyle McMartin
    Cc: Henrique de Moraes Holschuh
    Cc: David Howells
    Cc:
    Cc: Samuel Ortiz
    Cc: Patrick McHardy
    Cc: Takashi Iwai
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    André Goddard Rosa
     

12 Dec, 2009

1 commit

  • * 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (109 commits)
    PCI: fix coding style issue in pci_save_state()
    PCI: add pci_request_acs
    PCI: fix BUG_ON triggered by logical PCIe root port removal
    PCI: remove ifdefed pci_cleanup_aer_correct_error_status
    PCI: unconditionally clear AER uncorr status register during cleanup
    x86/PCI: claim SR-IOV BARs in pcibios_allocate_resource
    PCI: portdrv: remove redundant definitions
    PCI: portdrv: remove unnecessary struct pcie_port_data
    PCI: portdrv: minor cleanup for pcie_port_device_register
    PCI: portdrv: add missing irq cleanup
    PCI: portdrv: enable device before irq initialization
    PCI: portdrv: cleanup service irqs initialization
    PCI: portdrv: check capabilities first
    PCI: portdrv: move PME capability check
    PCI: portdrv: remove redundant pcie type calculation
    PCI: portdrv: cleanup pcie_device registration
    PCI: portdrv: remove redundant pcie_port_device_probe
    PCI: Always set prefetchable base/limit upper32 registers
    PCI: read-modify-write the pcie device control register when initiating pcie flr
    PCI: show dma_mask bits in /sys
    ...

    Fixed up conflicts in:
    arch/x86/kernel/amd_iommu_init.c
    drivers/pci/dmar.c
    drivers/pci/hotplug/acpiphp_glue.c

    Linus Torvalds
     

11 Dec, 2009

1 commit