* [PATCH] qla4xxx: Fix build on some architectures lacking 64-bit I/O
@ 2010-10-01 3:11 Ben Hutchings
2010-10-01 12:26 ` Vikas Chaudhary
0 siblings, 1 reply; 2+ messages in thread
From: Ben Hutchings @ 2010-10-01 3:11 UTC (permalink / raw)
To: James E.J. Bottomley
Cc: Ravi Anand, Vikas Chaudhary, iscsi-driver, linux-scsi, 598503
readq() and writeq() are not defined on all archictectures. Where
they are missing, define fallback implementations (copied from
qla2xxx).
Reference: http://bugs.debian.org/598503
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
This is a regression from 2.6.35, so please include this fix in 2.6.36.
Ben.
drivers/scsi/qla4xxx/ql4_nx.h | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/drivers/scsi/qla4xxx/ql4_nx.h b/drivers/scsi/qla4xxx/ql4_nx.h
index 931ad3f..85fe6cf 100644
--- a/drivers/scsi/qla4xxx/ql4_nx.h
+++ b/drivers/scsi/qla4xxx/ql4_nx.h
@@ -776,4 +776,19 @@ struct crb_addr_pair {
#define MIU_TEST_AGT_WRDATA_UPPER_LO (0x0b0)
#define MIU_TEST_AGT_WRDATA_UPPER_HI (0x0b4)
+#ifndef readq
+static inline u64 readq(void __iomem *addr)
+{
+ return readl(addr) | (((u64) readl(addr + 4)) << 32LL);
+}
+#endif
+
+#ifndef writeq
+static inline void writeq(u64 val, void __iomem *addr)
+{
+ writel(((u32) (val)), (addr));
+ writel(((u32) (val >> 32)), (addr + 4));
+}
+#endif
+
#endif
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] qla4xxx: Fix build on some architectures lacking 64-bit I/O
2010-10-01 3:11 [PATCH] qla4xxx: Fix build on some architectures lacking 64-bit I/O Ben Hutchings
@ 2010-10-01 12:26 ` Vikas Chaudhary
0 siblings, 0 replies; 2+ messages in thread
From: Vikas Chaudhary @ 2010-10-01 12:26 UTC (permalink / raw)
To: Ben Hutchings
Cc: James E.J. Bottomley, Ravi Anand, Dept_iscsi_driver, linux-scsi,
598503@bugs.debian.org
On Oct 1, 2010, at 8:41 AM, Ben Hutchings wrote:
> readq() and writeq() are not defined on all archictectures. Where
> they are missing, define fallback implementations (copied from
> qla2xxx).
>
> Reference: http://bugs.debian.org/598503
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> ---
> This is a regression from 2.6.35, so please include this fix in
> 2.6.36.
>
> Ben.
>
> drivers/scsi/qla4xxx/ql4_nx.h | 15 +++++++++++++++
> 1 files changed, 15 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/scsi/qla4xxx/ql4_nx.h b/drivers/scsi/qla4xxx/
> ql4_nx.h
> index 931ad3f..85fe6cf 100644
> --- a/drivers/scsi/qla4xxx/ql4_nx.h
> +++ b/drivers/scsi/qla4xxx/ql4_nx.h
> @@ -776,4 +776,19 @@ struct crb_addr_pair {
> #define MIU_TEST_AGT_WRDATA_UPPER_LO (0x0b0)
> #define MIU_TEST_AGT_WRDATA_UPPER_HI (0x0b4)
>
> +#ifndef readq
> +static inline u64 readq(void __iomem *addr)
> +{
> + return readl(addr) | (((u64) readl(addr + 4)) << 32LL);
> +}
> +#endif
> +
> +#ifndef writeq
> +static inline void writeq(u64 val, void __iomem *addr)
> +{
> + writel(((u32) (val)), (addr));
> + writel(((u32) (val >> 32)), (addr + 4));
> +}
> +#endif
> +
> #endif
> --
> 1.7.1
>
Ack-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-10-01 12:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-01 3:11 [PATCH] qla4xxx: Fix build on some architectures lacking 64-bit I/O Ben Hutchings
2010-10-01 12:26 ` Vikas Chaudhary
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox