aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-03-31powerpc/powernv: handle OPAL_SUCCESS return in opal_sensor_readCédric Le Goater1-12/+20
Currently, when a sensor value is read, the kernel calls OPAL, which in turn builds a message for the FSP, and waits for a message back. The new device tree for OPAL sensors [1] adds new sensors that can be read synchronously (core temperatures for instance) and that don't need to wait for a response. This patch modifies the opal call to accept an OPAL_SUCCESS return value and cover the case above. [1] https://lists.ozlabs.org/pipermail/skiboot/2015-March/000639.html Signed-off-by: Cédric Le Goater <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-03-31powerpc/powernv: convert codes returned by OPAL callsCédric Le Goater3-2/+25
OPAL has its own list of return codes. The patch provides a translation of such codes in errnos for the opal_sensor_read call, and possibly others if needed. Signed-off-by: Cédric Le Goater <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-03-31powerpc: Use bool function return values of true/false not 1/0Joe Perches4-6/+6
Use the normal return values for bool functions Signed-off-by: Joe Perches <[email protected]> Acked-by: Benjamin Herrenschmidt <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-03-31powerpc/powernv: Don't map M64 segments using M32DTGavin Shan1-1/+2
If M64 has been supported, the prefetchable 64-bits memory resources shouldn't be mapped to the corresponding PE# via M32DT. Unfortunately, we're doing that in pnv_ioda_setup_pe_seg() wrongly. The issue was introduced by commit 262af55 ("powerpc/powernv: Enable M64 aperatus for PHB3"). The patch fixes the issue by simply skipping M64 resources when updating to M32DT. Cc: <[email protected]> # v3.17+ Signed-off-by: Gavin Shan <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2015-03-31powerpc/eeh: Fix PE#0 check in eeh_add_to_parent_pe()Gavin Shan1-6/+7
The function eeh_add_parent_pe() is used to create a PE or add one edev to its parent PE. Current code checks if PE#0 is valid for the later case. Actually, we should validate PE#0 for both cases when EEH core regards PE#0 as invalid one (without flag EEH_VALID_PE_ZERO). Otherwise, not all EEH devices can be added to its parent PE#0 for EEH on P7IOC. The patch fixes the issue by validating PE#0 for the two cases. So far, we don't have PE#0 for EEH on P7IOC, but it will show up when we enable M64 for P7IOC. The patch also makes the error message more meaningful. Signed-off-by: Gavin Shan <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2015-03-28selftests/powerpc: Add a test of the switch_endian() syscallMichael Ellerman6-1/+214
This adds a test of the switch_endian() syscall we added in the previous commit. We test it by calling the endian switch syscall, and then executing some code in the other endian to check everything went as expected. That code checks registers we expect to be maintained are. If the endian switch failed to happen that code sequence will be illegal and cause the test to abort. We then switch back to the original endian, do the same checks and finally write a success message and exit(0). Signed-off-by: Michael Ellerman <[email protected]>
2015-03-28powerpc: Add a proper syscall for switching endiannessMichael Ellerman8-1/+30
We currently have a "special" syscall for switching endianness. This is syscall number 0x1ebe, which is handled explicitly in the 64-bit syscall exception entry. That has a few problems, firstly the syscall number is outside of the usual range, which confuses various tools. For example strace doesn't recognise the syscall at all. Secondly it's handled explicitly as a special case in the syscall exception entry, which is complicated enough without it. As a first step toward removing the special syscall, we need to add a regular syscall that implements the same functionality. The logic is simple, it simply toggles the MSR_LE bit in the userspace MSR. This is the same as the special syscall, with the caveat that the special syscall clobbers fewer registers. This version clobbers r9-r12, XER, CTR, and CR0-1,5-7. Signed-off-by: Michael Ellerman <[email protected]>
2015-03-28powerpc/pseries: Simplify check for suspendability during suspend/migrationTyrel Datwyler3-20/+17
During suspend/migration operation we must wait for the VASI state reported by the hypervisor to become Suspending prior to making the ibm,suspend-me RTAS call. Calling routines to rtas_ibm_supend_me() pass a vasi_state variable that exposes the VASI state to the caller. This is unnecessary as the caller only really cares about the following three conditions; if there is an error we should bailout, success indicating we have suspended and woken back up so proceed to device tree update, or we are not suspendable yet so try calling rtas_ibm_suspend_me again shortly. This patch removes the extraneous vasi_state variable and simply uses the return code to communicate how to proceed. We either succeed, fail, or get -EAGAIN in which case we sleep for a second before trying to call rtas_ibm_suspend_me again. The behaviour of ppc_rtas() remains the same, but migrate_store() now returns the propogated error code on failure. Previously -1 was returned from migrate_store() in the failure case which equates to -EPERM and was clearly wrong. Signed-off-by: Tyrel Datwyler <[email protected]> Cc: Nathan Fontenont <[email protected]> Cc: Cyril Bur <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-03-27cxl: Fix a typo in ABI documentationPhilippe Bergheaud1-1/+1
Fix the attribute name of the configuration record class ID. Signed-off-by: Philippe Bergheaud <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-03-27powerpc/perf: add missing put_cpu_var in power_pmu_event_initJan Stancek1-1/+3
One path in power_pmu_event_init() calls get_cpu_var(), but is missing matching call to put_cpu_var(), which causes preemption imbalance and crash in user-space: Page fault in user mode with in_atomic() = 1 mm = c000001fefa5a280 NIP = 3fff9bf2cae0 MSR = 900000014280f032 Oops: Weird page fault, sig: 11 [#23] SMP NR_CPUS=2048 NUMA PowerNV Modules linked in: <snip> CPU: 43 PID: 10285 Comm: a.out Tainted: G D 4.0.0-rc5+ #1 task: c000001fe82c9200 ti: c000001fe835c000 task.ti: c000001fe835c000 NIP: 00003fff9bf2cae0 LR: 00003fff9bee4898 CTR: 00003fff9bf2cae0 REGS: c000001fe835fea0 TRAP: 0401 Tainted: G D (4.0.0-rc5+) MSR: 900000014280f032 <SF,HV,VEC,VSX,EE,PR,FP,ME,IR,DR,RI> CR: 22000028 XER: 00000000 CFAR: 00003fff9bee4894 SOFTE: 1 GPR00: 00003fff9bee494c 00003fffe01c2ee0 00003fff9c084410 0000000010020068 GPR04: 0000000000000000 0000000000000002 0000000000000008 0000000000000001 GPR08: 0000000000000001 00003fff9c074a30 00003fff9bf2cae0 00003fff9bf2cd70 GPR12: 0000000052000022 00003fff9c10b700 NIP [00003fff9bf2cae0] 0x3fff9bf2cae0 LR [00003fff9bee4898] 0x3fff9bee4898 Call Trace: ---[ end trace 5d3d952b5d4185d4 ]--- BUG: sleeping function called from invalid context at kernel/locking/rwsem.c:41 in_atomic(): 1, irqs_disabled(): 0, pid: 10285, name: a.out INFO: lockdep is turned off. CPU: 43 PID: 10285 Comm: a.out Tainted: G D 4.0.0-rc5+ #1 Call Trace: [c000001fe835f990] [c00000000089c014] .dump_stack+0x98/0xd4 (unreliable) [c000001fe835fa10] [c0000000000e4138] .___might_sleep+0x1d8/0x2e0 [c000001fe835faa0] [c000000000888da8] .down_read+0x38/0x110 [c000001fe835fb30] [c0000000000bf2f4] .exit_signals+0x24/0x160 [c000001fe835fbc0] [c0000000000abde0] .do_exit+0xd0/0xe70 [c000001fe835fcb0] [c00000000001f4c4] .die+0x304/0x450 [c000001fe835fd60] [c00000000088e1f4] .do_page_fault+0x2d4/0x900 [c000001fe835fe30] [c000000000008664] handle_page_fault+0x10/0x30 note: a.out[10285] exited with preempt_count 1 Reproducer: #include <stdio.h> #include <unistd.h> #include <syscall.h> #include <sys/types.h> #include <sys/stat.h> #include <linux/perf_event.h> #include <linux/hw_breakpoint.h> static struct perf_event_attr event = { .type = PERF_TYPE_RAW, .size = sizeof(struct perf_event_attr), .sample_type = PERF_SAMPLE_BRANCH_STACK, .branch_sample_type = PERF_SAMPLE_BRANCH_ANY_RETURN, }; int main() { syscall(__NR_perf_event_open, &event, 0, -1, -1, 0); } Signed-off-by: Jan Stancek <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-03-26Merge branch 'next-misc' of ↵Michael Ellerman13-168/+71
git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc into test Merge miscellaneous bits from benh. Fix a minor conflict with OpalMessageType changing names to opal_msg_type.
2015-03-26powerpc/powernv: Avoid explicit endian conversions while parsing device treePreeti U Murthy1-15/+20
We currently read the information about idle states from the device tree, so as to find out the CPU idle states supported by the platform. Use the of_property_read/count_xxx() APIs, which handle endian conversions for us, and mean we don't need any endian annotations in the code. Signed-off-by: Preeti U Murthy <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-03-26ps3: Fix trivial typos in comment and debug messageYannick Guerrini1-2/+2
Change 'prosessor' to 'processor' Change 'set_inteval' to 'set_interval' Signed-off-by: Yannick Guerrini <[email protected]> Acked-by: Geoff Levand <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-03-26powerpc/mm: Free string after creating kmem cacheYanjiang Jin1-0/+1
kmem_cache_create()->kmem_cache_create_memcg()->kstrdup() allocates new space and copys name's content, so it is safe to free name memory after calling kmem_cache_create(). Else kmemleak will report the below warning: unreferenced object 0xc0000000f9002160 (size 16): comm "swapper/0", pid 0, jiffies 4294892296 (age 1386.640s) hex dump (first 16 bytes): 70 67 74 61 62 6c 65 2d 32 5e 39 00 de ad be ef pgtable-2^9..... backtrace: [<c0000000004e03ec>] .kvasprintf+0x5c/0xa0 [<c0000000004e045c>] .kasprintf+0x2c/0x50 [<c00000000002e36c>] .pgtable_cache_add+0xac/0x100 [<c00000000002e3e4>] .pgtable_cache_init+0x24/0x80 [<c000000000c6c67c>] .start_kernel+0x228/0x4c8 [<c000000000000594>] .start_here_common+0x24/0x90 Signed-off-by: Yanjiang Jin <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-03-25powerpc/powernv: Add OPAL message notifier unregister functionNeelesh Gupta2-0/+9
Provide an unregister interface for the opal message notifiers to be called when not needed like during driver unload/remove. Signed-off-by: Neelesh Gupta <[email protected]> Reviewed-by: Vasant Hegde <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2015-03-25powerpc/powernv: Fix the overflow of OPAL message notifiers head arrayNeelesh Gupta1-8/+4
Fixes the condition check of incoming message type which can otherwise shoot beyond the message notifiers head array. Signed-off-by: Neelesh Gupta <[email protected]> Reviewed-by: Vasant Hegde <[email protected]> Reviewed-by: Anshuman Khandual <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2015-03-25powerpc/pmac: replace current->state by set_current_state()Fabian Frederick1-2/+2
Use helper functions to access current->state. Direct assignments are prone to races and therefore buggy. current->state = TASK_RUNNING can be replaced by __set_current_state() Thanks to Peter Zijlstra for the exact definition of the problem. Suggested-By: Peter Zijlstra <[email protected]> Signed-off-by: Fabian Frederick <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2015-03-25cpufreq/ppc: Add missing #include <asm/smp.h>Geert Uytterhoeven1-0/+1
If CONFIG_SMP=n, <linux/smp.h> does not include <asm/smp.h>, causing: drivers/cpufreq/ppc-corenet-cpufreq.c: In function 'corenet_cpufreq_cpu_init': drivers/cpufreq/ppc-corenet-cpufreq.c:173:3: error: implicit declaration of function 'get_hard_smp_processor_id' [-Werror=implicit-funcuresh E. Warrier" <[email protected]> X-Patchwork-Id: 443703 Message-Id: <[email protected]> To: [email protected] Date: Wed, 25 Feb 2015 17:23:53 -0600 Export __spin_yield so that the arch_spin_unlock() function can be invoked from a module. This will be required for modules where we want to take a lock that is also is acquired in hypervisor real mode. Because we want to avoid running any lockdep code (which may not be safe in real mode), this lock needs to be an arch_spinlock_t instead of a normal spinlock. Signed-off-by: Suresh Warrier <[email protected]> Acked-by: Paul Mackerras <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2015-03-25powerpc/pmac: Fix DT refcount imbalance in pmac_pic_probe_oldstyleGeert Uytterhoeven1-0/+3
Internally, of_find_node_by_name() calls of_node_put() on its "from" parameter, which must not be done on "master", as it's still in use, and will be released manually later. This may cause a zero kref refcount. Call of_node_get() before to compensate for this. Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2015-03-25drivers/macintosh: Delete an unnecessary check before the function call ↵Markus Elfring1-2/+1
"of_node_put" The of_node_put() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2015-03-25powerpc/powernv: Support OPAL requested heartbeatBenjamin Herrenschmidt1-0/+30
If OPAL requests it, call it back via opal_poll_events() at a regular interval. Some versions of OPAL on some machines require this to operate some internal timeouts properly. Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2015-03-25powerpc/powernv: Check image loaded or not before calling flashVasant Hegde1-1/+5
Present code checks for update_flash_data in opal_flash_term_callback(). update_flash_data has been statically initialized to zero, and that is the value of FLASH_IMG_READY. Also code update initialization happens during subsys init. So if reboot is issued before the subsys init stage then we endup displaying "Flashing new firmware" message.. which may confuse end user. This patch fixes above described issue by initializes update_flash status to invalid state. Reported-by: Sam Bobroff <[email protected]> Signed-off-by: Vasant Hegde <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2015-03-24powerpc: Remove unused st_le*() and ld_le* functionsDavid Gibson1-26/+0
The powerpc specific st_le*() and ld_le*() functions in arch/powerpc/asm/swab.h no longer have any users. They are also misleadingly named, since they always byteswap, even on a little-endian host. This patch removes them. Signed-off-by: David Gibson <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2015-03-24powerpc: Cleanup KVM emulated load/store endian handlingDavid Gibson2-21/+19
Sometimes the KVM code on powerpc needs to emulate load or store instructions from the guest, which can include both normal and byte reversed forms. We currently (AFAICT) handle this correctly, but some variable names are very misleading. In particular we use "is_bigendian" in several places to actually mean "is the IO the same endian as the host", but we now support little-endian powerpc hosts. This also ties into the misleadingly named ld_le*() and st_le*() functions, which in fact always byteswap, even on an LE host. This patch cleans this up by renaming to more accurate "host_swabbed", and uses the generic swab*() functions instead of the powerpc specific and misleadingly named ld_le*() and st_le*() functions. Signed-off-by: David Gibson <[email protected]> Reviewed-by: Alexander Graf <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2015-03-24powerpc: Remove arch specific byteswappers from the MXC MMC driverDavid Gibson1-1/+1
When the MXC MMUC driver is used on a Freescale MPC512x machine, it contains some additional byteswapping code (I'm assuming this is a workaround for a hardware defect). This uses the ppc specific st_le32() function, but there's no reason not to use the generic swab32() function instead. gcc is capable of generating the efficient ppc byte-reversing load/store instructions without the arch-specific helper. This patch, therefore, switches to the generic byteswap routine. Cc: Shawn Guo <[email protected]> Cc: Sascha Hauer <[email protected]> Signed-off-by: David Gibson <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2015-03-24media/bt8xx: Remove old powerpc cruftBenjamin Herrenschmidt2-23/+0
The powerpc arch code enables PCI_COMMAND_MEMORY (and has done so for more than 10 years at least !) on pci_enable_device() and the hackery on the MMIO accessor is useless as well, our writel does everything this driver should need. Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2015-03-24powerpc/eeh: Remove device_node dependencyGavin Shan9-81/+55
The patch removes struct eeh_dev::dn and the corresponding helper functions: eeh_dev_to_of_node() and of_node_to_eeh_dev(). Instead, eeh_dev_to_pdn() and pdn_to_eeh_dev() should be used to get the pdn, which might contain device_node on PowerNV platform. Signed-off-by: Gavin Shan <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2015-03-24powerpc/eeh: Replace device_node with pci_dn in eeh_opsGavin Shan5-97/+87
There are 3 EEH operations whose arguments contain device_node: read_config(), write_config() and restore_config(). The patch replaces device_node with pci_dn. Signed-off-by: Gavin Shan <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2015-03-24powerpc/eeh: Do probe on pci_dnGavin Shan8-138/+172
Originally, EEH core probes on device_node or pci_dev to populate EEH devices and PEs, which conflicts with the fact: SRIOV VFs are usually enabled and created by PF's driver and they don't have the corresponding device_nodes. Instead, SRIOV VFs have dynamically created pci_dn, which can be used for EEH probe. The patch reworks EEH probe for PowerNV and pSeries platforms to do probing based on pci_dn, instead of pci_dev or device_node any more. Signed-off-by: Gavin Shan <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2015-03-24powerpc/eeh: Create eeh_dev from pci_dn instead of device_nodeGavin Shan6-11/+69
The patch adds function traverse_pci_dn(), which is similar to traverse_pci_devices() except it takes pci_dn, not device_node as parameter. The pci_dev.c has been reworked to create eeh_dev from pci_dn, instead of device_node. Signed-off-by: Gavin Shan <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2015-03-24powerpc/pci: Trace more information from pci_dnGavin Shan2-0/+13
Originally, EEH probes on device_node or pci_dev and populates the corresponding eeh_dev. In the subsequent patches, EEH will probes on pci_dn and populates the corresponding eeh_dev. So we have to cache some information in pci_dn, either from device_node or SRIOV PF's enablement platform hook, to populate the eeh_dev properly. The motivation to probe pci_dn, instead of device node or pci_dev, to populate eeh_dev is SRIOV VFs are dynamically created and we don't have the corresponding device nodes for them. Signed-off-by: Gavin Shan <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2015-03-24powerpc/powernv: Use pci_dn, not device_node, in PCI config accessorGavin Shan3-47/+40
The PCI config accessors previously relied on device_node. Unfortunately, VFs don't have a corresponding device_node, so change the accessors to use pci_dn instead. [bhelgaas: changelog] Signed-off-by: Gavin Shan <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2015-03-24powerpc/pci: Refactor pci_dnGavin Shan3-6/+141
Currently, the PCI config accessors are implemented based on device node. Unfortunately, SRIOV VFs won't have the corresponding device nodes. pci_dn will be used in replacement with device node for SRIOV VFs. So we have to use pci_dn in PCI config accessors. The patch refactors pci_dn in following aspects to make it ready to be used in PCI config accessors as we do in subsequent patch: * pci_dn is organized as a hierarchy tree. PCI device's pci_dn is put to the child list of pci_dn of its upstream bridge or PHB. VF's pci_dn will be put to the child list of pci_dn of PF's bridge. * For one particular PCI device (VF or not), its pci_dn can be found from pdev->dev.archdata.pci_data, PCI_DN(devnode), or parent's list. The fast path (fetching pci_dn through PCI device instance) is populated during early fixup time. [bhelgaas: changelog] Signed-off-by: Gavin Shan <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2015-03-24net/ethernet/sfc: Don't use of_node_to_eeh_dev()Benjamin Herrenschmidt2-5/+2
This is deprecated, it forces the driver to hop via the OF node that may or may not exist, instead use pci_dev_to_eeh_dev() which is simpler. Signed-off-by: Benjamin Herrenschmidt <[email protected]> Acked-by: Shradha Shah <[email protected]>
2015-03-23powerpc: Enable power monitor feature in defconfig for supported platformsHongtao Jia2-0/+2
Signed-off-by: Jia Hongtao <[email protected]> Signed-off-by: Scott Wood <[email protected]>
2015-03-23powerpc: Enable thermal monitor feature in defconfig for supported platformsHongtao Jia4-5/+4
Signed-off-by: Jia Hongtao <[email protected]> Signed-off-by: Scott Wood <[email protected]>
2015-03-23powerpc/corenet: Enable muxing MDIO buses via FPGAShruti Kanetkar3-0/+8
Signed-off-by: Andy Fleming <[email protected]> Signed-off-by: Shaohui Xie <[email protected]> Signed-off-by: Shruti Kanetkar <[email protected]> Signed-off-by: Emil Medve <[email protected]> Signed-off-by: Scott Wood <[email protected]>
2015-03-23powerpc/corenet: Enable muxing MDIO buses via GPIOAndy Fleming3-0/+5
Signed-off-by: Andy Fleming <[email protected]> Signed-off-by: Shaohui Xie <[email protected]> Signed-off-by: Shruti Kanetkar <[email protected]> Signed-off-by: Emil Medve <[email protected]> Signed-off-by: Scott Wood <[email protected]>
2015-03-23powerpc/mpc85xx: Add FSL QorIQ DPAA BMan support to device tree(s)Kumar Gala26-22/+899
Signed-off-by: Kumar Gala <[email protected]> Signed-off-by: Geoff Thorpe <[email protected]> Signed-off-by: Hai-Ying Wang <[email protected]> Signed-off-by: Chunhe Lan <[email protected]> Signed-off-by: Poonam Aggrwal <[email protected]> [Emil Medve: Sync with the upstream binding] Signed-off-by: Emil Medve <[email protected]> Signed-off-by: Scott Wood <[email protected]>
2015-03-23powerpc: Make corenet64_defconfig a bit more usefulBenjamin Herrenschmidt1-0/+8
CONFIG_BLK_DEV_SD, SR, ... are needed for pretty much any SATA or USB storage device (corenet32_defconfig has them) and modern any with systemd needs the CGROUPS gunk. Signed-off-by: Benjamin Herrenschmidt <[email protected]> Signed-off-by: Scott Wood <[email protected]>
2015-03-23powerpc/85xx: workaround for chips with MSI hardware errataHongtao Jia2-3/+28
The MPIC version 2.0 has a MSI errata (errata PIC1 of mpc8544), It causes that neither MSI nor MSI-X can work fine. This is a workaround to allow MSI-X to function properly. Signed-off-by: Liu Shuo <[email protected]> Signed-off-by: Li Yang <[email protected]> Signed-off-by: Jia Hongtao <[email protected]> Signed-off-by: Scott Wood <[email protected]>
2015-03-23powerpc/mpic: Add get_version API both for internal and external useHongtao Jia2-0/+13
MPIC version is useful information for both mpic_alloc() and mpic_init(). The patch provide an API to get MPIC version for reusing the code. Also, some other IP block may need MPIC version for their own use. The API for external use is also provided. This function had been previously added but was removed by commit 5e86bfde9cd93f2 ("powerpc/mpic: remove unused functions") due to the lack of a user. This function will be used by "powerpc/mpic: Add get_version API both for internal and external use". Signed-off-by: Jia Hongtao <[email protected]> Signed-off-by: Li Yang <[email protected]> [[email protected]: changelog update] Signed-off-by: Scott Wood <[email protected]>
2015-03-23powerpc/mpc85xx: Add FMan platform supportIgal Liberman2-0/+4
Get the FMan devices/sub-nodes (MAC, MDIO, etc.) auto-probed Signed-off-by: Igal Liberman <[email protected]> Signed-off-by: Scott Wood <[email protected]>
2015-03-23powerpc/dts: Remove B4860 emulator supportEmil Medve1-223/+0
Probably we should have not upstreamed this in the first place Signed-off-by: Emil Medve <[email protected]> Signed-off-by: Scott Wood <[email protected]>
2015-03-24powerpc/pseries: Introduce api_version to migration sysfs interfaceTyrel Datwyler1-1/+16
The /sys/kernel/mobility/migration interface was added all the way back in 2.6.37. However, the drmgr userspace tool was never augmented to use this interface to perfrom migrations. Instead it has continued using a faux rtas call coupled with performing the device tree update processing in userspace and communicating it back to the kernel via the ugly /proc/ppc64/ofdt interface. Up until 3.12 the device tree update code in the kernel was badly broken and bit rotting. This code was fixed in 3.12 and is now utilized by the kernel suspend code as of 3.15. The kernel is now better suited to handle the post-mobility fixup of the device tree and drmgr should be transitioned to using the sysfs migration interface. This patch introduces the api_version sysfs file to /sys/kernel/mobility as a means for drmgr to query the current implementation level of the kernel migration code. This initial versioning indicates it is capable of perfroming all current PAPR requirements for migration including the post-mobility firmware activation and device tree update. Signed-off-by: Tyrel Datwyler <[email protected]> Cc: Nathan Fontenot <[email protected]> Cc: Cyril Bur <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-03-23powerpc/32: %pF is only for function pointersScott Wood1-1/+1
Use %pS for actual addresses, otherwise you'll get bad output on arches like ppc64 where %pF expects a function descriptor. Even on other architectures, refrain from setting a bad example that people copy. Signed-off-by: Scott Wood <[email protected]> Cc: [email protected] Signed-off-by: Michael Ellerman <[email protected]>
2015-03-23powerpc: use kbuild generic-y where possibleFabian Frederick4-5/+3
Replace one line asm-generic include files declared in arch/powerpc/include/asm/ by generic-y declaration which creates arch/powerpc/include/generated/asm equivalent. Signed-off-by: Fabian Frederick <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-03-23powerpc/powernv: Fix return value from power7_nap() et al.Paul Mackerras1-0/+1
The power7_nap(), power7_sleep() and power7_winkle() functions are called from pnv_smp_cpu_kill_self(), which expects them to return the SRR1 value set by the hardware on wakeup, or 0 if no nap/sleep/winkle occurred. However, in the case where an interrupt needs to be replayed, the logic in power7_powersave_common (the common code for power7_nap et al.) doesn't set r3 to 0 in this case. Instead what we get as the return value is the selector for the type of power-saving mode requested (1, 2 or 3). In fact this should not affect the operation of pnv_smp_cpu_kill_self(), but it is better to get this correct, so this adds an instruction to set r3 to 0 in this case. Signed-off-by: Paul Mackerras <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-03-23powerpc: Spelling s/embeeded/embedded/Geert Uytterhoeven1-1/+1
Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-03-23powerpc: Convert relocs_check to a shell script using grepStephen Rothwell3-68/+61
This runs a bit faster and removes another use of perl from the kernel build. Signed-off-by: Stephen Rothwell <[email protected]> Acked-By: Tony Breeds <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>