27 Sep, 2011

5 commits


26 Sep, 2011

6 commits


23 Sep, 2011

1 commit


21 Sep, 2011

4 commits

  • We are seeing linker errors caused by sections being discarded, despite
    the linker script trying to keep them. The result is (eg):

    `.exit.text' referenced in section `.alt.smp.init' of drivers/built-in.o: defined in discarded section `.exit.text' of drivers/built-in.o
    `.exit.text' referenced in section `.alt.smp.init' of net/built-in.o: defined in discarded section `.exit.text' of net/built-in.o

    This is the relevent part of the linker script (reformatted to make it
    clearer):
    | SECTIONS
    | {
    | /*
    | * unwind exit sections must be discarded before the rest of the
    | * unwind sections get included.
    | */
    | /DISCARD/ : {
    | *(.ARM.exidx.exit.text)
    | *(.ARM.extab.exit.text)
    | }
    | ...
    | .exit.text : {
    | *(.exit.text)
    | *(.memexit.text)
    | }
    | ...
    | /DISCARD/ : {
    | *(.exit.text)
    | *(.memexit.text)
    | *(.exit.data)
    | *(.memexit.data)
    | *(.memexit.rodata)
    | *(.exitcall.exit)
    | *(.discard)
    | *(.discard.*)
    | }
    | }

    Now, this is what the linker manual says about discarded output sections:

    | The special output section name `/DISCARD/' may be used to discard
    | input sections. Any input sections which are assigned to an output
    | section named `/DISCARD/' are not included in the output file.

    No questions, no exceptions. It doesn't say "unless they are listed
    before the /DISCARD/ section." Now, this is what asn-generic/vmlinux.lds.S
    says:
    | /*
    | * Default discarded sections.
    | *
    | * Some archs want to discard exit text/data at runtime rather than
    | * link time due to cross-section references such as alt instructions,
    | * bug table, eh_frame, etc. DISCARDS must be the last of output
    | * section definitions so that such archs put those in earlier section
    | * definitions.
    | */

    And guess what - the list _always_ includes .exit.text etc.

    Now, what's actually happening is that the linker is reading the script,
    and it finds the first /DISCARD/ output section at the beginning of the
    script. It continues reading the script, and finds the 'DISCARD' macro
    at the end, which having been postprocessed results in another
    /DISCARD/ output section. As the linker already contains the earlier
    /DISCARD/ output section, it adds it to that existing section, so it
    effectively is placed at the start. This can be seen by using the -M
    option to ld:

    | Linker script and memory map
    |
    | 0xc037c080 jiffies = jiffies_64
    |
    | /DISCARD/
    | *(.ARM.exidx.exit.text)
    | *(.ARM.extab.exit.text)
    | *(.exit.text)
    | *(.memexit.text)
    | *(.exit.data)
    | *(.memexit.data)
    | *(.memexit.rodata)
    | *(.exitcall.exit)
    | *(.discard)
    | *(.discard.*)
    |
    | 0xc0008000 . = 0xc0008000
    |
    | .head.text 0xc0008000 0x1d0
    | 0xc0008000 _text = .
    | *(.head.text)
    | .head.text 0xc0008000 0x1d0 arch/arm/kernel/head.o
    | 0xc0008000 stext
    |
    | .text 0xc0008200 0x2d78d0
    | 0xc0008200 _stext = .
    | 0xc0008200 __exception_text_start = .
    | *(.exception.text)
    | .exception.text
    | ...

    As you can see, all the discarded sections are grouped together - and
    as a result of it being the first output section, they all appear before
    any other section.

    The result is that not only is the unwind information discarded (as
    intended), but also the .exit.text, despite us wanting to have the
    .exit.text preserved.

    We can't move the unwind information elsewhere, because it'll then be
    included even when we do actually discard the .exit.text (and similar)
    sections.

    So, work around this by avoiding the generic DISCARDS macro, and instead
    conditionalize the sections to be discarded ourselves. This avoids the
    ambiguity in how the linker assigns input sections to output sections,
    making our script less dependent on undocumented linker behaviour.

    Reported-by: Rob Herring
    Tested-by: Mark Brown
    Signed-off-by: Russell King

    Russell King
     
  • * 'fixes' of git://git.linaro.org/people/arnd/arm-soc:
    mach-integrator: fix VGA base regression
    arm/dt: Tegra: Update SDHCI nodes to match bindings
    ARM: EXYNOS4: fix incorrect pad configuration for keypad row lines
    ARM: SAMSUNG: fix to prevent declaring duplicated
    ARM: SAMSUNG: fix watchdog reset issue with clk_get()
    ARM: S3C64XX: Remove un-used code backlight code on SMDK6410
    ARM: EXYNOS4: restart clocksource while system resumes
    ARM: EXYNOS4: Fix routing timer interrupt to offline CPU
    ARM: EXYNOS4: Fix return type of local_timer_setup()
    ARM: EXYNOS4: Fix wrong pll type for vpll
    ARM: Dove: fix second SPI initialization call

    Linus Torvalds
     
  • The changes introduced in commit
    cc22b4c18540e5e8bf55c7d124044f9317527d3c
    "ARM: set vga memory base at run-time"

    Makes the Integrator/AP freeze completely. I appears that
    this is due to the VGA base address being assigned at PCI
    init time, while this base is needed earlier than that.
    Moving the initialization of the base address to the
    .map_io function solves this problem.

    Cc: Rob Herring
    Cc: Nicolas Pitre
    Cc: Arnd Bergmann
    Signed-off-by: Linus Walleij
    Acked-by: Rob Herring
    Signed-off-by: Arnd Bergmann

    Linus Walleij
     
  • The bindings were recently updated to have separate properties for each
    type of GPIO. Update the Device Tree source to match that.

    Signed-off-by: Stephen Warren
    Acked-by: Olof Johansson
    Signed-off-by: Arnd Bergmann

    Stephen Warren
     

20 Sep, 2011

2 commits

  • 598841ca9919d008b520114d8a4378c4ce4e40a1 ([S390] use gmap address
    spaces for kvm guest images) changed kvm on s390 to use a separate
    address space for kvm guests. We can now put KVM guests anywhere
    in the user address mode with a size up to 8PB - as long as the
    memory is 1MB-aligned. This change was done without KVM extension
    capability bit.
    The change was added after 3.0, but we still have a chance to add
    a feature bit before 3.1 (keeping the releases in a sane state).
    We use number 71 to avoid collisions with other pending kvm patches
    as requested by Alexander Graf.

    Signed-off-by: Christian Borntraeger
    Acked-by: Avi Kivity
    Cc: Alexander Graf
    Signed-off-by: Heiko Carstens

    Christian Borntraeger
     
  • 598841ca9919d008b520114d8a4378c4ce4e40a1 ([S390] use gmap address
    spaces for kvm guest images) changed kvm to use a separate address
    space for kvm guests. This address space was switched in __vcpu_run
    In some cases (preemption, page fault) there is the possibility that
    this address space switch is lost.
    The typical symptom was a huge amount of validity intercepts or
    random guest addressing exceptions.
    Fix this by doing the switch in sie_loop and sie_exit and saving the
    address space in the gmap structure itself. Also use the preempt
    notifier.

    Signed-off-by: Christian Borntraeger
    Acked-by: Avi Kivity
    Signed-off-by: Heiko Carstens

    Christian Borntraeger
     

17 Sep, 2011

3 commits

  • CALL scripts/checksyscalls.sh
    :46:1: warning: "__IGNORE_migrate_pages" redefined
    In file included from :2:
    arch/arm/include/asm/unistd.h:482:1: warning: this is the location of the previous definition

    This is caused because we define __IGNORE_migrate_pages to be 1, but
    in the case of nommu, it's defined to be empty. Fix this by just
    defining the __IGNORE_ symbols to be empty.

    Signed-off-by: Russell King

    Russell King
     
  • This patch implements a workaround for erratum 764369 affecting
    Cortex-A9 MPCore with two or more processors (all current revisions).
    Under certain timing circumstances, a data cache line maintenance
    operation by MVA targeting an Inner Shareable memory region may fail to
    proceed up to either the Point of Coherency or to the Point of
    Unification of the system. This workaround adds a DSB instruction before
    the relevant cache maintenance functions and sets a specific bit in the
    diagnostic control register of the SCU.

    Cc:
    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas
    Tested-by: Mark Rutland
    Signed-off-by: Russell King

    Will Deacon
     
  • * 'stable/bug.fixes' of git://oss.oracle.com/git/kwilk/xen:
    xen/i386: follow-up to "replace order-based range checking of M2P table by linear one"
    xen/irq: Alter the locking to use a mutex instead of a spinlock.
    xen/e820: if there is no dom0_mem=, don't tweak extra_pages.
    xen: disable PV spinlocks on HVM

    Linus Torvalds
     

16 Sep, 2011

1 commit

  • On x86-64, they were just wasteful: with the explicitly added (now
    unnecessary) padding, the size of the alternatives structure was 16
    bytes, and an alignment of 8 bytes didn't hurt much.

    However, it was still silly, since the natural size and alignment for
    the structure is actually just 12 bytes, 4-byte aligned since commit
    59e97e4d6fbc ("x86: Make alternative instruction pointers relative").
    So removing the padding, and removing the extra alignment is just a good
    idea.

    On x86-32, the alignment of 4 bytes was correct, but was incorrectly
    hardcoded as 8 bytes in . That header file had
    used to be an x86-64 only header file, but various unification efforts
    have made it be used for x86-32 too (ie the unification of rwlock and
    rwsem).

    That in turn caused x86-32 boot failures, because the extra alignment
    would result in random zero-filled words in the altinstructions section,
    causing oopses early at boot when doing alternative instruction
    replacement.

    So just remove all the alignment noise entirely. It's wrong, and it's
    unnecessary. The section itself is already properly aligned by the
    linker scripts, and all additions to the section had better be of the
    proper 12-byte format, keeping it aligned. So if the align directive
    were to ever make a difference, that would be an indication of a serious
    bug to begin with.

    Reported-by: Werner Landgraf
    Acked-by: Andrew Lutomirski
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

15 Sep, 2011

18 commits

  • Arnd Bergmann
     
  • The numbers obtained from the hypervisor really can't ever lead to an
    overflow here, only the original calculation going through the order
    of the range could have. This avoids the (as Jeremy points outs)
    somewhat ugly NULL-based calculation here.

    Signed-off-by: Jan Beulich
    Signed-off-by: Konrad Rzeszutek Wilk

    Jan Beulich
     
  • The keypad controller requires a external pull-up for all the keypad
    row lines. Fix the incorrect pad configuration for keypad controller
    row lines by enabling the pad pull-up for the all row lines of the
    keypad controller.

    Signed-off-by: Thomas Abraham
    Signed-off-by: Kukjin Kim

    Thomas Abraham
     
  • The plat/clock.h revised to prevent declaring duplicated.

    Signed-off-by: Kukjin Kim

    Kukjin Kim
     
  • clkdev framework uses global mutex to protect clock tree, so it is not
    possible to call clk_get() in interrupt context. This patch fixes this
    issue and makes system reset by watchdog call working again.

    Signed-off-by: Marek Szyprowski
    Signed-off-by: Kyungmin Park
    Signed-off-by: Kukjin Kim

    Marek Szyprowski
     
  • According to commit 96d78686d4("ARM: S3C64XX: Add PWM backlight
    support on SMDK6410") and commit f00207b255("ARM: SAMSUNG: Create
    a common infrastructure for PWM backlight support"), this should
    not be used anymore.

    And this patch fixes follwing warning:
    arch/arm/mach-s3c64xx/mach-smdk6410.c:296: warning: 'smdk6410_backlight_device' defined but not used

    Signed-off-by: Banajit Goswami
    [kgene.kim@samsung.com: modified commit message]
    Signed-off-by: Kukjin Kim

    Banajit Goswami
     
  • System resume can't be completed because mct-frc isn't restarted
    after system suspends. This patch restarts mct-frc during system
    resume.

    Reported-by: Jongpill Lee
    Signed-off-by: Changhwan Youn
    Signed-off-by: Kukjin Kim

    Changhwan Youn
     
  • The commit 5dfc54e087c15f823ee9b6541d2f0f314e69cbed
    ("ARM: GIC: avoid routing interrupts to offline CPUs")
    prevents routing interrupts to offline CPUs. But in
    case of timer on EXYNOS4, the irq_set_affinity() method
    is called in percpu_timer_setup() before CPU1 becomes
    online. So this patch fixes routing timer interrupt to
    offline CPU.

    Reported-by: Changhwan Youn
    Signed-off-by: Kukjin Kim

    Kukjin Kim
     
  • According to commmit af90f10d ("ARM: 6759/1: smp: Select
    local timers vs broadcast timer support"), the return type
    of local_timer_setup() should be int instead of void.

    Reported-by: Changhwan Youn
    Signed-off-by: Kukjin Kim

    Kukjin Kim
     
  • The PLL4650C is used for VPLL on EXYNOS4 so should be fixed.

    Signed-off-by: Jonghwan Choi
    [kgene.kim@samsung.com: added message]
    Signed-off-by: Kukjin Kim

    Jonghwan Choi
     
  • Since GPIOLIB is optional on alpha, GENERIC_GPIO must not be selected by
    default. If GPIOLIB is enabled, it will select GENERIC_GPIO.

    See for an example of what 'def_bool y'
    breaks.

    Reported-by: Michael Cree
    Signed-off-by: Ben Hutchings
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Matt Turner
    Cc: Michael Cree
    Cc: Mark Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Hutchings
     
  • richard@nod.at:
    Fixes:
    /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/libc.a(strrchr.o): In function `rindex':
    (.text+0x0): multiple definition of `strrchr'

    If both STATIC_LINK and UML_NET_VDE are set to "y" libc's strrchr may
    clash with the kernel implementation.

    This workaround comes originally from Jeff Dike:
    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=494995#35

    Signed-off-by: Al Viro
    Signed-off-by: Richard Weinberger
    Cc: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • 1) take subarch-specific stuff to subarch_ptrace()
    2) PTRACE_{PEEK,POKE}{TEXT,DATA} is handled by ptrace_request() just fine...

    Signed-off-by: Al Viro
    Signed-off-by: Richard Weinberger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • It's 32bit-only, not 64bit-only... And while we are at it, it's
    set_fpxregs(), not set_fpregs()...

    Signed-off-by: Al Viro
    Signed-off-by: Richard Weinberger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • while not doing free_irq() from irq handler is commendable, kfree() on the
    data passed to said handler before free_irq() is Not Good(tm). Freeing
    the stack it's being run on is also not nice... Solution: delay actually
    freeing stuff.

    Signed-off-by: Al Viro
    Signed-off-by: Richard Weinberger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • ... so set winch->fd to -1 before doing free_irq(), to avoid having
    winch_interrupt() come from/during the latter and attempt to do
    reactivate_fd() on something that's already gone.

    Signed-off-by: Al Viro
    Signed-off-by: Richard Weinberger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • tty->count is decremented only after ->close() had been called and
    several tasks can hit it in parallel. As the result, using tty->count
    to check if you are the last one is broken. We end up leaving line->tty
    not reset to NULL and the next IRQ on that sucker will blow up trying to
    dereference pointers from kfree'd struct tty.

    Fix is obvious: we need to use a counter of our own.

    Signed-off-by: Al Viro
    Signed-off-by: Richard Weinberger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Some time ago Jeff prepared 42daba316557 ("uml: stop saving process FP
    state") for UML to stop saving the process FP state between task
    switches. The assumption was that since with SKAS0 every guest process
    runs inside a host process context the host OS will take care of keeping
    the proper FP state.

    Unfortunately this is not true for multi-threaded applications, where
    all guest threads share a single host process context yet all may use
    the FPU on their own. Although I haven't verified it I suspect things
    to be even worse in SKAS3 mode where all guest processes run inside a
    single host process.

    The patch reintroduces the saving and restoring of the FP context
    between task switches.

    [richard@nod.at: Ingo posted this patch in 2009, sadly it was never applied
    and got lost. Now in 2011 the problem was reported by Gunnar.]

    Signed-off-by: Ingo van Lil
    Signed-off-by: Richard Weinberger
    Reported-by:
    Tested-by:
    Cc: Stanislav Meduna
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo van Lil