* Re: [PATCH] powerpc/kvm/booke: fix altivec related build break
From: Michael Ellerman @ 2018-04-27 6:14 UTC (permalink / raw)
To: laurentiu.tudor, kvm-ppc; +Cc: linuxppc-dev, agraf, Laurentiu Tudor
In-Reply-To: <20180426123319.10843-1-laurentiu.tudor@nxp.com>
laurentiu.tudor@nxp.com writes:
> From: Laurentiu Tudor <laurentiu.tudor@nxp.com>
>
> Add missing "altivec unavailable" interrupt injection helper
> thus fixing the linker error below:
>
> arch/powerpc/kvm/emulate_loadstore.o: In function `kvmppc_check_altivec_disabled':
> arch/powerpc/kvm/emulate_loadstore.c: undefined reference to `.kvmppc_core_queue_vec_unavail'
>
> Fixes: 09f984961c137c4b ("KVM: PPC: Book3S: Add MMIO emulation for VMX instructions")
What config are you using to hit this? I'd like to add it to my
auto-builder to catch it in future.
cheers
^ permalink raw reply
* [PATCH] powerpc/fadump: Unregister fadump on kexec down path.
From: Mahesh J Salgaonkar @ 2018-04-27 6:23 UTC (permalink / raw)
To: linuxppc-dev
From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Unregister fadump on kexec down path otherwise the fadump registration in
new kexec-ed kernel complains that fadump is already registered. This
makes new kernel to continue using fadump registered by previous kernel
which may lead to invalid vmcore generation. Hence this patch fixes this
issue by un-registering fadump in fadump_cleanup() which is called during
kexec path so that new kernel can register fadump with new valid values.
Fixes: b500afff11f6 ("fadump: Invalidate registration and release reserved memory for general use.")
Cc: stable@vger.kernel.org
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
---
arch/powerpc/kernel/fadump.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
index 8ceabef40d3d..07e8396d472b 100644
--- a/arch/powerpc/kernel/fadump.c
+++ b/arch/powerpc/kernel/fadump.c
@@ -1180,6 +1180,9 @@ void fadump_cleanup(void)
init_fadump_mem_struct(&fdm,
be64_to_cpu(fdm_active->cpu_state_data.destination_address));
fadump_invalidate_dump(&fdm);
+ } else if (fw_dump.dump_registered) {
+ /* Un-register Firmware-assisted dump if it was registered. */
+ fadump_unregister_dump(&fdm);
}
}
^ permalink raw reply related
* Re: [PATCH v5 1/4] powerpc/fadump: un-register fadump on kexec path.
From: Mahesh Jagannath Salgaonkar @ 2018-04-27 6:25 UTC (permalink / raw)
To: Nicholas Piggin
Cc: linuxppc-dev, Srikar Dronamraju, kernelfans, Aneesh Kumar K.V,
Ananth Narayan, Hari Bathini, Nathan Fontenot, Anshuman Khandual
In-Reply-To: <20180426234049.3f7909df@roar.ozlabs.ibm.com>
On 04/26/2018 07:10 PM, Nicholas Piggin wrote:
> On Thu, 26 Apr 2018 18:35:10 +0530
> Mahesh Jagannath Salgaonkar <mahesh@linux.vnet.ibm.com> wrote:
>
>> On 04/26/2018 06:28 PM, Nicholas Piggin wrote:
>>> On Thu, 26 Apr 2018 17:12:03 +0530
>>> Mahesh J Salgaonkar <mahesh@linux.vnet.ibm.com> wrote:
>>>
>>>> From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
>>>>
>>>> otherwise the fadump registration in new kexec-ed kernel complains that
>>>> fadump is already registered. This makes new kernel to continue using
>>>> fadump registered by previous kernel which may lead to invalid vmcore
>>>> generation. Hence this patch fixes this issue by un-registering fadump
>>>> in fadump_cleanup() which is called during kexec path so that new kernel
>>>> can register fadump with new valid values.
>>>
>>> I assume this series is for 4.17, but it might be good to get this one
>>> into the 4.16 fixes branch? Should it go to stable kernels?
>>
>> You are right. Should I send it out as separate patch ?
>
> Yes I think so.
Done posted it separately (http://patchwork.ozlabs.org/patch/905508/)
Ignore this patch from this series.
Thanks,
-Mahesh.
^ permalink raw reply
* Re: [PATCH] powerpc: paste - Mask XERSO bit in CR
From: Michael Ellerman @ 2018-04-27 6:27 UTC (permalink / raw)
To: Haren Myneni; +Cc: linuxppc-dev
In-Reply-To: <1524725319.26204.4.camel@hbabu-laptop>
Haren Myneni <haren@linux.vnet.ibm.com> writes:
>
> NX can set 3rd bit in CR register for XER[SO] (Summation overflow)
> which is not used for paste return value. So. mask this bit to get
> proper return status.
This sounds like a bug fix, but I can't tell from the change log.
What happens if we don't merge this patch? Is it bad?
Should I add:
Fixes: 2392c8c8c045 ("powerpc/powernv/vas: Define copy/paste interfaces")
Cc: stable@vger.kernel.org # v4.14+
cheers
> diff --git a/arch/powerpc/platforms/powernv/copy-paste.h b/arch/powerpc/platforms/powernv/copy-paste.h
> index c9a5036..82392e3 100644
> --- a/arch/powerpc/platforms/powernv/copy-paste.h
> +++ b/arch/powerpc/platforms/powernv/copy-paste.h
> @@ -9,7 +9,8 @@
> #include <asm/ppc-opcode.h>
>
> #define CR0_SHIFT 28
> -#define CR0_MASK 0xF
> +#define CR0_MASK 0xE /* 3rd bit undefined or set for XER[SO] */
> +
> /*
> * Copy/paste instructions:
> *
^ permalink raw reply
* Re: [PATCH] powerpc: paste - Mask XERSO bit in CR
From: Haren Myneni @ 2018-04-27 7:46 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linuxppc-dev, Sukadev Bhattiprolu
In-Reply-To: <871sf15fl4.fsf@concordia.ellerman.id.au>
On 04/26/2018 11:27 PM, Michael Ellerman wrote:
> Haren Myneni <haren@linux.vnet.ibm.com> writes:
>>
>> NX can set 3rd bit in CR register for XER[SO] (Summation overflow)
>> which is not used for paste return value. So. mask this bit to get
>> proper return status.
>
> This sounds like a bug fix, but I can't tell from the change log.
>
> What happens if we don't merge this patch? Is it bad?
>
> Should I add:
>
> Fixes: 2392c8c8c045 ("powerpc/powernv/vas: Define copy/paste interfaces")
> Cc: stable@vger.kernel.org # v4.14+
Thanks for your review.
Yes, it is a bug, We should ignore XER[SO] from the return status which is nothing to with NX. Otherwise, successful paste instruction will be returned as failure when this bit is set. Not easy to reproduce. We did not see this bug on P9 NX 842 so far, but noticed this issue few times when testing user space NX gzip with 32 threads and 1 million requests per thread. We added similar fix on P8 (with icswx) and can happen on P9 NX842.
P8 fix - 6333ed8f26cf crypto: nx-842 - Mask XERS0 bit in return value
paste (powerISA V3.0b page#855):
CR0 Description
0b000||XERSO Data transfer failed due to a
sequence error or a conflict with
tlbie or some implementation-
specific problem.
0b001||XERSO Data transfer successful
I will resend patch with more description.
Thanks
Haren
>
>
> cheers
>
>> diff --git a/arch/powerpc/platforms/powernv/copy-paste.h b/arch/powerpc/platforms/powernv/copy-paste.h
>> index c9a5036..82392e3 100644
>> --- a/arch/powerpc/platforms/powernv/copy-paste.h
>> +++ b/arch/powerpc/platforms/powernv/copy-paste.h
>> @@ -9,7 +9,8 @@
>> #include <asm/ppc-opcode.h>
>>
>> #define CR0_SHIFT 28
>> -#define CR0_MASK 0xF
>> +#define CR0_MASK 0xE /* 3rd bit undefined or set for XER[SO] */
>> +
>> /*
>> * Copy/paste instructions:
>> *
>
^ permalink raw reply
* Re: OOM killer invoked while still one forth of mem is available
From: Michal Hocko @ 2018-04-27 8:27 UTC (permalink / raw)
To: LEROY Christophe; +Cc: linuxppc-dev, linux-mm, David Rientjes
In-Reply-To: <20180426222917.Horde.cu42u5sTkcbGdcY0VUmclQ1@messagerie.si.c-s.fr>
On Thu 26-04-18 22:29:17, LEROY Christophe wrote:
> Michal Hocko <mhocko@kernel.org> a écrit :
[...]
> > Yes, show_migration_types. But I do not see why unmovable pageblocks
> > should block the allocation. This is a GFP_KERNEL allocation request
> > essentially - thus unmovable itself. This smells like a bug. We are way
> > above reserves which could block the allocation.
>
> Any suggestion on how to investigate that bug ? Anything to trace ?
try to enable allocator and vmscan tracepoints. Maybe it will tell
something.
--
Michal Hocko
SUSE Labs
^ permalink raw reply
* [PATCH 0/6 v3] Support for fsl-mc bus and its devices in SMMU
From: Nipun Gupta @ 2018-04-27 10:27 UTC (permalink / raw)
To: robin.murphy, will.deacon, mark.rutland, catalin.marinas
Cc: hch, gregkh, joro, robh+dt, m.szyprowski, shawnguo, frowand.list,
bhelgaas, iommu, linux-kernel, devicetree, linux-arm-kernel,
linuxppc-dev, linux-pci, bharat.bhushan, stuyoder,
laurentiu.tudor, leoyang.li, Nipun Gupta
This patchset defines IOMMU DT binding for fsl-mc bus and adds
support in SMMU for fsl-mc bus.
This patch series is dependent on patset:
https://patchwork.kernel.org/patch/10317337/
These patches
- Define property 'iommu-map' for fsl-mc bus (patch 1)
- Integrates the fsl-mc bus with the SMMU using this
IOMMU binding (patch 2,3,4)
- Adds the dma configuration support for fsl-mc bus (patch 5)
- Updates the fsl-mc device node with iommu/dma related changes (patch6)
Changes in v2:
- use iommu-map property for fsl-mc bus
- rebase over patchset https://patchwork.kernel.org/patch/10317337/
and make corresponding changes for dma configuration of devices on
fsl-mc bus
Changes in v3:
- move of_map_rid in drivers/of/address.c
Nipun Gupta (6):
Docs: dt: add fsl-mc iommu-map device-tree binding
iommu: of: make of_pci_map_rid() available for other devices too
iommu: support iommu configuration for fsl-mc devices
iommu: arm-smmu: Add support for the fsl-mc bus
bus: fsl-mc: supoprt dma configure for devices on fsl-mc bus
arm64: dts: ls208xa: comply with the iommu map binding for fsl_mc
.../devicetree/bindings/misc/fsl,qoriq-mc.txt | 39 ++++++++
arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi | 6 +-
drivers/bus/fsl-mc/fsl-mc-bus.c | 16 +++-
drivers/iommu/arm-smmu.c | 7 ++
drivers/iommu/iommu.c | 21 +++++
drivers/iommu/of_iommu.c | 26 +++++-
drivers/of/address.c | 102 +++++++++++++++++++++
drivers/of/irq.c | 7 +-
drivers/pci/of.c | 101 --------------------
include/linux/fsl/mc.h | 8 ++
include/linux/iommu.h | 2 +
include/linux/of_address.h | 11 +++
include/linux/of_pci.h | 10 --
13 files changed, 234 insertions(+), 122 deletions(-)
--
1.9.1
^ permalink raw reply
* [PATCH 1/6 v3] Docs: dt: add fsl-mc iommu-map device-tree binding
From: Nipun Gupta @ 2018-04-27 10:27 UTC (permalink / raw)
To: robin.murphy, will.deacon, mark.rutland, catalin.marinas
Cc: hch, gregkh, joro, robh+dt, m.szyprowski, shawnguo, frowand.list,
bhelgaas, iommu, linux-kernel, devicetree, linux-arm-kernel,
linuxppc-dev, linux-pci, bharat.bhushan, stuyoder,
laurentiu.tudor, leoyang.li, Nipun Gupta
In-Reply-To: <1524824826-29473-1-git-send-email-nipun.gupta@nxp.com>
The existing IOMMU bindings cannot be used to specify the relationship
between fsl-mc devices and IOMMUs. This patch adds a generic binding for
mapping fsl-mc devices to IOMMUs, using iommu-map property.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
---
.../devicetree/bindings/misc/fsl,qoriq-mc.txt | 39 ++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/Documentation/devicetree/bindings/misc/fsl,qoriq-mc.txt b/Documentation/devicetree/bindings/misc/fsl,qoriq-mc.txt
index 6611a7c..8cbed4f 100644
--- a/Documentation/devicetree/bindings/misc/fsl,qoriq-mc.txt
+++ b/Documentation/devicetree/bindings/misc/fsl,qoriq-mc.txt
@@ -9,6 +9,25 @@ blocks that can be used to create functional hardware objects/devices
such as network interfaces, crypto accelerator instances, L2 switches,
etc.
+For an overview of the DPAA2 architecture and fsl-mc bus see:
+drivers/staging/fsl-mc/README.txt
+
+As described in the above overview, all DPAA2 objects in a DPRC share the
+same hardware "isolation context" and a 10-bit value called an ICID
+(isolation context id) is expressed by the hardware to identify
+the requester.
+
+The generic 'iommus' property is insufficient to describe the relationship
+between ICIDs and IOMMUs, so an iommu-map property is used to define
+the set of possible ICIDs under a root DPRC and how they map to
+an IOMMU.
+
+For generic IOMMU bindings, see
+Documentation/devicetree/bindings/iommu/iommu.txt.
+
+For arm-smmu binding, see:
+Documentation/devicetree/bindings/iommu/arm,smmu.txt.
+
Required properties:
- compatible
@@ -88,14 +107,34 @@ Sub-nodes:
Value type: <phandle>
Definition: Specifies the phandle to the PHY device node associated
with the this dpmac.
+Optional properties:
+
+- iommu-map: Maps an ICID to an IOMMU and associated iommu-specifier
+ data.
+
+ The property is an arbitrary number of tuples of
+ (icid-base,iommu,iommu-base,length).
+
+ Any ICID i in the interval [icid-base, icid-base + length) is
+ associated with the listed IOMMU, with the iommu-specifier
+ (i - icid-base + iommu-base).
Example:
+ smmu: iommu@5000000 {
+ compatible = "arm,mmu-500";
+ #iommu-cells = <2>;
+ stream-match-mask = <0x7C00>;
+ ...
+ };
+
fsl_mc: fsl-mc@80c000000 {
compatible = "fsl,qoriq-mc";
reg = <0x00000008 0x0c000000 0 0x40>, /* MC portal base */
<0x00000000 0x08340000 0 0x40000>; /* MC control reg */
msi-parent = <&its>;
+ /* define map for ICIDs 23-64 */
+ iommu-map = <23 &smmu 23 41>;
#address-cells = <3>;
#size-cells = <1>;
--
1.9.1
^ permalink raw reply related
* [PATCH 2/6 v3] iommu: of: make of_pci_map_rid() available for other devices too
From: Nipun Gupta @ 2018-04-27 10:27 UTC (permalink / raw)
To: robin.murphy, will.deacon, mark.rutland, catalin.marinas
Cc: hch, gregkh, joro, robh+dt, m.szyprowski, shawnguo, frowand.list,
bhelgaas, iommu, linux-kernel, devicetree, linux-arm-kernel,
linuxppc-dev, linux-pci, bharat.bhushan, stuyoder,
laurentiu.tudor, leoyang.li, Nipun Gupta
In-Reply-To: <1524824826-29473-1-git-send-email-nipun.gupta@nxp.com>
iommu-map property is also used by devices with fsl-mc. This
patch moves the of_pci_map_rid to generic location, so that it
can be used by other busses too.
'of_pci_map_rid' is renamed here to 'of_map_rid' and there is no
functional change done in the API.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
---
drivers/iommu/of_iommu.c | 6 +--
drivers/of/address.c | 102 +++++++++++++++++++++++++++++++++++++++++++++
drivers/of/irq.c | 7 ++--
drivers/pci/of.c | 101 --------------------------------------------
include/linux/of_address.h | 11 +++++
include/linux/of_pci.h | 10 -----
6 files changed, 120 insertions(+), 117 deletions(-)
diff --git a/drivers/iommu/of_iommu.c b/drivers/iommu/of_iommu.c
index 5c36a8b..ea9ecef 100644
--- a/drivers/iommu/of_iommu.c
+++ b/drivers/iommu/of_iommu.c
@@ -21,6 +21,7 @@
#include <linux/iommu.h>
#include <linux/limits.h>
#include <linux/of.h>
+#include <linux/of_address.h>
#include <linux/of_iommu.h>
#include <linux/of_pci.h>
#include <linux/slab.h>
@@ -149,9 +150,8 @@ static int of_pci_iommu_init(struct pci_dev *pdev, u16 alias, void *data)
struct of_phandle_args iommu_spec = { .args_count = 1 };
int err;
- err = of_pci_map_rid(info->np, alias, "iommu-map",
- "iommu-map-mask", &iommu_spec.np,
- iommu_spec.args);
+ err = of_map_rid(info->np, alias, "iommu-map", "iommu-map-mask",
+ &iommu_spec.np, iommu_spec.args);
if (err)
return err == -ENODEV ? NO_IOMMU : err;
diff --git a/drivers/of/address.c b/drivers/of/address.c
index 5334991..4163f24 100644
--- a/drivers/of/address.c
+++ b/drivers/of/address.c
@@ -985,3 +985,105 @@ bool of_dma_is_coherent(struct device_node *np)
return false;
}
EXPORT_SYMBOL_GPL(of_dma_is_coherent);
+
+/**
+ * of_map_rid - Translate a requester ID through a downstream mapping.
+ * @np: root complex device node.
+ * @rid: device requester ID to map.
+ * @map_name: property name of the map to use.
+ * @map_mask_name: optional property name of the mask to use.
+ * @target: optional pointer to a target device node.
+ * @id_out: optional pointer to receive the translated ID.
+ *
+ * Given a device requester ID, look up the appropriate implementation-defined
+ * platform ID and/or the target device which receives transactions on that
+ * ID, as per the "iommu-map" and "msi-map" bindings. Either of @target or
+ * @id_out may be NULL if only the other is required. If @target points to
+ * a non-NULL device node pointer, only entries targeting that node will be
+ * matched; if it points to a NULL value, it will receive the device node of
+ * the first matching target phandle, with a reference held.
+ *
+ * Return: 0 on success or a standard error code on failure.
+ */
+int of_map_rid(struct device_node *np, u32 rid,
+ const char *map_name, const char *map_mask_name,
+ struct device_node **target, u32 *id_out)
+{
+ u32 map_mask, masked_rid;
+ int map_len;
+ const __be32 *map = NULL;
+
+ if (!np || !map_name || (!target && !id_out))
+ return -EINVAL;
+
+ map = of_get_property(np, map_name, &map_len);
+ if (!map) {
+ if (target)
+ return -ENODEV;
+ /* Otherwise, no map implies no translation */
+ *id_out = rid;
+ return 0;
+ }
+
+ if (!map_len || map_len % (4 * sizeof(*map))) {
+ pr_err("%pOF: Error: Bad %s length: %d\n", np,
+ map_name, map_len);
+ return -EINVAL;
+ }
+
+ /* The default is to select all bits. */
+ map_mask = 0xffffffff;
+
+ /*
+ * Can be overridden by "{iommu,msi}-map-mask" property.
+ * If of_property_read_u32() fails, the default is used.
+ */
+ if (map_mask_name)
+ of_property_read_u32(np, map_mask_name, &map_mask);
+
+ masked_rid = map_mask & rid;
+ for ( ; map_len > 0; map_len -= 4 * sizeof(*map), map += 4) {
+ struct device_node *phandle_node;
+ u32 rid_base = be32_to_cpup(map + 0);
+ u32 phandle = be32_to_cpup(map + 1);
+ u32 out_base = be32_to_cpup(map + 2);
+ u32 rid_len = be32_to_cpup(map + 3);
+
+ if (rid_base & ~map_mask) {
+ pr_err("%pOF: Invalid %s translation - %s-mask (0x%x) ignores rid-base (0x%x)\n",
+ np, map_name, map_name,
+ map_mask, rid_base);
+ return -EFAULT;
+ }
+
+ if (masked_rid < rid_base || masked_rid >= rid_base + rid_len)
+ continue;
+
+ phandle_node = of_find_node_by_phandle(phandle);
+ if (!phandle_node)
+ return -ENODEV;
+
+ if (target) {
+ if (*target)
+ of_node_put(phandle_node);
+ else
+ *target = phandle_node;
+
+ if (*target != phandle_node)
+ continue;
+ }
+
+ if (id_out)
+ *id_out = masked_rid - rid_base + out_base;
+
+ pr_debug("%pOF: %s, using mask %08x, rid-base: %08x, out-base: %08x, length: %08x, rid: %08x -> %08x\n",
+ np, map_name, map_mask, rid_base, out_base,
+ rid_len, rid, masked_rid - rid_base + out_base);
+ return 0;
+ }
+
+ pr_err("%pOF: Invalid %s translation - no match for rid 0x%x on %pOF\n",
+ np, map_name, rid, target && *target ? *target : NULL);
+ return -EFAULT;
+}
+EXPORT_SYMBOL_GPL(of_map_rid);
diff --git a/drivers/of/irq.c b/drivers/of/irq.c
index 02ad93a..e9ebe1e 100644
--- a/drivers/of/irq.c
+++ b/drivers/of/irq.c
@@ -21,8 +21,9 @@
#include <linux/list.h>
#include <linux/module.h>
#include <linux/of.h>
+#include <linux/of_address.h>
#include <linux/of_irq.h>
-#include <linux/of_pci.h>
+#include <linux/of_iommu.h>
#include <linux/string.h>
#include <linux/slab.h>
@@ -588,8 +589,8 @@ static u32 __of_msi_map_rid(struct device *dev, struct device_node **np,
* "msi-map" property.
*/
for (parent_dev = dev; parent_dev; parent_dev = parent_dev->parent)
- if (!of_pci_map_rid(parent_dev->of_node, rid_in, "msi-map",
- "msi-map-mask", np, &rid_out))
+ if (!of_map_rid(parent_dev->of_node, rid_in, "msi-map",
+ "msi-map-mask", np, &rid_out))
break;
return rid_out;
}
diff --git a/drivers/pci/of.c b/drivers/pci/of.c
index a28355c..d2cebbe 100644
--- a/drivers/pci/of.c
+++ b/drivers/pci/of.c
@@ -362,107 +362,6 @@ int of_pci_get_host_bridge_resources(struct device_node *dev,
EXPORT_SYMBOL_GPL(of_pci_get_host_bridge_resources);
#endif /* CONFIG_OF_ADDRESS */
-/**
- * of_pci_map_rid - Translate a requester ID through a downstream mapping.
- * @np: root complex device node.
- * @rid: PCI requester ID to map.
- * @map_name: property name of the map to use.
- * @map_mask_name: optional property name of the mask to use.
- * @target: optional pointer to a target device node.
- * @id_out: optional pointer to receive the translated ID.
- *
- * Given a PCI requester ID, look up the appropriate implementation-defined
- * platform ID and/or the target device which receives transactions on that
- * ID, as per the "iommu-map" and "msi-map" bindings. Either of @target or
- * @id_out may be NULL if only the other is required. If @target points to
- * a non-NULL device node pointer, only entries targeting that node will be
- * matched; if it points to a NULL value, it will receive the device node of
- * the first matching target phandle, with a reference held.
- *
- * Return: 0 on success or a standard error code on failure.
- */
-int of_pci_map_rid(struct device_node *np, u32 rid,
- const char *map_name, const char *map_mask_name,
- struct device_node **target, u32 *id_out)
-{
- u32 map_mask, masked_rid;
- int map_len;
- const __be32 *map = NULL;
-
- if (!np || !map_name || (!target && !id_out))
- return -EINVAL;
-
- map = of_get_property(np, map_name, &map_len);
- if (!map) {
- if (target)
- return -ENODEV;
- /* Otherwise, no map implies no translation */
- *id_out = rid;
- return 0;
- }
-
- if (!map_len || map_len % (4 * sizeof(*map))) {
- pr_err("%pOF: Error: Bad %s length: %d\n", np,
- map_name, map_len);
- return -EINVAL;
- }
-
- /* The default is to select all bits. */
- map_mask = 0xffffffff;
-
- /*
- * Can be overridden by "{iommu,msi}-map-mask" property.
- * If of_property_read_u32() fails, the default is used.
- */
- if (map_mask_name)
- of_property_read_u32(np, map_mask_name, &map_mask);
-
- masked_rid = map_mask & rid;
- for ( ; map_len > 0; map_len -= 4 * sizeof(*map), map += 4) {
- struct device_node *phandle_node;
- u32 rid_base = be32_to_cpup(map + 0);
- u32 phandle = be32_to_cpup(map + 1);
- u32 out_base = be32_to_cpup(map + 2);
- u32 rid_len = be32_to_cpup(map + 3);
-
- if (rid_base & ~map_mask) {
- pr_err("%pOF: Invalid %s translation - %s-mask (0x%x) ignores rid-base (0x%x)\n",
- np, map_name, map_name,
- map_mask, rid_base);
- return -EFAULT;
- }
-
- if (masked_rid < rid_base || masked_rid >= rid_base + rid_len)
- continue;
-
- phandle_node = of_find_node_by_phandle(phandle);
- if (!phandle_node)
- return -ENODEV;
-
- if (target) {
- if (*target)
- of_node_put(phandle_node);
- else
- *target = phandle_node;
-
- if (*target != phandle_node)
- continue;
- }
-
- if (id_out)
- *id_out = masked_rid - rid_base + out_base;
-
- pr_debug("%pOF: %s, using mask %08x, rid-base: %08x, out-base: %08x, length: %08x, rid: %08x -> %08x\n",
- np, map_name, map_mask, rid_base, out_base,
- rid_len, rid, masked_rid - rid_base + out_base);
- return 0;
- }
-
- pr_err("%pOF: Invalid %s translation - no match for rid 0x%x on %pOF\n",
- np, map_name, rid, target && *target ? *target : NULL);
- return -EFAULT;
-}
-
#if IS_ENABLED(CONFIG_OF_IRQ)
/**
* of_irq_parse_pci - Resolve the interrupt for a PCI device
diff --git a/include/linux/of_address.h b/include/linux/of_address.h
index 30e40fb..25cd3f1 100644
--- a/include/linux/of_address.h
+++ b/include/linux/of_address.h
@@ -120,6 +120,10 @@ static inline bool of_dma_is_coherent(struct device_node *np)
extern int of_address_to_resource(struct device_node *dev, int index,
struct resource *r);
void __iomem *of_iomap(struct device_node *node, int index);
+int of_map_rid(struct device_node *np, u32 rid,
+ const char *map_name, const char *map_mask_name,
+ struct device_node **target, u32 *id_out);
+
#else
static inline int of_address_to_resource(struct device_node *dev, int index,
struct resource *r)
@@ -131,6 +135,13 @@ static inline void __iomem *of_iomap(struct device_node *device, int index)
{
return NULL;
}
+
+static inline int of_map_rid(struct device_node *np, u32 rid,
+ const char *map_name, const char *map_mask_name,
+ struct device_node **target, u32 *id_out)
+{
+ return -EINVAL;
+}
#endif
#if defined(CONFIG_OF_ADDRESS) && defined(CONFIG_PCI)
diff --git a/include/linux/of_pci.h b/include/linux/of_pci.h
index 091033a..a23b44a 100644
--- a/include/linux/of_pci.h
+++ b/include/linux/of_pci.h
@@ -17,9 +17,6 @@ struct device_node *of_pci_find_child_device(struct device_node *parent,
int of_get_pci_domain_nr(struct device_node *node);
int of_pci_get_max_link_speed(struct device_node *node);
void of_pci_check_probe_only(void);
-int of_pci_map_rid(struct device_node *np, u32 rid,
- const char *map_name, const char *map_mask_name,
- struct device_node **target, u32 *id_out);
#else
static inline struct device_node *of_pci_find_child_device(struct device_node *parent,
unsigned int devfn)
@@ -44,13 +41,6 @@ static inline int of_pci_get_devfn(struct device_node *np)
return -1;
}
-static inline int of_pci_map_rid(struct device_node *np, u32 rid,
- const char *map_name, const char *map_mask_name,
- struct device_node **target, u32 *id_out)
-{
- return -EINVAL;
-}
-
static inline int
of_pci_get_max_link_speed(struct device_node *node)
{
--
1.9.1
^ permalink raw reply related
* [PATCH 3/6 v3] iommu: support iommu configuration for fsl-mc devices
From: Nipun Gupta @ 2018-04-27 10:27 UTC (permalink / raw)
To: robin.murphy, will.deacon, mark.rutland, catalin.marinas
Cc: hch, gregkh, joro, robh+dt, m.szyprowski, shawnguo, frowand.list,
bhelgaas, iommu, linux-kernel, devicetree, linux-arm-kernel,
linuxppc-dev, linux-pci, bharat.bhushan, stuyoder,
laurentiu.tudor, leoyang.li, Nipun Gupta
In-Reply-To: <1524824826-29473-1-git-send-email-nipun.gupta@nxp.com>
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
---
drivers/iommu/of_iommu.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/drivers/iommu/of_iommu.c b/drivers/iommu/of_iommu.c
index ea9ecef..3687882 100644
--- a/drivers/iommu/of_iommu.c
+++ b/drivers/iommu/of_iommu.c
@@ -25,6 +25,7 @@
#include <linux/of_iommu.h>
#include <linux/of_pci.h>
#include <linux/slab.h>
+#include <linux/fsl/mc.h>
#define NO_IOMMU 1
@@ -160,6 +161,23 @@ static int of_pci_iommu_init(struct pci_dev *pdev, u16 alias, void *data)
return err;
}
+static int of_fsl_mc_iommu_init(struct fsl_mc_device *mc_dev,
+ struct device_node *master_np)
+{
+ struct of_phandle_args iommu_spec = { .args_count = 1 };
+ int err;
+
+ err = of_map_rid(master_np, mc_dev->icid, "iommu-map",
+ "iommu-map-mask", &iommu_spec.np,
+ iommu_spec.args);
+ if (err)
+ return err == -ENODEV ? NO_IOMMU : err;
+
+ err = of_iommu_xlate(&mc_dev->dev, &iommu_spec);
+ of_node_put(iommu_spec.np);
+ return err;
+}
+
const struct iommu_ops *of_iommu_configure(struct device *dev,
struct device_node *master_np)
{
@@ -191,6 +209,8 @@ const struct iommu_ops *of_iommu_configure(struct device *dev,
err = pci_for_each_dma_alias(to_pci_dev(dev),
of_pci_iommu_init, &info);
+ } else if (dev_is_fsl_mc(dev)) {
+ err = of_fsl_mc_iommu_init(to_fsl_mc_device(dev), master_np);
} else {
struct of_phandle_args iommu_spec;
int idx = 0;
--
1.9.1
^ permalink raw reply related
* [PATCH 4/6 v3] iommu: arm-smmu: Add support for the fsl-mc bus
From: Nipun Gupta @ 2018-04-27 10:27 UTC (permalink / raw)
To: robin.murphy, will.deacon, mark.rutland, catalin.marinas
Cc: hch, gregkh, joro, robh+dt, m.szyprowski, shawnguo, frowand.list,
bhelgaas, iommu, linux-kernel, devicetree, linux-arm-kernel,
linuxppc-dev, linux-pci, bharat.bhushan, stuyoder,
laurentiu.tudor, leoyang.li, Nipun Gupta
In-Reply-To: <1524824826-29473-1-git-send-email-nipun.gupta@nxp.com>
Implement bus specific support for the fsl-mc bus including
registering arm_smmu_ops and bus specific device add operations.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
---
drivers/iommu/arm-smmu.c | 7 +++++++
drivers/iommu/iommu.c | 21 +++++++++++++++++++++
include/linux/fsl/mc.h | 8 ++++++++
include/linux/iommu.h | 2 ++
4 files changed, 38 insertions(+)
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index 69e7c60..e1d5090 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -52,6 +52,7 @@
#include <linux/spinlock.h>
#include <linux/amba/bus.h>
+#include <linux/fsl/mc.h>
#include "io-pgtable.h"
#include "arm-smmu-regs.h"
@@ -1459,6 +1460,8 @@ static struct iommu_group *arm_smmu_device_group(struct device *dev)
if (dev_is_pci(dev))
group = pci_device_group(dev);
+ else if (dev_is_fsl_mc(dev))
+ group = fsl_mc_device_group(dev);
else
group = generic_device_group(dev);
@@ -2037,6 +2040,10 @@ static void arm_smmu_bus_init(void)
bus_set_iommu(&pci_bus_type, &arm_smmu_ops);
}
#endif
+#ifdef CONFIG_FSL_MC_BUS
+ if (!iommu_present(&fsl_mc_bus_type))
+ bus_set_iommu(&fsl_mc_bus_type, &arm_smmu_ops);
+#endif
}
static int arm_smmu_device_probe(struct platform_device *pdev)
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index d2aa2320..6d4ce35 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -32,6 +32,7 @@
#include <linux/pci.h>
#include <linux/bitops.h>
#include <linux/property.h>
+#include <linux/fsl/mc.h>
#include <trace/events/iommu.h>
static struct kset *iommu_group_kset;
@@ -987,6 +988,26 @@ struct iommu_group *pci_device_group(struct device *dev)
return iommu_group_alloc();
}
+/* Get the IOMMU group for device on fsl-mc bus */
+struct iommu_group *fsl_mc_device_group(struct device *dev)
+{
+ struct device *cont_dev = fsl_mc_cont_dev(dev);
+ struct iommu_group *group;
+
+ /* Container device is responsible for creating the iommu group */
+ if (fsl_mc_is_cont_dev(dev)) {
+ group = iommu_group_alloc();
+ if (IS_ERR(group))
+ return NULL;
+ } else {
+ get_device(cont_dev);
+ group = iommu_group_get(cont_dev);
+ put_device(cont_dev);
+ }
+
+ return group;
+}
+
/**
* iommu_group_get_for_dev - Find or create the IOMMU group for a device
* @dev: target device
diff --git a/include/linux/fsl/mc.h b/include/linux/fsl/mc.h
index f27cb14..dddaca1 100644
--- a/include/linux/fsl/mc.h
+++ b/include/linux/fsl/mc.h
@@ -351,6 +351,14 @@ struct fsl_mc_io {
#define dev_is_fsl_mc(_dev) (0)
#endif
+/* Macro to check if a device is a container device */
+#define fsl_mc_is_cont_dev(_dev) (to_fsl_mc_device(_dev)->flags & \
+ FSL_MC_IS_DPRC)
+
+/* Macro to get the container device of a MC device */
+#define fsl_mc_cont_dev(_dev) (fsl_mc_is_cont_dev(_dev) ? \
+ (_dev) : (_dev)->parent)
+
/*
* module_fsl_mc_driver() - Helper macro for drivers that don't do
* anything special in module init/exit. This eliminates a lot of
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index 19938ee..2981200 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -389,6 +389,8 @@ static inline size_t iommu_map_sg(struct iommu_domain *domain,
extern struct iommu_group *pci_device_group(struct device *dev);
/* Generic device grouping function */
extern struct iommu_group *generic_device_group(struct device *dev);
+/* FSL-MC device grouping function */
+struct iommu_group *fsl_mc_device_group(struct device *dev);
/**
* struct iommu_fwspec - per-device IOMMU instance data
--
1.9.1
^ permalink raw reply related
* [PATCH 5/6 v3] bus: fsl-mc: supoprt dma configure for devices on fsl-mc bus
From: Nipun Gupta @ 2018-04-27 10:27 UTC (permalink / raw)
To: robin.murphy, will.deacon, mark.rutland, catalin.marinas
Cc: hch, gregkh, joro, robh+dt, m.szyprowski, shawnguo, frowand.list,
bhelgaas, iommu, linux-kernel, devicetree, linux-arm-kernel,
linuxppc-dev, linux-pci, bharat.bhushan, stuyoder,
laurentiu.tudor, leoyang.li, Nipun Gupta
In-Reply-To: <1524824826-29473-1-git-send-email-nipun.gupta@nxp.com>
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
---
drivers/bus/fsl-mc/fsl-mc-bus.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/bus/fsl-mc/fsl-mc-bus.c b/drivers/bus/fsl-mc/fsl-mc-bus.c
index 5d8266c..624828b 100644
--- a/drivers/bus/fsl-mc/fsl-mc-bus.c
+++ b/drivers/bus/fsl-mc/fsl-mc-bus.c
@@ -127,6 +127,16 @@ static int fsl_mc_bus_uevent(struct device *dev, struct kobj_uevent_env *env)
return 0;
}
+static int fsl_mc_dma_configure(struct device *dev)
+{
+ struct device *dma_dev = dev;
+
+ while (dev_is_fsl_mc(dma_dev))
+ dma_dev = dma_dev->parent;
+
+ return of_dma_configure(dev, dma_dev->of_node, 0);
+}
+
static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
char *buf)
{
@@ -148,6 +158,7 @@ struct bus_type fsl_mc_bus_type = {
.name = "fsl-mc",
.match = fsl_mc_bus_match,
.uevent = fsl_mc_bus_uevent,
+ .dma_configure = fsl_mc_dma_configure,
.dev_groups = fsl_mc_dev_groups,
};
EXPORT_SYMBOL_GPL(fsl_mc_bus_type);
@@ -616,6 +627,7 @@ int fsl_mc_device_add(struct fsl_mc_obj_desc *obj_desc,
mc_dev->icid = parent_mc_dev->icid;
mc_dev->dma_mask = FSL_MC_DEFAULT_DMA_MASK;
mc_dev->dev.dma_mask = &mc_dev->dma_mask;
+ mc_dev->dev.coherent_dma_mask = mc_dev->dma_mask;
dev_set_msi_domain(&mc_dev->dev,
dev_get_msi_domain(&parent_mc_dev->dev));
}
@@ -633,10 +645,6 @@ int fsl_mc_device_add(struct fsl_mc_obj_desc *obj_desc,
goto error_cleanup_dev;
}
- /* Objects are coherent, unless 'no shareability' flag set. */
- if (!(obj_desc->flags & FSL_MC_OBJ_FLAG_NO_MEM_SHAREABILITY))
- arch_setup_dma_ops(&mc_dev->dev, 0, 0, NULL, true);
-
/*
* The device-specific probe callback will get invoked by device_add()
*/
--
1.9.1
^ permalink raw reply related
* [PATCH 6/6 v3] arm64: dts: ls208xa: comply with the iommu map binding for fsl_mc
From: Nipun Gupta @ 2018-04-27 10:27 UTC (permalink / raw)
To: robin.murphy, will.deacon, mark.rutland, catalin.marinas
Cc: hch, gregkh, joro, robh+dt, m.szyprowski, shawnguo, frowand.list,
bhelgaas, iommu, linux-kernel, devicetree, linux-arm-kernel,
linuxppc-dev, linux-pci, bharat.bhushan, stuyoder,
laurentiu.tudor, leoyang.li, Nipun Gupta
In-Reply-To: <1524824826-29473-1-git-send-email-nipun.gupta@nxp.com>
fsl-mc bus support the new iommu-map property. Comply to this binding
for fsl_mc bus.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
---
arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
index 137ef4d..6010505 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
@@ -184,6 +184,7 @@
#address-cells = <2>;
#size-cells = <2>;
ranges;
+ dma-ranges = <0x0 0x0 0x0 0x0 0x10000 0x00000000>;
clockgen: clocking@1300000 {
compatible = "fsl,ls2080a-clockgen";
@@ -357,6 +358,8 @@
reg = <0x00000008 0x0c000000 0 0x40>, /* MC portal base */
<0x00000000 0x08340000 0 0x40000>; /* MC control reg */
msi-parent = <&its>;
+ iommu-map = <0 &smmu 0 0>; /* This is fixed-up by u-boot */
+ dma-coherent;
#address-cells = <3>;
#size-cells = <1>;
@@ -460,6 +463,8 @@
compatible = "arm,mmu-500";
reg = <0 0x5000000 0 0x800000>;
#global-interrupts = <12>;
+ #iommu-cells = <1>;
+ stream-match-mask = <0x7C00>;
interrupts = <0 13 4>, /* global secure fault */
<0 14 4>, /* combined secure interrupt */
<0 15 4>, /* global non-secure fault */
@@ -502,7 +507,6 @@
<0 204 4>, <0 205 4>,
<0 206 4>, <0 207 4>,
<0 208 4>, <0 209 4>;
- mmu-masters = <&fsl_mc 0x300 0>;
};
dspi: dspi@2100000 {
--
1.9.1
^ permalink raw reply related
* Patch "block/swim: Rename macros to avoid inconsistent inverted logic" has been added to the 4.14-stable tree
From: gregkh @ 2018-04-27 12:19 UTC (permalink / raw)
To: axboe, benh, fthain, gregkh, linuxppc-dev, lvivier, userm57
Cc: stable-commits
This is a note to let you know that I've just added the patch titled
block/swim: Rename macros to avoid inconsistent inverted logic
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
block-swim-rename-macros-to-avoid-inconsistent-inverted-logic.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 56a1c5ee54f69dd767fb61d301883dc919ddc259 Mon Sep 17 00:00:00 2001
From: Finn Thain <fthain@telegraphics.com.au>
Date: Wed, 11 Apr 2018 20:50:14 -0400
Subject: block/swim: Rename macros to avoid inconsistent inverted logic
From: Finn Thain <fthain@telegraphics.com.au>
commit 56a1c5ee54f69dd767fb61d301883dc919ddc259 upstream.
The Sony drive status bits use active-low logic. The swim_readbit()
function converts that to 'C' logic for readability. Hence, the
sense of the names of the status bit macros should not be inverted.
Mostly they are correct. However, the TWOMEG_DRIVE, MFM_MODE and
TWOMEG_MEDIA macros have inverted sense (like MkLinux). Fix this
inconsistency and make the following patches less confusing.
The same problem affects swim3.c so fix that too.
No functional change.
The FDHD drive status bits are documented in sonydriv.cpp from MAME
and in swimiii.h from MkLinux.
Cc: Laurent Vivier <lvivier@redhat.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Jens Axboe <axboe@kernel.dk>
Cc: stable@vger.kernel.org # v4.14+
Tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Acked-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/block/swim.c | 8 ++++----
drivers/block/swim3.c | 6 +++---
2 files changed, 7 insertions(+), 7 deletions(-)
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -110,7 +110,7 @@ struct iwm {
/* Select values for swim_select and swim_readbit */
#define READ_DATA_0 0x074
-#define TWOMEG_DRIVE 0x075
+#define ONEMEG_DRIVE 0x075
#define SINGLE_SIDED 0x076
#define DRIVE_PRESENT 0x077
#define DISK_IN 0x170
@@ -118,9 +118,9 @@ struct iwm {
#define TRACK_ZERO 0x172
#define TACHO 0x173
#define READ_DATA_1 0x174
-#define MFM_MODE 0x175
+#define GCR_MODE 0x175
#define SEEK_COMPLETE 0x176
-#define ONEMEG_MEDIA 0x177
+#define TWOMEG_MEDIA 0x177
/* Bits in handshake register */
@@ -612,7 +612,7 @@ static void setup_medium(struct floppy_s
struct floppy_struct *g;
fs->disk_in = 1;
fs->write_protected = swim_readbit(base, WRITE_PROT);
- fs->type = swim_readbit(base, ONEMEG_MEDIA);
+ fs->type = swim_readbit(base, TWOMEG_MEDIA);
if (swim_track00(base))
printk(KERN_ERR
--- a/drivers/block/swim3.c
+++ b/drivers/block/swim3.c
@@ -148,7 +148,7 @@ struct swim3 {
#define MOTOR_ON 2
#define RELAX 3 /* also eject in progress */
#define READ_DATA_0 4
-#define TWOMEG_DRIVE 5
+#define ONEMEG_DRIVE 5
#define SINGLE_SIDED 6 /* drive or diskette is 4MB type? */
#define DRIVE_PRESENT 7
#define DISK_IN 8
@@ -156,9 +156,9 @@ struct swim3 {
#define TRACK_ZERO 10
#define TACHO 11
#define READ_DATA_1 12
-#define MFM_MODE 13
+#define GCR_MODE 13
#define SEEK_COMPLETE 14
-#define ONEMEG_MEDIA 15
+#define TWOMEG_MEDIA 15
/* Definitions of values used in writing and formatting */
#define DATA_ESCAPE 0x99
Patches currently in stable-queue which might be from fthain@telegraphics.com.au are
queue-4.14/block-swim-don-t-log-an-error-message-for-an-invalid-ioctl.patch
queue-4.14/block-swim-fix-io-error-at-end-of-medium.patch
queue-4.14/m68k-mac-don-t-remap-swim-mmio-region.patch
queue-4.14/block-swim-rename-macros-to-avoid-inconsistent-inverted-logic.patch
queue-4.14/block-swim-select-appropriate-drive-on-device-open.patch
queue-4.14/block-swim-fix-array-bounds-check.patch
queue-4.14/block-swim-check-drive-type.patch
queue-4.14/block-swim-remove-extra-put_disk-call-from-error-path.patch
^ permalink raw reply
* Patch "block/swim: Rename macros to avoid inconsistent inverted logic" has been added to the 4.16-stable tree
From: gregkh @ 2018-04-27 12:20 UTC (permalink / raw)
To: axboe, benh, fthain, gregkh, linuxppc-dev, lvivier, userm57
Cc: stable-commits
This is a note to let you know that I've just added the patch titled
block/swim: Rename macros to avoid inconsistent inverted logic
to the 4.16-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
block-swim-rename-macros-to-avoid-inconsistent-inverted-logic.patch
and it can be found in the queue-4.16 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 56a1c5ee54f69dd767fb61d301883dc919ddc259 Mon Sep 17 00:00:00 2001
From: Finn Thain <fthain@telegraphics.com.au>
Date: Wed, 11 Apr 2018 20:50:14 -0400
Subject: block/swim: Rename macros to avoid inconsistent inverted logic
From: Finn Thain <fthain@telegraphics.com.au>
commit 56a1c5ee54f69dd767fb61d301883dc919ddc259 upstream.
The Sony drive status bits use active-low logic. The swim_readbit()
function converts that to 'C' logic for readability. Hence, the
sense of the names of the status bit macros should not be inverted.
Mostly they are correct. However, the TWOMEG_DRIVE, MFM_MODE and
TWOMEG_MEDIA macros have inverted sense (like MkLinux). Fix this
inconsistency and make the following patches less confusing.
The same problem affects swim3.c so fix that too.
No functional change.
The FDHD drive status bits are documented in sonydriv.cpp from MAME
and in swimiii.h from MkLinux.
Cc: Laurent Vivier <lvivier@redhat.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Jens Axboe <axboe@kernel.dk>
Cc: stable@vger.kernel.org # v4.14+
Tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Acked-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/block/swim.c | 8 ++++----
drivers/block/swim3.c | 6 +++---
2 files changed, 7 insertions(+), 7 deletions(-)
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -110,7 +110,7 @@ struct iwm {
/* Select values for swim_select and swim_readbit */
#define READ_DATA_0 0x074
-#define TWOMEG_DRIVE 0x075
+#define ONEMEG_DRIVE 0x075
#define SINGLE_SIDED 0x076
#define DRIVE_PRESENT 0x077
#define DISK_IN 0x170
@@ -118,9 +118,9 @@ struct iwm {
#define TRACK_ZERO 0x172
#define TACHO 0x173
#define READ_DATA_1 0x174
-#define MFM_MODE 0x175
+#define GCR_MODE 0x175
#define SEEK_COMPLETE 0x176
-#define ONEMEG_MEDIA 0x177
+#define TWOMEG_MEDIA 0x177
/* Bits in handshake register */
@@ -612,7 +612,7 @@ static void setup_medium(struct floppy_s
struct floppy_struct *g;
fs->disk_in = 1;
fs->write_protected = swim_readbit(base, WRITE_PROT);
- fs->type = swim_readbit(base, ONEMEG_MEDIA);
+ fs->type = swim_readbit(base, TWOMEG_MEDIA);
if (swim_track00(base))
printk(KERN_ERR
--- a/drivers/block/swim3.c
+++ b/drivers/block/swim3.c
@@ -148,7 +148,7 @@ struct swim3 {
#define MOTOR_ON 2
#define RELAX 3 /* also eject in progress */
#define READ_DATA_0 4
-#define TWOMEG_DRIVE 5
+#define ONEMEG_DRIVE 5
#define SINGLE_SIDED 6 /* drive or diskette is 4MB type? */
#define DRIVE_PRESENT 7
#define DISK_IN 8
@@ -156,9 +156,9 @@ struct swim3 {
#define TRACK_ZERO 10
#define TACHO 11
#define READ_DATA_1 12
-#define MFM_MODE 13
+#define GCR_MODE 13
#define SEEK_COMPLETE 14
-#define ONEMEG_MEDIA 15
+#define TWOMEG_MEDIA 15
/* Definitions of values used in writing and formatting */
#define DATA_ESCAPE 0x99
Patches currently in stable-queue which might be from fthain@telegraphics.com.au are
queue-4.16/block-swim-don-t-log-an-error-message-for-an-invalid-ioctl.patch
queue-4.16/block-swim-fix-io-error-at-end-of-medium.patch
queue-4.16/m68k-mac-don-t-remap-swim-mmio-region.patch
queue-4.16/block-swim-rename-macros-to-avoid-inconsistent-inverted-logic.patch
queue-4.16/block-swim-select-appropriate-drive-on-device-open.patch
queue-4.16/block-swim-fix-array-bounds-check.patch
queue-4.16/block-swim-check-drive-type.patch
queue-4.16/block-swim-remove-extra-put_disk-call-from-error-path.patch
^ permalink raw reply
* [PATCH 4.14 72/80] block/swim: Rename macros to avoid inconsistent inverted logic
From: Greg Kroah-Hartman @ 2018-04-27 13:59 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Laurent Vivier,
Benjamin Herrenschmidt, linuxppc-dev, Jens Axboe, Stan Johnson,
Finn Thain
In-Reply-To: <20180427135732.928644313@linuxfoundation.org>
4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Finn Thain <fthain@telegraphics.com.au>
commit 56a1c5ee54f69dd767fb61d301883dc919ddc259 upstream.
The Sony drive status bits use active-low logic. The swim_readbit()
function converts that to 'C' logic for readability. Hence, the
sense of the names of the status bit macros should not be inverted.
Mostly they are correct. However, the TWOMEG_DRIVE, MFM_MODE and
TWOMEG_MEDIA macros have inverted sense (like MkLinux). Fix this
inconsistency and make the following patches less confusing.
The same problem affects swim3.c so fix that too.
No functional change.
The FDHD drive status bits are documented in sonydriv.cpp from MAME
and in swimiii.h from MkLinux.
Cc: Laurent Vivier <lvivier@redhat.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Jens Axboe <axboe@kernel.dk>
Cc: stable@vger.kernel.org # v4.14+
Tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Acked-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/block/swim.c | 8 ++++----
drivers/block/swim3.c | 6 +++---
2 files changed, 7 insertions(+), 7 deletions(-)
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -110,7 +110,7 @@ struct iwm {
/* Select values for swim_select and swim_readbit */
#define READ_DATA_0 0x074
-#define TWOMEG_DRIVE 0x075
+#define ONEMEG_DRIVE 0x075
#define SINGLE_SIDED 0x076
#define DRIVE_PRESENT 0x077
#define DISK_IN 0x170
@@ -118,9 +118,9 @@ struct iwm {
#define TRACK_ZERO 0x172
#define TACHO 0x173
#define READ_DATA_1 0x174
-#define MFM_MODE 0x175
+#define GCR_MODE 0x175
#define SEEK_COMPLETE 0x176
-#define ONEMEG_MEDIA 0x177
+#define TWOMEG_MEDIA 0x177
/* Bits in handshake register */
@@ -612,7 +612,7 @@ static void setup_medium(struct floppy_s
struct floppy_struct *g;
fs->disk_in = 1;
fs->write_protected = swim_readbit(base, WRITE_PROT);
- fs->type = swim_readbit(base, ONEMEG_MEDIA);
+ fs->type = swim_readbit(base, TWOMEG_MEDIA);
if (swim_track00(base))
printk(KERN_ERR
--- a/drivers/block/swim3.c
+++ b/drivers/block/swim3.c
@@ -148,7 +148,7 @@ struct swim3 {
#define MOTOR_ON 2
#define RELAX 3 /* also eject in progress */
#define READ_DATA_0 4
-#define TWOMEG_DRIVE 5
+#define ONEMEG_DRIVE 5
#define SINGLE_SIDED 6 /* drive or diskette is 4MB type? */
#define DRIVE_PRESENT 7
#define DISK_IN 8
@@ -156,9 +156,9 @@ struct swim3 {
#define TRACK_ZERO 10
#define TACHO 11
#define READ_DATA_1 12
-#define MFM_MODE 13
+#define GCR_MODE 13
#define SEEK_COMPLETE 14
-#define ONEMEG_MEDIA 15
+#define TWOMEG_MEDIA 15
/* Definitions of values used in writing and formatting */
#define DATA_ESCAPE 0x99
^ permalink raw reply
* [PATCH 4.16 69/81] block/swim: Rename macros to avoid inconsistent inverted logic
From: Greg Kroah-Hartman @ 2018-04-27 13:59 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Laurent Vivier,
Benjamin Herrenschmidt, linuxppc-dev, Jens Axboe, Stan Johnson,
Finn Thain
In-Reply-To: <20180427135743.216853156@linuxfoundation.org>
4.16-stable review patch. If anyone has any objections, please let me know.
------------------
From: Finn Thain <fthain@telegraphics.com.au>
commit 56a1c5ee54f69dd767fb61d301883dc919ddc259 upstream.
The Sony drive status bits use active-low logic. The swim_readbit()
function converts that to 'C' logic for readability. Hence, the
sense of the names of the status bit macros should not be inverted.
Mostly they are correct. However, the TWOMEG_DRIVE, MFM_MODE and
TWOMEG_MEDIA macros have inverted sense (like MkLinux). Fix this
inconsistency and make the following patches less confusing.
The same problem affects swim3.c so fix that too.
No functional change.
The FDHD drive status bits are documented in sonydriv.cpp from MAME
and in swimiii.h from MkLinux.
Cc: Laurent Vivier <lvivier@redhat.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Jens Axboe <axboe@kernel.dk>
Cc: stable@vger.kernel.org # v4.14+
Tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Acked-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/block/swim.c | 8 ++++----
drivers/block/swim3.c | 6 +++---
2 files changed, 7 insertions(+), 7 deletions(-)
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -110,7 +110,7 @@ struct iwm {
/* Select values for swim_select and swim_readbit */
#define READ_DATA_0 0x074
-#define TWOMEG_DRIVE 0x075
+#define ONEMEG_DRIVE 0x075
#define SINGLE_SIDED 0x076
#define DRIVE_PRESENT 0x077
#define DISK_IN 0x170
@@ -118,9 +118,9 @@ struct iwm {
#define TRACK_ZERO 0x172
#define TACHO 0x173
#define READ_DATA_1 0x174
-#define MFM_MODE 0x175
+#define GCR_MODE 0x175
#define SEEK_COMPLETE 0x176
-#define ONEMEG_MEDIA 0x177
+#define TWOMEG_MEDIA 0x177
/* Bits in handshake register */
@@ -612,7 +612,7 @@ static void setup_medium(struct floppy_s
struct floppy_struct *g;
fs->disk_in = 1;
fs->write_protected = swim_readbit(base, WRITE_PROT);
- fs->type = swim_readbit(base, ONEMEG_MEDIA);
+ fs->type = swim_readbit(base, TWOMEG_MEDIA);
if (swim_track00(base))
printk(KERN_ERR
--- a/drivers/block/swim3.c
+++ b/drivers/block/swim3.c
@@ -148,7 +148,7 @@ struct swim3 {
#define MOTOR_ON 2
#define RELAX 3 /* also eject in progress */
#define READ_DATA_0 4
-#define TWOMEG_DRIVE 5
+#define ONEMEG_DRIVE 5
#define SINGLE_SIDED 6 /* drive or diskette is 4MB type? */
#define DRIVE_PRESENT 7
#define DISK_IN 8
@@ -156,9 +156,9 @@ struct swim3 {
#define TRACK_ZERO 10
#define TACHO 11
#define READ_DATA_1 12
-#define MFM_MODE 13
+#define GCR_MODE 13
#define SEEK_COMPLETE 14
-#define ONEMEG_MEDIA 15
+#define TWOMEG_MEDIA 15
/* Definitions of values used in writing and formatting */
#define DATA_ESCAPE 0x99
^ permalink raw reply
* Re: [PATCH 0/6 v3] Support for fsl-mc bus and its devices in SMMU
From: Christoph Hellwig @ 2018-04-27 15:52 UTC (permalink / raw)
To: Nipun Gupta
Cc: robin.murphy, will.deacon, mark.rutland, catalin.marinas, hch,
gregkh, joro, robh+dt, m.szyprowski, shawnguo, frowand.list,
bhelgaas, iommu, linux-kernel, devicetree, linux-arm-kernel,
linuxppc-dev, linux-pci, bharat.bhushan, stuyoder,
laurentiu.tudor, leoyang.li
In-Reply-To: <1524824826-29473-1-git-send-email-nipun.gupta@nxp.com>
On Fri, Apr 27, 2018 at 03:57:00PM +0530, Nipun Gupta wrote:
> This patchset defines IOMMU DT binding for fsl-mc bus and adds
> support in SMMU for fsl-mc bus.
>
> This patch series is dependent on patset:
> https://patchwork.kernel.org/patch/10317337/
Which still needs to be resent against 4.17-rc..
^ permalink raw reply
* Re: [PATCH 2/6 v3] iommu: of: make of_pci_map_rid() available for other devices too
From: Rob Herring @ 2018-04-27 17:15 UTC (permalink / raw)
To: Nipun Gupta
Cc: robin.murphy, will.deacon, mark.rutland, catalin.marinas, hch,
gregkh, joro, m.szyprowski, shawnguo, frowand.list, bhelgaas,
iommu, linux-kernel, devicetree, linux-arm-kernel, linuxppc-dev,
linux-pci, bharat.bhushan, stuyoder, laurentiu.tudor, leoyang.li
In-Reply-To: <1524824826-29473-3-git-send-email-nipun.gupta@nxp.com>
On Fri, Apr 27, 2018 at 03:57:02PM +0530, Nipun Gupta wrote:
> iommu-map property is also used by devices with fsl-mc. This
> patch moves the of_pci_map_rid to generic location, so that it
> can be used by other busses too.
>
> 'of_pci_map_rid' is renamed here to 'of_map_rid' and there is no
> functional change done in the API.
>
> Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
> ---
> drivers/iommu/of_iommu.c | 6 +--
> drivers/of/address.c | 102 +++++++++++++++++++++++++++++++++++++++++++++
> drivers/of/irq.c | 7 ++--
> drivers/pci/of.c | 101 --------------------------------------------
> include/linux/of_address.h | 11 +++++
> include/linux/of_pci.h | 10 -----
> 6 files changed, 120 insertions(+), 117 deletions(-)
of/address.c isn't really the best fit either, though I don't have a
better suggestion.
I'm guessing this breaks on Sparc which doesn't build of/address.c.
I guess move it to base.c and of.h if that is the case.
Rob
^ permalink raw reply
* Re: [PATCH 1/6 v3] Docs: dt: add fsl-mc iommu-map device-tree binding
From: Rob Herring @ 2018-04-27 17:20 UTC (permalink / raw)
To: Nipun Gupta
Cc: robin.murphy, will.deacon, mark.rutland, catalin.marinas, hch,
gregkh, joro, m.szyprowski, shawnguo, frowand.list, bhelgaas,
iommu, linux-kernel, devicetree, linux-arm-kernel, linuxppc-dev,
linux-pci, bharat.bhushan, stuyoder, laurentiu.tudor, leoyang.li
In-Reply-To: <1524824826-29473-2-git-send-email-nipun.gupta@nxp.com>
On Fri, Apr 27, 2018 at 03:57:01PM +0530, Nipun Gupta wrote:
> The existing IOMMU bindings cannot be used to specify the relationship
> between fsl-mc devices and IOMMUs. This patch adds a generic binding for
> mapping fsl-mc devices to IOMMUs, using iommu-map property.
>
> Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
> ---
> .../devicetree/bindings/misc/fsl,qoriq-mc.txt | 39 ++++++++++++++++++++++
> 1 file changed, 39 insertions(+)
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply
* Re: [RFC PATCH 0/9] Enable THP migration for all possible architectures
From: Gerald Schaefer @ 2018-04-27 17:36 UTC (permalink / raw)
To: Zi Yan
Cc: linux-mm, linux-kernel, Zi Yan, Vineet Gupta, linux-snps-arc,
Russell King, Christoffer Dall, Marc Zyngier, linux-arm-kernel,
Catalin Marinas, Will Deacon, Steve Capper, Kristina Martsenko,
Dan Williams, Thomas Gleixner, Ingo Molnar, Kirill A. Shutemov,
x86, Ralf Baechle, James Hogan, Michal Hocko, linux-mips,
Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Aneesh Kumar K.V, Ram Pai, Balbir Singh, Naoya Horiguchi,
linuxppc-dev, Martin Schwidefsky, Heiko Carstens, Janosch Frank,
linux-s390, David S. Miller, sparclinux, Huang, Ying
In-Reply-To: <20180426142804.180152-1-zi.yan@sent.com>
On Thu, 26 Apr 2018 10:27:55 -0400
Zi Yan <zi.yan@sent.com> wrote:
> From: Zi Yan <zi.yan@cs.rutgers.edu>
>
> Hi all,
>
> THP migration is only enabled on x86_64 with a special
> ARCH_ENABLE_THP_MIGRATION macro. This patchset enables THP migration for
> all architectures that uses transparent hugepage, so that special macro can
> be dropped. Instead, THP migration is enabled/disabled via
> /sys/kernel/mm/transparent_hugepage/enable_thp_migration.
>
> I grepped for TRANSPARENT_HUGEPAGE in arch folder and got 9 architectures that
> are supporting transparent hugepage. I mechanically add __pmd_to_swp_entry() and
> __swp_entry_to_pmd() based on existing __pte_to_swp_entry() and
> __swp_entry_to_pte() for all these architectures, except tile which is going to
> be dropped.
This will not work on s390, the pmd layout is very different from the pte
layout. Using __swp_entry/type/offset() on a pmd will go horribly wrong.
I currently don't see a chance to make this work for us, so please make/keep
this configurable, and do not configure it for s390.
Regards,
Gerald
^ permalink raw reply
* Re: [PATCH 01/11] KVM: PPC: add pt_regs into kvm_vcpu_arch and move vcpu->arch.gpr[] into it
From: Simon Guo @ 2018-04-27 10:21 UTC (permalink / raw)
To: kbuild test robot; +Cc: kbuild-all, kvm-ppc, Paul Mackerras, kvm, linuxppc-dev
In-Reply-To: <201804271051.wQFsyZAy%fengguang.wu@intel.com>
On Fri, Apr 27, 2018 at 11:47:21AM +0800, kbuild test robot wrote:
> Hi Simon,
>
> Thank you for the patch! Yet something to improve:
>
> [auto build test ERROR on powerpc/next]
> [also build test ERROR on v4.17-rc2 next-20180426]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>
> url: https://github.com/0day-ci/linux/commits/wei-guo-simon-gmail-com/KVM-PPC-add-pt_regs-into-kvm_vcpu_arch-and-move-vcpu-arch-gpr-into-it/20180427-055410
> base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
> config: powerpc-defconfig (attached as .config)
> compiler: powerpc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
> reproduce:
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # save the attached .config to linux build tree
> make.cross ARCH=powerpc
>
> Note: the linux-review/wei-guo-simon-gmail-com/KVM-PPC-add-pt_regs-into-kvm_vcpu_arch-and-move-vcpu-arch-gpr-into-it/20180427-055410 HEAD 92a7de2f1920f80f57d625d6d07731a00ea99161 builds fine.
> It only hurts bisectibility.
>
> All error/warnings (new ones prefixed by >>):
>
> In file included from arch/powerpc/include/asm/kvm_book3s.h:271:0,
> from arch/powerpc/kernel/asm-offsets.c:57:
> arch/powerpc/include/asm/kvm_book3s_64.h: In function 'copy_from_checkpoint':
> >> arch/powerpc/include/asm/kvm_book3s_64.h:493:20: error: 'struct kvm_vcpu_arch' has no member named 'gpr'; did you mean 'qpr'?
> memcpy(vcpu->arch.gpr, vcpu->arch.gpr_tm,
> ^~~
> qpr
> arch/powerpc/include/asm/kvm_book3s_64.h:494:27: error: 'struct kvm_vcpu_arch' has no member named 'gpr'; did you mean 'qpr'?
> sizeof(vcpu->arch.gpr));
> ^~~
> qpr
> arch/powerpc/include/asm/kvm_book3s_64.h: In function 'copy_to_checkpoint':
> arch/powerpc/include/asm/kvm_book3s_64.h:510:39: error: 'struct kvm_vcpu_arch' has no member named 'gpr'; did you mean 'qpr'?
> memcpy(vcpu->arch.gpr_tm, vcpu->arch.gpr,
> ^~~
> qpr
> arch/powerpc/include/asm/kvm_book3s_64.h:511:27: error: 'struct kvm_vcpu_arch' has no member named 'gpr'; did you mean 'qpr'?
> sizeof(vcpu->arch.gpr));
> ^~~
> qpr
> In file included from arch/powerpc/kernel/asm-offsets.c:30:0:
> arch/powerpc/kernel/asm-offsets.c: In function 'main':
> >> include/linux/compiler-gcc.h:170:2: error: 'struct kvm_vcpu_arch' has no member named 'nip'
> __builtin_offsetof(a, b)
> ^
> include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE'
> asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
> ^~~
> include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
> #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
> ^~~~~~~~~~~~~~~~~~~
> >> include/linux/kbuild.h:11:14: note: in expansion of macro 'offsetof'
> DEFINE(sym, offsetof(struct str, mem))
> ^~~~~~~~
> >> arch/powerpc/kernel/asm-offsets.c:441:2: note: in expansion of macro 'OFFSET'
> OFFSET(VCPU_PC, kvm_vcpu, arch.nip);
> ^~~~~~
> make[2]: *** [arch/powerpc/kernel/asm-offsets.s] Error 1
> make[2]: Target '__build' not remade because of errors.
> make[1]: *** [prepare0] Error 2
> make[1]: Target 'prepare' not remade because of errors.
> make: *** [sub-make] Error 2
>
> vim +493 arch/powerpc/include/asm/kvm_book3s_64.h
>
> 4bb3c7a0 Paul Mackerras 2018-03-21 481
> 4bb3c7a0 Paul Mackerras 2018-03-21 482 #ifdef CONFIG_PPC_TRANSACTIONAL_MEM
> 4bb3c7a0 Paul Mackerras 2018-03-21 483 static inline void copy_from_checkpoint(struct kvm_vcpu *vcpu)
> 4bb3c7a0 Paul Mackerras 2018-03-21 484 {
> 4bb3c7a0 Paul Mackerras 2018-03-21 485 vcpu->arch.cr = vcpu->arch.cr_tm;
> 4bb3c7a0 Paul Mackerras 2018-03-21 486 vcpu->arch.xer = vcpu->arch.xer_tm;
> 4bb3c7a0 Paul Mackerras 2018-03-21 487 vcpu->arch.lr = vcpu->arch.lr_tm;
> 4bb3c7a0 Paul Mackerras 2018-03-21 488 vcpu->arch.ctr = vcpu->arch.ctr_tm;
> 4bb3c7a0 Paul Mackerras 2018-03-21 489 vcpu->arch.amr = vcpu->arch.amr_tm;
> 4bb3c7a0 Paul Mackerras 2018-03-21 490 vcpu->arch.ppr = vcpu->arch.ppr_tm;
> 4bb3c7a0 Paul Mackerras 2018-03-21 491 vcpu->arch.dscr = vcpu->arch.dscr_tm;
> 4bb3c7a0 Paul Mackerras 2018-03-21 492 vcpu->arch.tar = vcpu->arch.tar_tm;
> 4bb3c7a0 Paul Mackerras 2018-03-21 @493 memcpy(vcpu->arch.gpr, vcpu->arch.gpr_tm,
> 4bb3c7a0 Paul Mackerras 2018-03-21 494 sizeof(vcpu->arch.gpr));
> 4bb3c7a0 Paul Mackerras 2018-03-21 495 vcpu->arch.fp = vcpu->arch.fp_tm;
> 4bb3c7a0 Paul Mackerras 2018-03-21 496 vcpu->arch.vr = vcpu->arch.vr_tm;
> 4bb3c7a0 Paul Mackerras 2018-03-21 497 vcpu->arch.vrsave = vcpu->arch.vrsave_tm;
> 4bb3c7a0 Paul Mackerras 2018-03-21 498 }
> 4bb3c7a0 Paul Mackerras 2018-03-21 499
>
> :::::: The code at line 493 was first introduced by commit
> :::::: 4bb3c7a0208fc13ca70598efd109901a7cd45ae7 KVM: PPC: Book3S HV: Work around transactional memory bugs in POWER9
>
> :::::: TO: Paul Mackerras <paulus@ozlabs.org>
> :::::: CC: Michael Ellerman <mpe@ellerman.id.au>
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation
Somehow I put some code (which should have been in PATCH 01) into
PATCH 02 while splitting the patches, and it lead to the error. I
will correct it in V2.
Thanks,
- Simon
^ permalink raw reply
* Reg: MPC8360: Enabling 8 UCCs(as ethernet ports) in kernel
From: Naveen Kumar I @ 2018-04-28 5:00 UTC (permalink / raw)
To: linuxppc-dev@lists.ozlabs.org
[-- Attachment #1: Type: text/plain, Size: 840 bytes --]
Hi,
I am working on a customized mpc8360 based board, where i am using all 8 UCCs as ethernet ports. Here i am facing a problem of enabling all ethernet ports. At a time i am able to use 5 ethernet ports only. Individually i am able to see all ports are working. But when i try to use all ports at a time, i can see only 5 ethernet ports working. The 6th,7th and 8th ports are showing link 100Mbps full and active. But ping is failing on these(6,7,8) ports. Note that these 6,7,8 ports are working when i remove any of first 3 ports among 5 ports and add them in that place. Is there any place in kernel which is causing this limitation? for this i have done some searching online and added extra SNUMs to accommodate all UCCs but not able make it happen. Please help me in resolving this issue.
Thanks & Regards
Naveen
[-- Attachment #2: Type: text/html, Size: 1321 bytes --]
^ permalink raw reply
* Re: [PATCH 2/6 v3] iommu: of: make of_pci_map_rid() available for other devices too
From: kbuild test robot @ 2018-04-28 8:17 UTC (permalink / raw)
To: Nipun Gupta
Cc: kbuild-all, robin.murphy, will.deacon, mark.rutland,
catalin.marinas, hch, gregkh, joro, robh+dt, m.szyprowski,
shawnguo, frowand.list, bhelgaas, iommu, linux-kernel, devicetree,
linux-arm-kernel, linuxppc-dev, linux-pci, bharat.bhushan,
stuyoder, laurentiu.tudor, leoyang.li, Nipun Gupta
In-Reply-To: <1524824826-29473-3-git-send-email-nipun.gupta@nxp.com>
[-- Attachment #1: Type: text/plain, Size: 1623 bytes --]
Hi Nipun,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v4.17-rc2 next-20180426]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Nipun-Gupta/Docs-dt-add-fsl-mc-iommu-map-device-tree-binding/20180428-111415
config: sparc64-allyesconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=sparc64
All errors (new ones prefixed by >>):
`.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o
`.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o
`.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o
`.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o
drivers/iommu/of_iommu.o: In function `of_pci_iommu_init':
>> of_iommu.c:(.text+0x398): undefined reference to `of_map_rid'
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 53265 bytes --]
^ permalink raw reply
* [PATCH] net: ethernet: ucc: fix spelling mistake: "tx-late-collsion" -> "tx-late-collision"
From: Colin King @ 2018-04-28 9:57 UTC (permalink / raw)
To: Li Yang, netdev, linuxppc-dev; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Trivial fix to spelling mistake in tx_fw_stat_gstrings text
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/ethernet/freescale/ucc_geth_ethtool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/ucc_geth_ethtool.c b/drivers/net/ethernet/freescale/ucc_geth_ethtool.c
index 4df282ed22c7..0beee2cc2ddd 100644
--- a/drivers/net/ethernet/freescale/ucc_geth_ethtool.c
+++ b/drivers/net/ethernet/freescale/ucc_geth_ethtool.c
@@ -61,7 +61,7 @@ static const char hw_stat_gstrings[][ETH_GSTRING_LEN] = {
static const char tx_fw_stat_gstrings[][ETH_GSTRING_LEN] = {
"tx-single-collision",
"tx-multiple-collision",
- "tx-late-collsion",
+ "tx-late-collision",
"tx-aborted-frames",
"tx-lost-frames",
"tx-carrier-sense-errors",
--
2.17.0
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox