Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250958
b: refs/heads/master
c: dbee8a0
h: refs/heads/master
v: v3
  • Loading branch information
Roland Dreier authored and Linus Torvalds committed May 25, 2011
1 parent 156f0e6 commit 4f990b6
Show file tree
Hide file tree
Showing 9 changed files with 75 additions and 25 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 818b667ba57f68bf1e7240fa441dda0b11e6b944
refs/heads/master: dbee8a0affd5e6eaa5d7c816c4bc233f6f110f50
2 changes: 0 additions & 2 deletions trunk/arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ config X86_64
config X86
def_bool y
select HAVE_AOUT if X86_32
select HAVE_READQ
select HAVE_WRITEQ
select HAVE_UNSTABLE_SCHED_CLOCK
select HAVE_IDE
select HAVE_OPROFILE
Expand Down
24 changes: 2 additions & 22 deletions trunk/arch/x86/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@

#include <linux/string.h>
#include <linux/compiler.h>
#include <asm-generic/int-ll64.h>
#include <asm/page.h>

#include <xen/xen.h>
Expand Down Expand Up @@ -87,27 +86,6 @@ build_mmio_write(__writel, "l", unsigned int, "r", )
build_mmio_read(readq, "q", unsigned long, "=r", :"memory")
build_mmio_write(writeq, "q", unsigned long, "r", :"memory")

#else

static inline __u64 readq(const volatile void __iomem *addr)
{
const volatile u32 __iomem *p = addr;
u32 low, high;

low = readl(p);
high = readl(p + 1);

return low + ((u64)high << 32);
}

static inline void writeq(__u64 val, volatile void __iomem *addr)
{
writel(val, addr);
writel(val >> 32, addr+4);
}

#endif

#define readq_relaxed(a) readq(a)

#define __raw_readq(a) readq(a)
Expand All @@ -117,6 +95,8 @@ static inline void writeq(__u64 val, volatile void __iomem *addr)
#define readq readq
#define writeq writeq

#endif

/**
* virt_to_phys - map virtual addresses to physical
* @address: address to remap
Expand Down
8 changes: 8 additions & 0 deletions trunk/drivers/acpi/apei/einj.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,14 @@ static DEFINE_MUTEX(einj_mutex);

static struct einj_parameter *einj_param;

#ifndef writeq
static inline void writeq(__u64 val, volatile void __iomem *addr)
{
writel(val, addr);
writel(val >> 32, addr+4);
}
#endif

static void einj_exec_ctx_init(struct apei_exec_context *ctx)
{
apei_exec_ctx_init(ctx, einj_ins_type, ARRAY_SIZE(einj_ins_type),
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/acpi/atomicio.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,11 @@ static int acpi_atomic_read_mem(u64 paddr, u64 *val, u32 width)
case 32:
*val = readl(addr);
break;
#ifdef readq
case 64:
*val = readq(addr);
break;
#endif
default:
return -EINVAL;
}
Expand All @@ -307,9 +309,11 @@ static int acpi_atomic_write_mem(u64 paddr, u64 val, u32 width)
case 32:
writel(val, addr);
break;
#ifdef writeq
case 64:
writeq(val, addr);
break;
#endif
default:
return -EINVAL;
}
Expand Down
13 changes: 13 additions & 0 deletions trunk/drivers/edac/i3200_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,19 @@ struct i3200_priv {

static int nr_channels;

#ifndef readq
static inline __u64 readq(const volatile void __iomem *addr)
{
const volatile u32 __iomem *p = addr;
u32 low, high;

low = readl(p);
high = readl(p + 1);

return low + ((u64)high << 32);
}
#endif

static int how_many_channels(struct pci_dev *pdev)
{
unsigned char capid0_8b; /* 8th byte of CAPID0 */
Expand Down
13 changes: 13 additions & 0 deletions trunk/drivers/platform/x86/ibm_rtl.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,19 @@ static void __iomem *rtl_cmd_addr;
static u8 rtl_cmd_type;
static u8 rtl_cmd_width;

#ifndef readq
static inline __u64 readq(const volatile void __iomem *addr)
{
const volatile u32 __iomem *p = addr;
u32 low, high;

low = readl(p);
high = readl(p + 1);

return low + ((u64)high << 32);
}
#endif

static void __iomem *rtl_port_map(phys_addr_t addr, unsigned long len)
{
if (rtl_cmd_type == RTL_ADDR_TYPE_MMIO)
Expand Down
13 changes: 13 additions & 0 deletions trunk/drivers/platform/x86/intel_ips.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,19 @@ struct ips_driver {
static bool
ips_gpu_turbo_enabled(struct ips_driver *ips);

#ifndef readq
static inline __u64 readq(const volatile void __iomem *addr)
{
const volatile u32 __iomem *p = addr;
u32 low, high;

low = readl(p);
high = readl(p + 1);

return low + ((u64)high << 32);
}
#endif

/**
* ips_cpu_busy - is CPU busy?
* @ips: IPS driver struct
Expand Down
21 changes: 21 additions & 0 deletions trunk/drivers/scsi/qla4xxx/ql4_nx.c
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,27 @@ static int qla4_8xxx_pci_is_same_window(struct scsi_qla_host *ha,
return 0;
}

#ifndef readq
static inline __u64 readq(const volatile void __iomem *addr)
{
const volatile u32 __iomem *p = addr;
u32 low, high;

low = readl(p);
high = readl(p + 1);

return low + ((u64)high << 32);
}
#endif

#ifndef writeq
static inline void writeq(__u64 val, volatile void __iomem *addr)
{
writel(val, addr);
writel(val >> 32, addr+4);
}
#endif

static int qla4_8xxx_pci_mem_read_direct(struct scsi_qla_host *ha,
u64 off, void *data, int size)
{
Expand Down

0 comments on commit 4f990b6

Please sign in to comment.