aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-11-06 17:22:15 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-11-06 17:22:15 -0500
commit9cf5c095b65da63c08b928a7d0015d5d5dca8a66 (patch)
treef151dc13ce26c0252f41aeaf612dd3e9762c29dd
parent22402cd0af685c1a5d067c87db3051db7fff7709 (diff)
parent4008cb3ad223e39273b9cdfa578d04861b197c86 (diff)
Merge tag 'asm-generic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic
Pull asm-generic cleanups from Arnd Bergmann: "The asm-generic changes for 4.4 are mostly a series from Christoph Hellwig to clean up various abuses of headers in there. The patch to rename the io-64-nonatomic-*.h headers caused some conflicts with new users, so I added a workaround that we can remove in the next merge window. The only other patch is a warning fix from Marek Vasut" * tag 'asm-generic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: asm-generic: temporarily add back asm-generic/io-64-nonatomic*.h asm-generic: cmpxchg: avoid warnings from macro-ized cmpxchg() implementations gpio-mxc: stop including <asm-generic/bug> n_tracesink: stop including <asm-generic/bug> n_tracerouter: stop including <asm-generic/bug> mlx5: stop including <asm-generic/kmap_types.h> hifn_795x: stop including <asm-generic/kmap_types.h> drbd: stop including <asm-generic/kmap_types.h> move count_zeroes.h out of asm-generic move io-64-nonatomic*.h out of asm-generic
-rw-r--r--drivers/acpi/nfit.c2
-rw-r--r--drivers/acpi/osl.c2
-rw-r--r--drivers/block/drbd/drbd_bitmap.c2
-rw-r--r--drivers/crypto/hifn_795x.c2
-rw-r--r--drivers/edac/i3200_edac.c2
-rw-r--r--drivers/edac/ie31200_edac.c2
-rw-r--r--drivers/edac/x38_edac.c2
-rw-r--r--drivers/gpio/gpio-mxc.c2
-rw-r--r--drivers/i2c/busses/i2c-ismt.c2
-rw-r--r--drivers/infiniband/hw/mlx5/main.c2
-rw-r--r--drivers/mfd/intel-lpss.c3
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_osdep.h2
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40e_osdep.h2
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/cmd.c2
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/main.c2
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c2
-rw-r--r--drivers/net/ethernet/rocker/rocker.c2
-rw-r--r--drivers/nvme/host/pci.c2
-rw-r--r--drivers/platform/x86/ibm_rtl.c2
-rw-r--r--drivers/platform/x86/intel_ips.c2
-rw-r--r--drivers/scsi/qla4xxx/ql4_nx.c2
-rw-r--r--drivers/tty/n_tracerouter.c2
-rw-r--r--drivers/tty/n_tracesink.c2
-rw-r--r--drivers/usb/host/xhci.h3
-rw-r--r--include/asm-generic/cmpxchg.h11
-rw-r--r--include/asm-generic/io-64-nonatomic-hi-lo.h34
-rw-r--r--include/asm-generic/io-64-nonatomic-lo-hi.h34
-rw-r--r--include/linux/count_zeros.h (renamed from include/asm-generic/bitops/count_zeros.h)6
-rw-r--r--include/linux/io-64-nonatomic-hi-lo.h32
-rw-r--r--include/linux/io-64-nonatomic-lo-hi.h32
-rw-r--r--lib/mpi/longlong.h2
-rw-r--r--lib/mpi/mpicoder.c2
32 files changed, 103 insertions, 100 deletions
diff --git a/drivers/acpi/nfit.c b/drivers/acpi/nfit.c
index bc18aa213bb1..6e26761a27da 100644
--- a/drivers/acpi/nfit.c
+++ b/drivers/acpi/nfit.c
@@ -27,7 +27,7 @@
27 * For readq() and writeq() on 32-bit builds, the hi-lo, lo-hi order is 27 * For readq() and writeq() on 32-bit builds, the hi-lo, lo-hi order is
28 * irrelevant. 28 * irrelevant.
29 */ 29 */
30#include <asm-generic/io-64-nonatomic-hi-lo.h> 30#include <linux/io-64-nonatomic-hi-lo.h>
31 31
32static bool force_enable_dimms; 32static bool force_enable_dimms;
33module_param(force_enable_dimms, bool, S_IRUGO|S_IWUSR); 33module_param(force_enable_dimms, bool, S_IRUGO|S_IWUSR);
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 3935745ac78b..32d684af0ec7 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -43,7 +43,7 @@
43 43
44#include <asm/io.h> 44#include <asm/io.h>
45#include <asm/uaccess.h> 45#include <asm/uaccess.h>
46#include <asm-generic/io-64-nonatomic-lo-hi.h> 46#include <linux/io-64-nonatomic-lo-hi.h>
47 47
48#include "internal.h" 48#include "internal.h"
49 49
diff --git a/drivers/block/drbd/drbd_bitmap.c b/drivers/block/drbd/drbd_bitmap.c
index e5e0f19ceda0..d3d73d114a46 100644
--- a/drivers/block/drbd/drbd_bitmap.c
+++ b/drivers/block/drbd/drbd_bitmap.c
@@ -29,7 +29,7 @@
29#include <linux/string.h> 29#include <linux/string.h>
30#include <linux/drbd.h> 30#include <linux/drbd.h>
31#include <linux/slab.h> 31#include <linux/slab.h>
32#include <asm/kmap_types.h> 32#include <linux/highmem.h>
33 33
34#include "drbd_int.h" 34#include "drbd_int.h"
35 35
diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c
index 8d2a7728434d..ca5c71ab4b4d 100644
--- a/drivers/crypto/hifn_795x.c
+++ b/drivers/crypto/hifn_795x.c
@@ -36,8 +36,6 @@
36#include <crypto/algapi.h> 36#include <crypto/algapi.h>
37#include <crypto/des.h> 37#include <crypto/des.h>
38 38
39#include <asm/kmap_types.h>
40
41//#define HIFN_DEBUG 39//#define HIFN_DEBUG
42 40
43#ifdef HIFN_DEBUG 41#ifdef HIFN_DEBUG
diff --git a/drivers/edac/i3200_edac.c b/drivers/edac/i3200_edac.c
index 4ad062b0ef26..1f453382258a 100644
--- a/drivers/edac/i3200_edac.c
+++ b/drivers/edac/i3200_edac.c
@@ -15,7 +15,7 @@
15#include <linux/io.h> 15#include <linux/io.h>
16#include "edac_core.h" 16#include "edac_core.h"
17 17
18#include <asm-generic/io-64-nonatomic-lo-hi.h> 18#include <linux/io-64-nonatomic-lo-hi.h>
19 19
20#define I3200_REVISION "1.1" 20#define I3200_REVISION "1.1"
21 21
diff --git a/drivers/edac/ie31200_edac.c b/drivers/edac/ie31200_edac.c
index a981dc6fd88e..18d77ace4813 100644
--- a/drivers/edac/ie31200_edac.c
+++ b/drivers/edac/ie31200_edac.c
@@ -39,7 +39,7 @@
39#include <linux/pci_ids.h> 39#include <linux/pci_ids.h>
40#include <linux/edac.h> 40#include <linux/edac.h>
41 41
42#include <asm-generic/io-64-nonatomic-lo-hi.h> 42#include <linux/io-64-nonatomic-lo-hi.h>
43#include "edac_core.h" 43#include "edac_core.h"
44 44
45#define IE31200_REVISION "1.0" 45#define IE31200_REVISION "1.0"
diff --git a/drivers/edac/x38_edac.c b/drivers/edac/x38_edac.c
index 7c5cdc62f31c..314cf5cf268c 100644
--- a/drivers/edac/x38_edac.c
+++ b/drivers/edac/x38_edac.c
@@ -15,7 +15,7 @@
15#include <linux/pci_ids.h> 15#include <linux/pci_ids.h>
16#include <linux/edac.h> 16#include <linux/edac.h>
17 17
18#include <asm-generic/io-64-nonatomic-lo-hi.h> 18#include <linux/io-64-nonatomic-lo-hi.h>
19#include "edac_core.h" 19#include "edac_core.h"
20 20
21#define X38_REVISION "1.1" 21#define X38_REVISION "1.1"
diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c
index b8dd847443c5..6ea8df6c7397 100644
--- a/drivers/gpio/gpio-mxc.c
+++ b/drivers/gpio/gpio-mxc.c
@@ -33,7 +33,7 @@
33#include <linux/of.h> 33#include <linux/of.h>
34#include <linux/of_device.h> 34#include <linux/of_device.h>
35#include <linux/module.h> 35#include <linux/module.h>
36#include <asm-generic/bug.h> 36#include <linux/bug.h>
37 37
38enum mxc_gpio_hwtype { 38enum mxc_gpio_hwtype {
39 IMX1_GPIO, /* runs on i.mx1 */ 39 IMX1_GPIO, /* runs on i.mx1 */
diff --git a/drivers/i2c/busses/i2c-ismt.c b/drivers/i2c/busses/i2c-ismt.c
index f994712d0904..39becbbdfd99 100644
--- a/drivers/i2c/busses/i2c-ismt.c
+++ b/drivers/i2c/busses/i2c-ismt.c
@@ -67,7 +67,7 @@
67#include <linux/acpi.h> 67#include <linux/acpi.h>
68#include <linux/interrupt.h> 68#include <linux/interrupt.h>
69 69
70#include <asm-generic/io-64-nonatomic-lo-hi.h> 70#include <linux/io-64-nonatomic-lo-hi.h>
71 71
72/* PCI Address Constants */ 72/* PCI Address Constants */
73#define SMBBAR 0 73#define SMBBAR 0
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index f1ccd40beae9..68508d528ba0 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -30,7 +30,7 @@
30 * SOFTWARE. 30 * SOFTWARE.
31 */ 31 */
32 32
33#include <asm-generic/kmap_types.h> 33#include <linux/highmem.h>
34#include <linux/module.h> 34#include <linux/module.h>
35#include <linux/init.h> 35#include <linux/init.h>
36#include <linux/errno.h> 36#include <linux/errno.h>
diff --git a/drivers/mfd/intel-lpss.c b/drivers/mfd/intel-lpss.c
index 001a7d7708ce..6255513f54c7 100644
--- a/drivers/mfd/intel-lpss.c
+++ b/drivers/mfd/intel-lpss.c
@@ -25,8 +25,7 @@
25#include <linux/pm_qos.h> 25#include <linux/pm_qos.h>
26#include <linux/pm_runtime.h> 26#include <linux/pm_runtime.h>
27#include <linux/seq_file.h> 27#include <linux/seq_file.h>
28 28#include <linux/io-64-nonatomic-lo-hi.h>
29#include <asm-generic/io-64-nonatomic-lo-hi.h>
30 29
31#include "intel-lpss.h" 30#include "intel-lpss.h"
32 31
diff --git a/drivers/net/ethernet/intel/i40e/i40e_osdep.h b/drivers/net/ethernet/intel/i40e/i40e_osdep.h
index ad802dd0f67a..5b6feb7edeb1 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_osdep.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_osdep.h
@@ -35,7 +35,7 @@
35#include <linux/highuid.h> 35#include <linux/highuid.h>
36 36
37/* get readq/writeq support for 32 bit kernels, use the low-first version */ 37/* get readq/writeq support for 32 bit kernels, use the low-first version */
38#include <asm-generic/io-64-nonatomic-lo-hi.h> 38#include <linux/io-64-nonatomic-lo-hi.h>
39 39
40/* File to be the magic between shared code and 40/* File to be the magic between shared code and
41 * actual OS primitives 41 * actual OS primitives
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_osdep.h b/drivers/net/ethernet/intel/i40evf/i40e_osdep.h
index 21a91b14bf81..5e314fd3c016 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_osdep.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_osdep.h
@@ -34,7 +34,7 @@
34#include <linux/pci.h> 34#include <linux/pci.h>
35 35
36/* get readq/writeq support for 32 bit kernels, use the low-first version */ 36/* get readq/writeq support for 32 bit kernels, use the low-first version */
37#include <asm-generic/io-64-nonatomic-lo-hi.h> 37#include <linux/io-64-nonatomic-lo-hi.h>
38 38
39/* File to be the magic between shared code and 39/* File to be the magic between shared code and
40 * actual OS primitives 40 * actual OS primitives
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
index fabfc9e0a948..037fc4cdf5af 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
@@ -30,7 +30,7 @@
30 * SOFTWARE. 30 * SOFTWARE.
31 */ 31 */
32 32
33#include <asm-generic/kmap_types.h> 33#include <linux/highmem.h>
34#include <linux/module.h> 34#include <linux/module.h>
35#include <linux/errno.h> 35#include <linux/errno.h>
36#include <linux/pci.h> 36#include <linux/pci.h>
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c
index 2388aec208fa..4ac8d4cc4973 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
@@ -30,7 +30,7 @@
30 * SOFTWARE. 30 * SOFTWARE.
31 */ 31 */
32 32
33#include <asm-generic/kmap_types.h> 33#include <linux/highmem.h>
34#include <linux/module.h> 34#include <linux/module.h>
35#include <linux/init.h> 35#include <linux/init.h>
36#include <linux/errno.h> 36#include <linux/errno.h>
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c b/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c
index 1cda5d268ec9..4d3377b12657 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c
@@ -30,7 +30,7 @@
30 * SOFTWARE. 30 * SOFTWARE.
31 */ 31 */
32 32
33#include <asm-generic/kmap_types.h> 33#include <linux/highmem.h>
34#include <linux/kernel.h> 34#include <linux/kernel.h>
35#include <linux/module.h> 35#include <linux/module.h>
36#include <linux/mlx5/driver.h> 36#include <linux/mlx5/driver.h>
diff --git a/drivers/net/ethernet/rocker/rocker.c b/drivers/net/ethernet/rocker/rocker.c
index 32a80d2df7ff..e9f2349e98bc 100644
--- a/drivers/net/ethernet/rocker/rocker.c
+++ b/drivers/net/ethernet/rocker/rocker.c
@@ -36,7 +36,7 @@
36#include <net/ip_fib.h> 36#include <net/ip_fib.h>
37#include <net/netevent.h> 37#include <net/netevent.h>
38#include <net/arp.h> 38#include <net/arp.h>
39#include <asm-generic/io-64-nonatomic-lo-hi.h> 39#include <linux/io-64-nonatomic-lo-hi.h>
40#include <generated/utsrelease.h> 40#include <generated/utsrelease.h>
41 41
42#include "rocker.h" 42#include "rocker.h"
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index e878590e71b6..9f4fe3a5f41e 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -41,7 +41,7 @@
41#include <linux/types.h> 41#include <linux/types.h>
42#include <linux/pr.h> 42#include <linux/pr.h>
43#include <scsi/sg.h> 43#include <scsi/sg.h>
44#include <asm-generic/io-64-nonatomic-lo-hi.h> 44#include <linux/io-64-nonatomic-lo-hi.h>
45#include <asm/unaligned.h> 45#include <asm/unaligned.h>
46 46
47#include <uapi/linux/nvme_ioctl.h> 47#include <uapi/linux/nvme_ioctl.h>
diff --git a/drivers/platform/x86/ibm_rtl.c b/drivers/platform/x86/ibm_rtl.c
index 97c2be195efc..c62e5e11ca4b 100644
--- a/drivers/platform/x86/ibm_rtl.c
+++ b/drivers/platform/x86/ibm_rtl.c
@@ -33,7 +33,7 @@
33#include <linux/mutex.h> 33#include <linux/mutex.h>
34#include <asm/bios_ebda.h> 34#include <asm/bios_ebda.h>
35 35
36#include <asm-generic/io-64-nonatomic-lo-hi.h> 36#include <linux/io-64-nonatomic-lo-hi.h>
37 37
38static bool force; 38static bool force;
39module_param(force, bool, 0); 39module_param(force, bool, 0);
diff --git a/drivers/platform/x86/intel_ips.c b/drivers/platform/x86/intel_ips.c
index e2065e06a3f3..55663b3d7282 100644
--- a/drivers/platform/x86/intel_ips.c
+++ b/drivers/platform/x86/intel_ips.c
@@ -78,7 +78,7 @@
78#include <asm/processor.h> 78#include <asm/processor.h>
79#include "intel_ips.h" 79#include "intel_ips.h"
80 80
81#include <asm-generic/io-64-nonatomic-lo-hi.h> 81#include <linux/io-64-nonatomic-lo-hi.h>
82 82
83#define PCI_DEVICE_ID_INTEL_THERMAL_SENSOR 0x3b32 83#define PCI_DEVICE_ID_INTEL_THERMAL_SENSOR 0x3b32
84 84
diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c
index 7c3365864242..ae87d6c19f17 100644
--- a/drivers/scsi/qla4xxx/ql4_nx.c
+++ b/drivers/scsi/qla4xxx/ql4_nx.c
@@ -12,7 +12,7 @@
12#include "ql4_glbl.h" 12#include "ql4_glbl.h"
13#include "ql4_inline.h" 13#include "ql4_inline.h"
14 14
15#include <asm-generic/io-64-nonatomic-lo-hi.h> 15#include <linux/io-64-nonatomic-lo-hi.h>
16 16
17#define TIMEOUT_100_MS 100 17#define TIMEOUT_100_MS 100
18#define MASK(n) DMA_BIT_MASK(n) 18#define MASK(n) DMA_BIT_MASK(n)
diff --git a/drivers/tty/n_tracerouter.c b/drivers/tty/n_tracerouter.c
index 1f063d3aa32f..ac5716979bc1 100644
--- a/drivers/tty/n_tracerouter.c
+++ b/drivers/tty/n_tracerouter.c
@@ -34,7 +34,7 @@
34#include <linux/string.h> 34#include <linux/string.h>
35#include <linux/mutex.h> 35#include <linux/mutex.h>
36#include <linux/slab.h> 36#include <linux/slab.h>
37#include <asm-generic/bug.h> 37#include <linux/bug.h>
38#include "n_tracesink.h" 38#include "n_tracesink.h"
39 39
40/* 40/*
diff --git a/drivers/tty/n_tracesink.c b/drivers/tty/n_tracesink.c
index ddce58b973d2..4616870a6b1b 100644
--- a/drivers/tty/n_tracesink.c
+++ b/drivers/tty/n_tracesink.c
@@ -34,7 +34,7 @@
34#include <linux/tty_ldisc.h> 34#include <linux/tty_ldisc.h>
35#include <linux/errno.h> 35#include <linux/errno.h>
36#include <linux/string.h> 36#include <linux/string.h>
37#include <asm-generic/bug.h> 37#include <linux/bug.h>
38#include "n_tracesink.h" 38#include "n_tracesink.h"
39 39
40/* 40/*
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index be9048e2d4d4..0b9451250e33 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -28,8 +28,7 @@
28#include <linux/timer.h> 28#include <linux/timer.h>
29#include <linux/kernel.h> 29#include <linux/kernel.h>
30#include <linux/usb/hcd.h> 30#include <linux/usb/hcd.h>
31 31#include <linux/io-64-nonatomic-lo-hi.h>
32#include <asm-generic/io-64-nonatomic-lo-hi.h>
33 32
34/* Code sharing between pci-quirks and xhci hcd */ 33/* Code sharing between pci-quirks and xhci hcd */
35#include "xhci-ext-caps.h" 34#include "xhci-ext-caps.h"
diff --git a/include/asm-generic/cmpxchg.h b/include/asm-generic/cmpxchg.h
index 3766ab34aa45..e5f9080e8e86 100644
--- a/include/asm-generic/cmpxchg.h
+++ b/include/asm-generic/cmpxchg.h
@@ -79,8 +79,10 @@ unsigned long __xchg(unsigned long x, volatile void *ptr, int size)
79 } 79 }
80} 80}
81 81
82#define xchg(ptr, x) \ 82#define xchg(ptr, x) ({ \
83 ((__typeof__(*(ptr))) __xchg((unsigned long)(x), (ptr), sizeof(*(ptr)))) 83 ((__typeof__(*(ptr))) \
84 __xchg((unsigned long)(x), (ptr), sizeof(*(ptr)))); \
85})
84 86
85#endif /* xchg */ 87#endif /* xchg */
86 88
@@ -90,9 +92,10 @@ unsigned long __xchg(unsigned long x, volatile void *ptr, int size)
90#include <asm-generic/cmpxchg-local.h> 92#include <asm-generic/cmpxchg-local.h>
91 93
92#ifndef cmpxchg_local 94#ifndef cmpxchg_local
93#define cmpxchg_local(ptr, o, n) \ 95#define cmpxchg_local(ptr, o, n) ({ \
94 ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\ 96 ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\
95 (unsigned long)(n), sizeof(*(ptr)))) 97 (unsigned long)(n), sizeof(*(ptr)))); \
98})
96#endif 99#endif
97 100
98#ifndef cmpxchg64_local 101#ifndef cmpxchg64_local
diff --git a/include/asm-generic/io-64-nonatomic-hi-lo.h b/include/asm-generic/io-64-nonatomic-hi-lo.h
index 2e29d13fc154..32b73abce1b0 100644
--- a/include/asm-generic/io-64-nonatomic-hi-lo.h
+++ b/include/asm-generic/io-64-nonatomic-hi-lo.h
@@ -1,32 +1,2 @@
1#ifndef _ASM_IO_64_NONATOMIC_HI_LO_H_ 1/* XXX: delete asm-generic/io-64-nonatomic-hi-lo.h after converting new users */
2#define _ASM_IO_64_NONATOMIC_HI_LO_H_ 2#include <linux/io-64-nonatomic-hi-lo.h>
3
4#include <linux/io.h>
5#include <asm-generic/int-ll64.h>
6
7static inline __u64 hi_lo_readq(const volatile void __iomem *addr)
8{
9 const volatile u32 __iomem *p = addr;
10 u32 low, high;
11
12 high = readl(p + 1);
13 low = readl(p);
14
15 return low + ((u64)high << 32);
16}
17
18static inline void hi_lo_writeq(__u64 val, volatile void __iomem *addr)
19{
20 writel(val >> 32, addr + 4);
21 writel(val, addr);
22}
23
24#ifndef readq
25#define readq hi_lo_readq
26#endif
27
28#ifndef writeq
29#define writeq hi_lo_writeq
30#endif
31
32#endif /* _ASM_IO_64_NONATOMIC_HI_LO_H_ */
diff --git a/include/asm-generic/io-64-nonatomic-lo-hi.h b/include/asm-generic/io-64-nonatomic-lo-hi.h
index 0efacff0a1ce..55a627c37721 100644
--- a/include/asm-generic/io-64-nonatomic-lo-hi.h
+++ b/include/asm-generic/io-64-nonatomic-lo-hi.h
@@ -1,32 +1,2 @@
1#ifndef _ASM_IO_64_NONATOMIC_LO_HI_H_ 1/* XXX: delete asm-generic/io-64-nonatomic-lo-hi.h after converting new users */
2#define _ASM_IO_64_NONATOMIC_LO_HI_H_ 2#include <linux/io-64-nonatomic-lo-hi.h>
3
4#include <linux/io.h>
5#include <asm-generic/int-ll64.h>
6
7static inline __u64 lo_hi_readq(const volatile void __iomem *addr)
8{
9 const volatile u32 __iomem *p = addr;
10 u32 low, high;
11
12 low = readl(p);
13 high = readl(p + 1);
14
15 return low + ((u64)high << 32);
16}
17
18static inline void lo_hi_writeq(__u64 val, volatile void __iomem *addr)
19{
20 writel(val, addr);
21 writel(val >> 32, addr + 4);
22}
23
24#ifndef readq
25#define readq lo_hi_readq
26#endif
27
28#ifndef writeq
29#define writeq lo_hi_writeq
30#endif
31
32#endif /* _ASM_IO_64_NONATOMIC_LO_HI_H_ */
diff --git a/include/asm-generic/bitops/count_zeros.h b/include/linux/count_zeros.h
index 97520d21fe62..363da78c4f64 100644
--- a/include/asm-generic/bitops/count_zeros.h
+++ b/include/linux/count_zeros.h
@@ -9,8 +9,8 @@
9 * 2 of the Licence, or (at your option) any later version. 9 * 2 of the Licence, or (at your option) any later version.
10 */ 10 */
11 11
12#ifndef _ASM_GENERIC_BITOPS_COUNT_ZEROS_H_ 12#ifndef _LINUX_BITOPS_COUNT_ZEROS_H_
13#define _ASM_GENERIC_BITOPS_COUNT_ZEROS_H_ 13#define _LINUX_BITOPS_COUNT_ZEROS_H_
14 14
15#include <asm/bitops.h> 15#include <asm/bitops.h>
16 16
@@ -54,4 +54,4 @@ static inline int count_trailing_zeros(unsigned long x)
54 return (x != 0) ? __ffs(x) : COUNT_TRAILING_ZEROS_0; 54 return (x != 0) ? __ffs(x) : COUNT_TRAILING_ZEROS_0;
55} 55}
56 56
57#endif /* _ASM_GENERIC_BITOPS_COUNT_ZEROS_H_ */ 57#endif /* _LINUX_BITOPS_COUNT_ZEROS_H_ */
diff --git a/include/linux/io-64-nonatomic-hi-lo.h b/include/linux/io-64-nonatomic-hi-lo.h
new file mode 100644
index 000000000000..11d7e840d913
--- /dev/null
+++ b/include/linux/io-64-nonatomic-hi-lo.h
@@ -0,0 +1,32 @@
1#ifndef _LINUX_IO_64_NONATOMIC_HI_LO_H_
2#define _LINUX_IO_64_NONATOMIC_HI_LO_H_
3
4#include <linux/io.h>
5#include <asm-generic/int-ll64.h>
6
7static inline __u64 hi_lo_readq(const volatile void __iomem *addr)
8{
9 const volatile u32 __iomem *p = addr;
10 u32 low, high;
11
12 high = readl(p + 1);
13 low = readl(p);
14
15 return low + ((u64)high << 32);
16}
17
18static inline void hi_lo_writeq(__u64 val, volatile void __iomem *addr)
19{
20 writel(val >> 32, addr + 4);
21 writel(val, addr);
22}
23
24#ifndef readq
25#define readq hi_lo_readq
26#endif
27
28#ifndef writeq
29#define writeq hi_lo_writeq
30#endif
31
32#endif /* _LINUX_IO_64_NONATOMIC_HI_LO_H_ */
diff --git a/include/linux/io-64-nonatomic-lo-hi.h b/include/linux/io-64-nonatomic-lo-hi.h
new file mode 100644
index 000000000000..1a4315f97360
--- /dev/null
+++ b/include/linux/io-64-nonatomic-lo-hi.h
@@ -0,0 +1,32 @@
1#ifndef _LINUX_IO_64_NONATOMIC_LO_HI_H_
2#define _LINUX_IO_64_NONATOMIC_LO_HI_H_
3
4#include <linux/io.h>
5#include <asm-generic/int-ll64.h>
6
7static inline __u64 lo_hi_readq(const volatile void __iomem *addr)
8{
9 const volatile u32 __iomem *p = addr;
10 u32 low, high;
11
12 low = readl(p);
13 high = readl(p + 1);
14
15 return low + ((u64)high << 32);
16}
17
18static inline void lo_hi_writeq(__u64 val, volatile void __iomem *addr)
19{
20 writel(val, addr);
21 writel(val >> 32, addr + 4);
22}
23
24#ifndef readq
25#define readq lo_hi_readq
26#endif
27
28#ifndef writeq
29#define writeq lo_hi_writeq
30#endif
31
32#endif /* _LINUX_IO_64_NONATOMIC_LO_HI_H_ */
diff --git a/lib/mpi/longlong.h b/lib/mpi/longlong.h
index a89d041592c8..b90e255c2a68 100644
--- a/lib/mpi/longlong.h
+++ b/lib/mpi/longlong.h
@@ -19,7 +19,7 @@
19 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, 19 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
20 * MA 02111-1307, USA. */ 20 * MA 02111-1307, USA. */
21 21
22#include <asm-generic/bitops/count_zeros.h> 22#include <linux/count_zeros.h>
23 23
24/* You have to define the following before including this file: 24/* You have to define the following before including this file:
25 * 25 *
diff --git a/lib/mpi/mpicoder.c b/lib/mpi/mpicoder.c
index c7e0a705eecf..3db76b8c1115 100644
--- a/lib/mpi/mpicoder.c
+++ b/lib/mpi/mpicoder.c
@@ -19,7 +19,7 @@
19 */ 19 */
20 20
21#include <linux/bitops.h> 21#include <linux/bitops.h>
22#include <asm-generic/bitops/count_zeros.h> 22#include <linux/count_zeros.h>
23#include "mpi-internal.h" 23#include "mpi-internal.h"
24 24
25#define MAX_EXTERN_MPI_BITS 16384 25#define MAX_EXTERN_MPI_BITS 16384