linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: <linuxppc-dev@ozlabs.org>
Subject: [PATCH 22/27] s2io ppc64 fix for readq/writeq
Date: Mon, 06 Nov 2006 18:05:54 +1100	[thread overview]
Message-ID: <20061106070710.ACCF167E00@ozlabs.org> (raw)
In-Reply-To: <1162796738.274582.277491064706.qpush@grosgo>

ppc642io driver is redefining it's own readq/writeq based on
readl/writel when the platform doesn't provide native ones. However, it
currently does so by testing #ifndef readq. While that works for now, we
are about to change ppc64 to use inline functions rather that macros for
all those IO accessors which will break that test. This fixes it. I
don't have anything less ugly at hand unfortunately.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

 drivers/net/s2io.h |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Index: linux-cell/drivers/net/s2io.h
===================================================================
--- linux-cell.orig/drivers/net/s2io.h	2006-10-13 17:23:49.000000000 +1000
+++ linux-cell/drivers/net/s2io.h	2006-11-06 13:19:32.000000000 +1100
@@ -862,8 +862,10 @@ struct s2io_nic {
 #define RESET_ERROR 1;
 #define CMD_ERROR   2;
 
-/*  OS related system calls */
-#ifndef readq
+/* OS related system calls. Note that ppc64 has readq defined as
+ * an inline, not a macro
+ */
+#if !defined(CONFIG_PPC64) && !defined(readq)
 static inline u64 readq(void __iomem *addr)
 {
 	u64 ret = 0;
@@ -875,7 +877,7 @@ static inline u64 readq(void __iomem *ad
 }
 #endif
 
-#ifndef writeq
+#if !defined(CONFIG_PPC64) && !defined(writeq)
 static inline void writeq(u64 val, void __iomem *addr)
 {
 	writel((u32) (val), addr);

  parent reply	other threads:[~2006-11-06  7:05 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-06  7:05 [PATCH 0/27] My current serie of patches for 2.6.20 for review Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 1/27] ibmveth: Remove ibmveth "liobn" field Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 2/27] Call platform_notify_remove later Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 3/27] Driver core: add notification of bus events Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 4/27] arch provides generic iomap missing accessors Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 5/27] powerpc: Make pci_read_irq_line the default Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 6/27] powerpc: Remove ppc_md.pci_map_irq & ppc_swizzle for ARCH=powerpc Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 8/27] powerpc: Make EMAC use generic DCR access methods Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 7/27] powerpc: Generic DCR infrastructure Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 9/27] powerpc: Support for DCR based MPIC Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 10/27] powerpc: Improve MPIC driver auto-configuration from DT Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 11/27] powerpc: Native cell support for MPIC in southbridge Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 12/27] powerpc: Souped-up of_platform_device support Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 13/27] powerpc: Hook of_platform_bus_probe with cell Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 14/27] powerpc: Refactor 64 bits DMA operations Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 15/27] powerpc: PCI use new bus device notifier Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 16/27] powerpc: Add DMA ops support for of_plaform_device to Cell Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 18/27] powerpc: Resolve the BUID fir RTAS PCI config space accesses Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 17/27] powerpc: Resolve the parent address of a PCI bus range Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 19/27] powerpc: Add "parent" struct device for PCI host bridges Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 20/27] powerpc: Generic OF platform driver " Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 21/27] powerpc: Cell fixup DMA offset for new southbridge Benjamin Herrenschmidt
2006-11-06  7:05 ` Benjamin Herrenschmidt [this message]
2006-11-06  7:05 ` [PATCH 23/27] powerpc: Allow hooking of PCI MMIO & PIO accessors on 64 bits Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 24/27] powerpc: Cell "Spider" MMIO workarounds Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 25/27] powerpc: remove ioremap64 and fixup_bigphys_addr Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 26/27] powerpc: Merge 32 and 64 bits asm-powerpc/io.h Benjamin Herrenschmidt
2006-11-06  7:05 ` [PATCH 27/27] powerpc: EMAC of_platform_device support for Cell using Axon Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061106070710.ACCF167E00@ozlabs.org \
    --to=benh@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).