Skip to content

Commit

Permalink
Merge tag 'asm-generic' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…git/arnd/asm-generic

Pull asm-generic updates from Arnd Bergmann:
 "This has three changes for asm-generic that did not really fit into
  any other branch as normal asm-generic changes do.  One is a fix for a
  build warning, the other two are more interesting:

   * A patch from Mark Brown to allow using the common clock
     infrastructure on all architectures, so we can use the clock API in
     architecture independent device drivers.

   * The UAPI split patches from David Howells for the asm-generic
     files.  There are other architecture specific series that are going
     through the arch maintainer tree and that depend on this one.

  There may be a few small merge conflicts between Mark's patch and the
  following arch header file split patches.  In each case the solution
  will be to keep the new "generic-y += clkdev.h" line, even if it ends
  up being the only line in the Kbuild file."

* tag 'asm-generic' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
  UAPI: (Scripted) Disintegrate include/asm-generic
  asm-generic: Add default clkdev.h
  asm-generic: xor: mark static functions as __maybe_unused
  • Loading branch information
Linus Torvalds committed Oct 9, 2012
2 parents 8711798 + c37d615 commit 50e0d10
Show file tree
Hide file tree
Showing 74 changed files with 1,844 additions and 1,730 deletions.
2 changes: 2 additions & 0 deletions arch/alpha/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
include include/asm-generic/Kbuild.asm

generic-y += clkdev.h

header-y += compiler.h
header-y += console.h
header-y += fpu.h
Expand Down
2 changes: 2 additions & 0 deletions arch/avr32/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include include/asm-generic/Kbuild.asm

generic-y += clkdev.h

header-y += cachectl.h
2 changes: 2 additions & 0 deletions arch/cris/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ header-y += ethernet.h
header-y += etraxgpio.h
header-y += rs485.h
header-y += sync_serial.h

generic-y += clkdev.h
1 change: 1 addition & 0 deletions arch/frv/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ include include/asm-generic/Kbuild.asm

header-y += registers.h
header-y += termios.h
generic-y += clkdev.h
2 changes: 2 additions & 0 deletions arch/h8300/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
include include/asm-generic/Kbuild.asm

generic-y += clkdev.h
1 change: 1 addition & 0 deletions arch/hexagon/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ header-y += user.h
generic-y += auxvec.h
generic-y += bug.h
generic-y += bugs.h
generic-y += clkdev.h
generic-y += cputime.h
generic-y += current.h
generic-y += device.h
Expand Down
1 change: 1 addition & 0 deletions arch/ia64/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ header-y += ptrace_offsets.h
header-y += rse.h
header-y += ucontext.h
header-y += ustack.h
generic-y += clkdev.h
2 changes: 2 additions & 0 deletions arch/m32r/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
include include/asm-generic/Kbuild.asm

generic-y += clkdev.h
1 change: 1 addition & 0 deletions arch/m68k/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ include include/asm-generic/Kbuild.asm
header-y += cachectl.h

generic-y += bitsperlong.h
generic-y += clkdev.h
generic-y += cputime.h
generic-y += device.h
generic-y += emergency-restart.h
Expand Down
1 change: 1 addition & 0 deletions arch/microblaze/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include include/asm-generic/Kbuild.asm

header-y += elf.h
generic-y += clkdev.h
2 changes: 2 additions & 0 deletions arch/mn10300/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
include include/asm-generic/Kbuild.asm

generic-y += clkdev.h
1 change: 1 addition & 0 deletions arch/openrisc/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ generic-y += bug.h
generic-y += bugs.h
generic-y += cacheflush.h
generic-y += checksum.h
generic-y += clkdev.h
generic-y += cmpxchg.h
generic-y += cmpxchg-local.h
generic-y += cputime.h
Expand Down
1 change: 1 addition & 0 deletions arch/parisc/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include include/asm-generic/Kbuild.asm

header-y += pdc.h
generic-y += clkdev.h
generic-y += word-at-a-time.h
1 change: 1 addition & 0 deletions arch/powerpc/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ header-y += types.h
header-y += ucontext.h
header-y += unistd.h

generic-y += clkdev.h
generic-y += rwsem.h
2 changes: 2 additions & 0 deletions arch/s390/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ header-y += tape390.h
header-y += ucontext.h
header-y += vtoc.h
header-y += zcrypt.h

generic-y += clkdev.h
2 changes: 2 additions & 0 deletions arch/score/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include include/asm-generic/Kbuild.asm

header-y +=

generic-y += clkdev.h
1 change: 1 addition & 0 deletions arch/sparc/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ header-y += uctx.h
header-y += utrap.h
header-y += watchdog.h

generic-y += clkdev.h
generic-y += div64.h
generic-y += local64.h
generic-y += irq_regs.h
Expand Down
1 change: 1 addition & 0 deletions arch/tile/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ header-y += hardwall.h

generic-y += bug.h
generic-y += bugs.h
generic-y += clkdev.h
generic-y += cputime.h
generic-y += div64.h
generic-y += emergency-restart.h
Expand Down
2 changes: 1 addition & 1 deletion arch/um/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
generic-y += bug.h cputime.h device.h emergency-restart.h futex.h hardirq.h
generic-y += hw_irq.h irq_regs.h kdebug.h percpu.h sections.h topology.h xor.h
generic-y += ftrace.h pci.h io.h param.h delay.h mutex.h current.h exec.h
generic-y += switch_to.h
generic-y += switch_to.h clkdev.h
1 change: 1 addition & 0 deletions arch/unicore32/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ generic-y += atomic.h
generic-y += auxvec.h
generic-y += bitsperlong.h
generic-y += bugs.h
generic-y += clkdev.h
generic-y += cputime.h
generic-y += current.h
generic-y += device.h
Expand Down
6 changes: 6 additions & 0 deletions arch/x86/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,9 @@ header-y += sigcontext32.h
header-y += ucontext.h
header-y += vm86.h
header-y += vsyscall.h

genhdr-y += unistd_32.h
genhdr-y += unistd_64.h
genhdr-y += unistd_x32.h

generic-y += clkdev.h
2 changes: 2 additions & 0 deletions arch/xtensa/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
include include/asm-generic/Kbuild.asm

generic-y += clkdev.h
35 changes: 0 additions & 35 deletions include/asm-generic/Kbuild
Original file line number Diff line number Diff line change
@@ -1,35 +0,0 @@
header-y += auxvec.h
header-y += bitsperlong.h
header-y += errno-base.h
header-y += errno.h
header-y += fcntl.h
header-y += int-l64.h
header-y += int-ll64.h
header-y += ioctl.h
header-y += ioctls.h
header-y += ipcbuf.h
header-y += kvm_para.h
header-y += mman-common.h
header-y += mman.h
header-y += msgbuf.h
header-y += param.h
header-y += poll.h
header-y += posix_types.h
header-y += resource.h
header-y += sembuf.h
header-y += setup.h
header-y += shmbuf.h
header-y += shmparam.h
header-y += siginfo.h
header-y += signal-defs.h
header-y += signal.h
header-y += socket.h
header-y += sockios.h
header-y += stat.h
header-y += statfs.h
header-y += swab.h
header-y += termbits.h
header-y += termios.h
header-y += types.h
header-y += ucontext.h
header-y += unistd.h
13 changes: 1 addition & 12 deletions include/asm-generic/bitsperlong.h
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
#ifndef __ASM_GENERIC_BITS_PER_LONG
#define __ASM_GENERIC_BITS_PER_LONG

/*
* There seems to be no way of detecting this automatically from user
* space, so 64 bit architectures should override this in their
* bitsperlong.h. In particular, an architecture that supports
* both 32 and 64 bit user space must not rely on CONFIG_64BIT
* to decide it, but rather check a compiler provided macro.
*/
#ifndef __BITS_PER_LONG
#define __BITS_PER_LONG 32
#endif
#include <uapi/asm-generic/bitsperlong.h>

#ifdef __KERNEL__

#ifdef CONFIG_64BIT
#define BITS_PER_LONG 64
Expand All @@ -32,5 +22,4 @@
#define BITS_PER_LONG_LONG 64
#endif

#endif /* __KERNEL__ */
#endif /* __ASM_GENERIC_BITS_PER_LONG */
28 changes: 28 additions & 0 deletions include/asm-generic/clkdev.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* include/asm-generic/clkdev.h
*
* Based on the ARM clkdev.h:
* Copyright (C) 2008 Russell King.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Helper for the clk API to assist looking up a struct clk.
*/
#ifndef __ASM_CLKDEV_H
#define __ASM_CLKDEV_H

#include <linux/slab.h>

struct clk;

static inline int __clk_get(struct clk *clk) { return 1; }
static inline void __clk_put(struct clk *clk) { }

static inline struct clk_lookup_alloc *__clkdev_alloc(size_t size)
{
return kzalloc(size, GFP_KERNEL);
}

#endif
26 changes: 1 addition & 25 deletions include/asm-generic/int-l64.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,11 @@
* Integer declarations for architectures which use "long"
* for 64-bit types.
*/

#ifndef _ASM_GENERIC_INT_L64_H
#define _ASM_GENERIC_INT_L64_H

#include <asm/bitsperlong.h>

#ifndef __ASSEMBLY__
/*
* __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
* header files exported to user space
*/

typedef __signed__ char __s8;
typedef unsigned char __u8;
#include <uapi/asm-generic/int-l64.h>

typedef __signed__ short __s16;
typedef unsigned short __u16;

typedef __signed__ int __s32;
typedef unsigned int __u32;

typedef __signed__ long __s64;
typedef unsigned long __u64;

#endif /* __ASSEMBLY__ */

#ifdef __KERNEL__

#ifndef __ASSEMBLY__

Expand Down Expand Up @@ -68,6 +46,4 @@ typedef unsigned long u64;

#endif /* __ASSEMBLY__ */

#endif /* __KERNEL__ */

#endif /* _ASM_GENERIC_INT_L64_H */
31 changes: 1 addition & 30 deletions include/asm-generic/int-ll64.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,11 @@
* Integer declarations for architectures which use "long long"
* for 64-bit types.
*/

#ifndef _ASM_GENERIC_INT_LL64_H
#define _ASM_GENERIC_INT_LL64_H

#include <asm/bitsperlong.h>

#ifndef __ASSEMBLY__
/*
* __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
* header files exported to user space
*/

typedef __signed__ char __s8;
typedef unsigned char __u8;
#include <uapi/asm-generic/int-ll64.h>

typedef __signed__ short __s16;
typedef unsigned short __u16;

typedef __signed__ int __s32;
typedef unsigned int __u32;

#ifdef __GNUC__
__extension__ typedef __signed__ long long __s64;
__extension__ typedef unsigned long long __u64;
#else
typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#endif

#endif /* __ASSEMBLY__ */

#ifdef __KERNEL__

#ifndef __ASSEMBLY__

Expand Down Expand Up @@ -73,6 +46,4 @@ typedef unsigned long long u64;

#endif /* __ASSEMBLY__ */

#endif /* __KERNEL__ */

#endif /* _ASM_GENERIC_INT_LL64_H */
Loading

0 comments on commit 50e0d10

Please sign in to comment.