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


04 Dec, 2009

1 commit

  • That is "success", "unknown", "through", "performance", "[re|un]mapping"
    , "access", "default", "reasonable", "[con]currently", "temperature"
    , "channel", "[un]used", "application", "example","hierarchy", "therefore"
    , "[over|under]flow", "contiguous", "threshold", "enough" and others.

    Signed-off-by: André Goddard Rosa
    Signed-off-by: Jiri Kosina

    André Goddard Rosa
     

05 Nov, 2009

2 commits

  • Jesse accidentally applied v1 [1] of the patchset instead of v2 [2]. This
    is the diff between v1 and v2.

    The changes in this patch are:
    - tidied vsprintf stack buffer to shrink and compute size more
    accurately
    - use %pR for decoding and %pr for "raw" (with type and flags) instead
    of adding %pRt and %pRf

    [1] http://lkml.org/lkml/2009/10/6/491
    [2] http://lkml.org/lkml/2009/10/13/441

    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Jesse Barnes

    Bjorn Helgaas
     
  • This uses %pRt and %pRf to print additional resource information (type,
    size, prefetchability, etc.) consistently.

    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Jesse Barnes

    Bjorn Helgaas
     

26 Sep, 2009

3 commits


24 Sep, 2009

1 commit

  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (119 commits)
    ACPI: don't pass handle for fixed hardware notifications
    ACPI: remove null pointer checks in deferred execution path
    ACPI: simplify deferred execution path
    acerhdf: additional BIOS versions
    acerhdf: convert to dev_pm_ops
    acerhdf: fix fan control for AOA150 model
    thermal: add missing Kconfig dependency
    acpi: switch /proc/acpi/{debug_layer,debug_level} to seq_file
    hp-wmi: fix rfkill memory leak on unload
    ACPI: remove unnecessary #ifdef CONFIG_DMI
    ACPI: linux/acpi.h should not include linux/dmi.h
    hwmon driver for ACPI 4.0 power meters
    topstar-laptop: add new driver for hotkeys support on Topstar N01
    thinkpad_acpi: fix rfkill memory leak on unload
    thinkpad-acpi: report brightness events when required
    thinkpad-acpi: don't poll by default any of the reserved hotkeys
    thinkpad-acpi: Fix procfs hotkey reset command
    thinkpad-acpi: deprecate hotkey_bios_mask
    thinkpad-acpi: hotkey poll fixes
    thinkpad-acpi: be more strict when detecting a ThinkPad
    ...

    Linus Torvalds