1. 04 12月, 2011 3 次提交
  2. 04 11月, 2011 4 次提交
    • C
      arch/tile: factor out <arch/opcode.h> header · eb7c792d
      Chris Metcalf 提交于
      The kernel code was using some <asm> headers that included a mix
      of hardware-specific information (typically found in Tilera <arch>
      headers) and structures, enums, and function declarations supporting
      the disassembly function of the tile-desc.c sources.
      
      This change refactors that code so that a hardware-specific, but
      OS- and application-agnostic header, is created: <arch/opcode.h>.
      This header is then exported to userspace along with the other
      <arch> headers and can be used to build userspace code; in particular,
      it is used by glibc as part of implementing the backtrace() function.
      
      The new header, together with a header that specifically describes
      the disassembly code (<asm/tile-desc.h> with _32 and _64 variants),
      replaces the old <asm/opcode-tile*.h> and <asm/opcode_constants*.h>
      headers.
      
      As part of this change, we are also renaming the 32-bit constants
      from TILE_xxx to TILEPRO_xxx to better reflect the fact that they
      are specific to the TILEPro architecture, and not to TILE-Gx
      and any successor "tile" architecture chips.
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      eb7c792d
    • C
      arch/tile: add the <arch> headers to the set of installed kernel headers · aeddea5d
      Chris Metcalf 提交于
      These headers are similar to the <asm> headers that describe kernel
      APIs, but instead describe aspects of the actual hardware in an
      OS- and application-independent manner.  We need to include them in
      the set of installed headers so that userspace tools (including glibc)
      can build purely from the provided kernel headers.
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      aeddea5d
    • C
      arch/tile: avoid exporting a symbol no longer used by gcc · f319d6e2
      Chris Metcalf 提交于
      An earlier Tilera compiler generated calls to an "__ll_mul"
      function for long long multiplication.  Our libgcc supported that
      as an alias for the normal __muldi3 routine, so we made it available
      to kernel modules as well.  However, for a while now the compiler
      has internally been generating only the standard __muldi3 symbol,
      and the version we are giving back to the community does not have
      the __ll_mul alias, so we are removing it from the kernel too.
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      f319d6e2
    • C
      arch/tile: avoid ISO namespace pollution with <asm/sigcontext.h> · e0b1f39d
      Chris Metcalf 提交于
      <asm/sigcontext.h> is used by glibc's <bits/sigcontext.h> from <signal.h>,
      which means that it can't clutter the namespace with random symbols
      or #defines.  However, we use <arch/abi.h> to get a suitable type to
      hold a machine register.
      
      This change makes <arch/abi.h> safe to use in this kind of context
      if __need_int_reg_t is defined prior to including the file; in that
      case, it only defines a few symbols that are safe in the ISO namespace
      (prefixed with double underscores).  <asm/sigcontext.h> then uses
      the __uint_reg_t type instead of the normal uint_reg_t.
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      e0b1f39d
  3. 13 10月, 2011 1 次提交
  4. 05 10月, 2011 1 次提交
    • J
      time: Cleanup old CONFIG_GENERIC_TIME references that snuck in · dcb69290
      John Stultz 提交于
      Awhile back I removed all the CONFIG_GENERIC_TIME referecnes as
      the last of the non-GENERIC_TIME arches were converted.
      
      However, due to the functionality being important and around for
      awhile, there apparently were some out of tree hardware enablement
      patches that used it and have since been merged.
      
      This patch removes the remaining instances of GENERIC_TIME.
      Singed-off-by: NJohn Stultz <john.stultz@linaro.org>
      dcb69290
  5. 03 8月, 2011 2 次提交
  6. 27 7月, 2011 5 次提交
  7. 24 7月, 2011 1 次提交
  8. 23 7月, 2011 1 次提交
    • O
      virtio: expose for non-virtualization users too · e7254219
      Ohad Ben-Cohen 提交于
      virtio has been so far used only in the context of virtualization,
      and the virtio Kconfig was sourced directly by the relevant arch
      Kconfigs when VIRTUALIZATION was selected.
      
      Now that we start using virtio for inter-processor communications,
      we need to source the virtio Kconfig outside of the virtualization
      scope too.
      
      Moreover, some architectures might use virtio for both virtualization
      and inter-processor communications, so directly sourcing virtio
      might yield unexpected results due to conflicting selections.
      
      The simple solution offered by this patch is to always source virtio's
      Kconfig in drivers/Kconfig, and remove it from the appropriate arch
      Kconfigs. Additionally, a virtio menu entry has been added so virtio
      drivers don't show up in the general drivers menu.
      
      This way anyone can use virtio, though it's arguably less accessible
      (and neat!) for virtualization users now.
      
      Note: some architectures (mips and sh) seem to have a VIRTUALIZATION
      menu merely for sourcing virtio's Kconfig, so that menu is removed too.
      Signed-off-by: NOhad Ben-Cohen <ohad@wizery.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      e7254219
  9. 22 7月, 2011 1 次提交
    • R
      PCI: Make the struct pci_dev * argument of pci_fixup_irqs const. · d5341942
      Ralf Baechle 提交于
      Aside of the usual motivation for constification,  this function has a
      history of being abused a hook for interrupt and other fixups so I turned
      this function const ages ago in the MIPS code but it should be done
      treewide.
      
      Due to function pointer passing in varous places a few other functions
      had to be constified as well.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      To: Anton Vorontsov <avorontsov@mvista.com>
      To: Chris Metcalf <cmetcalf@tilera.com>
      To: Colin Cross <ccross@android.com>
      Acked-by: N"David S. Miller" <davem@davemloft.net>
      To: Eric Miao <eric.y.miao@gmail.com>
      To: Erik Gilling <konkers@android.com>
      Acked-by: NGuan Xuetao <gxt@mprc.pku.edu.cn>
      To: "H. Peter Anvin" <hpa@zytor.com>
      To: Imre Kaloz <kaloz@openwrt.org>
      To: Ingo Molnar <mingo@redhat.com>
      To: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      To: Jesse Barnes <jbarnes@virtuousgeek.org>
      To: Krzysztof Halasa <khc@pm.waw.pl>
      To: Lennert Buytenhek <kernel@wantstofly.org>
      To: Matt Turner <mattst88@gmail.com>
      To: Nicolas Pitre <nico@fluxnic.net>
      To: Olof Johansson <olof@lixom.net>
      Acked-by: NPaul Mundt <lethal@linux-sh.org>
      To: Richard Henderson <rth@twiddle.net>
      To: Russell King <linux@arm.linux.org.uk>
      To: Thomas Gleixner <tglx@linutronix.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: linux-alpha@vger.kernel.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-mips@linux-mips.org
      Cc: linux-pci@vger.kernel.org
      Cc: linux-sh@vger.kernel.org
      Cc: linux-tegra@vger.kernel.org
      Cc: sparclinux@vger.kernel.org
      Cc: x86@kernel.org
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      d5341942
  10. 16 7月, 2011 1 次提交
    • N
      nfsd: Remove deprecated nfsctl system call and related code. · 49b28684
      NeilBrown 提交于
      As promised in feature-removal-schedule.txt it is time to
      remove the nfsctl system call.
      
      Userspace has perferred to not use this call throughout 2.6 and it has been
      excluded in the default configuration since 2.6.36 (9 months ago).
      
      So this patch removes all the code that was being compiled out.
      
      There are still references to sys_nfsctl in various arch systemcall tables
      and related code.  These should be cleaned out too, probably in the next
      merge window.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      49b28684
  11. 28 6月, 2011 1 次提交
    • K
      Fix node_start/end_pfn() definition for mm/page_cgroup.c · c6830c22
      KAMEZAWA Hiroyuki 提交于
      commit 21a3c964 uses node_start/end_pfn(nid) for detection start/end
      of nodes. But, it's not defined in linux/mmzone.h but defined in
      /arch/???/include/mmzone.h which is included only under
      CONFIG_NEED_MULTIPLE_NODES=y.
      
      Then, we see
        mm/page_cgroup.c: In function 'page_cgroup_init':
        mm/page_cgroup.c:308: error: implicit declaration of function 'node_start_pfn'
        mm/page_cgroup.c:309: error: implicit declaration of function 'node_end_pfn'
      
      So, fixiing page_cgroup.c is an idea...
      
      But node_start_pfn()/node_end_pfn() is a very generic macro and
      should be implemented in the same manner for all archs.
      (m32r has different implementation...)
      
      This patch removes definitions of node_start/end_pfn() in each archs
      and defines a unified one in linux/mmzone.h. It's not under
      CONFIG_NEED_MULTIPLE_NODES, now.
      
      A result of macro expansion is here (mm/page_cgroup.c)
      
      for !NUMA
       start_pfn = ((&contig_page_data)->node_start_pfn);
        end_pfn = ({ pg_data_t *__pgdat = (&contig_page_data); __pgdat->node_start_pfn + __pgdat->node_spanned_pages;});
      
      for NUMA (x86-64)
        start_pfn = ((node_data[nid])->node_start_pfn);
        end_pfn = ({ pg_data_t *__pgdat = (node_data[nid]); __pgdat->node_start_pfn + __pgdat->node_spanned_pages;});
      
      Changelog:
       - fixed to avoid using "nid" twice in node_end_pfn() macro.
      Reported-and-acked-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Reported-and-tested-by: NIngo Molnar <mingo@elte.hu>
      Acked-by: NMel Gorman <mgorman@suse.de>
      Signed-off-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c6830c22
  12. 15 6月, 2011 1 次提交
  13. 11 6月, 2011 1 次提交
    • C
      arch/tile: add hypervisor-based character driver for SPI flash ROM · dbcb4a1a
      Chris Metcalf 提交于
      The first version of this patch proposed an arch/tile/drivers/ directory,
      but the consensus was that this was probably a poor choice for a place to
      group Tilera-specific drivers, and that in any case grouping by platform
      was discouraged, and grouping by function was preferred.
      
      This version of the patch addresses various issues raised in the
      community, primarily the absence of sysfs integration.  The sysfs
      integration now handles passing information on sector size, page size,
      and total partition size to userspace as well.  In addition, we now
      use a single "struct cdev" to manage all the partition minor devices,
      and dynamically discover the correct number of partitions from the
      hypervisor rather than using a module_param with a default value.
      
      This driver has no particular "peer" drivers it can be grouped with.
      It is sort of like an MTD driver for SPI ROM, but it doesn't group well
      with the other MTD devices since it relies on hypervisor virtualization
      to handle many of the irritating aspects of flash ROM management: sector
      awareness, background read for sub-sector writes, bit examination to
      determine whether a sector erase needs to be issued, etc.  It is in fact
      more like an EEPROM driver, but the hypervisor virtualization does require
      a "flush" command if you wish to commit a sector write prior to writing
      to a different sector, and this is sufficiently different from generic
      I2C/SPI EEPROMs that as a result it doesn't group well with them either.
      
      The simple character device is already in use by a range of Tilera
      SPI ROM management tools, as well as by customers.  In addition, using
      the simple character device actually simplifies the userspace tools,
      since they don't need to manage sector erase, background read, etc.
      This both simplifies the code (since we can uniformly manage plain files
      and the SPI ROM) as well as makes the user code portable to non-Linux
      platforms that don't offer the same MTD ioctls.
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      Reviewed-by: NArnd Bergmann <arnd@arndb.de>
      dbcb4a1a
  14. 10 6月, 2011 1 次提交
  15. 04 6月, 2011 2 次提交
  16. 27 5月, 2011 2 次提交
    • C
      arch/tile: more /proc and /sys file support · f133ecca
      Chris Metcalf 提交于
      This change introduces a few of the less controversial /proc and
      /proc/sys interfaces for tile, along with sysfs attributes for
      various things that were originally proposed as /proc/tile files.
      It also adjusts the "hardwall" proc API.
      
      Arnd Bergmann reviewed the initial arch/tile submission, which
      included a complete set of all the /proc/tile and /proc/sys/tile
      knobs that we had added in a somewhat ad hoc way during initial
      development, and provided feedback on where most of them should go.
      
      One knob turned out to be similar enough to the existing
      /proc/sys/debug/exception-trace that it was re-implemented to use
      that model instead.
      
      Another knob was /proc/tile/grid, which reported the "grid" dimensions
      of a tile chip (e.g. 8x8 processors = 64-core chip).  Arnd suggested
      looking at sysfs for that, so this change moves that information
      to a pair of sysfs attributes (chip_width and chip_height) in the
      /sys/devices/system/cpu directory.  We also put the "chip_serial"
      and "chip_revision" information from our old /proc/tile/board file
      as attributes in /sys/devices/system/cpu.
      
      Other information collected via hypervisor APIs is now placed in
      /sys/hypervisor.  We create a /sys/hypervisor/type file (holding the
      constant string "tilera") to be parallel with the Xen use of
      /sys/hypervisor/type holding "xen".  We create three top-level files,
      "version" (the hypervisor's own version), "config_version" (the
      version of the configuration file), and "hvconfig" (the contents of
      the configuration file).  The remaining information from our old
      /proc/tile/board and /proc/tile/switch files becomes an attribute
      group appearing under /sys/hypervisor/board/.
      
      Finally, after some feedback from Arnd Bergmann for the previous
      version of this patch, the /proc/tile/hardwall file is split up into
      two conceptual parts.  First, a directory /proc/tile/hardwall/ which
      contains one file per active hardwall, each file named after the
      hardwall's ID and holding a cpulist that says which cpus are enclosed by
      the hardwall.  Second, a /proc/PID file "hardwall" that is either
      empty (for non-hardwall-using processes) or contains the hardwall ID.
      
      Finally, this change pushes the /proc/sys/tile/unaligned_fixup/
      directory, with knobs controlling the kernel code for handling the
      fixup of unaligned exceptions.
      Reviewed-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      f133ecca
    • A
      arch: remove CONFIG_GENERIC_FIND_{NEXT_BIT,BIT_LE,LAST_BIT} · 63e424c8
      Akinobu Mita 提交于
      By the previous style change, CONFIG_GENERIC_FIND_NEXT_BIT,
      CONFIG_GENERIC_FIND_BIT_LE, and CONFIG_GENERIC_FIND_LAST_BIT are not used
      to test for existence of find bitops anymore.
      Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
      Acked-by: NGreg Ungerer <gerg@uclinux.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      63e424c8
  17. 26 5月, 2011 1 次提交
  18. 25 5月, 2011 2 次提交
  19. 20 5月, 2011 4 次提交
    • C
      arch/tile: cleanups for tilegx compat mode · 818d8462
      Chris Metcalf 提交于
      These changes make the syscall table line up correctly for
      tilegx compat mode, and remove the stale sys32_fadvise64() function,
      which isn't actually used by any syscall table.
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      818d8462
    • C
      arch/tile: allocate PCI IRQs later in boot · f4de51de
      Chris Metcalf 提交于
      This change became required due to some recent reworking in the
      platform-independent IRQ code.  It is required for 2.6.38 and later.
      
      Cc: stable@kernel.org
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      f4de51de
    • C
      arch/tile: support signal "exception-trace" hook · 571d76ac
      Chris Metcalf 提交于
      This change adds support for /proc/sys/debug/exception-trace to tile.
      Like x86 and sparc, by default it is set to "1", generating a one-line
      printk whenever a user process crashes.  By setting it to "2", we get
      a much more complete userspace diagnostic at crash time, including
      a user-space backtrace, register dump, and memory dump around the
      address of the crash.
      
      Some vestiges of the Tilera-internal version of this support are
      removed with this patch (the show_crashinfo variable and the
      arch_coredump_signal function).  We retain a "crashinfo" boot parameter
      which allows you to set the boot-time value of exception-trace.
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      571d76ac
    • C
      arch/tile: use better definitions of xchg() and cmpxchg() · 8aaf1dda
      Chris Metcalf 提交于
      These definitions use a ({}) construct to avoid some cases where
      we were getting warnings about unused return values.  We also
      promote the definition to the common <asm/atomic.h>, since it applies
      to both the 32- and 64-bit atomics.
      
      In addition, define __HAVE_ARCH_CMPXCHG for TILE-Gx since it has
      efficient direct atomic instructions.
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      8aaf1dda
  20. 18 5月, 2011 1 次提交
  21. 13 5月, 2011 2 次提交
    • C
      arch/tile: finish enabling support for TILE-Gx 64-bit chip · 18aecc2b
      Chris Metcalf 提交于
      This support was partially present in the existing code (look for
      "__tilegx__" ifdefs) but with this change you can build a working
      kernel using the TILE-Gx toolchain and ARCH=tilegx.
      
      Most of these files are new, generally adding a foo_64.c file
      where previously there was just a foo_32.c file.
      
      The ARCH=tilegx directive redirects to arch/tile, not arch/tilegx,
      using the existing SRCARCH mechanism in the top-level Makefile.
      
      Changes to existing files:
      
      - <asm/bitops.h> and <asm/bitops_32.h> changed to factor the
        include of <asm-generic/bitops/non-atomic.h> in the common header.
      
      - <asm/compat.h> and arch/tile/kernel/compat.c changed to remove
        the "const" markers I had put on compat_sys_execve() when trying
        to match some recent similar changes to the non-compat execve.
        It turns out the compat version wasn't "upgraded" to use const.
      
      - <asm/opcode-tile_64.h> and <asm/opcode_constants_64.h> were
        previously included accidentally, with the 32-bit contents.  Now
        they have the proper 64-bit contents.
      
      Finally, I had to hack the existing hacky drivers/input/input-compat.h
      to add yet another "#ifdef" for INPUT_COMPAT_TEST (same as x86_64).
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> [drivers/input]
      18aecc2b
    • C
      compat: fixes to allow working with tile arch · be84cb43
      Chris Metcalf 提交于
      The existing <asm-generic/unistd.h> mechanism doesn't really provide
      enough to create the 64-bit "compat" ABI properly in a generic way,
      since the compat ABI is a mix of things were you can re-use the 64-bit
      versions of syscalls and things where you need a compat wrapper.
      
      To provide this in the most direct way possible, I added two new macros
      to go along with the existing __SYSCALL and __SC_3264 macros: __SC_COMP
      and SC_COMP_3264.  These macros take an additional argument, typically a
      "compat_sys_xxx" function, which is passed to __SYSCALL if you define
      __SYSCALL_COMPAT when including the header, resulting in a pointer to
      the compat function being placed in the generated syscall table.
      
      The change also adds some missing definitions to <linux/compat.h> so that
      it actually has declarations for all the compat syscalls, since the
      "[nr] = ##call" approach requires proper C declarations for all the
      functions included in the syscall table.
      
      Finally, compat.c defines compat_sys_sigpending() and
      compat_sys_sigprocmask() even if the underlying architecture doesn't
      request it, which tries to pull in undefined compat_old_sigset_t defines.
      We need to guard those compat syscall definitions with appropriate
      __ARCH_WANT_SYS_xxx ifdefs.
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      be84cb43
  22. 05 5月, 2011 2 次提交