2018-02-26 16:31:29

by Ioana Ciocoi Radulescu

[permalink] [raw]
Subject: [PATCH 0/4] staging: fsl-mc/dpio, fsl-dpaa2/eth: Enable multi-arch compile

The DPAA2 DPIO and Ethernet drivers need only a couple of small
fixes in order to compile correctly for 32b platforms.

Update the drivers and remove ARCH_LAYERSCAPE from their Kconfig
dependencies.

Ioana Radulescu (4):
staging: fsl-mc/dpio: Fix incorrect casts
staging: fsl-mc/dpio: allow the driver to compile multi-arch
staging: fsl-dpaa2/eth: Fix incorrect casts
staging: fsl-dpaa2/eth: allow the driver to compile multi-arch

drivers/staging/fsl-dpaa2/Kconfig | 2 +-
drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 6 +++---
drivers/staging/fsl-mc/bus/Kconfig | 2 +-
drivers/staging/fsl-mc/bus/dpio/dpio-service.c | 4 ++--
drivers/staging/fsl-mc/bus/dpio/qbman-portal.c | 4 ++--
5 files changed, 9 insertions(+), 9 deletions(-)

--
2.7.4



2018-02-26 16:31:16

by Ioana Ciocoi Radulescu

[permalink] [raw]
Subject: [PATCH 2/4] staging: fsl-mc/dpio: allow the driver to compile multi-arch

Drop dependency on ARCH_LAYERSCAPE (which in turn depends on ARM64),
thus allowing this driver to compile on all architectures supported
by the fsl-mc bus driver.

This was compile tested on:
- powerpc (corenet_basic_defconfig, ppc64_defconfig)
- x86 (i386_defconfig, x86_64_defconfig, needs CONFIG_OF)
- arm64 (defconfig)

Signed-off-by: Ioana Radulescu <[email protected]>
---
drivers/staging/fsl-mc/bus/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/fsl-mc/bus/Kconfig b/drivers/staging/fsl-mc/bus/Kconfig
index 5f4115d..3424530 100644
--- a/drivers/staging/fsl-mc/bus/Kconfig
+++ b/drivers/staging/fsl-mc/bus/Kconfig
@@ -7,7 +7,7 @@

config FSL_MC_DPIO
tristate "QorIQ DPAA2 DPIO driver"
- depends on FSL_MC_BUS && ARCH_LAYERSCAPE
+ depends on FSL_MC_BUS
help
Driver for the DPAA2 DPIO object. A DPIO provides queue and
buffer management facilities for software to interact with
--
2.7.4


2018-02-26 16:31:16

by Ioana Ciocoi Radulescu

[permalink] [raw]
Subject: [PATCH 4/4] staging: fsl-dpaa2/eth: allow the driver to compile multi-arch

Drop dependency on ARCH_LAYERSCAPE (which in turn depends on ARM64),
thus allowing this driver to compile on all architectures supported
by the fsl-mc bus driver.

This was compile tested on:
- powerpc (corenet_basic_defconfig, ppc64_defconfig)
- x86 (i386_defconfig, x86_64_defconfig, needs CONFIG_OF)
- arm64 (defconfig)

Signed-off-by: Ioana Radulescu <[email protected]>
---
drivers/staging/fsl-dpaa2/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/fsl-dpaa2/Kconfig b/drivers/staging/fsl-dpaa2/Kconfig
index dfff675..730fd6d 100644
--- a/drivers/staging/fsl-dpaa2/Kconfig
+++ b/drivers/staging/fsl-dpaa2/Kconfig
@@ -4,7 +4,7 @@

config FSL_DPAA2
bool "Freescale DPAA2 devices"
- depends on FSL_MC_BUS && ARCH_LAYERSCAPE
+ depends on FSL_MC_BUS
---help---
Build drivers for Freescale DataPath Acceleration
Architecture (DPAA2) family of SoCs.
--
2.7.4


2018-02-26 16:32:28

by Ioana Ciocoi Radulescu

[permalink] [raw]
Subject: [PATCH 1/4] staging: fsl-mc/dpio: Fix incorrect casts

The DPIO driver incorrectly assumes virtual addresses are always
64b long, which causes compiler errors when building for a 32b
platform.

Fix this by using explicit casts to uintptr_t where necessary.

Signed-off-by: Ioana Radulescu <[email protected]>
---
drivers/staging/fsl-mc/bus/dpio/dpio-service.c | 4 ++--
drivers/staging/fsl-mc/bus/dpio/qbman-portal.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/fsl-mc/bus/dpio/dpio-service.c b/drivers/staging/fsl-mc/bus/dpio/dpio-service.c
index 1acff7e..14ed2be 100644
--- a/drivers/staging/fsl-mc/bus/dpio/dpio-service.c
+++ b/drivers/staging/fsl-mc/bus/dpio/dpio-service.c
@@ -192,7 +192,7 @@ irqreturn_t dpaa2_io_irq(struct dpaa2_io *obj)
u64 q64;

q64 = qbman_result_SCN_ctx(dq);
- ctx = (void *)q64;
+ ctx = (void *)(uintptr_t)q64;
ctx->cb(ctx);
} else {
pr_crit("fsl-mc-dpio: Unrecognised/ignored DQRR entry\n");
@@ -237,7 +237,7 @@ int dpaa2_io_service_register(struct dpaa2_io *d,
return -ENODEV;

ctx->dpio_id = d->dpio_desc.dpio_id;
- ctx->qman64 = (u64)ctx;
+ ctx->qman64 = (u64)(uintptr_t)ctx;
ctx->dpio_private = d;
spin_lock_irqsave(&d->lock_notifications, irqflags);
list_add(&ctx->node, &d->notifications);
diff --git a/drivers/staging/fsl-mc/bus/dpio/qbman-portal.c b/drivers/staging/fsl-mc/bus/dpio/qbman-portal.c
index 376e9ed..f57c151 100644
--- a/drivers/staging/fsl-mc/bus/dpio/qbman-portal.c
+++ b/drivers/staging/fsl-mc/bus/dpio/qbman-portal.c
@@ -497,7 +497,7 @@ void qbman_pull_desc_set_storage(struct qbman_pull_desc *d,
int stash)
{
/* save the virtual address */
- d->rsp_addr_virt = (u64)storage;
+ d->rsp_addr_virt = (u64)(uintptr_t)storage;

if (!storage) {
d->verb &= ~(1 << QB_VDQCR_VERB_RLS_SHIFT);
@@ -590,7 +590,7 @@ int qbman_swp_pull(struct qbman_swp *s, struct qbman_pull_desc *d)
atomic_inc(&s->vdq.available);
return -EBUSY;
}
- s->vdq.storage = (void *)d->rsp_addr_virt;
+ s->vdq.storage = (void *)(uintptr_t)d->rsp_addr_virt;
p = qbman_get_cmd(s, QBMAN_CENA_SWP_VDQCR);
p->numf = d->numf;
p->tok = QMAN_DQ_TOKEN_VALID;
--
2.7.4


2018-02-26 16:32:35

by Ioana Ciocoi Radulescu

[permalink] [raw]
Subject: [PATCH 3/4] staging: fsl-dpaa2/eth: Fix incorrect casts

The DPAA2 Ethernet driver incorrectly assumes virtual addresses
are always 64b long, which causes compiler errors when building
for a 32b platform.

Fix this by using explicit casts to uintptr_t where necessary.

Signed-off-by: Ioana Radulescu <[email protected]>
---
drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
index dc7be538..c81a01f 100644
--- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
+++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
@@ -324,7 +324,7 @@ static int consume_frames(struct dpaa2_eth_channel *ch)
}

fd = dpaa2_dq_fd(dq);
- fq = (struct dpaa2_eth_fq *)dpaa2_dq_fqd_ctx(dq);
+ fq = (struct dpaa2_eth_fq *)(uintptr_t)dpaa2_dq_fqd_ctx(dq);
fq->stats.frames++;

fq->consume(priv, ch, fd, &ch->napi, fq->flowid);
@@ -1905,7 +1905,7 @@ static int setup_rx_flow(struct dpaa2_eth_priv *priv,
queue.destination.id = fq->channel->dpcon_id;
queue.destination.type = DPNI_DEST_DPCON;
queue.destination.priority = 1;
- queue.user_context = (u64)fq;
+ queue.user_context = (u64)(uintptr_t)fq;
err = dpni_set_queue(priv->mc_io, 0, priv->mc_token,
DPNI_QUEUE_RX, 0, fq->flowid,
DPNI_QUEUE_OPT_USER_CTX | DPNI_QUEUE_OPT_DEST,
@@ -1957,7 +1957,7 @@ static int setup_tx_flow(struct dpaa2_eth_priv *priv,
queue.destination.id = fq->channel->dpcon_id;
queue.destination.type = DPNI_DEST_DPCON;
queue.destination.priority = 0;
- queue.user_context = (u64)fq;
+ queue.user_context = (u64)(uintptr_t)fq;
err = dpni_set_queue(priv->mc_io, 0, priv->mc_token,
DPNI_QUEUE_TX_CONFIRM, 0, fq->flowid,
DPNI_QUEUE_OPT_USER_CTX | DPNI_QUEUE_OPT_DEST,
--
2.7.4


2018-02-28 02:57:41

by kernel test robot

[permalink] [raw]
Subject: [RFC PATCH] staging: fsl-mc/dpio: qbman_pull_desc_set_token() can be static


Fixes: 1628e2e4dc76 ("staging: fsl-mc/dpio: allow the driver to compile multi-arch")
Signed-off-by: Fengguang Wu <[email protected]>
---
qbman-portal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/fsl-mc/bus/dpio/qbman-portal.c b/drivers/staging/fsl-mc/bus/dpio/qbman-portal.c
index f57c151..7b75c93 100644
--- a/drivers/staging/fsl-mc/bus/dpio/qbman-portal.c
+++ b/drivers/staging/fsl-mc/bus/dpio/qbman-portal.c
@@ -522,7 +522,7 @@ void qbman_pull_desc_set_numframes(struct qbman_pull_desc *d, u8 numframes)
d->numf = numframes - 1;
}

-void qbman_pull_desc_set_token(struct qbman_pull_desc *d, u8 token)
+static void qbman_pull_desc_set_token(struct qbman_pull_desc *d, u8 token)
{
d->tok = token;
}

2018-02-28 03:44:38

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH 4/4] staging: fsl-dpaa2/eth: allow the driver to compile multi-arch

Hi Ioana,

I love your patch! Perhaps something to improve:

[auto build test WARNING on staging/staging-testing]
[also build test WARNING on v4.16-rc3 next-20180227]
[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/Ioana-Radulescu/staging-fsl-mc-dpio-fsl-dpaa2-eth-Enable-multi-arch-compile/20180228-062457
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

>> drivers/staging/fsl-dpaa2/ethernet/../../fsl-mc/include/dpaa2-fd.h:290:16: sparse: cast from restricted __le64
>> drivers/staging/fsl-dpaa2/ethernet/../../fsl-mc/include/dpaa2-fd.h:290:16: sparse: cast to restricted __le64
>> drivers/staging/fsl-dpaa2/ethernet/../../fsl-mc/include/dpaa2-fd.h:290:16: sparse: cast from restricted __le64
>> drivers/staging/fsl-dpaa2/ethernet/../../fsl-mc/include/dpaa2-fd.h:290:16: sparse: cast to restricted __le64
>> drivers/staging/fsl-dpaa2/ethernet/../../fsl-mc/include/dpaa2-fd.h:421:30: sparse: cast truncates bits from constant value (ffff7fff becomes 7fff)
--
>> drivers/staging/fsl-dpaa2/ethernet/dpni.c:1624:22: sparse: cast to restricted __le16
drivers/staging/fsl-dpaa2/ethernet/dpni.c:1625:22: sparse: cast to restricted __le16

vim +290 drivers/staging/fsl-dpaa2/ethernet/../../fsl-mc/include/dpaa2-fd.h

d3269bdc Roy Pledge 2017-03-13 281
d3269bdc Roy Pledge 2017-03-13 282 /**
d3269bdc Roy Pledge 2017-03-13 283 * dpaa2_sg_get_addr() - Get the address from SG entry
d3269bdc Roy Pledge 2017-03-13 284 * @sg: the given scatter-gathering object
d3269bdc Roy Pledge 2017-03-13 285 *
d3269bdc Roy Pledge 2017-03-13 286 * Return the address.
d3269bdc Roy Pledge 2017-03-13 287 */
d3269bdc Roy Pledge 2017-03-13 288 static inline dma_addr_t dpaa2_sg_get_addr(const struct dpaa2_sg_entry *sg)
d3269bdc Roy Pledge 2017-03-13 289 {
d3269bdc Roy Pledge 2017-03-13 @290 return le64_to_cpu((dma_addr_t)sg->addr);
d3269bdc Roy Pledge 2017-03-13 291 }
d3269bdc Roy Pledge 2017-03-13 292
d3269bdc Roy Pledge 2017-03-13 293 /**
d3269bdc Roy Pledge 2017-03-13 294 * dpaa2_sg_set_addr() - Set the address in SG entry
d3269bdc Roy Pledge 2017-03-13 295 * @sg: the given scatter-gathering object
d3269bdc Roy Pledge 2017-03-13 296 * @addr: the address to be set
d3269bdc Roy Pledge 2017-03-13 297 */
d3269bdc Roy Pledge 2017-03-13 298 static inline void dpaa2_sg_set_addr(struct dpaa2_sg_entry *sg, dma_addr_t addr)
d3269bdc Roy Pledge 2017-03-13 299 {
d3269bdc Roy Pledge 2017-03-13 300 sg->addr = cpu_to_le64(addr);
d3269bdc Roy Pledge 2017-03-13 301 }
d3269bdc Roy Pledge 2017-03-13 302
d3269bdc Roy Pledge 2017-03-13 303 static inline bool dpaa2_sg_short_len(const struct dpaa2_sg_entry *sg)
d3269bdc Roy Pledge 2017-03-13 304 {
d3269bdc Roy Pledge 2017-03-13 305 return !!((le16_to_cpu(sg->format_offset) >> SG_SHORT_LEN_FLAG_SHIFT)
d3269bdc Roy Pledge 2017-03-13 306 & SG_SHORT_LEN_FLAG_MASK);
d3269bdc Roy Pledge 2017-03-13 307 }
d3269bdc Roy Pledge 2017-03-13 308
d3269bdc Roy Pledge 2017-03-13 309 /**
d3269bdc Roy Pledge 2017-03-13 310 * dpaa2_sg_get_len() - Get the length in SG entry
d3269bdc Roy Pledge 2017-03-13 311 * @sg: the given scatter-gathering object
d3269bdc Roy Pledge 2017-03-13 312 *
d3269bdc Roy Pledge 2017-03-13 313 * Return the length.
d3269bdc Roy Pledge 2017-03-13 314 */
d3269bdc Roy Pledge 2017-03-13 315 static inline u32 dpaa2_sg_get_len(const struct dpaa2_sg_entry *sg)
d3269bdc Roy Pledge 2017-03-13 316 {
d3269bdc Roy Pledge 2017-03-13 317 if (dpaa2_sg_short_len(sg))
d3269bdc Roy Pledge 2017-03-13 318 return le32_to_cpu(sg->len) & SG_SHORT_LEN_MASK;
d3269bdc Roy Pledge 2017-03-13 319
d3269bdc Roy Pledge 2017-03-13 320 return le32_to_cpu(sg->len);
d3269bdc Roy Pledge 2017-03-13 321 }
d3269bdc Roy Pledge 2017-03-13 322
d3269bdc Roy Pledge 2017-03-13 323 /**
d3269bdc Roy Pledge 2017-03-13 324 * dpaa2_sg_set_len() - Set the length in SG entry
d3269bdc Roy Pledge 2017-03-13 325 * @sg: the given scatter-gathering object
d3269bdc Roy Pledge 2017-03-13 326 * @len: the length to be set
d3269bdc Roy Pledge 2017-03-13 327 */
d3269bdc Roy Pledge 2017-03-13 328 static inline void dpaa2_sg_set_len(struct dpaa2_sg_entry *sg, u32 len)
d3269bdc Roy Pledge 2017-03-13 329 {
d3269bdc Roy Pledge 2017-03-13 330 sg->len = cpu_to_le32(len);
d3269bdc Roy Pledge 2017-03-13 331 }
d3269bdc Roy Pledge 2017-03-13 332
d3269bdc Roy Pledge 2017-03-13 333 /**
d3269bdc Roy Pledge 2017-03-13 334 * dpaa2_sg_get_offset() - Get the offset in SG entry
d3269bdc Roy Pledge 2017-03-13 335 * @sg: the given scatter-gathering object
d3269bdc Roy Pledge 2017-03-13 336 *
d3269bdc Roy Pledge 2017-03-13 337 * Return the offset.
d3269bdc Roy Pledge 2017-03-13 338 */
d3269bdc Roy Pledge 2017-03-13 339 static inline u16 dpaa2_sg_get_offset(const struct dpaa2_sg_entry *sg)
d3269bdc Roy Pledge 2017-03-13 340 {
d3269bdc Roy Pledge 2017-03-13 341 return le16_to_cpu(sg->format_offset) & SG_OFFSET_MASK;
d3269bdc Roy Pledge 2017-03-13 342 }
d3269bdc Roy Pledge 2017-03-13 343
d3269bdc Roy Pledge 2017-03-13 344 /**
d3269bdc Roy Pledge 2017-03-13 345 * dpaa2_sg_set_offset() - Set the offset in SG entry
d3269bdc Roy Pledge 2017-03-13 346 * @sg: the given scatter-gathering object
d3269bdc Roy Pledge 2017-03-13 347 * @offset: the offset to be set
d3269bdc Roy Pledge 2017-03-13 348 */
d3269bdc Roy Pledge 2017-03-13 349 static inline void dpaa2_sg_set_offset(struct dpaa2_sg_entry *sg,
d3269bdc Roy Pledge 2017-03-13 350 u16 offset)
d3269bdc Roy Pledge 2017-03-13 351 {
d3269bdc Roy Pledge 2017-03-13 352 sg->format_offset &= cpu_to_le16(~SG_OFFSET_MASK);
d3269bdc Roy Pledge 2017-03-13 353 sg->format_offset |= cpu_to_le16(offset);
d3269bdc Roy Pledge 2017-03-13 354 }
d3269bdc Roy Pledge 2017-03-13 355
d3269bdc Roy Pledge 2017-03-13 356 /**
d3269bdc Roy Pledge 2017-03-13 357 * dpaa2_sg_get_format() - Get the SG format in SG entry
d3269bdc Roy Pledge 2017-03-13 358 * @sg: the given scatter-gathering object
d3269bdc Roy Pledge 2017-03-13 359 *
d3269bdc Roy Pledge 2017-03-13 360 * Return the format.
d3269bdc Roy Pledge 2017-03-13 361 */
d3269bdc Roy Pledge 2017-03-13 362 static inline enum dpaa2_sg_format
d3269bdc Roy Pledge 2017-03-13 363 dpaa2_sg_get_format(const struct dpaa2_sg_entry *sg)
d3269bdc Roy Pledge 2017-03-13 364 {
d3269bdc Roy Pledge 2017-03-13 365 return (enum dpaa2_sg_format)((le16_to_cpu(sg->format_offset)
d3269bdc Roy Pledge 2017-03-13 366 >> SG_FORMAT_SHIFT) & SG_FORMAT_MASK);
d3269bdc Roy Pledge 2017-03-13 367 }
d3269bdc Roy Pledge 2017-03-13 368
d3269bdc Roy Pledge 2017-03-13 369 /**
d3269bdc Roy Pledge 2017-03-13 370 * dpaa2_sg_set_format() - Set the SG format in SG entry
d3269bdc Roy Pledge 2017-03-13 371 * @sg: the given scatter-gathering object
d3269bdc Roy Pledge 2017-03-13 372 * @format: the format to be set
d3269bdc Roy Pledge 2017-03-13 373 */
d3269bdc Roy Pledge 2017-03-13 374 static inline void dpaa2_sg_set_format(struct dpaa2_sg_entry *sg,
d3269bdc Roy Pledge 2017-03-13 375 enum dpaa2_sg_format format)
d3269bdc Roy Pledge 2017-03-13 376 {
d3269bdc Roy Pledge 2017-03-13 377 sg->format_offset &= cpu_to_le16(~(SG_FORMAT_MASK << SG_FORMAT_SHIFT));
d3269bdc Roy Pledge 2017-03-13 378 sg->format_offset |= cpu_to_le16(format << SG_FORMAT_SHIFT);
d3269bdc Roy Pledge 2017-03-13 379 }
d3269bdc Roy Pledge 2017-03-13 380
d3269bdc Roy Pledge 2017-03-13 381 /**
d3269bdc Roy Pledge 2017-03-13 382 * dpaa2_sg_get_bpid() - Get the buffer pool id in SG entry
d3269bdc Roy Pledge 2017-03-13 383 * @sg: the given scatter-gathering object
d3269bdc Roy Pledge 2017-03-13 384 *
d3269bdc Roy Pledge 2017-03-13 385 * Return the bpid.
d3269bdc Roy Pledge 2017-03-13 386 */
d3269bdc Roy Pledge 2017-03-13 387 static inline u16 dpaa2_sg_get_bpid(const struct dpaa2_sg_entry *sg)
d3269bdc Roy Pledge 2017-03-13 388 {
d3269bdc Roy Pledge 2017-03-13 389 return le16_to_cpu(sg->bpid) & SG_BPID_MASK;
d3269bdc Roy Pledge 2017-03-13 390 }
d3269bdc Roy Pledge 2017-03-13 391
d3269bdc Roy Pledge 2017-03-13 392 /**
d3269bdc Roy Pledge 2017-03-13 393 * dpaa2_sg_set_bpid() - Set the buffer pool id in SG entry
d3269bdc Roy Pledge 2017-03-13 394 * @sg: the given scatter-gathering object
d3269bdc Roy Pledge 2017-03-13 395 * @bpid: the bpid to be set
d3269bdc Roy Pledge 2017-03-13 396 */
d3269bdc Roy Pledge 2017-03-13 397 static inline void dpaa2_sg_set_bpid(struct dpaa2_sg_entry *sg, u16 bpid)
d3269bdc Roy Pledge 2017-03-13 398 {
d3269bdc Roy Pledge 2017-03-13 399 sg->bpid &= cpu_to_le16(~(SG_BPID_MASK));
d3269bdc Roy Pledge 2017-03-13 400 sg->bpid |= cpu_to_le16(bpid);
d3269bdc Roy Pledge 2017-03-13 401 }
d3269bdc Roy Pledge 2017-03-13 402
d3269bdc Roy Pledge 2017-03-13 403 /**
d3269bdc Roy Pledge 2017-03-13 404 * dpaa2_sg_is_final() - Check final bit in SG entry
d3269bdc Roy Pledge 2017-03-13 405 * @sg: the given scatter-gathering object
d3269bdc Roy Pledge 2017-03-13 406 *
d3269bdc Roy Pledge 2017-03-13 407 * Return bool.
d3269bdc Roy Pledge 2017-03-13 408 */
d3269bdc Roy Pledge 2017-03-13 409 static inline bool dpaa2_sg_is_final(const struct dpaa2_sg_entry *sg)
d3269bdc Roy Pledge 2017-03-13 410 {
d3269bdc Roy Pledge 2017-03-13 411 return !!(le16_to_cpu(sg->format_offset) >> SG_FINAL_FLAG_SHIFT);
d3269bdc Roy Pledge 2017-03-13 412 }
d3269bdc Roy Pledge 2017-03-13 413
d3269bdc Roy Pledge 2017-03-13 414 /**
d3269bdc Roy Pledge 2017-03-13 415 * dpaa2_sg_set_final() - Set the final bit in SG entry
d3269bdc Roy Pledge 2017-03-13 416 * @sg: the given scatter-gathering object
d3269bdc Roy Pledge 2017-03-13 417 * @final: the final boolean to be set
d3269bdc Roy Pledge 2017-03-13 418 */
d3269bdc Roy Pledge 2017-03-13 419 static inline void dpaa2_sg_set_final(struct dpaa2_sg_entry *sg, bool final)
d3269bdc Roy Pledge 2017-03-13 420 {
d3269bdc Roy Pledge 2017-03-13 @421 sg->format_offset &= cpu_to_le16(~(SG_FINAL_FLAG_MASK
d3269bdc Roy Pledge 2017-03-13 422 << SG_FINAL_FLAG_SHIFT));
d3269bdc Roy Pledge 2017-03-13 423 sg->format_offset |= cpu_to_le16(final << SG_FINAL_FLAG_SHIFT);
d3269bdc Roy Pledge 2017-03-13 424 }
d3269bdc Roy Pledge 2017-03-13 425

:::::: The code at line 290 was first introduced by commit
:::::: d3269bdc7ebcf8bce7969a68d7108ec5890d8173 bus: fsl-mc: dpio: add frame descriptor and scatter/gather APIs

:::::: TO: Roy Pledge <[email protected]>
:::::: CC: Greg Kroah-Hartman <[email protected]>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

2018-03-01 16:32:46

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 4/4] staging: fsl-dpaa2/eth: allow the driver to compile multi-arch

On Mon, Feb 26, 2018 at 10:28:07AM -0600, Ioana Radulescu wrote:
> Drop dependency on ARCH_LAYERSCAPE (which in turn depends on ARM64),
> thus allowing this driver to compile on all architectures supported
> by the fsl-mc bus driver.
>
> This was compile tested on:
> - powerpc (corenet_basic_defconfig, ppc64_defconfig)
> - x86 (i386_defconfig, x86_64_defconfig, needs CONFIG_OF)
> - arm64 (defconfig)

Seems you need to compile it on more things, based on the kbuild
warnings :(

Please fix up and resend.

thanks,

greg k-h

2018-03-02 16:57:23

by Ioana Ciocoi Radulescu

[permalink] [raw]
Subject: RE: [PATCH 4/4] staging: fsl-dpaa2/eth: allow the driver to compile multi-arch

-----Original Message-----
From: Greg KH [mailto:[email protected]]
Sent: Thursday, March 1, 2018 6:32 PM
To: Ruxandra Ioana Ciocoi Radulescu <[email protected]>
Cc: [email protected]; Roy Pledge <[email protected]>; Bogdan Purcareata <[email protected]>; [email protected]; Laurentiu Tudor <[email protected]>
Subject: Re: [PATCH 4/4] staging: fsl-dpaa2/eth: allow the driver to compile multi-arch

On Mon, Feb 26, 2018 at 10:28:07AM -0600, Ioana Radulescu wrote:
> Drop dependency on ARCH_LAYERSCAPE (which in turn depends on ARM64),
> thus allowing this driver to compile on all architectures supported by
> the fsl-mc bus driver.
>
> This was compile tested on:
> - powerpc (corenet_basic_defconfig, ppc64_defconfig)
> - x86 (i386_defconfig, x86_64_defconfig, needs CONFIG_OF)
> - arm64 (defconfig)

Seems you need to compile it on more things, based on the kbuild warnings :(

Yes I do, sorry for the slip :(

I've added allmodconfig and the sparse endianness flag to my list of tests.
Will send a v2 early next week.

Thanks,
Ioana