24 Jun, 2005

5 commits

  • The preempt_count member of struct thread_info is currently either defined
    as int, unsigned int or __s32 depending on arch. This patch makes the type
    of preempt_count an int on all archs.

    Having preempt_count be an unsigned type prevents the catching of
    preempt_count < 0 bugs, and using int on some archs and __s32 on others is
    not exactely "neat" - much nicer when it's just int all over.

    A previous version of this patch was already ACK'ed by Robert Love, and the
    only change in this version of the patch compared to the one he ACK'ed is
    that this one also makes sure the preempt_count member is consistently
    commented.

    Signed-off-by: Jesper Juhl
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Juhl
     
  • asm-generic/topology.h must also be included if CONFIG_NUMA is set in order to
    provide the fall back pcibus_to_node function.

    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • Provide the architecture specific implementation for SPARSEMEM for PPC64
    systems.

    Signed-off-by: Andy Whitcroft
    Signed-off-by: Dave Hansen
    Signed-off-by: Mike Kravetz (in part)
    Signed-off-by: Martin Bligh
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • Provide an implementation of early_pfn_to_nid for PPC64. This is used by
    memory models to determine the node from which to take allocations before the
    memory allocators are fully initialised.

    Signed-off-by: Andy Whitcroft
    Signed-off-by: Dave Hansen
    Signed-off-by: Martin Bligh
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • This patch effectively eliminates direct use of pgdat->node_mem_map outside
    of the DISCONTIG code. On a flat memory system, these fields aren't
    currently used, neither are they on a sparsemem system.

    There was also a node_mem_map(nid) macro on many architectures. Its use
    along with the use of ->node_mem_map itself was not consistent. It has
    been removed in favor of two new, more explicit, arch-independent macros:

    pgdat_page_nr(pgdat, pagenr)
    nid_page_nr(nid, pagenr)

    I called them "pgdat" and "nid" because we overload the term "node" to mean
    "NUMA node", "DISCONTIG node" or "pg_data_t" in very confusing ways. I
    believe the newer names are much clearer.

    These macros can be overridden in the sparsemem case with a theoretically
    slower operation using node_start_pfn and pfn_to_page(), instead. We could
    make this the only behavior if people want, but I don't want to change too
    much at once. One thing at a time.

    This patch removes more code than it adds.

    Compile tested on alpha, alpha discontig, arm, arm-discontig, i386, i386
    generic, NUMAQ, Summit, ppc64, ppc64 discontig, and x86_64. Full list
    here: http://sr71.net/patches/2.6.12/2.6.12-rc1-mhp2/configs/

    Boot tested on NUMAQ, x86 SMP and ppc64 power4/5 LPARs.

    Signed-off-by: Dave Hansen
    Signed-off-by: Martin J. Bligh
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Hansen
     

22 Jun, 2005

20 commits

  • This patch allows iSeries to build with CONFIG_PCI=n. This is useful for
    partitions that have only virtual I/O.

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     
  • This patch just removes some dead code, fixes messages that referred to the
    file this code used to be in and inserts XmPciLpEvent_init into its caller.

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     
  • This patch is just simple cleanups to the iSeries irq code.
    - whitespace and comments
    - rearrange some functions to avoid forward declarations
    - remove XmPciLpEvent.h as its functions were declared elsewhere
    - remove decaration of function that no longer exists
    No semantic changes.

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     
  • The AgentId, PhbId, FrameId, CardLocation and Location members of
    iSeries_Device_Node are stored early in the boot process just so that a
    message about the device can be printed later in the boot process. Remove
    them and construct the message by doing the VPD parsing at the time the
    message is printed.

    Also remove a few unused defines in iSeries_VpdInfo.c.

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     
  • The IoRetry member of iSeries_Devide_Node is really only used locally, so
    remove it and replace it with a local variable.

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     
  • Remove no longer used things from iSeries_pci.h.

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     
  • The iommu_table_cb structure is iSeries specific, so move it to the header
    file that declares the function we pass it to. vio_tce_table and
    iommu_setup_iSeries no longer exist, so remove their declarations.

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     
  • The file arch/ppc64/kernel/iSeries_pci_reset contains only one function that
    is not use anywhere (any more). Remove it. This function is the only user of
    the ReturnCode member of iSeries_Device_Node, so remove that as well.

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     
  • Last of this round of the iSeries header cleanups
    - don't have two defines for the same thing (HvMaxArchitectedLps
    and HvMaxArchitectedVirtualLans)
    - HvCallSc.h only needs linux/types.h
    - remove unused struct definition
    - add "extern" to some more function declarations

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     
  • This patch removes some unused bits from HvCall.h and some unneeded #includes
    from other files. Also includes ItLpQueue.h in paca.h in preference to a stub
    declaration of struct ItLpQueue.

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     
  • Just white space cleaups and move process_iSeries_events into its only caller.

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     
  • Now that the only users of things in HvCallCfg.h are in HvLpConfig.h, merge in
    the bit we need and remove HvCallCfg.h.

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     
  • This patch removes from the iSeries header files a large number of inline
    functions that are not used. It also changes the only caller of a HvCallCfg
    function that is outside HvLpConfig.h to its equivalent HvLpConfig function
    and no longer includes HvCallCfg.h where it is not needed.

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     
  • include/asm-ppc64/iSeries/LparData.h just included a whole lot of other files
    to declare variables that would be better declared in those other files. So,
    remove it. This will reduce that number of things needed to be included in
    most cases to access the relevant variables.

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     
  • This patch does some obvious code cleanups in the iSeries headers files.
    - simplifies the bodies of lots of inline functions
    - parenthesises a macros result
    - removes C++ wrapping
    - adds "extern" to some function declarations
    There are no semantic changes.

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     
  • This patch just contains white space and comment cleanups in the iSeries
    headers files. There are no semantic changes.

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     
  • This patch just contains white space and comment cleanups in the iSeries
    headers files. There are no semantic changes.

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     
  • include/asm-ppc64/iSeries/iSeries_proc.h just contains a declaration of a
    function that no longer exists. Remove it.

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     
  • Currently ppc64 has two mm_structs for the kernel, init_mm and also
    ioremap_mm. The latter really isn't necessary: this patch abolishes it,
    instead restricting vmallocs to the lower 1TB of the init_mm's range and
    placing io mappings in the upper 1TB. This simplifies the code in a number
    of places and eliminates an unecessary set of pagetables. It also tweaks
    the unmap/free path a little, allowing us to remove the unmap_im_area() set
    of page table walkers, replacing them with unmap_vm_area().

    Signed-off-by: David Gibson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Gibson
     
  • This patch implements a number of smp_processor_id() cleanup ideas that
    Arjan van de Ven and I came up with.

    The previous __smp_processor_id/_smp_processor_id/smp_processor_id API
    spaghetti was hard to follow both on the implementational and on the
    usage side.

    Some of the complexity arose from picking wrong names, some of the
    complexity comes from the fact that not all architectures defined
    __smp_processor_id.

    In the new code, there are two externally visible symbols:

    - smp_processor_id(): debug variant.

    - raw_smp_processor_id(): nondebug variant. Replaces all existing
    uses of _smp_processor_id() and __smp_processor_id(). Defined
    by every SMP architecture in include/asm-*/smp.h.

    There is one new internal symbol, dependent on DEBUG_PREEMPT:

    - debug_smp_processor_id(): internal debug variant, mapped to
    smp_processor_id().

    Also, i moved debug_smp_processor_id() from lib/kernel_lock.c into a new
    lib/smp_processor_id.c file. All related comments got updated and/or
    clarified.

    I have build/boot tested the following 8 .config combinations on x86:

    {SMP,UP} x {PREEMPT,!PREEMPT} x {DEBUG_PREEMPT,!DEBUG_PREEMPT}

    I have also build/boot tested x64 on UP/PREEMPT/DEBUG_PREEMPT. (Other
    architectures are untested, but should work just fine.)

    Signed-off-by: Ingo Molnar
    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     

09 Jun, 2005

1 commit

  • This patch fixes some bugs in the ppc64 PER_LINUX32 implementation,
    noted by Juergen Kreileder:

    * uname(2) doesn't respect PER_LINUX32, it returns 'ppc64' instead of 'ppc'
    * Child processes of a PER_LINUX32 process don't inherit PER_LINUX32

    Along the way I took the opportunity to move things around so that
    sys_ppc32.c only has 32-bit syscall emulation functions and to remove
    the obsolete "fakeppc" command line option.

    Signed-off-by: Paul Mackerras
    Signed-off-by: Linus Torvalds

    Paul Mackerras
     

08 Jun, 2005

1 commit

  • When Linux is running on the Xen virtual machine monitor, physical
    addresses are virtualised and cannot be directly referenced by the AGP
    GART. This patch fixes the GART driver for Xen by adding a layer of
    abstraction between physical addresses and 'GART addresses'.

    Architecture-specific functions are also defined for allocating and freeing
    the GATT. Xen requires this to ensure that table really is contiguous from
    the point of view of the GART.

    These extra interface functions are defined as 'no-ops' for all existing
    architectures that use the GART driver.

    Signed-off-by: Keir Fraser
    Signed-off-by: Andrew Morton
    Signed-off-by: Dave Jones

    Keir Fraser
     

03 Jun, 2005

2 commits

  • The iseries has a bar graph on the front panel that shows how busy it is.
    The operating system sets and clears a bit in the CTRL register to control
    it.

    Instead of going to the complexity of using a thread info bit, just set and
    clear it in the idle loop.

    Also create two helper functions, ppc64_runlatch_on and ppc64_runlatch_off.

    Finally don't use the short form of the SPR defines.

    Signed-off-by: Anton Blanchard
    Acked-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Blanchard
     
  • There are a bunch of irrelevant SPR definitions in asm/processer.h. Cut
    them down a bit, also add a DABR_TRANSLATION define which will be used
    shortly.

    Signed-off-by: Anton Blanchard
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Blanchard
     

01 Jun, 2005

1 commit

  • This cleans up the /proc/device-tree representation of the Open Firmware
    device-tree on ppc and ppc64. It does the following things:

    - Workaround an issue in some Apple device-trees where a property may
    exist with the same name as a child node of the parent. We now
    simply "drop" the property instead of creating duplicate entries in
    /proc with random result...

    - Do not try to chop off the "@0" at the end of a node name whose unit
    address is 0. This is not useful, inconsistent, and the code was
    buggy and didn't always work anyway.

    - Do not create symlinks for the short name and unit address parts of a
    node. These were never really used, bloated the memory footprint of
    the device-tree with useless struct proc_dir_entry and their matching
    dentry and inode cache bloat.

    This results in smaller code, smaller memory footprint, and a more
    accurate view of the tree presented to userland.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt
     

26 May, 2005

1 commit

  • For quite a while, there has existed a hypervisor bug on legacy iSeries
    which means that we do not get the boot time set in the kernel. This
    patch works around that bug. This was most noticable when the root
    partition needed to be checked at every boot as the kernel thought it
    was some time in 1905 until user mode reset the time correctly.

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     

06 May, 2005

2 commits

  • Move the code to set global interrupt queue membership to xics.c,
    and remove no longer needed extern declarations. Also call it on
    all cpus (even the boot cpu) to prepare for kexec.

    Signed-off-by: Milton Miller
    Signed-off-by: R Sharada
    Signed-off-by: Paul Mackerras
    Signed-off-by: Linus Torvalds

    Paul Mackerras
     
  • This patch started as simply removing a few never-used macros from
    asm-ppc64/pgtable.h, then kind of grew. It now makes a bunch of
    cleanups to the ppc64 low-level header files (with corresponding
    changes to .c files where necessary) such as:
    - Abolishing never-used macros
    - Eliminating multiple #defines with the same purpose
    - Removing pointless macros (cases where just expanding the
    macro everywhere turns out clearer and more sensible)
    - Removing some cases where macros which could be defined in
    terms of each other weren't
    - Moving imalloc() related definitions from pgtable.h to their
    own header file (imalloc.h)
    - Re-arranging headers to group things more logically
    - Moving all VSID allocation related things to mmu.h, instead
    of being split between mmu.h and mmu_context.h
    - Removing some reserved space for flags from the PMD - we're
    not using it.
    - Fix some bugs which broke compile with STRICT_MM_TYPECHECKS.

    Signed-off-by: David Gibson
    Acked-by: Paul Mackerras
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Gibson
     

04 May, 2005

1 commit

  • New file - asm-generic/signal.h. Contains declarations of
    __sighandler_t, __sigrestore_t, SIG_DFL, SIG_IGN, SIG_ERR and default
    definitions of SIG_BLOCK, SIG_UNBLOCK and SIG_SETMASK.

    asm-*/signal.h switched to including it. The only exception is
    asm-parisc/signal.h that wants its own declaration of __sighandler_t;
    that one is left as-is.

    asm-ppc64/signal.h required one more thing - unlike everybody else it
    used __sigrestorer_t instead of usual __sigrestore_t. PPC64 switched to
    common spelling.

    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     

01 May, 2005

6 commits

  • The attached patch moves the IRQ-related SA_xxx flags (namely, SA_PROBE,
    SA_SAMPLE_RANDOM and SA_SHIRQ) from all the arch-specific headers to
    linux/signal.h. This looks like a left-over after the irq-handling code
    was consolidated. The code was moved to kernel/irq/*, but the flags are
    still left per-arch.

    Right now, adding a new IRQ flag to the arch-specific header, like this
    patch does:
    http://cvs.sourceforge.net/viewcvs.py/*checkout*/alsa/alsa-driver/utils/patches/pcsp-kernel-2.6.10-03.diff?rev=1.1
    no longer works, it breaks the compilation for all other arches, unless you
    add that flag to all the other arch-specific headers too. So I think such
    a clean-up makes sense.

    Signed-off-by: Stas Sergeev
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stas Sergeev
     
  • This patch eliminates all kernel BUGs, trims about 35k off the typical
    kernel, and makes the system slightly faster.

    Signed-off-by: Matt Mackall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matt Mackall
     
  • On our raw spinlocks, we currently have an attempt at the lock, and if we do
    not get it we enter a spin loop. This spinloop will likely continue for
    awhile, and we pridict likely.

    Shouldn't we predict that we will get out of the loop so our next instructions
    are already prefetched. Even when we miss because the lock is still held, it
    won't matter since we are waiting anyways.

    I did a couple quick benchmarks, but the results are inconclusive.

    16-way 690 running specjbb with original code
    # ./specjbb 3000 16 1 1 19 30 120
    ...
    Valid run, Score is 59282

    16-way 690 running specjbb with unlikely code
    # ./specjbb 3000 16 1 1 19 30 120
    ...
    Valid run, Score is 59541

    I saw a smaller increase on a JS20 (~1.6%)

    JS20 specjbb w/ original code
    # ./specjbb 400 2 1 1 19 30 120
    ...
    Valid run, Score is 20460

    JS20 specjbb w/ unlikely code
    # ./specjbb 400 2 1 1 19 30 120
    ...
    Valid run, Score is 20803

    Anton said:

    Mispredicting the spinlock busy loop also means we slow down the rate at which
    we do the loads which can be good for heavily contended locks.

    Note: There are some gcc issues with our default build and branch prediction,
    but a CONFIG_POWER4_ONLY build should emit them correctly. I'm working with
    Alan Modra on it now.

    Signed-off-by: Jake Moilanen
    Signed-off-by: Anton Blanchard
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jake Moilanen
     
  • We no longer use any ppcdebug stuff in a.out.h, so remove the define.

    Signed-off-by: Anton Blanchard
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Blanchard
     
  • There were a few issues with the ppc64 noexec support:

    The 64bit ABI has a non executable stack by default. At the moment 64bit apps
    require a PT_GNU_STACK section in order to have a non executable stack.

    Disable the read implies exec workaround on the 64bit ABI. The 64bit
    toolchain has never had problems with incorrect mmap permissions (the 32bit
    has, thats why we need to retain the workaround).

    With these fixes as well as a gcc fix from Alan Modra (that was recently
    committed) 64bit apps work as expected.

    Signed-off-by: Anton Blanchard
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Blanchard
     
  • This patch converts ppc64 to use the generic pgtable-nopud.h instead of the
    "fixup" header.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt