12 Jan, 2012

1 commit

  • * 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci: (80 commits)
    x86/PCI: Expand the x86_msi_ops to have a restore MSIs.
    PCI: Increase resource array mask bit size in pcim_iomap_regions()
    PCI: DEVICE_COUNT_RESOURCE should be equal to PCI_NUM_RESOURCES
    PCI: pci_ids: add device ids for STA2X11 device (aka ConneXT)
    PNP: work around Dell 1536/1546 BIOS MMCONFIG bug that breaks USB
    x86/PCI: amd: factor out MMCONFIG discovery
    PCI: Enable ATS at the device state restore
    PCI: msi: fix imbalanced refcount of msi irq sysfs objects
    PCI: kconfig: English typo in pci/pcie/Kconfig
    PCI/PM/Runtime: make PCI traces quieter
    PCI: remove pci_create_bus()
    xtensa/PCI: convert to pci_scan_root_bus() for correct root bus resources
    x86/PCI: convert to pci_create_root_bus() and pci_scan_root_bus()
    x86/PCI: use pci_scan_bus() instead of pci_scan_bus_parented()
    x86/PCI: read Broadcom CNB20LE host bridge info before PCI scan
    sparc32, leon/PCI: convert to pci_scan_root_bus() for correct root bus resources
    sparc/PCI: convert to pci_create_root_bus()
    sh/PCI: convert to pci_scan_root_bus() for correct root bus resources
    powerpc/PCI: convert to pci_create_root_bus()
    powerpc/PCI: split PHB part out of pcibios_map_io_space()
    ...

    Fix up conflicts in drivers/pci/msi.c and include/linux/pci_regs.h due
    to the same patches being applied in other branches.

    Linus Torvalds
     

07 Jan, 2012

1 commit

  • The MSI restore function will become a function pointer in an
    x86_msi_ops struct. It defaults to the implementation in the
    io_apic.c and msi.c. We piggyback on the indirection mechanism
    introduced by "x86: Introduce x86_msi_ops".

    Cc: x86@kernel.org
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Cc: linux-pci@vger.kernel.org
    Signed-off-by: Konrad Rzeszutek Wilk
    Signed-off-by: Jesse Barnes

    Konrad Rzeszutek Wilk
     

06 Dec, 2011

1 commit

  • Add an x86_init vector for handling inconsistent core numbering.
    This is useful for multi-fabric platforms, such as Numascale
    NumaConnect.

    v2:
    - use struct x86_cpuinit_ops
    - provide default fall-back function to warn

    Signed-off-by: Daniel J Blueman
    Cc: Steffen Persvold
    Cc: Jesse Barnes
    Link: http://lkml.kernel.org/r/1323073238-32686-2-git-send-email-daniel@numascale-asia.com
    Signed-off-by: Ingo Molnar

    Daniel J Blueman
     

10 Nov, 2011

2 commits

  • Moorestown/Medfield platform does not have port 0x61 to report
    NMI status, nor does it have external NMI sources. The only NMI
    sources are from lapic, as results of perf counter overflow or
    IPI, e.g. NMI watchdog or spin lock debug.

    Reading port 0x61 on Moorestown will return 0xff which misled
    NMI handlers to false critical errors such memory parity error.
    The subsequent ioport access for NMI handling can also cause
    undefined behavior on Moorestown.

    This patch allows kernel process NMI due to watchdog or backrace
    dump without unnecessary hangs.

    Signed-off-by: Jacob Pan
    Signed-off-by: Ingo Molnar
    [hand applied]
    Signed-off-by: Alan Cox

    Jacob Pan
     
  • Some wall clock devices use MMIO based HW register, this new
    function will give them a chance to do some initialization work
    before their get/set_time service get called.

    Signed-off-by: Feng Tang
    Signed-off-by: Jacob Pan
    Signed-off-by: Alan Cox
    Signed-off-by: Dirk Brandewie
    Signed-off-by: Ingo Molnar

    Feng Tang
     

20 May, 2011

1 commit


13 May, 2011

1 commit

  • Introduce a new x86_init hook called pagetable_reserve that at the end
    of init_memory_mapping is used to reserve a range of memory addresses for
    the kernel pagetable pages we used and free the other ones.

    On native it just calls memblock_x86_reserve_range while on xen it also
    takes care of setting the spare memory previously allocated
    for kernel pagetable pages from RO to RW, so that it can be used for
    other purposes.

    A detailed explanation of the reason why this hook is needed follows.

    As a consequence of the commit:

    commit 4b239f458c229de044d6905c2b0f9fe16ed9e01e
    Author: Yinghai Lu
    Date: Fri Dec 17 16:58:28 2010 -0800

    x86-64, mm: Put early page table high

    at some point init_memory_mapping is going to reach the pagetable pages
    area and map those pages too (mapping them as normal memory that falls
    in the range of addresses passed to init_memory_mapping as argument).
    Some of those pages are already pagetable pages (they are in the range
    pgt_buf_start-pgt_buf_end) therefore they are going to be mapped RO and
    everything is fine.
    Some of these pages are not pagetable pages yet (they fall in the range
    pgt_buf_end-pgt_buf_top; for example the page at pgt_buf_end) so they
    are going to be mapped RW. When these pages become pagetable pages and
    are hooked into the pagetable, xen will find that the guest has already
    a RW mapping of them somewhere and fail the operation.
    The reason Xen requires pagetables to be RO is that the hypervisor needs
    to verify that the pagetables are valid before using them. The validation
    operations are called "pinning" (more details in arch/x86/xen/mmu.c).

    In order to fix the issue we mark all the pages in the entire range
    pgt_buf_start-pgt_buf_top as RO, however when the pagetable allocation
    is completed only the range pgt_buf_start-pgt_buf_end is reserved by
    init_memory_mapping. Hence the kernel is going to crash as soon as one
    of the pages in the range pgt_buf_end-pgt_buf_top is reused (b/c those
    ranges are RO).

    For this reason we need a hook to reserve the kernel pagetable pages we
    used and free the other ones so that they can be reused for other
    purposes.
    On native it just means calling memblock_x86_reserve_range, on Xen it
    also means marking RW the pagetable pages that we allocated before but
    that haven't been used before.

    Another way to fix this is without using the hook is by adding a 'if
    (xen_pv_domain)' in the 'init_memory_mapping' code and calling the Xen
    counterpart, but that is just nasty.

    Signed-off-by: Stefano Stabellini
    Acked-by: Yinghai Lu
    Acked-by: H. Peter Anvin
    Cc: Ingo Molnar
    Signed-off-by: Konrad Rzeszutek Wilk

    Stefano Stabellini
     

16 Mar, 2011

1 commit

  • The isci driver needs to retrieve its preboot OROM image which contains
    necessary runtime parameters like platform specific sas addresses and
    phy configuration. There is no ROM BAR associated with this area,
    instead we will need to scan legacy expansion ROM space.

    1/ Promote the probe_roms_32 implementation to x86-64
    2/ Add a facility to find and map an adapter rom by pci device (according to
    PCI Firmware Specification Revision 3.0)

    Signed-off-by: Dave Jiang
    LKML-Reference:
    Signed-off-by: Dan Williams
    Signed-off-by: H. Peter Anvin

    Dan Williams
     

15 Feb, 2011

1 commit

  • Some wall clock devices use MMIO based HW register, this new
    function will give them a chance to do some initialization work
    before their get/set_time service get called, which is usually
    in early kernel boot phase.

    Signed-off-by: Feng Tang
    Signed-off-by: Jacob Pan
    Signed-off-by: Alan Cox
    Signed-off-by: Thomas Gleixner

    Feng Tang
     

18 Oct, 2010

1 commit

  • Introduce an x86 specific indirect mechanism to setup MSIs.
    The MSI setup functions become function pointers in an x86_msi_ops
    struct, that defaults to the implementation in io_apic.c and msi.c.

    [v2: Use HAVE_DEFAULT_* knobs]
    Signed-off-by: Stefano Stabellini
    Reviewed-by: Konrad Rzeszutek Wilk
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Cc: x86@kernel.org
    Cc: Jesse Barnes

    Stefano Stabellini
     

08 Jul, 2010

2 commits

  • Some x86 platforms like Intel MID platforms don't have i8042 controllers,
    and i8042 driver's probe to some legacy IO ports may hang the MID
    processor. With this hook, i8042 driver can runtime check and skip the
    probe when the pretection fail which also saves some probe time

    [ hpa note: this is currently a compile-time check, which breaks the
    i386 allyesconfig build. This patch series thus does fix a regression. ]

    Signed-off-by: Feng Tang
    LKML-Reference:
    Acked-by: Dmitry Torokhov
    Signed-off-by: H. Peter Anvin

    Feng Tang
     
  • Export x86_platform to modules in preparation of using it for i8042
    discovery control.

    Signed-off-by: H. Peter Anvin
    LKML-Reference:
    Cc: Thomas Gleixner
    Cc: Feng Tang
    Cc: Dmitry Torokhov

    H. Peter Anvin
     

08 Mar, 2010

1 commit

  • * 'x86-mrst-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (30 commits)
    x86, mrst: Fix whitespace breakage in apb_timer.c
    x86, mrst: Fix APB timer per cpu clockevent
    x86, mrst: Remove X86_MRST dependency on PCI_IOAPIC
    x86, olpc: Use pci subarch init for OLPC
    x86, pci: Add arch_init to x86_init abstraction
    x86, mrst: Add Kconfig dependencies for Moorestown
    x86, pci: Exclude Moorestown PCI code if CONFIG_X86_MRST=n
    x86, numaq: Make CONFIG_X86_NUMAQ depend on CONFIG_PCI
    x86, pci: Add sanity check for PCI fixed bar probing
    x86, legacy_irq: Remove duplicate vector assigment
    x86, legacy_irq: Remove left over nr_legacy_irqs
    x86, mrst: Platform clock setup code
    x86, apbt: Moorestown APB system timer driver
    x86, mrst: Add vrtc platform data setup code
    x86, mrst: Add platform timer info parsing code
    x86, mrst: Fill in PCI functions in x86_init layer
    x86, mrst: Add dummy legacy pic to platform setup
    x86/PCI: Moorestown PCI support
    x86, ioapic: Add dummy ioapic functions
    x86, ioapic: Early enable ioapic for timer irq
    ...

    Fixed up semantic conflict of new clocksources due to commit
    17622339af25 ("clocksource: add argument to resume callback").

    Linus Torvalds
     

27 Feb, 2010

1 commit

  • Enable NMI on all cpus in UV system and add an NMI handler
    to dump_stack on each cpu.

    By default on x86 all the cpus except the boot cpu have NMI
    masked off. This patch enables NMI on all cpus in UV system
    and adds an NMI handler to dump_stack on each cpu. This
    way if a system hangs we can NMI the machine and get a
    backtrace from all the cpus.

    Version 2: Use x86_platform driver mechanism for nmi init, per
    Ingo's suggestion.

    Version 3: Clean up Ingo's nits.

    Signed-off-by: Russ Anderson
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Russ Anderson
     

20 Feb, 2010

3 commits

  • Platforms like Moorestown want to override the pcibios_fixup_irqs
    default function. Add it to x86_init.pci.

    Signed-off-by: Thomas Gleixner
    LKML-Reference:
    Acked-by: Jesse Barnes
    Signed-off-by: Jacob Pan
    Signed-off-by: H. Peter Anvin

    Thomas Gleixner
     
  • Moorestown wants to reuse pcibios_init_irq but needs to provide its
    own implementation of pci_enable_irq. After we distangled the init we
    can move the init_irq call to x86_init and remove the pci_enable_irq
    != NULL check in pcibios_init_irq. pci_enable_irq is compile time
    initialized to pirq_enable_irq and the special cases which override it
    (visws and acpi) set the x86_init function pointer to noop. That
    allows MSRT to override pci_enable_irq and otherwise run
    pcibios_init_irq unmodified.

    Signed-off-by: Thomas Gleixner
    LKML-Reference:
    Acked-by: Jesse Barnes
    Signed-off-by: Jacob Pan
    Signed-off-by: H. Peter Anvin

    Thomas Gleixner
     
  • The PCI initialization in pci_subsys_init() is a mess. pci_numaq_init,
    pci_acpi_init, pci_visws_init and pci_legacy_init are called and each
    implementation checks and eventually modifies the global variable
    pcibios_scanned.

    x86_init functions allow us to do this more elegant. The pci.init
    function pointer is preset to pci_legacy_init. numaq, acpi and visws
    can modify the pointer in their early setup functions. The functions
    return 0 when they did the full initialization including bus scan. A
    non zero return value indicates that pci_legacy_init needs to be
    called either because the selected function failed or wants the
    generic bus scan in pci_legacy_init to happen (e.g. visws).

    Signed-off-by: Thomas Gleixner
    LKML-Reference:
    Acked-by: Jesse Barnes
    Signed-off-by: Jacob Pan
    Signed-off-by: H. Peter Anvin

    Thomas Gleixner
     

09 Dec, 2009

1 commit

  • * 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (36 commits)
    x86, mm: Correct the implementation of is_untracked_pat_range()
    x86/pat: Trivial: don't create debugfs for memtype if pat is disabled
    x86, mtrr: Fix sorting of mtrr after subtracting
    x86: Move find_smp_config() earlier and avoid bootmem usage
    x86, platform: Change is_untracked_pat_range() to bool; cleanup init
    x86: Change is_ISA_range() into an inline function
    x86, mm: is_untracked_pat_range() takes a normal semiclosed range
    x86, mm: Call is_untracked_pat_range() rather than is_ISA_range()
    x86: UV SGI: Don't track GRU space in PAT
    x86: SGI UV: Fix BAU initialization
    x86, numa: Use near(er) online node instead of roundrobin for NUMA
    x86, numa, bootmem: Only free bootmem on NUMA failure path
    x86: Change crash kernel to reserve via reserve_early()
    x86: Eliminate redundant/contradicting cache line size config options
    x86: When cleaning MTRRs, do not fold WP into UC
    x86: remove "extern" from function prototypes in
    x86, mm: Report state of NX protections during boot
    x86, mm: Clean up and simplify NX enablement
    x86, pageattr: Make set_memory_(x|nx) aware of NX support
    x86, sleep: Always save the value of EFER
    ...

    Fix up conflicts (added both iommu_shutdown and is_untracked_pat_range)
    to 'struct x86_platform_ops') in
    arch/x86/include/asm/x86_init.h
    arch/x86/kernel/x86_init.c

    Linus Torvalds
     

24 Nov, 2009

2 commits

  • - Change is_untracked_pat_range() to return bool.
    - Clean up the initialization of is_untracked_pat_range() -- by default,
    we simply point it at is_ISA_range() directly.
    - Move is_untracked_pat_range to the end of struct x86_platform, since
    it is the newest field.

    Signed-off-by: H. Peter Anvin
    Acked-by: Thomas Gleixner
    Cc: Jack Steiner
    LKML-Reference:

    H. Peter Anvin
     
  • GRU space is always mapped as WB in the page table. There is
    no need to track the mappings in the PAT. This also eliminates
    the "freeing invalid memtype" messages when the GRU space is
    unmapped.

    Signed-off-by: Jack Steiner
    LKML-Reference:
    [ v2: fix build failure ]
    Signed-off-by: Ingo Molnar

    Jack Steiner
     

16 Nov, 2009

1 commit


15 Nov, 2009

1 commit


10 Nov, 2009

1 commit

  • We call the detections functions of all the IOMMUs then all
    their initialization functions. The latter is pointless since we
    don't detect multiple different IOMMUs. What we need to do is
    calling the initialization function of the detected IOMMU.

    This adds iommu_init hook to x86_init_ops so if an IOMMU
    detection function can set its initialization function to the
    hook.

    Signed-off-by: FUJITA Tomonori
    Cc: chrisw@sous-sol.org
    Cc: dwmw2@infradead.org
    Cc: joerg.roedel@amd.com
    Cc: muli@il.ibm.com
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    FUJITA Tomonori
     

08 Nov, 2009

1 commit

  • This patch cleans up pci_iommu_shutdown() a bit to use
    x86_platform (similar to how IA64 initializes an IOMMU driver).

    This adds iommu_shutdown() to x86_platform to avoid calling
    every IOMMUs' shutdown functions in pci_iommu_shutdown() in
    order. The IOMMU shutdown functions are platform specific (we
    don't have multiple different IOMMU hardware) so the current way
    is pointless.

    An IOMMU driver sets x86_platform.iommu_shutdown to the shutdown
    function if necessary.

    Signed-off-by: FUJITA Tomonori
    Cc: joerg.roedel@amd.com
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    FUJITA Tomonori
     

16 Sep, 2009

2 commits

  • get/set_wallclock() have already a set of platform dependent
    implementations (default, EFI, paravirt). MRST will add another
    variant.

    Moving them to platform ops simplifies the existing code and minimizes
    the effort to integrate new variants.

    Signed-off-by: Feng Tang
    LKML-Reference:
    Signed-off-by: Thomas Gleixner

    Feng Tang
     
  • init_IRQ() and x86_late_time_init() are missing __init annotations.

    The x86 platform ops variables are annotated, but the annotation needs
    to be put between the variable name and the "=" of the initializer.

    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     

31 Aug, 2009

11 commits


27 Aug, 2009

3 commits