OSDN Git Service

Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 25 May 2011 22:35:32 +0000 (15:35 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 25 May 2011 22:35:32 +0000 (15:35 -0700)
* git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: (26 commits)
  arch/tile: prefer "tilepro" as the name of the 32-bit architecture
  compat: include aio_abi.h for aio_context_t
  arch/tile: cleanups for tilegx compat mode
  arch/tile: allocate PCI IRQs later in boot
  arch/tile: support signal "exception-trace" hook
  arch/tile: use better definitions of xchg() and cmpxchg()
  include/linux/compat.h: coding-style fixes
  tile: add an RTC driver for the Tilera hypervisor
  arch/tile: finish enabling support for TILE-Gx 64-bit chip
  compat: fixes to allow working with tile arch
  arch/tile: update defconfig file to something more useful
  tile: do_hardwall_trap: do not play with task->sighand
  tile: replace mm->cpu_vm_mask with mm_cpumask()
  tile,mn10300: add device parameter to dma_cache_sync()
  audit: support the "standard" <asm-generic/unistd.h>
  arch/tile: clarify flush_buffer()/finv_buffer() function names
  arch/tile: kernel-related cleanups from removing static page size
  arch/tile: various header improvements for building drivers
  arch/tile: disable GX prefetcher during cache flush
  arch/tile: tolerate disabling CONFIG_BLK_DEV_INITRD
  ...

1  2 
Makefile
drivers/net/tile/tilepro.c
drivers/rtc/Kconfig
kernel/compat.c
kernel/sysctl.c

diff --combined Makefile
+++ b/Makefile
@@@ -1,7 -1,7 +1,7 @@@
  VERSION = 2
  PATCHLEVEL = 6
  SUBLEVEL = 39
 -EXTRAVERSION = -rc5
 +EXTRAVERSION =
  NAME = Flesh-Eating Bats with Fangs
  
  # *DOCUMENTATION*
@@@ -103,7 -103,7 +103,7 @@@ ifeq ("$(origin O)", "command line"
  endif
  
  ifeq ("$(origin W)", "command line")
 -  export KBUILD_ENABLE_EXTRA_GCC_CHECKS := 1
 +  export KBUILD_ENABLE_EXTRA_GCC_CHECKS := $(W)
  endif
  
  # That's our default target when none is given on the command line
@@@ -220,6 -220,14 +220,14 @@@ ifeq ($(ARCH),sh64
         SRCARCH := sh
  endif
  
+ # Additional ARCH settings for tile
+ ifeq ($(ARCH),tilepro)
+        SRCARCH := tile
+ endif
+ ifeq ($(ARCH),tilegx)
+        SRCARCH := tile
+ endif
  # Where to locate arch specific headers
  hdr-arch  := $(SRCARCH)
  
@@@ -349,8 -357,7 +357,8 @@@ CFLAGS_GCOV        = -fprofile-arcs -ftest-cov
  
  # Use LINUXINCLUDE when you must reference the include/ directory.
  # Needed to be compatible with the O= option
 -LINUXINCLUDE    := -I$(srctree)/arch/$(hdr-arch)/include -Iinclude \
 +LINUXINCLUDE    := -I$(srctree)/arch/$(hdr-arch)/include \
 +                   -Iarch/$(hdr-arch)/include/generated -Iinclude \
                     $(if $(KBUILD_SRC), -I$(srctree)/include) \
                     -include include/generated/autoconf.h
  
@@@ -383,7 -390,6 +391,7 @@@ export KBUILD_CFLAGS CFLAGS_KERNEL CFLA
  export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
  export KBUILD_AFLAGS_MODULE KBUILD_CFLAGS_MODULE KBUILD_LDFLAGS_MODULE
  export KBUILD_AFLAGS_KERNEL KBUILD_CFLAGS_KERNEL
 +export KBUILD_ARFLAGS
  
  # When compiling out-of-tree modules, put MODVERDIR in the module
  # tree rather than in the kernel tree. The kernel tree might
@@@ -418,12 -424,6 +426,12 @@@ ifneq ($(KBUILD_SRC),
            $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL)
  endif
  
 +# Support for using generic headers in asm-generic
 +PHONY += asm-generic
 +asm-generic:
 +      $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.asm-generic \
 +                  obj=arch/$(SRCARCH)/include/generated/asm
 +
  # To make sure we do not include .config for any of the *config targets
  # catch them early, and hand them over to scripts/kconfig/Makefile
  # It is allowed to specify more targets when calling make, including
@@@ -567,10 -567,6 +575,10 @@@ ifndef CONFIG_CC_STACKPROTECTO
  KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector)
  endif
  
 +# This warning generated too much noise in a regular build.
 +# Use make W=1 to enable this warning (see scripts/Makefile.build)
 +KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable)
 +
  ifdef CONFIG_FRAME_POINTER
  KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
  else
@@@ -616,7 -612,7 +624,7 @@@ CHECKFLAGS     += $(NOSTDINC_FLAGS
  KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
  
  # disable pointer signed / unsigned warnings in gcc 4.0
 -KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,)
 +KBUILD_CFLAGS += $(call cc-disable-warning, pointer-sign)
  
  # disable invalid "can't wrap" optimizations for signed / pointers
  KBUILD_CFLAGS += $(call cc-option,-fno-strict-overflow)
  # conserve stack if available
  KBUILD_CFLAGS   += $(call cc-option,-fconserve-stack)
  
 +# use the deterministic mode of AR if available
 +KBUILD_ARFLAGS := $(call ar-option,D)
 +
  # check for 'asm goto'
  ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC)), y)
        KBUILD_CFLAGS += -DCC_HAVE_ASM_GOTO
@@@ -812,17 -805,15 +820,17 @@@ ifdef CONFIG_KALLSYM
  # o The correct .tmp_kallsyms2.o is linked into the final vmlinux.
  # o Verify that the System.map from vmlinux matches the map from
  #   .tmp_vmlinux2, just in case we did not generate kallsyms correctly.
 -# o If CONFIG_KALLSYMS_EXTRA_PASS is set, do an extra pass using
 +# o If 'make KALLSYMS_EXTRA_PASS=1" was used, do an extra pass using
  #   .tmp_vmlinux3 and .tmp_kallsyms3.o.  This is only meant as a
  #   temporary bypass to allow the kernel to be built while the
  #   maintainers work out what went wrong with kallsyms.
  
 -ifdef CONFIG_KALLSYMS_EXTRA_PASS
 -last_kallsyms := 3
 -else
  last_kallsyms := 2
 +
 +ifdef KALLSYMS_EXTRA_PASS
 +ifneq ($(KALLSYMS_EXTRA_PASS),0)
 +last_kallsyms := 3
 +endif
  endif
  
  kallsyms.o := .tmp_kallsyms$(last_kallsyms).o
@@@ -833,8 -824,7 +841,8 @@@ define verify_kallsym
          $(cmd_sysmap) .tmp_vmlinux$(last_kallsyms) .tmp_System.map
        $(Q)cmp -s System.map .tmp_System.map ||                             \
                (echo Inconsistent kallsyms data;                            \
 -               echo Try setting CONFIG_KALLSYMS_EXTRA_PASS;                \
 +               echo This is a bug - please report about it;                \
 +               echo Try "make KALLSYMS_EXTRA_PASS=1" as a workaround;      \
                 rm .tmp_kallsyms* ; /bin/false )
  endef
  
@@@ -965,7 -955,7 +973,7 @@@ ifneq ($(KBUILD_SRC),
  endif
  
  # prepare2 creates a makefile if using a separate output directory
 -prepare2: prepare3 outputmakefile
 +prepare2: prepare3 outputmakefile asm-generic
  
  prepare1: prepare2 include/linux/version.h include/generated/utsrelease.h \
                     include/config/auto.conf
@@@ -1009,8 -999,7 +1017,8 @@@ include/generated/utsrelease.h: include
  
  PHONY += headerdep
  headerdep:
 -      $(Q)find include/ -name '*.h' | xargs --max-args 1 scripts/headerdep.pl
 +      $(Q)find $(srctree)/include/ -name '*.h' | xargs --max-args 1 \
 +      $(srctree)/scripts/headerdep.pl -I$(srctree)/include
  
  # ---------------------------------------------------------------------------
  
@@@ -1040,7 -1029,7 +1048,7 @@@ hdr-inst := -rR -f $(srctree)/scripts/M
  hdr-dst = $(if $(KBUILD_HEADERS), dst=include/asm-$(hdr-arch), dst=include/asm)
  
  PHONY += __headers
 -__headers: include/linux/version.h scripts_basic FORCE
 +__headers: include/linux/version.h scripts_basic asm-generic FORCE
        $(Q)$(MAKE) $(build)=scripts build_unifdef
  
  PHONY += headers_install_all
@@@ -1155,8 -1144,7 +1163,8 @@@ CLEAN_FILES +=  vmlinux System.map 
                  .tmp_kallsyms* .tmp_version .tmp_vmlinux* .tmp_System.map
  
  # Directories & files removed with 'make mrproper'
 -MRPROPER_DIRS  += include/config usr/include include/generated
 +MRPROPER_DIRS  += include/config usr/include include/generated          \
 +                  arch/*/include/generated
  MRPROPER_FILES += .config .config.old .version .old_version             \
                    include/linux/version.h                               \
                  Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS
@@@ -1287,12 -1275,7 +1295,12 @@@ help
        @echo  '  make O=dir [targets] Locate all output files in "dir", including .config'
        @echo  '  make C=1   [targets] Check all c source with $$CHECK (sparse by default)'
        @echo  '  make C=2   [targets] Force check of all c source with $$CHECK'
 -      @echo  '  make W=1   [targets] Enable extra gcc checks'
 +      @echo  '  make W=n   [targets] Enable extra gcc checks, n=1,2,3 where'
 +      @echo  '                1: warnings which may be relevant and do not occur too often'
 +      @echo  '                2: warnings which occur quite often but may still be relevant'
 +      @echo  '                3: more obscure warnings, can most likely be ignored'
 +      @echo  '                Multiple levels can be combined with W=12 or W=123'
 +      @echo  '  make RECORDMCOUNT_WARN=1 [targets] Warn about ignored mcount sections'
        @echo  ''
        @echo  'Execute "make" or "make all" to build all targets marked with [*] '
        @echo  'For further info see the ./README file'
@@@ -1315,7 -1298,6 +1323,7 @@@ $(help-board-dirs): help-%
  # Documentation targets
  # ---------------------------------------------------------------------------
  %docs: scripts_basic FORCE
 +      $(Q)$(MAKE) $(build)=scripts build_docproc
        $(Q)$(MAKE) $(build)=Documentation/DocBook $@
  
  else # KBUILD_EXTMOD
@@@ -1400,7 -1382,7 +1408,7 @@@ endif # KBUILD_EXTMO
  clean: $(clean-dirs)
        $(call cmd,rmdirs)
        $(call cmd,rmfiles)
 -      @find $(or $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \
 +      @find $(if $(KBUILD_EXTMOD), $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \
                \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
                -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
                -o -name '*.symtypes' -o -name 'modules.order' \
@@@ -1418,15 -1400,13 +1426,15 @@@ tags TAGS cscope gtags: FORC
  # Scripts to check various things for consistency
  # ---------------------------------------------------------------------------
  
 +PHONY += includecheck versioncheck coccicheck namespacecheck export_report
 +
  includecheck:
 -      find * $(RCS_FIND_IGNORE) \
 +      find $(srctree)/* $(RCS_FIND_IGNORE) \
                -name '*.[hcS]' -type f -print | sort \
                | xargs $(PERL) -w $(srctree)/scripts/checkincludes.pl
  
  versioncheck:
 -      find * $(RCS_FIND_IGNORE) \
 +      find $(srctree)/* $(RCS_FIND_IGNORE) \
                -name '*.[hcS]' -type f -print | sort \
                | xargs $(PERL) -w $(srctree)/scripts/checkversion.pl
  
@@@ -1658,11 -1658,9 +1658,9 @@@ static int tile_net_stop(struct net_dev
        while (tile_net_lepp_free_comps(dev, true))
                /* loop */;
  
-       /* Wipe the EPP queue. */
+       /* Wipe the EPP queue, and wait till the stores hit the EPP. */
        memset(priv->eq, 0, sizeof(lepp_queue_t));
-       /* Evict the EPP queue. */
-       finv_buffer(priv->eq, EQ_SIZE);
+       mb();
  
        return 0;
  }
@@@ -1930,7 -1928,7 +1928,7 @@@ static int tile_net_tx(struct sk_buff *
        unsigned int len = skb->len;
        unsigned char *data = skb->data;
  
 -      unsigned int csum_start = skb->csum_start - skb_headroom(skb);
 +      unsigned int csum_start = skb_checksum_start_offset(skb);
  
        lepp_frag_t frags[LEPP_MAX_FRAGS];
  
@@@ -2398,7 -2396,7 +2396,7 @@@ static void tile_net_cleanup(void
                        struct net_device *dev = tile_net_devs[i];
                        struct tile_net_priv *priv = netdev_priv(dev);
                        unregister_netdev(dev);
-                       finv_buffer(priv->eq, EQ_SIZE);
+                       finv_buffer_remote(priv->eq, EQ_SIZE, 0);
                        __free_pages(priv->eq_pages, EQ_ORDER);
                        free_netdev(dev);
                }
diff --combined drivers/rtc/Kconfig
@@@ -3,10 -3,10 +3,10 @@@
  #
  
  config RTC_LIB
 -      tristate
 +      bool
  
  menuconfig RTC_CLASS
 -      tristate "Real Time Clock"
 +      bool "Real Time Clock"
        default n
        depends on !S390
        select RTC_LIB
@@@ -15,6 -15,9 +15,6 @@@
          be allowed to plug one or more RTCs to your system. You will
          probably want to enable one or more of the interfaces below.
  
 -        This driver can also be built as a module. If so, the module
 -        will be called rtc-core.
 -
  if RTC_CLASS
  
  config RTC_HCTOSYS
@@@ -992,4 -995,11 +992,11 @@@ config RTC_DRV_TEGR
          This drive can also be built as a module. If so, the module
          will be called rtc-tegra.
  
+ config RTC_DRV_TILE
+       tristate "Tilera hypervisor RTC support"
+       depends on TILE
+       help
+         Enable support for the Linux driver side of the Tilera
+         hypervisor's real-time clock interface.
  endif # RTC_CLASS
diff --combined kernel/compat.c
@@@ -293,6 -293,8 +293,8 @@@ asmlinkage long compat_sys_times(struc
        return compat_jiffies_to_clock_t(jiffies);
  }
  
+ #ifdef __ARCH_WANT_SYS_SIGPENDING
  /*
   * Assumption: old_sigset_t and compat_old_sigset_t are both
   * types that can be passed to put_user()/get_user().
@@@ -312,6 -314,10 +314,10 @@@ asmlinkage long compat_sys_sigpending(c
        return ret;
  }
  
+ #endif
+ #ifdef __ARCH_WANT_SYS_SIGPROCMASK
  asmlinkage long compat_sys_sigprocmask(int how, compat_old_sigset_t __user *set,
                compat_old_sigset_t __user *oset)
  {
        return ret;
  }
  
+ #endif
  asmlinkage long compat_sys_setrlimit(unsigned int resource,
                struct compat_rlimit __user *rlim)
  {
@@@ -890,9 -898,10 +898,9 @@@ compat_sys_rt_sigtimedwait (compat_sigs
  {
        compat_sigset_t s32;
        sigset_t s;
 -      int sig;
        struct timespec t;
        siginfo_t info;
 -      long ret, timeout = 0;
 +      long ret;
  
        if (sigsetsize != sizeof(sigset_t))
                return -EINVAL;
        if (copy_from_user(&s32, uthese, sizeof(compat_sigset_t)))
                return -EFAULT;
        sigset_from_compat(&s, &s32);
 -      sigdelsetmask(&s,sigmask(SIGKILL)|sigmask(SIGSTOP));
 -      signotset(&s);
  
        if (uts) {
 -              if (get_compat_timespec (&t, uts))
 +              if (get_compat_timespec(&t, uts))
                        return -EFAULT;
 -              if (t.tv_nsec >= 1000000000L || t.tv_nsec < 0
 -                              || t.tv_sec < 0)
 -                      return -EINVAL;
        }
  
 -      spin_lock_irq(&current->sighand->siglock);
 -      sig = dequeue_signal(current, &s, &info);
 -      if (!sig) {
 -              timeout = MAX_SCHEDULE_TIMEOUT;
 -              if (uts)
 -                      timeout = timespec_to_jiffies(&t)
 -                              +(t.tv_sec || t.tv_nsec);
 -              if (timeout) {
 -                      current->real_blocked = current->blocked;
 -                      sigandsets(&current->blocked, &current->blocked, &s);
 -
 -                      recalc_sigpending();
 -                      spin_unlock_irq(&current->sighand->siglock);
 -
 -                      timeout = schedule_timeout_interruptible(timeout);
 -
 -                      spin_lock_irq(&current->sighand->siglock);
 -                      sig = dequeue_signal(current, &s, &info);
 -                      current->blocked = current->real_blocked;
 -                      siginitset(&current->real_blocked, 0);
 -                      recalc_sigpending();
 -              }
 -      }
 -      spin_unlock_irq(&current->sighand->siglock);
 +      ret = do_sigtimedwait(&s, &info, uts ? &t : NULL);
  
 -      if (sig) {
 -              ret = sig;
 -              if (uinfo) {
 -                      if (copy_siginfo_to_user32(uinfo, &info))
 -                              ret = -EFAULT;
 -              }
 -      }else {
 -              ret = timeout?-EINTR:-EAGAIN;
 +      if (ret > 0 && uinfo) {
 +              if (copy_siginfo_to_user32(uinfo, &info))
 +                      ret = -EFAULT;
        }
 +
        return ret;
  
  }
diff --combined kernel/sysctl.c
@@@ -56,7 -56,6 +56,7 @@@
  #include <linux/kprobes.h>
  #include <linux/pipe_fs_i.h>
  #include <linux/oom.h>
 +#include <linux/kmod.h>
  
  #include <asm/uaccess.h>
  #include <asm/processor.h>
@@@ -617,11 -616,6 +617,11 @@@ static struct ctl_table kern_table[] = 
                .child          = random_table,
        },
        {
 +              .procname       = "usermodehelper",
 +              .mode           = 0555,
 +              .child          = usermodehelper_table,
 +      },
 +      {
                .procname       = "overflowuid",
                .data           = &overflowuid,
                .maxlen         = sizeof(int),
                .data           = &watchdog_enabled,
                .maxlen         = sizeof (int),
                .mode           = 0644,
 -              .proc_handler   = proc_dowatchdog_enabled,
 +              .proc_handler   = proc_dowatchdog,
 +              .extra1         = &zero,
 +              .extra2         = &one,
        },
        {
                .procname       = "watchdog_thresh",
 -              .data           = &softlockup_thresh,
 +              .data           = &watchdog_thresh,
                .maxlen         = sizeof(int),
                .mode           = 0644,
 -              .proc_handler   = proc_dowatchdog_thresh,
 +              .proc_handler   = proc_dowatchdog,
                .extra1         = &neg_one,
                .extra2         = &sixty,
        },
                .data           = &watchdog_enabled,
                .maxlen         = sizeof (int),
                .mode           = 0644,
 -              .proc_handler   = proc_dowatchdog_enabled,
 +              .proc_handler   = proc_dowatchdog,
 +              .extra1         = &zero,
 +              .extra2         = &one,
        },
  #endif
  #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86)
@@@ -1506,7 -1496,7 +1506,7 @@@ static struct ctl_table fs_table[] = 
  
  static struct ctl_table debug_table[] = {
  #if defined(CONFIG_X86) || defined(CONFIG_PPC) || defined(CONFIG_SPARC) || \
-     defined(CONFIG_S390)
+     defined(CONFIG_S390) || defined(CONFIG_TILE)
        {
                .procname       = "exception-trace",
                .data           = &show_unhandled_signals,