1. 19 Jan, 2004 40 commits
    • Andrew Morton's avatar
      [PATCH] sn: Remove __ASSEMBLY__ tags from shubio.h · e547722d
      Andrew Morton authored
      From: Pat Gefre <pfg@sgi.com>
      
      Remove __ASSEMBLY__ tags from shubio.h
      e547722d
    • Andrew Morton's avatar
      [PATCH] sn: Some more minor clean up · a7e6ebde
      Andrew Morton authored
      From: Pat Gefre <pfg@sgi.com>
      
      Some more minor clean up
      a7e6ebde
    • Andrew Morton's avatar
      [PATCH] sn: A few small clean ups · a1027f20
      Andrew Morton authored
      From: Pat Gefre <pfg@sgi.com>
      
      A few small clean ups
      a1027f20
    • Andrew Morton's avatar
      [PATCH] sn: Moved code out of pciio and into its own file - snia_if.c and renamed the functions · 86d60daa
      Andrew Morton authored
      From: Pat Gefre <pfg@sgi.com>
      
      Moved code out of pciio and into its own file - snia_if.c and renamed the
      functions
      
      pciio clean up
      86d60daa
    • Andrew Morton's avatar
      [PATCH] sn: Some small bte code clean ups · b9984b78
      Andrew Morton authored
      From: Pat Gefre <pfg@sgi.com>
      
      Some small bte code clean ups
      b9984b78
    • Andrew Morton's avatar
      [PATCH] sn: hcl.c clean up for init failures and OOM · 050b3e58
      Andrew Morton authored
      From: Pat Gefre <pfg@sgi.com>
      
      hcl.c clean up for init failures and OOM
      050b3e58
    • Andrew Morton's avatar
      [PATCH] sn: Fix a couple of compiler warnings · 279203ab
      Andrew Morton authored
      From: Pat Gefre <pfg@sgi.com>
      
      Fix a couple of compiler warnings
      279203ab
    • Andrew Morton's avatar
      [PATCH] sn: code pruning - a couple of adds due to the clean up · 29277173
      Andrew Morton authored
      From: Pat Gefre <pfg@sgi.com>
      
      Mostly code pruning - a couple of adds due to the clean up
      29277173
    • Andrew Morton's avatar
      [PATCH] sn: irq clean up and update · e9b19b04
      Andrew Morton authored
      From: Pat Gefre <pfg@sgi.com>
      
      irq clean up and update
      e9b19b04
    • Andrew Morton's avatar
      [PATCH] sn: General xtalk.c clean up · e8577a89
      Andrew Morton authored
      From: Pat Gefre <pfg@sgi.com>
      
      General xtalk.c clean up
      e8577a89
    • Andrew Morton's avatar
      [PATCH] sn: shubio.c cleanup · 09bf9e5e
      Andrew Morton authored
      From: Pat Gefre <pfg@sgi.com>
      
      shubio.c cleanup
      09bf9e5e
    • Andrew Morton's avatar
      [PATCH] sn: General module.c clean up · de39d711
      Andrew Morton authored
      From: Pat Gefre <pfg@sgi.com>
      
      General module.c clean up
      de39d711
    • Andrew Morton's avatar
      [PATCH] sn: More klgraph.c clean up · a611e51e
      Andrew Morton authored
      From: Pat Gefre <pfg@sgi.com>
      
      More klgraph.c clean up
      Remove is_specified
      a611e51e
    • Andrew Morton's avatar
      [PATCH] sn: klgraph.c clean up · 2bc43c92
      Andrew Morton authored
      From: Pat Gefre <pfg@sgi.com>
      
      klgraph.c clean up
      2bc43c92
    • Andrew Morton's avatar
      [PATCH] sn: New code for Opus and CGbrick · 4e8caa8f
      Andrew Morton authored
      From: Pat Gefre <pfg@sgi.com>
      
      New code for Opus and CGbrick
      More minor clean up
      4e8caa8f
    • Andrew Morton's avatar
      [PATCH] sn: Fix the last patch - missed an IS_PIC_SOFT and needed the CG definition · 74459154
      Andrew Morton authored
      From: Pat Gefre <pfg@sgi.com>
      
      Fix the last patch - missed an IS_PIC_SOFT and needed the CG definition
      
      Header file clean up
      Added some __init definitions for functions that were init only
      Removed some 'porting' code - replaced it with linux calls/defintions
      Cleaned up some of the types we were using (ones that had been added)
      Fixed include files that had the wrong path in their ifdef'd names
      74459154
    • Andrew Morton's avatar
      [PATCH] sn: Fix the last patch - missed an IS_PIC_SOFT and needed the CG definition · deec0d22
      Andrew Morton authored
      From: Pat Gefre <pfg@sgi.com>
      
      Fix the last patch - missed an IS_PIC_SOFT and needed the CG definition
      deec0d22
    • Andrew Morton's avatar
      [PATCH] sn: Remove the bridge and xbridge code - everything not PIC · 7d8f7295
      Andrew Morton authored
      From: Pat Gefre <pfg@sgi.com>
      
      Remove the bridge and xbridge code - everything not PIC
      7d8f7295
    • Andrew Morton's avatar
      [PATCH] sn: General clean up of xbow.c · 36b94548
      Andrew Morton authored
      From: Pat Gefre <pfg@sgi.com>
      
      General clean up of xbow.c
      36b94548
    • Andrew Morton's avatar
      [PATCH] sn: machvec/pci.c clean up · 182e5622
      Andrew Morton authored
      From: Pat Gefre <pfg@sgi.com>
      
      machvec/pci.c clean up
      Other clean up related to above
      182e5622
    • Andrew Morton's avatar
      [PATCH] sn: General code clean up of sn/io/io.c · ef180d91
      Andrew Morton authored
      From: Pat Gefre <pfg@sgi.com>
      
      General code clean up of sn/io/io.c
      ef180d91
    • Andrew Morton's avatar
      [PATCH] sn: Delete invent.h · a40fe5e4
      Andrew Morton authored
      From: Pat Gefre <pfg@sgi.com>
      
      Delete invent.h
      Delete sgi_if.c
      Cleaned up some of the NEW/DEL calls
      a40fe5e4
    • Andrew Morton's avatar
      [PATCH] sn: Kill the arcs/*.h files · 31168afe
      Andrew Morton authored
      From: Pat Gefre <pfg@sgi.com>
      
      Kill the arcs/*.h files
      Some general clean up on klconfig.h
      31168afe
    • Andrew Morton's avatar
      [PATCH] sn: Kill nag.h · f0f1f768
      Andrew Morton authored
      From: Pat Gefre <pfg@sgi.com>
      
      Kill nag.h
      f0f1f768
    • Andrew Morton's avatar
      [PATCH] sn: serial update · 20a8305b
      Andrew Morton authored
      From: Pat Gefre <pfg@sgi.com>
            Jesse Barnes <jbarnes@tomahawk.engr.sgi.com>
      20a8305b
    • Andrew Morton's avatar
      [PATCH] sn: remove unused enum · 9c5a4934
      Andrew Morton authored
      From: Pat Gefre <pfg@sgi.com>
      
      remove unused enum
      9c5a4934
    • Andrew Morton's avatar
      [PATCH] sn: kill $Id$ · 43522ab7
      Andrew Morton authored
      From: Pat Gefre <pfg@sgi.com>
      
      kill $Id$
      43522ab7
    • Andrew Morton's avatar
      [PATCH] sn: kill big endian stuff · 8f9596e3
      Andrew Morton authored
      From: Pat Gefre <pfg@sgi.com>
      
      kill big endian stuff
      8f9596e3
    • Andrew Morton's avatar
      [PATCH] sn: namespace cleanup: ioerror_dump->sn_ioerror_dump · 6378da80
      Andrew Morton authored
      From: Pat Gefre <pfg@sgi.com>
      
      namespace cleanup: ioerror_dump->sn_ioerror_dump
      6378da80
    • Andrew Morton's avatar
      [PATCH] sn: copyright update · 78527eca
      Andrew Morton authored
      From: Pat Gefre <pfg@sgi.com>
      
      copyright update
      78527eca
    • Andrew Morton's avatar
      [PATCH] sn: Some hwgraph code clean up · 55f20bda
      Andrew Morton authored
      From: Pat Gefre <pfg@sgi.com>
      
      Some hwgraph code clean up
      55f20bda
    • Andrew Morton's avatar
      [PATCH] const vs. __attribute__((const)) confusion · 0697fbd3
      Andrew Morton authored
      From: "H. Peter Anvin" <hpa@zytor.com>
      
      Declaring a function to return a const scalar value is pretty meaningless. 
      These functions are really trying to say that they don't alter any external
      state.
      
      Fix that up by using __attribute__((const)), if the compiler supports that.
      0697fbd3
    • Andrew Morton's avatar
      [PATCH] s390: endless loop in follow_page. · 477702e9
      Andrew Morton authored
      From: Martin Schwidefsky <schwidefsky@de.ibm.com>
      
      Fix endless loop in get_user_pages() on s390.  It happens only on s/390
      because pte_dirty always returns 0.  For all other architectures this is an
      optimization.
      
      In the case of "write && !pte_dirty(pte)" follow_page() returns NULL.  On all
      architectures except s390 handle_pte_fault() will then create a pte with
      pte_dirty(pte)==1 because write_access==1.  In the following, second call to
      follow_page() all is fine.  With the physical dirty bit patch pte_dirty() is
      always 0 for s/390 because the dirty bit doesn't live in the pte.
      477702e9
    • Andrew Morton's avatar
      [PATCH] s390: superflous flush_tlb_range calls. · 6fefc8fa
      Andrew Morton authored
      From: Martin Schwidefsky <schwidefsky@de.ibm.com>
      
      while searching for a s390 tlb flush problem I noticed some superflous tlb
      flushes.  One in zeromap_page_range, one in remap_page_range, and another one
      in filemap_sync.  The patch just adds comments but I think these three
      flush_tlb_range calls can be removed.
      6fefc8fa
    • Andrew Morton's avatar
      [PATCH] rmap page refcounting simplification · 269fa3a4
      Andrew Morton authored
      From: Martin Schwidefsky <schwidefsky@de.ibm.com>
      
      Ok, its just the revert of the page_cache_release delta.
      269fa3a4
    • Andrew Morton's avatar
      [PATCH] s390: rmap optimization. · 83b41646
      Andrew Morton authored
      From: Martin Schwidefsky <schwidefsky@de.ibm.com>
      
      while working on my mm patch for s390 I played with rmap a bit, adding
      BUG statements and the like. While doing so I noticed some room for
      improvement in rmap. Its minor stuff but anyway... 
      
      The first observation is that the pte chain array doesn't have holes,
      meaning that from the pte_chain_idx() of the first array every slot of
      all following pte chain arrays are full. That is there can't be NULL
      pointers. The "if (!pte_paddr)" check in try_to_unmap() can be removed
      and if the loop in page_referenced() is started from pte_chain_idx(pc)
      then the "if (!pte_paddr)" in page_referenced() can be removed as well.
      
      The second observation is that the first pte array of a pte chain has
      at least one entry. Empty pte chain arrays are always freed immediatly
      after the last entry was removed. Because of that victim_i can be
      calculated in a simpler way. Instead of setting victim_i to -1 and then
      check in each loop iteration against -1 victim_i can just be set to
      the pte_chain_idx of the first pte chain array.
      83b41646
    • Andrew Morton's avatar
      [PATCH] s390: tlb flush race. · f8e8784a
      Andrew Morton authored
      From: Martin Schwidefsky <schwidefsky@de.ibm.com>
      
      I think I found a potential race in install_page/install_file_pte. The
      inline function zap_pte releases pages by calling page_remove_rmap and
      page_cache_release.  If this was the last user of a page it can get
      purged from the page cache and then get immediatly reused. But there
      might still be a tlb for this page on another cpu. The tlb is removed
      in the callers of zap_pte, install_page and install_file_pte, but this
      is too late. I admit that its a very unlikely race but never the less..
      
      I fixed this by using the new ptep_clear_flush function that is introduced
      with the tlb flush optimization patch for s/390.
      f8e8784a
    • Andrew Morton's avatar
      [PATCH] s390: physical dirty/referenced bits. · 465235cb
      Andrew Morton authored
      From: Martin Schwidefsky <schwidefsky@de.ibm.com>
      
      this is another s/390 related mm patch. It introduces the concept of
      physical dirty and referenced bits into the common mm code. I always
      had the nagging feeling that the pte functions for setting/clearing
      the dirty and referenced bits are not appropriate for s/390. It works
      but it is a bit of a hack. 
      After the wake of rmap it is now possible to put a much better solution
      into place. The idea is simple: since there are not dirty/referenced
      bits in the pte make these function nops on s/390 and add operations
      on the physical page to the appropriate places. For the referenced bit
      this is the page_referenced() function. For the dirty bit there are
      two relevant spots: in page_remove_rmap after the last user of the
      page removed its reverse mapping and in try_to_unmap after the last
      user was unmapped. There are two new functions to accomplish this:
      
       * page_test_and_clear_dirty: Test and clear the dirty bit of a
         physical page. This function is analog to ptep_test_and_clear_dirty
         but gets a struct page as argument instead of a pte_t pointer.
      
       * page_test_and_clear_young: Test and clear the referenced bit
         of a physical page. This function is analog to ptep_test_and_clear_young
         but gets a struct page as argument instead of a pte_t pointer.
      
      Its pretty straightforward and with it the s/390 mm makes much more
      sense. You'll need the tls flush optimization patch for the patch.
      Comments ?
      465235cb
    • Andrew Morton's avatar
      [PATCH] s390: tlb flush optimization. · 9177d562
      Andrew Morton authored
      From: Martin Schwidefsky <schwidefsky@de.ibm.com>
      
      On the s/390 architecture we still have the issue with tlb flushing and the
      ipte instruction.  We can optimize the tlb flushing a lot with some minor
      interface changes between the arch backend and the memory management core. 
      In the end the whole thing is about the Invalidate Page Table Entry (ipte)
      instruction.  The instruction sets the invalid bit in the pte and removes the
      tlb for the page on all cpus for the virtual to physical mapping of the page
      in a particular address space.  The nice thing is that only the tlb for this
      page gets removed, all the other tlbs stay valid.  The reason we can't use
      ipte to implement flush_tlb_page() is one of the requirements of the
      instruction: the pte that should get flushed needs to be *valid*.
      
      I'd like to add the following four functions to the mm interface:
      
        * ptep_establish: Establish a new mapping. This sets a pte entry to a
          page table and flushes the tlb of the old entry on all cpus if it
          exists. This is more or less what establish_pte in mm/memory.c does
          right now but without the update_mmu_cache call.
      
        * ptep_test_and_clear_and_flush_young. Do what ptep_test_and_clear_young
          does and flush the tlb.
      
        * ptep_test_and_clear_and_flush_dirty. Do what ptep_test_and_clear_dirty
          does and flush the tlb.
      
        * ptep_get_and_clear_and_flush: Do what ptep_get_and_clear does and
          flush the tlb.
      
      The s/390 specific functions in include/pgtable.h define their own optimized
      version of these four functions by use of the ipte.
      
      I avoid the definition of these function for every architecture I added them
      to include/asm-generic/pgtable.h.  Since i386/x86 and others don't include
      this header yet and define their own version of the functions found there I
      #ifdef'd all functions in include/asm-generic/pgtable.h to be able to pick
      the ones that are needed for each architecture (see patch for details).
      
      With the new functions in place it is easy to do the optimization, e.g.  the
      sequence
      
               ptep_get_and_clear(ptep);
               flush_tlb_page(vma, address);
      
      gets replace by
      
               ptep_get_and_clear_and_flush(vma, address, ptep);
      
      The old sequence still works but it is suboptimal on s/390.
      9177d562
    • Andrew Morton's avatar
      [PATCH] s390: 32 bit ioctl emulation fixes. · b72570f1
      Andrew Morton authored
      From: Martin Schwidefsky <schwidefsky@de.ibm.com>
      
      - audit all 32 bit pointer accesses and make them use compat_ioctl(),
        because of the necessary conversion on s390
      - introduce ULONG_IOCTL() which is used instead of COMPATIBLE_IOCTL()
        for all ioctls that have their argument encoded in 'arg' instead
        of the memory pointed to by arg. Same reason as above.
      - remove most #ifdefs in <linux/compat_ioctl.h>: They don't make
        any sense if the respective handlers in fs/compat_ioctl.c are
        not disabled as well and they are potentially harmful (the
        CONFIG_BLK_DEV_DM e.g. was insufficient).
      - comment out  COMPATIBLE_IOCTL(SIOCSIFBR) and
        COMPATIBLE_IOCTL(SIOCGIFBR), they appear to require a handler
      - implement copy_in_user for s390, as needed for many handlers in
        fs/compat_ioctl.c
      - get rid of all duplicate stuff in arch/s390/kernel/compat_ioctl.c
        that is also in fs/compat_ioctl.c
      b72570f1