Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287767
b: refs/heads/master
c: 797a796
h: refs/heads/master
i:
  287765: a08b57b
  287763: ecdd3bc
  287759: 76d44c9
v: v3
  • Loading branch information
Hitoshi Mitake authored and Linus Torvalds committed Feb 22, 2012
1 parent 0cbb277 commit 4aa35e5
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 61 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: 27e74da9800289e69ba907777df1e2085231eff7
refs/heads/master: 797a796a13df6b84a4791e57306737059b5b2384
2 changes: 2 additions & 0 deletions trunk/drivers/block/nvme.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
#include <linux/types.h>
#include <linux/version.h>

#include <asm-generic/io-64-nonatomic-lo-hi.h>

#define NVME_Q_DEPTH 1024
#define SQ_SIZE(depth) (depth * sizeof(struct nvme_command))
#define CQ_SIZE(depth) (depth * sizeof(struct nvme_completion))
Expand Down
15 changes: 2 additions & 13 deletions trunk/drivers/edac/i3200_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
#include <linux/io.h>
#include "edac_core.h"

#include <asm-generic/io-64-nonatomic-lo-hi.h>

#define I3200_REVISION "1.1"

#define EDAC_MOD_STR "i3200_edac"
Expand Down Expand Up @@ -101,19 +103,6 @@ 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
15 changes: 2 additions & 13 deletions trunk/drivers/platform/x86/ibm_rtl.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
#include <linux/mutex.h>
#include <asm/bios_ebda.h>

#include <asm-generic/io-64-nonatomic-lo-hi.h>

static bool force;
module_param(force, bool, 0);
MODULE_PARM_DESC(force, "Force driver load, ignore DMI data");
Expand Down Expand Up @@ -83,19 +85,6 @@ 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
15 changes: 2 additions & 13 deletions trunk/drivers/platform/x86/intel_ips.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@
#include <asm/processor.h>
#include "intel_ips.h"

#include <asm-generic/io-64-nonatomic-lo-hi.h>

#define PCI_DEVICE_ID_INTEL_THERMAL_SENSOR 0x3b32

/*
Expand Down Expand Up @@ -344,19 +346,6 @@ 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
23 changes: 2 additions & 21 deletions trunk/drivers/scsi/qla4xxx/ql4_nx.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#include "ql4_def.h"
#include "ql4_glbl.h"

#include <asm-generic/io-64-nonatomic-lo-hi.h>

#define MASK(n) DMA_BIT_MASK(n)
#define MN_WIN(addr) (((addr & 0x1fc0000) >> 1) | ((addr >> 25) & 0x3ff))
#define OCM_WIN(addr) (((addr & 0x1ff0000) >> 1) | ((addr >> 25) & 0x3ff))
Expand Down Expand Up @@ -655,27 +657,6 @@ 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
28 changes: 28 additions & 0 deletions trunk/include/asm-generic/io-64-nonatomic-hi-lo.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#ifndef _ASM_IO_64_NONATOMIC_HI_LO_H_
#define _ASM_IO_64_NONATOMIC_HI_LO_H_

#include <linux/io.h>
#include <asm-generic/int-ll64.h>

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

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

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

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

#endif /* _ASM_IO_64_NONATOMIC_HI_LO_H_ */
28 changes: 28 additions & 0 deletions trunk/include/asm-generic/io-64-nonatomic-lo-hi.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#ifndef _ASM_IO_64_NONATOMIC_LO_HI_H_
#define _ASM_IO_64_NONATOMIC_LO_HI_H_

#include <linux/io.h>
#include <asm-generic/int-ll64.h>

#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

#endif /* _ASM_IO_64_NONATOMIC_LO_HI_H_ */

0 comments on commit 4aa35e5

Please sign in to comment.