12 Jan, 2012

1 commit

  • * 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci: (80 commits)
    x86/PCI: Expand the x86_msi_ops to have a restore MSIs.
    PCI: Increase resource array mask bit size in pcim_iomap_regions()
    PCI: DEVICE_COUNT_RESOURCE should be equal to PCI_NUM_RESOURCES
    PCI: pci_ids: add device ids for STA2X11 device (aka ConneXT)
    PNP: work around Dell 1536/1546 BIOS MMCONFIG bug that breaks USB
    x86/PCI: amd: factor out MMCONFIG discovery
    PCI: Enable ATS at the device state restore
    PCI: msi: fix imbalanced refcount of msi irq sysfs objects
    PCI: kconfig: English typo in pci/pcie/Kconfig
    PCI/PM/Runtime: make PCI traces quieter
    PCI: remove pci_create_bus()
    xtensa/PCI: convert to pci_scan_root_bus() for correct root bus resources
    x86/PCI: convert to pci_create_root_bus() and pci_scan_root_bus()
    x86/PCI: use pci_scan_bus() instead of pci_scan_bus_parented()
    x86/PCI: read Broadcom CNB20LE host bridge info before PCI scan
    sparc32, leon/PCI: convert to pci_scan_root_bus() for correct root bus resources
    sparc/PCI: convert to pci_create_root_bus()
    sh/PCI: convert to pci_scan_root_bus() for correct root bus resources
    powerpc/PCI: convert to pci_create_root_bus()
    powerpc/PCI: split PHB part out of pcibios_map_io_space()
    ...

    Fix up conflicts in drivers/pci/msi.c and include/linux/pci_regs.h due
    to the same patches being applied in other branches.

    Linus Torvalds
     

08 Jan, 2012

1 commit

  • * 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (73 commits)
    arm: fix up some samsung merge sysdev conversion problems
    firmware: Fix an oops on reading fw_priv->fw in sysfs loading file
    Drivers:hv: Fix a bug in vmbus_driver_unregister()
    driver core: remove __must_check from device_create_file
    debugfs: add missing #ifdef HAS_IOMEM
    arm: time.h: remove device.h #include
    driver-core: remove sysdev.h usage.
    clockevents: remove sysdev.h
    arm: convert sysdev_class to a regular subsystem
    arm: leds: convert sysdev_class to a regular subsystem
    kobject: remove kset_find_obj_hinted()
    m86k: gpio - convert sysdev_class to a regular subsystem
    mips: txx9_sram - convert sysdev_class to a regular subsystem
    mips: 7segled - convert sysdev_class to a regular subsystem
    sh: dma - convert sysdev_class to a regular subsystem
    sh: intc - convert sysdev_class to a regular subsystem
    power: suspend - convert sysdev_class to a regular subsystem
    power: qe_ic - convert sysdev_class to a regular subsystem
    power: cmm - convert sysdev_class to a regular subsystem
    s390: time - convert sysdev_class to a regular subsystem
    ...

    Fix up conflicts with 'struct sysdev' removal from various platform
    drivers that got changed:
    - arch/arm/mach-exynos/cpu.c
    - arch/arm/mach-exynos/irq-eint.c
    - arch/arm/mach-s3c64xx/common.c
    - arch/arm/mach-s3c64xx/cpu.c
    - arch/arm/mach-s5p64x0/cpu.c
    - arch/arm/mach-s5pv210/common.c
    - arch/arm/plat-samsung/include/plat/cpu.h
    - arch/powerpc/kernel/sysfs.c
    and fix up cpu_is_hotpluggable() as per Greg in include/linux/cpu.h

    Linus Torvalds
     

07 Jan, 2012

5 commits

  • * 'for-linus' of git://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm: (207 commits)
    ARM: 7267/1: Remove BUILD_BUG_ON from asm/bug.h
    ARM: 7269/1: mach-sa1100: fix sched_clock breakage
    ARM: 7198/1: arm/imx6: add restart support for imx6q
    ARM: restart: remove the now empty arch_reset()
    ARM: restart: remove comments about adding code to arch_reset()
    ARM: restart: lpc32xx & u300: remove unnecessary printk
    ARM: restart: plat-samsung: remove plat/reset.h and s5p_reset_hook
    ARM: restart: w90x900: use new restart hook
    ARM: restart: Versatile Express: use new restart hook
    ARM: restart: versatile: use new restart hook
    ARM: restart: u300: use new restart hook
    ARM: restart: tegra: use new restart hook
    ARM: restart: spear: use new restart hook
    ARM: restart: shark: use new restart hook
    ARM: restart: sa1100: use new restart hook
    ARM: 7252/1: restart: S5PV210: use new restart hook
    ARM: 7251/1: restart: S5PC100: use new restart hook
    ARM: 7250/1: restart: S5P64X0: use new restart hook
    ARM: 7266/1: restart: S3C64XX: use new restart hook
    ARM: 7265/1: restart: S3C24XX: use new restart hook
    ...

    Fix up trivial conflict in arch/arm/mm/init.c due to removal of
    memblock_init() clashing with the movement of the sorting of the meminfo
    array.

    Linus Torvalds
     
  • Convert from pci_scan_bus() to pci_scan_root_bus() and remove root bus
    resource fixups. This fixes the problem of "early" and "header" quirks
    seeing incorrect root bus resources.

    CC: Russell King
    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Jesse Barnes

    Bjorn Helgaas
     
  • This patch converts ARM's architecture-specific inlined
    'pcibios_set_master()' routine to a non-inlined function. This will
    allow follow on patches to create a generic 'pcibios_set_master()'
    function using the '__weak' attribute which can be used by all
    architectures as a default which, if necessary, can then be over-
    ridden by architecture-specific code.

    Converting 'pci_bios_set_master()' to a non-inlined function will allow
    ARM's 'pcibios_set_master()' implementation to remain architecture-
    specific after the generic version is introduced and thus, not change
    current behavior.

    Note that ARM also has a non-inlined 'pcibios_set_master()' that is
    used if CONFIG_PCI_HOST_ITE8152 is defined. This patch does not
    change any behavior here either.

    No functional change.

    Signed-off-by: Myron Stowe
    Signed-off-by: Jesse Barnes

    Myron Stowe
     
  • This resolves the conflict in the arch/arm/mach-s3c64xx/s3c6400.c file,
    and it fixes the build error in the arch/x86/kernel/microcode_core.c
    file, that the merge did not catch.

    The microcode_core.c patch was provided by Stephen Rothwell
    who was invaluable in the merge issues involved
    with the large sysdev removal process in the driver-core tree.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (64 commits)
    cpu: Export cpu_up()
    rcu: Apply ACCESS_ONCE() to rcu_boost() return value
    Revert "rcu: Permit rt_mutex_unlock() with irqs disabled"
    docs: Additional LWN links to RCU API
    rcu: Augment rcu_batch_end tracing for idle and callback state
    rcu: Add rcutorture tests for srcu_read_lock_raw()
    rcu: Make rcutorture test for hotpluggability before offlining CPUs
    driver-core/cpu: Expose hotpluggability to the rest of the kernel
    rcu: Remove redundant rcu_cpu_stall_suppress declaration
    rcu: Adaptive dyntick-idle preparation
    rcu: Keep invoking callbacks if CPU otherwise idle
    rcu: Irq nesting is always 0 on rcu_enter_idle_common
    rcu: Don't check irq nesting from rcu idle entry/exit
    rcu: Permit dyntick-idle with callbacks pending
    rcu: Document same-context read-side constraints
    rcu: Identify dyntick-idle CPUs on first force_quiescent_state() pass
    rcu: Remove dynticks false positives and RCU failures
    rcu: Reduce latency of rcu_prepare_for_idle()
    rcu: Eliminate RCU_FAST_NO_HZ grace-period hang
    rcu: Avoid needlessly IPIing CPUs at GP end
    ...

    Linus Torvalds
     

05 Jan, 2012

5 commits


24 Dec, 2011

3 commits

  • This break-out from Colin Cross' cpufreq-aware TWD patch
    will handle the case when our localtimer's clock changes with
    the cpu clock. A cpufreq transtion notifier will be registered
    only if the platform has supplied a specified clock to the TWD.

    After a cpufreq transition, update the clockevent's frequency
    by fetching the new clock rate from the clock framework and
    reprogram the next clock event.

    The necessary changes in the clockevents framework was done by
    Thomas Gleixner in kernel v3.0.

    ChangeLog v1->v2:
    - Replace IS_ERR_OR_NULL() with IS_ERR() in twd_clk check.
    - Update code to use the already existing per-cpu array of TWD
    clockevents instead of adding cruft.

    [Broke out, ifdef:ed CPUfreq stuff for non-cpufreq configs]
    [Rebased to newer TWD base with per-CPU clock array]

    Signed-off-by: Colin Cross
    Acked-by: Thomas Gleixner
    Acked-by: Rob Herring
    Acked-by: Santosh Shilimkar
    Signed-off-by: Linus Walleij
    Signed-off-by: Russell King

    Linus Walleij
     
  • This break-out from Colin Cross' cpufreq-aware TWD patch will
    optionally retrieve the clock rate of the TWD from an external
    clock. A variant of this patch has been proposed by Rob Herring
    as well.

    The basic idea is to avoid recalibrating the rate of the clock
    at boot if the platform already know what rate the clock to the
    TWD block has.

    ChangeLog v1->v2: added clk_[prepare|unprepare] calls.

    [Broke out of larger SMP TWD patch]

    Signed-off-by: Colin Cross
    Acked-by: Thomas Gleixner
    Acked-by: Rob Herring
    Acked-by: Santosh Shilimkar
    Signed-off-by: Linus Walleij
    Signed-off-by: Russell King

    Linus Walleij
     
  • This break-out from Colin Cross' cpufreq-aware TWD patch will
    just modernize the clock event registration code to use
    clockevents_config_and_register().

    [Broke out of larger SMP TWD patch]

    Signed-off-by: Colin Cross
    Acked-by: Thomas Gleixner
    Acked-by: Rob Herring
    Acked-by: Santosh Shilimkar
    Signed-off-by: Linus Walleij
    Signed-off-by: Russell King

    Linus Walleij
     

22 Dec, 2011

1 commit


20 Dec, 2011

1 commit


19 Dec, 2011

1 commit

  • sched_clock() is yet another blocker on the road to the single
    image. This patch implements an idea by Russell King:

    http://www.spinics.net/lists/linux-omap/msg49561.html

    Instead of asking the platform to implement both sched_clock()
    itself and the rollover callback, simply register a read()
    function, and let the ARM code care about sched_clock() itself,
    the conversion to ns and the rollover. sched_clock() uses
    this read() function as an indirection to the platform code.
    If the platform doesn't provide a read(), the code falls back
    to the jiffy counter (just like the default sched_clock).

    This allow some simplifications and possibly some footprint gain
    when multiple platforms are compiled in. Among the drawbacks,
    the removal of the *_fixed_sched_clock optimization which could
    negatively impact some platforms (sa1100, tegra, versatile
    and omap).

    Tested on 11MPCore, OMAP4 and Tegra.

    Cc: Imre Kaloz
    Cc: Eric Miao
    Cc: Colin Cross
    Cc: Erik Gilling
    Cc: Olof Johansson
    Cc: Sascha Hauer
    Cc: Alessandro Rubini
    Cc: STEricsson
    Cc: Lennert Buytenhek
    Cc: Ben Dooks
    Tested-by: Jamie Iles
    Tested-by: Tony Lindgren
    Tested-by: Kyungmin Park
    Acked-by: Linus Walleij
    Acked-by: Nicolas Pitre
    Acked-by: Krzysztof Halasa
    Acked-by: Kukjin Kim
    Signed-off-by: Marc Zyngier
    Signed-off-by: Russell King

    Marc Zyngier
     

16 Dec, 2011

1 commit

  • The bisection implemented in unwind_find_origin() stopped to early. If
    there is only a single entry left to check the original code just took
    the end point as origin which might be wrong.

    This was introduced in commit de66a979012d ("ARM: 7187/1: fix unwinding
    for XIP kernels").

    Reported-and-tested-by: Nick Bowler
    Signed-off-by: Uwe Kleine-König
    Signed-off-by: Linus Torvalds

    Uwe Kleine-König
     

14 Dec, 2011

1 commit


13 Dec, 2011

7 commits

  • This patch changes the kprobes implementation to use the generic ARM
    instruction set condition code checks, rather than a dedicated
    implementation.

    Signed-off-by: Leif Lindholm
    Acked-by: Jon Medhurst
    Reviewed-by: Will Deacon
    Signed-off-by: Russell King

    Leif Lindholm
     
  • This patch fixes two separate issues with the SWP emulation handler:
    1: Certain processors implementing ARMv7-A can (legally) take an
    undef exception even when the condition code would have meant that
    the instruction should not have been executed.
    2: Opcodes with all flags set (condition code = 0xf) have been reused
    in recent, and not-so-recent, versions of the ARM architecture to
    implement unconditional extensions to the instruction set. The
    existing code would still have processed any undefs triggered by
    executing an opcode with such a value.

    This patch uses the new generic ARM instruction set condition code
    checks to implement proper handling of these situations.

    Signed-off-by: Leif Lindholm
    Reviewed-by: Will Deacon
    Signed-off-by: Russell King

    Leif Lindholm
     
  • This patch breaks the ARM condition checking code out of nwfpe/fpopcode.{ch}
    into a standalone file for opcode operations. It also modifies the code
    somewhat for coding style adherence, and adds some temporary variables for
    increased readability.

    Signed-off-by: Leif Lindholm
    Reviewed-by: Will Deacon
    Signed-off-by: Russell King

    Leif Lindholm
     
  • The Integrator AP/CP can have a varying set of core modules, some
    (like ARM920T) are so old that trying to read the TCM status register
    with CP15 will make them hang. So we need to make sure that we are
    running on v5 or later in order to be able to activate this for
    the Integrator. (The Integrator with CM926EJ-S has 32+32 kb of TCM
    memory.)

    Signed-off-by: Linus Walleij
    Signed-off-by: Russell King

    Linus Walleij
     
  • Now that there is a common way to reset the machine, let's use it
    instead of reinventing the wheel in the kexec backend.

    Signed-off-by: Will Deacon

    Will Deacon
     
  • Sending IPI_CPU_STOP to a CPU causes it to execute a busy cpu_relax
    loop forever. This makes it impossible to kexec successfully on an SMP
    system since the secondary CPUs do not reset.

    This patch adds a callback to platform_cpu_kill, defined when
    CONFIG_HOTPLUG_CPU=y, from the ipi_cpu_stop handling code. This function
    currently just returns 1 on all platforms that define it but allows them
    to do something more sophisticated in the future.

    Signed-off-by: Will Deacon

    Will Deacon
     
  • Tools such as kexec and CPU hotplug require a way to reset the processor
    and branch to some code in physical space. This requires various bits of
    jiggery pokery with the caches and MMU which, when it goes wrong, tends
    to lock up the system.

    This patch fleshes out the soft_restart implementation so that it
    branches to the reset code using the identity mapping. This requires us
    to change to a temporary stack, held within the kernel image as a static
    array, to avoid conflicting with the new view of memory.

    Signed-off-by: Will Deacon

    Will Deacon
     

12 Dec, 2011

4 commits

  • arm_dma_zone_size is used by arm_bootmem_free() which is called by
    paging_init(). Thus it needs to be set before calling it.

    Signed-off-by: Arnaud Patard
    Acked-by: Nicolas Pitre
    Cc: stable@kernel.org
    Signed-off-by: Russell King

    Arnaud Patard
     
  • Those two APIs were provided to optimize the calls of
    tick_nohz_idle_enter() and rcu_idle_enter() into a single
    irq disabled section. This way no interrupt happening in-between would
    needlessly process any RCU job.

    Now we are talking about an optimization for which benefits
    have yet to be measured. Let's start simple and completely decouple
    idle rcu and dyntick idle logics to simplify.

    Signed-off-by: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Peter Zijlstra
    Reviewed-by: Josh Triplett
    Signed-off-by: Paul E. McKenney

    Frederic Weisbecker
     
  • It is assumed that rcu won't be used once we switch to tickless
    mode and until we restart the tick. However this is not always
    true, as in x86-64 where we dereference the idle notifiers after
    the tick is stopped.

    To prepare for fixing this, add two new APIs:
    tick_nohz_idle_enter_norcu() and tick_nohz_idle_exit_norcu().

    If no use of RCU is made in the idle loop between
    tick_nohz_enter_idle() and tick_nohz_exit_idle() calls, the arch
    must instead call the new *_norcu() version such that the arch doesn't
    need to call rcu_idle_enter() and rcu_idle_exit().

    Otherwise the arch must call tick_nohz_enter_idle() and
    tick_nohz_exit_idle() and also call explicitly:

    - rcu_idle_enter() after its last use of RCU before the CPU is put
    to sleep.
    - rcu_idle_exit() before the first use of RCU after the CPU is woken
    up.

    Signed-off-by: Frederic Weisbecker
    Cc: Mike Frysinger
    Cc: Guan Xuetao
    Cc: David Miller
    Cc: Chris Metcalf
    Cc: Hans-Christian Egtvedt
    Cc: Ralf Baechle
    Cc: Paul E. McKenney
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: H. Peter Anvin
    Cc: Russell King
    Cc: Paul Mackerras
    Cc: Heiko Carstens
    Cc: Paul Mundt
    Signed-off-by: Paul E. McKenney

    Frederic Weisbecker
     
  • The tick_nohz_stop_sched_tick() function, which tries to delay
    the next timer tick as long as possible, can be called from two
    places:

    - From the idle loop to start the dytick idle mode
    - From interrupt exit if we have interrupted the dyntick
    idle mode, so that we reprogram the next tick event in
    case the irq changed some internal state that requires this
    action.

    There are only few minor differences between both that
    are handled by that function, driven by the ts->inidle
    cpu variable and the inidle parameter. The whole guarantees
    that we only update the dyntick mode on irq exit if we actually
    interrupted the dyntick idle mode, and that we enter in RCU extended
    quiescent state from idle loop entry only.

    Split this function into:

    - tick_nohz_idle_enter(), which sets ts->inidle to 1, enters
    dynticks idle mode unconditionally if it can, and enters into RCU
    extended quiescent state.

    - tick_nohz_irq_exit() which only updates the dynticks idle mode
    when ts->inidle is set (ie: if tick_nohz_idle_enter() has been called).

    To maintain symmetry, tick_nohz_restart_sched_tick() has been renamed
    into tick_nohz_idle_exit().

    This simplifies the code and micro-optimize the irq exit path (no need
    for local_irq_save there). This also prepares for the split between
    dynticks and rcu extended quiescent state logics. We'll need this split to
    further fix illegal uses of RCU in extended quiescent states in the idle
    loop.

    Signed-off-by: Frederic Weisbecker
    Cc: Mike Frysinger
    Cc: Guan Xuetao
    Cc: David Miller
    Cc: Chris Metcalf
    Cc: Hans-Christian Egtvedt
    Cc: Ralf Baechle
    Cc: Paul E. McKenney
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: H. Peter Anvin
    Cc: Russell King
    Cc: Paul Mackerras
    Cc: Heiko Carstens
    Cc: Paul Mundt
    Signed-off-by: Paul E. McKenney
    Reviewed-by: Josh Triplett

    Frederic Weisbecker
     

09 Dec, 2011

2 commits

  • 24aa07882b (memblock, x86: Replace memblock_x86_reserve/free_range()
    with generic ones) removed arch/x86/include/asm/memblock.h and dropped
    its inclusion from include/linux/memblock.h which breaks other
    architectures which depended on the generic memblock.h pulling in the
    arch specific one.

    However, the proper fix isn't adding back the asm inclusion. memblock
    doesn't have any arch dependent part and doesn't need arch specific
    header file and asm/memblock.h files are either practically empty or
    contain mostly unrelated arch specific stuff.

    * In microblaze, sh, powerpc, sparc and openrisc, asm/memblock.h is
    either empty or just contains unused MEMBLOCK_DBG() macro. Remove
    them.

    * In arm and unicore32, asm/memblock.h contains arch specific stuff.
    Include it directly from its users. It might be a good idea to
    rename the header file to avoid confusion.

    Signed-off-by: Tejun Heo
    Reported-by: "H. Peter Anvin"
    Cc: Yinghai Lu
    Cc: Russell King
    Cc: Michal Simek
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mundt
    Cc: "David S. Miller"
    Cc: Guan Xuetao

    Tejun Heo
     
  • …/linux into devel-stable

    Conflicts:
    arch/arm/mm/ioremap.c

    Russell King
     

08 Dec, 2011

3 commits

  • The DFSR and IFSR register format is different when LPAE is enabled. In
    addition, DFSR and IFSR have similar definitions for the fault type.
    This modifies the fault code to correctly handle the new format.

    Signed-off-by: Catalin Marinas

    Catalin Marinas
     
  • This patch adds the MMU initialisation for the LPAE page table format.
    The swapper_pg_dir size with LPAE is 5 rather than 4 pages. A new
    proc-v7-3level.S file contains the TTB initialisation, context switch
    and PTE setting code with the LPAE. The TTBRx split is based on the
    PAGE_OFFSET with TTBR1 used for the kernel mappings. The 36-bit mappings
    (supersections) and a few other memory types in mmu.c are conditionally
    compiled.

    Signed-off-by: Catalin Marinas

    Catalin Marinas
     
  • Before we enable the MMU, we must ensure that the TTBR registers contain
    sane values. After the MMU has been enabled, we jump to the *virtual*
    address of the following function, so we also need to ensure that the
    SCTLR write has taken effect.

    This patch adds ISB instructions around the SCTLR write to ensure the
    visibility of the above.

    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas

    Will Deacon
     

07 Dec, 2011

1 commit


06 Dec, 2011

3 commits

  • The ARM SMP booting code allocates a temporary set of page tables
    containing an identity mapping of the kernel image and provides this
    to secondary CPUs for initial booting.

    In reality, we only need to include the __turn_mmu_on function in the
    identity mapping since the rest of the kernel is executing from virtual
    addresses after this point.

    This patch adds __turn_mmu_on to the .idmap.text section, allowing the
    SMP booting code to use the idmap_pgd directly and not have to populate
    its own set of page table.

    As a result of this patch, we can make the identity_mapping_add function
    static (since it is only used within mm/idmap.c) and also remove the
    identity_mapping_del function. The identity map population is moved to
    an early initcall so that it is setup in time for secondary CPU bringup.

    Reviewed-by: Catalin Marinas
    Signed-off-by: Will Deacon

    Will Deacon
     
  • __create_page_tables identity maps the region of memory from
    __enable_mmu to the end of __turn_mmu_on.

    In preparation for including __turn_mmu_on in the .idmap.text section,
    this patch modifies the identity mapping so that it only includes the
    __turn_mmu_on code.

    Reviewed-by: Catalin Marinas
    Signed-off-by: Will Deacon

    Will Deacon
     
  • The ARM CPU suspend code requires cpu_resume_mmu to be identity mapped
    in order to re-enable the MMU when coming out of suspend. Currently,
    this is accomplished by maintaining a suspend_pgd with the relevant
    mapping put in place at init time.

    This patch replaces the use of suspend_pgd with the new idmap_pgd.
    cpu_resume_mmu is placed in the .idmap.text section so that it is
    included in the identity map.

    Reviewed-by: Catalin Marinas
    Acked-by: Dave Martin
    Tested-by: Lorenzo Pieralisi
    Signed-off-by: Will Deacon

    Will Deacon