Re: [PATCH v5 13/48] powerpc/83xx: remove mpc83xx_ipic_and_qe_init_IRQ

2019-11-21 Thread Scott Wood
On Wed, 2019-11-20 at 11:59 -0600, Li Yang wrote: > On Mon, Nov 18, 2019 at 5:29 AM Rasmus Villemoes > wrote: > > Hi Scott, > > What do you think of the PowerPC related changes(patch 13,14)? Can we > have you ACK and merge the series from soc tree? Acked-by: Scott Wood -Scott > > Regards,

Re: [PATCH v3 4/8] powerpc/vdso32: inline __get_datapage()

2019-11-21 Thread Michael Ellerman
Michael Ellerman writes: > Christophe Leroy writes: >> __get_datapage() is only a few instructions to retrieve the >> address of the page where the kernel stores data to the VDSO. >> >> By inlining this function into its users, a bl/blr pair and >> a mflr/mtlr pair is avoided, plus a few reg

Re: [Very RFC 16/46] powernv/eeh: Use eeh_edev_warn() rather than open-coding a BDFN print

2019-11-21 Thread Alexey Kardashevskiy
On 20/11/2019 12:28, Oliver O'Halloran wrote: > Neaten things up a bit and remove a pci_dn use. > > Signed-off-by: Oliver O'Halloran Reviewed-by: Alexey Kardashevskiy but it also could be merged into some bigger patch, it is hardly useful on its own. > --- >

Re: [Very RFC 15/46] powernv/eeh: Use pnv_eeh_*_config() for internal config ops

2019-11-21 Thread Alexey Kardashevskiy
On 20/11/2019 12:28, Oliver O'Halloran wrote: > Use the pnv_eeh_{read|write}_config() functions that take an edev rather > than a pci_dn. This allows us to remove most of the explict uses of pci_dn > in the PowerNV EEH backend and localises them into a few functions which we > can fix later.

[PATCH AUTOSEL 4.4 67/68] powerpc/pseries/dlpar: Fix a missing check in dlpar_parse_cc_property()

2019-11-21 Thread Sasha Levin
From: Gen Zhang [ Upstream commit efa9ace68e487ddd29c2b4d6dd23242158f1f607 ] In dlpar_parse_cc_property(), 'prop->name' is allocated by kstrdup(). kstrdup() may return NULL, so it should be checked and handle error. And prop should be freed if 'prop->name' is NULL. Signed-off-by: Gen Zhang

[PATCH AUTOSEL 4.4 42/68] powerpc/44x/bamboo: Fix PCI range

2019-11-21 Thread Sasha Levin
From: Benjamin Herrenschmidt [ Upstream commit 3cfb9ebe906b51f2942b1e251009bb251efd2ba6 ] The bamboo dts has a bug: it uses a non-naturally aligned range for PCI memory space. This isnt' supported by the code, thus causing PCI to break on this system. This is due to the fact that while the

[PATCH AUTOSEL 4.4 41/68] powerpc/mm: Make NULL pointer deferences explicit on bad page faults.

2019-11-21 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 49a502ea23bf9dec47f8f3c3960909ff409cd1bb ] As several other arches including x86, this patch makes it explicit that a bad page fault is a NULL pointer dereference when the fault address is lower than PAGE_SIZE In the mean time, this page makes all

[PATCH AUTOSEL 4.4 40/68] powerpc/prom: fix early DEBUG messages

2019-11-21 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit b18f0ae92b0a1db565c3e505fa87b6971ad3b641 ] This patch fixes early DEBUG messages in prom.c: - Use %px instead of %p to see the addresses - Cast memblock_phys_mem_size() with (unsigned long long) to avoid build failure when phys_addr_t is not 64 bits.

[PATCH AUTOSEL 4.4 31/68] powerpc/xmon: fix dump_segments()

2019-11-21 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 32c8c4c621897199e690760c2d57054f8b84b6e6 ] mfsrin() takes segment num from bits 31-28 (IBM bits 0-3). Signed-off-by: Christophe Leroy [mpe: Clarify bit numbering] Signed-off-by: Michael Ellerman Signed-off-by: Sasha Levin ---

[PATCH AUTOSEL 4.4 30/68] powerpc/book3s/32: fix number of bats in p/v_block_mapped()

2019-11-21 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit e93ba1b7eb5b188c749052df7af1c90821c5f320 ] This patch fixes the loop in p_block_mapped() and v_block_mapped() to scan the entire bat_addrs[] array. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Signed-off-by: Sasha Levin ---

[PATCH AUTOSEL 4.9 90/91] powerpc/pseries/dlpar: Fix a missing check in dlpar_parse_cc_property()

2019-11-21 Thread Sasha Levin
From: Gen Zhang [ Upstream commit efa9ace68e487ddd29c2b4d6dd23242158f1f607 ] In dlpar_parse_cc_property(), 'prop->name' is allocated by kstrdup(). kstrdup() may return NULL, so it should be checked and handle error. And prop should be freed if 'prop->name' is NULL. Signed-off-by: Gen Zhang

[PATCH AUTOSEL 4.9 58/91] powerpc/pseries: Fix node leak in update_lmb_associativity_index()

2019-11-21 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit 47918bc68b7427e961035949cc1501a864578a69 ] In update_lmb_associativity_index() we lookup dr_node using of_find_node_by_path() which takes a reference for us. In the non-error case we forget to drop the reference. Note that find_aa_index() does modify

[PATCH AUTOSEL 4.9 57/91] powerpc/83xx: handle machine check caused by watchdog timer

2019-11-21 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 0deae39cec6dab3a66794f3e9e83ca4dc30080f1 ] When the watchdog timer is set in interrupt mode, it causes a machine check when it times out. The purpose of this mode is to ease debugging, not to crash the kernel and reboot the machine. This patch

[PATCH AUTOSEL 4.9 51/91] powerpc/powernv/eeh/npu: Fix uninitialized variables in opal_pci_eeh_freeze_status

2019-11-21 Thread Sasha Levin
From: Alexey Kardashevskiy [ Upstream commit c20577014f85f36d4e137d3d52a1f61225b4a3d2 ] The current implementation of the OPAL_PCI_EEH_FREEZE_STATUS call in skiboot's NPU driver does not touch the pci_error_type parameter so it might have garbage but the powernv code analyzes it nevertheless.

[PATCH AUTOSEL 4.9 49/91] powerpc/44x/bamboo: Fix PCI range

2019-11-21 Thread Sasha Levin
From: Benjamin Herrenschmidt [ Upstream commit 3cfb9ebe906b51f2942b1e251009bb251efd2ba6 ] The bamboo dts has a bug: it uses a non-naturally aligned range for PCI memory space. This isnt' supported by the code, thus causing PCI to break on this system. This is due to the fact that while the

[PATCH AUTOSEL 4.9 48/91] powerpc/mm: Make NULL pointer deferences explicit on bad page faults.

2019-11-21 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 49a502ea23bf9dec47f8f3c3960909ff409cd1bb ] As several other arches including x86, this patch makes it explicit that a bad page fault is a NULL pointer dereference when the fault address is lower than PAGE_SIZE In the mean time, this page makes all

[PATCH AUTOSEL 4.9 47/91] powerpc/prom: fix early DEBUG messages

2019-11-21 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit b18f0ae92b0a1db565c3e505fa87b6971ad3b641 ] This patch fixes early DEBUG messages in prom.c: - Use %px instead of %p to see the addresses - Cast memblock_phys_mem_size() with (unsigned long long) to avoid build failure when phys_addr_t is not 64 bits.

[PATCH AUTOSEL 4.9 37/91] powerpc/book3s/32: fix number of bats in p/v_block_mapped()

2019-11-21 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit e93ba1b7eb5b188c749052df7af1c90821c5f320 ] This patch fixes the loop in p_block_mapped() and v_block_mapped() to scan the entire bat_addrs[] array. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Signed-off-by: Sasha Levin ---

[PATCH AUTOSEL 4.9 38/91] powerpc/xmon: fix dump_segments()

2019-11-21 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 32c8c4c621897199e690760c2d57054f8b84b6e6 ] mfsrin() takes segment num from bits 31-28 (IBM bits 0-3). Signed-off-by: Christophe Leroy [mpe: Clarify bit numbering] Signed-off-by: Michael Ellerman Signed-off-by: Sasha Levin ---

Re: [Very RFC 14/46] powernv/eeh: Remove un-necessary call to eeh_add_device_early()

2019-11-21 Thread Alexey Kardashevskiy
On 20/11/2019 12:28, Oliver O'Halloran wrote: > eeh_add_device_early() is used to initialise the EEH state for a PCI device > based on the contents of it's devicetree node. It doesn't do anything > unless EEH_FLAG_PROBE_MODE_DEVTREE is set and that only happens on pseries. > > Remove the call

[PATCH AUTOSEL 4.14 126/127] powerpc/pseries/dlpar: Fix a missing check in dlpar_parse_cc_property()

2019-11-21 Thread Sasha Levin
From: Gen Zhang [ Upstream commit efa9ace68e487ddd29c2b4d6dd23242158f1f607 ] In dlpar_parse_cc_property(), 'prop->name' is allocated by kstrdup(). kstrdup() may return NULL, so it should be checked and handle error. And prop should be freed if 'prop->name' is NULL. Signed-off-by: Gen Zhang

[PATCH AUTOSEL 4.14 090/127] net/wan/fsl_ucc_hdlc: Avoid double free in ucc_hdlc_probe()

2019-11-21 Thread Sasha Levin
From: Wen Yang [ Upstream commit 40752b3eae29f8ca2378e978a02bd6dbeeb06d16 ] This patch fixes potential double frees if register_hdlc_device() fails. Signed-off-by: Wen Yang Reviewed-by: Peng Hao CC: Zhao Qiang CC: "David S. Miller" CC: net...@vger.kernel.org CC:

[PATCH AUTOSEL 4.14 076/127] powerpc/83xx: handle machine check caused by watchdog timer

2019-11-21 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 0deae39cec6dab3a66794f3e9e83ca4dc30080f1 ] When the watchdog timer is set in interrupt mode, it causes a machine check when it times out. The purpose of this mode is to ease debugging, not to crash the kernel and reboot the machine. This patch

[PATCH AUTOSEL 4.14 077/127] powerpc/pseries: Fix node leak in update_lmb_associativity_index()

2019-11-21 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit 47918bc68b7427e961035949cc1501a864578a69 ] In update_lmb_associativity_index() we lookup dr_node using of_find_node_by_path() which takes a reference for us. In the non-error case we forget to drop the reference. Note that find_aa_index() does modify

[PATCH AUTOSEL 4.14 069/127] powerpc/powernv/eeh/npu: Fix uninitialized variables in opal_pci_eeh_freeze_status

2019-11-21 Thread Sasha Levin
From: Alexey Kardashevskiy [ Upstream commit c20577014f85f36d4e137d3d52a1f61225b4a3d2 ] The current implementation of the OPAL_PCI_EEH_FREEZE_STATUS call in skiboot's NPU driver does not touch the pci_error_type parameter so it might have garbage but the powernv code analyzes it nevertheless.

[PATCH AUTOSEL 4.14 066/127] powerpc/mm: Make NULL pointer deferences explicit on bad page faults.

2019-11-21 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 49a502ea23bf9dec47f8f3c3960909ff409cd1bb ] As several other arches including x86, this patch makes it explicit that a bad page fault is a NULL pointer dereference when the fault address is lower than PAGE_SIZE In the mean time, this page makes all

[PATCH AUTOSEL 4.14 067/127] powerpc/44x/bamboo: Fix PCI range

2019-11-21 Thread Sasha Levin
From: Benjamin Herrenschmidt [ Upstream commit 3cfb9ebe906b51f2942b1e251009bb251efd2ba6 ] The bamboo dts has a bug: it uses a non-naturally aligned range for PCI memory space. This isnt' supported by the code, thus causing PCI to break on this system. This is due to the fact that while the

[PATCH AUTOSEL 4.14 065/127] powerpc/prom: fix early DEBUG messages

2019-11-21 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit b18f0ae92b0a1db565c3e505fa87b6971ad3b641 ] This patch fixes early DEBUG messages in prom.c: - Use %px instead of %p to see the addresses - Cast memblock_phys_mem_size() with (unsigned long long) to avoid build failure when phys_addr_t is not 64 bits.

[PATCH AUTOSEL 4.14 064/127] powerpc/perf: Fix unit_sel/cache_sel checks

2019-11-21 Thread Sasha Levin
From: Madhavan Srinivasan [ Upstream commit 2d46d4877b1afd14059393a48bdb8ce27955174c ] Raw event code has couple of fields "unit" and "cache" in it, to capture the "unit" to monitor for a given pmcxsel and cache reload qualifier to program in MMCR1. isa207_get_constraint() refers "unit" field

[PATCH AUTOSEL 4.14 054/127] powerpc/xmon: fix dump_segments()

2019-11-21 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 32c8c4c621897199e690760c2d57054f8b84b6e6 ] mfsrin() takes segment num from bits 31-28 (IBM bits 0-3). Signed-off-by: Christophe Leroy [mpe: Clarify bit numbering] Signed-off-by: Michael Ellerman Signed-off-by: Sasha Levin ---

[PATCH AUTOSEL 4.14 053/127] powerpc/book3s/32: fix number of bats in p/v_block_mapped()

2019-11-21 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit e93ba1b7eb5b188c749052df7af1c90821c5f320 ] This patch fixes the loop in p_block_mapped() and v_block_mapped() to scan the entire bat_addrs[] array. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Signed-off-by: Sasha Levin ---

[PATCH AUTOSEL 4.19 217/219] powerpc/pseries/dlpar: Fix a missing check in dlpar_parse_cc_property()

2019-11-21 Thread Sasha Levin
From: Gen Zhang [ Upstream commit efa9ace68e487ddd29c2b4d6dd23242158f1f607 ] In dlpar_parse_cc_property(), 'prop->name' is allocated by kstrdup(). kstrdup() may return NULL, so it should be checked and handle error. And prop should be freed if 'prop->name' is NULL. Signed-off-by: Gen Zhang

[PATCH AUTOSEL 4.19 151/219] net/wan/fsl_ucc_hdlc: Avoid double free in ucc_hdlc_probe()

2019-11-21 Thread Sasha Levin
From: Wen Yang [ Upstream commit 40752b3eae29f8ca2378e978a02bd6dbeeb06d16 ] This patch fixes potential double frees if register_hdlc_device() fails. Signed-off-by: Wen Yang Reviewed-by: Peng Hao CC: Zhao Qiang CC: "David S. Miller" CC: net...@vger.kernel.org CC:

[PATCH AUTOSEL 4.19 134/219] powerpc: Fix HMIs on big-endian with CONFIG_RELOCATABLE=y

2019-11-21 Thread Sasha Levin
From: Benjamin Herrenschmidt [ Upstream commit 505a314fb28ce122091691c51426fa85c084e115 ] HMIs will crash the kernel due to BRANCH_LINK_TO_FAR(hmi_exception_realmode) Calling into the OPD instead of the actual code. Fixes: 2337d207288f ("powerpc/64: CONFIG_RELOCATABLE support for hmi

[PATCH AUTOSEL 4.19 133/219] powerpc/pseries: Fix node leak in update_lmb_associativity_index()

2019-11-21 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit 47918bc68b7427e961035949cc1501a864578a69 ] In update_lmb_associativity_index() we lookup dr_node using of_find_node_by_path() which takes a reference for us. In the non-error case we forget to drop the reference. Note that find_aa_index() does modify

[PATCH AUTOSEL 4.19 132/219] powerpc/83xx: handle machine check caused by watchdog timer

2019-11-21 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 0deae39cec6dab3a66794f3e9e83ca4dc30080f1 ] When the watchdog timer is set in interrupt mode, it causes a machine check when it times out. The purpose of this mode is to ease debugging, not to crash the kernel and reboot the machine. This patch

[PATCH AUTOSEL 4.19 124/219] powerpc/powernv/eeh/npu: Fix uninitialized variables in opal_pci_eeh_freeze_status

2019-11-21 Thread Sasha Levin
From: Alexey Kardashevskiy [ Upstream commit c20577014f85f36d4e137d3d52a1f61225b4a3d2 ] The current implementation of the OPAL_PCI_EEH_FREEZE_STATUS call in skiboot's NPU driver does not touch the pci_error_type parameter so it might have garbage but the powernv code analyzes it nevertheless.

[PATCH AUTOSEL 4.19 122/219] powerpc/44x/bamboo: Fix PCI range

2019-11-21 Thread Sasha Levin
From: Benjamin Herrenschmidt [ Upstream commit 3cfb9ebe906b51f2942b1e251009bb251efd2ba6 ] The bamboo dts has a bug: it uses a non-naturally aligned range for PCI memory space. This isnt' supported by the code, thus causing PCI to break on this system. This is due to the fact that while the

[PATCH AUTOSEL 4.19 121/219] powerpc/mm: Make NULL pointer deferences explicit on bad page faults.

2019-11-21 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 49a502ea23bf9dec47f8f3c3960909ff409cd1bb ] As several other arches including x86, this patch makes it explicit that a bad page fault is a NULL pointer dereference when the fault address is lower than PAGE_SIZE In the mean time, this page makes all

[PATCH AUTOSEL 4.19 120/219] powerpc/prom: fix early DEBUG messages

2019-11-21 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit b18f0ae92b0a1db565c3e505fa87b6971ad3b641 ] This patch fixes early DEBUG messages in prom.c: - Use %px instead of %p to see the addresses - Cast memblock_phys_mem_size() with (unsigned long long) to avoid build failure when phys_addr_t is not 64 bits.

[PATCH AUTOSEL 4.19 119/219] powerpc/32: Avoid unsupported flags with clang

2019-11-21 Thread Sasha Levin
From: Joel Stanley [ Upstream commit 72e7bcc2cdf82bf03caaa5e6c9b0134c2fc2ee7d ] When building for ppc32 with clang these flags are unsupported: -ffixed-r2 and -mmultiple llvm's lib/Target/PowerPC/PPCRegisterInfo.cpp marks r2 as reserved on when building for SVR4ABI and !ppc64: // The

[PATCH AUTOSEL 4.19 118/219] powerpc/perf: Fix unit_sel/cache_sel checks

2019-11-21 Thread Sasha Levin
From: Madhavan Srinivasan [ Upstream commit 2d46d4877b1afd14059393a48bdb8ce27955174c ] Raw event code has couple of fields "unit" and "cache" in it, to capture the "unit" to monitor for a given pmcxsel and cache reload qualifier to program in MMCR1. isa207_get_constraint() refers "unit" field

[PATCH AUTOSEL 4.19 106/219] powerpc/book3s/32: fix number of bats in p/v_block_mapped()

2019-11-21 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit e93ba1b7eb5b188c749052df7af1c90821c5f320 ] This patch fixes the loop in p_block_mapped() and v_block_mapped() to scan the entire bat_addrs[] array. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Signed-off-by: Sasha Levin ---

[PATCH AUTOSEL 4.19 107/219] powerpc/xmon: fix dump_segments()

2019-11-21 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 32c8c4c621897199e690760c2d57054f8b84b6e6 ] mfsrin() takes segment num from bits 31-28 (IBM bits 0-3). Signed-off-by: Christophe Leroy [mpe: Clarify bit numbering] Signed-off-by: Michael Ellerman Signed-off-by: Sasha Levin ---

Re: [Very RFC 12/46] powerpc/eeh: Split eeh_probe into probe_pdn and probe_pdev

2019-11-21 Thread Alexey Kardashevskiy
On 20/11/2019 12:28, Oliver O'Halloran wrote: > The EEH core has a concept of "early probe" and "late probe." When the > EEH_PROBE_MODE_DEVTREE flag is set (i.e pseries) we call the eeh_ops->probe() > function in eeh_add_device_early() so the eeh_dev state is initialised based > on > the

Re: [PATCH v2 04/11] powerpc/powernv/ioda: Release opencapi device

2019-11-21 Thread Andrew Donnellan
On 22/11/19 12:49 am, Frederic Barrat wrote: With hotplug, an opencapi device can now go away. It needs to be released, mostly to clean up its PE state. We were previously not defining any device callback. We can reuse the standard PCI release callback, it does a bit too much for an opencapi

Re: [Very RFC 11/46] powerpc/eeh: Convert various printfs to use edev, not pci_dn

2019-11-21 Thread Alexey Kardashevskiy
On 20/11/2019 12:28, Oliver O'Halloran wrote: > We use the pci_dn to retrieve the domain, bus, device, and function numbers > for > an EEH device. We now have that in the eeh_dev so covert the various printk()s > we have around the place to source that information from the eeh_dev. > >

Re: [Very RFC 09/46] powerpc/eeh: Pass eeh_dev to eeh_ops->{read|write}_config()

2019-11-21 Thread Alexey Kardashevskiy
On 20/11/2019 12:28, Oliver O'Halloran wrote: > Switch the eeh_ops->{read|write}_config methods to take an eeh_dev structure > rather than a pci_dn structure to specify the target device. This removes a > lot of the uses of pci_dn in both the EEH core and in the platform EEH > support. > >

Re: [Very RFC 08/46] powerpc/eeh: Calculate VF index rather than looking it up in pci_dn

2019-11-21 Thread Alexey Kardashevskiy
On 20/11/2019 12:28, Oliver O'Halloran wrote: > Find the VF index based on the BDFN of the device rather than using a cached > value in the pci_dn. This is probably slower than looking up the cached value > in the pci_dn, but it's done infrequently (only in the EEH recovery path) and > it's

Re: [PATCH v2 08/11] pci/hotplug/pnv-php: Register opencapi slots

2019-11-21 Thread Andrew Donnellan
On 22/11/19 12:49 am, Frederic Barrat wrote: Add the opencapi PHBs to the list of PHBs being scanned to look for slots. Signed-off-by: Frederic Barrat Reviewed-by: Andrew Donnellan -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH v2 05/11] powerpc/powernv/ioda: Find opencapi slot for a device node

2019-11-21 Thread Andrew Donnellan
On 22/11/19 12:49 am, Frederic Barrat wrote: Unlike real PCI slots, opencapi slots are directly associated to the (virtual) opencapi PHB, there's no intermediate bridge. So when looking for a slot ID, we must start the search from the device node itself and not its parent. Also, the slot ID is

RE: [PATCH v1 1/4] arm64: dts: ls1028a-rdb: enable emmc hs400 mode

2019-11-21 Thread Yinbo Zhu
Hi My hs400 series patches for ls1028 need do any changes? Regards, Yinbo Zhu. -Original Message- From: Yinbo Zhu Sent: 2019年8月14日 15:27 To: Rob Herring ; Mark Rutland ; Catalin Marinas ; Will Deacon ; Adrian Hunter ; Ulf Hansson ; Leo Li ; Claudiu Manoil ; Amit Jain (aj) ;

Re: [PATCH v7 02/24] mm/gup: factor out duplicate code from four routines

2019-11-21 Thread John Hubbard
On 11/21/19 1:54 AM, Jan Kara wrote: On Thu 21-11-19 00:29:59, John Hubbard wrote: Otherwise this looks fine and might be a worthwhile cleanup to feed Andrew for 5.5 independent of the gut of the changes. Reviewed-by: Christoph Hellwig Thanks for the reviews! Say, it sounds like your view

Re: [PATCH v3 4/8] powerpc/vdso32: inline __get_datapage()

2019-11-21 Thread Michael Ellerman
Christophe Leroy writes: > __get_datapage() is only a few instructions to retrieve the > address of the page where the kernel stores data to the VDSO. > > By inlining this function into its users, a bl/blr pair and > a mflr/mtlr pair is avoided, plus a few reg moves. > > The improvement is

Re: [PATCH v7 09/24] vfio, mm: fix get_user_pages_remote() and FOLL_LONGTERM

2019-11-21 Thread Alex Williamson
On Wed, 20 Nov 2019 23:13:39 -0800 John Hubbard wrote: > As it says in the updated comment in gup.c: current FOLL_LONGTERM > behavior is incompatible with FAULT_FLAG_ALLOW_RETRY because of the > FS DAX check requirement on vmas. > > However, the corresponding restriction in

Re: [PATCH v7 05/24] mm: devmap: refactor 1-based refcounting for ZONE_DEVICE pages

2019-11-21 Thread John Hubbard
On 11/21/19 8:59 AM, Dan Williams wrote: On Thu, Nov 21, 2019 at 12:57 AM John Hubbard wrote: On 11/21/19 12:05 AM, Christoph Hellwig wrote: So while this looks correct and I still really don't see the major benefit of the new code organization, especially as it bloats all put_page callers.

Re: [PATCH v7 09/24] vfio, mm: fix get_user_pages_remote() and FOLL_LONGTERM

2019-11-21 Thread John Hubbard
On 11/21/19 1:35 PM, Alex Williamson wrote: On Wed, 20 Nov 2019 23:13:39 -0800 John Hubbard wrote: As it says in the updated comment in gup.c: current FOLL_LONGTERM behavior is incompatible with FAULT_FLAG_ALLOW_RETRY because of the FS DAX check requirement on vmas. However, the

Re: [PATCH v7 02/24] mm/gup: factor out duplicate code from four routines

2019-11-21 Thread John Hubbard
On 11/21/19 1:49 AM, Jan Kara wrote: On Thu 21-11-19 00:29:59, John Hubbard wrote: On 11/21/19 12:03 AM, Christoph Hellwig wrote: Otherwise this looks fine and might be a worthwhile cleanup to feed Andrew for 5.5 independent of the gut of the changes. Reviewed-by: Christoph Hellwig Thanks

Re: [PATCH] drivers: net: Fix Kconfig indentation, continued

2019-11-21 Thread David Miller
From: Krzysztof Kozlowski Date: Thu, 21 Nov 2019 21:28:28 +0800 > Adjust indentation from spaces to tab (+optional two spaces) as in > coding style. This fixes various indentation mixups (seven spaces, > tab+one space, etc). > > Signed-off-by: Krzysztof Kozlowski Applied to net-next.

Re: Bug 205201 - Booting halts if Dawicontrol DC-2976 UW SCSI board installed, unless RAM size limited to 3500M

2019-11-21 Thread Christian Zigotzky
On 21. Nov 2019, at 19:02, Christoph Hellwig wrote: On Thu, Nov 21, 2019 at 05:34:48PM +0100, Christian Zigotzky wrote: I modified the patch and compiled a new RC8 of kernel 5.4 today. (patch attached) We have to wait to Rolands test results with his SCSI PCI card. I tested it today but my TV

Re: Bug 205201 - Booting halts if Dawicontrol DC-2976 UW SCSI board installed, unless RAM size limited to 3500M

2019-11-21 Thread Christoph Hellwig
On Thu, Nov 21, 2019 at 05:34:48PM +0100, Christian Zigotzky wrote: > I modified the patch and compiled a new RC8 of kernel 5.4 today. (patch > attached) > > We have to wait to Rolands test results with his SCSI PCI card. I tested it > today but my TV card doesn't work with this patch. I think

Re: [PATCH v2] dma-mapping: treat dev->bus_dma_mask as a DMA limit

2019-11-21 Thread Christoph Hellwig
On Thu, Nov 21, 2019 at 05:07:54PM +, Robin Murphy wrote: > ^^ super-nit only because I can't not see my editor currently highlighting > the typo: "accessible" > > Regardless of that though, > > Reviewed-by: Robin Murphy Applied for real now with that typo fixed and on top of the pulled in

Re: [PATCH v2] dma-mapping: treat dev->bus_dma_mask as a DMA limit

2019-11-21 Thread Christoph Hellwig
On Thu, Nov 21, 2019 at 04:53:48PM +, Will Deacon wrote: > Please go ahead and pull in our for-next/zone-dma branch if you need it. > We're not going to rebase it, and I suspect we won't even be queueing > anything else there at this stage in the game. Ok. I've pulled it in and will wait

Re: lockdep warning while booting POWER9 PowerNV

2019-11-21 Thread Qian Cai
> On Sep 4, 2019, at 11:55 PM, Michael Ellerman wrote: > > Bart Van Assche writes: >> On 8/30/19 2:13 PM, Qian Cai wrote: >>> https://raw.githubusercontent.com/cailca/linux-mm/master/powerpc.config >>> >>> Once in a while, booting an IBM POWER9 PowerNV system (8335-GTH) would >>> generate

Re: [PATCH v2] dma-mapping: treat dev->bus_dma_mask as a DMA limit

2019-11-21 Thread Robin Murphy
On 21/11/2019 9:26 am, Nicolas Saenz Julienne wrote: Using a mask to represent bus DMA constraints has a set of limitations. The biggest one being it can only hold a power of two (minus one). The DMA mapping code is already aware of this and treats dev->bus_dma_mask as a limit. This quirk is

Re: [PATCH v7 05/24] mm: devmap: refactor 1-based refcounting for ZONE_DEVICE pages

2019-11-21 Thread Dan Williams
On Thu, Nov 21, 2019 at 12:57 AM John Hubbard wrote: > > On 11/21/19 12:05 AM, Christoph Hellwig wrote: > > So while this looks correct and I still really don't see the major > > benefit of the new code organization, especially as it bloats all > > put_page callers. > > > > I'd love to see code

Re: [PATCH v2] dma-mapping: treat dev->bus_dma_mask as a DMA limit

2019-11-21 Thread Will Deacon
On Thu, Nov 21, 2019 at 05:02:17PM +0100, Christoph Hellwig wrote: > On Thu, Nov 21, 2019 at 03:55:39PM +, Robin Murphy wrote: > > Hmm, there's no functional dependency though, is there? AFAICS it's > > essentially just a context conflict. Is it worth simply dropping (or > > postponing) the

Re: generic DMA bypass flag

2019-11-21 Thread Robin Murphy
On 21/11/2019 7:34 am, Christoph Hellwig wrote: Robin, does this mean you ACK this series for the powerpc use case? Yeah, I think we've nailed down sufficient justification now for having a generalised flag, so at that point it makes every bit of sense to convert PPC's private equivalent.

Re: Bug 205201 - Booting halts if Dawicontrol DC-2976 UW SCSI board installed, unless RAM size limited to 3500M

2019-11-21 Thread Christian Zigotzky
Am 21.11.19 um 14:33 schrieb Robin Murphy: On 21/11/2019 12:21 pm, Christian Zigotzky wrote: On 21 November 2019 at 01:16 pm, Christian Zigotzky wrote: On 21 November 2019 at 08:29 am, Christoph Hellwig wrote: On Sat, Nov 16, 2019 at 08:06:05AM +0100, Christian Zigotzky wrote: /*   *  DMA

Re: [Y2038] [PATCH 07/23] y2038: vdso: powerpc: avoid timespec references

2019-11-21 Thread Christophe Leroy
Arnd Bergmann a écrit : On Wed, Nov 20, 2019 at 11:43 PM Ben Hutchings wrote: On Fri, 2019-11-08 at 22:07 +0100, Arnd Bergmann wrote: [...] > --- a/arch/powerpc/kernel/vdso32/gettimeofday.S > +++ b/arch/powerpc/kernel/vdso32/gettimeofday.S > @@ -15,10 +15,8 @@ > /* Offset for the low

Re: [PATCH v2] dma-mapping: treat dev->bus_dma_mask as a DMA limit

2019-11-21 Thread Christoph Hellwig
On Thu, Nov 21, 2019 at 03:55:39PM +, Robin Murphy wrote: > Hmm, there's no functional dependency though, is there? AFAICS it's > essentially just a context conflict. Is it worth simply dropping (or > postponing) the local renaming in __dma_direct_optimal_gfp_mask(), or > perhaps even

Re: [Y2038] [PATCH 3/8] powerpc: fix vdso32 for ppc64le

2019-11-21 Thread Ben Hutchings
On Thu, 2019-11-21 at 11:02 +0100, Arnd Bergmann wrote: > On Wed, Nov 20, 2019 at 10:49 PM Ben Hutchings > wrote: > > On Wed, 2019-11-20 at 20:35 +0100, Arnd Bergmann wrote: > > > On Wed, Nov 20, 2019 at 8:13 PM Ben Hutchings > > > wrote: > > > > On Fri, 2019-11-08 at 21:34 +0100, Arnd Bergmann

Re: [PATCH v2] dma-mapping: treat dev->bus_dma_mask as a DMA limit

2019-11-21 Thread Robin Murphy
On 21/11/2019 3:26 pm, Christoph Hellwig wrote: On Thu, Nov 21, 2019 at 04:24:57PM +0100, Christoph Hellwig wrote: On Thu, Nov 21, 2019 at 10:26:44AM +0100, Nicolas Saenz Julienne wrote: Using a mask to represent bus DMA constraints has a set of limitations. The biggest one being it can only

Re: [PATCH v2] dma-mapping: treat dev->bus_dma_mask as a DMA limit

2019-11-21 Thread Christoph Hellwig
On Thu, Nov 21, 2019 at 04:24:57PM +0100, Christoph Hellwig wrote: > On Thu, Nov 21, 2019 at 10:26:44AM +0100, Nicolas Saenz Julienne wrote: > > Using a mask to represent bus DMA constraints has a set of limitations. > > The biggest one being it can only hold a power of two (minus one). The > >

Re: [PATCH v2] dma-mapping: treat dev->bus_dma_mask as a DMA limit

2019-11-21 Thread Nicolas Saenz Julienne
On Thu, 2019-11-21 at 16:24 +0100, Christoph Hellwig wrote: > On Thu, Nov 21, 2019 at 10:26:44AM +0100, Nicolas Saenz Julienne wrote: > > Using a mask to represent bus DMA constraints has a set of limitations. > > The biggest one being it can only hold a power of two (minus one). The > > DMA

Re: [PATCH v2] dma-mapping: treat dev->bus_dma_mask as a DMA limit

2019-11-21 Thread Christoph Hellwig
On Thu, Nov 21, 2019 at 10:26:44AM +0100, Nicolas Saenz Julienne wrote: > Using a mask to represent bus DMA constraints has a set of limitations. > The biggest one being it can only hold a power of two (minus one). The > DMA mapping code is already aware of this and treats dev->bus_dma_mask > as a

Re: [PATCH v7 07/24] IB/umem: use get_user_pages_fast() to pin DMA pages

2019-11-21 Thread Jason Gunthorpe
On Thu, Nov 21, 2019 at 12:07:46AM -0800, Christoph Hellwig wrote: > On Wed, Nov 20, 2019 at 11:13:37PM -0800, John Hubbard wrote: > > And get rid of the mmap_sem calls, as part of that. Note > > that get_user_pages_fast() will, if necessary, fall back to > > __gup_longterm_unlocked(), which takes

Re: [Y2038] [PATCH 08/23] y2038: ipc: remove __kernel_time_t reference from headers

2019-11-21 Thread Arnd Bergmann
On Wed, Nov 20, 2019 at 11:49 PM Ben Hutchings wrote: > > On Fri, 2019-11-08 at 22:07 +0100, Arnd Bergmann wrote: > [...] > > --- a/arch/x86/include/uapi/asm/sembuf.h > > +++ b/arch/x86/include/uapi/asm/sembuf.h > > @@ -21,9 +21,9 @@ struct semid64_ds { > > unsigned long sem_ctime;

Re: [Y2038] [PATCH 07/23] y2038: vdso: powerpc: avoid timespec references

2019-11-21 Thread Arnd Bergmann
On Wed, Nov 20, 2019 at 11:43 PM Ben Hutchings wrote: > > On Fri, 2019-11-08 at 22:07 +0100, Arnd Bergmann wrote: > [...] > > --- a/arch/powerpc/kernel/vdso32/gettimeofday.S > > +++ b/arch/powerpc/kernel/vdso32/gettimeofday.S > > @@ -15,10 +15,8 @@ > > /* Offset for the low 32-bit part of a

[PATCH v2 10/11] pci/hotplug/pnv-php: Wrap warnings in macro

2019-11-21 Thread Frederic Barrat
An opencapi slot doesn't have an associated bridge device. It's not needed for operation, but any warning is displayed through pci_warn() which uses the pci_dev struct of the assocated bridge device. So wrap those warning so that a different trace mechanism can be used if it's an opencapi slot.

[PATCH v2 05/11] powerpc/powernv/ioda: Find opencapi slot for a device node

2019-11-21 Thread Frederic Barrat
Unlike real PCI slots, opencapi slots are directly associated to the (virtual) opencapi PHB, there's no intermediate bridge. So when looking for a slot ID, we must start the search from the device node itself and not its parent. Also, the slot ID is not attached to a specific bdfn, so let's build

[PATCH v2 07/11] pci/hotplug/pnv-php: Improve error msg on power state change failure

2019-11-21 Thread Frederic Barrat
When changing the slot state, if opal hits an error and tells as such in the asynchronous reply, the warning "Wrong msg" is logged, which is rather confusing. Instead we can reuse the better message which is already used when we couldn't submit the asynchronous opal request initially.

[PATCH v2 08/11] pci/hotplug/pnv-php: Register opencapi slots

2019-11-21 Thread Frederic Barrat
Add the opencapi PHBs to the list of PHBs being scanned to look for slots. Signed-off-by: Frederic Barrat --- Changelog: v2: - fix unregistration (Andrew) drivers/pci/hotplug/pnv_php.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/pci/hotplug/pnv_php.c

[PATCH v2 11/11] ocxl: Add PCI hotplug dependency to Kconfig

2019-11-21 Thread Frederic Barrat
The PCI hotplug framework is used to update the devices when a new image is written to the FPGA. Reviewed-by: Alastair D'Silva Reviewed-by: Andrew Donnellan Signed-off-by: Frederic Barrat --- Changelog: v2: no change drivers/misc/ocxl/Kconfig | 1 + 1 file changed, 1 insertion(+) diff

[PATCH v2 03/11] powerpc/powernv/ioda: set up PE on opencapi device when enabling

2019-11-21 Thread Frederic Barrat
The PE for an opencapi device was set as part of a late PHB fixup operation, when creating the PHB. To use the PCI hotplug framework, this is not going to work, as the PHB stays the same, it's only the devices underneath which are updated. For regular PCI devices, it is done as part of the

[PATCH v2 09/11] pci/hotplug/pnv-php: Relax check when disabling slot

2019-11-21 Thread Frederic Barrat
The driver only allows to disable a slot in the POPULATED state. However, if an error occurs while enabling the slot, say because the link couldn't be trained, then the POPULATED state may not be reached, yet the power state of the slot is on. So allow to disable a slot in the REGISTERED state.

[PATCH v2 06/11] pci/hotplug/pnv-php: Remove erroneous warning

2019-11-21 Thread Frederic Barrat
On powernv, when removing a device through hotplug, the following warning is logged: Invalid refcount <.> on <...> It may be incorrect, the refcount may be set to a higher value than 1 and be valid. of_detach_node() can drop more than one reference. As it doesn't seem trivial to assert the

[PATCH v2 04/11] powerpc/powernv/ioda: Release opencapi device

2019-11-21 Thread Frederic Barrat
With hotplug, an opencapi device can now go away. It needs to be released, mostly to clean up its PE state. We were previously not defining any device callback. We can reuse the standard PCI release callback, it does a bit too much for an opencapi device, but it's harmless, and only needs minor

[PATCH v2 02/11] powerpc/powernv/ioda: Protect PE list

2019-11-21 Thread Frederic Barrat
Protect the PHB's list of PE. Probably not needed as long as it was populated during PHB creation, but it feels right and will become required once we can add/remove opencapi devices on hotplug. Reviewed-by: Andrew Donnellan Signed-off-by: Frederic Barrat --- Changelog: v2: no change

[PATCH v2 01/11] powerpc/powernv/ioda: Fix ref count for devices with their own PE

2019-11-21 Thread Frederic Barrat
The pci_dn structure used to store a pointer to the struct pci_dev, so taking a reference on the device was required. However, the pci_dev pointer was later removed from the pci_dn structure, but the reference was kept for the npu device. See commit 902bdc57451c ("powerpc/powernv/idoa: Remove

[PATCH v2 00/11] opencapi: enable card reset and link retraining

2019-11-21 Thread Frederic Barrat
This is the linux part of the work to use the PCI hotplug framework to control an opencapi card so that it can be reset and re-read after flashing a new FPGA image. The changes required in skiboot are now upstream. On an old skiboot, this series will do nothing. A virtual PCI slot is created for

Re: Bug 205201 - Booting halts if Dawicontrol DC-2976 UW SCSI board installed, unless RAM size limited to 3500M

2019-11-21 Thread Robin Murphy
On 21/11/2019 12:21 pm, Christian Zigotzky wrote: On 21 November 2019 at 01:16 pm, Christian Zigotzky wrote: On 21 November 2019 at 08:29 am, Christoph Hellwig wrote: On Sat, Nov 16, 2019 at 08:06:05AM +0100, Christian Zigotzky wrote: /*   *  DMA addressing mode.   *   *  0 : 32 bit

[PATCH] tty: Fix Kconfig indentation, continued

2019-11-21 Thread Krzysztof Kozlowski
Adjust indentation from seven spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^/\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski --- drivers/tty/Kconfig | 28 ++-- drivers/tty/hvc/Kconfig | 28

[PATCH] drivers: net: Fix Kconfig indentation, continued

2019-11-21 Thread Krzysztof Kozlowski
Adjust indentation from spaces to tab (+optional two spaces) as in coding style. This fixes various indentation mixups (seven spaces, tab+one space, etc). Signed-off-by: Krzysztof Kozlowski --- drivers/net/Kconfig | 64 +-- drivers/net/caif/Kconfig

Re: [PATCH v2 1/4] powerpc/kvm/book3s: Fixes possible 'use after release' of kvm

2019-11-21 Thread Leonardo Bras
On Thu, 2019-11-14 at 15:43 -0300, Leonardo Bras wrote: > > If the kvm_put_kvm() you've moved actually caused the last > > reference > > to > > be dropped that would mean that our caller had passed us a kvm > > struct > > without holding a reference to it, and that would be a bug in our > >

Re: Bug 205201 - Booting halts if Dawicontrol DC-2976 UW SCSI board installed, unless RAM size limited to 3500M

2019-11-21 Thread Christian Zigotzky
On 21 November 2019 at 01:16 pm, Christian Zigotzky wrote: On 21 November 2019 at 08:29 am, Christoph Hellwig wrote: On Sat, Nov 16, 2019 at 08:06:05AM +0100, Christian Zigotzky wrote: /*   *  DMA addressing mode.   *   *  0 : 32 bit addressing for all chips.   *  1 : 40 bit addressing when

Re: Bug 205201 - Booting halts if Dawicontrol DC-2976 UW SCSI board installed, unless RAM size limited to 3500M

2019-11-21 Thread Christian Zigotzky
On 21 November 2019 at 08:29 am, Christoph Hellwig wrote: On Sat, Nov 16, 2019 at 08:06:05AM +0100, Christian Zigotzky wrote: /* * DMA addressing mode. * * 0 : 32 bit addressing for all chips. * 1 : 40 bit addressing when supported by chip. * 2 : 64 bit addressing when supported

Re: [PATCH v4 2/2] powerpc/irq: inline call_do_irq() and call_do_softirq()

2019-11-21 Thread Segher Boessenkool
On Thu, Nov 21, 2019 at 05:14:45PM +1100, Michael Ellerman wrote: > Christophe Leroy writes: > That breaks 64-bit with GCC9: > > arch/powerpc/kernel/irq.c: In function 'do_IRQ': > arch/powerpc/kernel/irq.c:650:2: error: PIC register clobbered by 'r2' in > 'asm' > 650 | asm volatile( >

Re: [Y2038] [PATCH 3/8] powerpc: fix vdso32 for ppc64le

2019-11-21 Thread Arnd Bergmann
On Wed, Nov 20, 2019 at 10:49 PM Ben Hutchings wrote: > On Wed, 2019-11-20 at 20:35 +0100, Arnd Bergmann wrote: > > On Wed, Nov 20, 2019 at 8:13 PM Ben Hutchings > > wrote: > > > On Fri, 2019-11-08 at 21:34 +0100, Arnd Bergmann wrote: > > > > On little-endian 32-bit application running on 64-bit

Re: [PATCH v7 02/24] mm/gup: factor out duplicate code from four routines

2019-11-21 Thread Jan Kara
On Thu 21-11-19 00:29:59, John Hubbard wrote: > > > > Otherwise this looks fine and might be a worthwhile cleanup to feed > > Andrew for 5.5 independent of the gut of the changes. > > > > Reviewed-by: Christoph Hellwig > > > > Thanks for the reviews! Say, it sounds like your view here is that

  1   2   >