diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-11 21:15:38 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-11 21:15:38 -0500 |
| commit | d3f180ea1a44aecba1b0dab2a253428e77f906bf (patch) | |
| tree | 0be6eaf1eb3fd32c934bd070a3d758696f417c93 /arch/powerpc/sysdev | |
| parent | 6b00f7efb5303418c231994c91fb8239f5ada260 (diff) | |
| parent | a6130ed253a931d2169c26ab0958d81b0dce4d6e (diff) | |
Merge tag 'powerpc-3.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux
Pull powerpc updates from Michael Ellerman:
- Update of all defconfigs
- Addition of a bunch of config options to modernise our defconfigs
- Some PS3 updates from Geoff
- Optimised memcmp for 64 bit from Anton
- Fix for kprobes that allows 'perf probe' to work from Naveen
- Several cxl updates from Ian & Ryan
- Expanded support for the '24x7' PMU from Cody & Sukadev
- 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"
* tag 'powerpc-3.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux: (102 commits)
cxl: Add missing return statement after handling AFU errror
cxl: Fail AFU initialisation if an invalid configuration record is found
cxl: Export optional AFU configuration record in sysfs
powerpc/mm: Warn on flushing tlb page in kernel context
powerpc/powernv: Add OPAL soft-poweroff routine
powerpc/perf/hv-24x7: Document sysfs event description entries
powerpc/perf/hv-gpci: add the remaining gpci requests
powerpc/perf/{hv-gpci, hv-common}: generate requests with counters annotated
powerpc/perf/hv-24x7: parse catalog and populate sysfs with events
perf: define EVENT_DEFINE_RANGE_FORMAT_LITE helper
perf: add PMU_EVENT_ATTR_STRING() helper
perf: provide sysfs_show for struct perf_pmu_events_attr
powerpc/kernel: Avoid initializing device-tree pointer twice
powerpc: Remove old compile time disabled syscall tracing code
powerpc/kernel: Make syscall_exit a local label
cxl: Fix device_node reference counting
powerpc/mm: bail out early when flushing TLB page
powerpc: defconfigs: add MTD_SPI_NOR (new dependency for M25P80)
perf/powerpc: reset event hw state when adding it to the PMU
powerpc/qe: Use strlcpy()
...
Diffstat (limited to 'arch/powerpc/sysdev')
| -rw-r--r-- | arch/powerpc/sysdev/fsl_pci.c | 11 | ||||
| -rw-r--r-- | arch/powerpc/sysdev/indirect_pci.c | 25 | ||||
| -rw-r--r-- | arch/powerpc/sysdev/mpic.c | 2 | ||||
| -rw-r--r-- | arch/powerpc/sysdev/ppc4xx_hsta_msi.c | 2 | ||||
| -rw-r--r-- | arch/powerpc/sysdev/qe_lib/qe.c | 6 | ||||
| -rw-r--r-- | arch/powerpc/sysdev/xics/xics-common.c | 2 |
6 files changed, 27 insertions, 21 deletions
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c index 271b67e7670c..4b74c276e427 100644 --- a/arch/powerpc/sysdev/fsl_pci.c +++ b/arch/powerpc/sysdev/fsl_pci.c | |||
| @@ -68,13 +68,10 @@ static int fsl_pcie_check_link(struct pci_controller *hose) | |||
| 68 | u32 val = 0; | 68 | u32 val = 0; |
| 69 | 69 | ||
| 70 | if (hose->indirect_type & PPC_INDIRECT_TYPE_FSL_CFG_REG_LINK) { | 70 | if (hose->indirect_type & PPC_INDIRECT_TYPE_FSL_CFG_REG_LINK) { |
| 71 | if (hose->ops->read == fsl_indirect_read_config) { | 71 | if (hose->ops->read == fsl_indirect_read_config) |
| 72 | struct pci_bus bus; | 72 | __indirect_read_config(hose, hose->first_busno, 0, |
| 73 | bus.number = hose->first_busno; | 73 | PCIE_LTSSM, 4, &val); |
| 74 | bus.sysdata = hose; | 74 | else |
| 75 | bus.ops = hose->ops; | ||
| 76 | indirect_read_config(&bus, 0, PCIE_LTSSM, 4, &val); | ||
| 77 | } else | ||
| 78 | early_read_config_dword(hose, 0, 0, PCIE_LTSSM, &val); | 75 | early_read_config_dword(hose, 0, 0, PCIE_LTSSM, &val); |
| 79 | if (val < PCIE_LTSSM_L0) | 76 | if (val < PCIE_LTSSM_L0) |
| 80 | return 1; | 77 | return 1; |
diff --git a/arch/powerpc/sysdev/indirect_pci.c b/arch/powerpc/sysdev/indirect_pci.c index 1f6c570d66d4..692de9dbc680 100644 --- a/arch/powerpc/sysdev/indirect_pci.c +++ b/arch/powerpc/sysdev/indirect_pci.c | |||
| @@ -20,31 +20,31 @@ | |||
| 20 | #include <asm/pci-bridge.h> | 20 | #include <asm/pci-bridge.h> |
| 21 | #include <asm/machdep.h> | 21 | #include <asm/machdep.h> |
| 22 | 22 | ||
| 23 | int indirect_read_config(struct pci_bus *bus, unsigned int devfn, | 23 | int __indirect_read_config(struct pci_controller *hose, |
| 24 | int offset, int len, u32 *val) | 24 | unsigned char bus_number, unsigned int devfn, |
| 25 | int offset, int len, u32 *val) | ||
| 25 | { | 26 | { |
| 26 | struct pci_controller *hose = pci_bus_to_host(bus); | ||
| 27 | volatile void __iomem *cfg_data; | 27 | volatile void __iomem *cfg_data; |
| 28 | u8 cfg_type = 0; | 28 | u8 cfg_type = 0; |
| 29 | u32 bus_no, reg; | 29 | u32 bus_no, reg; |
| 30 | 30 | ||
| 31 | if (hose->indirect_type & PPC_INDIRECT_TYPE_NO_PCIE_LINK) { | 31 | if (hose->indirect_type & PPC_INDIRECT_TYPE_NO_PCIE_LINK) { |
| 32 | if (bus->number != hose->first_busno) | 32 | if (bus_number != hose->first_busno) |
| 33 | return PCIBIOS_DEVICE_NOT_FOUND; | 33 | return PCIBIOS_DEVICE_NOT_FOUND; |
| 34 | if (devfn != 0) | 34 | if (devfn != 0) |
| 35 | return PCIBIOS_DEVICE_NOT_FOUND; | 35 | return PCIBIOS_DEVICE_NOT_FOUND; |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | if (ppc_md.pci_exclude_device) | 38 | if (ppc_md.pci_exclude_device) |
| 39 | if (ppc_md.pci_exclude_device(hose, bus->number, devfn)) | 39 | if (ppc_md.pci_exclude_device(hose, bus_number, devfn)) |
| 40 | return PCIBIOS_DEVICE_NOT_FOUND; | 40 | return PCIBIOS_DEVICE_NOT_FOUND; |
| 41 | 41 | ||
| 42 | if (hose->indirect_type & PPC_INDIRECT_TYPE_SET_CFG_TYPE) | 42 | if (hose->indirect_type & PPC_INDIRECT_TYPE_SET_CFG_TYPE) |
| 43 | if (bus->number != hose->first_busno) | 43 | if (bus_number != hose->first_busno) |
| 44 | cfg_type = 1; | 44 | cfg_type = 1; |
| 45 | 45 | ||
| 46 | bus_no = (bus->number == hose->first_busno) ? | 46 | bus_no = (bus_number == hose->first_busno) ? |
| 47 | hose->self_busno : bus->number; | 47 | hose->self_busno : bus_number; |
| 48 | 48 | ||
| 49 | if (hose->indirect_type & PPC_INDIRECT_TYPE_EXT_REG) | 49 | if (hose->indirect_type & PPC_INDIRECT_TYPE_EXT_REG) |
| 50 | reg = ((offset & 0xf00) << 16) | (offset & 0xfc); | 50 | reg = ((offset & 0xf00) << 16) | (offset & 0xfc); |
| @@ -77,6 +77,15 @@ int indirect_read_config(struct pci_bus *bus, unsigned int devfn, | |||
| 77 | return PCIBIOS_SUCCESSFUL; | 77 | return PCIBIOS_SUCCESSFUL; |
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | int indirect_read_config(struct pci_bus *bus, unsigned int devfn, | ||
| 81 | int offset, int len, u32 *val) | ||
| 82 | { | ||
| 83 | struct pci_controller *hose = pci_bus_to_host(bus); | ||
| 84 | |||
| 85 | return __indirect_read_config(hose, bus->number, devfn, offset, len, | ||
| 86 | val); | ||
| 87 | } | ||
| 88 | |||
| 80 | int indirect_write_config(struct pci_bus *bus, unsigned int devfn, | 89 | int indirect_write_config(struct pci_bus *bus, unsigned int devfn, |
| 81 | int offset, int len, u32 val) | 90 | int offset, int len, u32 val) |
| 82 | { | 91 | { |
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index c4648ad5c1f3..bbfbbf2025fd 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c | |||
| @@ -1929,7 +1929,7 @@ int __init smp_mpic_probe(void) | |||
| 1929 | 1929 | ||
| 1930 | DBG("smp_mpic_probe()...\n"); | 1930 | DBG("smp_mpic_probe()...\n"); |
| 1931 | 1931 | ||
| 1932 | nr_cpus = cpumask_weight(cpu_possible_mask); | 1932 | nr_cpus = num_possible_cpus(); |
| 1933 | 1933 | ||
| 1934 | DBG("nr_cpus: %d\n", nr_cpus); | 1934 | DBG("nr_cpus: %d\n", nr_cpus); |
| 1935 | 1935 | ||
diff --git a/arch/powerpc/sysdev/ppc4xx_hsta_msi.c b/arch/powerpc/sysdev/ppc4xx_hsta_msi.c index ed9970ff8d94..f366d2d4c079 100644 --- a/arch/powerpc/sysdev/ppc4xx_hsta_msi.c +++ b/arch/powerpc/sysdev/ppc4xx_hsta_msi.c | |||
| @@ -145,7 +145,7 @@ static int hsta_msi_probe(struct platform_device *pdev) | |||
| 145 | ppc4xx_hsta_msi.address = mem->start; | 145 | ppc4xx_hsta_msi.address = mem->start; |
| 146 | ppc4xx_hsta_msi.data = ioremap(mem->start, resource_size(mem)); | 146 | ppc4xx_hsta_msi.data = ioremap(mem->start, resource_size(mem)); |
| 147 | ppc4xx_hsta_msi.irq_count = irq_count; | 147 | ppc4xx_hsta_msi.irq_count = irq_count; |
| 148 | if (IS_ERR(ppc4xx_hsta_msi.data)) { | 148 | if (!ppc4xx_hsta_msi.data) { |
| 149 | dev_err(dev, "Unable to map memory\n"); | 149 | dev_err(dev, "Unable to map memory\n"); |
| 150 | return -ENOMEM; | 150 | return -ENOMEM; |
| 151 | } | 151 | } |
diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c index 1f29cee8da7b..c2518cdb7ddb 100644 --- a/arch/powerpc/sysdev/qe_lib/qe.c +++ b/arch/powerpc/sysdev/qe_lib/qe.c | |||
| @@ -497,7 +497,7 @@ int qe_upload_firmware(const struct qe_firmware *firmware) | |||
| 497 | * saved microcode information and put in the new. | 497 | * saved microcode information and put in the new. |
| 498 | */ | 498 | */ |
| 499 | memset(&qe_firmware_info, 0, sizeof(qe_firmware_info)); | 499 | memset(&qe_firmware_info, 0, sizeof(qe_firmware_info)); |
| 500 | strcpy(qe_firmware_info.id, firmware->id); | 500 | strlcpy(qe_firmware_info.id, firmware->id, sizeof(qe_firmware_info.id)); |
| 501 | qe_firmware_info.extended_modes = firmware->extended_modes; | 501 | qe_firmware_info.extended_modes = firmware->extended_modes; |
| 502 | memcpy(qe_firmware_info.vtraps, firmware->vtraps, | 502 | memcpy(qe_firmware_info.vtraps, firmware->vtraps, |
| 503 | sizeof(firmware->vtraps)); | 503 | sizeof(firmware->vtraps)); |
| @@ -583,8 +583,8 @@ struct qe_firmware_info *qe_get_firmware_info(void) | |||
| 583 | /* Copy the data into qe_firmware_info*/ | 583 | /* Copy the data into qe_firmware_info*/ |
| 584 | sprop = of_get_property(fw, "id", NULL); | 584 | sprop = of_get_property(fw, "id", NULL); |
| 585 | if (sprop) | 585 | if (sprop) |
| 586 | strncpy(qe_firmware_info.id, sprop, | 586 | strlcpy(qe_firmware_info.id, sprop, |
| 587 | sizeof(qe_firmware_info.id) - 1); | 587 | sizeof(qe_firmware_info.id)); |
| 588 | 588 | ||
| 589 | prop = of_find_property(fw, "extended-modes", NULL); | 589 | prop = of_find_property(fw, "extended-modes", NULL); |
| 590 | if (prop && (prop->length == sizeof(u64))) { | 590 | if (prop && (prop->length == sizeof(u64))) { |
diff --git a/arch/powerpc/sysdev/xics/xics-common.c b/arch/powerpc/sysdev/xics/xics-common.c index 365249cd346b..125743b58c70 100644 --- a/arch/powerpc/sysdev/xics/xics-common.c +++ b/arch/powerpc/sysdev/xics/xics-common.c | |||
| @@ -148,7 +148,7 @@ int __init xics_smp_probe(void) | |||
| 148 | /* Register all the IPIs */ | 148 | /* Register all the IPIs */ |
| 149 | xics_request_ipi(); | 149 | xics_request_ipi(); |
| 150 | 150 | ||
| 151 | return cpumask_weight(cpu_possible_mask); | 151 | return num_possible_cpus(); |
| 152 | } | 152 | } |
| 153 | 153 | ||
| 154 | #endif /* CONFIG_SMP */ | 154 | #endif /* CONFIG_SMP */ |
