16 Jan, 2009

1 commit

  • 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
     

21 Oct, 2008

1 commit

  • This adds the ability to mmap legacy IO space to the legacy_io files
    in sysfs on platforms that support it. This will allow to clean up
    X to use this instead of /dev/mem for legacy IO accesses such as
    those performed by Int10.

    While at it I moved pci_create/remove_legacy_files() to pci-sysfs.c
    where I think they belong, thus making more things statis in there
    and cleaned up some spurrious prototypes in the ia64 pci.h file

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

    Benjamin Herrenschmidt
     

19 Aug, 2008

1 commit

  • The code walks all the acpi _CRS methods to see how many windows
    to allocate. It then scans them all again to insert_resource()
    for each *even if the first scan found that there were none*.

    Move the second scan inside the "if (windows)" clause.

    Signed-off-by: Tony Luck

    Luck, Tony
     

21 Apr, 2008

1 commit

  • Use the generic pci_enable_resources() instead of the arch-specific code.

    Unlike this arch-specific code, the generic version:
    - does not check for a NULL dev pointer
    - skips resources that have neither IORESOURCE_IO nor IORESOURCE_MEM set

    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Greg Kroah-Hartman

    Bjorn Helgaas
     

16 Apr, 2008

1 commit

  • http://bugzilla.kernel.org/show_bug.cgi?id=10124

    this change:

    commit 08f1c192c3c32797068bfe97738babb3295bbf42
    Author: Muli Ben-Yehuda
    Date: Sun Jul 22 00:23:39 2007 +0300

    x86-64: introduce struct pci_sysdata to facilitate sharing of ->sysdata

    This patch introduces struct pci_sysdata to x86 and x86-64, and
    converts the existing two users (NUMA, Calgary) to use it.

    This lays the groundwork for having other users of sysdata, such as
    the PCI domains work.

    The Calgary bits are tested, the NUMA bits just look ok.

    replaces pcibios_scan_root by pci_scan_bus_parented...

    but in pcibios_scan_root we have a check about scanned busses.

    Cc:
    Cc: Stian Jordet
    Cc: Len Brown
    Cc: Greg KH
    Cc: Ingo Molnar
    Cc: "Yinghai Lu"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    yakui.zhao@intel.com
     

07 Mar, 2008

2 commits


11 Feb, 2008

1 commit

  • We want to allow different implementations of pci_raw_ops for standard
    and extended config space on x86. Rather than clutter generic code with
    knowledge of this, we make pci_raw_ops private to x86 and use it to
    implement the new raw interface -- raw_pci_read() and raw_pci_write().

    Signed-off-by: Matthew Wilcox
    Signed-off-by: Linus Torvalds

    Matthew Wilcox
     

26 Jul, 2007

1 commit


12 Jul, 2007

1 commit

  • Example memory map (HP rx7640 with 'default' acpiconfig setting, VGA disabled):
    0x00000000 - 0x3FFFBFFF supports only WB (cacheable) access

    If a user attempts to perform an MMIO mmap (using the PCIIOC_MMAP_IS_MEM ioctl)
    to PCI config space (like mmap'ing and accessing memory at 0xA0000),
    we will MCA because the kernel will attempt to use a mapping with the UC
    attribute.

    So check the memory attribute in kern_mmap and the EFI memmap. If WC is
    requested, and WC or UC access is supported for the region, allow it.
    Otherwise, use the same attribute the kernel uses.

    Updates documentation and test cases as well.

    Signed-off-by: Alex Chiang
    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Tony Luck

    Alex Chiang
     

23 May, 2007

1 commit

  • Hiroyuki Kamezawa reported the problem that pci_acpi_scan_root() of
    ia64 might call kmalloc_node() with zero size.

    Currently ia64's pci_acpi_scan_root() assumes that _CRS method of root
    bridge has at least one resource window. But, the root bridges that
    has no resource window must be taken into account.

    Signed-off-by: Kenji Kaneshige
    Signed-off-by: Andrew Morton
    Signed-off-by: Tony Luck

    Kenji Kaneshige
     

09 May, 2007

1 commit


31 Mar, 2007

1 commit

  • Allow cacheable mmaps of legacy_mem if WB access is supported for the region.
    The "legacy_mem" file often contains a shadow option ROM, and some versions of
    X depend on this.

    Tim Yamin reported that this change fixes X on a Dell
    PowerEdge 3250.

    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Tony Luck

    Bjorn Helgaas
     

30 Mar, 2007

1 commit


29 Mar, 2007

1 commit

  • So I think the right solution is to simply make pci_enable_device just
    flip enable bits and move the rest of the work someplace else.

    However a thorough cleanup is a little extreme for this point in the
    release cycle, so I think a quick hack that makes the code not stomp the
    irq when msi irq's are enabled should be the first fix. Then we can
    later make the code not change the irqs at all.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: Ingo Molnar
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     

08 Dec, 2006

1 commit


07 Dec, 2006

1 commit

  • The recent change to convert the is_enabled flag in the PCI device to an
    atomic count broke the IA64 compilation.

    As pcibios_disable_device is only ever called if the reference count
    is zero, convert the if to a BUG_ON.

    Signed-off-by: Peter Chubb
    Signed-off-by: Tony Luck

    Peter Chubb
     

02 Dec, 2006

2 commits

  • First phase in introducing ACPI support to SN.
    In this phase, when running with an ACPI capable PROM,
    the DSDT will define the root busses and all SN nodes
    (SGIHUB, SGITIO). An ACPI bus driver will be registered
    for the node devices, with the acpi_pci_root_driver being
    used for the root busses. An ACPI vendor descriptor is
    now used to pass platform specific information for both
    nodes and busses, eliminating the need for the current
    SAL calls. Also, with ACPI support, SN fixup code is no longer
    needed to initiate the PCI bus scans, as the acpi_pci_root_driver
    does that.

    However, to maintain backward compatibility with non-ACPI capable
    PROMs, none of the current 'fixup' code can been deleted, though
    much restructuring has been done. For example, the bulk of the code
    in io_common.c is relocated code that is now common regardless
    of what PROM is running, while io_acpi_init.c and io_init.c contain
    routines specific to an ACPI or non ACPI capable PROM respectively.

    A new pci bus fixup platform vector has been created to provide
    a hook for invoking platform specific bus fixup from pcibios_fixup_bus().

    The size of io_space[] has been increased to support systems with
    large IO configurations.

    Signed-off-by: John Keller
    Signed-off-by: Greg Kroah-Hartman

    John Keller
     
  • The pci_generic_prep_mwi() code does everything that pcibios_prep_mwi()
    does on ia64. All we need to do is be sure that pci_cache_line_size
    is set appropriately, and we can delete pcibios_prep_mwi().

    Using SMP_CACHE_BYTES as the default was wrong on uniprocessor machines
    as it is only 8 bytes. The default in the generic code of L1_CACHE_BYTES
    is at least as good.

    Signed-off-by: Matthew Wilcox
    Acked-by: Jeff Garzik
    Signed-off-by: Greg Kroah-Hartman

    Matthew Wilcox
     

28 Oct, 2006

1 commit


04 Oct, 2006

1 commit

  • Currently we attempt to predict how many irqs we will be able to allocate with
    msi using pci_vector_resources and some complicated accounting, and then we
    only allow each device as many irqs as we think are available on average.

    Only the s2io driver even takes advantage of this feature all other drivers
    have a fixed number of irqs they need and bail if they can't get them.

    pci_vector_resources is inaccurate if anyone ever frees an irq. The whole
    implmentation is racy. The current irq limit policy does not appear to make
    sense with current drivers. So I have simplified things. We can revisit this
    we we need a more sophisticated policy.

    Signed-off-by: Eric W. Biederman
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Benjamin Herrenschmidt
    Cc: Rajesh Shah
    Cc: Andi Kleen
    Cc: "Protasevich, Natalie"
    Cc: "Luck, Tony"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     

27 Sep, 2006

1 commit


11 Jul, 2006

1 commit

  • Newer ARMs have a 40 bit physical address space, but mapping physical
    memory above 4G needs a special page table format which we (currently?) do
    not use for userspace mappings, so what happens instead is that mapping an
    address >= 4G will happily discard the upper bits and wrap.

    There is a valid_mmap_phys_addr_range() arch hook where we could check for
    >= 4G addresses and deny the mapping, but this hook takes an unsigned long
    address:

    static inline int valid_mmap_phys_addr_range(unsigned long addr, size_t size);

    And drivers/char/mem.c:mmap_mem() calls it like this:

    static int mmap_mem(struct file * file, struct vm_area_struct * vma)
    {
    size_t size = vma->vm_end - vma->vm_start;

    if (!valid_mmap_phys_addr_range(vma->vm_pgoff << PAGE_SHIFT, size))

    So that's not much help either.

    This patch makes the hook take a pfn instead of a phys address.

    Signed-off-by: Lennert Buytenhek
    Cc: Bjorn Helgaas
    Cc: "Luck, Tony"
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Lennert Buytenhek
     

01 Jul, 2006

1 commit


28 Jun, 2006

1 commit


26 Jun, 2006

1 commit

  • Remove VM_LOCKED before remap_pfn range from device drivers and get rid of
    VM_SHM.

    remap_pfn_range() already sets VM_IO. There is no need to set VM_SHM since
    it does nothing. VM_LOCKED is of no use since the remap_pfn_range does not
    place pages on the LRU. The pages are therefore never subject to swap
    anyways. Remove all the vm_flags settings before calling remap_pfn_range.

    After removing all the vm_flag settings no use of VM_SHM is left. Drop it.

    Signed-off-by: Christoph Lameter
    Acked-by: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     

24 Jun, 2006

1 commit


23 Jun, 2006

1 commit

  • Consolidate the various arch-specific implementations of pxm_to_node() and
    node_to_pxm() into a single generic version.

    Signed-off-by: Yasunori Goto
    Cc: "Luck, Tony"
    Cc: Andi Kleen
    Cc: Dave Hansen
    Cc: "Brown, Len"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yasunori Goto
     

09 May, 2006

1 commit

  • This closes a couple holes in our attribute aliasing avoidance scheme:

    - The current kernel fails mmaps of some /dev/mem MMIO regions because
    they don't appear in the EFI memory map. This keeps X from working
    on the Intel Tiger box.

    - The current kernel allows UC mmap of the 0-1MB region of
    /sys/.../legacy_mem even when the chipset doesn't support UC
    access. This causes an MCA when starting X on HP rx7620 and rx8620
    boxes in the default configuration.

    There's more detail in the Documentation/ia64/aliasing.txt file this
    adds, but the general idea is that if a region might be covered by
    a granule-sized kernel identity mapping, any access via /dev/mem or
    mmap must use the same attribute as the identity mapping.

    Otherwise, we fall back to using an attribute that is supported
    according to the EFI memory map, or to using UC if the EFI memory
    map doesn't mention the region.

    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Tony Luck

    Bjorn Helgaas
     

21 Apr, 2006

1 commit

  • This patch removes following compile time warnings:

    drivers/pci/pci-sysfs.c: In function `pci_read_legacy_io':
    drivers/pci/pci-sysfs.c:257: warning: implicit declaration of function `ia64_pci_legacy_read'
    drivers/pci/pci-sysfs.c: In function `pci_write_legacy_io':
    drivers/pci/pci-sysfs.c:280: warning: implicit declaration of function `ia64_pci_legacy_write'

    It also fixes wrong definition of ia64_pci_legacy_write (type of `bus' is not
    `pci_dev', but `pci_bus').

    Signed-Off-By: Satoru Takeuchi
    Signed-off-by: Tony Luck

    Satoru Takeuchi
     

28 Feb, 2006

1 commit

  • pcibios_setup() should return NULL if it handled a parameter. Since ia64
    handles no parameters, it should return the string that was passed in,
    not NULL. This brings ia64 into line with all other architectures that
    handle no parameters.

    Signed-off-by: Matthew Wilcox
    Signed-off-by: Tony Luck

    Matthew Wilcox
     

25 Jan, 2006

1 commit


17 Jan, 2006

1 commit


07 Jan, 2006

1 commit


04 Jan, 2006

1 commit

  • The function ia64_pci_legacy_write() returns 0 for everything
    except errors. This return value gets sent back to the user from
    pci_write_legacy_io(), making it look like every write fails. The trivial
    patch below copies the behavior of the SGI sn machvec and does what
    would be expected from something implementing a write() function.

    Signed-off-by: Alex Williamson
    Signed-off-by: Tony Luck

    Alex Williamson
     

10 Dec, 2005

2 commits

  • Implemented support for the EM64T and other x86_64
    processors. This essentially entails recognizing
    that these processors support non-aligned memory
    transfers. Previously, all 64-bit processors were assumed
    to lack hardware support for non-aligned transfers.

    Completed conversion of the Resource Manager to nearly
    full table-driven operation. Specifically, the resource
    conversion code (convert AML to internal format and the
    reverse) and the debug code to dump internal resource
    descriptors are fully table-driven, reducing code and data
    size and improving maintainability.

    The OSL interfaces for Acquire and Release Lock now use a
    64-bit flag word on 64-bit processors instead of a fixed
    32-bit word. (Alexey Starikovskiy)

    Implemented support within the resource conversion code
    for the Type-Specific byte within the various ACPI 3.0
    *WordSpace macros.

    Fixed some issues within the resource conversion code for
    the type-specific flags for both Memory and I/O address
    resource descriptors. For Memory, implemented support
    for the MTP and TTP flags. For I/O, split the TRS and TTP
    flags into two separate fields.

    Signed-off-by: Bob Moore
    Signed-off-by: Len Brown

    Bob Moore
     
  • Completed a major overhaul of the Resource Manager code -
    specifically, optimizations in the area of the AML/internal
    resource conversion code. The code has been optimized to
    simplify and eliminate duplicated code, CPU stack use has
    been decreased by optimizing function parameters and local
    variables, and naming conventions across the manager have
    been standardized for clarity and ease of maintenance (this
    includes function, parameter, variable, and struct/typedef
    names.)

    All Resource Manager dispatch and information tables have
    been moved to a single location for clarity and ease of
    maintenance. One new file was created, named "rsinfo.c".

    The ACPI return macros (return_ACPI_STATUS, etc.) have
    been modified to guarantee that the argument is
    not evaluated twice, making them less prone to macro
    side-effects. However, since there exists the possibility
    of additional stack use if a particular compiler cannot
    optimize them (such as in the debug generation case),
    the original macros are optionally available. Note that
    some invocations of the return_VALUE macro may now cause
    size mismatch warnings; the return_UINT8 and return_UINT32
    macros are provided to eliminate these. (From Randy Dunlap)

    Implemented a new mechanism to enable debug tracing for
    individual control methods. A new external interface,
    acpi_debug_trace(), is provided to enable this mechanism. The
    intent is to allow the host OS to easily enable and disable
    tracing for problematic control methods. This interface
    can be easily exposed to a user or debugger interface if
    desired. See the file psxface.c for details.

    acpi_ut_callocate() will now return a valid pointer if a
    length of zero is specified - a length of one is used
    and a warning is issued. This matches the behavior of
    acpi_ut_allocate().

    Signed-off-by: Bob Moore
    Signed-off-by: Len Brown

    Bob Moore
     

09 Nov, 2005

1 commit

  • ia64 translates normal loads and stores to special MMIO regions into I/O port
    accesses. Reserve these special MMIO regions in /proc/iomem.

    Sample /proc/iomem:
    f8100000000-f81003fffff : PCI Bus 0000:80 I/O Ports 00000000-00000fff
    f8100400000-f81007fffff : PCI Bus 0000:8e I/O Ports 00001000-00001fff
    f8100800000-f8100ffffff : PCI Bus 0000:9c I/O Ports 00002000-00003fff
    f8101000000-f81017fffff : PCI Bus 0000:aa I/O Ports 00004000-00005fff

    and corresponding /proc/ioports:
    00000000-00000fff : PCI Bus 0000:80
    00001000-00001fff : PCI Bus 0000:8e
    00002000-00003fff : PCI Bus 0000:9c
    00004000-00005fff : PCI Bus 0000:aa

    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Tony Luck

    Bjorn Helgaas
     

29 Oct, 2005

1 commit


24 Sep, 2005

1 commit

  • Address space resources for ACPI devices have a producer/consumer
    flag. All devices "consume" the indicated address space. If the
    resource is marked as a "producer", the range is also passed on
    to child devices.

    We currently ignore this flag when setting up MMIO and I/O port
    windows for PCI root bridges, so we could mistakenly interpret
    a "consumed-only" range, like CSR space for the device itself,
    as a window that is routed to children.

    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Tony Luck

    Bjorn Helgaas