01 Jul, 2011

1 commit

  • The nmi parameter indicated if we could do wakeups from the current
    context, if not, we would set some state and self-IPI and let the
    resulting interrupt do the wakeup.

    For the various event classes:

    - hardware: nmi=0; PMI is in fact an NMI or we run irq_work_run from
    the PMI-tail (ARM etc.)
    - tracepoint: nmi=0; since tracepoint could be from NMI context.
    - software: nmi=[0,1]; some, like the schedule thing cannot
    perform wakeups, and hence need 0.

    As one can see, there is very little nmi=1 usage, and the down-side of
    not using it is that on some platforms some software events can have a
    jiffy delay in wakeup (when arch_irq_work_raise isn't implemented).

    The up-side however is that we can remove the nmi parameter and save a
    bunch of conditionals in fast paths.

    Signed-off-by: Peter Zijlstra
    Cc: Michael Cree
    Cc: Will Deacon
    Cc: Deng-Cheng Zhu
    Cc: Anton Blanchard
    Cc: Eric B Munson
    Cc: Heiko Carstens
    Cc: Paul Mundt
    Cc: David S. Miller
    Cc: Frederic Weisbecker
    Cc: Jason Wessel
    Cc: Don Zickus
    Link: http://lkml.kernel.org/n/tip-agjev8eu666tvknpb3iaj0fg@git.kernel.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

22 Jun, 2011

4 commits

  • The bit shift operation in smp_ctl_set_bit does not specify the type
    of the shifted bit so integer is used as default. Therefore it is not
    possible to set bits in the upper 32 bit of the control register if
    the kernel runs in 64 bit mode. Fix this by specifying the type as
    unsigned long.

    Signed-off-by: Jan Glauber
    Signed-off-by: Martin Schwidefsky

    Jan Glauber
     
  • The sampling interval for the hardware sampler is specified in cycles.
    (see SA23-2260-01 The Load-Program-Parameter and the CPU-Measurement
    Facilities)
    The current default value will therefore result in millions of samples.
    This patch changes the default sampling interval to 4M, which will
    result in ~1500 samples per second on a z196 reducing the overhead
    of sampling.

    Signed-off-by: Christian Borntraeger
    Signed-off-by: Martin Schwidefsky

    Christian Borntraeger
     
  • On specific configurations with hwsampler opcontrol --start returns an
    error on "echo 1 >/dev/oprofile/enable". Turns out that the hw sampling
    interval is not checked against the hardware limits.

    Signed-off-by: Christian Borntraeger
    Signed-off-by: Martin Schwidefsky

    Christian Borntraeger
     
  • A user can create the Kconfig combination !VIRTUALIZATION, S390_GUEST
    which results in the following warnings:

    warning: (S390_GUEST) selects VIRTIO which has unmet direct dependencies (VIRTUALIZATION)
    warning: (S390_GUEST && VIRTIO_PCI && VIRTIO_BALLOON) selects VIRTIO_RING which has unmet direct dependencies (VIRTUALIZATION && VIRTIO)
    warning: (S390_GUEST) selects VIRTIO which has unmet direct dependencies (VIRTUALIZATION)
    warning: (S390_GUEST && VIRTIO_PCI && VIRTIO_BALLOON) selects VIRTIO_RING which has unmet direct dependencies (VIRTUALIZATION && VIRTIO)

    S390_GUEST has to select VIRTUALIZATION before selecting VIRTIO and
    friends.

    Reported-by: Jan Glauber
    Signed-off-by: Christian Borntraeger
    Signed-off-by: Martin Schwidefsky

    Christian Borntraeger
     

06 Jun, 2011

5 commits

  • KVM is not available for 31 bit but the KVM defines cause warnings:

    arch/s390/include/asm/pgtable.h: In function 'ptep_test_and_clear_user_dirty':
    arch/s390/include/asm/pgtable.h:817: warning: integer constant is too large for 'unsigned long' type
    arch/s390/include/asm/pgtable.h:818: warning: integer constant is too large for 'unsigned long' type
    arch/s390/include/asm/pgtable.h: In function 'ptep_test_and_clear_user_young':
    arch/s390/include/asm/pgtable.h:837: warning: integer constant is too large for 'unsigned long' type
    arch/s390/include/asm/pgtable.h:838: warning: integer constant is too large for 'unsigned long' type

    Add 31 bit versions of the KVM defines to remove the warnings.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • Replace the s390 specific rcu page-table freeing code with the
    generic variant. This requires to duplicate the definition for the
    struct mmu_table_batch as s390 does not use the generic tlb flush
    code.

    While we are at it remove the restriction that page table fragments
    can not be reused after a single fragment has been freed with rcu
    and split out allocation and freeing of page tables with pgstes.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • The qdio SBAL entry flag is made-up of four different values that are
    independent of one another. Some of the bits are reserved by the
    hardware and should not be changed by qdio. Currently all four values
    are overwritten since the SBAL entry flag is defined as an u32.

    Split the SBAL entry flag into four u8's as defined by the hardware
    and don't touch the reserved bits.

    Signed-off-by: Jan Glauber
    Signed-off-by: Martin Schwidefsky

    Jan Glauber
     
  • Currently KVM masks out the known good facilities only for the first
    double word, but passed the 2nd double word without filtering. This
    breaks some code on newer systems:

    [ 0.593966] ------------[ cut here ]------------
    [ 0.594086] WARNING: at arch/s390/oprofile/hwsampler.c:696
    [ 0.594213] Modules linked in:
    [ 0.594321] Modules linked in:
    [ 0.594439] CPU: 0 Not tainted 3.0.0-rc1 #46
    [ 0.594564] Process swapper (pid: 1, task: 00000001effa8038, ksp: 00000001effafab8)
    [ 0.594735] Krnl PSW : 0704100180000000 00000000004ab89a (hwsampler_setup+0x75a/0x7b8)
    [ 0.594910] R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:1 PM:0 EA:3
    [ 0.595120] Krnl GPRS: ffffffff00000000 00000000ffffffea ffffffffffffffea 00000000004a98f8
    [ 0.595351] 00000000004aa002 0000000000000001 000000000080e720 000000000088b9f8
    [ 0.595522] 000000000080d3e8 0000000000000000 0000000000000000 000000000080e464
    [ 0.595725] 0000000000000000 00000000005db198 00000000004ab3a2 00000001effafd98
    [ 0.595901] Krnl Code: 00000000004ab88c: c0e5000673ca brasl %r14,57a020
    [ 0.596071] 00000000004ab892: a7f4fc77 brc 15,4ab180
    [ 0.596276] 00000000004ab896: a7f40001 brc 15,4ab898
    [ 0.596454] >00000000004ab89a: a7c8ffa1 lhi %r12,-95
    [ 0.596657] 00000000004ab89e: a7f4fc71 brc 15,4ab180
    [ 0.596854] 00000000004ab8a2: a7f40001 brc 15,4ab8a4
    [ 0.597029] 00000000004ab8a6: a7f4ff22 brc 15,4ab6ea
    [ 0.597230] 00000000004ab8aa: c0200011009a larl %r2,6cb9de
    [ 0.597441] Call Trace:
    [ 0.597511] ([] hwsampler_setup+0x262/0x7b8)
    [ 0.597676] [] oprofile_arch_init+0x32/0xd0
    [ 0.597834] [] oprofile_init+0x28/0x74
    [ 0.597991] [] do_one_initcall+0x3a/0x170
    [ 0.598151] [] kernel_init+0x142/0x1ec
    [ 0.598314] [] kernel_thread_starter+0x6/0xc
    [ 0.598468] [] kernel_thread_starter+0x0/0xc
    [ 0.598606] Last Breaking-Event-Address:
    [ 0.598707] [] hwsampler_setup+0x756/0x7b8
    [ 0.598863] ---[ end trace ce3179037f4e3e5b ]---

    So lets also mask the 2nd double word. Facilites 66,76,76,77 should be fine.

    Signed-off-by: Christian Borntraeger
    Signed-off-by: Martin Schwidefsky

    Christian Borntraeger
     
  • commit 9ff4cfb3fcfd48b49fdd9be7381b3be340853aa4 ([S390] kvm-390: Let
    kernel exit SIE instruction on work) fixed a problem of commit
    commit cd3b70f5d4d82f85d1e1d6e822f38ae098cf7c72 ([S390] virtualization
    aware cpu measurement) but uncovered another one.

    If a kvm guest accesses guest real memory that doesnt exist, the
    page fault handler calls the sie hook, which then rewrites
    the return psw from sie_inst to either sie_exit or sie_reenter.
    On return, the page fault handler will then detect the wrong access
    as a kernel fault causing a kernel oops in sie_reenter or sie_exit.

    We have to add these two addresses to the exception table to allow
    graceful exits.

    Signed-off-by: Christian Borntraeger
    Signed-off-by: Martin Schwidefsky

    Christian Borntraeger
     

29 May, 2011

5 commits

  • Quite a few functions that get called from the tlb gather code require that
    preemption must be disabled. So disable preemption inside of the called
    functions instead.
    The only drawback is that rcu_table_freelist_finish() doesn't get necessarily
    called on the cpu(s) that filled the free lists. So we may see a delay, until
    we finally see an rcu callback. However over time this shouldn't matter.

    So we get rid of lots of "BUG: using smp_processor_id() in preemptible"
    messages.

    Signed-off-by: Heiko Carstens

    Heiko Carstens
     
  • page_get_storage_key() and page_set_storage_key() expect a page address
    and not its page frame number. This got inconsistent with 2d42552d
    "[S390] merge page_test_dirty and page_clear_dirty".

    Result is that we read/write storage keys from random pages and do not
    have a working dirty bit tracking at all.
    E.g. SetPageUpdate() doesn't clear the dirty bit of requested pages, which
    for example ext4 doesn't like very much and panics after a while.

    Unable to handle kernel paging request at virtual user address (null)
    Oops: 0004 [#1] PREEMPT SMP DEBUG_PAGEALLOC
    Modules linked in:
    CPU: 1 Not tainted 2.6.39-07551-g139f37f-dirty #152
    Process flush-94:0 (pid: 1576, task: 000000003eb34538, ksp: 000000003c287b70)
    Krnl PSW : 0704c00180000000 0000000000316b12 (jbd2_journal_file_inode+0x10e/0x138)
    R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:0 PM:0 EA:3
    Krnl GPRS: 0000000000000000 0000000000000000 0000000000000000 0700000000000000
    0000000000316a62 000000003eb34cd0 0000000000000025 000000003c287b88
    0000000000000001 000000003c287a70 000000003f1ec678 000000003f1ec000
    0000000000000000 000000003e66ec00 0000000000316a62 000000003c287988
    Krnl Code: 0000000000316b04: f0a0000407f4 srp 4(11,%r0),2036,0
    0000000000316b0a: b9020022 ltgr %r2,%r2
    0000000000316b0e: a7740015 brc 7,316b38
    >0000000000316b12: e3d0c0000024 stg %r13,0(%r12)
    0000000000316b18: 4120c010 la %r2,16(%r12)
    0000000000316b1c: 4130d060 la %r3,96(%r13)
    0000000000316b20: e340d0600004 lg %r4,96(%r13)
    0000000000316b26: c0e50002b567 brasl %r14,36d5f4
    Call Trace:
    ([] jbd2_journal_file_inode+0x5e/0x138)
    [] mpage_da_map_and_submit+0x2e8/0x42c
    [] ext4_da_writepages+0x2da/0x504
    [] writeback_single_inode+0xf8/0x268
    [] writeback_sb_inodes+0xd2/0x18c
    [] writeback_inodes_wb+0x80/0x168
    [] wb_writeback+0x2aa/0x324
    [] wb_do_writeback+0xd2/0x274
    [] bdi_writeback_thread+0xba/0x1c4
    [] kthread+0xa6/0xb0
    [] kernel_thread_starter+0x6/0xc
    [] kernel_thread_starter+0x0/0xc
    INFO: lockdep is turned off.
    Last Breaking-Event-Address:
    [] jbd2_journal_file_inode+0x86/0x138

    Reported-by: Sebastian Ott
    Signed-off-by: Heiko Carstens

    Heiko Carstens
     
  • …l/git/tip/linux-2.6-tip

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (25 commits)
    perf: Fix SIGIO handling
    perf top: Don't stop if no kernel symtab is found
    perf top: Handle kptr_restrict
    perf top: Remove unused macro
    perf events: initialize fd array to -1 instead of 0
    perf tools: Make sure kptr_restrict warnings fit 80 col terms
    perf tools: Fix build on older systems
    perf symbols: Handle /proc/sys/kernel/kptr_restrict
    perf: Remove duplicate headers
    ftrace: Add internal recursive checks
    tracing: Update btrfs's tracepoints to use u64 interface
    tracing: Add __print_symbolic_u64 to avoid warnings on 32bit machine
    ftrace: Set ops->flag to enabled even on static function tracing
    tracing: Have event with function tracer check error return
    ftrace: Have ftrace_startup() return failure code
    jump_label: Check entries limit in __jump_label_update
    ftrace/recordmcount: Avoid STT_FUNC symbols as base on ARM
    scripts/tags.sh: Add magic for trace-events for etags too
    scripts/tags.sh: Fix ctags for DEFINE_EVENT()
    x86/ftrace: Fix compiler warning in ftrace.c
    ...

    Linus Torvalds
     
  • * setns:
    ns: Wire up the setns system call

    Done as a merge to make it easier to fix up conflicts in arm due to
    addition of sendmmsg system call

    Linus Torvalds
     
  • 32bit and 64bit on x86 are tested and working. The rest I have looked
    at closely and I can't find any problems.

    setns is an easy system call to wire up. It just takes two ints so I
    don't expect any weird architecture porting problems.

    While doing this I have noticed that we have some architectures that are
    very slow to get new system calls. cris seems to be the slowest where
    the last system calls wired up were preadv and pwritev. avr32 is weird
    in that recvmmsg was wired up but never declared in unistd.h. frv is
    behind with perf_event_open being the last syscall wired up. On h8300
    the last system call wired up was epoll_wait. On m32r the last system
    call wired up was fallocate. mn10300 has recvmmsg as the last system
    call wired up. The rest seem to at least have syncfs wired up which was
    new in the 2.6.39.

    v2: Most of the architecture support added by Daniel Lezcano
    v3: ported to v2.6.36-rc4 by: Eric W. Biederman
    v4: Moved wiring up of the system call to another patch
    v5: ported to v2.6.39-rc6
    v6: rebased onto parisc-next and net-next to avoid syscall conflicts.
    v7: ported to Linus's latest post 2.6.39 tree.

    >  arch/blackfin/include/asm/unistd.h     |    3 ++-
    >  arch/blackfin/mach-common/entry.S      |    1 +
    Acked-by: Mike Frysinger

    Oh - ia64 wiring looks good.
    Acked-by: Tony Luck

    Signed-off-by: Eric W. Biederman
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     

28 May, 2011

2 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
    PM: Fix PM QOS's user mode interface to work with ASCII input
    PM / Hibernate: Update kerneldoc comments in hibernate.c
    PM / Hibernate: Remove arch_prepare_suspend()
    PM / Hibernate: Update some comments in core hibernate code

    Linus Torvalds
     
  • * 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
    [S390] mm: add ZONE_DMA to 31-bit config again
    [S390] mm: add page fault retry handling
    [S390] mm: handle kernel caused page fault oom situations
    [S390] delay: implement ndelay
    [S390] topology,sched: fix cpu_coregroup_mask/cpu_book_mask definitions
    [S390] hwsampler: allow cpu hotplug
    [S390] uaccess: turn __access_ok() into a define
    [S390] irq: merge irq.c and s390_ext.c
    [S390] irq: fix service signal external interrupt handling
    [S390] pfault: always enable service signal interrupt

    Linus Torvalds
     

27 May, 2011

3 commits

  • …rostedt/linux-2.6-trace into perf/urgent

    Ingo Molnar
     
  • The previous style change enables to use asm-generic/bitops/le.h on s390.

    Signed-off-by: Akinobu Mita
    Cc: Arnd Bergmann
    Cc: Russell King
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Greg Ungerer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • The style that we normally use in asm-generic is to test the macro itself
    for existence, so in asm-generic, do:

    #ifndef find_next_zero_bit_le
    extern unsigned long find_next_zero_bit_le(const void *addr,
    unsigned long size, unsigned long offset);
    #endif

    and in the architectures, write

    static inline unsigned long find_next_zero_bit_le(const void *addr,
    unsigned long size, unsigned long offset)
    #define find_next_zero_bit_le find_next_zero_bit_le

    This adds the #define for each of the optimized find bitops in the
    architectures.

    Suggested-by: Arnd Bergmann
    Signed-off-by: Akinobu Mita
    Acked-by: Hans-Christian Egtvedt
    Acked-by: Russell King
    Acked-by: Greg Ungerer
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Acked-by: Geert Uytterhoeven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     

26 May, 2011

11 commits


25 May, 2011

5 commits

  • Fold all the mmu_gather rework patches into one for submission

    Signed-off-by: Peter Zijlstra
    Reported-by: Hugh Dickins
    Cc: Benjamin Herrenschmidt
    Cc: David Miller
    Cc: Martin Schwidefsky
    Cc: Russell King
    Cc: Paul Mundt
    Cc: Jeff Dike
    Cc: Richard Weinberger
    Cc: Tony Luck
    Cc: KAMEZAWA Hiroyuki
    Cc: Mel Gorman
    Cc: KOSAKI Motohiro
    Cc: Nick Piggin
    Cc: Namhyung Kim
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     
  • Adapt the stand-alone s390 mmu_gather implementation to the new
    preemptible mmu_gather interface.

    Signed-off-by: Peter Zijlstra
    Signed-off-by: Martin Schwidefsky
    Cc: Benjamin Herrenschmidt
    Cc: David Miller
    Cc: Russell King
    Cc: Paul Mundt
    Cc: Jeff Dike
    Cc: Richard Weinberger
    Cc: Tony Luck
    Cc: KAMEZAWA Hiroyuki
    Cc: Hugh Dickins
    Cc: Mel Gorman
    Cc: KOSAKI Motohiro
    Cc: Nick Piggin
    Cc: Namhyung Kim
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     
  • All architectures supporting hibernation define
    arch_prepare_suspend() as an empty function, so remove it.

    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     
  • * 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6: (29 commits)
    [S390] cpu hotplug: fix external interrupt subclass mask handling
    [S390] oprofile: dont access lowcore
    [S390] oprofile: add missing irq stats counter
    [S390] Ignore sendmmsg system call note wired up warning
    [S390] s390,oprofile: fix compile error for !CONFIG_SMP
    [S390] s390,oprofile: fix alert counter increment
    [S390] Remove unused includes in process.c
    [S390] get CPC image name
    [S390] sclp: event buffer dissection
    [S390] chsc: process channel-path-availability information
    [S390] refactor page table functions for better pgste support
    [S390] merge page_test_dirty and page_clear_dirty
    [S390] qdio: prevent compile warning
    [S390] sclp: remove unnecessary sendmask check
    [S390] convert old cpumask API into new one
    [S390] pfault: cleanup code
    [S390] pfault: cpu hotplug vs missing completion interrupts
    [S390] smp: add __noreturn attribute to cpu_die()
    [S390] percpu: implement arch specific irqsafe_cpu_ops
    [S390] vdso: disable gcov profiling
    ...

    Linus Torvalds
     
  • * 'for-2.6.40' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
    percpu: Unify input section names
    percpu: Avoid extra NOP in percpu_cmpxchg16b_double
    percpu: Cast away printk format warning
    percpu: Always align percpu output section to PAGE_SIZE

    Fix up fairly trivial conflict in arch/x86/include/asm/percpu.h as per Tejun

    Linus Torvalds
     

24 May, 2011

2 commits

  • Tejun Heo
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
    b43: fix comment typo reqest -> request
    Haavard Skinnemoen has left Atmel
    cris: typo in mach-fs Makefile
    Kconfig: fix copy/paste-ism for dell-wmi-aio driver
    doc: timers-howto: fix a typo ("unsgined")
    perf: Only include annotate.h once in tools/perf/util/ui/browsers/annotate.c
    md, raid5: Fix spelling error in comment ('Ofcourse' --> 'Of course').
    treewide: fix a few typos in comments
    regulator: change debug statement be consistent with the style of the rest
    Revert "arm: mach-u300/gpio: Fix mem_region resource size miscalculations"
    audit: acquire creds selectively to reduce atomic op overhead
    rtlwifi: don't touch with treewide double semicolon removal
    treewide: cleanup continuations and remove logging message whitespace
    ath9k_hw: don't touch with treewide double semicolon removal
    include/linux/leds-regulator.h: fix syntax in example code
    tty: fix typo in descripton of tty_termios_encode_baud_rate
    xtensa: remove obsolete BKL kernel option from defconfig
    m68k: fix comment typo 'occcured'
    arch:Kconfig.locks Remove unused config option.
    treewide: remove extra semicolons
    ...

    Linus Torvalds
     

23 May, 2011

2 commits