15 Mar, 2012

2 commits


14 Mar, 2012

4 commits

  • Newer version of binutils are more strict about specifying the
    correct options to enable certain classes of instructions.

    The sparc32 build is done for v7 in order to support sun4c systems
    which lack hardware integer multiply and divide instructions.

    So we have to pass -Av8 when building the assembler routines that
    use these instructions and get patched into the kernel when we find
    out that we have a v8 capable cpu.

    Reported-by: Paul Gortmaker
    Signed-off-by: David S. Miller

    David S. Miller
     
  • Pull arch/tile update from Chris Metcalf
    "These include a couple of queued-up minor bug fixes from the
    community, a fix to unbreak the sysfs hooks in tile, and syncing up
    the defconfigs."

    Ugh. defconfigs updates without "make minconfig". Tons of ugly
    pointless lines there, I suspect.

    * 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
    tile: Use set_current_blocked() and block_sigmask()
    arch/tile: misplaced parens near likely
    arch/tile: sync up the defconfig files to the tip
    arch/tile: Fix up from commit 8a25a2fd126c621f44f3aeaef80d51f00fc11639

    Linus Torvalds
     
  • Pull perf fixes from Ingo Molnar.

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf record: Fix buffer overrun bug in tracepoint_id_to_path()
    perf/x86: Fix local vs remote memory events for NHM/WSM

    Linus Torvalds
     
  • As described in e6fa16ab ("signal: sigprocmask() should do
    retarget_shared_pending()") the modification of current->blocked is
    incorrect as we need to check whether the signal we're about to block
    is pending in the shared queue.

    Also, use the new helper function introduced in commit 5e6292c0f28f
    ("signal: add block_sigmask() for adding sigmask to current->blocked")
    which centralises the code for updating current->blocked after
    successfully delivering a signal and reduces the amount of duplicate
    code across architectures. In the past some architectures got this
    code wrong, so using this helper function should stop that from
    happening again.

    Cc: Arnd Bergmann
    Acked-by: Oleg Nesterov
    Signed-off-by: Matt Fleming
    Signed-off-by: Chris Metcalf

    Matt Fleming
     

13 Mar, 2012

6 commits

  • Pull SuperH fixes from Paul Mundt.

    * tag 'sh-for-linus' of git://github.com/pmundt/linux-sh:
    sh-sci / PM: Avoid deadlocking runtime PM
    sh: fix up the ubc clock definition for sh7785.
    sh: add parameter for RSPI in clock-sh7757
    sh: Fix sh2a vbr table for more than 255 irqs

    Linus Torvalds
     
  • Pull SH/R-Mobile fixes from Paul Mundt.

    * tag 'rmobile-for-linus' of git://github.com/pmundt/linux-sh:
    ARM: mach-shmobile: ap4evb: fixup fsi2_ak4643_info typo
    ARM: mach-shmobile: mackerel: Reserve DMA memory for the frame buffer
    ARM: mach-shmobile: Fix ag5evm compilation by including linux/videodev2.h
    ARM: mach-shmobile: Fix bonito compile breakage

    Linus Torvalds
     
  • Verified using the below proglet.. before:

    [root@westmere ~]# perf stat -e node-stores -e node-store-misses ./numa 0
    remote write

    Performance counter stats for './numa 0':

    2,101,554 node-stores
    2,096,931 node-store-misses

    5.021546079 seconds time elapsed

    [root@westmere ~]# perf stat -e node-stores -e node-store-misses ./numa 1
    local write

    Performance counter stats for './numa 1':

    501,137 node-stores
    199 node-store-misses

    5.124451068 seconds time elapsed

    After:

    [root@westmere ~]# perf stat -e node-stores -e node-store-misses ./numa 0
    remote write

    Performance counter stats for './numa 0':

    2,107,516 node-stores
    2,097,187 node-store-misses

    5.012755149 seconds time elapsed

    [root@westmere ~]# perf stat -e node-stores -e node-store-misses ./numa 1
    local write

    Performance counter stats for './numa 1':

    2,063,355 node-stores
    165 node-store-misses

    5.082091494 seconds time elapsed

    #define _GNU_SOURCE

    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include

    #define SIZE (32*1024*1024)

    volatile int done;

    void sig_done(int sig)
    {
    done = 1;
    }

    int main(int argc, char **argv)
    {
    cpu_set_t *mask, *mask2;
    size_t size;
    int i, err, t;
    int nrcpus = 1024;
    char *mem;
    unsigned long nodemask = 0x01; /* node 0 */
    DIR *node;
    struct dirent *de;
    int read = 0;
    int local = 0;

    if (argc < 2) {
    printf("usage: %s [0-3]\n", argv[0]);
    printf(" bit0 - local/remote\n");
    printf(" bit1 - read/write\n");
    exit(0);
    }

    switch (atoi(argv[1])) {
    case 0:
    printf("remote write\n");
    break;
    case 1:
    printf("local write\n");
    local = 1;
    break;
    case 2:
    printf("remote read\n");
    read = 1;
    break;
    case 3:
    printf("local read\n");
    local = 1;
    read = 1;
    break;
    }

    mask = CPU_ALLOC(nrcpus);
    size = CPU_ALLOC_SIZE(nrcpus);
    CPU_ZERO_S(size, mask);

    node = opendir("/sys/devices/system/node/node0/");
    if (!node)
    perror("opendir");
    while ((de = readdir(node))) {
    int cpu;

    if (sscanf(de->d_name, "cpu%d", &cpu) == 1)
    CPU_SET_S(cpu, size, mask);
    }
    closedir(node);

    mask2 = CPU_ALLOC(nrcpus);
    CPU_ZERO_S(size, mask2);
    for (i = 0; i < size; i++)
    CPU_SET_S(i, size, mask2);
    CPU_XOR_S(size, mask2, mask2, mask); // invert

    if (!local)
    mask = mask2;

    err = sched_setaffinity(0, size, mask);
    if (err)
    perror("sched_setaffinity");

    mem = mmap(0, SIZE, PROT_READ|PROT_WRITE,
    MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
    err = mbind(mem, SIZE, MPOL_BIND, &nodemask, 8*sizeof(nodemask), MPOL_MF_MOVE);
    if (err)
    perror("mbind");

    signal(SIGALRM, sig_done);
    alarm(5);

    if (!read) {
    while (!done) {
    for (i = 0; i < SIZE; i++)
    mem[i] = 0x01;
    }
    } else {
    while (!done) {
    for (i = 0; i < SIZE; i++)
    t += *(volatile char *)(mem + i);
    }
    }

    return 0;
    }

    Signed-off-by: Peter Zijlstra
    Cc: Stephane Eranian
    Cc:
    Link: http://lkml.kernel.org/n/tip-tq73sxus35xmqpojf7ootxgs@git.kernel.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Parentheses were missing.

    Signed-off-by: Roel Kluin
    Signed-off-by: Chris Metcalf

    roel
     
  • This was inspired by mchehab@redhat.com's observation that we
    didn't have EDAC configured on by default in both files. In addition,
    we were setting INITRAMFS_SOURCE to a non-empty string, which isn't
    a very common default and required editing to do test builds.

    Signed-off-by: Chris Metcalf

    Chris Metcalf
     
  • This was Kay Siever's bombing to convert 'cpu' to a regular subsystem.
    The change left a bogus second argument to sysfs_create_file().

    Signed-off-by: Chris Metcalf

    Chris Metcalf
     

10 Mar, 2012

1 commit

  • Commit f0fbf0abc093 ("x86: integrate delay functions") converted
    delay_tsc() into a random delay generator for 64 bit. The reason is
    that it merged the mostly identical versions of delay_32.c and
    delay_64.c. Though the subtle difference of the result was:

    static void delay_tsc(unsigned long loops)
    {
    - unsigned bclock, now;
    + unsigned long bclock, now;

    Now the function uses rdtscl() which returns the lower 32bit of the
    TSC. On 32bit that's not problematic as unsigned long is 32bit. On 64
    bit this fails when the lower 32bit are close to wrap around when
    bclock is read, because the following check

    if ((now - bclock) >= loops)
    break;

    evaluated to true on 64bit for e.g. bclock = 0xffffffff and now = 0
    because the unsigned long (now - bclock) of these values results in
    0xffffffff00000001 which is definitely larger than the loops
    value. That explains Tvortkos observation:

    "Because I am seeing udelay(500) (_occasionally_) being short, and
    that by delaying for some duration between 0us (yep) and 491us."

    Make those variables explicitely u32 again, so this works for both 32
    and 64 bit.

    Reported-by: Tvrtko Ursulin
    Signed-off-by: Thomas Gleixner
    Cc: stable@vger.kernel.org # >= 2.6.27
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     

09 Mar, 2012

6 commits

  • Pull C6X fix from Mark Salter:
    "Fix for C6X KSTK_EIP and KSTK_ESP macros."

    * tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming:
    C6X: fix KSTK_EIP and KSTK_ESP macros

    Linus Torvalds
     
  • Pull two IOMMU fixes from Joerg Roedel:
    "The first is an additional fix for the OMAP initialization order issue
    and the second patch fixes a possible section mismatch which can lead
    to a kernel crash in the AMD IOMMU driver when suspend/resume is used
    and the compiler has not inlined the iommu_set_device_table function."

    * tag 'iommu-fixes-v3.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
    x86/amd: iommu_set_device_table() must not be __init
    ARM: OMAP: fix iommu, not mailbox

    Linus Torvalds
     
  • Pull last minute fixes from Olof Johansson:
    "One samsung build fix due to a mis-applied patch, and a small set of
    OMAP fixes. This should be the last from arm-soc for 3.3, hopefully."

    * tag 'fixes-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    ARM: S3C2440: Fixed build error for s3c244x
    ARM: OMAP2+: Fix module build errors with CONFIG_OMAP4_ERRATA_I688
    ARM: OMAP: id: Add missing break statement in omap3xxx_check_revision
    ARM: OMAP2+: Remove apply_uV constraints for fixed regulator
    ARM: OMAP: irqs: Fix NR_IRQS value to handle PRCM interrupts

    Linus Torvalds
     
  • Pull minor devicetree bug fixes and documentation updates from Grant Likely:
    "Fixes up a duplicate #include, adds an empty implementation of
    of_find_compatible_node() and make git ignore .dtb files. And fix up
    bus name on OF described PHYs. Nothing exciting here."

    * tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux-2.6:
    doc: dt: Fix broken reference in gpio-leds documentation
    of/mdio: fix fixed link bus name
    of/fdt.c: asm/setup.h included twice
    of: add picochip vendor prefix
    dt: add empty of_find_compatible_node function
    ARM: devicetree: Add .dtb files to arch/arm/boot/.gitignore

    Linus Torvalds
     
  • * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
    ARM: OMAP2+: Fix module build errors with CONFIG_OMAP4_ERRATA_I688
    ARM: OMAP: id: Add missing break statement in omap3xxx_check_revision
    ARM: OMAP2+: Remove apply_uV constraints for fixed regulator
    ARM: OMAP: irqs: Fix NR_IRQS value to handle PRCM interrupts

    Olof Johansson
     
  • Fixed following:
    arch/arm/mach-s3c2440/s3c244x.c: In function 's3c244x_restart':
    arch/arm/mach-s3c2440/s3c244x.c:209: error: expected declaration or statement at end of input
    make[1]: *** [arch/arm/mach-s3c24xx/s3c244x.o] Error 1
    make: *** [arch/arm/mach-s3c24xx] Error 2

    Signed-off-by: Kukjin Kim
    Signed-off-by: Olof Johansson

    Kukjin Kim
     

08 Mar, 2012

2 commits

  • Pull ARM updates from Russell King.

    * 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
    ARM: 7358/1: perf: add PMU hotplug notifier
    ARM: 7357/1: perf: fix overflow handling for xscale2 PMUs
    ARM: 7356/1: perf: check that we have an event in the PMU IRQ handlers
    ARM: 7355/1: perf: clear overflow flag when disabling counter on ARMv7 PMU
    ARM: 7354/1: perf: limit sample_period to half max_period in non-sampling mode
    ARM: ecard: ensure fake vma vm_flags is setup
    ARM: 7346/1: errata: fix PL310 erratum #753970 workaround selection
    ARM: 7345/1: errata: update workaround for A9 erratum #743622
    ARM: 7348/1: arm/spear600: fix one-shot timer
    ARM: 7339/1: amba/serial.h: Include types.h for resolving dependency of type bool

    Linus Torvalds
     
  • There was a latent typo in the C6X KSTK_EIP and KSTK_ESP macros which
    caused a problem with a new patch which used them. The broken definitions
    were of the form:

    #define KSTK_FOO(tsk) (task_pt_regs(task)->foo)

    Note the use of task vs tsk. This actually worked before because the
    only place in the kernel which used these macros passed in a local
    pointer named task.

    Signed-off-by: Mark Salter

    Mark Salter
     

07 Mar, 2012

17 commits

  • When a CPU is taken out of reset, either cold booted or hotplugged in,
    some of its PMU registers can contain UNKNOWN values.

    This patch adds a hotplug notifier to ARM core perf code so that upon
    CPU restart the PMU unit is reset and becomes ready to use again.

    Signed-off-by: Lorenzo Pieralisi
    Signed-off-by: Will Deacon
    Signed-off-by: Russell King

    Lorenzo Pieralisi
     
  • xscale2 PMUs indicate overflow not via the PMU control register, but by
    a separate overflow FLAG register instead.

    This patch fixes the xscale2 PMU code to use this register to detect
    to overflow and ensures that we clear any pending overflow when
    disabling a counter.

    Cc:
    Signed-off-by: Will Deacon
    Signed-off-by: Russell King

    Will Deacon
     
  • The PMU IRQ handlers in perf assume that if a counter has overflowed
    then perf must be responsible. In the paranoid world of crazy hardware,
    this could be false, so check that we do have a valid event before
    attempting to dereference NULL in the interrupt path.

    Cc:
    Signed-off-by: Ming Lei
    Signed-off-by: Will Deacon
    Signed-off-by: Russell King

    Will Deacon
     
  • When disabling a counter on an ARMv7 PMU, we should also clear the
    overflow flag in case an overflow occurred whilst stopping the counter.
    This prevents a spurious overflow being picked up later and leading to
    either false accounting or a NULL dereference.

    Cc:
    Reported-by: Ming Lei
    Signed-off-by: Will Deacon
    Signed-off-by: Russell King

    Will Deacon
     
  • On ARM, the PMU does not stop counting after an overflow and therefore
    IRQ latency affects the new counter value read by the kernel. This is
    significant for non-sampling runs where it is possible for the new value
    to overtake the previous one, causing the delta to be out by up to
    max_period events.

    Commit a737823d ("ARM: 6835/1: perf: ensure overflows aren't missed due
    to IRQ latency") attempted to fix this problem by allowing interrupt
    handlers to pass an overflow flag to the event update function, causing
    the overflow calculation to assume that the counter passed through zero
    when going from prev to new. Unfortunately, this doesn't work when
    overflow occurs on the perf_task_tick path because we have the flag
    cleared and end up computing a large negative delta.

    This patch removes the overflow flag from armpmu_event_update and
    instead limits the sample_period to half of the max_period for
    non-sampling profiling runs.

    Cc:
    Signed-off-by: Ming Lei
    Signed-off-by: Will Deacon
    Signed-off-by: Russell King

    Will Deacon
     
  • Signed-off-by: Kuninori Morimoto
    Signed-off-by: Paul Mundt

    Kuninori Morimoto
     
  • The default 2MB size of DMA coherent memory isn't enough for allocate
    frame buffer memory.

    Signed-off-by: Laurent Pinchart
    Signed-off-by: Paul Mundt

    Laurent Pinchart
     
  • The board file uses a 4CC defined in linux/videodev2.h. Include the
    header to fix

    arch/arm/mach-shmobile/board-ag5evm.c:262: error: 'V4L2_PIX_FMT_RGB565'
    undeclared here (not in a function)

    Signed-off-by: Laurent Pinchart
    Signed-off-by: Paul Mundt

    Laurent Pinchart
     
  • arch/arm/mach-shmobile/board-bonito.c:244:3: error: unknown field 'bpp' specified in initializer
    make[2]: *** [arch/arm/mach-shmobile/board-bonito.o] Error 1

    caused by commit "fbdev: sh_mobile_lcdc: Support FOURCC-based format API"

    Signed-off-by: Phil Edworthy
    Acked-by: Laurent Pinchart
    Signed-off-by: Paul Mundt

    Phil Edworthy
     
  • Presently the SH7785 code misdefines the UBC clock connection ID in
    relation to the other CPUs. This makes it uniform, so that things like
    single-stepping work again.

    Signed-off-by: Thomas Schwinge
    Signed-off-by: Paul Mundt

    Thomas Schwinge
     
  • Signed-off-by: Yoshihiro Shimoda
    Signed-off-by: Paul Mundt

    Shimoda, Yoshihiro
     
  • Signed-off-by: Phil Edworthy
    Signed-off-by: Paul Mundt

    Phil Edworthy
     
  • It turns out that test-compiling this file on x86-64 doesn't really
    help, because much of it is x86-32-specific. And so I hadn't noticed
    the slightly over-eager removal of the 'r' from 'addr' variable despite
    thinking I had tested it.

    Signed-off-by: Linus "oopsie" Torvalds

    Linus Torvalds
     
  • Several users of "find_vma_prev()" were not in fact interested in the
    previous vma if there was no primary vma to be found either. And in
    those cases, we're much better off just using the regular "find_vma()",
    and then "prev" can be looked up by just checking vma->vm_prev.

    The find_vma_prev() semantics are fairly subtle (see Mikulas' recent
    commit 83cd904d271b: "mm: fix find_vma_prev"), and the whole "return
    prev by reference" means that it generates worse code too.

    Thus this "let's avoid using this inconvenient and clearly too subtle
    interface when we don't really have to" patch.

    Cc: Mikulas Patocka
    Cc: KOSAKI Motohiro
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • Pull arm-soc bug fixes from Arnd Bergmann:
    "Here are all the fixes I got after sending the last pull request.
    These fix mostly regressions on exynos, at91, pxa and ep93xx.

    Signed-off-by: Arnd Bergmann "

    * tag 'fixes-3.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    ARM: ep93xx: convert vision_ep9307 to MULTI_IRQ_HANDLER
    ARM: EXYNOS: fix touchscreen IRQ setup on Universal C210 board
    ARM: pxa: fix invalid mfp pin issue
    ARM: pxa: remove duplicated registeration on pxa-gpio
    ARM: pxa: add dummy clock for pxa25x and pxa27x
    ARM: S3C24XX: DMA resume regression fix
    ARM: S3C24XX: Fix restart on S3C2442
    ARM: SAMSUNG: Fix memory size for hsotg
    ARM: at91/dma: DMA controller registering with DT support
    ARM: at91/dma: remove platform data from DMA controller

    Linus Torvalds
     
  • * 'fixes' of git://github.com/hzhuang1/linux: (3 commits)
    ARM: pxa: fix invalid mfp pin issue
    ARM: pxa: remove duplicated registeration on pxa-gpio
    ARM: pxa: add dummy clock for pxa25x and pxa27x

    Includes an update to v3.3-rc6

    Arnd Bergmann
     
  • …/git/kgene/linux-samsung into fixes

    * 'v3.3-samsung-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
    ARM: EXYNOS: fix touchscreen IRQ setup on Universal C210 board
    ARM: S3C24XX: DMA resume regression fix
    ARM: S3C24XX: Fix restart on S3C2442
    ARM: SAMSUNG: Fix memory size for hsotg

    Arnd Bergmann
     

06 Mar, 2012

2 commits