04 Feb, 2013

1 commit

  • The ASM version of hash computation function was truncating the upper bit.
    Make the ASM version similar to hpt_hash function. Remove masking vsid bits.
    Without this patch, we observed hang during bootup due to not satisfying page
    fault request correctly. The fault handler used wrong hash values to update
    the HPTE. Hence we kept looping with page fault.

    hash_page(ea=000001003e260008, access=203, trap=300 ip=3fff91787134 dsisr 42000000
    The computed value of hash 000000000f22f390
    update: avpnv=4003e46054003e00, hash=000000000722f390, f=80000006, psize: 2 ...

    BenH: The over-masking has been there for ever but only hurts with the
    new 64T support introduced in 3.7

    Reported-by: Mike Qiu
    Signed-off-by: Aneesh Kumar K.V
    Tested-by: Mike Qiu
    Signed-off-by: Benjamin Herrenschmidt
    CC: [v3.7]

    Aneesh Kumar K.V
     

04 Jan, 2013

1 commit

  • CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
    markings need to be removed.

    This change removes the use of __devinit, __devexit_p, __devinitdata,
    __devinitconst, and __devexit from these drivers.

    Based on patches originally written by Bill Pemberton, but redone by me
    in order to handle some of the coding style issues better, by hand.

    Cc: Bill Pemberton
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

19 Dec, 2012

1 commit

  • Pull powerpc update from Benjamin Herrenschmidt:
    "The main highlight is probably some base POWER8 support. There's more
    to come such as transactional memory support but that will wait for
    the next one.

    Overall it's pretty quiet, or rather I've been pretty poor at picking
    things up from patchwork and reviewing them this time around and Kumar
    no better on the FSL side it seems..."

    * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (73 commits)
    powerpc+of: Rename and fix OF reconfig notifier error inject module
    powerpc: mpc5200: Add a3m071 board support
    powerpc/512x: don't compile any platform DIU code if the DIU is not enabled
    powerpc/mpc52xx: use module_platform_driver macro
    powerpc+of: Export of_reconfig_notifier_[register,unregister]
    powerpc/dma/raidengine: add raidengine device
    powerpc/iommu/fsl: Add PAMU bypass enable register to ccsr_guts struct
    powerpc/mpc85xx: Change spin table to cached memory
    powerpc/fsl-pci: Add PCI controller ATMU PM support
    powerpc/86xx: fsl_pcibios_fixup_bus requires CONFIG_PCI
    drivers/virt: the Freescale hypervisor driver doesn't need to check MSR[GS]
    powerpc/85xx: p1022ds: Use NULL instead of 0 for pointers
    powerpc: Disable relocation on exceptions when kexecing
    powerpc: Enable relocation on during exceptions at boot
    powerpc: Move get_longbusy_msecs into hvcall.h and remove duplicate function
    powerpc: Add wrappers to enable/disable relocation on exceptions
    powerpc: Add set_mode hcall
    powerpc: Setup relocation on exceptions for bare metal systems
    powerpc: Move initial mfspr LPCR out of __init_LPCR
    powerpc: Add relocation on exception vector handlers
    ...

    Linus Torvalds
     

14 Dec, 2012

1 commit

  • Merge misc VM changes from Andrew Morton:
    "The rest of most-of-MM. The other MM bits await a slab merge.

    This patch includes the addition of a huge zero_page. Not a
    performance boost but it an save large amounts of physical memory in
    some situations.

    Also a bunch of Fujitsu engineers are working on memory hotplug.
    Which, as it turns out, was badly broken. About half of their patches
    are included here; the remainder are 3.8 material."

    However, this merge disables CONFIG_MOVABLE_NODE, which was totally
    broken. We don't add new features with "default y", nor do we add
    Kconfig questions that are incomprehensible to most people without any
    help text. Does the feature even make sense without compaction or
    memory hotplug?

    * akpm: (54 commits)
    mm/bootmem.c: remove unused wrapper function reserve_bootmem_generic()
    mm/memory.c: remove unused code from do_wp_page()
    asm-generic, mm: pgtable: consolidate zero page helpers
    mm/hugetlb.c: fix warning on freeing hwpoisoned hugepage
    hwpoison, hugetlbfs: fix RSS-counter warning
    hwpoison, hugetlbfs: fix "bad pmd" warning in unmapping hwpoisoned hugepage
    mm: protect against concurrent vma expansion
    memcg: do not check for mm in __mem_cgroup_count_vm_event
    tmpfs: support SEEK_DATA and SEEK_HOLE (reprise)
    mm: provide more accurate estimation of pages occupied by memmap
    fs/buffer.c: remove redundant initialization in alloc_page_buffers()
    fs/buffer.c: do not inline exported function
    writeback: fix a typo in comment
    mm: introduce new field "managed_pages" to struct zone
    mm, oom: remove statically defined arch functions of same name
    mm, oom: remove redundant sleep in pagefault oom handler
    mm, oom: cleanup pagefault oom handler
    memory_hotplug: allow online/offline memory to result movable node
    numa: add CONFIG_MOVABLE_NODE for movable-dedicated node
    mm, memcg: avoid unnecessary function call when memcg is disabled
    ...

    Linus Torvalds
     

13 Dec, 2012

1 commit

  • out_of_memory() is a globally defined function to call the oom killer.
    x86, sh, and powerpc all use a function of the same name within file scope
    in their respective fault.c unnecessarily. Inline the functions into the
    pagefault handlers to clean the code up.

    Signed-off-by: David Rientjes
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Thomas Gleixner
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Paul Mundt
    Reviewed-by: Michal Hocko
    Reviewed-by: KAMEZAWA Hiroyuki
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     

19 Nov, 2012

1 commit


15 Nov, 2012

3 commits


09 Oct, 2012

1 commit

  • .fault now can retry. The retry can break state machine of .fault. In
    filemap_fault, if page is miss, ra->mmap_miss is increased. In the second
    try, since the page is in page cache now, ra->mmap_miss is decreased. And
    these are done in one fault, so we can't detect random mmap file access.

    Add a new flag to indicate .fault is tried once. In the second try, skip
    ra->mmap_miss decreasing. The filemap_fault state machine is ok with it.

    I only tested x86, didn't test other archs, but looks the change for other
    archs is obvious, but who knows :)

    Signed-off-by: Shaohua Li
    Cc: Rik van Riel
    Cc: Wu Fengguang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shaohua Li
     

06 Oct, 2012

1 commit

  • Pull powerpc updates from Benjamin Herrenschmidt:
    "Some highlights in addition to the usual batch of fixes:

    - 64TB address space support for 64-bit processes by Aneesh Kumar

    - Gavin Shan did a major cleanup & re-organization of our EEH support
    code (IBM fancy PCI error handling & recovery infrastructure) which
    paves the way for supporting different platform backends, along
    with some rework of the PCIe code for the PowerNV platform in order
    to remove home made resource allocations and instead use the
    generic code (which is possible after some small improvements to it
    done by Gavin).

    - Uprobes support by Ananth N Mavinakayanahalli

    - A pile of embedded updates from Freescale folks, including new SoC
    and board supports, more KVM stuff including preparing for 64-bit
    BookE KVM support, ePAPR 1.1 updates, etc..."

    Fixup trivial conflicts in drivers/scsi/ipr.c

    * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (146 commits)
    powerpc/iommu: Fix multiple issues with IOMMU pools code
    powerpc: Fix VMX fix for memcpy case
    driver/mtd:IFC NAND:Initialise internal SRAM before any write
    powerpc/fsl-pci: use 'Header Type' to identify PCIE mode
    powerpc/eeh: Don't release eeh_mutex in eeh_phb_pe_get
    powerpc: Remove tlb batching hack for nighthawk
    powerpc: Set paca->data_offset = 0 for boot cpu
    powerpc/perf: Sample only if SIAR-Valid bit is set in P7+
    powerpc/fsl-pci: fix warning when CONFIG_SWIOTLB is disabled
    powerpc/mpc85xx: Update interrupt handling for IFC controller
    powerpc/85xx: Enable USB support in p1023rds_defconfig
    powerpc/smp: Do not disable IPI interrupts during suspend
    powerpc/eeh: Fix crash on converting OF node to edev
    powerpc/eeh: Lock module while handling EEH event
    powerpc/kprobe: Don't emulate store when kprobe stwu r1
    powerpc/kprobe: Complete kprobe and migrate exception frame
    powerpc/kprobe: Introduce a new thread flag
    powerpc: Remove unused __get_user64() and __put_user64()
    powerpc/eeh: Global mutex to protect PE tree
    powerpc/eeh: Remove EEH PE for normal PCI hotplug
    ...

    Linus Torvalds
     

03 Oct, 2012

1 commit

  • Pull user namespace changes from Eric Biederman:
    "This is a mostly modest set of changes to enable basic user namespace
    support. This allows the code to code to compile with user namespaces
    enabled and removes the assumption there is only the initial user
    namespace. Everything is converted except for the most complex of the
    filesystems: autofs4, 9p, afs, ceph, cifs, coda, fuse, gfs2, ncpfs,
    nfs, ocfs2 and xfs as those patches need a bit more review.

    The strategy is to push kuid_t and kgid_t values are far down into
    subsystems and filesystems as reasonable. Leaving the make_kuid and
    from_kuid operations to happen at the edge of userspace, as the values
    come off the disk, and as the values come in from the network.
    Letting compile type incompatible compile errors (present when user
    namespaces are enabled) guide me to find the issues.

    The most tricky areas have been the places where we had an implicit
    union of uid and gid values and were storing them in an unsigned int.
    Those places were converted into explicit unions. I made certain to
    handle those places with simple trivial patches.

    Out of that work I discovered we have generic interfaces for storing
    quota by projid. I had never heard of the project identifiers before.
    Adding full user namespace support for project identifiers accounts
    for most of the code size growth in my git tree.

    Ultimately there will be work to relax privlige checks from
    "capable(FOO)" to "ns_capable(user_ns, FOO)" where it is safe allowing
    root in a user names to do those things that today we only forbid to
    non-root users because it will confuse suid root applications.

    While I was pushing kuid_t and kgid_t changes deep into the audit code
    I made a few other cleanups. I capitalized on the fact we process
    netlink messages in the context of the message sender. I removed
    usage of NETLINK_CRED, and started directly using current->tty.

    Some of these patches have also made it into maintainer trees, with no
    problems from identical code from different trees showing up in
    linux-next.

    After reading through all of this code I feel like I might be able to
    win a game of kernel trivial pursuit."

    Fix up some fairly trivial conflicts in netfilter uid/git logging code.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: (107 commits)
    userns: Convert the ufs filesystem to use kuid/kgid where appropriate
    userns: Convert the udf filesystem to use kuid/kgid where appropriate
    userns: Convert ubifs to use kuid/kgid
    userns: Convert squashfs to use kuid/kgid where appropriate
    userns: Convert reiserfs to use kuid and kgid where appropriate
    userns: Convert jfs to use kuid/kgid where appropriate
    userns: Convert jffs2 to use kuid and kgid where appropriate
    userns: Convert hpfs to use kuid and kgid where appropriate
    userns: Convert btrfs to use kuid/kgid where appropriate
    userns: Convert bfs to use kuid/kgid where appropriate
    userns: Convert affs to use kuid/kgid wherwe appropriate
    userns: On alpha modify linux_to_osf_stat to use convert from kuids and kgids
    userns: On ia64 deal with current_uid and current_gid being kuid and kgid
    userns: On ppc convert current_uid from a kuid before printing.
    userns: Convert s390 getting uid and gid system calls to use kuid and kgid
    userns: Convert s390 hypfs to use kuid and kgid where appropriate
    userns: Convert binder ipc to use kuids
    userns: Teach security_path_chown to take kuids and kgids
    userns: Add user namespace support to IMA
    userns: Convert EVM to deal with kuids and kgids in it's hmac computation
    ...

    Linus Torvalds
     

27 Sep, 2012

1 commit

  • In hpte_init_native() we call tlb_batching_enabled() to decide if we
    should setup ppc_md.flush_hash_range.

    tlb_batching_enabled() checks the _unflattened_ device tree, to see
    if we are running on a nighthawk.

    Since commit a223535 ("dont allow pSeries_probe to succeed without
    initialising MMU", Dec 2006), hpte_init_native() has been called from
    pSeries_probe() - at which point we have not yet unflattened the
    device tree.

    This means tlb_batching_enabled() will always return true, so the hack
    has effectively been disabled since Dec 2006. Ergo, I think we can
    drop it.

    Signed-off-by: Michael Ellerman
    Acked-by: Anton Blanchard
    Signed-off-by: Benjamin Herrenschmidt

    Michael Ellerman
     

21 Sep, 2012

1 commit


18 Sep, 2012

1 commit


17 Sep, 2012

9 commits


13 Sep, 2012

1 commit

  • Remove the dependency on PCI initialization for SWIOTLB initialization.
    So that PCI can be initialized at proper time.

    SWIOTLB is partly determined by PCI inbound/outbound map which is assigned
    in PCI initialization. But swiotlb_init() should be done at the stage of
    mem_init() which is much earlier than PCI initialization. So we reserve the
    memory for SWIOTLB first and free it if not necessary.

    All boards are converted to fit this change.

    Signed-off-by: Jia Hongtao
    Signed-off-by: Li Yang
    Acked-by: Tony Breeds
    Signed-off-by: Kumar Gala

    Jia Hongtao
     

10 Sep, 2012

1 commit

  • sys_subpage_prot() takes an unsigned long for 'addr' then does some stuff
    with it and the result is stored in a signed int, i, which is eventually
    used as the size parameter in a copy_from_user call. Update 'i' to be an
    unsigned long as well and since 'nw' is used in a size_t context which,
    depending on whether this is 32- or 64-bit may be unsigned int or unsigned
    long, switch that to a size_t and always be right.

    Finally, since we're in the neighbourhood, make the same changes to
    subpage_prot_clear().

    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Joe MacDonald
    Signed-off-by: Paul Gortmaker
    Acked-by: Paul Mackerras
    Signed-off-by: Benjamin Herrenschmidt

    Joe MacDonald
     

07 Sep, 2012

2 commits

  • There are some device-tree nodes, whose values are of type phys_addr_t.
    The phys_addr_t is variable sized based on the CONFIG_PHSY_T_64BIT.

    Change these to a fixed unsigned long long for consistency.

    This patch does the change only for memory_limit.

    The following is a list of such variables which need the change:

    1) kernel_end, crashk_size - in arch/powerpc/kernel/machine_kexec.c

    2) (struct resource *)crashk_res.start - We could export a local static
    variable from machine_kexec.c.

    Changing the above values might break the kexec-tools. So, I will
    fix kexec-tools first to handle the different sized values and then change
    the above.

    Suggested-by: Benjamin Herrenschmidt
    Signed-off-by: Suzuki K. Poulose
    Signed-off-by: Benjamin Herrenschmidt

    Suzuki Poulose
     
  • Brings in various bug fixes from 3.6-rcX

    Benjamin Herrenschmidt
     

05 Sep, 2012

7 commits

  • arch_update_cpu_topology() should only return 1 when the topology has
    actually changed, and should return 0 otherwise.

    This patch fixes a potential bug where rebuild_sched_domains() would
    reinitialize the sched domains even when the topology hasn't changed.

    Signed-off-by: Jesse Larrew
    Signed-off-by: Benjamin Herrenschmidt

    Jesse Larrew
     
  • Embedded.Hypervisor category defines GSPRG0..3 physical registers for guests.
    Avoid SPRG4-7 usage as scratch in host exception handlers, otherwise guest
    SPRG4-7 registers will be clobbered.
    For bolted TLB miss exception handlers, which is the version currently
    supported by KVM, use SPRN_SPRG_GEN_SCRATCH aka SPRG0 instead of
    SPRN_SPRG_TLB_SCRATCH aka SPRG6. Keep using TLB PACA slots to fit in one
    64-byte cache line.
    For critical exception handlers use SPRG3 instead of SPRG7. Provide a routine
    to store and restore user-visible SPRGs. This will be subsequently used
    to restore VDSO information in SPRG3. Add EX_R13 to paca slots to free up
    SPRG3 and change the critical exception epilog to use it.

    Signed-off-by: Mihai Caraman
    Signed-off-by: Benjamin Herrenschmidt

    Mihai Caraman
     
  • Hook DO_KVM macro into 64-bit booke for KVM integration. Extend interrupt
    handlers' parameter list with interrupt vector numbers to accomodate the macro.
    Only the bolted version of tlb miss handers is addressed now.

    Signed-off-by: Mihai Caraman
    Signed-off-by: Benjamin Herrenschmidt

    Mihai Caraman
     
  • Add thread_struct.trap_nr and use it to store the last exception
    the thread experienced. In this patch, we populate the field at
    various places where we force_sig_info() to the process.

    This is also used in uprobes to determine if the probed instruction
    caused an exception.

    Signed-off-by: Ananth N Mavinakayanahalli
    Signed-off-by: Benjamin Herrenschmidt

    Ananth N Mavinakayanahalli
     
  • It's empty now, apart from other includes.

    Fixup a few files that were getting things via this header.

    Signed-off-by: Michael Ellerman
    Signed-off-by: Benjamin Herrenschmidt

    Michael Ellerman
     
  • These days they are just __va() and __pa() respectively.

    Signed-off-by: Michael Ellerman
    Signed-off-by: Benjamin Herrenschmidt

    Michael Ellerman
     
  • abs_to_virt() is just a wrapper around __va(), call __va() directly.

    Signed-off-by: Michael Ellerman
    Signed-off-by: Benjamin Herrenschmidt

    Michael Ellerman
     

16 Aug, 2012

1 commit

  • When we map a page that wasn't icache cleared before, do so when first
    mapping it in KVM using the same information bits as the Linux mapping
    logic. That way we are 100% sure that any page we map does not have stale
    entries in the icache.

    Signed-off-by: Alexander Graf

    Alexander Graf
     

11 Jul, 2012

1 commit


10 Jul, 2012

3 commits