asm-generic cleanups

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
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIVAwUAVjzaf2CrR//JCVInAQImmhAA20fZ91sUlnA5skKNPT1phhF6Z7UF2Sx5
 nPKcHQD3HA3lT1OKfPBYvCo+loYflvXFLaQThVylVcnE/8ecAEMtft4nnGW2nXvh
 sZqHIZ8fszTB53cynAZKTjdobD1wu33Rq7XRzg0ugn1mdxFkOzCHW/xDRvWRR5TL
 rdQjzzgvn2PNlqFfHlh6cZ5ykShM36AIKs3WGA0H0Y/aYsE9GmDOAUp41q1mLXnA
 4lKQaIxoeOa+kmlsUB0wEHUecWWWJH4GAP+CtdKzTX9v12bGNhmiKUMCETG78BT3
 uL8irSqaViNwSAS9tBxSpqvmVUsa5aCA5M3MYiO+fH9ifd7wbR65g/wq39D3Pc01
 KnZ3BNVRW5XSA3c86pr8vbg/HOynUXK8TN0lzt6rEk8bjoPBNEDy5YWzy0t6reVe
 wX65F+ver8upjOKe9yl2Jsg+5Kcmy79GyYjLUY3TU2mZ+dIdScy/jIWatXe/OTKZ
 iB4Ctc4MDe9GDECmlPOWf98AXqsBUuKQiWKCN/OPxLtFOeWBvi4IzvFuO8QvnL9p
 jZcRDmIlIWAcDX/2wMnLjV+Hqi3EeReIrYznxTGnO7HHVInF555GP51vFaG5k+SN
 smJQAB0/sostmC1OCCqBKq5b6/li95/No7+0v0SUhJJ5o76AR5CcNsnolXesw1fu
 vTUkB/I66Hk=
 =dQKG
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Linus Torvalds 2015-11-06 14:22:15 -08:00
commit 9cf5c095b6
32 changed files with 103 additions and 100 deletions

View File

@ -27,7 +27,7 @@
* For readq() and writeq() on 32-bit builds, the hi-lo, lo-hi order is
* irrelevant.
*/
#include <asm-generic/io-64-nonatomic-hi-lo.h>
#include <linux/io-64-nonatomic-hi-lo.h>
static bool force_enable_dimms;
module_param(force_enable_dimms, bool, S_IRUGO|S_IWUSR);

View File

@ -43,7 +43,7 @@
#include <asm/io.h>
#include <asm/uaccess.h>
#include <asm-generic/io-64-nonatomic-lo-hi.h>
#include <linux/io-64-nonatomic-lo-hi.h>
#include "internal.h"

View File

@ -29,7 +29,7 @@
#include <linux/string.h>
#include <linux/drbd.h>
#include <linux/slab.h>
#include <asm/kmap_types.h>
#include <linux/highmem.h>
#include "drbd_int.h"

View File

@ -36,8 +36,6 @@
#include <crypto/algapi.h>
#include <crypto/des.h>
#include <asm/kmap_types.h>
//#define HIFN_DEBUG
#ifdef HIFN_DEBUG

View File

@ -15,7 +15,7 @@
#include <linux/io.h>
#include "edac_core.h"
#include <asm-generic/io-64-nonatomic-lo-hi.h>
#include <linux/io-64-nonatomic-lo-hi.h>
#define I3200_REVISION "1.1"

View File

@ -39,7 +39,7 @@
#include <linux/pci_ids.h>
#include <linux/edac.h>
#include <asm-generic/io-64-nonatomic-lo-hi.h>
#include <linux/io-64-nonatomic-lo-hi.h>
#include "edac_core.h"
#define IE31200_REVISION "1.0"

View File

@ -15,7 +15,7 @@
#include <linux/pci_ids.h>
#include <linux/edac.h>
#include <asm-generic/io-64-nonatomic-lo-hi.h>
#include <linux/io-64-nonatomic-lo-hi.h>
#include "edac_core.h"
#define X38_REVISION "1.1"

View File

@ -33,7 +33,7 @@
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/module.h>
#include <asm-generic/bug.h>
#include <linux/bug.h>
enum mxc_gpio_hwtype {
IMX1_GPIO, /* runs on i.mx1 */

View File

@ -67,7 +67,7 @@
#include <linux/acpi.h>
#include <linux/interrupt.h>
#include <asm-generic/io-64-nonatomic-lo-hi.h>
#include <linux/io-64-nonatomic-lo-hi.h>
/* PCI Address Constants */
#define SMBBAR 0

View File

@ -30,7 +30,7 @@
* SOFTWARE.
*/
#include <asm-generic/kmap_types.h>
#include <linux/highmem.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/errno.h>

View File

@ -25,8 +25,7 @@
#include <linux/pm_qos.h>
#include <linux/pm_runtime.h>
#include <linux/seq_file.h>
#include <asm-generic/io-64-nonatomic-lo-hi.h>
#include <linux/io-64-nonatomic-lo-hi.h>
#include "intel-lpss.h"

View File

@ -35,7 +35,7 @@
#include <linux/highuid.h>
/* get readq/writeq support for 32 bit kernels, use the low-first version */
#include <asm-generic/io-64-nonatomic-lo-hi.h>
#include <linux/io-64-nonatomic-lo-hi.h>
/* File to be the magic between shared code and
* actual OS primitives

View File

@ -34,7 +34,7 @@
#include <linux/pci.h>
/* get readq/writeq support for 32 bit kernels, use the low-first version */
#include <asm-generic/io-64-nonatomic-lo-hi.h>
#include <linux/io-64-nonatomic-lo-hi.h>
/* File to be the magic between shared code and
* actual OS primitives

View File

@ -30,7 +30,7 @@
* SOFTWARE.
*/
#include <asm-generic/kmap_types.h>
#include <linux/highmem.h>
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/pci.h>

View File

@ -30,7 +30,7 @@
* SOFTWARE.
*/
#include <asm-generic/kmap_types.h>
#include <linux/highmem.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/errno.h>

View File

@ -30,7 +30,7 @@
* SOFTWARE.
*/
#include <asm-generic/kmap_types.h>
#include <linux/highmem.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mlx5/driver.h>

View File

@ -36,7 +36,7 @@
#include <net/ip_fib.h>
#include <net/netevent.h>
#include <net/arp.h>
#include <asm-generic/io-64-nonatomic-lo-hi.h>
#include <linux/io-64-nonatomic-lo-hi.h>
#include <generated/utsrelease.h>
#include "rocker.h"

View File

@ -41,7 +41,7 @@
#include <linux/types.h>
#include <linux/pr.h>
#include <scsi/sg.h>
#include <asm-generic/io-64-nonatomic-lo-hi.h>
#include <linux/io-64-nonatomic-lo-hi.h>
#include <asm/unaligned.h>
#include <uapi/linux/nvme_ioctl.h>

View File

@ -33,7 +33,7 @@
#include <linux/mutex.h>
#include <asm/bios_ebda.h>
#include <asm-generic/io-64-nonatomic-lo-hi.h>
#include <linux/io-64-nonatomic-lo-hi.h>
static bool force;
module_param(force, bool, 0);

View File

@ -78,7 +78,7 @@
#include <asm/processor.h>
#include "intel_ips.h"
#include <asm-generic/io-64-nonatomic-lo-hi.h>
#include <linux/io-64-nonatomic-lo-hi.h>
#define PCI_DEVICE_ID_INTEL_THERMAL_SENSOR 0x3b32

View File

@ -12,7 +12,7 @@
#include "ql4_glbl.h"
#include "ql4_inline.h"
#include <asm-generic/io-64-nonatomic-lo-hi.h>
#include <linux/io-64-nonatomic-lo-hi.h>
#define TIMEOUT_100_MS 100
#define MASK(n) DMA_BIT_MASK(n)

View File

@ -34,7 +34,7 @@
#include <linux/string.h>
#include <linux/mutex.h>
#include <linux/slab.h>
#include <asm-generic/bug.h>
#include <linux/bug.h>
#include "n_tracesink.h"
/*

View File

@ -34,7 +34,7 @@
#include <linux/tty_ldisc.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <asm-generic/bug.h>
#include <linux/bug.h>
#include "n_tracesink.h"
/*

View File

@ -28,8 +28,7 @@
#include <linux/timer.h>
#include <linux/kernel.h>
#include <linux/usb/hcd.h>
#include <asm-generic/io-64-nonatomic-lo-hi.h>
#include <linux/io-64-nonatomic-lo-hi.h>
/* Code sharing between pci-quirks and xhci hcd */
#include "xhci-ext-caps.h"

View File

@ -79,8 +79,10 @@ unsigned long __xchg(unsigned long x, volatile void *ptr, int size)
}
}
#define xchg(ptr, x) \
((__typeof__(*(ptr))) __xchg((unsigned long)(x), (ptr), sizeof(*(ptr))))
#define xchg(ptr, x) ({ \
((__typeof__(*(ptr))) \
__xchg((unsigned long)(x), (ptr), sizeof(*(ptr)))); \
})
#endif /* xchg */
@ -90,9 +92,10 @@ unsigned long __xchg(unsigned long x, volatile void *ptr, int size)
#include <asm-generic/cmpxchg-local.h>
#ifndef cmpxchg_local
#define cmpxchg_local(ptr, o, n) \
#define cmpxchg_local(ptr, o, n) ({ \
((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\
(unsigned long)(n), sizeof(*(ptr))))
(unsigned long)(n), sizeof(*(ptr)))); \
})
#endif
#ifndef cmpxchg64_local

View File

@ -1,32 +1,2 @@
#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>
static inline __u64 hi_lo_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);
}
static inline void hi_lo_writeq(__u64 val, volatile void __iomem *addr)
{
writel(val >> 32, addr + 4);
writel(val, addr);
}
#ifndef readq
#define readq hi_lo_readq
#endif
#ifndef writeq
#define writeq hi_lo_writeq
#endif
#endif /* _ASM_IO_64_NONATOMIC_HI_LO_H_ */
/* XXX: delete asm-generic/io-64-nonatomic-hi-lo.h after converting new users */
#include <linux/io-64-nonatomic-hi-lo.h>

View File

@ -1,32 +1,2 @@
#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>
static inline __u64 lo_hi_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 lo_hi_writeq(__u64 val, volatile void __iomem *addr)
{
writel(val, addr);
writel(val >> 32, addr + 4);
}
#ifndef readq
#define readq lo_hi_readq
#endif
#ifndef writeq
#define writeq lo_hi_writeq
#endif
#endif /* _ASM_IO_64_NONATOMIC_LO_HI_H_ */
/* XXX: delete asm-generic/io-64-nonatomic-lo-hi.h after converting new users */
#include <linux/io-64-nonatomic-lo-hi.h>

View File

@ -9,8 +9,8 @@
* 2 of the Licence, or (at your option) any later version.
*/
#ifndef _ASM_GENERIC_BITOPS_COUNT_ZEROS_H_
#define _ASM_GENERIC_BITOPS_COUNT_ZEROS_H_
#ifndef _LINUX_BITOPS_COUNT_ZEROS_H_
#define _LINUX_BITOPS_COUNT_ZEROS_H_
#include <asm/bitops.h>
@ -54,4 +54,4 @@ static inline int count_trailing_zeros(unsigned long x)
return (x != 0) ? __ffs(x) : COUNT_TRAILING_ZEROS_0;
}
#endif /* _ASM_GENERIC_BITOPS_COUNT_ZEROS_H_ */
#endif /* _LINUX_BITOPS_COUNT_ZEROS_H_ */

View File

@ -0,0 +1,32 @@
#ifndef _LINUX_IO_64_NONATOMIC_HI_LO_H_
#define _LINUX_IO_64_NONATOMIC_HI_LO_H_
#include <linux/io.h>
#include <asm-generic/int-ll64.h>
static inline __u64 hi_lo_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);
}
static inline void hi_lo_writeq(__u64 val, volatile void __iomem *addr)
{
writel(val >> 32, addr + 4);
writel(val, addr);
}
#ifndef readq
#define readq hi_lo_readq
#endif
#ifndef writeq
#define writeq hi_lo_writeq
#endif
#endif /* _LINUX_IO_64_NONATOMIC_HI_LO_H_ */

View File

@ -0,0 +1,32 @@
#ifndef _LINUX_IO_64_NONATOMIC_LO_HI_H_
#define _LINUX_IO_64_NONATOMIC_LO_HI_H_
#include <linux/io.h>
#include <asm-generic/int-ll64.h>
static inline __u64 lo_hi_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 lo_hi_writeq(__u64 val, volatile void __iomem *addr)
{
writel(val, addr);
writel(val >> 32, addr + 4);
}
#ifndef readq
#define readq lo_hi_readq
#endif
#ifndef writeq
#define writeq lo_hi_writeq
#endif
#endif /* _LINUX_IO_64_NONATOMIC_LO_HI_H_ */

View File

@ -19,7 +19,7 @@
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
* MA 02111-1307, USA. */
#include <asm-generic/bitops/count_zeros.h>
#include <linux/count_zeros.h>
/* You have to define the following before including this file:
*

View File

@ -19,7 +19,7 @@
*/
#include <linux/bitops.h>
#include <asm-generic/bitops/count_zeros.h>
#include <linux/count_zeros.h>
#include "mpi-internal.h"
#define MAX_EXTERN_MPI_BITS 16384