linux-next: manual merge of the powerpc-mpe tree with the powerpc tree
Hi all, Today's linux-next merge of the powerpc-mpe tree got a conflict in arch/powerpc/include/asm/machdep.h between commit 6e628c7d33d9 ("powerpc/powernv: Reserve additional space for IOV BAR according to the number of total_pe") from the tree and commit 467efc2e4fdc ("powerpc: Remove shims for pci_controller_ops operations") from the powerpc-mpe tree. I fixed it up (see below) and can carry the fix as necessary (no action is required). -- Cheers, Stephen Rothwells...@canb.auug.org.au diff --cc arch/powerpc/include/asm/machdep.h index 1b268044f290,5c19ac527a8e.. --- a/arch/powerpc/include/asm/machdep.h +++ b/arch/powerpc/include/asm/machdep.h @@@ -240,21 -236,6 +236,11 @@@ struct machdep_calls /* Called after scan and before resource survey */ void (*pcibios_fixup_phb)(struct pci_controller *hose); - /* Called during PCI resource reassignment */ - resource_size_t (*pcibios_window_alignment)(struct pci_bus *, unsigned long type); - - /* Reset the secondary bus of bridge */ - void (*pcibios_reset_secondary_bus)(struct pci_dev *dev); - +#ifdef CONFIG_PCI_IOV + void (*pcibios_fixup_sriov)(struct pci_dev *pdev); + resource_size_t (*pcibios_iov_resource_alignment)(struct pci_dev *, int resno); +#endif /* CONFIG_PCI_IOV */ + /* Called to shutdown machine specific hardware not already controlled * by other drivers. */ pgpaYzNFEsCf9.pgp Description: OpenPGP digital signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
linux-next: manual merge of the powerpc-mpe tree with the powerpc tree
Hi all, Today's linux-next merge of the powerpc-mpe tree got a conflict in arch/powerpc/platforms/powernv/pci-ioda.c between commit 6e628c7d33d9 ("powerpc/powernv: Reserve additional space for IOV BAR according to the number of total_pe") from the powerpc tree and commit 65ebf4b6370e ("powerpc/powernv: Move controller ops from ppc_md to controller_ops") from the powerpc-mpe tree. I fixed it up (see below) and can carry the fix as necessary (no action is required). -- Cheers, Stephen Rothwells...@canb.auug.org.au diff --cc arch/powerpc/platforms/powernv/pci-ioda.c index 5ac7c60a8801,5e917753c672.. --- a/arch/powerpc/platforms/powernv/pci-ioda.c +++ b/arch/powerpc/platforms/powernv/pci-ioda.c @@@ -2808,13 -2103,9 +2809,13 @@@ static void __init pnv_pci_init_ioda_ph * the child P2P bridges) can form individual PE. */ ppc_md.pcibios_fixup = pnv_pci_ioda_fixup; - ppc_md.pcibios_enable_device_hook = pnv_pci_enable_device_hook; - ppc_md.pcibios_window_alignment = pnv_pci_window_alignment; - ppc_md.pcibios_reset_secondary_bus = pnv_pci_reset_secondary_bus; + pnv_pci_controller_ops.enable_device_hook = pnv_pci_enable_device_hook; + pnv_pci_controller_ops.window_alignment = pnv_pci_window_alignment; + pnv_pci_controller_ops.reset_secondary_bus = pnv_pci_reset_secondary_bus; +#ifdef CONFIG_PCI_IOV + ppc_md.pcibios_fixup_sriov = pnv_pci_ioda_fixup_iov_resources; + ppc_md.pcibios_iov_resource_alignment = pnv_pci_iov_resource_alignment; +#endif /* CONFIG_PCI_IOV */ pci_add_flags(PCI_REASSIGN_ALL_RSRC); /* Reset IODA tables to a clean state */ pgpckdZBTjkUG.pgp Description: OpenPGP digital signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: linux-next: manual merge of the powerpc-mpe tree with the powerpc tree
Hi, On Mon, 13 Apr 2015 14:09:13 +0800 Wei Yang wrote: > > Hi, Stephen, > > Thanks for your finding :-) Your fix looks good to me. > > Michael & Ben, > > Do I need to rebase the patch or what should I do? You should have nothing to do, Michael has fixed it up when he merged Ben's tree into his. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpyBK4cU3M6J.pgp Description: OpenPGP digital signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
linux-next: manual merge of the kselftest tree with the powerpc-mpe tree
Hi Shuah, Today's linux-next merge of the kselftest tree got a conflict in tools/testing/selftests/powerpc/tm/Makefile between commit 7fe924d9d71c ("selftests/powerpc: Add transactional syscall test") from the powerpc-mpe tree and commit 6faeeea44b84 ("selftests: Add install support for the powerpc tests") from the kselftest tree. I fixed it up (see below) and can carry the fix as necessary (no action is required). -- Cheers, Stephen Rothwells...@canb.auug.org.au diff --cc tools/testing/selftests/powerpc/tm/Makefile index 122cf1830de8,34f2ec634b40.. --- a/tools/testing/selftests/powerpc/tm/Makefile +++ b/tools/testing/selftests/powerpc/tm/Makefile @@@ -1,18 -1,10 +1,13 @@@ - PROGS := tm-resched-dscr tm-syscall -TEST_PROGS := tm-resched-dscr ++TEST_PROGS := tm-resched-dscr tm-syscall - all: $(PROGS) + all: $(TEST_PROGS) - $(PROGS): ../harness.c + $(TEST_PROGS): ../harness.c +tm-syscall: tm-syscall-asm.S +tm-syscall: CFLAGS += -mhtm + - run_tests: all - @-for PROG in $(PROGS); do \ - ./$$PROG; \ - done; + include ../../lib.mk clean: - rm -f $(PROGS) *.o - - .PHONY: all run_tests clean + rm -f $(TEST_PROGS) *.o pgpWsCe_BQRE7.pgp Description: OpenPGP digital signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
linux-next: build failure after merge of the akpm-current tree
Hi Andrew, After merging the akpm-current tree, today's linux-next build (powerpc ppc64_defconfig) failed like this: arch/powerpc/kernel/setup_64.c: In function 'disable_hardlockup_detector': arch/powerpc/kernel/setup_64.c:796:2: error: implicit declaration of function 'watchdog_enable_hardlockup_detector' [-Werror=implicit-function-declaration] watchdog_enable_hardlockup_detector(false); ^ Caused by commit 069bb95b9e38 ("watchdog: introduce the hardlockup_detector_disable() function") interacting with commit c54b2bf1b5e9 ("powerpc: Add ppc64 hard lockup detector support") from the powerpc-mpe tree. I applied the following merge fix patch (hopefully that is all that is required): From: Stephen Rothwell Date: Mon, 13 Apr 2015 21:18:01 +1000 Subject: [PATCH] powerpc: merge fix for watchdog_enable_hardlockup_detector API change Signed-off-by: Stephen Rothwell --- arch/powerpc/kernel/setup_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index 7551e5692597..c69671c03c3b 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c @@ -793,7 +793,7 @@ u64 hw_nmi_get_sample_period(int watchdog_thresh) */ static int __init disable_hardlockup_detector(void) { - watchdog_enable_hardlockup_detector(false); + hardlockup_detector_disable(); return 0; } -- 2.1.4 -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpNfI1O_QrHh.pgp Description: OpenPGP digital signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 2/2] powerpc: Disable building the 32-bit VDSO on little endian
Hi Michael, On Tue, 21 Apr 2015 19:41:52 +1000 Michael Ellerman wrote: > > The only little endian configuration we support is ppc64le. As such if > we're building little endian we don't need a 32-bit VDSO, because there > is no 32-bit userspace. > > This patch is a fairly ugly mess of #ifdefs, but is the minimal logic > required to disable the 32-bit VDSO. We can hopefully clean up the > result in future with some further refactoring. > > Signed-off-by: Michael Ellerman > --- > arch/powerpc/kernel/Makefile | 3 ++- > arch/powerpc/kernel/signal_32.c| 11 -- > arch/powerpc/kernel/vdso.c | 38 > +- > arch/powerpc/perf/callchain.c | 5 + > arch/powerpc/platforms/Kconfig.cputype | 10 + > 5 files changed, 63 insertions(+), 4 deletions(-) I think you could avoid the patches to signal_32.c and callchain.c by defining vdso32{,_rt}_sigtramp to be 0 in arch/powerpc/include/asm/vdso.h. There may be other similar fixes. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpcW4s2BJ8_8.pgp Description: OpenPGP digital signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 3/3] powerpc/vdso: Disable building the 32-bit VDSO on little endian
Hi Michael, On Wed, 22 Apr 2015 15:40:36 +1000 Michael Ellerman wrote: > > diff --git a/arch/powerpc/include/asm/vdso.h b/arch/powerpc/include/asm/vdso.h > index c53f5f6d1761..f455adb471e7 100644 > --- a/arch/powerpc/include/asm/vdso.h > +++ b/arch/powerpc/include/asm/vdso.h > @@ -19,6 +19,7 @@ > > /* Offsets relative to thread->vdso_base */ > extern unsigned long vdso64_rt_sigtramp; > + > extern unsigned long vdso32_sigtramp; > extern unsigned long vdso32_rt_sigtramp; You could drop this hunk :-) > diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c > index 8331d0bef0fb..c2bd45187315 100644 > --- a/arch/powerpc/kernel/vdso.c > +++ b/arch/powerpc/kernel/vdso.c > @@ -49,12 +49,15 @@ > /* The alignment of the vDSO */ > #define VDSO_ALIGNMENT (1 << 16) > > -extern char vdso32_start, vdso32_end; > -static void *vdso32_kbase = &vdso32_start; > static unsigned int vdso32_pages; > +static void *vdso32_kbase; > static struct page **vdso32_pagelist; > -unsigned long vdso32_sigtramp; > -unsigned long vdso32_rt_sigtramp; > +unsigned long vdso32_sigtramp = 0; > +unsigned long vdso32_rt_sigtramp = 0; And they should be zero anyway, right? -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpWyWtrE59OP.pgp Description: OpenPGP digital signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
linux-next: manual merge of the kvm tree with the powerpc-merge-mpe tree
Hi all, Today's linux-next merge of the kvm tree got a conflict in arch/powerpc/kvm/book3s_hv_rm_mmu.c between commit dac565706791 ("KVM: PPC: Remove page table walk helpers") from the powerpc-merge-mpe tree and commit a4bd6eb07ca7 ("KVM: PPC: Book3S HV: Add helpers for lock/unlock hpte") from the kvm tree. I fixed it up (see below) and can carry the fix as necessary (no action is required). -- Cheers, Stephen Rothwells...@canb.auug.org.au diff --cc arch/powerpc/kvm/book3s_hv_rm_mmu.c index d839f08cb903,f6bf0b1de6d7.. --- a/arch/powerpc/kvm/book3s_hv_rm_mmu.c +++ b/arch/powerpc/kvm/book3s_hv_rm_mmu.c @@@ -134,12 -131,25 +134,6 @@@ static void remove_revmap_chain(struct unlock_rmap(rmap); } - static inline void unlock_hpte(__be64 *hpte, unsigned long hpte_v) -static pte_t lookup_linux_pte_and_update(pgd_t *pgdir, unsigned long hva, -int writing, unsigned long *pte_sizep) --{ - asm volatile(PPC_RELEASE_BARRIER "" : : : "memory"); - hpte[0] = cpu_to_be64(hpte_v); - pte_t *ptep; - unsigned long ps = *pte_sizep; - unsigned int hugepage_shift; - - ptep = find_linux_pte_or_hugepte(pgdir, hva, &hugepage_shift); - if (!ptep) - return __pte(0); - if (hugepage_shift) - *pte_sizep = 1ul << hugepage_shift; - else - *pte_sizep = PAGE_SIZE; - if (ps > *pte_sizep) - return __pte(0); - return kvmppc_read_update_linux_pte(ptep, writing, hugepage_shift); --} -- long kvmppc_do_h_enter(struct kvm *kvm, unsigned long flags, long pte_index, unsigned long pteh, unsigned long ptel, pgd_t *pgdir, bool realmode, unsigned long *pte_idx_ret) pgp2vp3MnHl9m.pgp Description: OpenPGP digital signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 1/3] powerpc: Don't build powernv for other platform defconfigs
Hi Michael, On Wed, 24 Sep 2014 15:57:10 +1000 Michael Ellerman wrote: > > Because powernv arrived after these other platforms, the defconfigs > didn't have PPC_POWERNV disabled, and being default y it gets turned on. Well, that raises the question of why PPC_POWERNV is default y at all? -- Cheers, Stephen Rothwells...@canb.auug.org.au signature.asc Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 3/3] powerpc/kdump: crash_dump.c needs to include io.h
Hi Michael, On Wed, 24 Sep 2014 15:57:12 +1000 Michael Ellerman wrote: > > For __ioremap(). So does that mean that you really want this patch before 2/3 so that you don't introduce an unnecessary bisection breakage in ppc64_defconfig? -- Cheers, Stephen Rothwells...@canb.auug.org.au signature.asc Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 1/2] powerpc: Add VM_FAULT_HWPOISON handling to powerpc page fault handler
Hi Anton, On Wed, 24 Sep 2014 10:27:06 +1000 Anton Blanchard wrote: > > - if (user_mode(regs)) { > - current->thread.trap_nr = BUS_ADRERR; > - info.si_signo = SIGBUS; > - info.si_errno = 0; > - info.si_code = BUS_ADRERR; > - info.si_addr = (void __user *)address; > - force_sig_info(SIGBUS, &info, current); > - return MM_FAULT_RETURN; > + if (!user_mode(regs)) > + return MM_FAULT_ERR(SIGBUS); > + > + current->thread.trap_nr = BUS_ADRERR; > + info.si_signo = SIGBUS; > + info.si_errno = 0; > + info.si_code = BUS_ADRERR; > + info.si_addr = (void __user *)address; If you had done this as 2 patches (one to remove the indent and a second to fix the actual problem), it would have been much easier to review ... -- Cheers, Stephen Rothwells...@canb.auug.org.au signature.asc Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v2 1/3] drivers/of: add of_changeset_apply_locked
Hi Cyril, Nit: On Thu, 25 Sep 2014 16:41:28 +1000 Cyril Bur wrote: > > Due to the requirement of of_changesets that of_changeset_apply be called > holding the of_mutex and that the of_mutex cannot be accessed nicely outside > the of code, added a wrapper which grabs the lock and called ^^ calls > of_changeset_apply. -- Cheers, Stephen Rothwells...@canb.auug.org.au signature.asc Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v2 1/4] pci/msi: Move "no_64bit_msi" flag from powerpc to generic pci_dev
Hi Ben, On Thu, 02 Oct 2014 10:33:32 +1000 Benjamin Herrenschmidt wrote: > > --- a/arch/powerpc/kernel/pci_64.c > +++ b/arch/powerpc/kernel/pci_64.c > @@ -269,10 +269,7 @@ EXPORT_SYMBOL(pcibus_to_node); > > static void quirk_radeon_32bit_msi(struct pci_dev *dev) > { > - struct pci_dn *pdn = pci_get_pdn(dev); > - > - if (pdn) > - pdn->force_32bit_msi = true; > + dev->no_64bit_msi = true; > } > DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x68f2, quirk_radeon_32bit_msi); > DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0xaa68, quirk_radeon_32bit_msi); > --- a/include/linux/pci.h > +++ b/include/linux/pci.h > @@ -331,6 +331,7 @@ struct pci_dev { > unsigned intis_added:1; > unsigned intis_busmaster:1; /* device is busmaster */ > unsigned intno_msi:1; /* device may not use msi */ > + unsigned intno_64bit_msi:1; /* Device has broken 64-bit MSIs */ > unsigned intblock_cfg_access:1; /* config space access is > blocked */ > unsigned intbroken_parity_status:1; /* Device generates false > positive parity */ > unsigned intirq_reroute_variant:2; /* device needs IRQ rerouting > variant */ You really should not be assigning "true" to a single bit field ... -- Cheers, Stephen Rothwells...@canb.auug.org.au signature.asc Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v2 2/4] gpu/radeon: Move 64-bit MSI quirk from arch to driver
Hi Ben, On Thu, 02 Oct 2014 10:34:22 +1000 Benjamin Herrenschmidt wrote: > > --- a/drivers/gpu/drm/radeon/radeon_irq_kms.c > +++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c > @@ -202,6 +202,16 @@ static bool radeon_msi_ok(struct radeon_device *rdev) > if (rdev->flags & RADEON_IS_AGP) > return false; > > + /* > + * Older chips have a HW limitation, they can only generate 40 bits > + * of address for "64-bit" MSIs which breaks on some platforms, notably > + * IBM POWER servers, so we limit them > + */ > + if (rdev->family < CHIP_BONAIRE) { > + dev_info(rdev->dev, "radeon: MSI limited to 32-bit\n"); > + rdev->pdev->no_64bit_msi = true; Again, no_64bit_msi is not a bool ... -- Cheers, Stephen Rothwells...@canb.auug.org.au signature.asc Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v2 3/4] sound/radeon: Move 64-bit MSI quirk from arch to driver
Hi Ben, On Thu, 02 Oct 2014 10:34:42 +1000 Benjamin Herrenschmidt wrote: > > diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c > index aa302fb..f91ba7f 100644 > --- a/sound/pci/hda/hda_intel.c > +++ b/sound/pci/hda/hda_intel.c > @@ -296,7 +296,8 @@ enum { > > /* quirks for ATI/AMD HDMI */ > #define AZX_DCAPS_PRESET_ATI_HDMI \ > - (AZX_DCAPS_NO_TCSEL | AZX_DCAPS_SYNC_WRITE | AZX_DCAPS_POSFIX_LPIB) > + (AZX_DCAPS_NO_TCSEL | AZX_DCAPS_SYNC_WRITE | AZX_DCAPS_POSFIX_LPIB|\ > + AZX_DCAPS_NO_MSI64) > > /* quirks for Nvidia */ > #define AZX_DCAPS_PRESET_NVIDIA \ > @@ -1505,9 +1506,14 @@ static int azx_first_init(struct azx *chip) > return -ENXIO; > } > > - if (chip->msi) > + if (chip->msi) { > + if (chip->driver_caps & AZX_DCAPS_NO_MSI64) { > + dev_dbg(card->dev, "Disabling 64bit MSI\n"); > + pci->no_64bit_msi = true; You get the idea :-) -- Cheers, Stephen Rothwells...@canb.auug.org.au signature.asc Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: Pull request: scottwood/linux.git next
Hi Scott, On Fri, 3 Oct 2014 14:52:53 -0500 Scott Wood wrote: > > On Mon, 2014-09-22 at 17:21 -0500, Scott Wood wrote: > > Highlights include DMA32 zone support (SATA, USB, etc now works on 64-bit > > FSL kernels), MSI changes, 8xx optimizations and cleanup, t104x board > > support, and PrPMC PCI enumeration. > > > > The following changes since commit 78eb9094ca08a40b8f9d3e113a2b88e0b7dbad1d: > > > > powerpc/t2080rdb: Add T2080RDB board support (2014-07-31 00:11:10 -0500) > > > > are available in the git repository at: > > > > git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux.git next > > > > for you to fetch changes up to cb0446c1b625326682ec4f9d1dd10779433646bc: > > > > Revert "powerpc/fsl_msi: spread msi ints across different MSIRs" > > (2014-09-19 15:20:42 -0500) > > ping Probably worth explicitly pinging Michael (cc'd) as he is doing this merge window's collection ... -- Cheers, Stephen Rothwells...@canb.auug.org.au signature.asc Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v3 01/16] powerpc/cell: Move spu_handle_mm_fault() out of cell platform
Hi Mikey, On Tue, 7 Oct 2014 21:48:07 +1100 Michael Neuling wrote: > > diff --git a/arch/powerpc/include/asm/copro.h > b/arch/powerpc/include/asm/copro.h > new file mode 100644 > index 000..2858108 > --- /dev/null > +++ b/arch/powerpc/include/asm/copro.h > @@ -0,0 +1,18 @@ > +/* > + * Copyright 2014 IBM Corp. > + * > + * This program is free software; you can redistribute it and/or > + * modify it under the terms of the GNU General Public License > + * as published by the Free Software Foundation; either version > + * 2 of the License, or (at your option) any later version. > + */ > + > +#ifndef _ASM_POWERPC_COPRO_H > +#define _ASM_POWERPC_COPRO_H > + > +int copro_handle_mm_fault(struct mm_struct *mm, unsigned long ea, > + unsigned long dsisr, unsigned *flt); > + > +int copro_data_segment(struct mm_struct *mm, u64 ea, u64 *esid, u64 *vsid); This function is otherwise not included in this patch, so it should probably be removed (as the next patch removes it anyway). -- Cheers, Stephen Rothwells...@canb.auug.org.au signature.asc Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
linux-next: build failure after merge of the iommu tree
Hi Joerg, After merging the iommu tree, today's linux-next build (powerpc pc64_defconfig) failed like this: In file included from arch/powerpc/platforms/powernv/pci.c:33:0: arch/powerpc/include/asm/iommu.h:140:12: error: conflicting types for 'iommu_map_sg' extern int iommu_map_sg(struct device *dev, struct iommu_table *tbl, ^ In file included from arch/powerpc/platforms/powernv/pci.c:23:0: include/linux/iommu.h:311:22: note: previous definition of 'iommu_map_sg' was here static inline size_t iommu_map_sg(struct iommu_domain *domain, ^ Caused by commit 315786ebbf4a ("iommu: Add iommu_map_sg() function"). Grep is your friend ... I have used the iommu tree from next-20141104 for today. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpEwgb8fm1KU.pgp Description: OpenPGP digital signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] of/base: Fix PowerPC address parsing hack
Hi Ben, Urk! :-) How about: On Wed, 12 Nov 2014 16:51:01 +1100 Benjamin Herrenschmidt wrote: > > diff --git a/drivers/of/address.c b/drivers/of/address.c > index e371825..e37f017 100644 > --- a/drivers/of/address.c > +++ b/drivers/of/address.c > @@ -7,6 +7,10 @@ > #include > #include > > +#ifdef CONFIG_PPC > +#include #define IS_PMAC machine_is(pmac) #else #define IS_PMAC (0) > +#endif > + > /* Max address size we deal with */ > #define OF_MAX_ADDR_CELLS4 > #define OF_CHECK_ADDR_COUNT(na) ((na) > 0 && (na) <= OF_MAX_ADDR_CELLS) > @@ -428,12 +432,13 @@ static int of_translate_one(struct device_node *parent, > struct of_bus *bus, >* This code is only enabled on powerpc. --gcl >*/ > ranges = of_get_property(parent, rprop, &rlen); > -#if !defined(CONFIG_PPC) > +#if defined(CONFIG_PPC) > + if (!machine_is(powermac)) > +#endif /* defined(CONFIG_PPC) */ > if (ranges == NULL) { if ((!IS_PMAC) && (ranges == NULL)) { > - pr_err("OF: no ranges; cannot translate\n"); > + pr_debug("OF: no ranges; cannot translate\n"); > return 1; > } > -#endif /* !defined(CONFIG_PPC) */ > if (ranges == NULL || rlen == 0) { > offset = of_read_number(addr, na); > memset(addr, 0, pna * 4); There might be a better identifier than IS_PMAC ... -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpXKWIHnZWAr.pgp Description: OpenPGP digital signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] of/base: Fix PowerPC address parsing hack
Hi Ben, On Thu, 13 Nov 2014 11:45:22 +1100 Benjamin Herrenschmidt wrote: > > What about this one instead ? I want to cache it because that function > can be called quite a while and doing two additional property lookup > and string compares every time might hurt some platforms. Looks good to me. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpVbekkqMXtY.pgp Description: OpenPGP digital signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
linux-next: build failure after merge of the access_once tree
Hi Christian, After merging the acess_once tree, today's linux-next build (powerpc allnoconfig) failed like this: arch/powerpc/mm/hugetlbpage.c: In function 'find_linux_pte_or_hugepte': arch/powerpc/mm/hugetlbpage.c:981:3: error: invalid initializer pud = ACCESS_ONCE(*pudp); ^ arch/powerpc/mm/hugetlbpage.c:993:4: error: invalid initializer pmd = ACCESS_ONCE(*pmdp); ^ These are preexisting ... mm/gup.c: In function 'gup_pmd_range': mm/gup.c:929:3: error: invalid initializer pmd_t pmd = ACCESS_ONCE(*pmdp); ^ mm/gup.c:929:3: error: (near initialization for 'pmd') This is from commit f30c59e921f1 ("mm: Update generic gup implementation to handle hugepage directory") from the powerpc-mpe (and powerpc) tree and so will require a merge fix patch (presumable s/ACCESS_ONCE/READ_ONCE/). I am not sure how many architectures you are trying to cover, but powerpc is one I care about :-) I have dropped the access_once tree again today, sorry (its too late at night). -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpMbNxwriN2y.pgp Description: OpenPGP digital signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] powerpc: Wire up sys_execveat() syscall
Hi Pranith, On Sat, 20 Dec 2014 11:47:18 -0500 Pranith Kumar wrote: > > Wire up sys_execveat(). This passes the selftests for the system call. Thanks for this, but ... > diff --git a/arch/powerpc/include/asm/systbl.h > b/arch/powerpc/include/asm/systbl.h > index ce9577d..778844a 100644 > --- a/arch/powerpc/include/asm/systbl.h > +++ b/arch/powerpc/include/asm/systbl.h > @@ -366,3 +366,4 @@ SYSCALL_SPU(seccomp) > SYSCALL_SPU(getrandom) > SYSCALL_SPU(memfd_create) > SYSCALL_SPU(bpf) > +SYSCALL_SPU(execveat) Given that it passes pointers into the kernel and looking at the execve system call, I assume that it should be COMPAT_SYS(). -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpS5b9E5l_Wn.pgp Description: OpenPGP digital signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
linux-next: manual merge of the vfs tree with the powerpc tree
Hi Al, Today's linux-next merge of the vfs tree got a conflict in arch/powerpc/kernel/rtas_flash.c between commit ad18a364f186 ("powerpc/rtas_flash: Free kmem upon module exit"), from the powerpc tree and commit 5c0333c00ff6 ("ppc: Clean up rtas_flash driver somewhat") from the vfs tree. I fixed it up (see below) and can carry the fix as necessary (no action is required). -- Cheers, Stephen Rothwells...@canb.auug.org.au diff --cc arch/powerpc/kernel/rtas_flash.c index a3e4034,8196bfb..000 --- a/arch/powerpc/kernel/rtas_flash.c +++ b/arch/powerpc/kernel/rtas_flash.c @@@ -806,20 -740,17 +758,22 @@@ enomem_buf static void __exit rtas_flash_cleanup(void) { + int i; + rtas_flash_term_hook = NULL; + if (rtas_firmware_flash_list) { + free_flash_list(rtas_firmware_flash_list); + rtas_firmware_flash_list = NULL; + } + - if (flash_block_cache) - kmem_cache_destroy(flash_block_cache); + for (i = 0; i < ARRAY_SIZE(rtas_flash_files); i++) { + const struct rtas_flash_file *f = &rtas_flash_files[i]; + remove_proc_entry(f->filename, NULL); + } - remove_flash_pde(firmware_flash_pde); - remove_flash_pde(firmware_update_pde); - remove_flash_pde(validate_pde); - remove_flash_pde(manage_pde); + kmem_cache_destroy(flash_block_cache); + kfree(rtas_validate_flash_data.buf); } module_init(rtas_flash_init); pgpAtR_yF8kc8.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
linux-next: build failure after merge of the cgroup tree
Hi Tejun, After merging the cgroup tree, today's linux-next build (powerpc ppc64_defconfig) failed like this: arch/powerpc/mm/numa.c: In function 'arch_update_cpu_topology': arch/powerpc/mm/numa.c:1465:2: error: implicit declaration of function 'kzalloc' [-Werror=implicit-function-declaration] arch/powerpc/mm/numa.c:1465:10: error: assignment makes pointer from integer without a cast [-Werror] arch/powerpc/mm/numa.c:1497:2: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration] Caused by commit 30c05350c39d ("powerpc/pseries: Use stop machine to update cpu maps") from the powerpc tree interacting with (probably) commit ff794dea52ea ("cpuset: remove include of cgroup.h from cpuset.h") from the cgroup tree. Removing includes from header files is fraught with danger ... The former should have added an include of linux/slab.h to arch/powerpc/mm/numa.c. I have added the following merge fix patch for today (but it should be applied to the powerpc tree ASAP). From: Stephen Rothwell Date: Mon, 29 Apr 2013 14:01:44 +1000 Subject: [PATCH] powerpc: numa.c: using kzalloc/kfree requires including slab.h fixes these build errors: arch/powerpc/mm/numa.c: In function 'arch_update_cpu_topology': arch/powerpc/mm/numa.c:1465:2: error: implicit declaration of function 'kzalloc' [-Werror=implicit-function-declaration] arch/powerpc/mm/numa.c:1465:10: error: assignment makes pointer from integer without a cast [-Werror] arch/powerpc/mm/numa.c:1497:2: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration] Signed-off-by: Stephen Rothwell --- arch/powerpc/mm/numa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 2d13f90..490e39c 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include -- 1.8.1 -- Cheers, Stephen Rothwells...@canb.auug.org.au pgppNQh7cAo14.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] powerpc: fix usage of setup_pci_atmu()
Hi Kumar, On Mon, 15 Apr 2013 15:42:01 +1000 Michael Neuling wrote: > > Linux next is currently failing to compile mpc85xx_defconfig with: > arch/powerpc/sysdev/fsl_pci.c:944:2: error: too many arguments to function > 'setup_pci_atmu' > > This is caused by (from Kumar's next branch): > commit 34642bbb3d12121333efcf4ea7dfe66685e403a1 > Author: Kumar Gala > powerpc/fsl-pci: Keep PCI SoC controller registers in pci_controller > > Which changed definition of setup_pci_atmu() but didn't update one of > the callers. Below fixes this. > > Signed-off-by: Michael Neuling > --- > Kumar: this is for your next tree > > diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c > index 83918c3..a10a036 100644 > --- a/arch/powerpc/sysdev/fsl_pci.c > +++ b/arch/powerpc/sysdev/fsl_pci.c > @@ -941,7 +941,7 @@ static int fsl_pci_resume(struct device *dev) > return -ENODEV; > } > > - setup_pci_atmu(hose, &pci_rsrc); > + setup_pci_atmu(hose); > > return 0; > } > This is still not in your tree ... -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpKNiKgIDHaW.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
linux-next: manual merge of the vfs tree with the powerpc tree
Hi Al, Today's linux-next merge of the vfs tree got a conflict in arch/powerpc/kernel/rtas_flash.c between commit fb4696c39573 ("powerpc/rtas_flash: Fix bad memory access") from the powerpc tree and commits ad18a364f186 ("powerpc/rtas_flash: Free kmem upon module exit") and 2352ad01409d ("ppc: Clean up rtas_flash driver somewhat") from the vfs tree. I fixed it up (see below) and can carry the fix as necessary (no action is required). -- Cheers, Stephen Rothwells...@canb.auug.org.au diff --cc arch/powerpc/kernel/rtas_flash.c index 243e184,5b77026..000 --- a/arch/powerpc/kernel/rtas_flash.c +++ b/arch/powerpc/kernel/rtas_flash.c @@@ -310,9 -316,9 +328,9 @@@ static ssize_t rtas_flash_write(struct * proc file */ if (uf->flist == NULL) { - uf->flist = kmem_cache_alloc(flash_block_cache, GFP_KERNEL); + uf->flist = kmem_cache_zalloc(flash_block_cache, GFP_KERNEL); if (!uf->flist) - return -ENOMEM; + goto nomem; } fl = uf->flist; @@@ -321,18 -327,18 +339,18 @@@ next_free = fl->num_blocks; if (next_free == FLASH_BLOCKS_PER_NODE) { /* Need to allocate another block_list */ - fl->next = kmem_cache_alloc(flash_block_cache, GFP_KERNEL); + fl->next = kmem_cache_zalloc(flash_block_cache, GFP_KERNEL); if (!fl->next) - return -ENOMEM; + goto nomem; fl = fl->next; next_free = 0; } if (count > RTAS_BLK_SIZE) count = RTAS_BLK_SIZE; - p = kmem_cache_alloc(flash_block_cache, GFP_KERNEL); + p = kmem_cache_zalloc(flash_block_cache, GFP_KERNEL); if (!p) - return -ENOMEM; + goto nomem; if(copy_from_user(p, buffer, count)) { kmem_cache_free(flash_block_cache, p); @@@ -722,65 -694,13 +706,13 @@@ static int __init rtas_flash_init(void return 1; } - firmware_flash_pde = create_flash_pde("powerpc/rtas/" - FIRMWARE_FLASH_NAME, - &rtas_flash_operations); - if (firmware_flash_pde == NULL) { - rc = -ENOMEM; - goto cleanup; - } - - rc = initialize_flash_pde_data("ibm,update-flash-64-and-reboot", - sizeof(struct rtas_update_flash_t), - firmware_flash_pde); - if (rc != 0) - goto cleanup; - - firmware_update_pde = create_flash_pde("powerpc/rtas/" - FIRMWARE_UPDATE_NAME, - &rtas_flash_operations); - if (firmware_update_pde == NULL) { - rc = -ENOMEM; - goto cleanup; - } - - rc = initialize_flash_pde_data("ibm,update-flash-64-and-reboot", - sizeof(struct rtas_update_flash_t), - firmware_update_pde); - if (rc != 0) - goto cleanup; - - validate_pde = create_flash_pde("powerpc/rtas/" VALIDATE_FLASH_NAME, - &validate_flash_operations); - if (validate_pde == NULL) { - rc = -ENOMEM; - goto cleanup; - } - - rc = initialize_flash_pde_data("ibm,validate-flash-image", - sizeof(struct rtas_validate_flash_t), - validate_pde); - if (rc != 0) - goto cleanup; - - manage_pde = create_flash_pde("powerpc/rtas/" MANAGE_FLASH_NAME, - &manage_flash_operations); - if (manage_pde == NULL) { - rc = -ENOMEM; - goto cleanup; - } - - rc = initialize_flash_pde_data("ibm,manage-flash-image", - sizeof(struct rtas_manage_flash_t), - manage_pde); - if (rc != 0) - goto cleanup; - - rtas_flash_term_hook = rtas_flash_firmware; + rtas_validate_flash_data.buf = kzalloc(VALIDATE_BUF_SIZE, GFP_KERNEL); + if (!rtas_validate_flash_data.buf) + return -ENOMEM; flash_block_cache = kmem_cache_create("rtas_flash_cache", -RTAS_BLK_SIZE, RTAS_BLK_SIZE, 0, -rtas_block_ctor); + RTAS_BLK_SIZE, RTAS_BLK_SIZE, 0, + NULL); if (!flash_block_cache)
Re: [PATCH] powerpc: provide __bswapdi2
Hi Mikey, On Mon, 13 May 2013 17:09:59 +1000 Michael Neuling wrote: > > This doesn't work for me but the below does: > > _GLOBAL(__bswapdi2) > rotlwi r9,r4,8 > rotlwi r10,r3,8 > rlwimi r9,r4,24,0,7 > rlwimi r10,r3,24,0,7 > rlwimi r9,r4,24,16,23 > rlwimi r10,r3,24,16,23 > mr r4,r10 > mr r3,r9 > blr > > stolen from GCC -02 output of: > unsigned long long __bswapdi2(unsigned long long x) > { >return ((x & 0x00ffULL) << 56) | > ((x & 0xff00ULL) << 40) | > ((x & 0x00ffULL) << 24) | > ((x & 0xff00ULL) << 8) | > ((x & 0x00ffULL) >> 8) | > ((x & 0xff00ULL) >> 24) | > ((x & 0x00ffULL) >> 40) | > ((x & 0xff00ULL) >> 56); > } So, if we are just stealing the output of gcc, why not just use the C version (at least for 32 bit)? -- Cheers, Stephen Rothwells...@canb.auug.org.au pgp7QZrN15nN7.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 1/1] Add a new platform tree for ib8315.
Hi Sergey, On Mon, 27 May 2013 14:26:21 +0200 Sergey Gerasimov wrote: > > arch/powerpc/configs/83xx/ib8315_defconfig | 2152 > Please submit the result of "make savedefconfig" instead of this as it will be much smaller. Thanks. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpaNVXQz4NCF.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 5/5] net: Block MSG_CMSG_COMPAT in send(m)msg and recv(m)msg
Hi Anton, On Thu, 6 Jun 2013 13:01:05 +1000 Anton Blanchard wrote: > > > This is causing a regression on 64bit powerpc with 32bit usermode. > > When I hit userspace, udev is broken and I suspect all networking is > > broken as well. > > > > Can we please revert 1be374a0518a288147c6a7398792583200a67261 > > upstream? > > > > Found via bisect. > > Doesn't this patch break compat_sys_sendmsg and compat_sys_recvmsg? > We'd need to move the guts of sys_* into compat_sys_* to fix it. What you really need is a set of common functions that the sys_ and compat_sys_ functions can call - with the sys_ funtions forbidding MSG_CMSG_COMPAT and the compat_sys_ functions setting it. -- Cheers, Stephen Rothwells...@canb.auug.org.au http://www.canb.auug.org.au/~sfr/ pgpLOazaK5cxs.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v2 08/11] irqdomain: Refactor irq_domain_associate_many()
Hi all, On Tue, 18 Jun 2013 11:25:34 +1000 Michael Neuling wrote: > > Michael Neuling wrote: > > > In next-20130617 we are getting the below crash on POWER7. Bisecting, > > points to this patch (d39046ec72 in next) > > Also, reverting just d39046ec72 fixes the crash in next-20130617. I will revert that commit in linux-next today. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpiqBCADhYCj.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
linux-next: manual merge of the akpm tree with the powerpc tree
Hi Andrew, Today's linux-next merge of the akpm tree got a conflict in arch/powerpc/kernel/ptrace.c between commit b0b0aa9c7faf ("powerpc/hw_brk: Fix setting of length for exact mode breakpoints") from the powerpc tree and commit "ptrace/powerpc: revert "hw_breakpoints: Fix racy access to ptrace breakpoints"" from the akpm tree. I fixed it up (see below) and can carry the fix as necessary (no action is required). -- Cheers, Stephen Rothwells...@canb.auug.org.au diff --cc arch/powerpc/kernel/ptrace.c index 64f7bd5,6645e57..000 --- a/arch/powerpc/kernel/ptrace.c +++ b/arch/powerpc/kernel/ptrace.c @@@ -1449,10 -1437,7 +1437,9 @@@ static long ppc_set_hwdebug(struct task */ if (bp_info->addr_mode == PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE) { len = bp_info->addr2 - bp_info->addr; - } else if (bp_info->addr_mode != PPC_BREAKPOINT_MODE_EXACT) { + } else if (bp_info->addr_mode == PPC_BREAKPOINT_MODE_EXACT) + len = 1; + else { - ptrace_put_breakpoints(child); return -EINVAL; } bp = thread->ptrace_bps[0]; pgpPPrjGi10TW.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 3/4] powerpc: Rename and flesh out the facility unavailable exception handler
Hi Michael, On Tue, 25 Jun 2013 17:47:56 +1000 Michael Ellerman wrote: > > -void tm_unavailable_exception(struct pt_regs *regs) > +void facility_unavailable_exception(struct pt_regs *regs) > { > + static char *facility_strings[] = { > + "FPU", > + "VMX/VSX", > + "DSCR", > + "PMU SPRs", > + "BHRB", > + "TM", > + "AT", > + "EBB", > + "TAR", > + }; Are the indexes into this array defined somewhere? If not, can we do that. Then, can we use explicit indexed initialisers for this array? -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpSJ5UlupuEl.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 3/6 v5] powerpc: export debug registers save function for KVM
Hi, On Wed, 26 Jun 2013 11:12:23 +0530 Bharat Bhushan wrote: > > diff --git a/arch/powerpc/include/asm/switch_to.h > b/arch/powerpc/include/asm/switch_to.h > index 200d763..50b357f 100644 > --- a/arch/powerpc/include/asm/switch_to.h > +++ b/arch/powerpc/include/asm/switch_to.h > @@ -30,6 +30,10 @@ extern void enable_kernel_spe(void); > extern void giveup_spe(struct task_struct *); > extern void load_up_spe(struct task_struct *); > > +#ifdef CONFIG_PPC_ADV_DEBUG_REGS > +extern void switch_booke_debug_regs(struct thread_struct *new_thread); > +#endif We usually don't bother guarding function declarations. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpxazlU9zvuZ.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 3/8] vfio: add external user support
Hi Alexy, On Thu, 27 Jun 2013 15:02:31 +1000 Alexey Kardashevskiy wrote: > > index c488da5..54192b2 100644 > --- a/drivers/vfio/vfio.c > +++ b/drivers/vfio/vfio.c > @@ -1370,6 +1370,59 @@ static const struct file_operations vfio_device_fops = > { > }; > > /** > + * External user API, exported by symbols to be linked dynamically. > + */ > + > +/* Allows an external user (for example, KVM) to lock an IOMMU group */ > +static int vfio_group_add_external_user(struct file *filep) > +{ > + struct vfio_group *group = filep->private_data; > + > + if (filep->f_op != &vfio_group_fops) > + return -EINVAL; > + > + if (!atomic_inc_not_zero(&group->container_users)) > + return -EINVAL; > + > + return 0; > +} > +EXPORT_SYMBOL_GPL(vfio_group_add_external_user); You cannot EXPORT a static symbol ... The same through the rest of the file. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpe3vRHl2xvL.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 3/8] vfio: add external user support
Hi Alexy, On Thu, 27 Jun 2013 15:02:31 +1000 Alexey Kardashevskiy wrote: > > +/* Allows an external user (for example, KVM) to unlock an IOMMU group */ > +static void vfio_group_del_external_user(struct file *filep) > +{ > + struct vfio_group *group = filep->private_data; > + > + BUG_ON(filep->f_op != &vfio_group_fops); We usually reserve BUG_ON for situations where there is no way to continue running or continuing will corrupt the running kernel. Maybe WARN_ON() and return? -- Cheers, Stephen Rothwells...@canb.auug.org.au pgp8RZQ6Uj__1.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v2] vfio: add external user support
Hi Alexy, Thanks for the changes. On Thu, 27 Jun 2013 17:14:20 +1000 Alexey Kardashevskiy wrote: > > diff --git a/include/linux/vfio.h b/include/linux/vfio.h > index ac8d488..7ee6575 100644 > --- a/include/linux/vfio.h > +++ b/include/linux/vfio.h > @@ -90,4 +90,11 @@ extern void vfio_unregister_iommu_driver( > TYPE tmp; \ > offsetof(TYPE, MEMBER) + sizeof(tmp.MEMBER); }) \ > > +/* > + * External user API > + */ > +int vfio_group_add_external_user(struct file *filep); > +void vfio_group_del_external_user(struct file *filep); > +int vfio_group_iommu_id_from_file(struct file *filep); Just being picky, but all the other function declarations in that file state "extern" explicitly. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgp5tdl2bSXCG.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 3/4] powerpc: Rename and flesh out the facility unavailable exception handler
Hi Michael, On Fri, 28 Jun 2013 00:16:31 +1000 Michael Ellerman wrote: > > On Thu, Jun 27, 2013 at 02:05:39PM +1000, Stephen Rothwell wrote: > > > > On Tue, 25 Jun 2013 17:47:56 +1000 Michael Ellerman > > wrote: > > > > > > -void tm_unavailable_exception(struct pt_regs *regs) > > > +void facility_unavailable_exception(struct pt_regs *regs) > > > { > > > + static char *facility_strings[] = { > > > + "FPU", > > > + "VMX/VSX", > > > + "DSCR", > > > + "PMU SPRs", > > > + "BHRB", > > > + "TM", > > > + "AT", > > > + "EBB", > > > + "TAR", > > > + }; > > > > Are the indexes into this array defined somewhere? If not, can we do > > that. Then, can we use explicit indexed initialisers for this array? > > I'm not sure I follow. > > The mapping is defined by the definition of the "Interruption Cause" > field of the FSCR, section 6.2.10 of PowerISA v2.07. OK, so these numbers are externally defined: #define FSCR_INT_CAUSE_FPU 0 ... #define FSCR_INT_CAUSE_TAR 8 (or maybe an enum) static char *facility_strings[] = { [ FSCR_INT_CAUSE_FPU ] = "FPU", [ FSCR_INT_CAUSE_VMX_VSX ] = "VMX/VSX", [ FSCR_INT_CAUSE_DSCR ] = "DSCR", [ FSCR_INT_CAUSE_PMU_SPRs ] = "PMU SPRs", [ FSCR_INT_CAUSE_BHRB ] = "BHRB", [ FSCR_INT_CAUSE_TM ] = "TM", [ FSCR_INT_CAUSE_AT ] = "AT", [ FSCR_INT_CAUSE_EBB ] = "EBB", [ FSCR_INT_CAUSE_TAR ] = "TAR", }; Or something similar. Of course, then your code should cope with facility_strings[...] being NULL. This makes it very clear that these things are not just "made up" for your code. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgp4H3GFMWoNK.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v3] powerpc/eeh: Update MAINTAINERS
Hi Gavin, On Fri, 28 Jun 2013 13:42:23 +0800 Gavin Shan wrote: > > Update MAINTAINERS to reflect recent changes. > > Signed-off-by: Gavin Shan > --- > MAINTAINERS |6 ++ > 1 files changed, 6 insertions(+), 0 deletions(-) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 5be702c..78e64c9 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -6149,7 +6149,13 @@ M: Linas Vepstas > L: linux-...@vger.kernel.org > S: Supported > F: Documentation/PCI/pci-error-recovery.txt > + > +ENHANCED ERROR HANDLING (EEH) > +M: Gavin Shan > +L: linuxppc-dev@lists.ozlabs.org > +S: Supported > F: Documentation/powerpc/eeh-pci-error-recovery.txt > +F: arch/powerpc/kernel/eeh*.c > > PCI SUBSYSTEM > M: Bjorn Helgaas The entries in the MAINTAINERS file are meant to be in alphabetical order ... -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpPdYpmXH7Io.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
linux-next: build failure after merge of the powerpc tree
Hi all, After merging the powerpc tree, today's linux-next build (x86_64 allmodconfig) failed like this: fs/pstore/ftrace.c: In function 'pstore_ftrace_call': fs/pstore/ftrace.c:47:6: warning: passing argument 7 of 'psinfo->write_buf' makes integer from pointer without a cast [enabled by default] sizeof(rec), psinfo); ^ fs/pstore/ftrace.c:47:6: note: expected 'size_t' but argument is of type 'struct pstore_info *' fs/pstore/ftrace.c:47:6: error: too few arguments to function 'psinfo->write_buf' Caused by commit 6bbbca735936 ("pstore: Pass header size in the pstore write callback"). I have used the version from next-20130701 for today. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpApmxoFEH8V.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v2 1/2] powerpc: Add smp_generic_cpu_bootable
Hi Andy, On Mon, 29 Jul 2013 18:33:04 -0500 Andy Fleming wrote: > > +EXPORT_SYMBOL(smp_generic_cpu_bootable); I am pretty sure that none of the places you are going to use this can be built as modules, so remove this EXPORT_SYMBOL, please. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpDrTcwoZrvq.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] powerpc: handle unaligned ldbrx/stdbrx
Hi Anton, On Wed, 31 Jul 2013 15:05:21 +1000 Anton Blanchard wrote: > > +++ b/arch/powerpc/kernel/align.c > @@ -764,6 +764,16 @@ int fix_alignment(struct pt_regs *regs) > nb = aligninfo[instr].len; > flags = aligninfo[instr].flags; > > + /* ldbrx/stdbrx overlap lfs/stfs in the DSISR unfortunately */ > + if (IS_XFORM(instruction) && ((instruction >> 1) & 0x3ff) == 532) { We have get_xop() in asm/disassemble.h (which is unfortunately not included by this file) ... > + nb = 8; > + flags = LD+SW; > + } else if (IS_XFORM(instruction) && > +((instruction >> 1) & 0x3ff) == 660) { ditto /me points at a bike shed :-) -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpgBWYw3gsQR.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 3/3] powerpc: Correctly context switch DSCR on POWER8
[This time from a good email address :-)] Hi Mikey, On Mon, 5 Aug 2013 17:28:06 +1000 Michael Neuling wrote: > > +++ b/arch/powerpc/kernel/traps.c > @@ -1296,43 +1294,56 @@ void vsx_unavailable_exception(struct pt_regs *regs) > die("Unrecoverable VSX Unavailable Exception", regs, SIGABRT); > } > > +#ifdef CONFIG_PPC64 > void facility_unavailable_exception(struct pt_regs *regs) > { > static char *facility_strings[] = { > - "FPU", > - "VMX/VSX", > - "DSCR", > - "PMU SPRs", > - "BHRB", > - "TM", > - "AT", > - "EBB", > - "TAR", > + [FSCR_FP_LG] = "FPU", > + [FSCR_VECVSX_LG] = "VMX/VSX", > + [FSCR_DSCR_LG] = "DSCR", > + [FSCR_PM_LG] = "PMU SPRs", > + [FSCR_BHRB_LG] = "BHRB", > + [FSCR_TM_LG] = "TM", > + [FSCR_EBB_LG] = "EBB", > + [FSCR_TAR_LG] = "TAR", I assume that you intentionally dropped "AT". > }; > - char *facility, *prefix; > + char *facility; > u64 value; > + u8 status; > + bool hv; > > if (regs->trap == 0xf60) { > value = mfspr(SPRN_FSCR); > - prefix = ""; > + hv = false; > } else { > value = mfspr(SPRN_HFSCR); > - prefix = "Hypervisor "; > + hv = true; > } Maybe: hv = regs->trap == 0xf60; if (hv) value = mfspr(SPRN_HFSCR); else value = mfspr(SPRN_HFSCR); or value = mfspr(hv ? SPRN_HFSCR : SPRN_HFSCR); > - value = value >> 56; > + status = value >> 56; > + > + if (status < ARRAY_SIZE(facility_strings)) > + facility = facility_strings[status]; > + else > + facility = "unknown"; For entries in the array that are not set, this will give facility == NULL. Is that what you intended? > pr_err("%sFacility '%s' unavailable, exception at 0x%lx, MSR=%lx\n", > - prefix, facility, regs->nip, regs->msr); > +hv ? "Hypervisor ":"", facility, regs->nip, regs->msr); ... and this may attempt to print a NULL pointer with %s. Also please put spaces around the : . -- Cheers, Stephen Rothwells...@canb.auug.org.au pgptDRKEGaoa9.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
linux-next: manual merge of the block tree with the powerpc-mpe tree
Hi Jens, Today's linux-next merge of the block tree got a conflict in MAINTAINERS between commit a14ab6b6e0ad ("powerpc/cell: Drop cbe-oss-dev mailing list from MAINTAINERS") from the powerpc-mpe tree and commit 3715a5d014e1 ("MAINTAINERS: Update ps3vram block driver") from the block tree. I fixed it up (see below) and can carry the fix as necessary (no action is required). -- Cheers, Stephen Rothwells...@canb.auug.org.au diff --cc MAINTAINERS index b09702c197ca,b327ac39e951.. --- a/MAINTAINERS +++ b/MAINTAINERS @@@ -8018,7 -7853,9 +8019,8 @@@ F: sound/ppc/snd_ps3 PS3VRAM DRIVER M:Jim Paris + M:Geoff Levand L:linuxppc-dev@lists.ozlabs.org -L:cbe-oss-...@lists.ozlabs.org S:Maintained F:drivers/block/ps3vram.c pgpvh10nDv9_q.pgp Description: OpenPGP digital signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: provide more common DMA API functions V2
Hi Andrew, On Tue, 18 Aug 2015 07:53:15 +0200 Christoph Hellwig wrote: > > On Mon, Aug 17, 2015 at 10:45:52PM -0700, Andrew Morton wrote: > > > > > > > > I'll merge these 5 patches for 4.3. That means I'll release them into > > > > linux-next after 4.2 is released. > > > > > > So you only add for-4.3 code to -next after 4.2 is odd? Isn't thast the > > > wrong way around? > > > > Linus will be releasing 4.2 in 1-2 weeks and until then, linux-next is > > supposed to contain only 4.2 material. Once 4.2 is released, > > linux-next is open for 4.3 material. > > Hmm, I'm pretty sure there's tons of 4.3 material in linux-next at the > moment, at least I got merge warning messages from Stephen about > some yesterday. Yeah, we are at v4.2-rc7 so linux-next is full of stuff to be merged by Linus for v4.3. Nothing for v4.4 should be in linux-next until after v4.3-rc1 is released in 3-4 weeks i.e. after the next merge window closes. -- Cheers, Stephen Rothwells...@canb.auug.org.au ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: provide more common DMA API functions V2
Hi Andrew (sorry, I can't tell who made the incorrect statement below that I am replying to), On Wed, 19 Aug 2015 14:36:56 -0700 Andrew Morton wrote: > > On Wed, 19 Aug 2015 10:08:14 +0200 Christoph Hellwig wrote: > > > On Tue, Aug 18, 2015 at 09:51:07AM +0200, Ingo Molnar wrote: > > > I.e. shouldn't this be: > > > > > > > I'll merge these 5 patches for 4.4. That means I'll release them into > > > > linux-next after 4.2 is released. > > > > > > > > [...] > > > > > > > > Linus will be releasing 4.2 in 1-2 weeks and until then, linux-next is > > > > supposed > > > > to contain only 4.3 material. Once 4.2 is released and the 4.3 merge > > > > window > > > > opens, linux-next is open for 4.4 material. Just to be clear: the above should read "Once 4.2 is released and the 4.3 merge window *closes* (i.e. v4.3-rc1 is released), linux-next is open for 4.4 material". -- Cheers, Stephen Rothwells...@canb.auug.org.au ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[RFC] powerpc: put the common parts of the ppc64*defconfigs in a Kconfig file
We cannot put the unsetting of config options in the Kconfig file, nor the integer or string options. I checked that after this we get the same .config files generated (except for the addition of the new PPC64_DEFCONFIG* config options. Any thoughts? --- arch/powerpc/Kconfig | 2 + arch/powerpc/configs/Kconfig | 295 + arch/powerpc/configs/ppc64_defconfig | 301 +- arch/powerpc/configs/ppc64e_defconfig | 297 + 4 files changed, 302 insertions(+), 593 deletions(-) create mode 100644 arch/powerpc/configs/Kconfig diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 3bf72cd..a95649f 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -1020,3 +1020,5 @@ config PPC_LIB_RHEAP bool source "arch/powerpc/kvm/Kconfig" + +source "arch/powerpc/configs/Kconfig" diff --git a/arch/powerpc/configs/Kconfig b/arch/powerpc/configs/Kconfig new file mode 100644 index 000..05b693c --- /dev/null +++ b/arch/powerpc/configs/Kconfig @@ -0,0 +1,295 @@ +config PPC64_DEFCONFIG_COMMON + bool "Common settings for ppc64 defconfigs" + select ACENIC_OMIT_TIGON_I + select ATA + select BLK_DEV_AMD74XX + select BLK_DEV_DM + select BLK_DEV_FD + select BLK_DEV_GENERIC + select BLK_DEV_IDECD + select BLK_DEV_INITRD + select BLK_DEV_IO_TRACE + select BLK_DEV_LOOP + select BLK_DEV_MD + select BLK_DEV_RAM + select BLK_DEV_SD + select BLK_DEV_SR + select BLK_DEV_SR_VENDOR + select CGROUPS + select CHR_DEV_SG + select CHR_DEV_ST + select CIFS_POSIX + select CIFS_XATTR + select CODE_PATCHING_SELFTEST + select CPUSETS + select CPU_FREQ + select CPU_FREQ_GOV_POWERSAVE + select CPU_FREQ_GOV_USERSPACE + select CRC_T10DIF + select CRYPTO_HMAC + select DEBUG_KERNEL + select DEBUG_MUTEXES + select DEBUG_STACKOVERFLOW + select DEBUG_STACK_USAGE + select DEVTMPFS + select DEVTMPFS_MOUNT + select E100 + select E1000 + select EDAC + select EDAC_MM_EDAC + select EXT2_FS + select EXT2_FS_POSIX_ACL + select EXT2_FS_SECURITY + select EXT2_FS_XATTR + select EXT2_FS_XIP + select EXT3_FS + select EXT3_FS_POSIX_ACL + select EXT3_FS_SECURITY + select EXT4_FS + select EXT4_FS_POSIX_ACL + select EXT4_FS_SECURITY + select FB + select FB_IBM_GXT4500 + select FB_MATROX + select FB_MATROX_G + select FB_MATROX_MILLENIUM + select FB_MATROX_MYSTIQUE + select FB_OF + select FB_RADEON + select FIRMWARE_EDID + select FRAMEBUFFER_CONSOLE + select FTR_FIXUP_SELFTEST + select HID_GYRATION + select HID_PANTHERLORD + select HID_PETALYNX + select HID_SAMSUNG + select HID_SUNPLUS + select HIGH_RES_TIMERS + select HOTPLUG_PCI + select I2C_AMD8111 + select I2C_CHARDEV + select IDE + select IKCONFIG + select IKCONFIG_PROC + select INET + select INPUT_MISC + select IP_MULTICAST + select IP_PNP + select IP_PNP_BOOTP + select IP_PNP_DHCP + select IRQ_ALL_CPUS + select ISO9660_FS + select JFS_POSIX_ACL + select JFS_SECURITY + select LATENCYTOP + select LCD_CLASS_DEVICE + select LOGO + select MAGIC_SYSRQ + select MARVELL_PHY + select MD + select MD_LINEAR + select MD_RAID0 + select MD_RAID1 + select MODULES + select MODULE_SRCVERSION_ALL + select MODULE_UNLOAD + select MODVERSIONS + select MSDOS_FS + select MSI_BITMAP_SELFTEST + select NETCONSOLE + select NETFILTER + select NETPOLL_TRAP + select NET_IPIP + select NFSD_V3_ACL + select NFSD_V4 + select NFS_FS + select NFS_V3_ACL + select NFS_V4 + select NF_CONNTRACK_EVENTS + select NLS_ASCII + select NLS_CODEPAGE_437 + select NLS_ISO8859_1 + select NLS_UTF8 + select NO_HZ + select OPROFILE + select PACKET + select PARTITION_ADVANCED + select PCCARD + select PCNET32 + select POSIX_MQUEUE + select PPC64 + select PROC_DEVICETREE + select PROC_KCORE + select PROFILING + select RAW_DRIVER + select REISERFS_FS + select REISERFS_FS_POSIX_ACL + select REISERFS_FS_SECURITY + select REISERFS_FS_XATTR + select ROOT_NFS + select RTC_CLASS + select RTC_DRV_DS1307 + select SATA_SIL24 + select SATA_SVW + select SCHED_TRACER + select SCSI_CONSTANTS + select SCSI_FC_ATTRS + select SCSI_IPR + select SCSI_MULTI_LUN + select SCSI_SYM53C8XX_2 + select SERIAL_8250 + select SERIAL_8250
Re: [RFC] powerpc: put the common parts of the ppc64*defconfigs in a Kconfig file
Hi Kumar, Thanks for your comments. On Fri, 9 Aug 2013 09:41:54 -0500 Kumar Gala wrote: > > > On Aug 9, 2013, at 1:24 AM, Stephen Rothwell wrote: > > > We cannot put the unsetting of config options in the Kconfig file, nor > > the integer or string options. > > > > I checked that after this we get the same .config files generated (except > > for the addition of the new PPC64_DEFCONFIG* config options. > > > > Any thoughts? > > --- > > arch/powerpc/Kconfig | 2 + > > arch/powerpc/configs/Kconfig | 295 > > + > > arch/powerpc/configs/ppc64_defconfig | 301 > > +- > > arch/powerpc/configs/ppc64e_defconfig | 297 > > + > > 4 files changed, 302 insertions(+), 593 deletions(-) > > create mode 100644 arch/powerpc/configs/Kconfig > > Am I missing something here, isn't this a bit of a maintenance pain if > symbol names change? I don't think it is any worse than what we have, and in fact may be better. Currently if someone renames a config option, they usually do nothing about the defconfigs, this way, at least if the option is in configs/Kconfig, they may update it. > Also, how much of a benefit is this? There has been some discussion about Anton adding 2 new defconfigs that are very similar to the current defconfigs. This is an attempt to reduce the amount of unnecessary repetition and churn. A similar thing could be done for other sets of similar defconfig files. There was a plan a few years ago to replace the defconfigs with Kconfig fragments and this would be a step along that path. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpAck7jwVjF_.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 1/2] powerpc: Pull out cpu_core_mask updates into a separate function
Hi Paul, On Sat, 10 Aug 2013 13:45:30 +1000 Paul Mackerras wrote: > > This factors out the details of updating cpu_core_mask into a separate > function, to make it easier to change how the mask is calculated later. > This makes no functional change. > > Signed-off-by: Paul Mackerras > --- > arch/powerpc/kernel/smp.c | 56 > +++ > 1 file changed, 28 insertions(+), 28 deletions(-) > > diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c > index 38b0ba6..663cefd 100644 > --- a/arch/powerpc/kernel/smp.c > +++ b/arch/powerpc/kernel/smp.c > @@ -609,11 +609,36 @@ static struct device_node *cpu_to_l2cache(int cpu) > return cache; > } > > +static void traverse_core_siblings(int cpu, int add) This "add" parameter is only used as a boolean, so should be declared that way. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpR0OW4Uggnu.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 2/2] powerpc: Use ibm,chip-id property to compute cpu_core_mask if available
Hi Paul, On Sat, 10 Aug 2013 13:46:15 +1000 Paul Mackerras wrote: > > +static void traverse_siblings_chip_id(int cpu, int add, int chipid) Again, the "add is a boolean. > +{ > + const struct cpumask *mask; > + struct device_node *np; > + int i, plen; > + const int *prop; > + > + mask = add ? cpu_online_mask : cpu_present_mask; > + for_each_cpu(i, mask) { > + np = of_get_cpu_node(i, NULL); > + if (!np) > + continue; > + prop = of_get_property(np, "ibm,chip-id", &plen); > + if (prop && plen == sizeof(int) && *prop == chipid) { ^ You should be using of_read_number(), I think. > static void traverse_core_siblings(int cpu, int add) > { > - struct device_node *l2_cache; > + struct device_node *l2_cache, *np; > const struct cpumask *mask; > - int i; > + int i, chip, plen; > + const int *prop; > + > + /* First see if we have ibm,chip-id properties in cpu nodes */ > + np = of_get_cpu_node(cpu, NULL); > + if (np) { > + chip = -1; > + prop = of_get_property(np, "ibm,chip-id", &plen); > + if (prop && plen == sizeof(int)) > + chip = *(int *)prop; Here as well. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpMsT6pk8KlA.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] powerpc: Avoid link stack corruption for MMU on exceptions
Hi Mikey, On Tue, 13 Aug 2013 12:20:22 +1000 Michael Neuling wrote: > > @@ -101,14 +102,14 @@ > * kernel, we need to use LR to get to the 2nd level handler. So, > save/restore ^^ CTR > * it when required. > */ > -#define SAVE_LR(reg, area) mflrreg ; std reg,area+EX_LR(r13) > -#define GET_LR(reg, area)ld reg,area+EX_LR(r13) > -#define RESTORE_LR(reg, area)ld reg,area+EX_LR(r13) ; mtlr reg > +#define SAVE_CTR(reg, area) mfctr reg ; std reg,area+EX_CTR(r13) > +#define GET_CTR(reg, area) ld reg,area+EX_CTR(r13) > +#define RESTORE_CTR(reg, area) ld reg,area+EX_CTR(r13) ; mtctr reg > #else > /* ...else LR is unused and in register. */ ^^ and again -- Cheers, Stephen Rothwells...@canb.auug.org.au pgphyd5XQLKhi.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
linux-next: build failure after merge of the final tree
Hi all, After merging the final tree, today's linux-next build (powerpc allyesconfig) failed like this: arch/powerpc/platforms/cell/spufs/inode.c: In function 'spufs_parse_options': arch/powerpc/platforms/cell/spufs/inode.c:623:16: error: incompatible types when assigning to type 'kuid_t' from type 'int' root->i_uid = option; ^ arch/powerpc/platforms/cell/spufs/inode.c:628:16: error: incompatible types when assigning to type 'kgid_t' from type 'int' root->i_gid = option; ^ Caused by commit d6970d4b726c ("enable building user namespace with xfs") from the xfs tree (that was fun to find :-)). I have reverted that commit for today. It could probably be replaced with a patch that just changed XFS_FS to SPU_FS in the UIDGID_CONVERTED config dependency - or someone could fix up SPU_FS. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpL9hfmmReB9.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: linux-next: build failure after merge of the final tree
Hi Ben, On Tue, 20 Aug 2013 14:28:44 -0500 Ben Myers wrote: > > I'd prefer not to break Stephen's tree two days in a row. We could just > revert > d6970d4b726c in the xfs tree for the time being as Stephen has done, but given > the choice would prefer the fix. Do you have a preference between the two > approaches that Dwight has posted? The first seems more conservative... I will automatically revert that commit when I merge the xfs tree until some other solution is forthcoming (so you don't have to do the revert in the xfs tree). This does need to be fixed fairly soon, though. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpJX5S7I3XCP.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] Kconfig: Remove hotplug enable hints in CONFIG_KEXEC help texts
Hi Geert, On Tue, 20 Aug 2013 21:38:03 +0200 Geert Uytterhoeven wrote: > > commit 40b313608ad4ea655addd2ec6cdd106477ae8e15 ("Finally eradicate > CONFIG_HOTPLUG") removed remaining references to CONFIG_HOTPLUG, but missed > a few plain English references in the CONFIG_KEXEC help texts. > > Remove them, too. > > Signed-off-by: Geert Uytterhoeven Looks good to me. Thanks. Acked-by: Stephen Rothwell -- Cheers, Stephen Rothwells...@canb.auug.org.au pgprObJ4e7WHp.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
linux-next: manual merge of the pm tree with the powerpc tree
Hi Rafael, Today's linux-next merge of the pm tree got a conflict in arch/powerpc/kernel/prom.c between commit dc0e643afc50 ("powerpc: Make prom.c device tree accesses endian safe") from the powerpc tree and commits 819d596568d8 ("powerpc: refactor of_get_cpu_node to support other architectures") and 183912d352a2 ("of: move of_get_cpu_node implementation to DT core library") from the pm tree. I think that the latter superceded the conflicting fixes in the former, so I just used the latter and can carry the fix as necessary (no action is required). P.S. Rafael, I used both your addresses because I have had a bounce from the sisk.pl one in the past ... -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpH8TaKJcGAQ.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] powerpc: OE=1 Form Instructions Not Decoded Correctly
Hi Tom, On Mon, 9 Sep 2013 07:44:54 -0500 Tom Musta wrote: > > > Looks like the patch has been mangled by the mailer ... it's in HTML to > > begin with :-) > > Frustrating. I did use a plain text option on the mail client and did a > test send to a few accounts before posting to the mailing list. The > patch was verified by checkpatch.pl before it got mangled. > > I will find a better setup and resubmit. Also please find a mailer that does *not* respond to the envelope recipient (linuxppc-dev-bounces+tmusta=us.ibm@lists.ozlabs.org in this case) as that just tends to irritate list owners. -- Cheers, Stephen Rothwells...@canb.auug.org.au (slightly irritated list owner :-)) pgpJ7nZ4PiscK.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] powerpc/irq: Run softirqs off the top of the irq stack
Hi Ben, On Mon, 23 Sep 2013 14:35:58 +1000 Benjamin Herrenschmidt wrote: > > diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c > index c69440c..0c9646f 100644 > --- a/arch/powerpc/kernel/irq.c > +++ b/arch/powerpc/kernel/irq.c > @@ -443,46 +443,7 @@ void migrate_irqs(void) > > static inline void handle_one_irq(unsigned int irq) > { > - struct thread_info *curtp, *irqtp; > - unsigned long saved_sp_limit; > - struct irq_desc *desc; > - > - desc = irq_to_desc(irq); > - if (!desc) > - return; > - > - /* Switch to the irq stack to handle this */ > - curtp = current_thread_info(); > - irqtp = hardirq_ctx[smp_processor_id()]; > - > - if (curtp == irqtp) { > - /* We're already on the irq stack, just handle it */ > - desc->handle_irq(irq, desc); > - return; > - } > - > - saved_sp_limit = current->thread.ksp_limit; > - > - irqtp->task = curtp->task; > - irqtp->flags = 0; > - > - /* Copy the softirq bits in preempt_count so that the > - * softirq checks work in the hardirq context. */ > - irqtp->preempt_count = (irqtp->preempt_count & ~SOFTIRQ_MASK) | > -(curtp->preempt_count & SOFTIRQ_MASK); > > - current->thread.ksp_limit = (unsigned long)irqtp + > - _ALIGN_UP(sizeof(struct thread_info), 16); > - > - call_handle_irq(irq, desc, irqtp, desc->handle_irq); > - current->thread.ksp_limit = saved_sp_limit; > - irqtp->task = NULL; > - > - /* Set any flag that may have been set on the > - * alternate stack > - */ > - if (irqtp->flags) > - set_bits(irqtp->flags, &curtp->flags); > } This function ends up as a single blank line ... > @@ -519,18 +480,64 @@ void do_IRQ(struct pt_regs *regs) >*/ > irq = ppc_md.get_irq(); > > - /* We can hard enable interrupts now */ > + /* We can hard enable interrupts now to allow perf interrupts */ > may_hard_irq_enable(); > > /* And finally process it */ > - if (irq != NO_IRQ) > - handle_one_irq(irq); then you remove the only call, so why not just remove the function completely? -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpeXLH2lyAd6.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
linux-next: build failure after merge of the akpm tree
Hi Andrew, After merging the akpm tree, linux-next builds (powerpc allmodconfig) fail like this: drivers/tty/ehv_bytechan.c:362:1: error: type defaults to 'int' in declaration of 'console_initcall' [-Werror=implicit-int] Caused by commit 0f01cf96c2d4 ("./Makefile: enable -Werror=implicit-int and -Werror=strict-prototypes by default") which has bee in linux-next since Aug 16. This commit exposed that fact that drivers/tty/ehv_bytechan.c can be built as a module, but has a console_initcall (which is not available to modules). This was originally introduced in commit dcd83aaff1c8 ("tty/powerpc: introduce the ePAPR embedded hypervisor byte channel driver") in v3.2. Anyone got a good solution? -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpNt0jEitsIn.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
linux-next: build failure after merge of the dt-rh tree
Hi Rob, After merging the dt-rh tree, today's linux-next build (powerpc ppc64_defconfig) failed like this: arch/powerpc/platforms/powernv/rng.c: In function 'rng_init_per_cpu': arch/powerpc/platforms/powernv/rng.c:64:2: error: implicit declaration of function 'of_get_ibm_chip_id' [-Werror=implicit-function-declaration] chip_id = of_get_ibm_chip_id(dn); ^ arch/powerpc/platforms/powernv/rng.c: In function 'rng_create': arch/powerpc/platforms/powernv/rng.c:85:2: error: implicit declaration of function 'of_iomap' [-Werror=implicit-function-declaration] rng->regs = of_iomap(dn, 0); ^ arch/powerpc/platforms/powernv/rng.c:85:12: error: assignment makes pointer from integer without a cast [-Werror] rng->regs = of_iomap(dn, 0); ^ Caused by commit a4da0d50b2a0 ("powerpc: Implement arch_get_random_long/int() for powernv") from the powerpc tree interacting with commit b5b4bb3f6a11 ("of: only include prom.h on sparc") from the dt-rh tree. I added this merge fix patch (which will need to be sent to Linus when these two trees get merged, or could be applied now to the powerpc tree): From: Stephen Rothwell Date: Mon, 28 Oct 2013 19:34:41 +1100 Subject: [PATCH] powerpc: add include of prom.h to fix powernv/rng.c build Signed-off-by: Stephen Rothwell --- arch/powerpc/platforms/powernv/rng.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/platforms/powernv/rng.c b/arch/powerpc/platforms/powernv/rng.c index 02db7d73cf8b..483b06640efb 100644 --- a/arch/powerpc/platforms/powernv/rng.c +++ b/arch/powerpc/platforms/powernv/rng.c @@ -11,10 +11,12 @@ #include #include +#include #include #include #include #include +#include #include -- 1.8.4.rc3 -- Cheers, Stephen Rothwells...@canb.auug.org.au pgp_LY3Q_v9MN.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
linux-next: manual merge of the dt-rh tree with the powerpc tree
Hi Rob, Today's linux-next merge of the dt-rh tree got a conflict in arch/powerpc/include/asm/prom.h between commit a3e31b458844 ("of: Move definition of of_find_next_cache_node into common code") from the powerpc tree and commit 0c3f061c195c ("of: implement of_node_to_nid as a weak function") from the dt-rh tree. I fixed it up (see below) and can carry the fix as necessary (no action is required). -- Cheers, Stephen Rothwells...@canb.auug.org.au diff --cc arch/powerpc/include/asm/prom.h index bf09e5a065b8,7687f82a3217.. --- a/arch/powerpc/include/asm/prom.h +++ b/arch/powerpc/include/asm/prom.h @@@ -44,13 -39,9 +39,6 @@@ void of_parse_dma_window(struct device_ extern void kdump_move_device_tree(void); - #ifdef CONFIG_NUMA - extern int of_node_to_nid(struct device_node *device); - #else - static inline int of_node_to_nid(struct device_node *device) { return 0; } - #endif - #define of_node_to_nid of_node_to_nid -/* cache lookup */ -struct device_node *of_find_next_cache_node(struct device_node *np); -- extern void of_instantiate_rtc(void); extern int of_get_ibm_chip_id(struct device_node *np); pgpWv4h0HrExv.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
linux-next: manual merge of the kvm-ppc tree with the tree
Hi Alexander, Today's linux-next merge of the kvm-ppc tree got a conflict in arch/powerpc/include/asm/processor.h between commit 51ae8d4a2b9e ("powerpc: move debug registers in a structure") from the powerpc tree and commit 95791988fec6 ("powerpc: move debug registers in a structure") from the kvm-ppc tree. Different version of the same patch. I used the powerpc tree version (there wer other changes there). -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpnANmNKFlzW.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
linux-next: manual merge of the leds tree with the powerpc tree
Hi Bryan, Today's linux-next merge of the leds tree got a conflict in include/linux/of.h between commit a3e31b458844 ("of: Move definition of of_find_next_cache_node into common code") from the powerpc tree and commit 954e04b9491a ("of: introduce of_get_available_child_count") from the leds tree. I fixed it up (see below) and can carry the fix as necessary (no action is required). -- Cheers, Stephen Rothwells...@canb.auug.org.au diff --cc include/linux/of.h index 2567ccd32482,54c25606a997.. --- a/include/linux/of.h +++ b/include/linux/of.h @@@ -228,8 -226,17 +228,19 @@@ static inline int of_get_child_count(co return num; } + static inline int of_get_available_child_count(const struct device_node *np) + { + struct device_node *child; + int num = 0; + + for_each_available_child_of_node(np, child) + num++; + + return num; + } + +/* cache lookup */ +extern struct device_node *of_find_next_cache_node(const struct device_node *); extern struct device_node *of_find_node_with_property( struct device_node *from, const char *prop_name); #define for_each_node_with_property(dn, prop_name) \ pgpHPj1eNAwDd.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: linux-next: manual merge of the dt-rh tree with the powerpc tree
Hi Rob, On Fri, 01 Nov 2013 17:24:42 -0500 Rob Herring wrote: > > On 11/01/2013 12:20 AM, Stephen Rothwell wrote: > > > > Today's linux-next merge of the dt-rh tree got a conflict in > > arch/powerpc/include/asm/prom.h between commit a3e31b458844 ("of: > > Move definition of of_find_next_cache_node into common code") from > > the powerpc tree and commit 0c3f061c195c ("of: implement > > of_node_to_nid as a weak function") from the dt-rh tree. > > Ben, I can pick these 2 patches up instead if you want to drop them > and avoid the conflict. The conflict is pretty trivial and so should not require any action. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpNqd1VdHul4.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
linux-next: some merging notes
Hi Linus, Just some notes about the current state of some of the merges in linux-next. The powerpc tree (git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git#next) contains a commit that breaks the building of lib/pSeries-reconfig-notifier-error-inject.c. I applied a patch to linux-next to disable CONFIG_PSERIES_RECONFIG_NOTIFIER_ERROR_INJECT. The virtio tree (git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux.git#virtio-next) has a conflict with the net-next tree (git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git#master) that requires the following extra fix up patch: diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 33d6f6f..8afe32d 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -147,7 +147,7 @@ struct padded_vnet_hdr { */ static int vq2txq(struct virtqueue *vq) { - return (virtqueue_get_queue_index(vq) - 1) / 2; + return (vq->index - 1) / 2; } static int txq2vq(int txq) @@ -157,7 +157,7 @@ static int txq2vq(int txq) static int vq2rxq(struct virtqueue *vq) { - return virtqueue_get_queue_index(vq) / 2; + return vq->index / 2; } static int rxq2vq(int rxq) The tty tree (git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git#tty-next) contains a new driver (SystemBase Multi-2/PCI) that fails to build for (at least) the powerpc architecture. I have applied a patch that disables the driver (I made CONFIG_SB105X in drivers/staging/sb105x/Kconfig depend on BROKEN). The arm-soc tree (git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc.git#for-next) (which you will get in pieces) has a merge conflict against the omap_dss2 tree (git://gitorious.org/linux-omap-dss2/linux.git#for-next) that requires the followin fix up patch: diff --git a/arch/arm/mach-omap2/common.c b/arch/arm/mach-omap2/common.c index 5c2fd48..2dabb9e 100644 --- a/arch/arm/mach-omap2/common.c +++ b/arch/arm/mach-omap2/common.c @@ -16,8 +16,6 @@ #include #include -#include - #include "common.h" #include "omap-secure.h" @@ -32,7 +30,6 @@ int __weak omap_secure_ram_reserve_memblock(void) void __init omap_reserve(void) { - omap_vram_reserve_sdram_memblock(); omap_dsp_reserve_sdram_memblock(); omap_secure_ram_reserve_memblock(); omap_barrier_reserve_memblock(); Part of the arm-soc tree also requires the following fixup patch due to a conflict with the powerpc tree (patch from N, Mugunthan V ): diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index 099e406..5fd5e23 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c @@ -192,7 +192,7 @@ static struct device_node * __init omap_get_timer_dt (struct of_device_id *match, continue; } - prom_add_property(np, &device_disabled); + of_add_property(np, &device_disabled); return np; } There are also lots of conflicts due to the __dev* annotation removals - a lot of which are in the driver-core tree (git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git#driver-core-next). -- Cheers, Stephen Rothwells...@canb.auug.org.au pgplLaHT2QYlU.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
linux-next: build warning after merge of the final tree
Hi all, After merging the final tree, today's linux-next build (powerpc allnoconfig) produced this warning: warning: (PPC) selects SPARSE_IRQ which has unmet direct dependencies (HAVE_GENERIC_HARDIRQS && (IRQ_DOMAIN && DEBUG_FS || MAY_HAVE_SPARSE_IRQ)) I don't know what introduced that. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpxcpVMyfcPF.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: linux-next: build warning after merge of the final tree
Hi all, On Mon, 17 Dec 2012 14:22:38 +1100 Stephen Rothwell wrote: > > After merging the final tree, today's linux-next build (powerpc allnoconfig) > produced this warning: > > warning: (PPC) selects SPARSE_IRQ which has unmet direct dependencies > (HAVE_GENERIC_HARDIRQS && (IRQ_DOMAIN && DEBUG_FS || MAY_HAVE_SPARSE_IRQ)) > > I don't know what introduced that. Actually probably caused by commit a1eaa3bc8247 ("Kconfig: fix Irq Subsystem menu") from the akpm tree. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpAfjrTYrnYx.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
linux-next: build failure after merge of the final tree (powerpc tree related)
Hi all, After merging the final tree, today's linux-next build (powerpc allyesconfig) failed like this: arch/powerpc/kernel/kgdb.c: In function 'kgdb_arch_exit': arch/powerpc/kernel/kgdb.c:492:2: error: '__debugger_breakx_match' undeclared (first use in this function) Caused by commit 9422de3e953d ("powerpc: Hardware breakpoints rewrite to handle non DABR breakpoint registers"). I applied "powerpc: Fix typo in breakpoint kgdb code" from Mikey for this. arch/powerpc/kernel/exceptions-64s.S: Assembler messages: arch/powerpc/kernel/exceptions-64s.S:1204: Error: attempt to move .org backwards Not sure what caused that - probably a combination of patches adding code low down. I have just left this broken for today. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpnvRx6z7fjt.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
linux-next: build failure after merge of the tip tree
Hi all, After merging the tip tree, today's linux-next build (powerpc ppc64_defconfig) failed like this: arch/powerpc/perf/power7-pmu.c:397:2: error: initialization from incompatible pointer type [-Werror] arch/powerpc/perf/power7-pmu.c:397:2: error: (near initialization for 'power7_events_attr[0]') [-Werror] arch/powerpc/perf/power7-pmu.c:398:2: error: initialization from incompatible pointer type [-Werror] arch/powerpc/perf/power7-pmu.c:398:2: error: (near initialization for 'power7_events_attr[1]') [-Werror] arch/powerpc/perf/power7-pmu.c:399:2: error: initialization from incompatible pointer type [-Werror] arch/powerpc/perf/power7-pmu.c:399:2: error: (near initialization for 'power7_events_attr[2]') [-Werror] arch/powerpc/perf/power7-pmu.c:400:2: error: initialization from incompatible pointer type [-Werror] arch/powerpc/perf/power7-pmu.c:400:2: error: (near initialization for 'power7_events_attr[3]') [-Werror] arch/powerpc/perf/power7-pmu.c:401:2: error: initialization from incompatible pointer type [-Werror] arch/powerpc/perf/power7-pmu.c:401:2: error: (near initialization for 'power7_events_attr[4]') [-Werror] arch/powerpc/perf/power7-pmu.c:402:2: error: initialization from incompatible pointer type [-Werror] arch/powerpc/perf/power7-pmu.c:402:2: error: (near initialization for 'power7_events_attr[5]') [-Werror] arch/powerpc/perf/power7-pmu.c:403:2: error: initialization from incompatible pointer type [-Werror] arch/powerpc/perf/power7-pmu.c:403:2: error: (near initialization for 'power7_events_attr[6]') [-Werror] arch/powerpc/perf/power7-pmu.c:404:2: error: initialization from incompatible pointer type [-Werror] arch/powerpc/perf/power7-pmu.c:404:2: error: (near initialization for 'power7_events_attr[7]') [-Werror] arch/powerpc/perf/power7-pmu.c:406:2: error: initialization from incompatible pointer type [-Werror] arch/powerpc/perf/power7-pmu.c:406:2: error: (near initialization for 'power7_events_attr[8]') [-Werror] arch/powerpc/perf/power7-pmu.c:407:2: error: initialization from incompatible pointer type [-Werror] arch/powerpc/perf/power7-pmu.c:407:2: error: (near initialization for 'power7_events_attr[9]') [-Werror] arch/powerpc/perf/power7-pmu.c:408:2: error: initialization from incompatible pointer type [-Werror] arch/powerpc/perf/power7-pmu.c:408:2: error: (near initialization for 'power7_events_attr[10]') [-Werror] arch/powerpc/perf/power7-pmu.c:409:2: error: initialization from incompatible pointer type [-Werror] arch/powerpc/perf/power7-pmu.c:409:2: error: (near initialization for 'power7_events_attr[11]') [-Werror] arch/powerpc/perf/power7-pmu.c:410:2: error: initialization from incompatible pointer type [-Werror] arch/powerpc/perf/power7-pmu.c:410:2: error: (near initialization for 'power7_events_attr[12]') [-Werror] arch/powerpc/perf/power7-pmu.c:411:2: error: initialization from incompatible pointer type [-Werror] arch/powerpc/perf/power7-pmu.c:411:2: error: (near initialization for 'power7_events_attr[13]') [-Werror] arch/powerpc/perf/power7-pmu.c:412:2: error: initialization from incompatible pointer type [-Werror] arch/powerpc/perf/power7-pmu.c:412:2: error: (near initialization for 'power7_events_attr[14]') [-Werror] arch/powerpc/perf/power7-pmu.c:413:2: error: initialization from incompatible pointer type [-Werror] arch/powerpc/perf/power7-pmu.c:413:2: error: (near initialization for 'power7_events_attr[15]') [-Werror] Caused by commit 1c53a270724d ("perf/POWER7: Make generic event translations available in sysfs"). I have used the tip tree from 20130128 for today. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgp3Y5G9XwCFF.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 4/8] cputime: Generic on-demand virtual cputime accounting
Hi Frederic, On Mon, 28 Jan 2013 20:04:01 +0100 Frederic Weisbecker wrote: > > If we want to stop the tick further idle, we need to be > able to account the cputime without using the tick. > > Virtual based cputime accounting solves that problem by > hooking into kernel/user boundaries. > > However implementing CONFIG_VIRT_CPU_ACCOUNTING require > low level hooks and involves more overhead. But we already > have a generic context tracking subsystem that is required > for RCU needs by archs which plan to shut down the tick > outside idle. > > This patch implements a generic virtual based cputime > accounting that relies on these generic kernel/user hooks. > > There are some upsides of doing this: > > - This requires no arch code to implement CONFIG_VIRT_CPU_ACCOUNTING > if context tracking is already built (already necessary for RCU in full > tickless mode). > > - We can rely on the generic context tracking subsystem to dynamically > (de)activate the hooks, so that we can switch anytime between virtual > and tick based accounting. This way we don't have the overhead > of the virtual accounting when the tick is running periodically. > > And one downside: > > - There is probably more overhead than a native virtual based cputime > accounting. But this relies on hooks that are already set anyway. > > Signed-off-by: Frederic Weisbecker > Cc: Andrew Morton > Cc: Ingo Molnar > Cc: Li Zhong > Cc: Namhyung Kim > Cc: Paul E. McKenney > Cc: Paul Gortmaker > Cc: Peter Zijlstra > Cc: Steven Rostedt > Cc: Thomas Gleixner This patch has the side effect of changing the default configurations: (This is PowerPC pseries_defconfig before/after this patch) @@ -119,8 +120,8 @@ # # CPU/Task time and stats accounting # -# CONFIG_TICK_CPU_ACCOUNTING is not set -CONFIG_VIRT_CPU_ACCOUNTING=y +CONFIG_TICK_CPU_ACCOUNTING=y +# CONFIG_VIRT_CPU_ACCOUNTING_NATIVE is not set # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_TASKSTATS=y CONFIG_TASK_DELAY_ACCT=y I don't know if that was deliberate, but it was suprising. I noticed when this patch entered next-20130207. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpDrCudsO4lC.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 4/8] cputime: Generic on-demand virtual cputime accounting
Hi Frederic, On Fri, 8 Feb 2013 14:07:49 +1100 Stephen Rothwell wrote: > > This patch has the side effect of changing the default configurations: > (This is PowerPC pseries_defconfig before/after this patch) > > @@ -119,8 +120,8 @@ > # > # CPU/Task time and stats accounting > # > -# CONFIG_TICK_CPU_ACCOUNTING is not set > -CONFIG_VIRT_CPU_ACCOUNTING=y > +CONFIG_TICK_CPU_ACCOUNTING=y > +# CONFIG_VIRT_CPU_ACCOUNTING_NATIVE is not set > # CONFIG_BSD_PROCESS_ACCT is not set > CONFIG_TASKSTATS=y > CONFIG_TASK_DELAY_ACCT=y > > I don't know if that was deliberate, but it was suprising. I noticed > when this patch entered next-20130207. I suspect that this is caused by the changes to init/Kconfig: diff --git a/init/Kconfig b/init/Kconfig index be8b7f5..a05f843 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -326,6 +326,9 @@ source "kernel/time/Kconfig" menu "CPU/Task time and stats accounting" +config VIRT_CPU_ACCOUNTING + bool + choice prompt "Cputime accounting" default TICK_CPU_ACCOUNTING if !PPC64 The next line of context is: default VIRT_CPU_ACCOUNTING if PPC64 Which may have needed changing as well? Indeed, changing that to VIRT_CPU_ACCOUNTING_NATIVE restores the old defaults. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpS_r01IKW8j.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH] cputime: restore CPU_ACCOUNTING config defaults for PPC64
Commit abf917cd91cb ("cputime: Generic on-demand virtual cputime accounting") inadvertantly changed the default CPU_ACCOUNTING config for PPC64. Repair that. Signed-off-by: Stephen Rothwell --- init/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init/Kconfig b/init/Kconfig index ed24d1b..ccd1ca5 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -301,7 +301,7 @@ config VIRT_CPU_ACCOUNTING choice prompt "Cputime accounting" default TICK_CPU_ACCOUNTING if !PPC64 - default VIRT_CPU_ACCOUNTING if PPC64 + default VIRT_CPU_ACCOUNTING_NATIVE if PPC64 # Kind of a stub config for the pure tick based cputime accounting config TICK_CPU_ACCOUNTING -- 1.8.1 -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpiMuigbWfgh.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] Centralise CONFIG_ARCH_NO_VIRT_TO_BUS
Hi James, On Mon, 11 Feb 2013 11:57:28 + James Hogan wrote: > > On 12/11/12 21:26, Stephen Rothwell wrote: > > Make if easier for more architectures to select it and thus disable > > drivers that use virt_to_bus(). > > > > Signed-off-by: Stephen Rothwell > > I was just wondering what the status of this patch is? It was in -next > for a while but seems to have disappeared. Yeah, I think Andrew dropped it in favour of a more complete solution which I haven't written yet. Let me dig out the emails and have a shot. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpG0MCa70w7R.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH] Centralise CONFIG_ARCH_NO_VIRT_TO_BUS
Change it to CONFIG_HAVE_VIRT_TO_BUS and set it in all architecures that already provide virt_to_bus(). Signed-off-by: Stephen Rothwell --- arch/Kconfig| 7 +++ arch/alpha/Kconfig | 1 + arch/arm/Kconfig| 1 + arch/avr32/Kconfig | 1 + arch/blackfin/Kconfig | 1 + arch/cris/Kconfig | 1 + arch/frv/Kconfig| 1 + arch/h8300/Kconfig | 1 + arch/ia64/Kconfig | 1 + arch/m32r/Kconfig | 1 + arch/m68k/Kconfig | 1 + arch/microblaze/Kconfig | 1 + arch/mips/Kconfig | 1 + arch/mn10300/Kconfig| 1 + arch/openrisc/Kconfig | 1 + arch/parisc/Kconfig | 1 + arch/powerpc/Kconfig| 4 +--- arch/s390/Kconfig | 1 + arch/score/Kconfig | 1 + arch/sh/Kconfig | 3 --- arch/sparc/Kconfig | 3 --- arch/tile/Kconfig | 1 + arch/unicore32/Kconfig | 1 + arch/x86/Kconfig| 1 + arch/xtensa/Kconfig | 1 + mm/Kconfig | 2 +- 26 files changed, 30 insertions(+), 10 deletions(-) This is based on v3.8-rc7. I think I got them all (apart from arc and metag). diff --git a/arch/Kconfig b/arch/Kconfig index 7f8f281..7721b40 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -291,6 +291,13 @@ config ARCH_WANT_OLD_COMPAT_IPC select ARCH_WANT_COMPAT_IPC_PARSE_VERSION bool +config HAVE_VIRT_TO_BUS + bool + help + An architecture should select this if it implements the + deprecated interface virt_to_bus(). All new architectures + should probably not select this. + config HAVE_ARCH_SECCOMP_FILTER bool help diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index 9d5904c..63f49b1 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig @@ -10,6 +10,7 @@ config ALPHA select HAVE_PERF_EVENTS select HAVE_DMA_ATTRS select HAVE_GENERIC_HARDIRQS + select HAVE_VIRT_TO_BUS select GENERIC_IRQ_PROBE select AUTO_IRQ_AFFINITY if SMP select GENERIC_IRQ_SHOW diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 67874b8..23f99e1 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -49,6 +49,7 @@ config ARM select HAVE_REGS_AND_STACK_ACCESS_API select HAVE_SYSCALL_TRACEPOINTS select HAVE_UID16 + select HAVE_VIRT_TO_BUS select KTIME_SCALAR select PERF_USE_VMALLOC select RTC_LIB diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig index 2ae6591..9b89257 100644 --- a/arch/avr32/Kconfig +++ b/arch/avr32/Kconfig @@ -7,6 +7,7 @@ config AVR32 select HAVE_OPROFILE select HAVE_KPROBES select HAVE_GENERIC_HARDIRQS + select HAVE_VIRT_TO_BUS select GENERIC_IRQ_PROBE select GENERIC_ATOMIC64 select HARDIRQS_SW_RESEND diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index b6f3ad5..834a6e3 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig @@ -34,6 +34,7 @@ config BLACKFIN select ARCH_HAVE_CUSTOM_GPIO_H select ARCH_WANT_OPTIONAL_GPIOLIB select HAVE_UID16 + select HAVE_VIRT_TO_BUS select ARCH_WANT_IPC_PARSE_VERSION select HAVE_GENERIC_HARDIRQS select GENERIC_ATOMIC64 diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig index c59a01d..abe1fd2 100644 --- a/arch/cris/Kconfig +++ b/arch/cris/Kconfig @@ -43,6 +43,7 @@ config CRIS select GENERIC_ATOMIC64 select HAVE_GENERIC_HARDIRQS select HAVE_UID16 + select HAVE_VIRT_TO_BUS select ARCH_WANT_IPC_PARSE_VERSION select GENERIC_IRQ_SHOW select GENERIC_IOMAP diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig index 9d26264..8ca9099 100644 --- a/arch/frv/Kconfig +++ b/arch/frv/Kconfig @@ -7,6 +7,7 @@ config FRV select HAVE_PERF_EVENTS select HAVE_UID16 select HAVE_GENERIC_HARDIRQS + select HAVE_VIRT_TO_BUS select GENERIC_IRQ_SHOW select HAVE_DEBUG_BUGVERBOSE select ARCH_HAVE_NMI_SAFE_CMPXCHG diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig index 2d2efb6..ce7c55e 100644 --- a/arch/h8300/Kconfig +++ b/arch/h8300/Kconfig @@ -5,6 +5,7 @@ config H8300 select HAVE_GENERIC_HARDIRQS select GENERIC_ATOMIC64 select HAVE_UID16 + select HAVE_VIRT_TO_BUS select ARCH_WANT_IPC_PARSE_VERSION select GENERIC_IRQ_SHOW select GENERIC_CPU_DEVICES diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 3279646..4c09006 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig @@ -26,6 +26,7 @@ config IA64 select HAVE_MEMBLOCK select HAVE_MEMBLOCK_NODE_MAP select HAVE_VIRT_CPU_ACCOUNTING + select HAVE_VIRT_TO_BUS select ARCH_DISCARD_MEMBLOCK select GENERIC_IRQ_PROBE select GENERIC_PENDING_IRQ if SMP diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig index f807721..9262381 100644 --- a/arch/m32r/Kconfig +++ b/arch/m32r/Kconfig @@ -10,6 +10,7 @@ config M32R select
linux-next: manual merge of the signal tree with the powerpc tree
Hi Al, Today's linux-next merge of the signal tree got conflicts in arch/powerpc/kernel/signal_32.c and arch/powerpc/kernel/signal_64.c between commit 2b0a576d15e0 ("powerpc: Add new transactional memory state to the signal context") from the powerpc tree and commit 7cce246557bf ("powerpc: switch to generic sigaltstack") from the signal tree. I fixed it up (I think - see below) and can carry the fix as necessary (no action is required). -- Cheers, Stephen Rothwells...@canb.auug.org.au diff --cc arch/powerpc/kernel/signal_32.c index e4a88d3,802ab5e..000 --- a/arch/powerpc/kernel/signal_32.c +++ b/arch/powerpc/kernel/signal_32.c @@@ -817,223 -513,7 +742,140 @@@ static long restore_user_regs(struct pt return 0; } +#ifdef CONFIG_PPC_TRANSACTIONAL_MEM +/* + * Restore the current user register values from the user stack, except for + * MSR, and recheckpoint the original checkpointed register state for processes + * in transactions. + */ +static long restore_tm_user_regs(struct pt_regs *regs, + struct mcontext __user *sr, + struct mcontext __user *tm_sr) +{ + long err; + unsigned long msr; +#ifdef CONFIG_VSX + int i; +#endif + + /* + * restore general registers but not including MSR or SOFTE. Also + * take care of keeping r2 (TLS) intact if not a signal. + * See comment in signal_64.c:restore_tm_sigcontexts(); + * TFHAR is restored from the checkpointed NIP; TEXASR and TFIAR + * were set by the signal delivery. + */ + err = restore_general_regs(regs, tm_sr); + err |= restore_general_regs(¤t->thread.ckpt_regs, sr); + + err |= __get_user(current->thread.tm_tfhar, &sr->mc_gregs[PT_NIP]); + + err |= __get_user(msr, &sr->mc_gregs[PT_MSR]); + if (err) + return 1; + + /* Restore the previous little-endian mode */ + regs->msr = (regs->msr & ~MSR_LE) | (msr & MSR_LE); + + /* + * Do this before updating the thread state in + * current->thread.fpr/vr/evr. That way, if we get preempted + * and another task grabs the FPU/Altivec/SPE, it won't be + * tempted to save the current CPU state into the thread_struct + * and corrupt what we are writing there. + */ + discard_lazy_cpu_state(); + +#ifdef CONFIG_ALTIVEC + regs->msr &= ~MSR_VEC; + if (msr & MSR_VEC) { + /* restore altivec registers from the stack */ + if (__copy_from_user(current->thread.vr, &sr->mc_vregs, + sizeof(sr->mc_vregs)) || + __copy_from_user(current->thread.transact_vr, + &tm_sr->mc_vregs, + sizeof(sr->mc_vregs))) + return 1; + } else if (current->thread.used_vr) { + memset(current->thread.vr, 0, ELF_NVRREG * sizeof(vector128)); + memset(current->thread.transact_vr, 0, + ELF_NVRREG * sizeof(vector128)); + } + + /* Always get VRSAVE back */ + if (__get_user(current->thread.vrsave, + (u32 __user *)&sr->mc_vregs[32]) || + __get_user(current->thread.transact_vrsave, + (u32 __user *)&tm_sr->mc_vregs[32])) + return 1; +#endif /* CONFIG_ALTIVEC */ + + regs->msr &= ~(MSR_FP | MSR_FE0 | MSR_FE1); + + if (copy_fpr_from_user(current, &sr->mc_fregs) || + copy_transact_fpr_from_user(current, &tm_sr->mc_fregs)) + return 1; + +#ifdef CONFIG_VSX + regs->msr &= ~MSR_VSX; + if (msr & MSR_VSX) { + /* + * Restore altivec registers from the stack to a local + * buffer, then write this out to the thread_struct + */ + if (copy_vsx_from_user(current, &sr->mc_vsregs) || + copy_transact_vsx_from_user(current, &tm_sr->mc_vsregs)) + return 1; + } else if (current->thread.used_vsr) + for (i = 0; i < 32 ; i++) { + current->thread.fpr[i][TS_VSRLOWOFFSET] = 0; + current->thread.transact_fpr[i][TS_VSRLOWOFFSET] = 0; + } +#endif /* CONFIG_VSX */ + +#ifdef CONFIG_SPE + /* SPE regs are not checkpointed with TM, so this section is + * simply the same as in restore_user_regs(). + */ + regs->msr &= ~MSR_SPE; + if (msr & MSR_SPE) { + if (__copy_from_user(current->thread.evr, &sr->mc_vregs, + ELF_NEVRREG * sizeof(u32))) + return 1;
Re: linux-next: manual merge of the signal tree with the powerpc tree
Hi Ben, On Thu, 21 Feb 2013 14:43:49 -0600 Michael Neuling wrote: > > Benjamin Herrenschmidt wrote: > > > On Thu, 2013-02-21 at 15:52 +1100, Stephen Rothwell wrote: > > > > > > Today's linux-next merge of the signal tree got conflicts in > > > arch/powerpc/kernel/signal_32.c and arch/powerpc/kernel/signal_64.c > > > between commit 2b0a576d15e0 ("powerpc: Add new transactional memory state > > > to the signal context") from the powerpc tree and commit 7cce246557bf > > > ("powerpc: switch to generic sigaltstack") from the signal tree. > > > > > > I fixed it up (I think - see below) and can carry the fix as necessary > > > (no action is required). > > > > Mikey, can you check everything's all right ? > > > > I'm happy to wait for Al stuff to go in first & fixup the conflict > > before I send the pull request to Linus. I'm off travelling around but I > > should be able to get stuff out this week-end. > > The merge looks fine to me. My TM signal tests still pass on > next-20130221. I think all you (or Al) need do is mention it to Linus when you send the pull request - he is usually smart enough to fix these things :-) and likes to see the interactions. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpJRqD7RhIKX.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] powerpc: Wireup the kcmp syscall to sys_ni
Hi Tony, On Tue, 5 Mar 2013 11:39:54 +1100 Tony Breeds wrote: > > diff --git a/arch/powerpc/include/asm/systbl.h > b/arch/powerpc/include/asm/systbl.h > index 535b6d8..289bb52 100644 > --- a/arch/powerpc/include/asm/systbl.h > +++ b/arch/powerpc/include/asm/systbl.h > @@ -358,3 +358,4 @@ SYSCALL_SPU(setns) > COMPAT_SYS(process_vm_readv) > COMPAT_SYS(process_vm_writev) > SYSCALL(finit_module) > +SYSCALL(ni_syscall) It is probably worth commenting what syscall should be there. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpqTloIqvkJg.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH] powerpc: make sure that we alays include CONFIG_BINFMT_ELF
Our kernel is not much good without BINFMT_ELF and this fixes a build warning on 64 bit allnoconfig builds: warning: (COMPAT) selects COMPAT_BINFMT_ELF which has unmet direct dependencies (COMPAT && BINFMT_ELF) Signed-off-by: Stephen Rothwell --- arch/powerpc/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index b89d7eb..a091c01 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -90,6 +90,7 @@ config GENERIC_GPIO config PPC bool default y + select BINFMT_ELF select OF select OF_EARLY_FLATTREE select HAVE_FTRACE_MCOUNT_RECORD -- 1.8.1 -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpvgCHNoScW7.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
linux-next: build failure after merge of the final tree (linus' tree related)
Hi all, After merging the final tree, today's linux-next build (powerpc64 allnoconfig) failed like this: In file included from arch/powerpc/include/asm/kvm_ppc.h:33:0, from arch/powerpc/kernel/setup_64.c:67: arch/powerpc/include/asm/kvm_book3s.h:65:20: error: field 'pte' has incomplete type arch/powerpc/include/asm/kvm_book3s.h:69:18: error: field 'vcpu' has incomplete type arch/powerpc/include/asm/kvm_book3s.h:98:34: error: 'HPTEG_HASH_NUM_PTE' undeclared here (not in a function) arch/powerpc/include/asm/kvm_book3s.h:99:39: error: 'HPTEG_HASH_NUM_PTE_LONG' undeclared here (not in a function) arch/powerpc/include/asm/kvm_book3s.h:100:35: error: 'HPTEG_HASH_NUM_VPTE' undeclared here (not in a function) arch/powerpc/include/asm/kvm_book3s.h:101:40: error: 'HPTEG_HASH_NUM_VPTE_LONG' undeclared here (not in a function) arch/powerpc/include/asm/kvm_book3s.h:129:4: error: 'struct kvm_run' declared inside parameter list [-Werror] arch/powerpc/include/asm/kvm_book3s.h:129:4: error: its scope is only this definition or declaration, which is probably not what you want [-Werror] And it went downhill form there. This build does not have CONFIG_KVM defined. Caused by commit f445f11eb2cc ("KVM: allow host header to be included even for !CONFIG_KVM") which clearly never saw the light of day in linux-next :-( It would have been nice if the "compile failure when KVM is not enabled" was included in the commit log so that we could figure out exactly what needed to be protected instead of just effectively removing the whole file. I just reverted that commit for today. Can someone please supply a better solution or even just more information about what that commit was solving. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpgr1EPTSjiM.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH] KVM: fix powerpc build error for !CONFIG_KVM
Fixes these build error when CONFIG_KVM is not defined: In file included from arch/powerpc/include/asm/kvm_ppc.h:33:0, from arch/powerpc/kernel/setup_64.c:67: arch/powerpc/include/asm/kvm_book3s.h:65:20: error: field 'pte' has incomplete type arch/powerpc/include/asm/kvm_book3s.h:69:18: error: field 'vcpu' has incomplete type arch/powerpc/include/asm/kvm_book3s.h:98:34: error: 'HPTEG_HASH_NUM_PTE' undeclared here (not in a function) arch/powerpc/include/asm/kvm_book3s.h:99:39: error: 'HPTEG_HASH_NUM_PTE_LONG' undeclared here (not in a function) arch/powerpc/include/asm/kvm_book3s.h:100:35: error: 'HPTEG_HASH_NUM_VPTE' undeclared here (not in a function) arch/powerpc/include/asm/kvm_book3s.h:101:40: error: 'HPTEG_HASH_NUM_VPTE_LONG' undeclared here (not in a function) arch/powerpc/include/asm/kvm_book3s.h:129:4: error: 'struct kvm_run' declared inside parameter list [-Werror] arch/powerpc/include/asm/kvm_book3s.h:129:4: error: its scope is only this definition or declaration, which is probably not what you want [-Werror] ... and so on ... This was introduced by commit f445f11eb2cc265dd47da5b2e864df46cd6e5a82 "KVM: allow host header to be included even for !CONFIG_KVM" Cc: Kevin Hilman Cc: Marcelo Tosatti Signed-off-by: Stephen Rothwell --- include/linux/kvm_host.h | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) Kevin, does this still fix the error that commit f445f11eb2cc265dd47da5b2e864df46cd6e5a82 was fixing? diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index a942863..90ebec0 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -1,8 +1,6 @@ #ifndef __KVM_HOST_H #define __KVM_HOST_H -#if IS_ENABLED(CONFIG_KVM) - /* * This work is licensed under the terms of the GNU GPL, version 2. See * the COPYING file in the top-level directory. @@ -751,6 +749,7 @@ static inline int kvm_deassign_device(struct kvm *kvm, } #endif /* CONFIG_IOMMU_API */ +#if IS_ENABLED(CONFIG_KVM) static inline void __guest_enter(void) { /* @@ -770,6 +769,10 @@ static inline void __guest_exit(void) vtime_account_system(current); current->flags &= ~PF_VCPU; } +#else +static inline void __guest_enter(void) { return; } +static inline void __guest_exit(void) { return; } +#endif /* IS_ENABLED(CONFIG_KVM) */ #ifdef CONFIG_CONTEXT_TRACKING extern void guest_enter(void); @@ -1057,8 +1060,4 @@ static inline bool kvm_vcpu_eligible_for_directed_yield(struct kvm_vcpu *vcpu) } #endif /* CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT */ -#else -static inline void __guest_enter(void) { return; } -static inline void __guest_exit(void) { return; } -#endif /* IS_ENABLED(CONFIG_KVM) */ #endif -- 1.8.1 -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpIAWOG6PhY_.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] PowerPC:kernel: make additional room in exception vector area
Hi all, On Mon, 25 Mar 2013 09:31:31 +0800 Chen Gang wrote: > > The FWNMI region is fixed at 0x7000 and the vector are now overflowing > that with allmodconfig. Fix that by moving slb_miss_realmode code out > of that region as it doesn't need to be that close to the call sites > (it is a _GLOBAL function) > > Signed-off-by: Chen Gang > --- > arch/powerpc/kernel/exceptions-64s.S | 144 > +- > 1 files changed, 72 insertions(+), 72 deletions(-) Thanks, Chen, I have applied this to linux-next today and pending the builds overnight, will send it to Linus tomorrow or Wednesday. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpo459H6LW_Y.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] PowerPC:kernel: make additional room in exception vector area
Hi Mikey, On Mon, 25 Mar 2013 17:07:17 +1100 Michael Neuling wrote: > > FYI you're gonna need this one also to make allmodconfig work. > > http://patchwork.ozlabs.org/patch/230244/ Thanks for that, I will add it to linux-next tomorrow. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpIR4hDOh25W.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[git pull] Please pull some powerpc build fixes
The following changes since commit 3912a677f68f6084e0a7b6a1a29310ac1b083713: Merge tag 'pinctrl-fixes-for-v3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl (2013-03-24 10:11:29 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/sfr/next-fixes.git tags/for-linus for you to fetch changes up to f9294e989fa6f2990da155242db03cea1550cac8: powerpc: define the conditions where the ePAPR idle hcall can be supported (2013-03-26 08:47:27 +1100) Just a couple of build fixes for powerpc all{mod,yes}config. Submitted by me since BenH is on vacation. Chen Gang (1): powerpc: make additional room in exception vector area Stuart Yoder (1): powerpc: define the conditions where the ePAPR idle hcall can be supported arch/powerpc/kernel/epapr_paravirt.c | 6 ++ arch/powerpc/kernel/exceptions-64s.S | 144 +-- 2 files changed, 78 insertions(+), 72 deletions(-) -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpopc7kpAq_y.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH] powerpc: fix annotation of fake_numa_create_new_node()
This function has always been marked as __cpuinit, but is only called from functions marked as __init and references an __initdata variable. So change its annotation to __init. Fixes this build warning: WARNING: arch/powerpc/mm/built-in.o(.cpuinit.text+0x86): Section mismatch in reference from the function .fake_numa_create_new_node() to the variable .init.data:cmdline The function __cpuinit .fake_numa_create_new_node() references a variable __initdata cmdline. If cmdline is only used by .fake_numa_create_new_node then annotate cmdline with a matching annotation. Signed-off-by: Stephen Rothwell --- arch/powerpc/mm/numa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index bba87ca..715cab7 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c @@ -79,7 +79,7 @@ static void __init setup_node_to_cpumask_map(void) dbg("Node to cpumask map for %d nodes\n", nr_node_ids); } -static int __cpuinit fake_numa_create_new_node(unsigned long end_pfn, +static int __init fake_numa_create_new_node(unsigned long end_pfn, unsigned int *nid) { unsigned long long mem; -- 1.8.1 -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpapQ5yneHNS.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[git pull] Please pull another powerpc fix
The following changes since commit 875b7679abbb232b584f2eec59fa6e45690dd6c4: Merge git://git.kernel.org/pub/scm/virt/kvm/kvm (2013-04-07 13:01:25 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/sfr/next-fixes.git tags/for-linus for you to fetch changes up to 9fb2640159f9d4f5a2a9d60e490482d4cbecafdb: powerpc: pSeries_lpar_hpte_remove fails from Adjunct partition being performed before the ANDCOND test (2013-04-08 15:19:09 +1000) A single BUG_ON fix for a condition that could happen for machines with certain hardware installed. Michael Wolf (1): powerpc: pSeries_lpar_hpte_remove fails from Adjunct partition being performed before the ANDCOND test arch/powerpc/platforms/pseries/lpar.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpV_wtUOmkJX.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] of: remove the unnecessary of_node_put for of_parse_phandle_with_args()
Hi, On Tue, 9 Apr 2013 14:56:09 +0800 wrote: > > From: Tang Yuantian > > As the function itself says it is caller's responsibility to call the > of_node_put(). So, remove it on success to keep the reference count > correct. > > Signed-off-by: Tang Yuantian > --- > drivers/of/base.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/of/base.c b/drivers/of/base.c > index 321d3ef..e8b4c28 100644 > --- a/drivers/of/base.c > +++ b/drivers/of/base.c > @@ -1168,9 +1168,6 @@ static int __of_parse_phandle_with_args(const struct > device_node *np, > out_args->args[i] = > be32_to_cpup(list++); > } > > - /* Found it! return success */ > - if (node) > - of_node_put(node); Actually, if out_args is NULL, you should do the of_node_put(node), so probably the correct fix is to add an "else" before the above "if" (and move the comment). -- Cheers, Stephen Rothwells...@canb.auug.org.au http://www.canb.auug.org.au/~sfr/ pgpPZvIEwaoZJ.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] of: remove the unnecessary of_node_put for of_parse_phandle_with_args()
Hi, On Wed, 10 Apr 2013 09:06:11 + Tang Yuantian-B29983 wrote: > > Yes, I already sent out the v2 patch. > Please see: http://patchwork.ozlabs.org/patch/235288/ Thanks. I should read all my email before replying to it :-) -- Cheers, Stephen Rothwells...@canb.auug.org.au pgps3SCj2uKcu.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
PowerPC regression patches
Hi all, If there any patches pending for regressions in v3.9, please send me pointers to them in patchwork, or on the mailing list. I will try to get a last pull request to Linus early next week. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpxzUWKUt6oH.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 1/2] powerpc: remove section changes from _GLOBAL() and friends
Hi Michael, On Mon, 15 Apr 2013 22:00:17 +1000 Michael Ellerman wrote: > > On Thu, Nov 29, 2012 at 10:55:25AM +1100, Stephen Rothwell wrote: > > These sometimes produce unexpected results and make it hard to put the > > start up code (for 64 bit) into the .head.text section. > > ... > > > diff --git a/arch/powerpc/kernel/head_fsl_booke.S > > b/arch/powerpc/kernel/head_fsl_booke.S > > index 6f62a73..4ec5625 100644 > > --- a/arch/powerpc/kernel/head_fsl_booke.S > > +++ b/arch/powerpc/kernel/head_fsl_booke.S > > @@ -776,6 +776,8 @@ tlb_write_entry: > > mfspr r10, SPRN_SPRG_RSCRATCH0 > > rfi /* Force context change */ > > > > + ,text > > + > > I'm assuming this should be .text ? Indeed. Oops :-) -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpOtP18MXk05.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 1/2] powerpc: remove section changes from _GLOBAL() and friends
Hi Michael, On Mon, 15 Apr 2013 23:30:40 +1000 Stephen Rothwell wrote: > > On Mon, 15 Apr 2013 22:00:17 +1000 Michael Ellerman > wrote: > > > > On Thu, Nov 29, 2012 at 10:55:25AM +1100, Stephen Rothwell wrote: > > > These sometimes produce unexpected results and make it hard to put the > > > start up code (for 64 bit) into the .head.text section. > > > > ... > > > > > diff --git a/arch/powerpc/kernel/head_fsl_booke.S > > > b/arch/powerpc/kernel/head_fsl_booke.S > > > index 6f62a73..4ec5625 100644 > > > --- a/arch/powerpc/kernel/head_fsl_booke.S > > > +++ b/arch/powerpc/kernel/head_fsl_booke.S > > > @@ -776,6 +776,8 @@ tlb_write_entry: > > > mfspr r10, SPRN_SPRG_RSCRATCH0 > > > rfi /* Force context change */ > > > > > > + ,text > > > + > > > > I'm assuming this should be .text ? > > Indeed. Oops :-) BTW, those patches are almost certainly stale by now and would need to be redone before be included on the kernel proper. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpARcb6kp0DK.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[git pull] Please pull one last set of fixes for powerpc for v3.9
Hi Linus, The following changes since commit e8f2b548de7ae65e17ee911e54712a3f26f69c60: Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs (2013-04-09 12:22:49 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/sfr/next-fixes.git tags/for-linus for you to fetch changes up to d8b92292408831d86ff7b781e66bf79301934b99: powerpc: add a missing label in resume_kernel (2013-04-15 17:29:48 +1000) Three regresions in the PowerPC code. One from v3.7 the others from this merge window. Please pull - thanks a lot. Alistair Popple (1): powerpc: Fix audit crash due to save/restore PPR changes Kevin Hao (1): powerpc: add a missing label in resume_kernel Michael Neuling (1): powerpc: fix compiling CONFIG_PPC_TRANSACTIONAL_MEM when CONFIG_ALTIVEC=n arch/powerpc/kernel/entry_64.S | 4 ++-- arch/powerpc/kernel/process.c | 2 ++ arch/powerpc/kernel/signal_32.c | 2 ++ arch/powerpc/kernel/signal_64.c | 2 ++ arch/powerpc/kernel/tm.S| 2 ++ 5 files changed, 10 insertions(+), 2 deletions(-) -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpAkhNE7_3jl.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
linux-next: manual merge of the ppc-temp tree with the metag tree
Hi Michael, Today's linux-next merge of the ppc-temp tree got a conflict in arch/metag/mm/Kconfig between commit 2b8660ed3bfe ("memblock: Kill ARCH_POPULATES_NODE_MAP once more") from the metag tree and commit 45b02f8d94e3 ("memblock: kill "config MAX_ACTIVE_REGIONS"") from the ppc-temp tree. I fixed it up (see below) and can carry the fix as necessary (no action is required). -- Cheers, Stephen Rothwells...@canb.auug.org.au diff --cc arch/metag/mm/Kconfig index 794f26a,ccf2576..000 --- a/arch/metag/mm/Kconfig +++ b/arch/metag/mm/Kconfig @@@ -93,11 -93,9 +93,6 @@@ config ARCH_SPARSEMEM_ENABL config ARCH_SPARSEMEM_DEFAULT def_bool y - config MAX_ACTIVE_REGIONS - int - default "2" if SPARSEMEM - default "1" - -config ARCH_POPULATES_NODE_MAP - def_bool y - config ARCH_SELECT_MEMORY_MODEL def_bool y pgpBUkaHYvKye.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v3 5/12] Update firmware_has_feature() to check architecture bits
Hi Nathan, On Mon, 22 Apr 2013 13:38:47 -0500 Nathan Fontenot wrote: > > -/* Option vector 5: PAPR/OF options supported */ > -#define OV5_LPAR 0x80/* logical partitioning supported */ > -#define OV5_SPLPAR 0x40/* shared-processor LPAR supported */ > +/* Option vector 5: PAPR/OF options supported > + * Thses bits are also used for the platform_has_feature() call so ^ typo > + * we encode the vector index in the define and use the OV5_FEAT() > + * and OV5_INDX() macros to extract the desired information. > + */ > +#define OV5_FEAT(x) ((x) & 0xff) > +#define OV5_INDX(x) ((x) >> 8) > +#define OV5_LPAR 0x0280 /* logical partitioning supported */ > +#define OV5_SPLPAR 0x0240 /* shared-processor LPAR supported */ Wouldn't it be clearer to say #define OV5_LPAR(OV5_INDX(0x2) | OV5_FEAT(0x80)) etc? > @@ -145,6 +141,7 @@ > * followed by # option vectors - 1, followed by the option vectors. > */ > extern unsigned char ibm_architecture_vec[]; > +bool platform_has_feature(unsigned int); "extern", please (if nothing else, for consistency). > +static __initdata struct vec5_fw_feature > +vec5_fw_features_table[FIRMWARE_MAX_FEATURES] = { Why make this array FIRMWARE_MAX_FEATURES (63) long? You could just restrict the for loop below to ARRAY_SIZE(vec5_fw_features_table). > + {FW_FEATURE_TYPE1_AFFINITY, OV5_TYPE1_AFFINITY}, > +}; > + > +void __init fw_vec5_feature_init(const char *vec5, unsigned long len) > +{ > + unsigned int index, feat; > + int i; > + > + pr_debug(" -> fw_vec5_feature_init()\n"); > + > + for (i = 0; i < FIRMWARE_MAX_FEATURES; i++) { > + if (!vec5_fw_features_table[i].feature) > + continue; And this test could go away. I realise that you have just copied the existing code, but you should not do that blindly. Maybe you could even add an (earlier) patch that fixes the existing code. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpwjjkEJ0Fy3.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v3 5/12] Update firmware_has_feature() to check architecture bits
Hi Nathan, On Mon, 22 Apr 2013 13:38:47 -0500 Nathan Fontenot wrote: > > +/* Option vector 5: PAPR/OF options supported > + * Thses bits are also used for the platform_has_feature() call so You talk about platform_has_feature(), but that does not exist (I assume it existed in a previous version of the patch set). > +bool platform_has_feature(unsigned int); Ditto. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgp5P_HIWmupA.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v3 12/12] Add /proc interface to control topology updates
Hi Nathan, On Mon, 22 Apr 2013 13:47:55 -0500 Nathan Fontenot wrote: > > #if defined(CONFIG_NUMA) && defined(CONFIG_PPC_SPLPAR) > extern int start_topology_update(void); > extern int stop_topology_update(void); > +extern inline int prrn_is_enabled(void); You really can't do "extern inline" with no body ... -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpYD_KU3Eta0.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v3 12/12] Add /proc interface to control topology updates
Hi Nathan, On Mon, 22 Apr 2013 13:47:55 -0500 Nathan Fontenot wrote: > > +inline int prrn_is_enabled(void) > +{ > + return prrn_enabled; > +} We generally leave these "inline"s up to the compiler these days i.e. remove the "inline". -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpgdglAlgYlc.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v4 2/13] Correct buffer parsing in update_dt_node()
Hi Nathan, On Wed, 24 Apr 2013 10:49:36 -0500 Nathan Fontenot wrote: > > @@ -134,6 +134,7 @@ > char *prop_data; > char *rtas_buf; > int update_properties_token; > + u32 vd; > > update_properties_token = rtas_token("ibm,update-properties"); > if (update_properties_token == RTAS_UNKNOWN_SERVICE) > @@ -160,13 +161,24 @@ > > prop_data = rtas_buf + sizeof(*upwa); > > - for (i = 0; i < upwa->nprops; i++) { > + /* The first element of the buffer is the path of the node > + * being updated in the form of a 8 byte string length "bit" ? > + * followed by the string. Skip past this to get to the > + * properties being updated. > + */ > + vd = *prop_data++; > + prop_data += vd; -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpWe1tYlptKI.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v4 5/13] Use ARRAY_SIZE to iterate over firmware_features_table array
Hi Nathan, On Wed, 24 Apr 2013 10:55:08 -0500 Nathan Fontenot wrote: > > When iterating over the entries in firmware_features_table we only need > to go over the actual number of entries in the array instead of declaring > it to be bigger and checking to make sure there is a valid entry in every > slot. > > This patch removes the FIRMWARE_MAX_FEATURES #define and replaces the > array looping with the use of ARRAY_SIZE(). > Suggested-by: Stephen Rothwell > Signed-off-by: Nathan Fontenot > @@ -77,12 +77,10 @@ > pr_debug(" -> fw_feature_init()\n"); > > for (s = hypertas; s < hypertas + len; s += strlen(s) + 1) { > - for (i = 0; i < FIRMWARE_MAX_FEATURES; i++) { > + for (i = 0; i < ARRAY_SIZE(firmware_features_table); i++) { You should explicitly include linux/kernel.h to use ARRAY_SIZE(). -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpqkhZaB7acz.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 3/4] ARCH: AUDIT: implement syscall_get_arch for all arches
Hi Eric, [I just noticed that this turned up in linux-next ...] On Wed, 19 Mar 2014 18:04:02 -0400 Eric Paris wrote: > > diff --git a/arch/powerpc/include/asm/syscall.h > b/arch/powerpc/include/asm/syscall.h > index b54b2ad..4271544 100644 > --- a/arch/powerpc/include/asm/syscall.h > +++ b/arch/powerpc/include/asm/syscall.h > @@ -13,6 +13,8 @@ > #ifndef _ASM_SYSCALL_H > #define _ASM_SYSCALL_H 1 > > +#include > +#include You don't need linux/compat.h, I think, but you do need to include linux/thread_info.h for is_32bit_task() below. > #include > > /* ftrace syscalls requires exporting the sys_call_table */ > @@ -86,4 +88,14 @@ static inline void syscall_set_arguments(struct > task_struct *task, > memcpy(®s->gpr[3 + i], args, n * sizeof(args[0])); > } > > +static inline int syscall_get_arch(void) > +{ > + int arch = AUDIT_ARCH_PPC; > + > +#ifdef CONFIG_PPC64 > + if (!is_32bit_task()) > + arch = AUDIT_ARCH_PPC64; > +#endif > + return arch; This could just be return is_32bit_task() ? AUDIT_ARCH_PPC : AUDIT_ARCH_PPC64; as is_32bit_task() is always defined (and is (1) for !CONFIG_PPC64). -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpUi3J0iXeoX.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: linux-next: add scottwood/linux.git
Hi Scott, On Fri, 9 May 2014 16:15:33 -0500 Scott Wood wrote: > > On Mon, 2014-03-24 at 20:09 -0500, Scott Wood wrote: > > On Mon, 2014-03-24 at 10:33 +1100, Benjamin Herrenschmidt wrote: > > > On Mon, 2014-03-24 at 10:16 +1100, Benjamin Herrenschmidt wrote: > > > > On Wed, 2014-03-19 at 23:25 -0500, Scott Wood wrote: > > > > > The following changes since commit > > > > > c7e64b9ce04aa2e3fad7396d92b5cb92056d16ac: > > > > > > > > > > powerpc/powernv Platform dump interface (2014-03-07 16:19:10 +1100) > > > > > > > > > > are available in the git repository at: > > > > > > > > > > git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux.git > > > > > next > > > > > > > > > > for you to fetch changes up to > > > > > 48b16180d0d91324e5d2423c6d53d97bbe3dcc14: > > > > > > > > > > fsl/pci: The new pci suspend/resume implementation (2014-03-19 > > > > > 22:37:44 -0500) > > > > > > > > Stephen just informed me that your tree wasn't in -next ... Kumar's > > > > still is. > > > > > > > > Can you guys fix that up ? I somewhat rely on the FSL stuff to simmer > > > > in -next on its own. > > > > Stephen, what's the process for adding a tree? > > ping Sorry, for the delay. Just send me a git URL for your tree, and a list of the people I should contact in case of conflicts/build/fetch problems and cc the appropriate people/lists. I also assume that this will actually replace Kumar's tree? -- Cheers, Stephen Rothwells...@canb.auug.org.au signature.asc Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: linux-next: add scottwood/linux.git
Hi Scott, On Mon, 12 May 2014 08:23:36 +1000 Stephen Rothwell wrote: > > On Fri, 9 May 2014 16:15:33 -0500 Scott Wood wrote: > > > > On Mon, 2014-03-24 at 20:09 -0500, Scott Wood wrote: > > > On Mon, 2014-03-24 at 10:33 +1100, Benjamin Herrenschmidt wrote: > > > > On Mon, 2014-03-24 at 10:16 +1100, Benjamin Herrenschmidt wrote: > > > > > On Wed, 2014-03-19 at 23:25 -0500, Scott Wood wrote: > > > > > > The following changes since commit > > > > > > c7e64b9ce04aa2e3fad7396d92b5cb92056d16ac: > > > > > > > > > > > > powerpc/powernv Platform dump interface (2014-03-07 16:19:10 > > > > > > +1100) > > > > > > > > > > > > are available in the git repository at: > > > > > > > > > > > > git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux.git > > > > > > next > > > > > > > > > > > > for you to fetch changes up to > > > > > > 48b16180d0d91324e5d2423c6d53d97bbe3dcc14: > > > > > > > > > > > > fsl/pci: The new pci suspend/resume implementation (2014-03-19 > > > > > > 22:37:44 -0500) > > > > > > > > > > Stephen just informed me that your tree wasn't in -next ... Kumar's > > > > > still is. > > > > > > > > > > Can you guys fix that up ? I somewhat rely on the FSL stuff to simmer > > > > > in -next on its own. > > > > > > Stephen, what's the process for adding a tree? > > > > ping > > Sorry, for the delay. > > Just send me a git URL for your tree, and a list of the people I should > contact in case of conflicts/build/fetch problems and cc the > appropriate people/lists. > > I also assume that this will actually replace Kumar's tree? [Preempting your reply :-)] I have added the above tree from today (and called it "fsl") with you as the sole contact. Let me know if you need anything different. I have also removed the galak tree. Thanks for adding your subsystem tree as a participant of linux-next. As you may know, this is not a judgment of your code. The purpose of linux-next is for integration testing and to lower the impact of conflicts between subsystems in the next merge window. You will need to ensure that the patches/commits in your tree/series have been: * submitted under GPL v2 (or later) and include the Contributor's Signed-off-by, * posted to the relevant mailing list, * reviewed by you (or another maintainer of your subsystem tree), * successfully unit tested, and * destined for the current or next Linux merge window. Basically, this should be just what you would send to Linus (or ask him to fetch). It is allowed to be rebased if you deem it necessary. -- Cheers, Stephen Rothwell s...@canb.auug.org.au signature.asc Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
linux-next: manual merge of the powerpc tree with the fixes tree
Hi all, Today's linux-next merge of the powerpc tree got a conflict in arch/powerpc/kernel/exceptions-64s.S between commit 0be9d8b61c0c ("powerpc/ppc64: Allow allmodconfig to build (finally !)") from the fixes tree and commits b1576fec7f4d ("powerpc: No need to use dot symbols when branching to a function") and 354255014a90 ("powerpc: Remove dot symbol usage in exception macros") from the powerpc tree. I fixed it up (see below) and can carry the fix as necessary (no action is required). -- Cheers, Stephen Rothwells...@canb.auug.org.au diff --cc arch/powerpc/kernel/exceptions-64s.S index 833a68dc4cc8,20f11eb4dff7.. --- a/arch/powerpc/kernel/exceptions-64s.S +++ b/arch/powerpc/kernel/exceptions-64s.S @@@ -891,186 -1025,14 +891,186 @@@ END_FTR_SECTION_IFSET(CPU_FTR_CFAR std r12,RESULT(r1) std r11,STACK_FRAME_OVERHEAD-16(r1) 1:addir3,r1,STACK_FRAME_OVERHEAD - bl .kernel_bad_stack + bl kernel_bad_stack b 1b + +#if defined(CONFIG_PPC_PSERIES) || defined(CONFIG_PPC_POWERNV) +/* + * Data area reserved for FWNMI option. + * This address (0x7000) is fixed by the RPA. + */ + .= 0x7000 + .globl fwnmi_data_area +fwnmi_data_area: + + /* pseries and powernv need to keep the whole page from + * 0x7000 to 0x8000 free for use by the firmware + */ + . = 0x8000 +#endif /* defined(CONFIG_PPC_PSERIES) || defined(CONFIG_PPC_POWERNV) */ + /* - * Here r13 points to the paca, r9 contains the saved CR, - * SRR0 and SRR1 are saved in r11 and r12, - * r9 - r13 are saved in paca->exgen. + * Denorm interrupt assist moved out of line to here, where it remains + * close enough to the call site which uses a small conditional branch */ +#ifdef CONFIG_PPC_DENORMALISATION +denorm_assist: +BEGIN_FTR_SECTION +/* + * To denormalise we need to move a copy of the register to itself. + * For POWER6 do that here for all FP regs. + */ + mfmsr r10 + ori r10,r10,(MSR_FP|MSR_FE0|MSR_FE1) + xorir10,r10,(MSR_FE0|MSR_FE1) + mtmsrd r10 + sync + +#define FMR2(n) fmr (n), (n) ; fmr n+1, n+1 +#define FMR4(n) FMR2(n) ; FMR2(n+2) +#define FMR8(n) FMR4(n) ; FMR4(n+4) +#define FMR16(n) FMR8(n) ; FMR8(n+8) +#define FMR32(n) FMR16(n) ; FMR16(n+16) + FMR32(0) + +FTR_SECTION_ELSE +/* + * To denormalise we need to move a copy of the register to itself. + * For POWER7 do that here for the first 32 VSX registers only. + */ + mfmsr r10 + orisr10,r10,MSR_VSX@h + mtmsrd r10 + sync + +#define XVCPSGNDP2(n) XVCPSGNDP(n,n,n) ; XVCPSGNDP(n+1,n+1,n+1) +#define XVCPSGNDP4(n) XVCPSGNDP2(n) ; XVCPSGNDP2(n+2) +#define XVCPSGNDP8(n) XVCPSGNDP4(n) ; XVCPSGNDP4(n+4) +#define XVCPSGNDP16(n) XVCPSGNDP8(n) ; XVCPSGNDP8(n+8) +#define XVCPSGNDP32(n) XVCPSGNDP16(n) ; XVCPSGNDP16(n+16) + XVCPSGNDP32(0) + +ALT_FTR_SECTION_END_IFCLR(CPU_FTR_ARCH_206) + +BEGIN_FTR_SECTION + b denorm_done +END_FTR_SECTION_IFCLR(CPU_FTR_ARCH_207S) +/* + * To denormalise we need to move a copy of the register to itself. + * For POWER8 we need to do that for all 64 VSX registers + */ + XVCPSGNDP32(32) +denorm_done: + mtspr SPRN_HSRR0,r11 + mtcrf 0x80,r9 + ld r9,PACA_EXGEN+EX_R9(r13) + RESTORE_PPR_PACA(PACA_EXGEN, r10) +BEGIN_FTR_SECTION + ld r10,PACA_EXGEN+EX_CFAR(r13) + mtspr SPRN_CFAR,r10 +END_FTR_SECTION_IFSET(CPU_FTR_CFAR) + ld r10,PACA_EXGEN+EX_R10(r13) + ld r11,PACA_EXGEN+EX_R11(r13) + ld r12,PACA_EXGEN+EX_R12(r13) + ld r13,PACA_EXGEN+EX_R13(r13) + HRFID + b . +#endif + +/* + * An interrupt came in while soft-disabled. We set paca->irq_happened, then: + * - If it was a decrementer interrupt, we bump the dec to max and and return. + * - If it was a doorbell we return immediately since doorbells are edge + * triggered and won't automatically refire. + * - else we hard disable and return. + * This is called with r10 containing the value to OR to the paca field. + * + * Warning: This code is reached using a (small) conditional branch from both + * the 1st level exception handlers below 0x8000 and the alternate feature + * sections of that file which the linker puts right after the text in here. + * + * For that to work, we thus need this code to be roughly near the "middle" + * so that we can reach it with <32k offsets. Here works... for now. + */ +#define MASKED_INTERRUPT(_H) \ +masked_##_H##interrupt: \ + std r11,PACA_EXGEN+EX_R11(r13); \ + lbz r11,PACAIRQHAPPENED(r13); \ + or r11,r11,r10;\ + stb r11,PACAIRQHAPPENED(r13); \ + cmpwi r