02 Mar, 2016

1 commit

  • Let the non boot cpus call into idle with the corresponding hotplug state, so
    the hotplug core can handle the further bringup. That's a first step to
    convert the boot side of the hotplugged cpus to do all the synchronization
    with the other side through the state machine. For now it'll only start the
    hotplug thread and kick the full bringup of the cpu.

    Signed-off-by: Thomas Gleixner
    Cc: linux-arch@vger.kernel.org
    Cc: Rik van Riel
    Cc: Rafael Wysocki
    Cc: "Srivatsa S. Bhat"
    Cc: Peter Zijlstra
    Cc: Arjan van de Ven
    Cc: Sebastian Siewior
    Cc: Rusty Russell
    Cc: Steven Rostedt
    Cc: Oleg Nesterov
    Cc: Tejun Heo
    Cc: Andrew Morton
    Cc: Paul McKenney
    Cc: Linus Torvalds
    Cc: Paul Turner
    Link: http://lkml.kernel.org/r/20160226182341.614102639@linutronix.de
    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     

05 Dec, 2015

1 commit

  • Makes it easier to handle init vs core cleanly, though the change is
    fairly invasive across random architectures.

    It simplifies the rbtree code immediately, however, while keeping the
    core data together in the same cachline (now iff the rbtree code is
    enabled).

    Acked-by: Peter Zijlstra
    Reviewed-by: Josh Poimboeuf
    Signed-off-by: Rusty Russell
    Signed-off-by: Jiri Kosina

    Rusty Russell
     

26 Sep, 2015

1 commit

  • Pull PCI fixes from Bjorn Helgaas:
    "These are fixes for things we merged for v4.3 (VPD, MSI, and bridge
    window management), and a new Renesas R8A7794 SoC device ID.

    Details:

    Resource management:
    - Revert pci_read_bridge_bases() unification (Bjorn Helgaas)
    - Clear IORESOURCE_UNSET when clipping a bridge window (Bjorn
    Helgaas)

    MSI:
    - Fix MSI IRQ domains for VFs on virtual buses (Alex Williamson)

    Renesas R-Car host bridge driver:
    - Add R8A7794 support (Sergei Shtylyov)

    Miscellaneous:
    - Fix devfn for VPD access through function 0 (Alex Williamson)
    - Use function 0 VPD only for identical functions (Alex Williamson)"

    * tag 'pci-v4.3-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
    PCI: rcar: Add R8A7794 support
    PCI: Use function 0 VPD for identical functions, regular VPD for others
    PCI: Fix devfn for VPD access through function 0
    PCI/MSI: Fix MSI IRQ domains for VFs on virtual buses
    PCI: Clear IORESOURCE_UNSET when clipping a bridge window
    PCI: Revert "PCI: Call pci_read_bridge_bases() from core instead of arch code"

    Linus Torvalds
     

16 Sep, 2015

2 commits

  • Most interrupt flow handlers do not use the irq argument. Those few
    which use it can retrieve the irq number from the irq descriptor.

    Remove the argument.

    Search and replace was done with coccinelle and some extra helper
    scripts around it. Thanks to Julia for her help!

    Signed-off-by: Thomas Gleixner
    Cc: Julia Lawall
    Cc: Jiang Liu

    Thomas Gleixner
     
  • Revert dff22d2054b5 ("PCI: Call pci_read_bridge_bases() from core instead
    of arch code").

    Reading PCI bridge windows is not arch-specific in itself, but there is PCI
    core code that doesn't work correctly if we read them too early. For
    example, Hannes found this case on an ARM Freescale i.mx6 board:

    pci_bus 0000:00: root bus resource [mem 0x01000000-0x01efffff]
    pci 0000:00:00.0: PCI bridge to [bus 01-ff]
    pci 0000:00:00.0: BAR 8: no space for [mem size 0x01000000] (mem window)
    pci 0000:01:00.0: BAR 2: failed to assign [mem size 0x00200000]
    pci 0000:01:00.0: BAR 1: failed to assign [mem size 0x00004000]
    pci 0000:01:00.0: BAR 0: failed to assign [mem size 0x00000100]

    The 00:00.0 mem window needs to be at least 3MB: the 01:00.0 device needs
    0x204100 of space, and mem windows are megabyte-aligned.

    Bus sizing can increase a bridge window size, but never *decrease* it (see
    d65245c3297a ("PCI: don't shrink bridge resources")). Prior to
    dff22d2054b5, ARM didn't read bridge windows at all, so the "original size"
    was zero, and we assigned a 3MB window.

    After dff22d2054b5, we read the bridge windows before sizing the bus. The
    firmware programmed a 16MB window (size 0x01000000) in 00:00.0, and since
    we never decrease the size, we kept 16MB even though we only needed 3MB.
    But 16MB doesn't fit in the host bridge aperture, so we failed to assign
    space for the window and the downstream devices.

    I think this is a defect in the PCI core: we shouldn't rely on the firmware
    to assign sensible windows.

    Ray reported a similar problem, also on ARM, with Broadcom iProc.

    Issues like this are too hard to fix right now, so revert dff22d2054b5.

    Reported-by: Hannes
    Reported-by: Ray Jui
    Link: http://lkml.kernel.org/r/CAAa04yFQEUJm7Jj1qMT57-LG7ZGtnhNDBe=PpSRa70Mj+XhW-A@mail.gmail.com
    Link: http://lkml.kernel.org/r/55F75BB8.4070405@broadcom.com
    Signed-off-by: Bjorn Helgaas
    Acked-by: Yinghai Lu
    Acked-by: Lorenzo Pieralisi

    Bjorn Helgaas
     

11 Sep, 2015

1 commit

  • Almost everyone implements dma_set_mask the same way, although some time
    that's hidden in ->set_dma_mask methods.

    This patch consolidates those into a common implementation that either
    calls ->set_dma_mask if present or otherwise uses the default
    implementation. Some architectures used to only call ->set_dma_mask
    after the initial checks, and those instance have been fixed to do the
    full work. h8300 implemented dma_set_mask bogusly as a no-ops and has
    been fixed.

    Unfortunately some architectures overload unrelated semantics like changing
    the dma_ops into it so we still need to allow for an architecture override
    for now.

    [jcmvbkbc@gmail.com: fix xtensa]
    Signed-off-by: Christoph Hellwig
    Cc: Arnd Bergmann
    Cc: Russell King
    Cc: Catalin Marinas
    Cc: Will Deacon
    Cc: Yoshinori Sato
    Cc: Michal Simek
    Cc: Jonas Bonn
    Cc: Chris Metcalf
    Cc: Guan Xuetao
    Cc: Ralf Baechle
    Cc: Benjamin Herrenschmidt
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Cc: Andy Shevchenko
    Signed-off-by: Max Filippov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     

02 Sep, 2015

2 commits

  • Pull irq updates from Thomas Gleixner:
    "This updated pull request does not contain the last few GIC related
    patches which were reported to cause a regression. There is a fix
    available, but I let it breed for a couple of days first.

    The irq departement provides:

    - new infrastructure to support non PCI based MSI interrupts
    - a couple of new irq chip drivers
    - the usual pile of fixlets and updates to irq chip drivers
    - preparatory changes for removal of the irq argument from interrupt
    flow handlers
    - preparatory changes to remove IRQF_VALID"

    * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (129 commits)
    irqchip/imx-gpcv2: IMX GPCv2 driver for wakeup sources
    irqchip: Add bcm2836 interrupt controller for Raspberry Pi 2
    irqchip: Add documentation for the bcm2836 interrupt controller
    irqchip/bcm2835: Add support for being used as a second level controller
    irqchip/bcm2835: Refactor handle_IRQ() calls out of MAKE_HWIRQ
    PCI: xilinx: Fix typo in function name
    irqchip/gic: Ensure gic_cpu_if_up/down() programs correct GIC instance
    irqchip/gic: Only allow the primary GIC to set the CPU map
    PCI/MSI: pci-xgene-msi: Consolidate chained IRQ handler install/remove
    unicore32/irq: Prepare puv3_gpio_handler for irq argument removal
    tile/pci_gx: Prepare trio_handle_level_irq for irq argument removal
    m68k/irq: Prepare irq handlers for irq argument removal
    C6X/megamode-pic: Prepare megamod_irq_cascade for irq argument removal
    blackfin: Prepare irq handlers for irq argument removal
    arc/irq: Prepare idu_cascade_isr for irq argument removal
    sparc/irq: Use access helper irq_data_get_affinity_mask()
    sparc/irq: Use helper irq_data_get_irq_handler_data()
    parisc/irq: Use access helper irq_data_get_affinity_mask()
    mn10300/irq: Use access helper irq_data_get_affinity_mask()
    irqchip/i8259: Prepare i8259_irq_dispatch for irq argument removal
    ...

    Linus Torvalds
     
  • Pull timer updates from Thomas Gleixner:
    "Rather large, but nothing exiting:

    - new range check for settimeofday() to prevent that boot time
    becomes negative.
    - fix for file time rounding
    - a few simplifications of the hrtimer code
    - fix for the proc/timerlist code so the output of clock realtime
    timers is accurate
    - more y2038 work
    - tree wide conversion of clockevent drivers to the new callbacks"

    * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (88 commits)
    hrtimer: Handle failure of tick_init_highres() gracefully
    hrtimer: Unconfuse switch_hrtimer_base() a bit
    hrtimer: Simplify get_target_base() by returning current base
    hrtimer: Drop return code of hrtimer_switch_to_hres()
    time: Introduce timespec64_to_jiffies()/jiffies_to_timespec64()
    time: Introduce current_kernel_time64()
    time: Introduce struct itimerspec64
    time: Add the common weak version of update_persistent_clock()
    time: Always make sure wall_to_monotonic isn't positive
    time: Fix nanosecond file time rounding in timespec_trunc()
    timer_list: Add the base offset so remaining nsecs are accurate for non monotonic timers
    cris/time: Migrate to new 'set-state' interface
    kernel: broadcast-hrtimer: Migrate to new 'set-state' interface
    xtensa/time: Migrate to new 'set-state' interface
    unicore/time: Migrate to new 'set-state' interface
    um/time: Migrate to new 'set-state' interface
    sparc/time: Migrate to new 'set-state' interface
    sh/localtimer: Migrate to new 'set-state' interface
    score/time: Migrate to new 'set-state' interface
    s390/time: Migrate to new 'set-state' interface
    ...

    Linus Torvalds
     

01 Sep, 2015

1 commit

  • Pull NOHZ updates from Ingo Molnar:
    "The main changes, mostly written by Frederic Weisbecker, include:

    - Fix some jiffies based cputime assumptions. (No real harm because
    the concerned code isn't used by full dynticks.)

    - Simplify jiffies usecs conversions. Remove dead code.

    - Remove early hacks on nohz full code that avoided messing up idle
    nohz internals. Now nohz integrates well full and idle and such
    hack have become needless.

    - Restart nohz full tick from irq exit. (A simplification and a
    preparation for future optimization on scheduler kick to nohz
    full)

    - Code cleanups.

    - Tile driver isolation enhancement on top of nohz. (Chris Metcalf)"

    * 'timers-nohz-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    nohz: Remove useless argument on tick_nohz_task_switch()
    nohz: Move tick_nohz_restart_sched_tick() above its users
    nohz: Restart nohz full tick from irq exit
    nohz: Remove idle task special case
    nohz: Prevent tilegx network driver interrupts
    alpha: Fix jiffies based cputime assumption
    apm32: Fix cputime == jiffies assumption
    jiffies: Remove HZ > USEC_PER_SEC special case

    Linus Torvalds
     

10 Aug, 2015

1 commit

  • Migrate alpha driver to the new 'set-state' interface provided by
    clockevents core, the earlier 'set-mode' interface is marked obsolete
    now.

    This also enables us to implement callbacks for new states of clockevent
    devices, for example: ONESHOT_STOPPED.

    rtc clockevent device wasn't doing anything in set-mode and so its
    set-state callbacks aren't implemented.

    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Matt Turner
    Cc: Christoph Lameter
    Cc: linux-alpha@vger.kernel.org
    Signed-off-by: Viresh Kumar
    Signed-off-by: Daniel Lezcano

    Viresh Kumar
     

29 Jul, 2015

1 commit

  • That code wrongly assumes that cputime_t wraps jiffies_t. Lets use
    the correct accessors/mutators.

    In practice there should be no harm yet because alpha currently
    only support tick based cputime accounting which is always jiffies
    based.

    Reviewed-by: Rik van Riel
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Christoph Lameter
    Cc: Ingo Molnar
    Cc; John Stultz
    Cc: Peter Zijlstra
    Cc: Preeti U Murthy
    Cc: Rik van Riel
    Cc: Thomas Gleixner
    Cc: Viresh Kumar
    Signed-off-by: Frederic Weisbecker

    Frederic Weisbecker
     

27 Jul, 2015

1 commit


23 Jul, 2015

1 commit

  • When we scan a PCI bus, we read PCI-PCI bridge window registers with
    pci_read_bridge_bases() so we can validate the resource hierarchy. Most
    architectures call pci_read_bridge_bases() from pcibios_fixup_bus(), but
    PCI-PCI bridges are not arch-specific, so this doesn't need to be in
    arch-specific code.

    Call pci_read_bridge_bases() directly from the PCI core instead of from
    arch code.

    For alpha and mips, we now call pci_read_bridge_bases() always; previously
    we only called it if PCI_PROBE_ONLY was set.

    [bhelgaas: changelog]
    Signed-off-by: Lorenzo Pieralisi
    Signed-off-by: Bjorn Helgaas
    CC: Ralf Baechle
    CC: James E.J. Bottomley
    CC: Michael Ellerman
    CC: Bjorn Helgaas
    CC: Richard Henderson
    CC: Benjamin Herrenschmidt
    CC: David Howells
    CC: Russell King
    CC: Tony Luck
    CC: David S. Miller
    CC: Ingo Molnar
    CC: Guenter Roeck
    CC: Michal Simek
    CC: Chris Zankel

    Lorenzo Pieralisi
     

24 Jun, 2015

1 commit

  • Pull PCI updates from Bjorn Helgaas:
    "PCI changes for the v4.2 merge window:

    Enumeration
    - Move pci_ari_enabled() to global header (Alex Williamson)
    - Account for ARI in _PRT lookups (Alex Williamson)
    - Remove unused pci_scan_bus_parented() (Yijing Wang)

    Resource management
    - Use host bridge _CRS info on systems with >32 bit addressing (Bjorn Helgaas)
    - Use host bridge _CRS info on Foxconn K8M890-8237A (Bjorn Helgaas)
    - Fix pci_address_to_pio() conversion of CPU address to I/O port (Zhichang Yuan)
    - Add pci_bus_addr_t (Yinghai Lu)

    PCI device hotplug
    - Wait for pciehp command completion where necessary (Alex Williamson)
    - Drop pointless ACPI-based "slot detection" check (Rafael J. Wysocki)
    - Check ignore_hotplug for all downstream devices (Rafael J. Wysocki)
    - Propagate the "ignore hotplug" setting to parent (Rafael J. Wysocki)
    - Inline pciehp "handle event" functions into the ISR (Bjorn Helgaas)
    - Clean up pciehp debug logging (Bjorn Helgaas)

    Power management
    - Remove redundant PCIe port type checking (Yijing Wang)
    - Add dev->has_secondary_link to track downstream PCIe links (Yijing Wang)
    - Use dev->has_secondary_link to find downstream links for ASPM (Yijing Wang)
    - Drop __pci_disable_link_state() useless "force" parameter (Bjorn Helgaas)
    - Simplify Clock Power Management setting (Bjorn Helgaas)

    Virtualization
    - Add ACS quirks for Intel 9-series PCH root ports (Alex Williamson)
    - Add function 1 DMA alias quirk for Marvell 9120 (Sakari Ailus)

    MSI
    - Disable MSI at enumeration even if kernel doesn't support MSI (Michael S. Tsirkin)
    - Remove unused pci_msi_off() (Bjorn Helgaas)
    - Rename msi_set_enable(), msix_clear_and_set_ctrl() (Michael S. Tsirkin)
    - Export pci_msi_set_enable(), pci_msix_clear_and_set_ctrl() (Michael S. Tsirkin)
    - Drop pci_msi_off() calls during probe (Michael S. Tsirkin)

    APM X-Gene host bridge driver
    - Add APM X-Gene v1 PCIe MSI/MSIX termination driver (Duc Dang)
    - Add APM X-Gene PCIe MSI DTS nodes (Duc Dang)
    - Disable Configuration Request Retry Status for v1 silicon (Duc Dang)
    - Allow config access to Root Port even when link is down (Duc Dang)

    Broadcom iProc host bridge driver
    - Allow override of device tree IRQ mapping function (Hauke Mehrtens)
    - Add BCMA PCIe driver (Hauke Mehrtens)
    - Directly add PCI resources (Hauke Mehrtens)
    - Free resource list after registration (Hauke Mehrtens)

    Freescale i.MX6 host bridge driver
    - Add speed change timeout message (Troy Kisky)
    - Rename imx6_pcie_start_link() to imx6_pcie_establish_link() (Bjorn Helgaas)

    Freescale Layerscape host bridge driver
    - Use dw_pcie_link_up() consistently (Bjorn Helgaas)
    - Factor out ls_pcie_establish_link() (Bjorn Helgaas)

    Marvell MVEBU host bridge driver
    - Remove mvebu_pcie_scan_bus() (Yijing Wang)

    NVIDIA Tegra host bridge driver
    - Remove tegra_pcie_scan_bus() (Yijing Wang)

    Synopsys DesignWare host bridge driver
    - Consolidate outbound iATU programming functions (Jisheng Zhang)
    - Use iATU0 for cfg and IO, iATU1 for MEM (Jisheng Zhang)
    - Add support for x8 links (Zhou Wang)
    - Wait for link to come up with consistent style (Bjorn Helgaas)
    - Use pci_scan_root_bus() for simplicity (Yijing Wang)

    TI DRA7xx host bridge driver
    - Use dw_pcie_link_up() consistently (Bjorn Helgaas)

    Miscellaneous
    - Include , not (Bjorn Helgaas)
    - Remove unnecessary #includes of (Bjorn Helgaas)
    - Remove unused pcibios_select_root() (again) (Bjorn Helgaas)
    - Remove unused pci_dma_burst_advice() (Bjorn Helgaas)
    - xen/pcifront: Don't use deprecated function pci_scan_bus_parented() (Arnd Bergmann)"

    * tag 'pci-v4.2-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (58 commits)
    PCI: pciehp: Inline the "handle event" functions into the ISR
    PCI: pciehp: Rename queue_interrupt_event() to pciehp_queue_interrupt_event()
    PCI: pciehp: Make queue_interrupt_event() void
    PCI: xgene: Allow config access to Root Port even when link is down
    PCI: xgene: Disable Configuration Request Retry Status for v1 silicon
    PCI: pciehp: Clean up debug logging
    x86/PCI: Use host bridge _CRS info on systems with >32 bit addressing
    PCI: imx6: Add #define PCIE_RC_LCSR
    PCI: imx6: Use "u32", not "uint32_t"
    PCI: Remove unused pci_scan_bus_parented()
    xen/pcifront: Don't use deprecated function pci_scan_bus_parented()
    PCI: imx6: Add speed change timeout message
    PCI/ASPM: Simplify Clock Power Management setting
    PCI: designware: Wait for link to come up with consistent style
    PCI: layerscape: Factor out ls_pcie_establish_link()
    PCI: layerscape: Use dw_pcie_link_up() consistently
    PCI: dra7xx: Use dw_pcie_link_up() consistently
    x86/PCI: Use host bridge _CRS info on Foxconn K8M890-8237A
    PCI: pciehp: Wait for hotplug command completion where necessary
    PCI: Remove unused pci_dma_burst_advice()
    ...

    Linus Torvalds
     

08 Jun, 2015

1 commit


27 May, 2015

7 commits

  • The related warning:

    CC init/do_mounts.o
    arch/alpha/kernel/osf_sys.c: In function 'SyS_osf_settimeofday':
    arch/alpha/kernel/osf_sys.c:1028:14: warning: 'kts.tv_nsec' may be used uninitialized in this function [-Wmaybe-uninitialized]
    kts.tv_nsec *= 1000;
    ^
    arch/alpha/kernel/osf_sys.c:1016:18: note: 'kts' was declared here
    struct timespec kts;
    ^

    Signed-off-by: Chen Gang
    Signed-off-by: Matt Turner

    Chen Gang
     
  • And still left the missing unimplemented syscalls as warnings. The
    related warnings for missing implemented syscalls:

    CALL scripts/checksyscalls.sh
    :1241:2: warning: #warning syscall getrandom not implemented [-Wcpp]
    :1244:2: warning: #warning syscall memfd_create not implemented [-Wcpp]
    :1250:2: warning: #warning syscall execveat not implemented [-Wcpp]

    Signed-off-by: Chen Gang
    Signed-off-by: Matt Turner

    Chen Gang
     
  • The 'arg' argument to copy_thread() is only ever used when forking a new
    kernel thread. Hence, rename it to 'kthread_arg' for clarity (and consistency
    with do_fork() and other arch-specific implementations of copy_thread()).

    Signed-off-by: Alex Dowad
    Signed-off-by: Matt Turner

    Alex Dowad
     
  • None of these files are actually using any __init type directives
    and hence don't need to include . Most are just a
    left over from __devinit and __cpuinit removal, or simply due to
    code getting copied from one driver to the next.

    Acked-by: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Matt Turner
    Cc: linux-alpha@vger.kernel.org
    Signed-off-by: Paul Gortmaker
    Signed-off-by: Matt Turner

    Paul Gortmaker
     
  • The srm console is always built in. It will never be modular,
    so using module_init as an alias for __initcall is rather
    misleading.

    Fix this up now, so that we can relocate module_init from
    init.h into module.h in the future. If we don't do this, we'd
    have to add module.h to obviously non-modular code, and that
    would be a worse thing.

    Direct use of __initcall is discouraged, vs prioritized ones.
    Use of device_initcall is consistent with what __initcall
    maps onto, and hence does not change the init order, making the
    impact of this change zero. Should someone with real hardware
    for boot testing want to change it later to arch_initcall or
    console_initcall, they can do that at a later date.

    Reviewed-by: Richard Henderson
    Cc: Ivan Kokshaysky
    Acked-by: Matt Turner
    Cc: linux-alpha@vger.kernel.org
    Signed-off-by: Paul Gortmaker
    Signed-off-by: Matt Turner

    Paul Gortmaker
     
  • Commit 9a46ad6d6df3b54 "smp: make smp_call_function_many() use logic
    similar to smp_call_function_single()" has unified the way to handle
    single and multiple cross-CPU function calls. Now only one interrupt
    is needed for architecture specific code to support generic SMP function
    call interfaces, so kill the redundant single function call interrupt.

    Cc: Andrew Morton
    Cc: Shaohua Li
    Cc: Peter Zijlstra
    Cc: Ingo Molnar
    Cc: Steven Rostedt
    Cc: Jiri Kosina
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Acked-by: Matt Turner
    Cc: linux-alpha@vger.kernel.org
    Signed-off-by: Jiang Liu
    Signed-off-by: Matt Turner

    Jiang Liu
     
  • PCI core will initialize device MSI/MSI-X capability in
    pci_msi_init_pci_dev(). So device driver should use
    pci_dev->msi_cap/msix_cap to determine whether the device
    support MSI/MSI-X instead of using
    pci_find_capability(pci_dev, PCI_CAP_ID_MSI/MSIX).
    Access to PCIe device config space again will consume more time.

    Signed-off-by: Yijing Wang
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Acked-by: Matt Turner
    Cc: Phil Carmody
    Cc: linux-alpha@vger.kernel.org
    Signed-off-by: Matt Turner

    Yijing Wang
     

14 Apr, 2015

1 commit

  • Pull PCI changes from Bjorn Helgaas:
    "Enumeration
    - Read capability list as dwords, not bytes (Sean O. Stalley)

    Resource management
    - Don't check for PNP overlaps with unassigned PCI BARs (Bjorn Helgaas)
    - Mark invalid BARs as unassigned (Bjorn Helgaas)
    - Show driver, BAR#, and resource on pci_ioremap_bar() failure (Bjorn Helgaas)
    - Fail pci_ioremap_bar() on unassigned resources (Bjorn Helgaas)
    - Assign resources before drivers claim devices (Yijing Wang)
    - Claim bus resources before pci_bus_add_devices() (Yijing Wang)

    Power management
    - Optimize device state transition delays (Aaron Lu)
    - Don't clear ASPM bits when the FADT declares it's unsupported (Matthew Garrett)

    Virtualization
    - Add ACS quirks for Intel 1G NICs (Alex Williamson)

    IOMMU
    - Add ptr to OF node arg to of_iommu_configure() (Murali Karicheri)
    - Move of_dma_configure() to device.c to help re-use (Murali Karicheri)
    - Fix size when dma-range is not used (Murali Karicheri)
    - Add helper functions pci_get[put]_host_bridge_device() (Murali Karicheri)
    - Add of_pci_dma_configure() to update DMA configuration (Murali Karicheri)
    - Update DMA configuration from DT (Murali Karicheri)
    - dma-mapping: limit IOMMU mapping size (Murali Karicheri)
    - Calculate device DMA masks based on DT dma-range size (Murali Karicheri)

    ARM Versatile host bridge driver
    - Check for devm_ioremap_resource() failures (Jisheng Zhang)

    Broadcom iProc host bridge driver
    - Add Broadcom iProc PCIe driver (Ray Jui)

    Marvell MVEBU host bridge driver
    - Add suspend/resume support (Thomas Petazzoni)

    Renesas R-Car host bridge driver
    - Fix position of MSI enable bit (Nobuhiro Iwamatsu)
    - Write zeroes to reserved PCIEPARL bits (Nobuhiro Iwamatsu)
    - Change PCIEPARL and PCIEPARH to PCIEPALR and PCIEPAUR (Nobuhiro Iwamatsu)
    - Verify that mem_res is 64K-aligned (Nobuhiro Iwamatsu)

    Samsung Exynos host bridge driver
    - Fix INTx enablement statement termination error (Jaehoon Chung)

    Miscellaneous
    - Make a shareable UUID for PCI firmware ACPI _DSM (Aaron Lu)
    - Clarify policy for vendor IDs in pci.txt (Michael S. Tsirkin)"

    * tag 'pci-v4.1-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (36 commits)
    PCI: Read capability list as dwords, not bytes
    PCI: layerscape: Simplify platform_get_resource_byname() failure checking
    PCI: keystone: Don't dereference possible NULL pointer
    PCI: versatile: Check for devm_ioremap_resource() failures
    PCI: Don't clear ASPM bits when the FADT declares it's unsupported
    PCI: Clarify policy for vendor IDs in pci.txt
    PCI/ACPI: Optimize device state transition delays
    PCI: Export pci_find_host_bridge() for use inside PCI core
    PCI: Make a shareable UUID for PCI firmware ACPI _DSM
    PCI: Fix typo in Thunderbolt kernel message
    PCI: exynos: Fix INTx enablement statement termination error
    PCI: iproc: Add Broadcom iProc PCIe support
    PCI: iproc: Add DT docs for Broadcom iProc PCIe driver
    PCI: Export symbols required for loadable host driver modules
    PCI: Add ACS quirks for Intel 1G NICs
    PCI: mvebu: Add suspend/resume support
    PCI: Cleanup control flow
    sparc/PCI: Claim bus resources before pci_bus_add_devices()
    PCI: Assign resources before drivers claim devices (pci_scan_root_bus())
    PCI: Fail pci_ioremap_bar() on unassigned resources
    ...

    Linus Torvalds
     

03 Apr, 2015

1 commit

  • Change alpha_rtc_set_mmss() and remote_set_mmss() to use
    rtc_class_ops's set_mmss64(), to be y2038 safe.

    Signed-off-by: Xunlei Pang
    Signed-off-by: John Stultz
    Acked-by: Alessandro Zummo
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: Richard Henderson
    Link: http://lkml.kernel.org/r/1427945681-29972-15-git-send-email-john.stultz@linaro.org
    Signed-off-by: Ingo Molnar

    Xunlei Pang
     

19 Mar, 2015

1 commit

  • Previously, pci_scan_root_bus() created a root PCI bus, enumerated the
    devices on it, and called pci_bus_add_devices(), which made the devices
    available for drivers to claim them.

    Most callers assigned resources to devices after pci_scan_root_bus()
    returns, which may be after drivers have claimed the devices. This is
    incorrect; the PCI core should not change device resources while a driver
    is managing the device.

    Remove pci_bus_add_devices() from pci_scan_root_bus() and do it after any
    resource assignment in the callers.

    Note that ARM's pci_common_init_dev() already called pci_bus_add_devices()
    after pci_scan_root_bus(), so we only need to remove the first call:

    pci_common_init_dev
    pcibios_init_hw
    pci_scan_root_bus
    pci_bus_add_devices # first call
    pci_bus_assign_resources
    pci_bus_add_devices # second call

    [bhelgaas: changelog, drop "root_bus" var in alpha common_init_pci(),
    return failure earlier in mn10300, add "return" in x86 pcibios_scan_root(),
    return early if xtensa platform_pcibios_fixup() fails]
    Signed-off-by: Yijing Wang
    Signed-off-by: Bjorn Helgaas
    CC: Richard Henderson
    CC: Ivan Kokshaysky
    CC: Matt Turner
    CC: David Howells
    CC: Tony Luck
    CC: Michal Simek
    CC: Ralf Baechle
    CC: Koichi Yasutake
    CC: Sebastian Ott
    CC: "David S. Miller"
    CC: Chris Metcalf
    CC: Chris Zankel
    CC: Max Filippov
    CC: Thomas Gleixner

    Yijing Wang
     

13 Mar, 2015

1 commit

  • Previously, pci_scan_bus() created a root PCI bus, enumerated the devices
    on it, and called pci_bus_add_devices(), which made the devices available
    for drivers to claim them.

    Most callers assigned resources to devices after pci_scan_bus() returns,
    which may be after drivers have claimed the devices. This is incorrect;
    the PCI core should not change device resources while a driver is managing
    the device.

    Remove pci_bus_add_devices() from pci_scan_bus() and do it after any
    resource assignment in the callers.

    [bhelgaas: changelog, check for failure in mcf_pci_init()]
    Signed-off-by: Yijing Wang
    Signed-off-by: Bjorn Helgaas
    CC: "David S. Miller"
    CC: Geert Uytterhoeven
    CC: Guan Xuetao
    CC: Richard Henderson
    CC: Ivan Kokshaysky
    CC: Matt Turner

    Yijing Wang
     

13 Feb, 2015

1 commit

  • If an attacker can cause a controlled kernel stack overflow, overwriting
    the restart block is a very juicy exploit target. This is because the
    restart_block is held in the same memory allocation as the kernel stack.

    Moving the restart block to struct task_struct prevents this exploit by
    making the restart_block harder to locate.

    Note that there are other fields in thread_info that are also easy
    targets, at least on some architectures.

    It's also a decent simplification, since the restart code is more or less
    identical on all architectures.

    [james.hogan@imgtec.com: metag: align thread_info::supervisor_stack]
    Signed-off-by: Andy Lutomirski
    Cc: Thomas Gleixner
    Cc: Al Viro
    Cc: "H. Peter Anvin"
    Cc: Ingo Molnar
    Cc: Kees Cook
    Cc: David Miller
    Acked-by: Richard Weinberger
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Matt Turner
    Cc: Vineet Gupta
    Cc: Russell King
    Cc: Catalin Marinas
    Cc: Will Deacon
    Cc: Haavard Skinnemoen
    Cc: Hans-Christian Egtvedt
    Cc: Steven Miao
    Cc: Mark Salter
    Cc: Aurelien Jacquiot
    Cc: Mikael Starvik
    Cc: Jesper Nilsson
    Cc: David Howells
    Cc: Richard Kuo
    Cc: "Luck, Tony"
    Cc: Geert Uytterhoeven
    Cc: Michal Simek
    Cc: Ralf Baechle
    Cc: Jonas Bonn
    Cc: "James E.J. Bottomley"
    Cc: Helge Deller
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Acked-by: Michael Ellerman (powerpc)
    Tested-by: Michael Ellerman (powerpc)
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Chen Liqin
    Cc: Lennox Wu
    Cc: Chris Metcalf
    Cc: Guan Xuetao
    Cc: Chris Zankel
    Cc: Max Filippov
    Cc: Oleg Nesterov
    Cc: Guenter Roeck
    Signed-off-by: James Hogan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Lutomirski
     

17 Jan, 2015

1 commit

  • Every PCI-PCI bridge window should fit inside an upstream bridge window
    because orphaned address space is unreachable from the primary side of the
    upstream bridge. If we inherit invalid bridge windows that overlap an
    upstream window from firmware, clip them to fit and update the bridge
    accordingly.

    [bhelgaas: changelog]
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=85491
    Reported-by: Marek Kordik
    Fixes: 5b28541552ef ("PCI: Restrict 64-bit prefetchable bridge windows to 64-bit resources")
    Signed-off-by: Yinghai Lu
    Signed-off-by: Bjorn Helgaas
    CC: Richard Henderson
    CC: Ivan Kokshaysky
    CC: Matt Turner
    CC: linux-alpha@vger.kernel.org

    Yinghai Lu
     

01 Nov, 2014

1 commit


20 Oct, 2014

1 commit

  • Pull audit updates from Eric Paris:
    "So this change across a whole bunch of arches really solves one basic
    problem. We want to audit when seccomp is killing a process. seccomp
    hooks in before the audit syscall entry code. audit_syscall_entry
    took as an argument the arch of the given syscall. Since the arch is
    part of what makes a syscall number meaningful it's an important part
    of the record, but it isn't available when seccomp shoots the
    syscall...

    For most arch's we have a better way to get the arch (syscall_get_arch)
    So the solution was two fold: Implement syscall_get_arch() everywhere
    there is audit which didn't have it. Use syscall_get_arch() in the
    seccomp audit code. Having syscall_get_arch() everywhere meant it was
    a useless flag on the stack and we could get rid of it for the typical
    syscall entry.

    The other changes inside the audit system aren't grand, fixed some
    records that had invalid spaces. Better locking around the task comm
    field. Removing some dead functions and structs. Make some things
    static. Really minor stuff"

    * git://git.infradead.org/users/eparis/audit: (31 commits)
    audit: rename audit_log_remove_rule to disambiguate for trees
    audit: cull redundancy in audit_rule_change
    audit: WARN if audit_rule_change called illegally
    audit: put rule existence check in canonical order
    next: openrisc: Fix build
    audit: get comm using lock to avoid race in string printing
    audit: remove open_arg() function that is never used
    audit: correct AUDIT_GET_FEATURE return message type
    audit: set nlmsg_len for multicast messages.
    audit: use union for audit_field values since they are mutually exclusive
    audit: invalid op= values for rules
    audit: use atomic_t to simplify audit_serial()
    kernel/audit.c: use ARRAY_SIZE instead of sizeof/sizeof[0]
    audit: reduce scope of audit_log_fcaps
    audit: reduce scope of audit_net_id
    audit: arm64: Remove the audit arch argument to audit_syscall_entry
    arm64: audit: Add audit hook in syscall_trace_enter/exit()
    audit: x86: drop arch from __audit_syscall_entry() interface
    sparc: implement is_32bit_task
    sparc: properly conditionalize use of TIF_32BIT
    ...

    Linus Torvalds
     

15 Oct, 2014

1 commit

  • Pull percpu consistent-ops changes from Tejun Heo:
    "Way back, before the current percpu allocator was implemented, static
    and dynamic percpu memory areas were allocated and handled separately
    and had their own accessors. The distinction has been gone for many
    years now; however, the now duplicate two sets of accessors remained
    with the pointer based ones - this_cpu_*() - evolving various other
    operations over time. During the process, we also accumulated other
    inconsistent operations.

    This pull request contains Christoph's patches to clean up the
    duplicate accessor situation. __get_cpu_var() uses are replaced with
    with this_cpu_ptr() and __this_cpu_ptr() with raw_cpu_ptr().

    Unfortunately, the former sometimes is tricky thanks to C being a bit
    messy with the distinction between lvalues and pointers, which led to
    a rather ugly solution for cpumask_var_t involving the introduction of
    this_cpu_cpumask_var_ptr().

    This converts most of the uses but not all. Christoph will follow up
    with the remaining conversions in this merge window and hopefully
    remove the obsolete accessors"

    * 'for-3.18-consistent-ops' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: (38 commits)
    irqchip: Properly fetch the per cpu offset
    percpu: Resolve ambiguities in __get_cpu_var/cpumask_var_t -fix
    ia64: sn_nodepda cannot be assigned to after this_cpu conversion. Use __this_cpu_write.
    percpu: Resolve ambiguities in __get_cpu_var/cpumask_var_t
    Revert "powerpc: Replace __get_cpu_var uses"
    percpu: Remove __this_cpu_ptr
    clocksource: Replace __this_cpu_ptr with raw_cpu_ptr
    sparc: Replace __get_cpu_var uses
    avr32: Replace __get_cpu_var with __this_cpu_write
    blackfin: Replace __get_cpu_var uses
    tile: Use this_cpu_ptr() for hardware counters
    tile: Replace __get_cpu_var uses
    powerpc: Replace __get_cpu_var uses
    alpha: Replace __get_cpu_var
    ia64: Replace __get_cpu_var uses
    s390: cio driver &__get_cpu_var replacements
    s390: Replace __get_cpu_var uses
    mips: Replace __get_cpu_var uses
    MIPS: Replace __get_cpu_var uses in FPU emulator.
    arm: Replace __this_cpu_ptr with raw_cpu_ptr
    ...

    Linus Torvalds
     

09 Oct, 2014

1 commit


24 Sep, 2014

1 commit

  • We have a function where the arch can be queried, syscall_get_arch().
    So rather than have every single piece of arch specific code use and/or
    duplicate syscall_get_arch(), just have the audit code use the
    syscall_get_arch() code.

    Based-on-patch-by: Richard Briggs
    Signed-off-by: Eric Paris
    Cc: linux-alpha@vger.kernel.org
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-ia64@vger.kernel.org
    Cc: microblaze-uclinux@itee.uq.edu.au
    Cc: linux-mips@linux-mips.org
    Cc: linux@lists.openrisc.net
    Cc: linux-parisc@vger.kernel.org
    Cc: linuxppc-dev@lists.ozlabs.org
    Cc: linux-s390@vger.kernel.org
    Cc: linux-sh@vger.kernel.org
    Cc: sparclinux@vger.kernel.org
    Cc: user-mode-linux-devel@lists.sourceforge.net
    Cc: linux-xtensa@linux-xtensa.org
    Cc: x86@kernel.org

    Eric Paris
     

30 Aug, 2014

1 commit


27 Aug, 2014

1 commit

  • __get_cpu_var() is used for multiple purposes in the kernel source. One of
    them is address calculation via the form &__get_cpu_var(x). This calculates
    the address for the instance of the percpu variable of the current processor
    based on an offset.

    Other use cases are for storing and retrieving data from the current
    processors percpu area. __get_cpu_var() can be used as an lvalue when
    writing data or on the right side of an assignment.

    __get_cpu_var() is defined as :

    #define __get_cpu_var(var) (*this_cpu_ptr(&(var)))

    __get_cpu_var() always only does an address determination. However, store
    and retrieve operations could use a segment prefix (or global register on
    other platforms) to avoid the address calculation.

    this_cpu_write() and this_cpu_read() can directly take an offset into a
    percpu area and use optimized assembly code to read and write per cpu
    variables.

    This patch converts __get_cpu_var into either an explicit address
    calculation using this_cpu_ptr() or into a use of this_cpu operations that
    use the offset. Thereby address calculations are avoided and less registers
    are used when code is generated.

    At the end of the patch set all uses of __get_cpu_var have been removed so
    the macro is removed too.

    The patch set includes passes over all arches as well. Once these operations
    are used throughout then specialized macros can be defined in non -x86
    arches as well in order to optimize per cpu access by f.e. using a global
    register that may be set to the per cpu base.

    Transformations done to __get_cpu_var()

    1. Determine the address of the percpu instance of the current processor.

    DEFINE_PER_CPU(int, y);
    int *x = &__get_cpu_var(y);

    Converts to

    int *x = this_cpu_ptr(&y);

    2. Same as #1 but this time an array structure is involved.

    DEFINE_PER_CPU(int, y[20]);
    int *x = __get_cpu_var(y);

    Converts to

    int *x = this_cpu_ptr(y);

    3. Retrieve the content of the current processors instance of a per cpu
    variable.

    DEFINE_PER_CPU(int, y);
    int x = __get_cpu_var(y)

    Converts to

    int x = __this_cpu_read(y);

    4. Retrieve the content of a percpu struct

    DEFINE_PER_CPU(struct mystruct, y);
    struct mystruct x = __get_cpu_var(y);

    Converts to

    memcpy(&x, this_cpu_ptr(&y), sizeof(x));

    5. Assignment to a per cpu variable

    DEFINE_PER_CPU(int, y)
    __get_cpu_var(y) = x;

    Converts to

    __this_cpu_write(y, x);

    6. Increment/Decrement etc of a per cpu variable

    DEFINE_PER_CPU(int, y);
    __get_cpu_var(y)++

    Converts to

    __this_cpu_inc(y)

    CC: Ivan Kokshaysky
    Cc: Matt Turner
    Acked-by: Richard Henderson
    Signed-off-by: Christoph Lameter
    Signed-off-by: Tejun Heo

    Christoph Lameter
     

20 Mar, 2014

1 commit


01 Feb, 2014

1 commit


11 Jan, 2014

1 commit

  • * pci/resource:
    PCI: Allocate 64-bit BARs above 4G when possible
    PCI: Enforce bus address limits in resource allocation
    PCI: Split out bridge window override of minimum allocation address
    agp/ati: Use PCI_COMMAND instead of hard-coded 4
    agp/intel: Use CPU physical address, not bus address, for ioremap()
    agp/intel: Use pci_bus_address() to get GTTADR bus address
    agp/intel: Use pci_bus_address() to get MMADR bus address
    agp/intel: Support 64-bit GMADR
    agp/intel: Rename gtt_bus_addr to gtt_phys_addr
    drm/i915: Rename gtt_bus_addr to gtt_phys_addr
    agp: Use pci_resource_start() to get CPU physical address for BAR
    agp: Support 64-bit APBASE
    PCI: Add pci_bus_address() to get bus address of a BAR
    PCI: Convert pcibios_resource_to_bus() to take a pci_bus, not a pci_dev
    PCI: Change pci_bus_region addresses to dma_addr_t

    Bjorn Helgaas
     

22 Dec, 2013

1 commit

  • These interfaces:

    pcibios_resource_to_bus(struct pci_dev *dev, *bus_region, *resource)
    pcibios_bus_to_resource(struct pci_dev *dev, *resource, *bus_region)

    took a pci_dev, but they really depend only on the pci_bus. And we want to
    use them in resource allocation paths where we have the bus but not a
    device, so this patch converts them to take the pci_bus instead of the
    pci_dev:

    pcibios_resource_to_bus(struct pci_bus *bus, *bus_region, *resource)
    pcibios_bus_to_resource(struct pci_bus *bus, *resource, *bus_region)

    In fact, with standard PCI-PCI bridges, they only depend on the host
    bridge, because that's the only place address translation occurs, but
    we aren't going that far yet.

    [bhelgaas: changelog]
    Signed-off-by: Yinghai Lu
    Signed-off-by: Bjorn Helgaas

    Yinghai Lu
     

12 Dec, 2013

1 commit