deliverable/linux.git
11 years agoMerge branch 'pci/gavin-msi-cleanup' into next
Bjorn Helgaas [Wed, 24 Apr 2013 17:37:49 +0000 (11:37 -0600)] 
Merge branch 'pci/gavin-msi-cleanup' into next

* pci/gavin-msi-cleanup:
  vfio-pci: Use cached MSI/MSI-X capabilities
  vfio-pci: Use PCI_MSIX_TABLE_BIR, not PCI_MSIX_FLAGS_BIRMASK
  PCI: Remove "extern" from function declarations
  PCI: Use PCI_MSIX_TABLE_BIR, not PCI_MSIX_FLAGS_BIRMASK
  PCI: Drop msi_mask_reg() and remove drivers/pci/msi.h
  PCI: Use msix_table_size() directly, drop multi_msix_capable()
  PCI: Drop msix_table_offset_reg() and msix_pba_offset_reg() macros
  PCI: Drop is_64bit_address() and is_mask_bit_support() macros
  PCI: Drop msi_data_reg() macro
  PCI: Drop msi_lower_address_reg() and msi_upper_address_reg() macros
  PCI: Drop msi_control_reg() macro and use PCI_MSI_FLAGS directly
  PCI: Use cached MSI/MSI-X offsets from dev, not from msi_desc
  PCI: Clean up MSI/MSI-X capability #defines
  PCI: Use cached MSI-X cap while enabling MSI-X
  PCI: Use cached MSI cap while enabling MSI interrupts
  PCI: Remove MSI/MSI-X cap check in pci_msi_check_device()
  PCI: Cache MSI/MSI-X capability offsets in struct pci_dev
  PCI: Use u8, not int, for PM capability offset
  [SCSI] megaraid_sas: Use correct #define for MSI-X capability

11 years agovfio-pci: Use cached MSI/MSI-X capabilities
Bjorn Helgaas [Thu, 18 Apr 2013 21:12:58 +0000 (15:12 -0600)] 
vfio-pci: Use cached MSI/MSI-X capabilities

We now cache the MSI/MSI-X capability offsets in the struct pci_dev,
so no need to find the capabilities again.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
11 years agovfio-pci: Use PCI_MSIX_TABLE_BIR, not PCI_MSIX_FLAGS_BIRMASK
Bjorn Helgaas [Thu, 18 Apr 2013 18:42:58 +0000 (12:42 -0600)] 
vfio-pci: Use PCI_MSIX_TABLE_BIR, not PCI_MSIX_FLAGS_BIRMASK

PCI_MSIX_FLAGS_BIRMASK is mis-named because the BIR mask is in the
Table Offset register, not the flags ("Message Control" per spec)
register.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
11 years agoPCI: Remove "extern" from function declarations
Bjorn Helgaas [Thu, 18 Apr 2013 16:55:46 +0000 (10:55 -0600)] 
PCI: Remove "extern" from function declarations

We had an inconsistent mix of using and omitting the "extern" keyword
on function declarations in header files.  This removes them all.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agoPCI: Use PCI_MSIX_TABLE_BIR, not PCI_MSIX_FLAGS_BIRMASK
Bjorn Helgaas [Thu, 18 Apr 2013 00:10:07 +0000 (18:10 -0600)] 
PCI: Use PCI_MSIX_TABLE_BIR, not PCI_MSIX_FLAGS_BIRMASK

PCI_MSIX_FLAGS_BIRMASK is mis-named because the BIR mask is in the
Table Offset register, not the flags ("Message Control" per spec)
register.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agoPCI: Drop msi_mask_reg() and remove drivers/pci/msi.h
Bjorn Helgaas [Wed, 17 Apr 2013 23:58:47 +0000 (17:58 -0600)] 
PCI: Drop msi_mask_reg() and remove drivers/pci/msi.h

msi_mask_reg() doesn't provide any useful abstraction, do drop it.

Remove the now-empty drivers/pci/msi.h.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agoPCI: Use msix_table_size() directly, drop multi_msix_capable()
Bjorn Helgaas [Wed, 17 Apr 2013 23:44:48 +0000 (17:44 -0600)] 
PCI: Use msix_table_size() directly, drop multi_msix_capable()

The users of multi_msix_capable() are really interested in the table
size, so just say what we mean.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agoPCI: Drop msix_table_offset_reg() and msix_pba_offset_reg() macros
Bjorn Helgaas [Wed, 17 Apr 2013 23:43:40 +0000 (17:43 -0600)] 
PCI: Drop msix_table_offset_reg() and msix_pba_offset_reg() macros

msix_table_offset_reg() is used only once and adds a useless indirection,
so just use the table offset directly.

msix_pba_offset_reg() is unused, so just delete it.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agoPCI: Drop is_64bit_address() and is_mask_bit_support() macros
Bjorn Helgaas [Wed, 17 Apr 2013 23:42:30 +0000 (17:42 -0600)] 
PCI: Drop is_64bit_address() and is_mask_bit_support() macros

is_64bit_address() and is_mask_bit_support() don't provide any useful
abstraction, so drop them.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agoPCI: Drop msi_data_reg() macro
Bjorn Helgaas [Wed, 17 Apr 2013 23:41:13 +0000 (17:41 -0600)] 
PCI: Drop msi_data_reg() macro

msi_data_reg() doesn't provide any useful abstraction, so drop it.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agoPCI: Drop msi_lower_address_reg() and msi_upper_address_reg() macros
Bjorn Helgaas [Wed, 17 Apr 2013 23:39:57 +0000 (17:39 -0600)] 
PCI: Drop msi_lower_address_reg() and msi_upper_address_reg() macros

msi_lower_address_reg() and msi_upper_address_reg() don't provide any
useful abstraction, so drop them.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agoPCI: Drop msi_control_reg() macro and use PCI_MSI_FLAGS directly
Bjorn Helgaas [Wed, 17 Apr 2013 23:38:32 +0000 (17:38 -0600)] 
PCI: Drop msi_control_reg() macro and use PCI_MSI_FLAGS directly

Note the error in pci_msix_table_size() -- we used PCI_MSI_FLAGS to
locate the PCI_MSIX_FLAGS word.  No actual breakage because PCI_MSI_FLAGS
and PCI_MSIX_FLAGS happen to be the same.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agoPCI: Use cached MSI/MSI-X offsets from dev, not from msi_desc
Bjorn Helgaas [Wed, 17 Apr 2013 23:34:36 +0000 (17:34 -0600)] 
PCI: Use cached MSI/MSI-X offsets from dev, not from msi_desc

We always know the type (MSI vs MSI-X), so we can use the correct
cached capability offset rather than relying on the copy in the
msi_attrib.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agoPCI: Clean up MSI/MSI-X capability #defines
Bjorn Helgaas [Wed, 17 Apr 2013 23:26:23 +0000 (17:26 -0600)] 
PCI: Clean up MSI/MSI-X capability #defines

This doesn't change any existing symbols, but it puts them in logical
order and uses explicit masks instead of shifts, like the rest of the
file.

It also adds new symbols for PCI_MSIX_TABLE_BIR,
PCI_MSIX_TABLE_OFFSET, PCI_MSIX_PBA_BIR, and PCI_MSIX_PBA_OFFSET to
replace the mis-named PCI_MSIX_FLAGS_BIRMASK (the BAR index fields
are part of the Table and PBA registers, not the flags register).

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agoPCI: Use cached MSI-X cap while enabling MSI-X
Gavin Shan [Thu, 4 Apr 2013 16:54:33 +0000 (16:54 +0000)] 
PCI: Use cached MSI-X cap while enabling MSI-X

The patch uses the cached MSI-X capability offset in
pci_dev instead of reading it from config space when enabling
MSI-X interrupts.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agoPCI: Use cached MSI cap while enabling MSI interrupts
Gavin Shan [Thu, 4 Apr 2013 16:54:32 +0000 (16:54 +0000)] 
PCI: Use cached MSI cap while enabling MSI interrupts

The patch uses the cached MSI capability offset in pci_dev instead
of reading it from config space when enabling MSI interrupts.

[bhelgaas: removed unrelated msi_control_reg() changes]
Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agoPCI: Remove MSI/MSI-X cap check in pci_msi_check_device()
Gavin Shan [Thu, 4 Apr 2013 16:54:31 +0000 (16:54 +0000)] 
PCI: Remove MSI/MSI-X cap check in pci_msi_check_device()

The function pci_msi_check_device() is called while enabling MSI
or MSI-X interrupts to make sure the PCI device can support MSI
or MSI-X capability.  This patch removes the check on MSI or MSI-X
capability in the function and lets the caller do the check.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agoPCI: Cache MSI/MSI-X capability offsets in struct pci_dev
Gavin Shan [Thu, 4 Apr 2013 16:54:30 +0000 (16:54 +0000)] 
PCI: Cache MSI/MSI-X capability offsets in struct pci_dev

The patch caches the MSI and MSI-X capability offset in PCI device
(struct pci_dev) so that we needn't read it from the config space
upon enabling or disabling MSI or MSI-X interrupts.

[bhelgaas: moved pm_cap size change to separate patch]
Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agoPCI: Use u8, not int, for PM capability offset
Bjorn Helgaas [Wed, 17 Apr 2013 22:57:56 +0000 (16:57 -0600)] 
PCI: Use u8, not int, for PM capability offset

The Power Management Capability (PCI_CAP_ID_PM == 0x01) is defined by PCI
and must appear in the 256-byte PCI Configuration Space from 0-0xff.  It
cannot be in the PCIe Extended Configuration space from 0x100-0xfff, so
we only need a u8 to hold its offset.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
11 years ago[SCSI] megaraid_sas: Use correct #define for MSI-X capability
Bjorn Helgaas [Thu, 18 Apr 2013 00:08:44 +0000 (18:08 -0600)] 
[SCSI] megaraid_sas: Use correct #define for MSI-X capability

Previously we used PCI_MSI_FLAGS to locate a register in the MSI-X
capability.  This did work because the MSI and MSI-X flags happen
to be at the same offsets, but was confusing.

PCI_MSIX_FLAGS_ENABLE is already defined in include/uapi/linux/pci_regs.h,
so no need to define it again.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Adam Radford <aradford@gmail.com>
11 years agoMerge branch 'pci/rafael-pm' into next
Bjorn Helgaas [Wed, 17 Apr 2013 16:43:16 +0000 (10:43 -0600)] 
Merge branch 'pci/rafael-pm' into next

* pci/rafael-pm:
  PCI/PM: Make pci_pme_active() ignore devices without PME support
  PCI/PM: Fix fallback to PCI_D0 in pci_platform_power_transition()

11 years agoMerge branch 'pci/cleanup' into next
Bjorn Helgaas [Wed, 17 Apr 2013 16:31:34 +0000 (10:31 -0600)] 
Merge branch 'pci/cleanup' into next

* pci/cleanup:
  PCI: Remove "extern" from function declarations
  PCI: Warn about failures instead of "must_check" functions
  PCI: Remove __must_check from definitions
  PCI: Remove unused variables
  PCI: Move cpci_hotplug_init() proto to header file
  PCI: Make local functions/structs static
  PCI: Fix missing prototype for pcie_port_acpi_setup()

Conflicts:
drivers/pci/hotplug/acpiphp.h
include/linux/pci.h

11 years agoPCI: Remove "extern" from function declarations
Bjorn Helgaas [Fri, 12 Apr 2013 18:02:59 +0000 (12:02 -0600)] 
PCI: Remove "extern" from function declarations

We had an inconsistent mix of using and omitting the "extern" keyword
on function declarations in header files.  This removes them all.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agoPCI: Warn about failures instead of "must_check" functions
Bjorn Helgaas [Fri, 12 Apr 2013 17:35:40 +0000 (11:35 -0600)] 
PCI: Warn about failures instead of "must_check" functions

These places capture return values to avoid "must_check" warnings,
but we didn't *do* anything with the return values, which causes
"set but not used" warnings.  We might as well do something instead
of just trying to evade the "must_check" warnings.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agoPCI: Remove __must_check from definitions
Bjorn Helgaas [Fri, 12 Apr 2013 17:18:07 +0000 (11:18 -0600)] 
PCI: Remove __must_check from definitions

The __must_check (gcc "warn_unused_result") attribute only makes sense
when compiling the *caller* of the function, so the attribute should
appear on the declaration in the header file, not on the definition.

The declarations of these functions are already annotated with
__must_check.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agoMerge branch 'pci/jiang-subdrivers' into next
Bjorn Helgaas [Tue, 16 Apr 2013 16:37:22 +0000 (10:37 -0600)] 
Merge branch 'pci/jiang-subdrivers' into next

* pci/jiang-subdrivers:
  PCI/ACPI: Remove support of ACPI PCI subdrivers
  PCI: acpiphp: Protect acpiphp data structures from concurrent updates
  PCI: acpiphp: Use normal list to simplify implementation
  PCI: acpiphp: Do not use ACPI PCI subdriver mechanism
  PCI: acpiphp: Convert acpiphp to be builtin only, not modular
  PCI/ACPI: Handle PCI slot devices when creating/destroying PCI buses
  x86/PCI: Implement pcibios_{add|remove}_bus() hooks
  ia64/PCI: Implement pcibios_{add|remove}_bus() hooks
  PCI/ACPI: Prepare stub functions to handle ACPI PCI (hotplug) slots
  PCI: Add pcibios hooks for adding and removing PCI buses
  PCI: acpiphp: Replace local macros with standard ACPI macros
  PCI: acpiphp: Remove all functions even if function 0 doesn't exist
  PCI: acpiphp: Use list_for_each_entry_safe() in acpiphp_sanitize_bus()
  PCI: Clean up usages of pci_bus->is_added
  PCI: When removing bus, always remove legacy files & unregister

11 years agoPCI/ACPI: Remove support of ACPI PCI subdrivers
Myron Stowe [Fri, 12 Apr 2013 05:44:30 +0000 (05:44 +0000)] 
PCI/ACPI: Remove support of ACPI PCI subdrivers

Both sub-drivers of the "PCI Root Bridge ("pci_bridge")" driver, "acpiphp"
and "pci_slot", have been converted to hook directly into the PCI core.

With the conversions there are no remaining usages of the 'struct
acpi_pci_driver' list based infrastructure.  This patch removes it.

Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Yinghai Lu <yinghai@kernel.org>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Toshi Kani <toshi.kani@hp.com>
11 years agoPCI: acpiphp: Protect acpiphp data structures from concurrent updates
Jiang Liu [Fri, 12 Apr 2013 05:44:28 +0000 (05:44 +0000)] 
PCI: acpiphp: Protect acpiphp data structures from concurrent updates

Now acpiphp_enumerate_slots() and acpiphp_remove_slots() may be invoked
concurrently by the PCI core, so add a bridge_mutex and reference count
mechanism to protect acpiphp bridge/slot/function data structures.

To avoid deadlock, handle_hotplug_event_bridge() will requeue the
hotplug event onto the kacpi_hotplug_wq by calling alloc_acpi_hp_work().
But the workaround has introduced a minor race window because the
'bridge' passed to _handle_hotplug_event_bridge() may have already been
destroyed when _handle_hotplug_event_bridge() is actually executed by
the kacpi_hotplug_wq.  So hold a reference count on the passed 'bridge'.
Fix the same issue for handle_hotplug_event_func() too.

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Yinghai Lu <yinghai@kernel.org>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Toshi Kani <toshi.kani@hp.com>
11 years agoPCI: acpiphp: Use normal list to simplify implementation
Yijing Wang [Fri, 12 Apr 2013 05:44:27 +0000 (05:44 +0000)] 
PCI: acpiphp: Use normal list to simplify implementation

Use normal list for struct acpiphp_slot to simplify implementation.

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Yinghai Lu <yinghai@kernel.org>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Toshi Kani <toshi.kani@hp.com>
11 years agoMerge branch 'pci/misc' into next
Bjorn Helgaas [Mon, 15 Apr 2013 20:37:28 +0000 (14:37 -0600)] 
Merge branch 'pci/misc' into next

* pci/misc:
  PCI: Clean up quirk_io_region
  PCI: Use vma_pages() to replace (vm_end - vm_start) >> PAGE_SHIFT
  PCI: Use PCI_EXP_SLTCAP_PSN mask when extracting slot number
  PCI: Remove unnecessary dependencies between PME and ACPI
  [SCSI] mvumi: Use PCI_VENDOR_ID_MARVELL_EXT for 0x1b4b
  [SCSI] mvsas: Use PCI_VENDOR_ID_MARVELL_EXT for 0x1b4b
  ahci: Use PCI_VENDOR_ID_MARVELL_EXT for 0x1b4b
  PCI: Define macro for Marvell vendor ID
  PCI: Add MSI INTX_DISABLE quirks for AR8161/AR8162/AR8171/AR8172/E210X
  PCI: aer_inject: Fix return values when device not found

11 years agoMerge branch 'pci/bjorn-eisa' into next
Bjorn Helgaas [Mon, 15 Apr 2013 20:36:22 +0000 (14:36 -0600)] 
Merge branch 'pci/bjorn-eisa' into next

* pci/bjorn-eisa:
  EISA: Log device resources in dmesg
  EISA: Initialize device before its resources
  EISA: Mark vendor ID resource as I/O port space
  EISA: Use dev_printk() when possible

11 years agoEISA: Log device resources in dmesg
Bjorn Helgaas [Mon, 15 Apr 2013 20:34:07 +0000 (14:34 -0600)] 
EISA: Log device resources in dmesg

Note the resources consumed by EISA devices in dmesg, similar to what
we already do for PCI and PNP devices.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agoEISA: Initialize device before its resources
Bjorn Helgaas [Mon, 15 Apr 2013 20:34:02 +0000 (14:34 -0600)] 
EISA: Initialize device before its resources

Move eisa_init_device() before eisa_request_resources() so the device
name is set before we set up its resources.  That way we can print
better messages.

Previously edev->res[i].name was set to NULL in eisa_request_resources(),
then filled in by eisa_init_device().  Now it is filled in by
eisa_init_device() first, and we don't want to clear it out later in
eisa_request_resources().

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agoEISA: Mark vendor ID resource as I/O port space
Bjorn Helgaas [Mon, 15 Apr 2013 20:33:56 +0000 (14:33 -0600)] 
EISA: Mark vendor ID resource as I/O port space

Previously we marked this as merely IORESOURCE_BUSY without indicating
the type.  Setting the type makes %pR on the resource work better.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agoEISA: Use dev_printk() when possible
Bjorn Helgaas [Mon, 15 Apr 2013 20:33:42 +0000 (14:33 -0600)] 
EISA: Use dev_printk() when possible

Use dev_printk() when possible to make messages more useful.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agoPCI: Clean up quirk_io_region
Yinghai Lu [Fri, 12 Apr 2013 12:44:15 +0000 (12:44 +0000)] 
PCI: Clean up quirk_io_region

Before every call of quirk_io_region(), pci_read_config_word() is called.
We can fold that call into quirk_io_region() to make code more readable.

[bhelgaas: changelog, fill bus_region directly rather than copying from res]
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agoPCI: Use vma_pages() to replace (vm_end - vm_start) >> PAGE_SHIFT
Libin [Mon, 15 Apr 2013 02:48:54 +0000 (02:48 +0000)] 
PCI: Use vma_pages() to replace (vm_end - vm_start) >> PAGE_SHIFT

(*->vm_end - *->vm_start) >> PAGE_SHIFT operation is implemented
as an inline funcion vma_pages() in linux/mm.h, so use it.

Signed-off-by: Libin <huawei.libin@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agoPCI: Use PCI_EXP_SLTCAP_PSN mask when extracting slot number
Bjorn Helgaas [Tue, 9 Apr 2013 22:46:12 +0000 (16:46 -0600)] 
PCI: Use PCI_EXP_SLTCAP_PSN mask when extracting slot number

Use PCI_EXP_SLTCAP_PSN mask to make it easier to find where the
Physical Slot Number is used.

The Physical Slot Number is bits 31:19 of the Slot Capabilities Register,
and slot_cap is a u32, so the mask is technically unnecessary, but it's
helpful for human readers.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agoPCI: Remove unnecessary dependencies between PME and ACPI
Bjorn Helgaas [Thu, 11 Apr 2013 23:36:50 +0000 (17:36 -0600)] 
PCI: Remove unnecessary dependencies between PME and ACPI

PCIe PME doesn't depend on ACPI, so remove the #includes and
Kconfig dependency.

Based-on-patch-by: Andrew Murray <Andrew.Murray@arm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
11 years ago[SCSI] mvumi: Use PCI_VENDOR_ID_MARVELL_EXT for 0x1b4b
Myron Stowe [Mon, 8 Apr 2013 17:37:55 +0000 (11:37 -0600)] 
[SCSI] mvumi: Use PCI_VENDOR_ID_MARVELL_EXT for 0x1b4b

With the 0x1b4b vendor ID #define in place, convert hard-coded ID
values.

Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: James Bottomley <James.Bottomley@hansenpartnership.com>
11 years ago[SCSI] mvsas: Use PCI_VENDOR_ID_MARVELL_EXT for 0x1b4b
Myron Stowe [Mon, 8 Apr 2013 17:35:44 +0000 (11:35 -0600)] 
[SCSI] mvsas: Use PCI_VENDOR_ID_MARVELL_EXT for 0x1b4b

With the 0x1b4b vendor ID #define in place, convert hard-coded ID
values.

Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: James Bottomley <James.Bottomley@hansenpartnership.com>
11 years agoahci: Use PCI_VENDOR_ID_MARVELL_EXT for 0x1b4b
Myron Stowe [Mon, 8 Apr 2013 17:32:49 +0000 (11:32 -0600)] 
ahci: Use PCI_VENDOR_ID_MARVELL_EXT for 0x1b4b

With the 0x1b4b vendor ID #define in place, convert hard-coded ID
values.

Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Jeff Garzik <jgarzik@pobox.com>
11 years agoPCI: Define macro for Marvell vendor ID
Xiangliang Yu [Thu, 21 Mar 2013 04:34:56 +0000 (22:34 -0600)] 
PCI: Define macro for Marvell vendor ID

Define PCI_VENDOR_ID_MARVELL_EXT macro for 0x1b4b vendor ID

Signed-off-by: Xiangliang Yu <yuxiangl@marvell.com>
Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agoMerge branch 'pci/gabor-get-of-node' into next
Bjorn Helgaas [Mon, 15 Apr 2013 20:26:15 +0000 (14:26 -0600)] 
Merge branch 'pci/gabor-get-of-node' into next

* pci/gabor-get-of-node:
  MIPS/PCI: Implement pcibios_get_phb_of_node
  PCI: Remove __weak annotation from pcibios_get_phb_of_node decl

11 years agoPCI/PM: Make pci_pme_active() ignore devices without PME support
Rafael J. Wysocki [Wed, 10 Apr 2013 10:32:51 +0000 (10:32 +0000)] 
PCI/PM: Make pci_pme_active() ignore devices without PME support

Make pci_pme_active() ignore devices without PME support, so that
it doesn't print the "PME enabled" or "PME disabled" debug messages
for devices that don't support PME.

So that pci_pme_active() doesn't have to check pm_cap in addition
to pme_support, make pci_pm_init() clear pme_support upfront to
make sure that it will be 0 for pm_cap equal to 0.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agoPCI/PM: Fix fallback to PCI_D0 in pci_platform_power_transition()
Rafael J. Wysocki [Fri, 12 Apr 2013 13:58:17 +0000 (13:58 +0000)] 
PCI/PM: Fix fallback to PCI_D0 in pci_platform_power_transition()

Commit b51306c (PCI: Set device power state to PCI_D0 for device
without native PM support) modified pci_platform_power_transition()
by adding code causing dev->current_state for devices that don't
support native PCI PM but are power-manageable by the platform to be
changed to PCI_D0 regardless of the value returned by the preceding
platform_pci_set_power_state().  In particular, that also is done
if the platform_pci_set_power_state() has been successful, which
causes the correct power state of the device set by
pci_update_current_state() in that case to be overwritten by PCI_D0.

Fix that mistake by making the fallback to PCI_D0 only happen if
the platform_pci_set_power_state() has returned an error.

[bhelgaas: folded in Yinghai's simplification, added URL & stable info]
Reference: http://lkml.kernel.org/r/27806FC4E5928A408B78E88BBC67A2306F466BBA@ORSMSX101.amr.corp.intel.com
Reported-by: Chris J. Benenati <chris.j.benenati@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
Cc: <stable@vger.kernel.org> # v3.2+
11 years agoPCI: Remove unused variables
Bjorn Helgaas [Fri, 12 Apr 2013 17:18:01 +0000 (11:18 -0600)] 
PCI: Remove unused variables

This fixes "set but not used" warnings found via "make W=1".

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agoPCI: Move cpci_hotplug_init() proto to header file
Bjorn Helgaas [Mon, 15 Apr 2013 16:44:18 +0000 (10:44 -0600)] 
PCI: Move cpci_hotplug_init() proto to header file

cpci_hotplug_init() and cpci_hotplug_exit() are defined in
cpci_hotplug_core.c but had extern declarations in pci_hotplug_core.c.
This puts the declarations in a header file included both places so
the compiler can help keep everything consistent.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agoPCI: acpiphp: Do not use ACPI PCI subdriver mechanism
Jiang Liu [Fri, 12 Apr 2013 05:44:26 +0000 (05:44 +0000)] 
PCI: acpiphp: Do not use ACPI PCI subdriver mechanism

Previously the acpiphp driver registered itself as an ACPI PCI subdriver,
so its callbacks were invoked when creating/destroying PCI root
buses to manage ACPI-based PCI hotplug slots.  But it doesn't handle
P2P bridge hotplug events, so it will cause strange behaviour if there
are hotplug slots associated with a hot-removed P2P bridge.

This patch fixes this issue by:
1) Directly hooking into PCI core to update hotplug slot devices when
   creating/destroying PCI buses through:
pci_{add|remove}_bus() -> acpi_pci_{add|remove}_bus()
2) Getting rid of unused ACPI PCI subdriver-related code

It also cleans up unused code in the acpiphp driver.

[bhelgaas: keep acpi_pci_add_bus() stub for CONFIG_ACPI=n]
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Yinghai Lu <yinghai@kernel.org>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Toshi Kani <toshi.kani@hp.com>
11 years agoPCI: acpiphp: Convert acpiphp to be builtin only, not modular
Jiang Liu [Fri, 12 Apr 2013 05:44:25 +0000 (05:44 +0000)] 
PCI: acpiphp: Convert acpiphp to be builtin only, not modular

Convert acpiphp to be builtin only, with no module option.

Previously, when HOTPLUG_PCI_ACPI=m, users could disable acpiphp by
removing the module or preventing it from loading.  That can't be done
if acpiphp is builtin statically, so this adds an "acpiphp.disable"
kernel parameter.  If a user needs to use this parameter, it is a bug,
and we want to hear about it.

[bhelgaas: fold in acpiphp.disable here, remove documentation]
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agoPCI/ACPI: Handle PCI slot devices when creating/destroying PCI buses
Jiang Liu [Fri, 12 Apr 2013 05:44:24 +0000 (05:44 +0000)] 
PCI/ACPI: Handle PCI slot devices when creating/destroying PCI buses

Currently the pci_slot driver doesn't update PCI slot devices when PCI
device hotplug event happens, which may cause memory leak and returning
stale information to user.

Now the pci_slot driver has been changed as built-in driver, so invoke
PCI slot enumeration and destroy routines directly from the PCI core.
And remove ACPI PCI sub-driver related code because it isn't needed
any more.

[bhelgas: removed "extern" from function declarations]
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Yinghai Lu <yinghai@kernel.org>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Toshi Kani <toshi.kani@hp.com>
11 years agox86/PCI: Implement pcibios_{add|remove}_bus() hooks
Jiang Liu [Fri, 12 Apr 2013 05:44:23 +0000 (05:44 +0000)] 
x86/PCI: Implement pcibios_{add|remove}_bus() hooks

Implement pcibios_{add|remove}_bus() hooks for x86 platforms.

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Yinghai Lu <yinghai@kernel.org>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Toshi Kani <toshi.kani@hp.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Myron Stowe <myron.stowe@redhat.com>
11 years agoia64/PCI: Implement pcibios_{add|remove}_bus() hooks
Jiang Liu [Fri, 12 Apr 2013 05:44:22 +0000 (05:44 +0000)] 
ia64/PCI: Implement pcibios_{add|remove}_bus() hooks

Implement pcibios_{add|remove}_bus() hooks for IA64 platforms.

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Yinghai Lu <yinghai@kernel.org>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Toshi Kani <toshi.kani@hp.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
11 years agoPCI/ACPI: Prepare stub functions to handle ACPI PCI (hotplug) slots
Jiang Liu [Fri, 12 Apr 2013 05:44:21 +0000 (05:44 +0000)] 
PCI/ACPI: Prepare stub functions to handle ACPI PCI (hotplug) slots

Prepare two stub functions to handle ACPI PCI slots and ACPI PCI hotplug
slots, which will be invoked by the PCI core when creating/destroying
PCI buses.

It will be used to get rid of ACPI PCI subdrivers for pci_slot and
acpiphp, and eventually remove the ACPI PCI subdriver mechanism.

And it will also be used to handle ACPI PCI (hotplug) slots in a unified
way, both at boot time and for PCI hotplug operations.

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Yinghai Lu <yinghai@kernel.org>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Toshi Kani <toshi.kani@hp.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Myron Stowe <myron.stowe@redhat.com>
11 years agoPCI: Add pcibios hooks for adding and removing PCI buses
Jiang Liu [Fri, 12 Apr 2013 05:44:20 +0000 (05:44 +0000)] 
PCI: Add pcibios hooks for adding and removing PCI buses

On ACPI-based platforms, the pci_slot driver creates PCI slot devices
according to information from ACPI tables by registering an ACPI PCI
subdriver.  The ACPI PCI subdriver will only be called when creating/
destroying PCI root buses, and it won't be called when hot-plugging
P2P bridges.  It may cause stale PCI slot devices after hot-removing
a P2P bridge if that bridge has associated PCI slots.  And the acpiphp
driver has the same issue too.

This patch introduces two hook points into the PCI core, which will
be invoked when creating/destroying PCI buses for PCI host and P2P
bridges.  They could be used to setup/destroy platform dependent stuff
in a unified way, both at boot time and for PCI hotplug operations.

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Yinghai Lu <yinghai@kernel.org>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Toshi Kani <toshi.kani@hp.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Myron Stowe <myron.stowe@redhat.com>
11 years agoPCI: acpiphp: Replace local macros with standard ACPI macros
Jiang Liu [Fri, 12 Apr 2013 05:44:19 +0000 (05:44 +0000)] 
PCI: acpiphp: Replace local macros with standard ACPI macros

Replace local defined macros (ACPI_STA_xxx) with standard ACPI macros
(ACPI_STA_DEVICE_xxx).

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Yinghai Lu <yinghai@kernel.org>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Toshi Kani <toshi.kani@hp.com>
11 years agoPCI: acpiphp: Remove all functions even if function 0 doesn't exist
Jiang Liu [Fri, 12 Apr 2013 05:44:18 +0000 (05:44 +0000)] 
PCI: acpiphp: Remove all functions even if function 0 doesn't exist

Currently function disable_device() detects slot state by checking
existence of PCI function 0.  It's unreliable because the PCI device
for function 0 may be removed through the sysfs interface.  If that
happens, it will cause powering off a hotplug slot without destroying
all PCI devices.

On the other hand, it won't hurt us except wasting some computation
power if the check is removed, because all code of disable_device()
is self-protected.  So remove the check.

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Yinghai Lu <yinghai@kernel.org>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Toshi Kani <toshi.kani@hp.com>
11 years agoPCI: acpiphp: Use list_for_each_entry_safe() in acpiphp_sanitize_bus()
Yijing Wang [Fri, 12 Apr 2013 05:44:17 +0000 (05:44 +0000)] 
PCI: acpiphp: Use list_for_each_entry_safe() in acpiphp_sanitize_bus()

Function acpiphp_sanitize_bus() may call pci_stop_and_remove_bus_device(),
which in turn may remove device from bus->devices list. So walk the
bus->devices list with list_for_each_entry_safe().

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Yinghai Lu <yinghai@kernel.org>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Toshi Kani <toshi.kani@hp.com>
11 years agoPCI: Clean up usages of pci_bus->is_added
Jiang Liu [Fri, 12 Apr 2013 05:44:16 +0000 (05:44 +0000)] 
PCI: Clean up usages of pci_bus->is_added

Now pci_bus->is_added is only used to guard invoking of
pcibios_fixup_bus() in pci_scan_child_bus(), so just set
it directly after the fixups and remove the other test
and set in pci_bus_add_devices().

[bhelgaas: changelog]
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Yinghai Lu <yinghai@kernel.org>
11 years agoPCI: When removing bus, always remove legacy files & unregister
Jiang Liu [Fri, 12 Apr 2013 05:44:15 +0000 (05:44 +0000)] 
PCI: When removing bus, always remove legacy files & unregister

We always call device_register() and pci_create_legacy_files() for a
new bus before handing out the "struct pci_bus *".  Therefore, there's
no possiblity of removing the bus with pci_remove_bus() before those
calls have been made, so we don't need to check "bus->is_added" before
calling pci_remove_legacy_files() and device_unregister().

[bhelgaas: changelog]
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Yinghai Lu <yinghai@kernel.org>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Toshi Kani <toshi.kani@hp.com>
11 years agoPCI: Make local functions/structs static
Bjorn Helgaas [Fri, 12 Apr 2013 17:20:03 +0000 (11:20 -0600)] 
PCI: Make local functions/structs static

This fixes "no previous prototype" warnings found via "make W=1".

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agoPCI: Fix missing prototype for pcie_port_acpi_setup()
Andy Shevchenko [Fri, 12 Apr 2013 17:17:47 +0000 (11:17 -0600)] 
PCI: Fix missing prototype for pcie_port_acpi_setup()

This fixes a "no previous prototype" warning for pcie_port_acpi_setup()
found via "make W=1".

[bhelgaas: changelog]
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agoMIPS/PCI: Implement pcibios_get_phb_of_node
Gabor Juhos [Thu, 4 Apr 2013 18:01:23 +0000 (20:01 +0200)] 
MIPS/PCI: Implement pcibios_get_phb_of_node

The of_node field of the device assigned to a
PCI bus is used during scanning of the PCI bus.
However on MIPS, the of_node field is assigned
only after the bus has been scanned.

Implement the architecture specific version of
'pcibios_get_phb_of_node'. Which ensures that the
PCI driver core will initialize the of_node field
before starting the scan.

Also remove the local assignment of bus->dev.of_node,
it is not needed after the patch.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agoPCI: Remove __weak annotation from pcibios_get_phb_of_node decl
Bjorn Helgaas [Wed, 10 Apr 2013 15:56:54 +0000 (09:56 -0600)] 
PCI: Remove __weak annotation from pcibios_get_phb_of_node decl

The __weak annotation on the pcibios_get_phb_of_node() declaration
causes *every* definition to be marked "weak."  The linker then
selects one based on link order, which may be the wrong one.

Gabor found that on MIPS, the linker selected the generic implementation
from drivers/pci even though arch/mips supplied a definition without the
__weak annotation:

$ mipsel-openwrt-linux-readelf -s arch/mips/pci/built-in.o \
    drivers/pci/built-in.o vmlinux.o | grep pcibios_get_phb_of_node
      86: 0000046c    12 FUNC    WEAK   DEFAULT    2 pcibios_get_phb_of_node
    1430: 00012e2c   104 FUNC    WEAK   DEFAULT    2 pcibios_get_phb_of_node
   31898: 0017e4ec   104 FUNC    WEAK   DEFAULT    2 pcibios_get_phb_of_node

This removes the __weak annotation from the pcibios_get_phb_of_node()
declaration so arch-specific non-weak implementations work reliably.

Suggested-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agoPCI: Add MSI INTX_DISABLE quirks for AR8161/AR8162/AR8171/AR8172/E210X
Xiong Huang [Thu, 7 Mar 2013 08:55:16 +0000 (08:55 +0000)] 
PCI: Add MSI INTX_DISABLE quirks for AR8161/AR8162/AR8171/AR8172/E210X

The following PCIe devices with revision lower than 0x18 have this bug:

 AR8161(1091)/AR8162(1090)/AR8171(10A1)/AR8172(10A0)/E210X(E091).

Signed-off-by: Huang,Xiong <xiong@qca.qualcomm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Wei Yang <weiyang@linux.vnet.ibm.com>
11 years agoPCI: aer_inject: Fix return values when device not found
Prarit Bhargava [Wed, 20 Mar 2013 12:04:43 +0000 (12:04 +0000)] 
PCI: aer_inject: Fix return values when device not found

Currently the aer_inject driver returns -ENOTTY when the target PCIe
device root port is not found or if the device or root port doesn't
support AER.

In the case where the root port isn't found, the driver should return
-ENODEV, and in the other cases it should return -EPERM.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
11 years agoMerge branch 'pci/shuah-defines' into next
Bjorn Helgaas [Fri, 29 Mar 2013 14:55:26 +0000 (08:55 -0600)] 
Merge branch 'pci/shuah-defines' into next

* pci/shuah-defines:
  iommu/amd: Remove calc_devid() and use PCI_DEVID() from PCI
  iommu/amd: Remove local PCI_BUS() define and use PCI_BUS_NUM() from PCI
  PCI/AER: Remove local PCI_BUS() define and use PCI_BUS_NUM() from PCI
  PCI: Add PCI_BUS_NUM() and PCI_DEVID() interfaces

11 years agoiommu/amd: Remove calc_devid() and use PCI_DEVID() from PCI
Shuah Khan [Thu, 28 Feb 2013 00:07:30 +0000 (17:07 -0700)] 
iommu/amd: Remove calc_devid() and use PCI_DEVID() from PCI

Change to remove calc_devid() and use PCI_DEVID() from PCI instead.

Signed-off-by: Shuah Khan <shuah.khan@hp.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Joerg Roedel <joro@8bytes.org>
11 years agoiommu/amd: Remove local PCI_BUS() define and use PCI_BUS_NUM() from PCI
Shuah Khan [Thu, 28 Feb 2013 00:07:19 +0000 (17:07 -0700)] 
iommu/amd: Remove local PCI_BUS() define and use PCI_BUS_NUM() from PCI

Change to remove local PCI_BUS() define and use the new PCI_BUS_NUM()
interface from PCI.

Signed-off-by: Shuah Khan <shuah.khan@hp.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Joerg Roedel <joro@8bytes.org>
11 years agoPCI/AER: Remove local PCI_BUS() define and use PCI_BUS_NUM() from PCI
Shuah Khan [Thu, 28 Feb 2013 00:07:05 +0000 (17:07 -0700)] 
PCI/AER: Remove local PCI_BUS() define and use PCI_BUS_NUM() from PCI

Change to remove local PCI_BUS() define and use the new PCI_BUS_NUM()
interface from PCI.

Signed-off-by: Shuah Khan <shuah.khan@hp.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Joerg Roedel <joro@8bytes.org>
11 years agoPCI: Add PCI_BUS_NUM() and PCI_DEVID() interfaces
Shuah Khan [Thu, 28 Feb 2013 00:06:45 +0000 (17:06 -0700)] 
PCI: Add PCI_BUS_NUM() and PCI_DEVID() interfaces

PCI defines PCI_DEVFN(), PCI_SLOT(), and PCI_FUNC() interfaces; however,
it doesn't have interfaces to return PCI bus and PCI device id. Drivers
(AMD IOMMU, and AER) implement module specific definitions for PCI_BUS()
and AMD_IOMMU driver also has a module specific interface to calculate PCI
device id from bus number and devfn.

Add PCI_BUS_NUM and PCI_DEVID interfaces to return PCI bus number and PCI
device id respectively to avoid the need for duplicate definitions in other
modules. AER driver code and AMD IOMMU driver define PCI_BUS. AMD IOMMU
driver defines an interface to calculate device id from bus number, and
devfn pair.

PCI_DEVFN(), PCI_SLOT(), and PCI_FUNC() interfaces are exported to
user-space via uapi/linux/pci.h. However, in the interest to keep the new
interfaces as kernel only and not export them to user-space unnecessarily,
added them to linux/pci.h instead.

Signed-off-by: Shuah Khan <shuah.khan@hp.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Joerg Roedel <joro@8bytes.org>
11 years agoLinux 3.9-rc2
Linus Torvalds [Sun, 10 Mar 2013 23:54:19 +0000 (16:54 -0700)] 
Linux 3.9-rc2

11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm...
Linus Torvalds [Sun, 10 Mar 2013 00:51:13 +0000 (16:51 -0800)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/ebiederm/user-namespace

Pull namespace bugfixes from Eric Biederman:
 "This is three simple fixes against 3.9-rc1.  I have tested each of
  these fixes and verified they work correctly.

  The userns oops in key_change_session_keyring and the BUG_ON triggered
  by proc_ns_follow_link were found by Dave Jones.

  I am including the enhancement for mount to only trigger requests of
  filesystem modules here instead of delaying this for the 3.10 merge
  window because it is both trivial and the kind of change that tends to
  bit-rot if left untouched for two months."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
  proc: Use nd_jump_link in proc_ns_follow_link
  fs: Limit sys_mount to only request filesystem modules (Part 2).
  fs: Limit sys_mount to only request filesystem modules.
  userns: Stop oopsing in key_change_session_keyring

11 years agoAtmel MXT touchscreen: increase reset timeouts
Linus Torvalds [Sat, 9 Mar 2013 18:31:01 +0000 (10:31 -0800)] 
Atmel MXT touchscreen: increase reset timeouts

There is a more complete atmel patch-series out by Nick Dyer that fixes
this and other things, but in the meantime this is the minimal thing to
get the touchscreen going on (at least my) Pixel Chromebook.

Not that I want my dirty fingers near that beautiful screen, but it
seems that a non-initialized touchscreen will also end up being a
constant wakeup source, so you have to disable it to go to sleep.  And
it's easier to just fix the initialization sequence.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoproc: Use nd_jump_link in proc_ns_follow_link
Eric W. Biederman [Sat, 9 Mar 2013 08:14:45 +0000 (00:14 -0800)] 
proc: Use nd_jump_link in proc_ns_follow_link

Update proc_ns_follow_link to use nd_jump_link instead of just
manually updating nd.path.dentry.

This fixes the BUG_ON(nd->inode != parent->d_inode) reported by Dave
Jones and reproduced trivially with mkdir /proc/self/ns/uts/a.

Sigh it looks like the VFS change to require use of nd_jump_link
happend while proc_ns_follow_link was baking and since the common case
of proc_ns_follow_link continued to work without problems the need for
making this change was overlooked.

Cc: stable@vger.kernel.org
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
Linus Torvalds [Sat, 9 Mar 2013 01:33:20 +0000 (17:33 -0800)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/mason/linux-btrfs

Pull btrfs fixes from Chris Mason:
 "These are scattered fixes and one performance improvement.  The
  biggest functional change is in how we throttle metadata changes.  The
  new code bumps our average file creation rate up by ~13% in fs_mark,
  and lowers CPU usage.

  Stefan bisected out a regression in our allocation code that made
  balance loop on extents larger than 256MB."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: improve the delayed inode throttling
  Btrfs: fix a mismerge in btrfs_balance()
  Btrfs: enforce min_bytes parameter during extent allocation
  Btrfs: allow running defrag in parallel to administrative tasks
  Btrfs: avoid deadlock on transaction waiting list
  Btrfs: do not BUG_ON on aborted situation
  Btrfs: do not BUG_ON in prepare_to_reloc
  Btrfs: free all recorded tree blocks on error
  Btrfs: build up error handling for merge_reloc_roots
  Btrfs: check for NULL pointer in updating reloc roots
  Btrfs: fix unclosed transaction handler when the async transaction commitment fails
  Btrfs: fix wrong handle at error path of create_snapshot() when the commit fails
  Btrfs: use set_nlink if our i_nlink is 0

11 years agoPlatform: x86: chromeos_laptop : Add basic platform data for atmel devices
Benson Leung [Fri, 8 Mar 2013 03:43:34 +0000 (19:43 -0800)] 
Platform: x86: chromeos_laptop : Add basic platform data for atmel devices

Add basic platform data to get the current upstream driver working
with the 224s touchpad and 1664s touchscreen.
We will be using NULL config so we will use the settings from the
devices' NVRAMs.

Signed-off-by: Benson Leung <bleung@chromium.org>
Tested-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoInput: atmel_mxt_ts - Support for touchpad variant
Daniel Kurtz [Fri, 8 Mar 2013 03:43:33 +0000 (19:43 -0800)] 
Input: atmel_mxt_ts - Support for touchpad variant

This same driver can be used by atmel based touchscreens and touchpads
(buttonpads). Platform data may specify a device is a touchpad
using the is_tp flag.

This will cause the driver to perform some touchpad specific
initializations, such as:
  * register input device name "Atmel maXTouch Touchpad" instead of
  Touchscreen.
  * register BTN_LEFT & BTN_TOOL_* event types.
  * register axis resolution (as a fixed constant, for now)
  * register BUTTONPAD property
  * process GPIO buttons using reportid T19

Input event GPIO mapping is done by the platform data key_map array.

key_map[x] should contain the KEY or BTN code to send when processing
GPIOx from T19. To specify a GPIO as not an input source, populate
with KEY_RESERVED, or 0.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Tested-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoMerge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Fri, 8 Mar 2013 23:22:08 +0000 (15:22 -0800)] 
Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6

Pull CIFS fixes from Steve French:
 "A small set of cifs fixes which includes one for a recent regression
  in the write path (pointed out by Anton), some fixes for rename
  problems and as promised for 3.9 removing the obsolete sockopt mount
  option (and the accompanying deprecation warning)."

* 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
  CIFS: Fix missing of oplock_read value in smb30_values structure
  cifs: don't try to unlock pagecache page after releasing it
  cifs: remove the sockopt= mount option
  cifs: Check server capability before attempting silly rename
  cifs: Fix bug when checking error condition in cifs_rename_pending_delete()

11 years agoMerge branch 'akpm' (fixes from Andrew)
Linus Torvalds [Fri, 8 Mar 2013 23:05:42 +0000 (15:05 -0800)] 
Merge branch 'akpm' (fixes from Andrew)

Merge misc fixes from Andrew Morton.

* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
  alpha: boot: fix build breakage introduced by system.h disintegration
  memcg: initialize kmem-cache destroying work earlier
  Randy has moved
  ksm: fix m68k build: only NUMA needs pfn_to_nid
  dmi_scan: fix missing check for _DMI_ signature in smbios_present()
  Revert parts of "hlist: drop the node parameter from iterators"
  idr: remove WARN_ON_ONCE() on negative IDs
  mm/mempolicy.c: fix sp_node_init() argument ordering
  mm/mempolicy.c: fix wrong sp_node insertion
  ipc: don't allocate a copy larger than max
  ipc: fix potential oops when src msg > 4k w/ MSG_COPY

11 years agoalpha: boot: fix build breakage introduced by system.h disintegration
Will Deacon [Fri, 8 Mar 2013 20:43:37 +0000 (12:43 -0800)] 
alpha: boot: fix build breakage introduced by system.h disintegration

Commit ec2212088c42 ("Disintegrate asm/system.h for Alpha") removed the
system.h include from boot/head.S, which puts the PAL_* asm constants
out of scope.

Include <asm/pal.h> so we can get building again.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Cc: David Rusling <david.rusling@linaro.org>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agomemcg: initialize kmem-cache destroying work earlier
Konstantin Khlebnikov [Fri, 8 Mar 2013 20:43:36 +0000 (12:43 -0800)] 
memcg: initialize kmem-cache destroying work earlier

Fix a warning from lockdep caused by calling cancel_work_sync() for
uninitialized struct work.  This path has been triggered by destructon
kmem-cache hierarchy via destroying its root kmem-cache.

  cache ffff88003c072d80
  obj ffff88003b410000 cache ffff88003c072d80
  obj ffff88003b924000 cache ffff88003c20bd40
  INFO: trying to register non-static key.
  the code is fine but needs lockdep annotation.
  turning off the locking correctness validator.
  Pid: 2825, comm: insmod Tainted: G           O 3.9.0-rc1-next-20130307+ #611
  Call Trace:
    __lock_acquire+0x16a2/0x1cb0
    lock_acquire+0x8a/0x120
    flush_work+0x38/0x2a0
    __cancel_work_timer+0x89/0xf0
    cancel_work_sync+0xb/0x10
    kmem_cache_destroy_memcg_children+0x81/0xb0
    kmem_cache_destroy+0xf/0xe0
    init_module+0xcb/0x1000 [kmem_test]
    do_one_initcall+0x11a/0x170
    load_module+0x19b0/0x2320
    SyS_init_module+0xc6/0xf0
    system_call_fastpath+0x16/0x1b

Example module to demonstrate:

  #include <linux/module.h>
  #include <linux/slab.h>
  #include <linux/mm.h>
  #include <linux/workqueue.h>

  int __init mod_init(void)
  {
   int size = 256;
   struct kmem_cache *cache;
   void *obj;
   struct page *page;

   cache = kmem_cache_create("kmem_cache_test", size, size, 0, NULL);
   if (!cache)
   return -ENOMEM;

   printk("cache %p\n", cache);

   obj = kmem_cache_alloc(cache, GFP_KERNEL);
   if (obj) {
   page = virt_to_head_page(obj);
   printk("obj %p cache %p\n", obj, page->slab_cache);
   kmem_cache_free(cache, obj);
   }

   flush_scheduled_work();

   obj = kmem_cache_alloc(cache, GFP_KERNEL);
   if (obj) {
   page = virt_to_head_page(obj);
   printk("obj %p cache %p\n", obj, page->slab_cache);
   kmem_cache_free(cache, obj);
   }

   kmem_cache_destroy(cache);

   return -EBUSY;
  }

  module_init(mod_init);
  MODULE_LICENSE("GPL");

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Glauber Costa <glommer@parallels.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoRandy has moved
Randy Dunlap [Fri, 8 Mar 2013 20:43:35 +0000 (12:43 -0800)] 
Randy has moved

Update email address and CREDITS info.  xenotime.net is defunct.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Harry Wei <harryxiyou@gmail.com>
Cc: Keiichi KII <k-keiichi@bx.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoksm: fix m68k build: only NUMA needs pfn_to_nid
Hugh Dickins [Fri, 8 Mar 2013 20:43:34 +0000 (12:43 -0800)] 
ksm: fix m68k build: only NUMA needs pfn_to_nid

A CONFIG_DISCONTIGMEM=y m68k config gave

  mm/ksm.c: In function `get_kpfn_nid':
  mm/ksm.c:492: error: implicit declaration of function `pfn_to_nid'

linux/mmzone.h declares it for CONFIG_SPARSEMEM and CONFIG_FLATMEM, but
expects the arch's asm/mmzone.h to declare it for CONFIG_DISCONTIGMEM
(see arch/mips/include/asm/mmzone.h for example).

Or perhaps it is only expected when CONFIG_NUMA=y: too much of a maze,
and m68k got away without it so far, so fix the build in mm/ksm.c.

Signed-off-by: Hugh Dickins <hughd@google.com>
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Petr Holasek <pholasek@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agodmi_scan: fix missing check for _DMI_ signature in smbios_present()
Ben Hutchings [Fri, 8 Mar 2013 20:43:32 +0000 (12:43 -0800)] 
dmi_scan: fix missing check for _DMI_ signature in smbios_present()

Commit 9f9c9cbb6057 ("drivers/firmware/dmi_scan.c: fetch dmi version
from SMBIOS if it exists") hoisted the check for "_DMI_" into
dmi_scan_machine(), which means that we don't bother to check for
"_DMI_" at offset 16 in an SMBIOS entry.  smbios_present() may also call
dmi_present() for an address where we found "_SM_", if it failed further
validation.

Check for "_DMI_" in smbios_present() before calling dmi_present().

[akpm@linux-foundation.org: fix build]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Reported-by: Tim McGrath <tmhikaru@gmail.com>
Tested-by: Tim Mcgrath <tmhikaru@gmail.com>
Cc: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoRevert parts of "hlist: drop the node parameter from iterators"
Arnd Bergmann [Fri, 8 Mar 2013 20:43:31 +0000 (12:43 -0800)] 
Revert parts of "hlist: drop the node parameter from iterators"

Commit b67bfe0d42ca ("hlist: drop the node parameter from iterators")
did a lot of nice changes but also contains two small hunks that seem to
have slipped in accidentally and have no apparent connection to the
intent of the patch.

This reverts the two extraneous changes.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Peter Senna Tschudin <peter.senna@gmail.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoidr: remove WARN_ON_ONCE() on negative IDs
Tejun Heo [Fri, 8 Mar 2013 20:43:30 +0000 (12:43 -0800)] 
idr: remove WARN_ON_ONCE() on negative IDs

idr_find(), idr_remove() and idr_replace() used to silently ignore the
sign bit and perform lookup with the rest of the bits.  The weird behavior
has been changed such that negative IDs are treated as invalid.  As the
behavior change was subtle, WARN_ON_ONCE() was added in the hope of
determining who's calling idr functions with negative IDs so that they can
be examined for problems.

Up until now, all two reported cases are ID number coming directly from
userland and getting fed into idr_find() and the warnings seem to cause
more problems than being helpful.  Drop the WARN_ON_ONCE()s.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: <markus@trippelsdorf.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agomm/mempolicy.c: fix sp_node_init() argument ordering
KOSAKI Motohiro [Fri, 8 Mar 2013 20:43:29 +0000 (12:43 -0800)] 
mm/mempolicy.c: fix sp_node_init() argument ordering

Currently, n_new is wrongly initialized.  start and end parameter are
inverted.  Let's fix it.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Hillf Danton <dhillf@gmail.com>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Dave Jones <davej@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agomm/mempolicy.c: fix wrong sp_node insertion
Hillf Danton [Fri, 8 Mar 2013 20:43:28 +0000 (12:43 -0800)] 
mm/mempolicy.c: fix wrong sp_node insertion

n->end is accessed in sp_insert(). Thus it should be update
before calling sp_insert(). This mistake may make kernel panic.

Signed-off-by: Hillf Danton <dhillf@gmail.com>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Dave Jones <davej@redhat.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoipc: don't allocate a copy larger than max
Peter Hurley [Fri, 8 Mar 2013 20:43:27 +0000 (12:43 -0800)] 
ipc: don't allocate a copy larger than max

When MSG_COPY is set, a duplicate message must be allocated for the copy
before locking the queue.  However, the copy could not be larger than was
sent which is limited to msg_ctlmax.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Acked-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoipc: fix potential oops when src msg > 4k w/ MSG_COPY
Peter Hurley [Fri, 8 Mar 2013 20:43:26 +0000 (12:43 -0800)] 
ipc: fix potential oops when src msg > 4k w/ MSG_COPY

If the src msg is > 4k, then dest->next points to the
next allocated segment; resetting it just prior to dereferencing
is bad.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Acked-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoMerge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux...
Linus Torvalds [Fri, 8 Mar 2013 22:46:04 +0000 (14:46 -0800)] 
Merge branch 'stable' of git://git./linux/kernel/git/cmetcalf/linux-tile

Pull tile architecture fixes from Chris Metcalf:
 "This fixes the bug that Al Viro spotted with the compat llseek code.
  I also fixed the compat syscall definitions to use the new syscall
  define macros to properly sign-extend their arguments."

* 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
  tile: properly use COMPAT_SYSCALL_DEFINEx
  tile: work around bug in the generic sys_llseek

11 years agoMerge tag 'metag-for-v3.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jhoga...
Linus Torvalds [Fri, 8 Mar 2013 22:45:17 +0000 (14:45 -0800)] 
Merge tag 'metag-for-v3.9-rc2' of git://git./linux/kernel/git/jhogan/metag

Pull metag bugfixes from James Hogan:
 "A couple of fairly minor arch/metag integration fixes from v3.9-rc1:

   - remove SET_PERSONALITY(): use default definition like other arches
     now do.

   - inhibit NUMA balancing: like SH, NUMA is used for memories with
     different latencies.  ARCH_WANT_VARIABLE_LOCALITY has been added
     for this purpose."

* tag 'metag-for-v3.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag:
  metag: Inhibit NUMA balancing.
  metag: remove SET_PERSONALITY()

11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Fri, 8 Mar 2013 22:43:33 +0000 (14:43 -0800)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "All are boring small fixes in various parts:
   - A few possible NULL-dereference or zero-division Oops fixes
   - Fix vmaster slave volume notification
   - Add codec ID for ALC233
   - Various fixes in several ASoC WM codecs
   - ASoC tegra i2c fix

  Sorry if you wanted a thrilling adventure with huge sharks :)"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: ice1712: Initialize card->private_data properly
  ALSA: hda - Add support of new codec ALC233
  ALSA: hda/ca0132 - Avoid division by zero in dspxfr_one_seg()
  ALSA: hda - check NULL pointer when creating SPDIF PCM switch
  ALSA: hda - check NULL pointer when creating SPDIF controls
  ASoC: wm5102: Apply a SYSCLK patch for later revs
  ALSA: vmaster: Fix slave change notification
  ASoC: tegra: fix I2S bit count mask
  ALSA: seq: seq_oss_event: missing range checks
  ASoC: wm8350: Use jiffies rather than msecs in schedule_delayed_work()
  ASoC: wm5110: Correct OUT2/3 volume and switch names
  ASoC: wm5102: Correct OUT2 volume and switch names
  ASoC: wm8960: Fix ADC power bits
  ASoC: wm8960: Correct register 0 and 1 defaults

11 years agoMerge branch 'for-3.9/upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 8 Mar 2013 22:42:52 +0000 (14:42 -0800)] 
Merge branch 'for-3.9/upstream-fixes' of git://git./linux/kernel/git/jikos/hid

Pull HID fix from Jiri Kosina:
 "Bugfix for a long-standing bug in logitech-dj driver causing all sorts
  of random initialization problems, finally debugged by Benjamin
  Tissoires with help of Bob Bowles."

* 'for-3.9/upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: logitech-dj: do not directly call hid_output_raw_report() during probe

11 years agoMerge tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso...
Linus Torvalds [Fri, 8 Mar 2013 22:42:16 +0000 (14:42 -0800)] 
Merge tag 'random_for_linus' of git://git./linux/kernel/git/tytso/random

Pull random fixes from Ted Ts'o:
 "Fix a circular locking dependency in random's collection of cputime
  used by a thread when it exits."

* tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random:
  random: fix locking dependency with the tasklist_lock

11 years agovfs: don't BUG_ON() if following a /proc fd pseudo-symlink results in a symlink
Linus Torvalds [Fri, 8 Mar 2013 17:03:07 +0000 (09:03 -0800)] 
vfs: don't BUG_ON() if following a /proc fd pseudo-symlink results in a symlink

It's "normal" - it can happen if the file descriptor you followed was
opened with O_NOFOLLOW.

Reported-by: Dave Jones <davej@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 7 Mar 2013 23:57:38 +0000 (15:57 -0800)] 
Merge branch 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull x86 fixes from Peter Anvin:
 "Several boot fixes (MacBook, legacy EFI bootloaders), another
  please-don't-brick fix, and some minor stuff."

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86: Do not try to sync identity map for non-mapped pages
  x86, doc: Be explicit about what the x86 struct boot_params requires
  x86: Don't clear efi_info even if the sentinel hits
  x86, mm: Make sure to find a 2M free block for the first mapped area
  x86: Fix 32-bit *_cpu_data initializers
  efivarfs: return accurate error code in efivarfs_fill_super()
  efivars: efivarfs_valid_name() should handle pstore syntax
  efi: be more paranoid about available space when creating variables
  iommu, x86: Add DMA remap fault reason
  x86, smpboot: Remove unused variable

11 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Thu, 7 Mar 2013 22:55:54 +0000 (14:55 -0800)] 
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "Misc radeon, nouveau, mgag200 and intel fixes.

  The intel fixes should contain the fix for the touchpad on the
  Chromebook - hey I'm an input maintainer now!"

Hate to pee on your parade, Dave, but I don't think being an input
maintainer is necessarily something to strive for..

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (25 commits)
  drm/tegra: drop "select DRM_HDMI"
  drm: Documentation typo fixes
  drm/mgag200: Bug fix: Renesas board now selects native resolution.
  drm/mgag200: Reject modes that are too big for VRAM
  drm/mgag200: 'fbdev_list' in 'struct mga_fbdev' is not used
  drm/radeon: don't check mipmap alignment if MIP_ADDRESS is FMASK
  drm/radeon: skip MC reset as it's probably not hung
  drm/radeon: add primary dac adj quirk for R200 board
  drm/radeon: don't set hpd, afmt interrupts when interrupts are disabled
  drm/i915: Turn off hsync and vsync on ADPA when disabling crt
  drm/i915: Fix incorrect definition of ADPA HSYNC and VSYNC bits
  drm/i915: also disable south interrupts when handling them
  drm/i915: enable irqs earlier when resuming
  drm/i915: Increase the RC6p threshold.
  DRM/i915: On G45 enable cursor plane briefly after enabling the display plane.
  drm/nv50-: prevent some races between modesetting and page flipping
  drm/nouveau/i2c: drop parent refcount when creating ports
  drm/nv84: fix regression in page flipping
  drm/nouveau: Fix typo in init_idx_addr_latched().
  drm/nouveau: Disable AGP on PowerPC again.
  ...

11 years agoMerge tag 'pm+acpi-3.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Linus Torvalds [Thu, 7 Mar 2013 22:54:28 +0000 (14:54 -0800)] 
Merge tag 'pm+acpi-3.9-rc2' of git://git./linux/kernel/git/rafael/linux-pm

Pull ACPI and power management fixes from Rafael J Wysocki:

 - Two fixes for the new intel_pstate driver from Dirk Brandewie.

 - Fix for incorrect usage of the .find_bridge() callback from struct
   acpi_bus_type in the USB core and subsequent removal of that callback
   from Rafael J Wysocki.

 - ACPI processor driver cleanups from Chen Gang and Syam Sidhardhan.

 - ACPI initialization and error messages fix from Joe Perches.

 - Operating Performance Points documentation improvement from Nishanth
   Menon.

 - Fixes for memory leaks and potential concurrency issues and sysfs
  attributes leaks during device removal in the core device PM QoS code
  from Rafael J Wysocki.

 - Calxeda Highbank cpufreq driver simplification from Emilio López.

 - cpufreq comment cleanup from Namhyung Kim.

 - Fix for a section mismatch in Calxeda Highbank interprocessor
   communication code from Mark Langsdorf (this is not a PM fix strictly
   speaking, but the code in question went in through the PM tree).

* tag 'pm+acpi-3.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  cpufreq / intel_pstate: Do not load on VM that does not report max P state.
  cpufreq / intel_pstate: Fix intel_pstate_init() error path
  ACPI / glue: Drop .find_bridge() callback from struct acpi_bus_type
  ACPI / glue: Add .match() callback to struct acpi_bus_type
  ACPI / porocessor: Beautify code, pr->id is u32 which is never < 0
  ACPI / processor: Remove redundant NULL check before kfree
  ACPI / Sleep: Avoid interleaved message on errors
  PM / QoS: Remove device PM QoS sysfs attributes at the right place
  PM / QoS: Fix concurrency issues and memory leaks in device PM QoS
  cpufreq: highbank: do not initialize array with a loop
  PM / OPP: improve introductory documentation
  cpufreq: Fix a typo in comment
  mailbox, pl320-ipc: remove __init from probe function

This page took 0.049195 seconds and 5 git commands to generate.