aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-11-14powerpc/powernv: Fix condition to remove M64Gavin Shan1-2/+2
The M64 resource should be removed if we don't have hook to initialize it, or (not and) fail to do that. Signed-off-by: Gavin Shan <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2014-11-14powerpc/powernv: Check PHB type in advanceGavin Shan1-6/+6
The patch checks PHB type a bit early to save a bit cycles for P7 because we don't support M64 for P7IOC no matter what OPAL firmware we have. Signed-off-by: Gavin Shan <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2014-11-14powerpc/mm: Switch to generic RCU get_user_pages_fastAneesh Kumar K.V8-267/+22
This patch switch the ppc arch to use the generic RCU based gup implementation. Signed-off-by: Aneesh Kumar K.V <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2014-11-14mm: Update generic gup implementation to handle hugepage directoryAneesh Kumar K.V3-8/+120
Update generic gup implementation with powerpc specific details. On powerpc at pmd level we can have hugepte, normal pmd pointer or a pointer to the hugepage directory. Tested-by: Steve Capper <[email protected]> Acked-by: Steve Capper <[email protected]> Signed-off-by: Aneesh Kumar K.V <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2014-11-14powerpc/mm: Add missing pmd accessorsAneesh Kumar K.V5-17/+78
This patch add documentation and missing accessors. Signed-off-by: Aneesh Kumar K.V <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2014-11-14powerpc: Disable CPU_FTR_TM if TM is disabled by firmwareAneesh Kumar K.V1-0/+6
Firmware is allowed to communicate to us via the "ibm,pa-features" property that TM (Transactional Memory) support is disabled. Currently this doesn't happen on any platform we're aware of, but we should honor it anyway. Signed-off-by: Aneesh Kumar K.V <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2014-11-12powerpc/xmon: Fix build when 4xx=y and 44x=nMichael Ellerman1-1/+1
dump_tlb_44x() is only defined when 44x=y, but the ifdef in xmon.c checks for 4xx, leading to a build failure: arch/powerpc/xmon/xmon.c:912:4: error: implicit declaration of function 'dump_tlb_44x' Signed-off-by: Michael Ellerman <[email protected]>
2014-11-12Merge branch 'topic/opal-ipmi' into nextMichael Ellerman3-0/+33
2014-11-12powerpc: Fix comment typos in arch/powerpc/include/asm/bitops.hBoqun Feng1-2/+2
In arch/powerpc/include/asm/bitops.h, the comments about bit numbers in large (> 1 word) bitmaps have two typos: - On ppc64 system, the LSB of the 4th word should be bit 192 rather than 196, because if it's bit 196, bit 192-195 will be missing in the bitmap. - On ppc32 system, the LSB of the second word should be bit 32 rather than 31, because bit 31 is already in the first word. This patch fixes these typos. Signed-off-by: Boqun Feng <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2014-11-12powerpc/powernv: Add OPAL IPMI interfaceJeremy Kerr3-0/+33
Recent OPAL firmare adds a couple of functions to send and receive IPMI messages: https://github.com/open-power/skiboot/commit/b2a374da This change updates the token list and wrappers to suit, and adds the platform devices for any IPMI interfaces. Signed-off-by: Jeremy Kerr <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2014-11-12powerpc: Fix compilation of emulate_step()Paul Mackerras1-2/+4
Commit be96f63375a1 ("powerpc: Split out instruction analysis part of emulate_step()") added some calls to do_fp_load() and do_fp_store(), which fail to compile on configs with CONFIG_PPC_FPU=n and CONFIG_PPC_EMULATE_SSTEP=y. This fixes the compile by adding #ifdef CONFIG_PPC_FPU around the code that calls these functions. Signed-off-by: Paul Mackerras <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2014-11-12powerpc: Save/restore PPR for KVM hypercallsSuresh E. Warrier1-1/+12
The system call FLIH (first-level interrupt handler) at 0xc00 unconditionally sets hardware priority to medium. For hypercalls, this means we lose guest OS priority. The front end (do_kvm_0x**) to the KVM interrupt handler always assumes that PPR priority is saved in PACA exception save area, so it copies this to the kvm_hstate structure. For hypercalls, this would be the saved priority from any previous exception. Eventually, the guest gets resumed with an incorrect priority. The fix is to save the PPR priority in PACA exception save area before switching HMT priorities in the FLIH so that existing code described above in the KVM interrupt handler can copy it from there into the VCPU's saved context. Signed-off-by: Suresh Warrier <[email protected]> Signed-off-by: Paul Mackerras <[email protected]> [mpe: Dropped HMT_MEDIUM_PPR_DISCARD and reworded comment] Signed-off-by: Michael Ellerman <[email protected]>
2014-11-12powerpc/mm: Use PAGE_FACTORGavin Shan1-2/+2
PAGE_FACTOR was defined to reflect the difference between configured page size and fixed 4KB page size. Replace (PAGE_SHIFT - HW_PAGE_SHIFT) with PAGE_FACTOR. Signed-off-by: Gavin Shan <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2014-11-12powerpc: Fix bad NULL pointer check in udbg_uart_getc_poll()Anton Blanchard1-1/+5
We have some code in udbg_uart_getc_poll() that tries to protect against a NULL udbg_uart_in, but gets it all wrong. Found with the LLVM static analyzer (scan-build). Fixes: 309257484cc1 ("powerpc: Cleanup udbg_16550 and add support for LPC PIO-only UARTs") Signed-off-by: Anton Blanchard <[email protected]> [mpe: Add some newlines for readability while we're here] Signed-off-by: Michael Ellerman <[email protected]>
2014-11-10powerpc/gamecube/wii: delete unneeded test before of_node_putJulia Lawall1-3/+3
Simplify the error path to avoid calling of_node_put when it is not needed. Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2014-11-10powerpc/pseries: delete unneeded test before of_node_putJulia Lawall1-2/+1
Of_node_put supports NULL as its argument, so the initial test is not necessary. Suggested by Uwe Kleine-König. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression e; @@ -if (e) of_node_put(e); // </smpl> Signed-off-by: Julia Lawall <[email protected]> Acked-by: Benjamin Herrenschmidt <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2014-11-10powerpc/mpc5xxx: delete unneeded test before of_node_putJulia Lawall1-2/+1
Of_node_put supports NULL as its argument, so the initial test is not necessary. Suggested by Uwe Kleine-König. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression e; @@ -if (e) of_node_put(e); // </smpl> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2014-11-10powerpc/fsl: fsl_soc: delete unneeded test before of_node_putJulia Lawall1-2/+1
Of_node_put supports NULL as its argument, so the initial test is not necessary. Suggested by Uwe Kleine-König. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression e; @@ -if (e) of_node_put(e); // </smpl> Signed-off-by: Julia Lawall <[email protected]> Acked-by: Benjamin Herrenschmidt <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2014-11-10powerpc/4xx/cpm: delete unneeded test before of_node_putJulia Lawall1-4/+4
Simplify the error path to avoid calling of_node_put when it is not needed. Signed-off-by: Julia Lawall <[email protected]> Acked-by: Benjamin Herrenschmidt <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2014-11-10powerpc/pseries: Quieten relocation on exceptions warningAnton Blanchard1-1/+5
The H_SET_MODE hcall returns H_P2 if a function is not implemented and all callers should handle this case. The call to enable relocation on exceptions currently prints an error message if the feature is not implemented. While H_SET_MODE was first introduced on POWER8 (which has relocation on exceptions), it has been now added on some POWER7 configurations (which does not). Check for H_P2 and print an informational message instead. Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2014-11-10powerpc/pseries: Quieten ibm,pcie-link-speed-stats warningAnton Blanchard1-1/+1
The ibm,pcie-link-speed-stats isn't mandatory, so we shouldn't print a high priority error message when missing. One example where we see this is QEMU. Reduce it to pr_debug. Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2014-11-10powerpc: LLVM complains about forward declaration of struct rtas_sensorsAnton Blanchard1-11/+9
Move the declaration up to silence the warning. Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2014-11-10powerpc: Remove double braces in alignment code.Anton Blanchard1-1/+1
Looks like I introduced this when adding LE support. Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2014-11-10powerpc: Don't use local named register variable in current_thread_infoAnton Blanchard1-3/+2
LLVM doesn't support local named register variables and is unlikely to. current_thread_info is using one, fix it by moving it out and calling it __current_r1(). I gave it a bit of an obscure name because we don't want anyone else using it - they should use current_stack_pointer(). This specific case is performance critical and we can't afford to call a function to get it. Furthermore it isn't important to know exactly where in the stack we are since we mask the lower bits. Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2014-11-10powerpc: Remove unused vgacon_remap_base & fix build breakMichael Ellerman2-8/+1
The build is broken with CONFIG_PPC32=y, CONFIG_FB_VGA16=y and CONFIG_VGA_CONSOLE=n. The problem is that vgacon_remap_base is not defined. It's used in: #define VGA_MAP_MEM(x,s) (x + vgacon_remap_base) Which is used in the vga16fb.c code. Digging down it seems vgacon_remap_base is never initialised. It used to be, back in arch/ppc (pplus.c and prep_setup.c), but none of that code ever made it to arch/powerpc. So given it's been unused for >6 years, remove it. Whether vga16fb.c works on 32-bit is another question, but this patch shouldn't affect it. Signed-off-by: Michael Ellerman <[email protected]>
2014-11-10powerpc/jump_label: Use HAVE_JUMP_LABELAnton Blanchard2-3/+3
Commit d4fe0965e208 ("powerpc/jump_label: use HAVE_JUMP_LABEL?") missed a few conversions. Change the remaining uses of CONFIG_JUMP_LABEL to HAVE_JUMP_LABEL. Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2014-11-10powerpc/boot: Parse chosen/cmdline-timeout parameterSimon Kagstrom3-6/+17
On some platforms a 5 second timeout during boot might be quite long, so make it configurable. Run the loop at least once to let the user stop the boot by holding a key pressed. If the timeout is set to 0, don't wait for input, which can be used as a workaround if the boot hangs on random data coming in on the serial port. Signed-off-by: Simon Kagstrom <[email protected]> [mpe: Changelog wording & whitespace] Signed-off-by: Michael Ellerman <[email protected]>
2014-11-10powerpc: Remove unused CPU_FTRS_A2Michael Ellerman1-6/+2
In commit fb5a515704d7 "Remove platforms/wsp and associated pieces" we removed the last user of CPU_FTRS_A2, so we should remove it too. Signed-off-by: Michael Ellerman <[email protected]>
2014-11-10powerpc: Remove CPU_FTR_HVMODE from CPU_FTRS_ALWAYSMichael Ellerman1-1/+1
We potentially clear CPU_FTR_HVMODE at runtime in __init_hvmode_206(), so we must make sure it's not set in CPU_FTRS_ALWAYS. This doesn't hurt us in practice at the moment, because we don't support compiling only for CPUs that support CPU_FTR_HVMODE. Signed-off-by: Michael Ellerman <[email protected]>
2014-11-10powerpc/ftrace: Fix obsolete commentJiri Slaby1-1/+1
CONFIG_MCOUNT is not defined anymore, the corresponding #ifdef there is CONFIG_FUNCTION_TRACER. Signed-off-by: Jiri Slaby <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2014-11-10powerpc: Remove unused devm_ioremap_prot()Kyle McMartin3-47/+0
Added in 2008, but has never had any in-tree users, and no other architectures provide it. Signed-off-by: Kyle McMartin <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2014-11-10powerpc/ftrace: simplify prepare_ftrace_returnAnton Blanchard3-50/+30
Instead of passing in the stack address of the link register to be modified, just pass in the old value and return the new value and rely on ftrace_graph_caller to do the modification. This removes the exception handling around the stack update - it isn't needed and we weren't consistent about it. Later on we would do an unprotected modification: if (!ftrace_graph_entry(&trace)) { *parent = old; Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2014-11-10powerpc/ftrace: Remove mod_return_to_handlerAnton Blanchard3-43/+4
mod_return_to_handler is the same as return_to_handler, except it handles the change of the TOC (r2). Add this into return_to_handler and remove mod_return_to_handler. Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2014-11-10powerpc: make __ffs return unsigned longAnton Blanchard2-2/+2
I'm seeing a build warning in mm/nobootmem.c after removing bootmem: mm/nobootmem.c: In function '__free_pages_memory': include/linux/kernel.h:713:17: warning: comparison of distinct pointer types lacks a cast [enabled by default] (void) (&_min1 == &_min2); \ ^ mm/nobootmem.c:90:11: note: in expansion of macro 'min' order = min(MAX_ORDER - 1UL, __ffs(start)); ^ The rest of the worlds seems to define __ffs as returning unsigned long, so lets do that. Signed-off-by: Anton Blanchard <[email protected]> Tested-by: Emil Medve <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2014-11-10powerpc: Move sparse_init() into initmem_initAnton Blanchard3-1/+3
We did part of sparse initialisation in setup_arch and part in initmem_init. Put them together. Signed-off-by: Anton Blanchard <[email protected]> Tested-by: Emil Medve <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2014-11-10powerpc: Remove superfluous bootmem includesAnton Blanchard26-26/+1
Lots of places included bootmem.h even when not using bootmem. Signed-off-by: Anton Blanchard <[email protected]> Tested-by: Emil Medve <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2014-11-10powerpc: Remove some old bootmem related commentsAnton Blanchard5-13/+6
Now bootmem is gone from powerpc we can remove comments mentioning it. Signed-off-by: Anton Blanchard <[email protected]> Tested-by: Emil Medve <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2014-11-10powerpc: Remove bootmem allocatorAnton Blanchard10-278/+47
At the moment we transition from the memblock alloctor to the bootmem allocator. Gitting rid of the bootmem allocator removes a bunch of complicated code (most of which I owe the dubious honour of being responsible for writing). Signed-off-by: Anton Blanchard <[email protected]> Tested-by: Emil Medve <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2014-11-05powerpc: Remove ppc_md.remove_memoryAnton Blanchard3-27/+12
We have an extra level of indirection on memory hot remove which is not matched on memory hot add. Memory hotplug is book3s only, so there is no need for it. This also enables means remove_memory() (ie memory hot unplug) works on powernv. Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2014-11-05powerpc: Remove ppc64_boot_msgAnton Blanchard2-39/+0
ppc64_boot_msg is meant to be a boot debug aid, but is only used in one spot. Get rid of it, and save ourseleves a couple of lines in the kernel log buffer. Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2014-11-05powerpc/pci: Quieten unset I/O resource warningAnton Blanchard1-1/+1
Newer POWER designs do not implement PCI I/O space, so we expect to see a number of these. Reduce the severity of the warning so it doesn't mask other real issues. Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2014-11-05powerpc: Use probe_kernel_address in show_instructionsAnton Blanchard1-6/+2
We really don't want to take a pagefault in show_instructions, so use probe_kernel_address instead of __get_user. Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2014-11-05Merge branch 'topic/get-cpu-var' into nextMichael Ellerman32-103/+108
2014-11-05Merge branch 'topic/pm-power-off' into nextMichael Ellerman21-58/+66
2014-11-04Merge branch 'for-linus' of ↵Linus Torvalds7-88/+163
git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux Pull powerpc fixes from Michael Ellerman: "Some more powerpc fixes if you please" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux: powerpc: use device_online/offline() instead of cpu_up/down() powerpc/powernv: Properly fix LPC debugfs endianness powerpc: do_notify_resume can be called with bad thread_info flags argument powerpc/fadump: Fix endianess issues in firmware assisted dump handling powerpc: Fix section mismatch warning
2014-11-04Merge tag 'ftracetest-3.18-rc1' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull ftracetest fix from Steven Rostedt: "Running the ftracetests on a machine that had the debugfs file system mounted in two locations caused the ftracetests to fail. This is because the ftracetests script does a grep of the /proc/mounts file to find where the debugfs file system is mounted. If it is mounted twice, then the grep returns two lines instead of just one. This causes the ftracetests to get confused and fail. Use "head -1" to only return the first mount point for debugfs" * tag 'ftracetest-3.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: ftracetest: Take the first debugfs mount found
2014-11-03Merge tag 'pinctrl-v3.18-2' of ↵Linus Torvalds2-2/+7
git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin-control fixes from Linus Walleij: "This kernel cycle has been calm for both pin control and GPIO so far but here are three pin control patches for you anyway, only really dealing with Baytrail: - Two fixes for the Baytrail driver affecting IRQs and output state in sysfs - Use the linux-gpio mailing list also for pinctrl patches" * tag 'pinctrl-v3.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: baytrail: show output gpio state correctly on Intel Baytrail pinctrl: use linux-gpio mailing list pinctrl: baytrail: Clear DIRECT_IRQ bit
2014-11-03Merge branch 'fixes-for-v3.18' of ↵Linus Torvalds2-28/+48
git://git.linaro.org/people/mszyprowski/linux-dma-mapping Pull CMA and DMA-mapping fixes from Marek Szyprowski: "This contains important fixes for recently introduced highmem support for default contiguous memory region used for dma-mapping subsystem" * 'fixes-for-v3.18' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping: mm, cma: make parameters order consistent in func declaration and definition mm: cma: Use %pa to print physical addresses mm: cma: Ensure that reservations never cross the low/high mem boundary mm: cma: Always consider a 0 base address reservation as dynamic mm: cma: Don't crash on allocation if CMA area can't be activated
2014-11-03Merge branch 'for-linus' of ↵Linus Torvalds3-32/+38
git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client Pull ceph fixes from Sage Weil: "There is a GFP flag fix from Mike Christie, an error code fix from Jan, and fixes for two unnecessary allocations (kmalloc and workqueue) from Ilya. All are well tested. Ilya has one other fix on the way but it didn't get tested in time" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: libceph: eliminate unnecessary allocation in process_one_ticket() rbd: Fix error recovery in rbd_obj_read_sync() libceph: use memalloc flags for net IO rbd: use a single workqueue for all devices
2014-11-03Merge branch 'for-linus' of ↵Linus Torvalds3-1/+3
git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k update from Geert Uytterhoeven. Just wiring up the bpf system call. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: Wire up bpf