12 May, 2008

1 commit

  • This fixes a few more miscellaneous compile problems with ARCH=ppc.

    1. Don't compile devres.c on ARCH=ppc, it doesn't have ioremap_flags.
    2. Include in setup.c for the __DO_IRQ_CANON definition.
    3. Include in residual.c for the
    definition of create_proc_read_entry.
    4. Fix xchg_ptr to be a static inline to eliminate a compiler warning.

    Signed-off-by: Paul Mackerras

    Paul Mackerras
     

29 Apr, 2008

1 commit


28 Apr, 2008

1 commit

  • s390 for one, cannot implement VM_MIXEDMAP with pfn_valid, due to their memory
    model (which is more dynamic than most). Instead, they had proposed to
    implement it with an additional path through vm_normal_page(), using a bit in
    the pte to determine whether or not the page should be refcounted:

    vm_normal_page()
    {
    ...
    if (unlikely(vma->vm_flags & (VM_PFNMAP|VM_MIXEDMAP))) {
    if (vma->vm_flags & VM_MIXEDMAP) {
    #ifdef s390
    if (!mixedmap_refcount_pte(pte))
    return NULL;
    #else
    if (!pfn_valid(pfn))
    return NULL;
    #endif
    goto out;
    }
    ...
    }

    This is fine, however if we are allowed to use a bit in the pte to determine
    refcountedness, we can use that to _completely_ replace all the vma based
    schemes. So instead of adding more cases to the already complex vma-based
    scheme, we can have a clearly seperate and simple pte-based scheme (and get
    slightly better code generation in the process):

    vm_normal_page()
    {
    #ifdef s390
    if (!mixedmap_refcount_pte(pte))
    return NULL;
    return pte_page(pte);
    #else
    ...
    #endif
    }

    And finally, we may rather make this concept usable by any architecture rather
    than making it s390 only, so implement a new type of pte state for this.
    Unfortunately the old vma based code must stay, because some architectures may
    not be able to spare pte bits. This makes vm_normal_page a little bit more
    ugly than we would like, but the 2 cases are clearly seperate.

    So introduce a pte_special pte state, and use it in mm/memory.c. It is
    currently a noop for all architectures, so this doesn't actually result in any
    compiled code changes to mm/memory.o.

    BTW:
    I haven't put vm_normal_page() into arch code as-per an earlier suggestion.
    The reason is that, regardless of where vm_normal_page is actually
    implemented, the *abstraction* is still exactly the same. Also, while it
    depends on whether the architecture has pte_special or not, that is the
    only two possible cases, and it really isn't an arch specific function --
    the role of the arch code should be to provide primitive functions and
    accessors with which to build the core code; pte_special does that. We do
    not want architectures to know or care about vm_normal_page itself, and
    we definitely don't want them being able to invent something new there
    out of sight of mm/ code. If we made vm_normal_page an arch function, then
    we have to make vm_insert_mixed (next patch) an arch function too. So I
    don't think moving it to arch code fundamentally improves any abstractions,
    while it does practically make the code more difficult to follow, for both
    mm and arch developers, and easier to misuse.

    [akpm@linux-foundation.org: build fix]
    Signed-off-by: Nick Piggin
    Acked-by: Carsten Otte
    Cc: Jared Hulbert
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     

24 Apr, 2008

2 commits


21 Apr, 2008

2 commits


19 Apr, 2008

1 commit


08 Mar, 2008

1 commit

  • This makes swap routines operate correctly on the ppc_8xx based machines.

    Recent kernel's size makes swap feature very important on low-memory platfor
    those are actually non-operable without it.

    Signed-off-by: Yuri Tikhonov
    Signed-off-by: Kumar Gala

    Yuri Tikhonov
     

14 Feb, 2008

1 commit


09 Feb, 2008

1 commit

  • Background: I've implemented 1K/2K page tables for s390. These sub-page
    page tables are required to properly support the s390 virtualization
    instruction with KVM. The SIE instruction requires that the page tables
    have 256 page table entries (pte) followed by 256 page status table entries
    (pgste). The pgstes are only required if the process is using the SIE
    instruction. The pgstes are updated by the hardware and by the hypervisor
    for a number of reasons, one of them is dirty and reference bit tracking.
    To avoid wasting memory the standard pte table allocation should return
    1K/2K (31/64 bit) and 2K/4K if the process is using SIE.

    Problem: Page size on s390 is 4K, page table size is 1K or 2K. That means
    the s390 version for pte_alloc_one cannot return a pointer to a struct
    page. Trouble is that with the CONFIG_HIGHPTE feature on x86 pte_alloc_one
    cannot return a pointer to a pte either, since that would require more than
    32 bit for the return value of pte_alloc_one (and the pte * would not be
    accessible since its not kmapped).

    Solution: The only solution I found to this dilemma is a new typedef: a
    pgtable_t. For s390 pgtable_t will be a (pte *) - to be introduced with a
    later patch. For everybody else it will be a (struct page *). The
    additional problem with the initialization of the ptl lock and the
    NR_PAGETABLE accounting is solved with a constructor pgtable_page_ctor and
    a destructor pgtable_page_dtor. The page table allocation and free
    functions need to call these two whenever a page table page is allocated or
    freed. pmd_populate will get a pgtable_t instead of a struct page pointer.
    To get the pgtable_t back from a pmd entry that has been installed with
    pmd_populate a new function pmd_pgtable is added. It replaces the pmd_page
    call in free_pte_range and apply_to_pte_range.

    Signed-off-by: Martin Schwidefsky
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Martin Schwidefsky
     

08 Feb, 2008

1 commit

  • Add a local processor version of cmpxchg for ppc.

    Implements __cmpxchg_u32_local and uses it for 32 bits cmpxchg_local.
    It uses the non NMI safe cmpxchg_local_generic for 1, 2 and 8 bytes
    cmpxchg_local.

    Signed-off-by: Gunnar Larisch
    Signed-off-by: Mathieu Desnoyers
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Kumar Gala
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Gunnar Larisch
     

06 Feb, 2008

1 commit

  • (with Martin Schwidefsky )

    The pgd/pud/pmd/pte page table allocation functions get a mm_struct pointer as
    first argument. The free functions do not get the mm_struct argument. This
    is 1) asymmetrical and 2) to do mm related page table allocations the mm
    argument is needed on the free function as well.

    [kamalesh@linux.vnet.ibm.com: i386 fix]
    [akpm@linux-foundation.org: coding-syle fixes]
    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Martin Schwidefsky
    Cc:
    Signed-off-by: Kamalesh Babulal
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt
     

28 Jan, 2008

4 commits


22 Jan, 2008

1 commit


24 Dec, 2007

2 commits

  • Right now TLB entry 0 ist used as UART0 mapping for the early debug
    output (via CONFIG_SERIAL_TEXT_DEBUG). This causes problems when many
    TLB's get used upon Linux bootup (e.g. while PCIe scanning behind
    bridges and/or switches on 440SPe platforms). This will overwrite the
    TLB 0 entry and further debug output's may crash/hang the system.

    This patch moves the early debug UART0 TLB entry from 0 to 62 as done
    in arch/powerpc. This way it is in the "pinned" area and will not get
    overwritten. Also the arch/ppc/mm/44x_mmu.c code is now synced with the
    newer code from arch/powerpc.

    Signed-off-by: Stefan Roese
    Signed-off-by: Josh Boyer

    Stefan Roese
     
  • This adds a cputable function pointer for the CPU-side machine
    check handling. The semantic is still the same as the old one,
    the one in ppc_md. overrides the one in cputable, though
    ultimately we'll want to change that so the CPU gets first.

    This removes CONFIG_440A which was a problem for multiplatform
    kernels and instead fixes up the IVOR at runtime from a setup_cpu
    function. The "A" version of the machine check also tweaks the
    regs->trap value to differenciate the 2 versions at the C level.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Josh Boyer

    Benjamin Herrenschmidt
     

20 Dec, 2007

1 commit


23 Oct, 2007

1 commit

  • Commit 4f9a58d75bfe82ab2b8ba5b8506dfb190a267834 ("increase
    AT_VECTOR_SIZE to terminate saved_auxv properly") changes the size of
    AT_VECTOR_SIZE from hard coded '44' to a calculation based on the value
    of AT_VECTOR_SIZE_ARCH and AT_VECTOR_SIZE_BASE.

    The change works for arch/powerpc, but it breaks arch/ppc because the
    needed AT_VECTOR_SIZE_ARCH is not present in include/asm-ppc/system.h
    and a default value of 0 is used instead. This results in
    AT_VECTOR_SIZE being too small and it causes a kernel crash on loading
    init.

    Signed-off-by: Grant Likely
    Signed-off-by: Linus Torvalds

    Grant Likely
     

20 Oct, 2007

1 commit

  • remove asm/bitops.h includes

    including asm/bitops directly may cause compile errors. don't include it
    and include linux/bitops instead. next patch will deny including asm header
    directly.

    Cc: Adrian Bunk
    Signed-off-by: Jiri Slaby
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     

19 Oct, 2007

1 commit

  • To be consistent with the use of attributes in the rest of the kernel
    replace all use of __attribute_pure__ with __pure and delete the definition
    of __attribute_pure__.

    Signed-off-by: Ralf Baechle
    Cc: Russell King
    Acked-by: Mauro Carvalho Chehab
    Cc: Bryan Wu
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ralf Baechle
     

18 Oct, 2007

1 commit

  • * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (24 commits)
    [POWERPC] Fix vmemmap warning in init_64.c
    [POWERPC] Fix 64 bits vDSO DWARF info for CR register
    [POWERPC] Add 1TB workaround for PA6T
    [POWERPC] Enable NO_HZ and high res timers for pseries and ppc64 configs
    [POWERPC] Quieten cache information at boot
    [POWERPC] Quieten clockevent printk
    [POWERPC] Enable SLUB in *_defconfig
    [POWERPC] Fix 1TB segment detection
    [POWERPC] Fix iSeries_hpte_insert prototype
    [POWERPC] Fix copyright symbol
    [POWERPC] ibmebus: Move to of_device and of_platform_driver, match eHCA and eHEA drivers
    [POWERPC] ibmebus: Add device creation and bus probing based on of_device
    [POWERPC] ibmebus: Remove bus match/probe/remove functions
    [POWERPC] Move of_device allocation into of_device.[ch]
    [POWERPC] mpc52xx: device tree changes for FEC and MDIO
    [POWERPC] bestcomm: GenBD task support
    [POWERPC] bestcomm: FEC task support
    [POWERPC] bestcomm: ATA task support
    [POWERPC] bestcomm: core bestcomm support for Freescale MPC5200
    [POWERPC] mpc52xx: Update mpc52xx_psc structure with B revision changes
    ...

    Linus Torvalds
     

17 Oct, 2007

4 commits

  • dma_cache_(wback|inv|wback_inv) were the earliest attempt on a generalized
    cache managment API for I/O purposes. Originally it was basically the raw
    MIPS low level cache API exported to the entire world. The API has
    suffered from a lack of documentation, was not very widely used unlike it's
    more modern brothers and can easily be replaced by dma_cache_sync. So
    remove it rsp. turn the surviving bits back into an arch private API, as
    discussed on linux-arch.

    Signed-off-by: Ralf Baechle
    Acked-by: Paul Mundt
    Acked-by: Paul Mackerras
    Acked-by: David S. Miller
    Acked-by: Kyle McMartin
    Acked-by: Haavard Skinnemoen
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ralf Baechle
     
  • AUTO_DMA and FLOPPY_MOTOR_MASK in include/asm-*/floppy.h are dead symbols -
    remove them.

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

    Jan Beulich
     
  • The softlockup detector would like to use get_irq_regs(), so generalize the
    availability on every Linux architecture.

    (It is fine for an architecture to always return NULL to get_irq_regs(),
    which it does by default.)

    Signed-off-by: Ingo Molnar
    Cc: Ian Molton
    Cc: Kumar Gala
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Mikael Starvik
    Cc: Miles Bader
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • On the mpc5200b the ccr register is 32 bits wide while on the
    mpc5200 it's only 16 bits. It's up to the driver to use the
    correct format depending on the chip it's running on.

    The 5200b also offers some more registers & status in AC97
    mode. Again, if not running on a 5200b the driver should not
    use those.

    Signed-off-by: Sylvain Munaut
    Signed-off-by: Grant Likely

    Sylvain Munaut
     

22 Sep, 2007

1 commit


17 Sep, 2007

1 commit

  • Current status of APUS:
    - arch/powerpc/: removed in 2.6.23
    - arch/ppc/: marked BROKEN since 2 years

    This therefore removes the remaining parts of APUS support from
    arch/ppc, include/asm-ppc, arch/powerpc and include/asm-powerpc.

    Signed-off-by: Adrian Bunk
    Signed-off-by: Paul Mackerras

    Adrian Bunk
     

14 Sep, 2007

1 commit


23 Aug, 2007

1 commit


17 Aug, 2007

1 commit


25 Jul, 2007

2 commits


22 Jul, 2007

1 commit

  • The recent signal rework broke ARCH=ppc builds with the following
    error:

    CC arch/powerpc/kernel/signal.o
    arch/powerpc/kernel/signal.c: In function ‘do_signal’:
    arch/powerpc/kernel/signal.c:142: error: implicit declaration of
    function ‘set_dabr’
    make[1]: *** [arch/powerpc/kernel/signal.o] Error 1

    This fixes it by including a function prototype in asm-ppc/system.h.

    Acked-by: Kumar Gala
    Signed-off-by: Josh Boyer
    Signed-off-by: Paul Mackerras

    Josh Boyer
     

20 Jul, 2007

1 commit


18 Jul, 2007

1 commit


17 Jul, 2007

1 commit

  • Kill pte_rdprotect(), pte_exprotect(), pte_mkread(), pte_mkexec(), pte_read(),
    pte_exec(), and pte_user() except where arch-specific code is making use of
    them.

    Signed-off-by: Jan Beulich
    Cc: Andi Kleen
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Beulich