07 Dec, 2010

2 commits

  • Commit 0ea129300982 ("arm: return both physical and virtual addresses
    from addruart") took out the test for MMU on/off but didn't switch the
    ldr instructions to no longer be conditionals based on said test.

    Fix that.

    Signed-off-by: Olof Johansson
    Acked-by: Colin Cross
    Signed-off-by: Linus Torvalds

    Olof Johansson
     
  • * master.kernel.org:/home/rmk/linux-2.6-arm:
    ARM: 6524/1: GIC irq desciptor bug fix
    ARM: 6523/1: iop: ensure sched_clock() is notrace
    ARM: 6456/1: Fix for building DEBUG with sa11xx_base.c as a module.
    ARM: 6519/1: kuser: Fix incorrect cmpxchg syscall in kuser helpers
    ARM: 6505/1: kprobes: Don't HAVE_KPROBES when CONFIG_THUMB2_KERNEL is selected
    ARM: 6508/1: vexpress: Correct data alignment in headsmp.S for CONFIG_THUMB2_KERNEL
    ARM: 6507/1: RealView: Correct data alignment in headsmp.S for CONFIG_THUMB2_KERNEL
    ARM: 6504/1: Thumb-2: Fix long-distance conditional branches in head.S for Thumb-2.
    ARM: 6503/1: Thumb-2: Restore sensible zImage header layout for CONFIG_THUMB2_KERNEL
    ARM: 6502/1: Thumb-2: Fix CONFIG_THUMB2_KERNEL breakage in compressed/head.S
    ARM: 6501/1: Thumb-2: Correct data alignment for CONFIG_THUMB2_KERNEL in mm/proc-v7.S
    ARM: 6500/1: Thumb-2: Correct data alignment for CONFIG_THUMB2_KERNEL in kernel/head.S
    ARM: 6499/1: Thumb-2: Correct data alignment for CONFIG_THUMB2_KERNEL in bootp/init.S
    ARM: 6498/1: vfp: Correct data alignment for CONFIG_THUMB2_KERNEL
    ARM: 6497/1: kexec: Correct data alignment for CONFIG_THUMB2_KERNEL
    ARM: 6496/1: GIC: Do not try to register more then NR_IRQS interrupts
    ARM: cns3xxx: Fix build with CONFIG_PCI=y

    Linus Torvalds
     

06 Dec, 2010

3 commits


05 Dec, 2010

2 commits

  • The generic conversion eliminates the spurious no_ack and no_end
    routines, converts all the cascaded handlers to handle_simple_irq() and
    makes iosapic use a modified handle_percpu_irq() to become the same as
    the CPU irq's. This isn't an essential change, but it eliminates the
    mask/unmask overhead of handle_level_irq().

    Signed-off-by: James Bottomley
    Tested-by: Helge Deller
    Signed-off-by: Kyle McMartin

    James Bottomley
     
  • The essential problem we're currently having is that dino (and gsc) is a
    cascaded CPU interrupt. Under the old __do_IRQ() handler, our CPU
    interrupts basically did an ack followed by an end. In the new scheme,
    we replaced them with level handlers which do a mask, an ack and then an
    unmask (but no end). Instead, with the renaming of end to eoi, we
    actually want to call the percpu flow handlers, because they actually
    have all the characteristics we want.

    This patch does the conversion and gets my C360 booting again.

    Signed-off-by: James Bottomley
    Signed-off-by: Kyle McMartin

    James Bottomley
     

04 Dec, 2010

6 commits


03 Dec, 2010

4 commits

  • Paul Mundt
     
  • se7724 board does not have FSI/B.

    Signed-off-by: Nobuhiro Iwamatsu
    Signed-off-by: Paul Mundt

    Nobuhiro Iwamatsu
     
  • Signed-off-by: Nobuhiro Iwamatsu
    Signed-off-by: Paul Mundt

    Nobuhiro Iwamatsu
     
  • On stock 2.6.37-rc4, running:

    # mount lilith:/export /mnt/lilith
    # find /mnt/lilith/ -type f -print0 | xargs -0 file

    crashes the machine fairly quickly under Xen. Often it results in oops
    messages, but the couple of times I tried just now, it just hung quietly
    and made Xen print some rude messages:

    (XEN) mm.c:2389:d80 Bad type (saw 7400000000000001 != exp
    3000000000000000) for mfn 1d7058 (pfn 18fa7)
    (XEN) mm.c:964:d80 Attempt to create linear p.t. with write perms
    (XEN) mm.c:2389:d80 Bad type (saw 7400000000000010 != exp
    1000000000000000) for mfn 1d2e04 (pfn 1d1fb)
    (XEN) mm.c:2965:d80 Error while pinning mfn 1d2e04

    Which means the domain tried to map a pagetable page RW, which would
    allow it to map arbitrary memory, so Xen stopped it. This is because
    vm_unmap_ram() left some pages mapped in the vmalloc area after NFS had
    finished with them, and those pages got recycled as pagetable pages
    while still having these RW aliases.

    Removing those mappings immediately removes the Xen-visible aliases, and
    so it has no problem with those pages being reused as pagetable pages.
    Deferring the TLB flush doesn't upset Xen because it can flush the TLB
    itself as needed to maintain its invariants.

    When unmapping a region in the vmalloc space, clear the ptes
    immediately. There's no point in deferring this because there's no
    amortization benefit.

    The TLBs are left dirty, and they are flushed lazily to amortize the
    cost of the IPIs.

    This specific motivation for this patch is an oops-causing regression
    since 2.6.36 when using NFS under Xen, triggered by the NFS client's use
    of vm_map_ram() introduced in 56e4ebf877b60 ("NFS: readdir with vmapped
    pages") . XFS also uses vm_map_ram() and could cause similar problems.

    Signed-off-by: Jeremy Fitzhardinge
    Cc: Nick Piggin
    Cc: Bryan Schumaker
    Cc: Trond Myklebust
    Cc: Alex Elder
    Cc: Dave Chinner
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeremy Fitzhardinge
     

02 Dec, 2010

2 commits

  • Early after being resumed we need to unplug again the emulated devices.

    Signed-off-by: Stefano Stabellini

    Stefano Stabellini
     
  • When remapping MSIs into pirqs for PV on HVM guests, qemu is responsible
    for doing the actual mapping and unmapping.
    We only give qemu the desired pirq number when we ask to do the mapping
    the first time, after that we should be reading back the pirq number
    from qemu every time we want to re-enable the MSI.

    This fixes a bug in xen_hvm_setup_msi_irqs that manifests itself when
    trying to enable the same MSI for the second time: the old MSI to pirq
    mapping is still valid at this point but xen_hvm_setup_msi_irqs would
    try to assign a new pirq anyway.
    A simple way to reproduce this bug is to assign an MSI capable network
    card to a PV on HVM guest, if the user brings down the corresponding
    ethernet interface and up again, Linux would fail to enable MSIs on the
    device.

    Signed-off-by: Stefano Stabellini

    Stefano Stabellini
     

01 Dec, 2010

8 commits


30 Nov, 2010

13 commits

  • Currently, the kprobes implementation for ARM only supports the ARM
    instruction set, so it only works if CONFIG_THUMB2_KERNEL is not
    enabled.

    Until kprobes is updated to work with Thumb-2, turning it on will
    cause horrible things to happen, so this patch disables it for now.

    Signed-off-by: Dave Martin
    Acked-by: Nicolas Pitre
    Signed-off-by: Russell King

    Dave Martin
     
  • Directives such as .long and .word do not magically cause the
    assembler location counter to become aligned in gas. As a
    result, using these directives in code sections can result in
    misaligned data words when building a Thumb-2 kernel
    (CONFIG_THUMB2_KERNEL).

    This is a Bad Thing, since the ABI permits the compiler to
    assume that fundamental types of word size or above are word-
    aligned when accessing them from C. If the data is not really
    word-aligned, this can cause impaired performance and stray
    alignment faults in some circumstances.

    In general, the following rules should be applied when using
    data word declaration directives inside code sections:

    * .quad and .double:
    .align 3

    * .long, .word, .single, .float:
    .align (or .align 2)

    * .short:
    No explicit alignment required, since Thumb-2
    instructions are always 2 or 4 bytes in size.
    immediately after an instruction.

    Reviewed-by: Will Deacon
    Signed-off-by: Dave Martin
    Acked-by: Catalin Marinas
    Signed-off-by: Russell King

    Dave Martin
     
  • Directives such as .long and .word do not magically cause the
    assembler location counter to become aligned in gas. As a result,
    using these directives in code sections can result in misaligned data
    words when building a Thumb-2 kernel (CONFIG_THUMB2_KERNEL).

    This is a Bad Thing, since the ABI permits the compiler to assume that
    fundamental types of word size or above are word- aligned when
    accessing them from C. If the data is not really word-aligned, this
    can cause impaired performance and stray alignment faults in some
    circumstances.

    In general, the following rules should be applied when using data word
    declaration directives inside code sections:

    * .quad and .double:
    .align 3

    * .long, .word, .single, .float:
    .align (or .align 2)

    * .short:
    No explicit alignment required, since Thumb-2
    instructions are always 2 or 4 bytes in size.
    immediately after an instruction.

    Reviewed-by: Will Deacon
    Signed-off-by: Dave Martin
    Acked-by: Catalin Marinas
    Signed-off-by: Russell King

    Dave Martin
     
  • The 32-bit conditional branches in Thumb-2 have a shorter range
    (+/-512K) than their ARM counterparts (+/-32MB). The linker does
    not currently generate trampolines to extend the range of these
    Thumb-2 conditional branches, resulting in link errors when vmlinux
    is sufficiently large, e.g.:

    head.o:(.text+0x464): relocation truncated to fit: R_ARM_THM_JUMP19

    This patch forces the longer-range, unconditional branch encoding
    by use of an explicit IT instruction. The resulting branches are
    triggered on the same conditions as before.

    Signed-off-by: Dave Martin
    Signed-off-by: Russell King

    Dave Martin
     
  • The code which makes up the zImage header intends to leave a
    32-byte gap followed by a branch to the real entry point, a magic
    number, and a word containing the absolute entry point address.

    This gets messed up with with CONFIG_THUMB2_KERNEL, because the
    size of the initial padding NOPs changes.

    Instead, the header can be made fully compatible by restoring it to
    ARM.

    In the Thumb-2 case, we can replace the initial NOPs with a
    sequence which switches to Thumb and jumps to the real entry point.

    As a consequence, the zImage entry point is now always ARM, so no
    special magic is needed any more for the uImage rules in the
    Thumb-2 case.

    Signed-off-by: Dave Martin
    Acked-by: Catalin Marinas
    Acked-by: Nicolas Pitre
    Signed-off-by: Russell King

    Dave Martin
     
  • Some instruction operand combinations are used here which are nor
    permitted in Thumb-2.

    In particular, most uses of pc as an operand are disallowed in
    Thumb-2, and deprecated in ARM from ARMv7 onwards.

    The modified code introduced by this patch should be compatible
    with all architecture versions >= v3, with or without
    CONFIG_THUMB2_KERNEL.

    Reviewed-by: Will Deacon
    Signed-off-by: Dave Martin
    Acked-by: Catalin Marinas
    Acked-by: Nicolas Pitre
    Signed-off-by: Russell King

    Dave Martin
     
  • Directives such as .long and .word do not magically cause the
    assembler location counter to become aligned in gas. As a result,
    using these directives in code sections can result in misaligned
    data words when building a Thumb-2 kernel (CONFIG_THUMB2_KERNEL).

    This is a Bad Thing, since the ABI permits the compiler to assume
    that fundamental types of word size or above are word- aligned when
    accessing them from C. If the data is not really word-aligned,
    this can cause impaired performance and stray alignment faults in
    some circumstances.

    In general, the following rules should be applied when using data
    word declaration directives inside code sections:

    * .quad and .double:
    .align 3

    * .long, .word, .single, .float:
    .align (or .align 2)

    * .short:
    No explicit alignment required, since Thumb-2
    instructions are always 2 or 4 bytes in size.
    immediately after an instruction.

    In this specific case, we can achieve the desired alignment by
    forcing a 32-bit branch instruction using the W() macro, since the
    assembler location counter is already 32-bit aligned in this case.

    Reviewed-by: Will Deacon
    Signed-off-by: Dave Martin
    Acked-by: Catalin Marinas
    Signed-off-by: Russell King

    Dave Martin
     
  • Directives such as .long and .word do not magically cause the
    assembler location counter to become aligned in gas. As a result,
    using these directives in code sections can result in misaligned
    data words when building a Thumb-2 kernel (CONFIG_THUMB2_KERNEL).

    This is a Bad Thing, since the ABI permits the compiler to assume
    that fundamental types of word size or above are word- aligned when
    accessing them from C. If the data is not really word-aligned,
    this can cause impaired performance and stray alignment faults in
    some circumstances.

    In general, the following rules should be applied when using data
    word declaration directives inside code sections:

    * .quad and .double:
    .align 3

    * .long, .word, .single, .float:
    .align (or .align 2)

    * .short:
    No explicit alignment required, since Thumb-2
    instructions are always 2 or 4 bytes in size.
    immediately after an instruction.

    Reviewed-by: Will Deacon
    Signed-off-by: Dave Martin
    Acked-by: Catalin Marinas
    Signed-off-by: Russell King

    Dave Martin
     
  • Directives such as .long and .word do not magically cause the
    assembler location counter to become aligned in gas. As a result,
    using these directives in code sections can result in misaligned
    data words when building a Thumb-2 kernel (CONFIG_THUMB2_KERNEL).

    This is a Bad Thing, since the ABI permits the compiler to assume
    that fundamental types of word size or above are word- aligned when
    accessing them from C. If the data is not really word-aligned,
    this can cause impaired performance and stray alignment faults in
    some circumstances.

    In general, the following rules should be applied when using data
    word declaration directives inside code sections:

    * .quad and .double:
    .align 3

    * .long, .word, .single, .float:
    .align (or .align 2)

    * .short:
    No explicit alignment required, since Thumb-2
    instructions are always 2 or 4 bytes in size.
    immediately after an instruction.

    Reviewed-by: Will Deacon
    Signed-off-by: Dave Martin
    Acked-by: Catalin Marinas
    Signed-off-by: Russell King

    Dave Martin
     
  • Directives such as .long and .word do not magically cause the
    assembler location counter to become aligned in gas. As a result,
    using these directives in code sections can result in misaligned
    data words when building a Thumb-2 kernel (CONFIG_THUMB2_KERNEL).

    This is a Bad Thing, since the ABI permits the compiler to assume
    that fundamental types of word size or above are word- aligned when
    accessing them from C. If the data is not really word-aligned,
    this can cause impaired performance and stray alignment faults in
    some circumstances.

    In general, the following rules should be applied when using data
    word declaration directives inside code sections:

    * .quad and .double:
    .align 3

    * .long, .word, .single, .float:
    .align (or .align 2)

    * .short:
    No explicit alignment required, since Thumb-2
    instructions are always 2 or 4 bytes in size.
    immediately after an instruction.

    Reviewed-by: Will Deacon
    Signed-off-by: Dave Martin
    Acked-by: Catalin Marinas
    Signed-off-by: Russell King

    Dave Martin
     
  • Directives such as .long and .word do not magically cause the
    assembler location counter to become aligned in gas. As a result,
    using these directives in code sections can result in misaligned
    data words when building a Thumb-2 kernel (CONFIG_THUMB2_KERNEL).

    This is a Bad Thing, since the ABI permits the compiler to assume
    that fundamental types of word size or above are word- aligned when
    accessing them from C. If the data is not really word-aligned,
    this can cause impaired performance and stray alignment faults in
    some circumstances.

    In general, the following rules should be applied when using data
    word declaration directives inside code sections:

    * .quad and .double:
    .align 3

    * .long, .word, .single, .float:
    .align (or .align 2)

    * .short:
    No explicit alignment required, since Thumb-2
    instructions are always 2 or 4 bytes in size.
    immediately after an instruction.

    Reviewed-by: Will Deacon
    Signed-off-by: Dave Martin
    Acked-by: Catalin Marinas
    Signed-off-by: Russell King

    Dave Martin
     
  • This change limits number of GIC-originating interrupts to the
    platform maximum (defined by NR_IRQS) while still initialising
    all distributor registers.

    Signed-off-by: Pawel Moll
    Signed-off-by: Russell King

    Pawel Moll
     
  • About all options present in each file are activated
    in the single file.

    Signed-off-by: Eric Benard
    Tested-by: Jean-Christophe PLAGNIOL-VILLARD
    Signed-off-by: Nicolas Ferre

    Eric Benard