16 Nov, 2011

1 commit

  • kdump fails because we try to execute an HV only instruction. Feature
    fixups are being applied after we copy the exception vectors down to 0
    so they miss out on any updates.

    We have always had this issue but it only became critical in v3.0
    when we added CFAR support (breaks POWER5) and v3.1 when we added
    POWERNV (breaks everyone).

    Signed-off-by: Anton Blanchard
    Cc: [v3.0+]
    Signed-off-by: Benjamin Herrenschmidt

    Anton Blanchard
     

20 Sep, 2011

1 commit

  • u64 is used rather than phys_addr_t to keep things simple, as
    this is called from assembly code.

    Update callers to pass a 64-bit address in r3/r4. Other unused
    register assignments that were once parameters to machine_init
    are dropped.

    For FSL BookE, look up the physical address of the device tree from the
    effective address passed in r3 by the loader. This is required for
    situations where memory does not start at zero (due to AMP or IOMMU-less
    virtualization), and thus the IMA doesn't start at zero, and thus the
    device tree effective address does not equal the physical address.

    Signed-off-by: Scott Wood
    Signed-off-by: Benjamin Herrenschmidt

    Scott Wood
     

22 Jul, 2011

1 commit


19 Jul, 2011

1 commit

  • Kernel loadable module can use hard_smp_processor_id() if building with SMP
    kernel. In order to make it work for UP kernels too, boot_cpuid_phys
    symbol (which is what hard_smp_processor_id() macro resolves to
    in non-SMP configuration) must be exported.

    Signed-off-by: Andrew Gabbasov
    Signed-off-by: Benjamin Herrenschmidt

    Andrew Gabbasov
     

12 Jul, 2011

1 commit


17 Jun, 2011

1 commit

  • smp_release_cpus() waits for all cpus (including the bootcpu) due to an
    off-by-one count on boot_cpu_count (which is all CPUs). This patch replaces
    that with spinning_secondaries (which is all secondary CPUs).

    Signed-off-by: Matt Evans
    Signed-off-by: Benjamin Herrenschmidt

    Matt Evans
     

20 Apr, 2011

1 commit


22 Oct, 2010

1 commit

  • * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (71 commits)
    powerpc/44x: Update ppc44x_defconfig
    powerpc/watchdog: Make default timeout for Book-E watchdog a Kconfig option
    fsl_rio: Add comments for sRIO registers.
    powerpc/fsl-booke: Add e55xx (64-bit) smp defconfig
    powerpc/fsl-booke: Add p5020 DS board support
    powerpc/fsl-booke64: Use TLB CAMs to cover linear mapping on FSL 64-bit chips
    powerpc/fsl-booke: Add support for FSL Arch v1.0 MMU in setup_page_sizes
    powerpc/fsl-booke: Add support for FSL 64-bit e5500 core
    powerpc/85xx: add cache-sram support
    powerpc/85xx: add ngPIXIS FPGA device tree node to the P1022DS board
    powerpc: Fix compile error with paca code on ppc64e
    powerpc/fsl-booke: Add p3041 DS board support
    oprofile/fsl emb: Don't set MSR[PMM] until after clearing the interrupt.
    powerpc/fsl-booke: Add PCI device ids for P2040/P3041/P5010/P5020 QoirQ chips
    powerpc/mpc8xxx_gpio: Add support for 'qoriq-gpio' controllers
    powerpc/fsl_booke: Add support to boot from core other than 0
    powerpc/p1022: Add probing for individual DMA channels
    powerpc/fsl_soc: Search all global-utilities nodes for rstccr
    powerpc: Fix invalid page flags in create TLB CAM path for PTE_64BIT
    powerpc/mpc83xx: Support for MPC8308 P1M board
    ...

    Fix up conflict with the generic irq_work changes in arch/powerpc/kernel/time.c

    Linus Torvalds
     

14 Oct, 2010

1 commit

  • First we check to see if we are the first core booting up. This
    is accomplished by comparing the boot_cpuid with -1, if it is we
    assume this is the first core coming up.

    Secondly, we need to update the initial thread info structure
    to reflect the actual cpu we are running on otherwise
    smp_processor_id() and related functions will return the default
    initialization value of the struct or 0.

    Signed-off-by: Matthew McClintock
    Signed-off-by: Kumar Gala

    Matthew McClintock
     

31 Aug, 2010

1 commit


23 Aug, 2010

1 commit


05 Aug, 2010

1 commit

  • This introduce memblock.current_limit which is used to limit allocations
    from memblock_alloc() or memblock_alloc_base(..., MEMBLOCK_ALLOC_ACCESSIBLE).

    The old MEMBLOCK_ALLOC_ANYWHERE changes value from 0 to ~(u64)0 and can still
    be used with memblock_alloc_base() to allocate really anywhere.

    It is -no-longer- cropped to MEMBLOCK_REAL_LIMIT which disappears.

    Note to archs: I'm leaving the default limit to MEMBLOCK_ALLOC_ANYWHERE. I
    strongly recommend that you ensure that you set an appropriate limit
    during boot in order to guarantee that an memblock_alloc() at any time
    results in something that is accessible with a simple __va().

    The reason is that a subsequent patch will introduce the ability for
    the array to resize itself by reallocating itself. The MEMBLOCK core will
    honor the current limit when performing those allocations.

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     

14 Jul, 2010

1 commit

  • via following scripts

    FILES=$(find * -type f | grep -vE 'oprofile|[^K]config')

    sed -i \
    -e 's/lmb/memblock/g' \
    -e 's/LMB/MEMBLOCK/g' \
    $FILES

    for N in $(find . -name lmb.[ch]); do
    M=$(echo $N | sed 's/lmb/memblock/g')
    mv $N $M
    done

    and remove some wrong change like lmbench and dlmb etc.

    also move memblock.c from lib/ to mm/

    Suggested-by: Ingo Molnar
    Acked-by: "H. Peter Anvin"
    Acked-by: Benjamin Herrenschmidt
    Acked-by: Linus Torvalds
    Signed-off-by: Yinghai Lu
    Signed-off-by: Benjamin Herrenschmidt

    Yinghai Lu
     

15 Jun, 2010

1 commit

  • Irq stacks provide an essential protection from stack overflows through
    external interrupts, at the cost of two additionals stacks per CPU.

    Enable them unconditionally to simplify the kernel build and prevent
    people from accidentally disabling them.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Benjamin Herrenschmidt

    Christoph Hellwig
     

19 Mar, 2010

1 commit

  • powerpc initializes swiotlb before parsing the kernel boot options so
    swiotlb options (e.g. specifying the swiotlb buffer size) are ignored.

    Any time before freeing bootmem works for swiotlb so this patch moves
    powerpc's swiotlb initialization after parsing the kernel boot
    options, mem_init (as x86 does).

    Signed-off-by: FUJITA Tomonori
    Tested-by: Becky Bruce
    Tested-by: Albert Herranz
    Signed-off-by: Benjamin Herrenschmidt

    FUJITA Tomonori
     

10 Nov, 2009

1 commit

  • This enables us to avoid printing swiotlb memory info when we
    initialize swiotlb. After swiotlb initialization, we could find
    that we don't need swiotlb.

    This patch removes the code to print swiotlb memory info in
    swiotlb_init() and exports the function to do that.

    Signed-off-by: FUJITA Tomonori
    Cc: chrisw@sous-sol.org
    Cc: dwmw2@infradead.org
    Cc: joerg.roedel@amd.com
    Cc: muli@il.ibm.com
    Cc: tony.luck@intel.com
    Cc: benh@kernel.crashing.org
    LKML-Reference:
    [ -v2: merge up conflict ]
    Signed-off-by: Ingo Molnar

    FUJITA Tomonori
     

11 Sep, 2009

1 commit


26 Jun, 2009

1 commit

  • Based on initial work from: Dale Farnsworth

    Add the low level irq tracing hooks for 32-bit powerpc needed
    to enable full lockdep functionality.

    The approach taken to deal with the code in entry_32.S is that
    we don't trace all the transitions of MSR:EE when we just turn
    it off to peek at TI_FLAGS without races. Only when we are
    calling into C code or returning from exceptions with a state
    that have changed from what lockdep thinks.

    There's a little bugger though: If we take an exception that
    keeps interrupts enabled (such as an alignment exception) while
    interrupts are enabled, we will call trace_hardirqs_on() on the
    way back spurriously. Not a big deal, but to get rid of it would
    require remembering in pt_regs that the exception was one of the
    type that kept interrupts enabled which we don't know at this
    stage. (Well, we could test all cases for regs->trap but that
    sucks too much).

    Signed-off-by: Benjamin Herrenschmidt
    Tested-by: Kumar Gala

    Benjamin Herrenschmidt
     

09 Jun, 2009

1 commit

  • This patch includes the basic infrastructure to use swiotlb
    bounce buffering on 32-bit powerpc. It is not yet enabled on
    any platforms. Probably the most interesting bit is the
    addition of addr_needs_map to dma_ops - we need this as
    a dma_op because the decision of whether or not an addr
    can be mapped by a device is device-specific.

    Signed-off-by: Becky Bruce
    Acked-by: Kumar Gala
    Signed-off-by: Benjamin Herrenschmidt

    Becky Bruce
     

23 Dec, 2008

1 commit


21 Dec, 2008

2 commits

  • This makes the MMU context code used for CPUs with no hash table
    (except 603) dynamically allocate the various maps used to track
    the state of contexts.

    Only the main free map and CPU 0 stale map are allocated at boot
    time. Other CPU maps are allocated when those CPUs are brought up
    and freed if they are unplugged.

    This also moves the initialization of the MMU context management
    slightly later during the boot process, which should be fine as
    it's really only needed when userland if first started anyways.

    Signed-off-by: Benjamin Herrenschmidt
    Acked-by: Kumar Gala
    Signed-off-by: Paul Mackerras

    Benjamin Herrenschmidt
     
  • We're soon running out of CPU features and I need to add some new
    ones for various MMU related bits, so this patch separates the MMU
    features from the CPU features. I moved over the 32-bit MMU related
    ones, added base features for MMU type families, but didn't move
    over any 64-bit only feature yet.

    Signed-off-by: Benjamin Herrenschmidt
    Acked-by: Kumar Gala
    Signed-off-by: Paul Mackerras

    Benjamin Herrenschmidt
     

16 Dec, 2008

2 commits


14 Oct, 2008

1 commit


20 Aug, 2008

1 commit

  • The file arch/powerpc/kernel/sysfs.c is currently only compiled for
    64-bit kernels. It contain code to register CPU sysdevs in sysfs and
    add various properties such as cache topology and raw access by root
    to performance monitor counters (PMCs). A lot of that can be re-used
    as is on 32-bits.

    This makes the file be built for both, with appropriate ifdef'ing
    for the few bits that are really 64-bit specific, and adds some
    support for the raw PMCs for 75x and 74xx processors.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Benjamin Herrenschmidt
     

24 Jul, 2008

1 commit

  • This patch removes the old kgdb reminants from ARCH=powerpc and
    implements the new style arch specific stub for the common kgdb core
    interface.

    It is possible to have xmon and kgdb in the same kernel, but you
    cannot use both at the same time because there is only one set of
    debug hooks.

    The arch specific kgdb implementation saves the previous state of the
    debug hooks and restores them if you unconfigure the kgdb I/O driver.
    Kgdb should have no impact on a kernel that has no kgdb I/O driver
    configured.

    Signed-off-by: Jason Wessel

    Jason Wessel
     

15 Jul, 2008

1 commit


03 Jul, 2008

1 commit

  • To allow for a single kernel image on e500 v1/v2/mc we need to fixup lwsync
    at runtime. On e500v1/v2 lwsync causes an illop so we need to patch up
    the code. We default to 'sync' since that is always safe and if the cpu
    is capable we will replace 'sync' with 'lwsync'.

    We introduce CPU_FTR_LWSYNC as a way to determine at runtime if this is
    needed. This flag could be moved elsewhere since we dont really use it
    for the normal CPU_FTR purpose.

    Finally we only store the relative offset in the fixup section to keep it
    as small as possible rather than using a full fixup_entry.

    Signed-off-by: Kumar Gala
    Signed-off-by: Paul Mackerras

    Kumar Gala
     

26 Jun, 2008

1 commit

  • The e500 core enter DOZE/NAP power-saving modes when the core go to
    cpu_idle routine.

    The power management default running mode is DOZE, If the user

    echo 1 > /proc/sys/kernel/powersave-nap

    the system will change to NAP running mode.

    Signed-off-by: Dave Liu
    Signed-off-by: Kumar Gala

    Kumar Gala
     

03 Jun, 2008

1 commit

  • For the additonal exception levels (critical, debug, machine check) on
    40x/book-e we were using "static" allocations of the stack in the
    associated head.S.

    Move to a runtime allocation to make the code a bit easier to read as
    we mimic how we handle IRQ stacks. Its also a bit easier to setup the
    stack with a "dummy" thread_info in C code.

    Signed-off-by: Kumar Gala
    Acked-by: Paul Mackerras

    Kumar Gala
     

27 May, 2008

1 commit

  • This patch cleans up the ftrace code in PowerPC based on the comments from
    Michael Ellerman.

    Signed-off-by: Steven Rostedt
    Cc: Michael Ellerman
    Cc: proski@gnu.org
    Cc: a.p.zijlstra@chello.nl
    Cc: Pekka Paalanen
    Cc: Steven Rostedt
    Cc: linuxppc-dev@ozlabs.org
    Cc: Soeren Sandmann Pedersen
    Cc: paulus@samba.org
    Signed-off-by: Thomas Gleixner

    Steven Rostedt
     

24 May, 2008

1 commit

  • This patch adds full support for ftrace for PowerPC (both 64 and 32 bit).
    This includes dynamic tracing and function filtering.

    Signed-off-by: Steven Rostedt
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Steven Rostedt
     

29 Apr, 2008

1 commit

  • This makes it possible to use separate stacks for hard and soft IRQs
    on 32-bit powerpc as well as on 64-bit. The code for 32-bit is just
    the 32-bit analog of the 64-bit code.

    * Added allocation and initialization of the irq stacks. We limit the
    stacks to be in lowmem for ppc32.
    * Implemented ppc32 versions of call_do_softirq() and call_handle_irq()
    to switch the stack pointers
    * Reworked how we do stack overflow detection. We now keep around the
    limit of the stack in the thread_struct and compare against the limit
    to see if we've overflowed. We can now use this on ppc64 if desired.

    [ paulus@samba.org: Fixed bug on 6xx where we need to reload r9 with the
    thread_info pointer. ]

    Signed-off-by: Kumar Gala
    Signed-off-by: Paul Mackerras

    Kumar Gala
     

22 Apr, 2008

1 commit

  • * 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (202 commits)
    [POWERPC] Fix compile breakage for 64-bit UP configs
    [POWERPC] Define copy_siginfo_from_user32
    [POWERPC] Add compat handler for PTRACE_GETSIGINFO
    [POWERPC] i2c: Fix build breakage introduced by OF helpers
    [POWERPC] Optimize fls64() on 64-bit processors
    [POWERPC] irqtrace support for 64-bit powerpc
    [POWERPC] Stacktrace support for lockdep
    [POWERPC] Move stackframe definitions to common header
    [POWERPC] Fix device-tree locking vs. interrupts
    [POWERPC] Make pci_bus_to_host()'s struct pci_bus * argument const
    [POWERPC] Remove unused __max_memory variable
    [POWERPC] Simplify xics direct/lpar irq_host setup
    [POWERPC] Use pseries_setup_i8259_cascade() in pseries_mpic_init_IRQ()
    [POWERPC] Turn xics_setup_8259_cascade() into a generic pseries_setup_i8259_cascade()
    [POWERPC] Move xics_setup_8259_cascade() into platforms/pseries/setup.c
    [POWERPC] Use asm-generic/bitops/find.h in bitops.h
    [POWERPC] 83xx: mpc8315 - fix USB UTMI Host setup
    [POWERPC] 85xx: Fix the size of qe muram for MPC8568E
    [POWERPC] 86xx: mpc86xx_hpcn - Temporarily accept old dts node identifier.
    [POWERPC] 86xx: mark functions static, other minor cleanups
    ...

    Linus Torvalds
     

18 Apr, 2008

1 commit

  • * Add special cases for pplus and prep to ide_default_{irq,io_base}()
    (+ FIXMEs about the need to use IDE platform host driver instead).

    * Remove no longer needed ppc_ide_md and struct ide_machdep_calls.

    * Then remove include from:
    - arch/powerpc/kernel/setup_32.c
    - arch/ppc/kernel/ppc_ksyms.c
    - arch/ppc/kernel/setup.c
    - arch/ppc/platforms/pplus.c
    - arch/ppc/platforms/prep_setup.c

    There should be no functional changes caused by this patch.

    Cc: Benjamin Herrenschmidt
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     

17 Apr, 2008

1 commit

  • * PAGE_OFFSET is not always the start of code, use _stext instead.
    * grab PAGE_SIZE and KERNELBASE from asm/page.h like ppc64 does. Makes the
    code a bit more common and provide a single place to manipulate the
    defines for things like kdump.

    Signed-off-by: Kumar Gala
    Signed-off-by: Paul Mackerras

    Kumar Gala
     

01 Apr, 2008

1 commit


11 Oct, 2007

1 commit


22 Sep, 2007

1 commit

  • These are the symptom error messages:

    CC arch/powerpc/kernel/setup_32.o
    In file included from include/linux/blkdev.h:17,
    from include/linux/ide.h:13,
    from arch/powerpc/kernel/setup_32.c:13:
    include/linux/bsg.h:67: warning: 'struct request_queue' declared inside parameter list
    include/linux/bsg.h:67: warning: its scope is only this definition or declaration, which is probably not what you want
    include/linux/bsg.h:71: warning: 'struct request_queue' declared inside parameter list
    In file included from arch/powerpc/kernel/setup_32.c:13:
    include/linux/ide.h:857: error: field 'wrq' has incomplete type

    CC arch/powerpc/kernel/ppc_ksyms.o
    In file included from include/linux/blkdev.h:17,
    from include/linux/ide.h:13,
    from arch/powerpc/kernel/ppc_ksyms.c:15:
    include/linux/bsg.h:67: warning: 'struct request_queue' declared inside parameter list
    include/linux/bsg.h:67: warning: its scope is only this definition or declaration, which is probably not what you want
    include/linux/bsg.h:71: warning: 'struct request_queue' declared inside parameter list
    In file included from arch/powerpc/kernel/ppc_ksyms.c:15:
    include/linux/ide.h:857: error: field 'wrq' has incomplete type

    The fix tries to use the smallest scope CONFIG_* symbols that will fix
    the build problem. In this case needs to be included
    only if IDE=y or IDE=m were selected. Also, ppc_ide_md is needed only
    if BLK_DEV_IDE=y or BLK_DEV_IDE=m

    Moved the EXPORT_SYMBOL(ppc_ide_md) from ppc_ksysms.c next to its
    declaration in setup_32.c which made not needed. With
    gone from ppc_ksyms.c, is needed to
    address the following warnings and errors:

    CC arch/powerpc/kernel/ppc_ksyms.o
    arch/powerpc/kernel/ppc_ksyms.c:122: error: '__flush_icache_range' undeclared here (not in a function)
    arch/powerpc/kernel/ppc_ksyms.c:122: warning: type defaults to 'int' in declaration of '__flush_icache_range'
    arch/powerpc/kernel/ppc_ksyms.c:123: error: 'flush_dcache_range' undeclared here (not in a function)
    arch/powerpc/kernel/ppc_ksyms.c:123: warning: type defaults to 'int' in declaration of 'flush_dcache_range'

    Signed-off-by: Emil Medve
    Signed-off-by: Paul Mackerras

    Emil Medve