summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* powerpc/mm: Warn on flushing tlb page in kernel contextArseny Solokha2015-02-041-1/+5
| | | | | | | | Function __flush_tlb_page() must only be called for user contexts, so put in extra hardening to warn on calling it for kernel context. Signed-off-by: Arseny Solokha <asolokha@kb.kras.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* powerpc/powernv: Add OPAL soft-poweroff routineJoel Stanley2015-02-043-2/+67
| | | | | | | | | | | Register a notifier for a OPAL message indicating that the machine should prepare itself for a graceful power off. OPAL will tell us if the power off is a reboot or shutdown, but for now we perform the same orderly_poweroff action. Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* Merge branch 'next' of ↵Michael Ellerman2015-02-0438-426/+1011
|\ | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux into next Freescale updates from Scott: "Highlights include 8xx optimizations, some more work on datapath device tree content, e300 machine check support, t1040 corenet error reporting, and various cleanups and fixes."
| * powerpc/mm: bail out early when flushing TLB pageArseny Solokha2015-01-301-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | MMU_NO_CONTEXT is conditionally defined as 0 or (unsigned int)-1. However, in __flush_tlb_page() a corresponding variable is only tested for open coded 0, which can cause NULL pointer dereference if `mm' argument was legitimately passed as such. Bail out early in case the first argument is NULL, thus eliminate confusion between different values of MMU_NO_CONTEXT and avoid disabling and then re-enabling preemption unnecessarily. Signed-off-by: Arseny Solokha <asolokha@kb.kras.ru> Signed-off-by: Scott Wood <scottwood@freescale.com>
| * powerpc: defconfigs: add MTD_SPI_NOR (new dependency for M25P80)Brian Norris2015-01-293-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These defconfigs contain the CONFIG_M25P80 symbol, which is now dependent on the MTD_SPI_NOR symbol. Add CONFIG_MTD_SPI_NOR to satisfy the new dependency. At the same time, drop the now-nonexistent CONFIG_MTD_CHAR symbol. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Scott Wood <scottwood@freescale.com>
| * perf/powerpc: reset event hw state when adding it to the PMUAlexandru-Cezar Sardan2015-01-291-1/+3
| | | | | | | | | | | | | | | | | | When adding an event to the PMU with PERF_EF_START the STOPPED and UPTODATE flags need to be cleared in the hw.event status variable because they are preventing the update of the event count on overflow interrupt. Signed-off-by: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
| * powerpc/qe: Use strlcpy()Rickard Strandqvist2015-01-291-3/+3
| | | | | | | | | | | | | | | | | | Replace strcpy and strncpy with strlcpy to avoid strings that are too big, or lack null termination. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> [scottwood@freescale.com: cleaned up commit message] Signed-off-by: Scott Wood <scottwood@freescale.com>
| * PowerPC-83xx: Deletion of an unnecessary check before the function call ↵Markus Elfring2015-01-291-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 <elfring@users.sourceforge.net> Signed-off-by: Scott Wood <scottwood@freescale.com>
| * powerpc: dts: pq3/85xx: Fix GPIO addressAlessio Igor Bogani2015-01-291-3/+3
| | | | | | | | | | | | | | Fix the GPIO address in the device tree to match the documented location. Signed-off-by: Alessio Igor Bogani <alessio.bogani@elettra.eu> Signed-off-by: Scott Wood <scottwood@freescale.com>
| * powerpc/mpc85xx: Create dts components for the FSL QorIQ DPAA QManKumar Gala2015-01-293-0/+183
| | | | | | | | | | | | | | | | | | | | Change-Id: I16e63db731e55a3d60d4e147573c1af8718082d3 Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Geoff Thorpe <Geoff.Thorpe@freescale.com> Signed-off-by: Hai-Ying Wang <Haiying.Wang@freescale.com> [Emil Medve: Sync with the upstream binding] Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
| * powerpc/mpc85xx: Create dts components for the FSL QorIQ DPAA BManKumar Gala2015-01-292-0/+131
| | | | | | | | | | | | | | | | | | Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Geoff Thorpe <Geoff.Thorpe@freescale.com> Signed-off-by: Hai-Ying Wang <Haiying.Wang@freescale.com> [Emil Medve: Sync with the upstream binding] Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
| * dt/bindings: b/qman: Add phandle to the portalsEmil Medve2015-01-292-0/+20
| | | | | | | | | | | | | | This supports SoC(s) with multiple B/QMan instances Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
| * dt/bindings: b/qman: Fix the alloc-ranges in the example(s)Emil Medve2015-01-292-3/+3
| | | | | | | | | | | | | | 'ranges' are specified as <base size> not as <start end> Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
| * memory/fsl-corenet-cf: Add t1040 supportScott Wood2015-01-291-2/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | T1040 has a different version of corenet-cf, despite being incorrectly labelled with a fsl,corenet2-cf compatible. The t1040 version of corenet-cf has a version register that can be read to distinguish. The t4240/b4860 version officially does not, but testing shows that it does and has a different value, so use that. If somehow this ends up not being reliable and we treat a t4240/b4860 as a t1040 (the reverse should not happen, as t1040's version register is official), currently the worst that should happen is writing to reserved bits to enable events that don't exist. The changes to the t1040 version of corenet-cf that this driver cares about are the addition of two new error events. There are also changes to the format of cecar2, which is printed, but not interpreted, by this driver. Signed-off-by: Scott Wood <scottwood@freescale.com>
| * powerpc/85xx: Add support for Emerson/Artesyn MVME2500.Alessio Igor Bogani2015-01-295-3/+374
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for the Artesyn MVME2500 Single Board Computer. The MVME2500 is a 6U form factor VME64 computer with: - A single Freescale QorIQ P2010 CPU - 1 GB of DDR3 onboard memory - Three Gigabit Ethernets - Five 16550 compatible UARTS - One USB 2.0 port, one SHDC socket and one SATA connector - One PCI/PCI eXpress Mezzanine Card (PMC/XMC) Slot - MultiProcessor Interrupt Controller (MPIC) - A DS1375T Real Time Clock (RTC) and 512 KB of Non-Volatile Memory - Two 64 KB EEPROMs - U-Boot in 16 SPI Flash This patch is based on linux-3.18 and has been boot tested. Signed-off-by: Alessio Igor Bogani <alessio.bogani@elettra.eu> Signed-off-by: Scott Wood <scottwood@freescale.com>
| * powerpc/mpc85xx: Add ranges to etsec2 nodesScott Wood2015-01-293-0/+3
| | | | | | | | | | | | | | | | | | | | | | Commit 746c9e9f92dd "of/base: Fix PowerPC address parsing hack" limited the applicability of the workaround whereby a missing ranges is treated as an empty ranges. This workaround was hiding a bug in the etsec2 device tree nodes, which have children with reg, but did not have ranges. Signed-off-by: Scott Wood <scottwood@freescale.com> Reported-by: Alexander Graf <agraf@suse.de>
| * powerpc/config: Enable MDIO supportAndy Fleming2015-01-292-0/+5
| | | | | | | | | | | | | | | | Also, enable Vitesse PHY and fixed PHY support. Signed-off-by: Andy Fleming <afleming@gmail.com> Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
| * powerpc: Add machine_check cpu function for e300c3 cpusEsben Haabendal2015-01-291-0/+1
| | | | | | | | | | Signed-off-by: Esben Haabendal <eha@deif.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
| * powerpc/8xx: Remove duplicated code in set_context()LEROY Christophe2015-01-291-6/+4
| | | | | | | | | | Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Scott Wood <scottwood@freescale.com>
| * powerpc/8xx: Optimise access to swapper_pg_dirLEROY Christophe2015-01-291-16/+19
| | | | | | | | | | | | | | | | | | All accessed to PGD entries are done via 0(r11). By using lower part of swapper_pg_dir as load index to r11, we can remove the ori instruction. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Scott Wood <scottwood@freescale.com>
| * powerpc/8xx: Take benefit of aligned PGDIRLEROY Christophe2015-01-291-19/+15
| | | | | | | | | | | | | | | | L1 base address is now aligned so we can insert L1 index into r11 directly and then preserve r10 Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Scott Wood <scottwood@freescale.com>
| * powerpc32: Use kmem_cache memory for PGDIRLEROY Christophe2015-01-292-2/+18
| | | | | | | | | | | | | | | | | | When pages are not 4K, PGDIR table is allocated with kmalloc(). In order to optimise TLB handlers, aligned memory is needed. kmalloc() doesn't provide aligned memory blocks, so lets use a kmem_cache pool instead. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Scott Wood <scottwood@freescale.com>
| * powerpc/8xx: remove tests on PGDIR entry validityLEROY Christophe2015-01-291-33/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Kernel MMU handling code handles validity of entries via _PMD_PRESENT which corresponds to V bit in MD_TWC and MI_TWC. When the V bit is not set, MPC8xx triggers TLBError exception. So we don't have to check that and branch ourself to TLBError. We can set TLB entries with non present entries, remove all those tests and let the 8xx handle it. This reduce the number of cycle when the entries are valid which is the case most of the time, and doesn't significantly increase the time for handling invalid entries. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Scott Wood <scottwood@freescale.com>
| * powerpc/8xx: remove remaining unnecessary code in FixupDARLEROY Christophe2015-01-291-6/+0
| | | | | | | | | | | | | | | | Since commit 33fb845a6f01 ("powerpc/8xx: Don't use MD_TWC for walk"), MD_EPN and MD_TWC are not writen anymore in FixupDAR so saving r3 has become useless. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Scott Wood <scottwood@freescale.com>
| * powerpc/8xx: reduce pressure on TLB due to context switchesLEROY Christophe2015-01-291-1/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For nohash powerpc, when we run out of contexts, contexts are freed by stealing used contexts in-turn. When a victim has been selected, the associated TLB entries are freed using _tlbil_pid(). Unfortunatly, on the PPC 8xx, _tlbil_pid() does a tlbia, hence flushes ALL TLB entries and not only the one linked to the stolen context. Therefore, as implented today, at each task switch requiring a new context, all entries are flushed. This patch modifies the implementation so that when running out of contexts, all contexts get freed at once, hence dividing the number of calls to tlbia by 16. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Scott Wood <scottwood@freescale.com>
| * power/fsl: add MDIO dt binding for FManShaohui Xie2015-01-291-0/+70
| | | | | | | | | | | | | | | | This binding is for FMan MDIO, it covers FMan v2 & FMan v3. Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com> [scottwood@freescale.com: mark interrupts required only for external] Signed-off-by: Scott Wood <scottwood@freescale.com>
| * powerpc/8xx: use _PAGE_RO instead of _PAGE_RWLEROY Christophe2015-01-293-14/+9
| | | | | | | | | | | | | | | | On powerpc 8xx, in TLB entries, 0x400 bit is set to 1 for read-only pages and is set to 0 for RW pages. So we should use _PAGE_RO instead of _PAGE_RW Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Scott Wood <scottwood@freescale.com>
| * powerpc32: adds handling of _PAGE_ROLEROY Christophe2015-01-294-14/+28
| | | | | | | | | | | | | | | | | | | | Some powerpc like the 8xx don't have a RW bit in PTE bits but a RO (Read Only) bit. This patch implements the handling of a _PAGE_RO flag to be used in place of _PAGE_RW Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> [scottwood@freescale.com: fix whitespace] Signed-off-by: Scott Wood <scottwood@freescale.com>
| * powerpc/perf: fix fsl_emb_pmu_start to write correct pmc valueTom Huynh2015-01-291-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | PMCs on PowerPC increases towards 0x80000000 and triggers an overflow interrupt when the msb is set to collect a sample. Therefore, to setup for the next sample collection, pmu_start should set the pmc value to 0x80000000 - left instead of left which incorrectly delays the next overflow interrupt. Same as commit 9a45a9407c69 ("powerpc/perf: power_pmu_start restores incorrect values, breaking frequency events") for book3s. Signed-off-by: Tom Huynh <tom.huynh@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
| * powerpc: Remove duplicate tlbcam_index declarationsEmil Medve2015-01-292-3/+0
| | | | | | | | | | | | | | | | They seem to be leftovers from '14cf11a powerpc: Merge enough to start building in arch/powerpc' Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
| * powerpc/dts: Remove T4240 emulator supportEmil Medve2015-01-291-281/+0
| | | | | | | | | | | | | | Probably we should have not upstreamed this in the first place Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
| * powerpc/fsl_pci: Fix pci stack build bug with FRAME_WARNKim Phillips2015-01-293-15/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix this: CC arch/powerpc/sysdev/fsl_pci.o arch/powerpc/sysdev/fsl_pci.c: In function 'fsl_pcie_check_link': arch/powerpc/sysdev/fsl_pci.c:91:1: error: the frame size of 1360 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] when configuring FRAME_WARN, by refactoring indirect_read_config() to take hose and bus number instead of the 1344-byte struct pci_bus. Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* | powerpc/perf/hv-24x7: Document sysfs event description entriesCody P Schafer2015-02-021-0/+22
| | | | | | | | | | | | Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com> Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* | powerpc/perf/hv-gpci: add the remaining gpci requestsCody P Schafer2015-02-021-1/+186
| | | | | | | | | | | | | | | | | | | | Add the remaining gpci requests that contain counters suitable for use by perf. Omit those that don't contain any counters (but note their ommision). Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com> Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* | powerpc/perf/{hv-gpci, hv-common}: generate requests with counters annotatedCody P Schafer2015-02-0210-30/+316
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds (in req-gen/) a framework for defining gpci counter requests. It uses macro magic similar to ftrace. Also convert the existing hv-gpci request structures and enum values to use the new framework (and adjust old users of the structs and enum values to cope with changes in naming). In exchange for this macro disaster, we get autogenerated event listing for GPCI in sysfs, build time field offset checking, and zero duplication of information about GPCI requests. Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com> Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* | powerpc/perf/hv-24x7: parse catalog and populate sysfs with eventsCody P Schafer2015-02-024-17/+841
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Retrieves and parses the 24x7 catalog on POWER systems that supply it (right now, only POWER 8). Events are exposed via sysfs in the standard fashion, and are all parameterized. $ cd /sys/bus/event_source/devices/hv_24x7/events $ cat HPM_CS_FROM_L4_LDATA__PHYS_CORE domain=0x2,offset=0xd58,core=?,lpar=0x0 $ cat HPM_TLBIE__VCPU_HOME_CHIP domain=0x4,offset=0x358,vcpu=?,lpar=? where user is required to specify values for the fields with '?' (like core, vcpu, lpar above), when specifying the event with the perf tool. Catalog is (at the moment) only parsed on boot. It needs re-parsing when a some hypervisor events occur. At that point we'll also need to prevent old events from continuing to function (counter that is passed in via spare space in the config values?). Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com> Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* | perf: define EVENT_DEFINE_RANGE_FORMAT_LITE helpersukadev@linux.vnet.ibm.com2015-02-021-0/+10
| | | | | | | | | | | | | | | | Define a lite version of the EVENT_DEFINE_RANGE_FORMAT() that avoids defining helper functions for the bit-field ranges. Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* | perf: add PMU_EVENT_ATTR_STRING() helperCody P Schafer2015-02-021-0/+7
| | | | | | | | | | | | | | | | | | Helper for constructing static struct perf_pmu_events_attr s. Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com> Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Acked-by: Jiri Olsa <jolsa@redhat.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* | perf: provide sysfs_show for struct perf_pmu_events_attrCody P Schafer2015-02-022-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | (struct perf_pmu_events_attr) is defined in include/linux/perf_event.h, but the only "show" for it is in x86 and contains x86 specific stuff. Make a generic one for those of us who are just using the event_str. Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com> Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Acked-by: Jiri Olsa <jolsa@redhat.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* | powerpc/kernel: Avoid initializing device-tree pointer twiceGavin Shan2015-02-021-3/+0
| | | | | | | | | | | | | | | | | | | | | | As commit 50ba08f3 ("of/fdt: Don't clear initial_boot_params if fdt_check_header() fails") does, the device-tree pointer "initial_boot_params" is initialized by early_init_dt_verify(), which is called by early_init_devtree(). So we needn't explicitly initialize that again in early_init_devtree(). Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* | powerpc: Remove old compile time disabled syscall tracing codeMichael Ellerman2015-02-023-104/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have code to do syscall tracing which is disabled at compile time by default. It's not been touched since the dawn of time (ie. v2.6.12). There are now better ways to do syscall tracing, ie. using the raw_syscall, or syscall tracepoints. For the specific case of tracing syscalls at boot on a system that doesn't get to userspace, you can boot with: trace_event=syscalls tp_printk=on Which will trace syscalls from boot, and echo all output to the console. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* | powerpc/kernel: Make syscall_exit a local labelMichael Ellerman2015-02-021-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently when we back trace something that is in a syscall we see something like this: [c000000000000000] [c000000000000000] SyS_read+0x6c/0x110 [c000000000000000] [c000000000000000] syscall_exit+0x0/0x98 Although it's entirely correct, seeing syscall_exit at the bottom can be confusing - we were exiting from a syscall and then called SyS_read() ? If we instead change syscall_exit to be a local label we get something more intuitive: [c0000001fa46fde0] [c00000000026719c] SyS_read+0x6c/0x110 [c0000001fa46fe30] [c000000000009264] system_call+0x38/0xd0 ie. we were handling a system call, and it was SyS_read(). Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* | cxl: Fix device_node reference countingRyan Grimm2015-02-023-5/+5
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When unbinding and rebinding the driver on a system with a card in PHB0, this error condition is reached after a few attempts: ERROR: Bad of_node_put() on /pciex@3fffe40000000 CPU: 0 PID: 3040 Comm: bash Not tainted 3.18.0-rc3-12545-g3627ffe #152 Call Trace: [c000000721acb5c0] [c00000000086ef94] .dump_stack+0x84/0xb0 (unreliable) [c000000721acb640] [c00000000073a0a8] .of_node_release+0xd8/0xe0 [c000000721acb6d0] [c00000000044bc44] .kobject_release+0x74/0xe0 [c000000721acb760] [c0000000007394fc] .of_node_put+0x1c/0x30 [c000000721acb7d0] [c000000000545cd8] .cxl_probe+0x1a98/0x1d50 [c000000721acb900] [c0000000004845a0] .local_pci_probe+0x40/0xc0 [c000000721acb980] [c000000000484998] .pci_device_probe+0x128/0x170 [c000000721acba30] [c00000000052400c] .driver_probe_device+0xac/0x2a0 [c000000721acbad0] [c000000000522468] .bind_store+0x108/0x160 [c000000721acbb70] [c000000000521448] .drv_attr_store+0x38/0x60 [c000000721acbbe0] [c000000000293840] .sysfs_kf_write+0x60/0xa0 [c000000721acbc50] [c000000000292500] .kernfs_fop_write+0x140/0x1d0 [c000000721acbcf0] [c000000000208648] .vfs_write+0xd8/0x260 [c000000721acbd90] [c000000000208b18] .SyS_write+0x58/0x100 [c000000721acbe30] [c000000000009258] syscall_exit+0x0/0x98 We are missing a call to of_node_get(). pnv_pci_to_phb_node() should call of_node_get() otherwise np's reference count isn't incremented and it might go away. Rename pnv_pci_to_phb_node() to pnv_pci_get_phb_node() so it's clear it calls of_node_get(). Signed-off-by: Ryan Grimm <grimm@linux.vnet.ibm.com> Acked-by: Ian Munsie <imunsie@au1.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* powerpc/powernv: Don't alloc IRQ map if necessaryGavin Shan2015-01-281-3/+4
| | | | | | | | | | | | On PowerNV platform, the OPAL interrupts are exported by firmware through device-node property (/ibm,opal::opal-interrupts). Under some extreme circumstances (e.g. simulator), we don't have this property found from the device tree. For that case, we shouldn't allocate the interrupt map. Otherwise, slab complains allocating zero sized memory chunk. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* powerpc/powernv: Separate function for OPAL IRQ setupGavin Shan2015-01-281-20/+41
| | | | | | | | | | | | | | | The patch put the OPAL interrupt setup logic in opal_init() into seperate function opal_irq_init() for easier code maintaining. The patch doesn't introduce logic changes except: * Rename variable names. * Release virtual IRQ upon error from request_irq(). * Don't cache the virtual IRQ to opal_irqs[] upon error from request_irq(). Suggested-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* powerpc/powernv: Remove "opal" prefix from pr_xxx()sMichael Ellerman2015-01-281-6/+6
| | | | | | | | | | | | | In commit c8742f85125d "powerpc/powernv: Expose OPAL firmware symbol map" I added pr_fmt() to opal.c. This left some existing pr_xxx()s with duplicate "opal" prefixes, eg: opal: opal: Found 0 interrupts reserved for OPAL Fix them all up. Also make the "Not not found" message a bit more verbose. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* powerpc: Remove some unused functionsMichael Ellerman2015-01-285-70/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove slice_set_psize() which is not used. It was added in 3a8247cc2c85 "powerpc: Only demote individual slices rather than whole process" but was never used. Remove vsx_assist_exception() which is not used. It was added in ce48b2100785 "powerpc: Add VSX context save/restore, ptrace and signal support" but was never used. Remove generic_mach_cpu_die() which is not used. Its last caller was removed in 375f561a4131 "powerpc/powernv: Always go into nap mode when CPU is offline". Remove mpc7448_hpc2_power_off() and mpc7448_hpc2_halt() which are unused. These were introduced in c5d56332fd6c "[POWERPC] Add general support for mpc7448hpc2 (Taiga) platform" but were never used. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> [mpe: Update changelog with details on when/why they are unused] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* powerpc/lib: Makefile, use obj64-y to consolidate 64-bit rulesMichael Ellerman2015-01-281-11/+9
| | | | Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* powerpc/lib: Makefile, consolidate obj-y sectionsMichael Ellerman2015-01-281-4/+3
| | | | Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* powerpc/mm: fix undefined reference to `.__kernel_map_pages' on FSL PPC64Kim Phillips2015-01-281-0/+1
| | | | | | | | | | | | | | | | | | | | arch/powerpc has __kernel_map_pages implementations in mm/pgtable_32.c, and mm/hash_utils_64.c, of which the former is built for PPC32, and the latter for PPC64 machines with PPC_STD_MMU. Fix arch/powerpc/Kconfig to not select ARCH_SUPPORTS_DEBUG_PAGEALLOC when CONFIG_PPC_STD_MMU_64 isn't defined, i.e., for 64-bit book3e builds to use the generic __kernel_map_pages() in mm/debug-pagealloc.c. LD init/built-in.o mm/built-in.o: In function `kernel_map_pages': include/linux/mm.h:2076: undefined reference to `.__kernel_map_pages' include/linux/mm.h:2076: undefined reference to `.__kernel_map_pages' include/linux/mm.h:2076: undefined reference to `.__kernel_map_pages' Makefile:925: recipe for target 'vmlinux' failed make: *** [vmlinux] Error 1 Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>