17 Jan, 2009

2 commits


16 Jan, 2009

20 commits

  • The PAPR says that the property for specifying the number of SLBs should
    be called "slb-size". We currently only look for "ibm,slb-size" because
    this is what firmware actually presents.

    This patch makes us look for the "slb-size" property as well and in
    preference to the "ibm,slb-size". This should future proof us if
    firmware changes to match PAPR.

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

    Michael Neuling
     
  • powerpc: is_hugepage_only_range() must account for both 4kB and 64kB slices

    The subpage_prot syscall fails on second and subsequent calls for a given
    region, because is_hugepage_only_range() is mis-identifying the 4 kB
    slices when the process has a 64 kB page size.

    Signed-off-by: Dave Kleikamp
    Signed-off-by: Benjamin Herrenschmidt

    Dave Kleikamp
     
  • Signed-off-by: Stephen Rothwell
    Acked-by: Geoff Levand
    Signed-off-by: Benjamin Herrenschmidt

    Stephen Rothwell
     
  • Fixes compiler warnings:

    arch/powerpc/platforms/ps3/mm.c:1205: warning: passing argument 2 of 'ps3_repository_read_mm_info' from incompatible pointer type
    arch/powerpc/platforms/ps3/mm.c:1205: warning: passing argument 3 of 'ps3_repository_read_mm_info' from incompatible pointer type

    Signed-off-by: Stephen Rothwell
    Acked-by: Geoff Levand
    Signed-off-by: Benjamin Herrenschmidt

    Stephen Rothwell
     
  • This fixes these compiler warning:

    arch/powerpc/platforms/ps3/interrupt.c:109: warning: passing argument 2 of 'clear_bit' from incompatible pointer type
    arch/powerpc/platforms/ps3/interrupt.c:130: warning: passing argument 2 of 'set_bit' from incompatible pointer type

    Signed-off-by: Stephen Rothwell
    Acked-by: Geoff Levand
    Signed-off-by: Benjamin Herrenschmidt

    Stephen Rothwell
     
  • We just fix up the reference parameters as the others are dealt with by
    arithmetic promotion rules and don't cause warnings.

    This removes warnings like this:

    arch/powerpc/platforms/ps3/interrupt.c:327: warning: passing argument 1 of 'lv1_construct_event_receive_port' from incompatible pointer type

    Also, these:

    drivers/ps3/ps3-vuart.c:462: warning: passing argument 4 of 'ps3_vuart_raw_read' from incompatible pointer type
    drivers/ps3/ps3-vuart.c:592: warning: passing argument 4 of 'ps3_vuart_raw_read' from incompatible pointer type

    Signed-off-by: Stephen Rothwell
    Acked-by: Geoff Levand
    Signed-off-by: Benjamin Herrenschmidt

    Stephen Rothwell
     
  • Push the dma_addr_t type usage all the way down to where the actual
    values are manipulated.

    Now that u64 is "unsigned long long", this removes warnings like:

    arch/powerpc/platforms/ps3/system-bus.c:532: warning: passing argument 4 of 'ps3_dma_map' from incompatible pointer type
    arch/powerpc/platforms/ps3/system-bus.c:649: warning: passing argument 4 of 'ps3_dma_map' from incompatible pointer type

    Signed-off-by: Stephen Rothwell
    Acked-by: Geoff Levand
    Signed-off-by: Benjamin Herrenschmidt

    Stephen Rothwell
     
  • Also silences this warning:

    arch/powerpc/platforms/ps3/setup.c:275: warning: initialization from incompatible pointer type

    Signed-off-by: Stephen Rothwell
    Acked-by: Geoff Levand
    Signed-off-by: Benjamin Herrenschmidt

    Stephen Rothwell
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
    sparc64: Fix UP build failure.

    Linus Torvalds
     
  • As it's just a single call to __get_free_page().

    Signed-off-by: Ivan Kokshaysky
    Cc: Richard Henderson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ivan Kokshaysky
     
  • Signed-off-by: Ivan Kokshaysky
    Cc: Richard Henderson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ivan Kokshaysky
     
  • Unlike other alphas, marvel doesn't have real PC-style CMOS clock hardware
    - RTC accesses are emulated via PAL calls. Unfortunately, for unknown
    reason these calls work only on CPU #0. So current implementation for
    arbitrary CPU makes CMOS_READ/WRITE to be executed on CPU #0 via IPI.
    However, for obvious reason this doesn't work with standard
    get/set_rtc_time() functions, where a bunch of CMOS accesses is done with
    disabled interrupts.

    Solved by making the IPI calls for entire get/set_rtc_time() functions,
    not for individual CMOS accesses. Which is also a lot more effective
    performance-wise.

    The patch is largely based on the code from Jay Estabrook.
    My changes:
    - tweak asm-generic/rtc.h by adding a couple of #defines to
    avoid a massive code duplication in arch/alpha/include/asm/rtc.h;
    - sys_marvel.c: fix get/set_rtc_time() return values (Jay's FIXMEs).

    NOTE: this fixes *only* LIB_RTC drivers. Legacy (CONFIG_RTC) driver
    wont't work on marvel. Actually I think that we should just disable
    CONFIG_RTC on alpha (maybe in 2.6.30?), like most other arches - AFAIK,
    all modern distributions use LIB_RTC anyway.

    Signed-off-by: Ivan Kokshaysky
    Cc: Richard Henderson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ivan Kokshaysky
     
  • Recently introduced generic pci_common_swizzle() relies on bus->self
    being NULL for the root PCI bus. But on nautilus bus->self points to
    the host bridge device, which is necessary as we do a root bus sizing
    on this system. As a result, pci_common_swizzle() loops infinitely.
    This worked until 2.6.29-rc1 because the alpha-specific swizzle routine
    checked for bus->parent == NULL (instead of bus->self).

    Fixed by clearing bus->self after bus sizing is done.

    Signed-off-by: Ivan Kokshaysky
    Cc: Richard Henderson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ivan Kokshaysky
     
  • init_srm_irq() deals with irq's #16 and above, but size of irq_desc
    array on nautilus and some other system types is 16. So gcc-4.3
    complains that "array subscript is above array bounds", even though
    this function is never called on those systems.

    This adds a check for NR_IRQS for detailed analysis
    of the problem.

    Signed-off-by: Ivan Kokshaysky
    Cc: Richard Henderson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ivan Kokshaysky
     
  • This reverts commit 58dab916dfb57328d50deb0aa9b3fc92efa248ff, which
    makes my Nehalem come to a nasty crawling almost-halt. It looks like it
    turns off caching of regular kernel RAM, with the understandable
    slowdown of a few orders of magnitude as a result.

    Acked-by: Ingo Molnar
    Cc: Yinghai Lu
    Cc: Peter Anvin
    Cc: Venkatesh Pallipadi
    Cc: Suresh Siddha
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • Create a platform specific version of dma_get_required_mask()
    for ia64 SN Altix. All SN Altix platforms support 64 bit DMA
    addressing regardless of the size of system memory.
    Create an ia64 machvec for dma_get_required_mask, with the
    SN version unconditionally returning DMA_64BIT_MASK.

    Signed-off-by: John Keller
    Signed-off-by: Tony Luck

    John Keller
     
  • CONFIG_SATA_VITESSE=y was not added to generic_defconfig when
    sn2_defconfig was removed. SGI Altix systems that use an IO10
    base IO card to drive the root device are unable to boot without
    the Vitesse controller.

    Signed-off-by: Brent Casavant
    Signed-off-by: Robin Holt
    Signed-off-by: Jes Sorensen
    Signed-off-by: Tony Luck

    Brent Casavant
     
  • Often the cause of kernel unaligned access warnings is not
    obvious from just the ip displayed in the warning. This adds
    the option via proc to dump the stack in addition to the warning.
    The default is off (just display the 1 line warning). To enable
    the stack to be shown: echo 1 > /proc/sys/kernel/unaligned-dump-stack

    Signed-off-by: Doug Chapman
    Signed-off-by: Tony Luck

    Doug Chapman
     
  • sched_clock() on ia64 is based on ar.itc, so is never
    completely synchronized between cpus. On some platforms
    (e.g. certain models of SGI Altix) it may be running at
    radically different frequencies.

    Based on a patch from Dimitri Sivanich which set this
    just for SN2 && GENERIC kernels ... it is needed for
    all ia64 machines.

    Signed-off-by: Tony Luck

    Tony Luck
     
  • This patch fixes the following errors caused by
    79741dd35713ff4f6fd0eafd59fa94e8a4ba922d which changed
    the prototypes of account_steal_time() and account_idle_time().

    > CC arch/ia64/xen/time.o
    > arch/ia64/xen/time.c: In function 'consider_steal_time':
    > arch/ia64/xen/time.c:132: warning: passing argument 1 of 'account_steal_time' makes integer from pointer without a cast
    > arch/ia64/xen/time.c:132: error: too many arguments to function 'account_steal_time'
    > arch/ia64/xen/time.c:133: warning: passing argument 1 of 'account_steal_time' makes integer from pointer without a cast
    > arch/ia64/xen/time.c:133: error: too many arguments to function 'account_steal_time'

    Cc: Martin Schwidefsky
    Signed-off-by: Isaku Yamahata
    Signed-off-by: Tony Luck

    Isaku Yamahata
     

15 Jan, 2009

4 commits

  • * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (29 commits)
    powerpc/83xx: Move mcu_mpc8349emitx driver out of drivers/i2c/chips/
    powerpc/83xx: Make serial ports work on MPC8315E-RDB w/ FSL U-Boots
    powerpc/e500mc: Doorbells need to be taken w/exceptions disabled
    powerpc: Enable PS3 options and QPACE in ppc64_defconfig
    powerpc/powermac: Fix occasional SMP boot failure
    powerpc/cacheinfo: Rename cache_dir per-cpu variable
    hvc_console: Use kzalloc() instead of kmalloc() + memset()
    hvc_console: Do not set low_latency when using interrupts
    hvc_console: Call free_irq() only if request_irq() was successful
    hvc_console: Change an mb() to smp_mb() and add some comments
    powerpc: Cleanup from l64 to ll64 change: drivers/net
    powerpc: Cleanup from l64 to ll64 change: drivers/char
    powerpc: Cleanup from l64 to ll64 change: arch code
    powerpc: Change u64/s64 to a long long integer type
    powerpc/kexec: Check crash_base for relocatable kernel
    powerpc: Make dummy section a valid note header
    Xilinx: SPI: updated driver for device tree
    drivers/of: Add the of_find_i2c_device_by_node function.
    powerpc/xsysace: add compatible string for non-ipcore instance
    powerpc/mpc52xx: remove dead code from GPIO driver
    ...

    Linus Torvalds
     
  • * 'syscalls' of git://git390.osdl.marist.edu/pub/scm/linux-2.6: (44 commits)
    [CVE-2009-0029] s390 specific system call wrappers
    [CVE-2009-0029] System call wrappers part 33
    [CVE-2009-0029] System call wrappers part 32
    [CVE-2009-0029] System call wrappers part 31
    [CVE-2009-0029] System call wrappers part 30
    [CVE-2009-0029] System call wrappers part 29
    [CVE-2009-0029] System call wrappers part 28
    [CVE-2009-0029] System call wrappers part 27
    [CVE-2009-0029] System call wrappers part 26
    [CVE-2009-0029] System call wrappers part 25
    [CVE-2009-0029] System call wrappers part 24
    [CVE-2009-0029] System call wrappers part 23
    [CVE-2009-0029] System call wrappers part 22
    [CVE-2009-0029] System call wrappers part 21
    [CVE-2009-0029] System call wrappers part 20
    [CVE-2009-0029] System call wrappers part 19
    [CVE-2009-0029] System call wrappers part 18
    [CVE-2009-0029] System call wrappers part 17
    [CVE-2009-0029] System call wrappers part 16
    [CVE-2009-0029] System call wrappers part 15
    ...

    Linus Torvalds
     
  • Add swab.h to kbuild.asm and remove the individual entries from
    each arch, mark as unifdef as some arches have some kernel-only
    bits inside.

    Signed-off-by: Harvey Harrison
    Signed-off-by: Linus Torvalds

    Harvey Harrison
     
  • Adjust the arch overrides to the new names as well.

    Signed-off-by: Harvey Harrison
    Signed-off-by: Linus Torvalds

    Harvey Harrison
     

14 Jan, 2009

14 commits

  • Signed-off-by: Heiko Carstens

    Heiko Carstens
     
  • Signed-off-by: Heiko Carstens

    Heiko Carstens
     
  • This enables the use of syscall wrappers to do proper sign extension
    for 64-bit programs.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Heiko Carstens

    Benjamin Herrenschmidt
     
  • From: Martin Schwidefsky

    By selecting HAVE_SYSCALL_WRAPPERS architectures can activate
    system call wrappers in order to sign extend system call arguments.

    All architectures where the ABI defines that the caller of a function
    has to perform sign extension probably need this.

    Reported-by: Christian Borntraeger
    Acked-by: Ralf Baechle
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Heiko Carstens

    Heiko Carstens
     
  • Remove __attribute__((weak)) from common code sys_pipe implemantation.
    IA64, ALPHA, SUPERH (32bit) and SPARC (32bit) have own implemantations
    with the same name. Just rename them.
    For sys_pipe2 there is no architecture specific implementation.

    Cc: Richard Henderson
    Cc: David S. Miller
    Cc: Paul Mundt
    Cc: Tony Luck
    Signed-off-by: Heiko Carstens

    Heiko Carstens
     
  • This way it matches the generic system call name convention.

    Signed-off-by: Heiko Carstens

    Heiko Carstens
     
  • sparc_ksyms_64.c includes asm/spinlock.h directly, which is
    a no-no.

    Even better, none of these exports are even necessary. All
    of these functions are inlines.

    Reported by Meelis Roos and Alexander Beregalov.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • This patch is used to help Jean Delvare to get rid of drivers/i2c/chips/
    directory. The new location suggested by Kumar Gala: as the driver is
    83xx specific it's placed into arch/powerpc/platforms/83xx/.

    Signed-off-by: Anton Vorontsov
    Acked-by: Jean Delvare
    Signed-off-by: Kumar Gala

    Anton Vorontsov
     
  • FSL U-Boots use /soc8315@e0000000 node to search and fixup serial
    nodes' clock-frequency properties. Though in upstream kernels we use
    new naming convention -- for IMMR address space dts files specify
    /immr@e0000000 nodes.

    This makes FSL U-Boots fail to fixup the clock frequencies, and that
    leads to serial ports misbehaviour. We can workaround the issue by
    filling the clock frequency values manually.

    p.s. For the same reason FSL U-Boots fail to fixup MAC addresses for
    ethernet nodes, so users should either change the .dts file locally
    or set MAC address via `ifconfig hw ether' command.

    Signed-off-by: Anton Vorontsov
    Signed-off-by: Kumar Gala

    Anton Vorontsov
     
  • We use Doorbell interrupts for IPIs and thus we need to make sure we aren't
    interrupted in the process of processing the IPI.

    Signed-off-by: Kumar Gala
    Acked-by: Dave Liu

    Kumar Gala
     
  • * 'x86-pat-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86 PAT: remove CPA WARN_ON for zero pte
    x86 PAT: return compatible mapping to remap_pfn_range callers
    x86 PAT: change track_pfn_vma_new to take pgprot_t pointer param
    x86 PAT: consolidate old memtype new memtype check into a function
    x86 PAT: remove PFNMAP type on track_pfn_vma_new() error

    Linus Torvalds
     
  • * master.kernel.org:/home/rmk/linux-2.6-arm:
    TWL4030: fix clk API usage
    [ARM] 5364/1: allow flush_ioremap_region() to be used from modules
    [ARM] w90x900: fix build errors and warnings
    [ARM] i.MX add missing include
    [ARM] i.MX: fix breakage from commit 278892736e99330195c8ae5861bcd9d791bbf19e
    [ARM] i.MX: remove LCDC controller register definitions from imx-regs.h

    Linus Torvalds
     
  • Impact: reduce scope of debug check - avoid warnings

    The logic to find whether identity map exists or not using
    high_memory or max_low_pfn_mapped/max_pfn_mapped are not complete
    as the memory withing the range may not be mapped if there is a
    unusable hole in e820.

    Specifically, on my test system I started seeing these warnings with
    tools like hwinfo, acpidump trying to map ACPI region.

    [ 27.400018] ------------[ cut here ]------------
    [ 27.400344] WARNING: at /home/venkip/src/linus/linux-2.6/arch/x86/mm/pageattr.c:560 __change_page_attr_set_clr+0xf3/0x8b8()
    [ 27.400821] Hardware name: X7DB8
    [ 27.401070] CPA: called for zero pte. vaddr = ffff8800cff6a000 cpa->vaddr = ffff8800cff6a000
    [ 27.401569] Modules linked in:
    [ 27.401882] Pid: 4913, comm: dmidecode Not tainted 2.6.28-05716-gfe0bdec #586
    [ 27.402141] Call Trace:
    [ 27.402488] [] warn_slowpath+0xd3/0x10f
    [ 27.402749] [] ? find_get_page+0xb3/0xc9
    [ 27.403028] [] ? find_get_page+0x0/0xc9
    [ 27.403333] [] __change_page_attr_set_clr+0xf3/0x8b8
    [ 27.403628] [] ? __purge_vmap_area_lazy+0x192/0x1a1
    [ 27.403883] [] ? __purge_vmap_area_lazy+0x4b/0x1a1
    [ 27.404172] [] ? vm_unmap_aliases+0x1ab/0x1bb
    [ 27.404512] [] ? vm_unmap_aliases+0x48/0x1bb
    [ 27.404766] [] change_page_attr_set_clr+0x13e/0x2e6
    [ 27.405026] [] ? _spin_unlock+0x26/0x2a
    [ 27.405292] [] ? reserve_memtype+0x19b/0x4e3
    [ 27.405590] [] _set_memory_wb+0x22/0x24
    [ 27.405844] [] ioremap_change_attr+0x26/0x28
    [ 27.406097] [] reserve_pfn_range+0x1a3/0x235
    [ 27.406427] [] track_pfn_vma_new+0x49/0xb3
    [ 27.406686] [] remap_pfn_range+0x94/0x32c
    [ 27.406940] [] ? phys_mem_access_prot_allowed+0xb5/0x1a8
    [ 27.407209] [] mmap_mem+0x75/0x9d
    [ 27.407523] [] mmap_region+0x2cf/0x53e
    [ 27.407776] [] do_mmap_pgoff+0x2a9/0x30d
    [ 27.408034] [] sys_mmap+0x92/0xce
    [ 27.408339] [] system_call_fastpath+0x16/0x1b
    [ 27.408614] ---[ end trace 4b16ad70c09a602d ]---
    [ 27.408871] dmidecode:4913 reserve_pfn_range ioremap_change_attr failed write-back for cff6a000-cff6b000

    This is wih track_pfn_vma_new trying to keep identity map in sync.
    The address cff6a000 is the ACPI region according to e820.

    [ 0.000000] BIOS-provided physical RAM map:
    [ 0.000000] BIOS-e820: 0000000000000000 - 000000000009c000 (usable)
    [ 0.000000] BIOS-e820: 000000000009c000 - 00000000000a0000 (reserved)
    [ 0.000000] BIOS-e820: 00000000000cc000 - 00000000000d0000 (reserved)
    [ 0.000000] BIOS-e820: 00000000000e4000 - 0000000000100000 (reserved)
    [ 0.000000] BIOS-e820: 0000000000100000 - 00000000cff60000 (usable)
    [ 0.000000] BIOS-e820: 00000000cff60000 - 00000000cff69000 (ACPI data)
    [ 0.000000] BIOS-e820: 00000000cff69000 - 00000000cff80000 (ACPI NVS)
    [ 0.000000] BIOS-e820: 00000000cff80000 - 00000000d0000000 (reserved)
    [ 0.000000] BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)
    [ 0.000000] BIOS-e820: 00000000fec00000 - 00000000fec10000 (reserved)
    [ 0.000000] BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
    [ 0.000000] BIOS-e820: 00000000ff000000 - 0000000100000000 (reserved)
    [ 0.000000] BIOS-e820: 0000000100000000 - 0000000230000000 (usable)

    And is not mapped as per init_memory_mapping.

    [ 0.000000] init_memory_mapping: 0000000000000000-00000000cff60000
    [ 0.000000] init_memory_mapping: 0000000100000000-0000000230000000

    We can add logic to check for this. But, there can also be other holes in
    identity map when we have 1GB of aligned reserved space in e820.

    This patch handles it by removing the WARN_ON and returning a specific
    error value (EFAULT) to indicate that the address does not have any
    identity mapping.

    The code that tries to keep identity map in sync can ignore
    this error, with other callers of cpa still getting error here.

    Signed-off-by: Venkatesh Pallipadi
    Signed-off-by: Suresh Siddha
    Signed-off-by: Ingo Molnar

    venkatesh.pallipadi@intel.com
     
  • Impact: avoid warning message, potentially solve 3D performance regression

    Change x86 PAT code to return compatible memtype if the exact memtype that
    was requested in remap_pfn_rage and friends is not available due to some
    conflict.

    This is done by returning the compatible type in pgprot parameter of
    track_pfn_vma_new(), and the caller uses that memtype for page table.

    Note that track_pfn_vma_copy() which is basically called during fork gets the
    prot from existing page table and should not have any conflict. Hence we use
    strict memtype check there and do not allow compatible memtypes.

    This patch fixes the bug reported here:

    http://marc.info/?l=linux-kernel&m=123108883716357&w=2

    Specifically the error message:

    X:5010 map pfn expected mapping type write-back for d0000000-d0101000,
    got write-combining

    Should go away.

    Reported-and-bisected-by: Kevin Winchester
    Signed-off-by: Venkatesh Pallipadi
    Signed-off-by: Suresh Siddha
    Signed-off-by: Ingo Molnar

    venkatesh.pallipadi@intel.com