08 Oct, 2016

2 commits

  • Pull powerpc updates from Michael Ellerman:
    "Highlights:
    - Major rework of Book3S 64-bit exception vectors (Nicholas Piggin)
    - Use gas sections for arranging exception vectors et. al.
    - Large set of TM cleanups and selftests (Cyril Bur)
    - Enable transactional memory (TM) lazily for userspace (Cyril Bur)
    - Support for XZ compression in the zImage wrapper (Oliver
    O'Halloran)
    - Add support for bpf constant blinding (Naveen N. Rao)
    - Beginnings of upstream support for PA Semi Nemo motherboards
    (Darren Stevens)

    Fixes:
    - Ensure .mem(init|exit).text are within _stext/_etext (Michael
    Ellerman)
    - xmon: Don't use ld on 32-bit (Michael Ellerman)
    - vdso64: Use double word compare on pointers (Anton Blanchard)
    - powerpc/nvram: Fix an incorrect partition merge (Pan Xinhui)
    - powerpc: Fix usage of _PAGE_RO in hugepage (Christophe Leroy)
    - powerpc/mm: Update FORCE_MAX_ZONEORDER range to allow hugetlb w/4K
    (Aneesh Kumar K.V)
    - Fix memory leak in queue_hotplug_event() error path (Andrew
    Donnellan)
    - Replay hypervisor maintenance interrupt first (Nicholas Piggin)

    Various performance optimisations (Anton Blanchard):
    - Align hot loops of memset() and backwards_memcpy()
    - During context switch, check before setting mm_cpumask
    - Remove static branch prediction in atomic{, 64}_add_unless
    - Only disable HAVE_EFFICIENT_UNALIGNED_ACCESS on POWER7 little
    endian
    - Set default CPU type to POWER8 for little endian builds

    Cleanups & features:
    - Sparse fixes/cleanups (Daniel Axtens)
    - Preserve CFAR value on SLB miss caused by access to bogus address
    (Paul Mackerras)
    - Radix MMU fixups for POWER9 (Aneesh Kumar K.V)
    - Support for setting used_(vsr|vr|spe) in sigreturn path (for CRIU)
    (Simon Guo)
    - Optimise syscall entry for virtual, relocatable case (Nicholas
    Piggin)
    - Optimise MSR handling in exception handling (Nicholas Piggin)
    - Support for kexec with Radix MMU (Benjamin Herrenschmidt)
    - powernv EEH fixes (Russell Currey)
    - Suprise PCI hotplug support for powernv (Gavin Shan)
    - Endian/sparse fixes for powernv PCI (Gavin Shan)
    - Defconfig updates (Anton Blanchard)
    - KVM: PPC: Book3S HV: Migrate pinned pages out of CMA (Balbir Singh)
    - cxl: Flush PSL cache before resetting the adapter (Frederic Barrat)
    - cxl: replace loop with for_each_child_of_node(), remove unneeded
    of_node_put() (Andrew Donnellan)
    - Fix HV facility unavailable to use correct handler (Nicholas
    Piggin)
    - Remove unnecessary syscall trampoline (Nicholas Piggin)
    - fadump: Fix build break when CONFIG_PROC_VMCORE=n (Michael
    Ellerman)
    - Quieten EEH message when no adapters are found (Anton Blanchard)
    - powernv: Add PHB register dump debugfs handle (Russell Currey)
    - Use kprobe blacklist for exception handlers & asm functions
    (Nicholas Piggin)
    - Document the syscall ABI (Nicholas Piggin)
    - MAINTAINERS: Update cxl maintainers (Michael Neuling)
    - powerpc: Remove all usages of NO_IRQ (Michael Ellerman)

    Minor cleanups:
    - Andrew Donnellan, Christophe Leroy, Colin Ian King, Cyril Bur,
    Frederic Barrat, Pan Xinhui, PrasannaKumar Muralidharan, Rui Teng,
    Simon Guo"

    * tag 'powerpc-4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (156 commits)
    powerpc/bpf: Add support for bpf constant blinding
    powerpc/bpf: Implement support for tail calls
    powerpc/bpf: Introduce accessors for using the tmp local stack space
    powerpc/fadump: Fix build break when CONFIG_PROC_VMCORE=n
    powerpc: tm: Enable transactional memory (TM) lazily for userspace
    powerpc/tm: Add TM Unavailable Exception
    powerpc: Remove do_load_up_transact_{fpu,altivec}
    powerpc: tm: Rename transct_(*) to ck(\1)_state
    powerpc: tm: Always use fp_state and vr_state to store live registers
    selftests/powerpc: Add checks for transactional VSXs in signal contexts
    selftests/powerpc: Add checks for transactional VMXs in signal contexts
    selftests/powerpc: Add checks for transactional FPUs in signal contexts
    selftests/powerpc: Add checks for transactional GPRs in signal contexts
    selftests/powerpc: Check that signals always get delivered
    selftests/powerpc: Add TM tcheck helpers in C
    selftests/powerpc: Allow tests to extend their kill timeout
    selftests/powerpc: Introduce GPR asm helper header file
    selftests/powerpc: Move VMX stack frame macros to header file
    selftests/powerpc: Rework FPU stack placement macros and move to header file
    selftests/powerpc: Check for VSX preservation across userspace preemption
    ...

    Linus Torvalds
     
  • Pull SCSI updates from James Bottomley:
    "This update includes the usual round of major driver updates (hpsa,
    be2iscsi, hisi_sas, zfcp, cxlflash). There's a new incarnation of hpsa
    called smartpqi for which a driver is added, there's some cleanup work
    of the ibm vscsi target and updates to libfc, plus a whole host of
    minor fixes and updates and finally the removal of several ISA drivers
    which seem not to have been used for years"

    * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (173 commits)
    scsi: mvsas: Mark symbols static where possible
    scsi: pm8001: Mark symbols static where possible
    scsi: arcmsr: Simplify user_len checking
    scsi: fcoe: fix off by one in eth2fc_speed()
    scsi: dtc: remove from tree
    scsi: t128: remove from tree
    scsi: pas16: remove from tree
    scsi: u14-34f: remove from tree
    scsi: ultrastor: remove from tree
    scsi: in2000: remove from tree
    scsi: wd7000: remove from tree
    scsi: scsi_dh_alua: Fix memory leak in alua_rtpg()
    scsi: lpfc: Mark symbols static where possible
    scsi: hpsa: correct call to hpsa_do_reset
    scsi: ufs: Get a TM service response from the correct offset
    scsi: ibmvfc: Fix I/O hang when port is not mapped
    scsi: megaraid_sas: clean function declarations in megaraid_sas_base.c up
    scsi: ipr: Remove redundant messages at adapter init time
    scsi: ipr: Don't log unnecessary 9084 error details
    scsi: smartpqi: raid bypass lba calculation fix
    ...

    Linus Torvalds
     

20 Sep, 2016

1 commit

  • Add some documentation for the 64-bit syscall ABI, which doesn't seem
    to be documented elsewhere.

    This attempts to document existing practice. The only small discrepancy
    is glibc clobbers not quite matching the kernel (e.g., xer, some
    vsyscalls trash cr1 whereas glibc only clobbers cr0). These will be
    resolved after this document is merged.

    Signed-off-by: Nicholas Piggin
    Signed-off-by: Michael Ellerman

    Nicholas Piggin
     

29 Aug, 2016

1 commit

  • Userspace can begin and suspend a transaction within the signal
    handler which means they might enter sys_rt_sigreturn() with the
    processor in suspended state.

    sys_rt_sigreturn() wants to restore process context (which may have
    been in a transaction before signal delivery). To do this it must
    restore TM SPRS. To achieve this, any transaction initiated within the
    signal frame must be discarded in order to be able to restore TM SPRs
    as TM SPRs can only be manipulated non-transactionally..
    >From the PowerPC ISA:
    TM Bad Thing Exception [Category: Transactional Memory]
    An attempt is made to execute a mtspr targeting a TM register in
    other than Non-transactional state.

    Not doing so results in a TM Bad Thing:
    [12045.221359] Kernel BUG at c000000000050a40 [verbose debug info unavailable]
    [12045.221470] Unexpected TM Bad Thing exception at c000000000050a40 (msr 0x201033)
    [12045.221540] Oops: Unrecoverable exception, sig: 6 [#1]
    [12045.221586] SMP NR_CPUS=2048 NUMA PowerNV
    [12045.221634] Modules linked in: xt_CHECKSUM iptable_mangle ipt_MASQUERADE
    nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv4 nf_defrag_ipv4
    xt_conntrack nf_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp bridge stp llc ebtable_filter
    ebtables ip6table_filter ip6_tables iptable_filter ip_tables x_tables kvm_hv kvm
    uio_pdrv_genirq ipmi_powernv uio powernv_rng ipmi_msghandler autofs4 ses enclosure
    scsi_transport_sas bnx2x ipr mdio libcrc32c
    [12045.222167] CPU: 68 PID: 6178 Comm: sigreturnpanic Not tainted 4.7.0 #34
    [12045.222224] task: c0000000fce38600 ti: c0000000fceb4000 task.ti: c0000000fceb4000
    [12045.222293] NIP: c000000000050a40 LR: c0000000000163bc CTR: 0000000000000000
    [12045.222361] REGS: c0000000fceb7ac0 TRAP: 0700 Not tainted (4.7.0)
    [12045.222418] MSR: 9000000300201033 CR: 28444280 XER: 20000000
    [12045.222625] CFAR: c0000000000163b8 SOFTE: 0 PACATMSCRATCH: 900000014280f033
    GPR00: 01100000b8000001 c0000000fceb7d40 c00000000139c100 c0000000fce390d0
    GPR04: 900000034280f033 0000000000000000 0000000000000000 0000000000000000
    GPR08: 0000000000000000 b000000000001033 0000000000000001 0000000000000000
    GPR12: 0000000000000000 c000000002926400 0000000000000000 0000000000000000
    GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
    GPR20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
    GPR24: 0000000000000000 00003ffff98cadd0 00003ffff98cb470 0000000000000000
    GPR28: 900000034280f033 c0000000fceb7ea0 0000000000000001 c0000000fce390d0
    [12045.223535] NIP [c000000000050a40] tm_restore_sprs+0xc/0x1c
    [12045.223584] LR [c0000000000163bc] tm_recheckpoint+0x5c/0xa0
    [12045.223630] Call Trace:
    [12045.223655] [c0000000fceb7d80] [c000000000026e74] sys_rt_sigreturn+0x494/0x6c0
    [12045.223738] [c0000000fceb7e30] [c0000000000092e0] system_call+0x38/0x108
    [12045.223806] Instruction dump:
    [12045.223841] 7c800164 4e800020 7c0022a6 f80304a8 7c0222a6 f80304b0 7c0122a6 f80304b8
    [12045.223955] 4e800020 e80304a8 7c0023a6 e80304b0 e80304b8 7c0123a6 4e800020
    [12045.224074] ---[ end trace cb8002ee240bae76 ]---

    It isn't clear exactly if there is really a use case for userspace
    returning with a suspended transaction, however, doing so doesn't (on
    its own) constitute a bad frame. As such, this patch simply discards
    the transactional state of the context calling the sigreturn and
    continues.

    Reported-by: Laurent Dufour
    Signed-off-by: Cyril Bur
    Tested-by: Laurent Dufour
    Reviewed-by: Laurent Dufour
    Acked-by: Simon Guo
    Signed-off-by: Benjamin Herrenschmidt

    Cyril Bur
     

24 Aug, 2016

2 commits

  • Update the block library link in the API documentation.

    Signed-off-by: Matthew R. Ochs
    Acked-by: Manoj N. Kumar
    Signed-off-by: Martin K. Petersen

    Matthew R. Ochs
     
  • Caching the adapter file descriptor and performing a close on behalf of
    an application is a poor design. This is due to the fact that once a
    file descriptor in installed, it is free to be altered without the
    knowledge of the cxlflash driver. This can lead to inconsistencies
    between the application and kernel. Furthermore, the nature of the
    former design is more exploitable and thus should be abandoned.

    To support applications performing a close on the adapter file that is
    associated with a context, a new flag is introduced to the user API to
    indicate to applications that they are responsible for the close
    following the cleanup (detach) of a context. The documentation is also
    updated to reflect this change in behavior.

    Inspired-by: Al Viro
    Signed-off-by: Matthew R. Ochs
    Acked-by: Manoj N. Kumar
    Signed-off-by: Martin K. Petersen

    Matthew R. Ochs
     

11 Apr, 2016

1 commit

  • IBM online documentation for EEH uses "extended error handling" and
    "enhanced error handling" to refer to the same thing, in different
    places. The only place mentioning it as "enhanced error handling" in the
    kernel is the MAINTAINERS file, and it's "extended" in some documentation.

    IBM originally defined EEH as "enhanced error handling", so standardise
    all mentions of EEH to use that term.

    Signed-off-by: Russell Currey
    Acked-by: Gavin Shan
    Signed-off-by: Michael Ellerman

    Russell Currey
     

09 Mar, 2016

1 commit

  • The new flash.c file contains the logic to flash a new image on the
    adapter, through a hcall. It is an iterative process, with chunks of
    data of 1M at a time. There are also 2 phases: write and verify. The
    flash operation itself is driven from a user-land tool.
    Once flashing is successful, an rtas call is made to update the device
    tree with the new properties values for the adapter and the AFU(s)

    Add a new char device for the adapter, so that the flash tool can
    access the card, even if there is no valid AFU on it.

    Co-authored-by: Frederic Barrat
    Signed-off-by: Frederic Barrat
    Signed-off-by: Christophe Lombard
    Reviewed-by: Manoj Kumar
    Acked-by: Ian Munsie
    Signed-off-by: Michael Ellerman

    Christophe Lombard
     

03 Sep, 2015

1 commit

  • Pull first round of SCSI updates from James Bottomley:
    "This includes one new driver: cxlflash plus the usual grab bag of
    updates for the major drivers: qla2xxx, ipr, storvsc, pm80xx, hptiop,
    plus a few assorted fixes.

    There's another tranch coming, but I want to incubate it another few
    days in the checkers, plus it includes a mpt2sas separated lifetime
    fix, which Avago won't get done testing until Friday"

    * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (85 commits)
    aic94xx: set an error code on failure
    storvsc: Set the error code correctly in failure conditions
    storvsc: Allow write_same when host is windows 10
    storvsc: use storage protocol version to determine storage capabilities
    storvsc: use correct defaults for values determined by protocol negotiation
    storvsc: Untangle the storage protocol negotiation from the vmbus protocol negotiation.
    storvsc: Use a single value to track protocol versions
    storvsc: Rather than look for sets of specific protocol versions, make decisions based on ranges.
    cxlflash: Remove unused variable from queuecommand
    cxlflash: shift wrapping bug in afu_link_reset()
    cxlflash: off by one bug in cxlflash_show_port_status()
    cxlflash: Virtual LUN support
    cxlflash: Superpipe support
    cxlflash: Base error recovery support
    qla2xxx: Update driver version to 8.07.00.26-k
    qla2xxx: Add pci device id 0x2261.
    qla2xxx: Fix missing device login retries.
    qla2xxx: do not clear slot in outstanding cmd array
    qla2xxx: Remove decrement of sp reference count in abort handler.
    qla2xxx: Add support to show MPI and PEP FW version for ISP27xx.
    ...

    Linus Torvalds
     

27 Aug, 2015

2 commits

  • Add support for physical LUN segmentation (virtual LUNs) to device
    driver supporting the IBM CXL Flash adapter. This patch allows user
    space applications to virtually segment a physical LUN into N virtual
    LUNs, taking advantage of the translation features provided by this
    adapter.

    Signed-off-by: Matthew R. Ochs
    Signed-off-by: Manoj N. Kumar
    Reviewed-by: Michael Neuling
    Reviewed-by: Wen Xiong
    Signed-off-by: James Bottomley

    Matthew R. Ochs
     
  • Add superpipe supporting infrastructure to device driver for the IBM CXL
    Flash adapter. This patch allows userspace applications to take advantage
    of the accelerated I/O features that this adapter provides and bypass the
    traditional filesystem stack.

    Signed-off-by: Matthew R. Ochs
    Signed-off-by: Manoj N. Kumar
    Reviewed-by: Michael Neuling
    Reviewed-by: Wen Xiong
    Reviewed-by: Brian King
    Signed-off-by: James Bottomley

    Matthew R. Ochs
     

11 Jul, 2015

1 commit


19 Jun, 2015

1 commit

  • This patch changes the syscall handler to doom (tabort) active
    transactions when a syscall is made and return very early without
    performing the syscall and keeping side effects to a minimum (no CPU
    accounting or system call tracing is performed). Also included is a
    new HWCAP2 bit, PPC_FEATURE2_HTM_NOSC, to indicate this
    behaviour to userspace.

    Currently, the system call instruction automatically suspends an
    active transaction which causes side effects to persist when an active
    transaction fails.

    This does change the kernel's behaviour, but in a way that was
    documented as unsupported. It doesn't reduce functionality as
    syscalls will still be performed after tsuspend; it just requires that
    the transaction be explicitly suspended. It also provides a
    consistent interface and makes the behaviour of user code
    substantially the same across powerpc and platforms that do not
    support suspended transactions (e.g. x86 and s390).

    Performance measurements using
    http://ozlabs.org/~anton/junkcode/null_syscall.c indicate the cost of
    a normal (non-aborted) system call increases by about 0.25%.

    Signed-off-by: Sam Bobroff
    Signed-off-by: Michael Ellerman

    Sam bobroff
     

07 Jun, 2015

1 commit

  • This patch adds a new documentation file explaining the DSCR support on
    powerpc platforms. This explains DSCR related data structure, code paths
    and also available user interfaces. Any further functional changes to
    the DSCR support in the kernel should definitely update the
    documentation here.

    Signed-off-by: Anshuman Khandual
    Signed-off-by: Michael Ellerman

    Anshuman Khandual
     

03 Jun, 2015

1 commit


30 Apr, 2015

1 commit

  • This reverts commit feba40362b11341bee6d8ed58d54b896abbd9f84.

    Although the principle of this change is good, the implementation has a
    few issues.

    Firstly we can sometimes fail to abort a syscall because r12 may have
    been clobbered by C code if we went down the virtual CPU accounting
    path, or if syscall tracing was enabled.

    Secondly we have decided that it is safer to abort the syscall even
    earlier in the syscall entry path, so that we avoid the syscall tracing
    path when we are transactional.

    So that we have time to thoroughly test those changes we have decided to
    revert this for this merge window and will merge the fixed version in
    the next window.

    NB. Rather than reverting the selftest we just drop tm-syscall from
    TEST_PROGS so that it's not run by default.

    Fixes: feba40362b11 ("powerpc/tm: Abort syscalls in active transactions")
    Signed-off-by: Michael Ellerman

    Michael Ellerman
     

14 Apr, 2015

1 commit


11 Apr, 2015

2 commits

  • Signed-off-by: Sam Bobroff
    Signed-off-by: Michael Ellerman

    Sam bobroff
     
  • This patch changes the syscall handler to doom (tabort) active
    transactions when a syscall is made and return immediately without
    performing the syscall.

    Currently, the system call instruction automatically suspends an
    active transaction which causes side effects to persist when an active
    transaction fails.

    This does change the kernel's behaviour, but in a way that was
    documented as unsupported. It doesn't reduce functionality because
    syscalls will still be performed after tsuspend. It also provides a
    consistent interface and makes the behaviour of user code
    substantially the same across powerpc and platforms that do not
    support suspended transactions (e.g. x86 and s390).

    Performance measurements using
    http://ozlabs.org/~anton/junkcode/null_syscall.c
    indicate the cost of a system call increases by about 0.5%.

    Signed-off-by: Sam Bobroff
    Acked-By: Michael Neuling
    Signed-off-by: Michael Ellerman

    Sam bobroff
     

31 Mar, 2015

1 commit

  • In order to enable SRIOV on PowerNV platform, the PF's IOV BAR needs to be
    adjusted:

    1. size expanded
    2. aligned to M64BT size

    This patch documents this change on the reason and how.

    [bhelgaas: reformat, clarify, expand]
    Signed-off-by: Wei Yang
    Signed-off-by: Benjamin Herrenschmidt

    Wei Yang
     

08 Oct, 2014

1 commit

  • This documentation gives an overview of the hardware architecture, userspace
    APIs via /dev/cxl/afuM.N and the syfs files. It also adds a MAINTAINERS file
    entry for cxl.

    Signed-off-by: Ian Munsie
    Signed-off-by: Michael Neuling
    Signed-off-by: Michael Ellerman

    Ian Munsie
     

28 Jul, 2014

1 commit

  • The 440 target hasn't been properly functioning for a few releases and
    before I was the only one who fixes a very serious bug that indicates to
    me that nobody used it before either.

    Furthermore KVM on 440 is slow to the extent of unusable.

    We don't have to carry along completely unused code. Remove 440 and give
    us one less thing to worry about.

    Signed-off-by: Alexander Graf

    Alexander Graf
     

11 Jun, 2014

1 commit

  • Pull powerpc updates from Ben Herrenschmidt:
    "Here is the bulk of the powerpc changes for this merge window. It got
    a bit delayed in part because I wasn't paying attention, and in part
    because I discovered I had a core PCI change without a PCI maintainer
    ack in it. Bjorn eventually agreed it was ok to merge it though we'll
    probably improve it later and I didn't want to rebase to add his ack.

    There is going to be a bit more next week, essentially fixes that I
    still want to sort through and test.

    The biggest item this time is the support to build the ppc64 LE kernel
    with our new v2 ABI. We previously supported v2 userspace but the
    kernel itself was a tougher nut to crack. This is now sorted mostly
    thanks to Anton and Rusty.

    We also have a fairly big series from Cedric that add support for
    64-bit LE zImage boot wrapper. This was made harder by the fact that
    traditionally our zImage wrapper was always 32-bit, but our new LE
    toolchains don't really support 32-bit anymore (it's somewhat there
    but not really "supported") so we didn't want to rely on it. This
    meant more churn that just endian fixes.

    This brings some more LE bits as well, such as the ability to run in
    LE mode without a hypervisor (ie. under OPAL firmware) by doing the
    right OPAL call to reinitialize the CPU to take HV interrupts in the
    right mode and the usual pile of endian fixes.

    There's another series from Gavin adding EEH improvements (one day we
    *will* have a release with less than 20 EEH patches, I promise!).

    Another highlight is the support for the "Split core" functionality on
    P8 by Michael. This allows a P8 core to be split into "sub cores" of
    4 threads which allows the subcores to run different guests under KVM
    (the HW still doesn't support a partition per thread).

    And then the usual misc bits and fixes ..."

    [ Further delayed by gmail deciding that BenH is a dirty spammer.
    Google knows. ]

    * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (155 commits)
    powerpc/powernv: Add missing include to LPC code
    selftests/powerpc: Test the THP bug we fixed in the previous commit
    powerpc/mm: Check paca psize is up to date for huge mappings
    powerpc/powernv: Pass buffer size to OPAL validate flash call
    powerpc/pseries: hcall functions are exported to modules, need _GLOBAL_TOC()
    powerpc: Exported functions __clear_user and copy_page use r2 so need _GLOBAL_TOC()
    powerpc/powernv: Set memory_block_size_bytes to 256MB
    powerpc: Allow ppc_md platform hook to override memory_block_size_bytes
    powerpc/powernv: Fix endian issues in memory error handling code
    powerpc/eeh: Skip eeh sysfs when eeh is disabled
    powerpc: 64bit sendfile is capped at 2GB
    powerpc/powernv: Provide debugfs access to the LPC bus via OPAL
    powerpc/serial: Use saner flags when creating legacy ports
    powerpc: Add cpu family documentation
    powerpc/xmon: Fix up xmon format strings
    powerpc/powernv: Add calls to support little endian host
    powerpc: Document sysfs DSCR interface
    powerpc: Fix regression of per-CPU DSCR setting
    powerpc: Split __SYSFS_SPRSETUP macro
    arch: powerpc/fadump: Cleaning up inconsistent NULL checks
    ...

    Linus Torvalds
     

05 Jun, 2014

1 commit


05 May, 2014

1 commit


27 Aug, 2013

1 commit


01 Jul, 2013

1 commit

  • Add support for EBB (Event Based Branches) on 64-bit book3s. See the
    included documentation for more details.

    EBBs are a feature which allows the hardware to branch directly to a
    specified user space address when a PMU event overflows. This can be
    used by programs for self-monitoring with no kernel involvement in the
    inner loop.

    Most of the logic is in the generic book3s code, primarily to avoid a
    proliferation of PMU callbacks.

    Signed-off-by: Michael Ellerman
    Signed-off-by: Benjamin Herrenschmidt

    Michael Ellerman
     

01 Jun, 2013

3 commits

  • When in an active transaction that takes a signal, we need to be careful with
    the stack. It's possible that the stack has moved back up after the tbegin.
    The obvious case here is when the tbegin is called inside a function that
    returns before a tend. In this case, the stack is part of the checkpointed
    transactional memory state. If we write over this non transactionally or in
    suspend, we are in trouble because if we get a tm abort, the program counter
    and stack pointer will be back at the tbegin but our in memory stack won't be
    valid anymore.

    To avoid this, when taking a signal in an active transaction, we need to use
    the stack pointer from the checkpointed state, rather than the speculated
    state. This ensures that the signal context (written tm suspended) will be
    written below the stack required for the rollback. The transaction is aborted
    becuase of the treclaim, so any memory written between the tbegin and the
    signal will be rolled back anyway.

    For signals taken in non-TM or suspended mode, we use the
    normal/non-checkpointed stack pointer.

    Tested with 64 and 32 bit signals

    Signed-off-by: Michael Neuling
    Cc: # v3.9
    Signed-off-by: Benjamin Herrenschmidt

    Michael Neuling
     
  • If we are emulating an instruction inside an active user transaction that
    touches memory, the kernel can't emulate it as it operates in transactional
    suspend context. We need to abort these transactions and send them back to
    userspace for the hardware to rollback.

    We can service these if the user transaction is in suspend mode, since the
    kernel will operate in the same suspend context.

    This adds a check to all alignment faults and to specific instruction
    emulations (only string instructions for now). If the user process is in an
    active (non-suspended) transaction, we abort the transaction go back to
    userspace allowing the HW to roll back the transaction and tell the user of the
    failure. This also adds new tm abort cause codes to report the reason of the
    persistent error to the user.

    Crappy test case here http://neuling.org/devel/junkcode/aligntm.c

    Signed-off-by: Michael Neuling
    Cc: # v3.9
    Signed-off-by: Benjamin Herrenschmidt

    Michael Neuling
     
  • Signed-off-by: Michael Neuling
    Cc: # 3.9 only
    Signed-off-by: Benjamin Herrenschmidt

    Michael Neuling
     

18 Apr, 2013

2 commits

  • This adds new debug feature information so that the DAWR can be
    identified by userspace tools like GDB.

    Unfortunately the DAWR doesn't sit nicely into the current description
    that ptrace provides to userspace via struct ppc_debug_info. It doesn't
    allow for specifying that only some ranges are possible or even the end
    alignment constraints (DAWR only allows 512 byte wide ranges which can't
    cross a 512 byte boundary).

    After talking to Edjunior Machado (GDB ppc developer), it was decided
    this was the best approach. Just mark it as debug feature DAWR and
    tools like GDB can internally decide the constraints.

    Signed-off-by: Michael Neuling
    Signed-off-by: Michael Ellerman

    Michael Neuling
     
  • PPC_PREP is marked as BROKEN since v2.6.15. Remove all PReP specific
    code now.

    Signed-off-by: Paul Bolle
    Signed-off-by: Michael Ellerman

    Paul Bolle
     

15 Feb, 2013

1 commit


10 Jan, 2013

1 commit


15 Nov, 2012

1 commit

  • PPC_PTRACE_GETHWDBGINFO, PPC_PTRACE_SETHWDEBUG and PPC_PTRACE_DELHWDEBUG are
    PowerPC specific ptrace flags that use the watchpoint register. While they are
    targeted primarily towards BookE users, user-space applications such as GDB
    have started using them for BookS too. This patch enables the use of generic
    hardware breakpoint interfaces for these new flags.

    Apart from the usual benefits of using generic hw-breakpoint interfaces, these
    changes allow debuggers (such as GDB) to use a common set of ptrace flags for
    their watchpoint needs and allow more precise breakpoint specification (length
    of the variable can be specified).

    Mikey added: rebased and added dbginfo.features around #ifdef
    CONFIG_HAVE_HW_BREAKPOINT

    Signed-off-by: K.Prasad
    Acked-by: David Gibson
    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Michael Neuling
    Signed-off-by: Benjamin Herrenschmidt

    K.Prasad
     

19 Mar, 2012

1 commit


23 Feb, 2012

2 commits


31 Mar, 2011

1 commit


17 Mar, 2011

1 commit