13 Jan, 2012

2 commits

  • Use the more commonly used __noreturn instead of ATTRIB_NORETURN.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Joe Perches
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Haavard Skinnemoen
    Cc: Hans-Christian Egtvedt
    Cc: Tony Luck
    Cc: Fenghua Yu
    Acked-by: Geert Uytterhoeven
    Acked-by: Ralf Baechle
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Chris Metcalf
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • It's a very old and now unused prototype marking so just delete it.

    Neaten panic pointer argument style to keep checkpatch quiet.

    Signed-off-by: Joe Perches
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Haavard Skinnemoen
    Cc: Hans-Christian Egtvedt
    Cc: Tony Luck
    Cc: Fenghua Yu
    Acked-by: Geert Uytterhoeven
    Acked-by: Ralf Baechle
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Chris Metcalf
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     

12 Jan, 2012

1 commit

  • * 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci: (80 commits)
    x86/PCI: Expand the x86_msi_ops to have a restore MSIs.
    PCI: Increase resource array mask bit size in pcim_iomap_regions()
    PCI: DEVICE_COUNT_RESOURCE should be equal to PCI_NUM_RESOURCES
    PCI: pci_ids: add device ids for STA2X11 device (aka ConneXT)
    PNP: work around Dell 1536/1546 BIOS MMCONFIG bug that breaks USB
    x86/PCI: amd: factor out MMCONFIG discovery
    PCI: Enable ATS at the device state restore
    PCI: msi: fix imbalanced refcount of msi irq sysfs objects
    PCI: kconfig: English typo in pci/pcie/Kconfig
    PCI/PM/Runtime: make PCI traces quieter
    PCI: remove pci_create_bus()
    xtensa/PCI: convert to pci_scan_root_bus() for correct root bus resources
    x86/PCI: convert to pci_create_root_bus() and pci_scan_root_bus()
    x86/PCI: use pci_scan_bus() instead of pci_scan_bus_parented()
    x86/PCI: read Broadcom CNB20LE host bridge info before PCI scan
    sparc32, leon/PCI: convert to pci_scan_root_bus() for correct root bus resources
    sparc/PCI: convert to pci_create_root_bus()
    sh/PCI: convert to pci_scan_root_bus() for correct root bus resources
    powerpc/PCI: convert to pci_create_root_bus()
    powerpc/PCI: split PHB part out of pcibios_map_io_space()
    ...

    Fix up conflicts in drivers/pci/msi.c and include/linux/pci_regs.h due
    to the same patches being applied in other branches.

    Linus Torvalds
     

11 Jan, 2012

1 commit

  • lib: use generic pci_iomap on all architectures

    Many architectures don't want to pull in iomap.c,
    so they ended up duplicating pci_iomap from that file.
    That function isn't trivial, and we are going to modify it
    https://lkml.org/lkml/2011/11/14/183
    so the duplication hurts.

    This reduces the scope of the problem significantly,
    by moving pci_iomap to a separate file and
    referencing that from all architectures.

    * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
    alpha: drop pci_iomap/pci_iounmap from pci-noop.c
    mn10300: switch to GENERIC_PCI_IOMAP
    mn10300: add missing __iomap markers
    frv: switch to GENERIC_PCI_IOMAP
    tile: switch to GENERIC_PCI_IOMAP
    tile: don't panic on iomap
    sparc: switch to GENERIC_PCI_IOMAP
    sh: switch to GENERIC_PCI_IOMAP
    powerpc: switch to GENERIC_PCI_IOMAP
    parisc: switch to GENERIC_PCI_IOMAP
    mips: switch to GENERIC_PCI_IOMAP
    microblaze: switch to GENERIC_PCI_IOMAP
    arm: switch to GENERIC_PCI_IOMAP
    alpha: switch to GENERIC_PCI_IOMAP
    lib: add GENERIC_PCI_IOMAP
    lib: move GENERIC_IOMAP to lib/Kconfig

    Fix up trivial conflicts due to changes nearby in arch/{m68k,score}/Kconfig

    Linus Torvalds
     

08 Jan, 2012

1 commit

  • * 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (73 commits)
    arm: fix up some samsung merge sysdev conversion problems
    firmware: Fix an oops on reading fw_priv->fw in sysfs loading file
    Drivers:hv: Fix a bug in vmbus_driver_unregister()
    driver core: remove __must_check from device_create_file
    debugfs: add missing #ifdef HAS_IOMEM
    arm: time.h: remove device.h #include
    driver-core: remove sysdev.h usage.
    clockevents: remove sysdev.h
    arm: convert sysdev_class to a regular subsystem
    arm: leds: convert sysdev_class to a regular subsystem
    kobject: remove kset_find_obj_hinted()
    m86k: gpio - convert sysdev_class to a regular subsystem
    mips: txx9_sram - convert sysdev_class to a regular subsystem
    mips: 7segled - convert sysdev_class to a regular subsystem
    sh: dma - convert sysdev_class to a regular subsystem
    sh: intc - convert sysdev_class to a regular subsystem
    power: suspend - convert sysdev_class to a regular subsystem
    power: qe_ic - convert sysdev_class to a regular subsystem
    power: cmm - convert sysdev_class to a regular subsystem
    s390: time - convert sysdev_class to a regular subsystem
    ...

    Fix up conflicts with 'struct sysdev' removal from various platform
    drivers that got changed:
    - arch/arm/mach-exynos/cpu.c
    - arch/arm/mach-exynos/irq-eint.c
    - arch/arm/mach-s3c64xx/common.c
    - arch/arm/mach-s3c64xx/cpu.c
    - arch/arm/mach-s5p64x0/cpu.c
    - arch/arm/mach-s5pv210/common.c
    - arch/arm/plat-samsung/include/plat/cpu.h
    - arch/powerpc/kernel/sysfs.c
    and fix up cpu_is_hotpluggable() as per Greg in include/linux/cpu.h

    Linus Torvalds
     

07 Jan, 2012

2 commits

  • This patch converts TILE's architecture-specific 'pcibios_set_master()'
    routine to a non-inlined function. This will allow follow on patches
    to create a generic 'pcibios_set_master()' function using the '__weak'
    attribute which can be used by all architectures as a default which,
    if necessary, can then be over-ridden by architecture-specific code.

    Converting 'pci_bios_set_master()' to a non-inlined function will
    allow TILE's 'pcibios_set_master()' implementation to remain
    architecture-specific after the generic version is introduced and
    thus, not change current behavior.

    No functional change.

    Acked-by: Chris Metcalf
    Signed-off-by: Myron Stowe
    Signed-off-by: Jesse Barnes

    Myron Stowe
     
  • This resolves the conflict in the arch/arm/mach-s3c64xx/s3c6400.c file,
    and it fixes the build error in the arch/x86/kernel/microcode_core.c
    file, that the merge did not catch.

    The microcode_core.c patch was provided by Stephen Rothwell
    who was invaluable in the merge issues involved
    with the large sysdev removal process in the driver-core tree.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

22 Dec, 2011

1 commit

  • This moves the 'cpu sysdev_class' over to a regular 'cpu' subsystem
    and converts the devices to regular devices. The sysdev drivers are
    implemented as subsystem interfaces now.

    After all sysdev classes are ported to regular driver core entities, the
    sysdev implementation will be entirely removed from the kernel.

    Userspace relies on events and generic sysfs subsystem infrastructure
    from sysdev devices, which are made available with this conversion.

    Cc: Haavard Skinnemoen
    Cc: Hans-Christian Egtvedt
    Cc: Tony Luck
    Cc: Fenghua Yu
    Cc: Arnd Bergmann
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Paul Mundt
    Cc: "David S. Miller"
    Cc: Chris Metcalf
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Borislav Petkov
    Cc: Tigran Aivazian
    Cc: Len Brown
    Cc: Zhang Rui
    Cc: Dave Jones
    Cc: Peter Zijlstra
    Cc: Russell King
    Cc: Andrew Morton
    Cc: Arjan van de Ven
    Cc: "Rafael J. Wysocki"
    Cc: "Srivatsa S. Bhat"
    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     

12 Dec, 2011

3 commits

  • Those two APIs were provided to optimize the calls of
    tick_nohz_idle_enter() and rcu_idle_enter() into a single
    irq disabled section. This way no interrupt happening in-between would
    needlessly process any RCU job.

    Now we are talking about an optimization for which benefits
    have yet to be measured. Let's start simple and completely decouple
    idle rcu and dyntick idle logics to simplify.

    Signed-off-by: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Peter Zijlstra
    Reviewed-by: Josh Triplett
    Signed-off-by: Paul E. McKenney

    Frederic Weisbecker
     
  • It is assumed that rcu won't be used once we switch to tickless
    mode and until we restart the tick. However this is not always
    true, as in x86-64 where we dereference the idle notifiers after
    the tick is stopped.

    To prepare for fixing this, add two new APIs:
    tick_nohz_idle_enter_norcu() and tick_nohz_idle_exit_norcu().

    If no use of RCU is made in the idle loop between
    tick_nohz_enter_idle() and tick_nohz_exit_idle() calls, the arch
    must instead call the new *_norcu() version such that the arch doesn't
    need to call rcu_idle_enter() and rcu_idle_exit().

    Otherwise the arch must call tick_nohz_enter_idle() and
    tick_nohz_exit_idle() and also call explicitly:

    - rcu_idle_enter() after its last use of RCU before the CPU is put
    to sleep.
    - rcu_idle_exit() before the first use of RCU after the CPU is woken
    up.

    Signed-off-by: Frederic Weisbecker
    Cc: Mike Frysinger
    Cc: Guan Xuetao
    Cc: David Miller
    Cc: Chris Metcalf
    Cc: Hans-Christian Egtvedt
    Cc: Ralf Baechle
    Cc: Paul E. McKenney
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: H. Peter Anvin
    Cc: Russell King
    Cc: Paul Mackerras
    Cc: Heiko Carstens
    Cc: Paul Mundt
    Signed-off-by: Paul E. McKenney

    Frederic Weisbecker
     
  • The tick_nohz_stop_sched_tick() function, which tries to delay
    the next timer tick as long as possible, can be called from two
    places:

    - From the idle loop to start the dytick idle mode
    - From interrupt exit if we have interrupted the dyntick
    idle mode, so that we reprogram the next tick event in
    case the irq changed some internal state that requires this
    action.

    There are only few minor differences between both that
    are handled by that function, driven by the ts->inidle
    cpu variable and the inidle parameter. The whole guarantees
    that we only update the dyntick mode on irq exit if we actually
    interrupted the dyntick idle mode, and that we enter in RCU extended
    quiescent state from idle loop entry only.

    Split this function into:

    - tick_nohz_idle_enter(), which sets ts->inidle to 1, enters
    dynticks idle mode unconditionally if it can, and enters into RCU
    extended quiescent state.

    - tick_nohz_irq_exit() which only updates the dynticks idle mode
    when ts->inidle is set (ie: if tick_nohz_idle_enter() has been called).

    To maintain symmetry, tick_nohz_restart_sched_tick() has been renamed
    into tick_nohz_idle_exit().

    This simplifies the code and micro-optimize the irq exit path (no need
    for local_irq_save there). This also prepares for the split between
    dynticks and rcu extended quiescent state logics. We'll need this split to
    further fix illegal uses of RCU in extended quiescent states in the idle
    loop.

    Signed-off-by: Frederic Weisbecker
    Cc: Mike Frysinger
    Cc: Guan Xuetao
    Cc: David Miller
    Cc: Chris Metcalf
    Cc: Hans-Christian Egtvedt
    Cc: Ralf Baechle
    Cc: Paul E. McKenney
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: H. Peter Anvin
    Cc: Russell King
    Cc: Paul Mackerras
    Cc: Heiko Carstens
    Cc: Paul Mundt
    Signed-off-by: Paul E. McKenney
    Reviewed-by: Josh Triplett

    Frederic Weisbecker
     

04 Dec, 2011

3 commits


04 Nov, 2011

1 commit

  • The kernel code was using some headers that included a mix
    of hardware-specific information (typically found in Tilera
    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: .
    This header is then exported to userspace along with the other
    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 ( with _32 and _64 variants),
    replaces the old and
    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: Chris Metcalf

    Chris Metcalf
     

13 Oct, 2011

1 commit


03 Aug, 2011

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
    arch/tile/mm/init.c: trivial: use BUG_ON
    arch/tile: remove useless set_fixmap_nocache() macro
    arch/tile: add hypervisor-based character driver for SPI flash ROM
    ioctl-number.txt: add the tile hardwall ioctl range
    tile: use generic-y format for one-line asm-generic headers
    clocksource: tile: convert to use clocksource_register_hz

    Linus Torvalds
     

30 Jul, 2011

1 commit

  • * 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
    PCI: remove printks about disabled bridge windows
    PCI: fold pci_calc_resource_flags() into decode_bar()
    PCI: treat mem BAR type "11" (reserved) as 32-bit, not 64-bit, BAR
    PCI: correct pcie_set_readrq write size
    PCI: pciehp: change wait time for valid configuration access
    x86/PCI: Preserve existing pci=bfsort whitelist for Dell systems
    PCI: ARI is a PCIe v2 feature
    x86/PCI: quirks: Use pci_dev->revision
    PCI: Make the struct pci_dev * argument of pci_fixup_irqs const.
    PCI hotplug: cpqphp: use pci_dev->vendor
    PCI hotplug: cpqphp: use pci_dev->subsystem_{vendor|device}
    x86/PCI: config space accessor functions should not ignore the segment argument
    PCI: Assign values to 'pci_obff_signal_type' enumeration constants
    x86/PCI: reduce severity of host bridge window conflict warnings
    PCI: enumerate the PCI device only removed out PCI hieratchy of OS when re-scanning PCI
    PCI: PCIe AER: add aer_recover_queue
    x86/PCI: select direct access mode for mmconfig option
    PCI hotplug: Rename is_ejectable which also exists in dock.c

    Linus Torvalds
     

27 Jul, 2011

1 commit

  • This allows us to move duplicated code in
    (atomic_inc_not_zero() for now) to

    Signed-off-by: Arun Sharma
    Reviewed-by: Eric Dumazet
    Cc: Ingo Molnar
    Cc: David Miller
    Cc: Eric Dumazet
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arun Sharma
     

26 Jul, 2011

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits)
    fs: Merge split strings
    treewide: fix potentially dangerous trailing ';' in #defined values/expressions
    uwb: Fix misspelling of neighbourhood in comment
    net, netfilter: Remove redundant goto in ebt_ulog_packet
    trivial: don't touch files that are removed in the staging tree
    lib/vsprintf: replace link to Draft by final RFC number
    doc: Kconfig: `to be' -> `be'
    doc: Kconfig: Typo: square -> squared
    doc: Konfig: Documentation/power/{pm => apm-acpi}.txt
    drivers/net: static should be at beginning of declaration
    drivers/media: static should be at beginning of declaration
    drivers/i2c: static should be at beginning of declaration
    XTENSA: static should be at beginning of declaration
    SH: static should be at beginning of declaration
    MIPS: static should be at beginning of declaration
    ARM: static should be at beginning of declaration
    rcu: treewide: Do not use rcu_read_lock_held when calling rcu_dereference_check
    Update my e-mail address
    PCIe ASPM: forcedly -> forcibly
    gma500: push through device driver tree
    ...

    Fix up trivial conflicts:
    - arch/arm/mach-ep93xx/dma-m2p.c (deleted)
    - drivers/gpio/gpio-ep93xx.c (renamed and context nearby)
    - drivers/net/r8169.c (just context changes)

    Linus Torvalds
     

24 Jul, 2011

1 commit

  • This patch removes all the module loader hook implementations in the
    architecture specific code where the functionality is the same as that
    now provided by the recently added default hooks.

    Signed-off-by: Jonas Bonn
    Acked-by: Mike Frysinger
    Acked-by: Geert Uytterhoeven
    Tested-by: Michal Simek
    Signed-off-by: Rusty Russell

    Jonas Bonn
     

22 Jul, 2011

1 commit

  • 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: Ralf Baechle
    To: Anton Vorontsov
    To: Chris Metcalf
    To: Colin Cross
    Acked-by: "David S. Miller"
    To: Eric Miao
    To: Erik Gilling
    Acked-by: Guan Xuetao
    To: "H. Peter Anvin"
    To: Imre Kaloz
    To: Ingo Molnar
    To: Ivan Kokshaysky
    To: Jesse Barnes
    To: Krzysztof Halasa
    To: Lennert Buytenhek
    To: Matt Turner
    To: Nicolas Pitre
    To: Olof Johansson
    Acked-by: Paul Mundt
    To: Richard Henderson
    To: Russell King
    To: Thomas Gleixner
    Cc: Andrew Morton
    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: Jesse Barnes

    Ralf Baechle
     

10 Jun, 2011

1 commit


04 Jun, 2011

1 commit


30 May, 2011

1 commit


27 May, 2011

1 commit

  • 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: Arnd Bergmann
    Signed-off-by: Chris Metcalf

    Chris Metcalf
     

26 May, 2011

1 commit

  • * 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"
    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
    ...

    Linus Torvalds
     

25 May, 2011

1 commit


20 May, 2011

3 commits

  • 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: Chris Metcalf

    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: Chris Metcalf

    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: Chris Metcalf

    Chris Metcalf
     

13 May, 2011

2 commits

  • 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:

    - and changed to factor the
    include of in the common header.

    - 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.

    - and 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: Chris Metcalf
    Acked-by: Dmitry Torokhov [drivers/input]

    Chris Metcalf
     
  • The existing 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 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: Arnd Bergmann
    Signed-off-by: Chris Metcalf

    Chris Metcalf
     

05 May, 2011

7 commits

  • 1. do_hardwall_trap() checks ->sighand != NULL and then takes ->siglock.

    This is unsafe even if the task can't run (I assume it is pinned to
    the same CPU), its parent can reap the task and set ->sighand = NULL
    right after this check. Even if the compiler dosn't read ->sighand
    twice and this memory can't to away __group_send_sig_info() is wrong
    after that. Use do_send_sig_info().

    2. Send SIGILL to the thread, not to the whole process. Unless it has
    the handler or blocked this kills the whole thread-group as before.
    IIUC, different threads can be bound to different rect's.

    3. Check PF_EXITING instead of ->sighand. A zombie thread can go away
    but its ->sighand can be !NULL.

    Reported-by: Matt Fleming
    Signed-off-by: Oleg Nesterov
    Signed-off-by: Chris Metcalf

    Oleg Nesterov
     
  • We plan to change mm->cpu_vm_mask definition later. Thus, this patch convert
    it into proper macro.

    Signed-off-by: KOSAKI Motohiro
    Signed-off-by: Chris Metcalf

    KOSAKI Motohiro
     
  • Since v2.6.20 "Pass struct dev pointer to dma_cache_sync()"
    (d3fa72e4556ec1f04e46a0d561d9e785ecaa173d), dma_cache_sync() takes a
    struct dev pointer, but these appear to be missing from the tile and
    mn10300 implementations, so add them.

    Signed-off-by: James Hogan
    [cmetcalf@tilera.com: took only the "tile" portion as I don't maintain mn10300]
    Signed-off-by: Chris Metcalf

    James Hogan
     
  • This change adds a number of missing headers in asm (fb.h, parport.h,
    serial.h, and vga.h) using the minimal generic versions.

    It also adds a number of missing interfaces that showed up as build
    failures when trying to build various drivers not normally included in the
    "tile" distribution: ioremap_wc(), memset_io(), io{read,write}{16,32}be(),
    virt_to_bus(), bus_to_virt(), irq_canonicalize(), __pte(), __pgd(),
    and __pmd(). I also added a cast in virt_to_page() since not all callers
    pass a pointer.

    I fixed to properly include a __KERNEL__ guard for the
    __ARCH_WANT_STAT64 symbol, and to use __builtin_bswap32()
    even for our 64-bit architecture, since the same code is produced.

    I added an export for get_cycles(), since it's used in some modules.

    And I made properly include the __KERNEL__ guard,
    even though it's not yet exported, since it likely will be soon.

    Signed-off-by: Chris Metcalf

    Chris Metcalf
     
  • The code accidentally was relying on this configuration option
    being selected.

    Signed-off-by: Chris Metcalf

    Chris Metcalf
     
  • Otherwise, in principle, there could be stale I$ data present
    next time the page that previously held the kernel module code was
    used to run some new code.

    Signed-off-by: Chris Metcalf

    Chris Metcalf
     
  • This semantic was already true for atomic operations within the kernel,
    and this change makes it true for the fast atomic syscalls (__NR_cmpxchg
    and __NR_atomic_update) as well. Previously, user-space had to use
    the fast atomic syscalls exclusively to update memory, since raw stores
    could lose a race with the atomic update code even when the atomic update
    hadn't actually modified the value.

    With this change, we no longer write back the value to memory if it
    hasn't changed. This allows certain types of idioms in user space to
    work as expected, e.g. "atomic exchange" to acquire a spinlock, followed
    by a raw store of zero to release the lock.

    Signed-off-by: Chris Metcalf

    Chris Metcalf