x86 fixes
Subsystems (3)
Linus,
Please pull the latest x86-fixes-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-fixes-for-linus
Thanks,
Ingo
------------------>
Andreas Herrmann (1):
x86: fixup config space size of CPU functions for AMD family 11h
Eric Dumazet (1):
oprofile: fix an overflow in ppro code
Ian Campbell (1):
xen: pin correct PGD on suspend
Joerg Roedel (1):
x86: always define DECLARE_PCI_UNMAP* macros
Julia Lawall (1):
arch/x86/kernel/pci-calgary_64.c: change simple_strtol to simple_strtoul
Markus Metzger (4):
x86, bts: exclude ds.c from build when disabled x86, bts: turn macro into static inline function x86, pebs: fix PEBS record size configuration x86, bts: fix wrmsr and spinlock over kmalloc
Rakib Mullick (2):
x86: fix __cpuinit/__init tangle in init_thread_xstate()
x86: fixing __cpuinit/__init tangle, xsave_cntxt_init()
Steven Rostedt (1):
x86: use limited register constraint for setnz
Thomas Gleixner (1):
x86: revert irq number limitation
arch/x86/boot/tty.c | 2 +- arch/x86/include/asm/ds.h | 6 ++- arch/x86/include/asm/pci_64.h | 14 ------ arch/x86/kernel/Makefile | 2 +- arch/x86/kernel/ds.c | 88 ++++++++++++++++++++----------------- arch/x86/kernel/i387.c | 2 +- arch/x86/kernel/io_apic.c | 22 +--------- arch/x86/kernel/pci-calgary_64.c | 2 +- arch/x86/kernel/xsave.c | 2 +- arch/x86/oprofile/op_model_ppro.c | 2 +- arch/x86/pci/fixup.c | 25 ++++++----- arch/x86/xen/mmu.c | 21 ++++++--- 12 files changed, 87 insertions(+), 101 deletions(-)
arch/x86/boot/tty.c +1 -1
@@ -74,7 +74,7 @@ static int kbd_pending(void) {u8 pending; asmvolatile ("int $0x16; setnz %0" - :"=rm" (pending) + :"=qm" (pending) :"a" (0x0100 ));return pending; }
arch/x86/include/asm/ds.h +4 -2
@@ -23,12 +23,13 @@#ifndef _ASM_X86_DS_H#define _ASM_X86_DS_H -#ifdef CONFIG_X86_DS #include <linux/types.h> #include <linux/init.h> +#ifdef CONFIG_X86_DS +struct task_struct ;/*
@@ -232,7 +233,8 @@ extern void ds_free(struct ds_context *context);#else /* CONFIG_X86_DS */ -#define ds_init_intel (config) do {} while (0) +struct cpuinfo_x86 ; +static inline void __cpuinit ds_init_intel (struct cpuinfo_x86 *ignored) {}#endif /* CONFIG_X86_DS */ #endif /* _ASM_X86_DS_H */
arch/x86/include/asm/pci_64.h +0 -14
@@ -34,8 +34,6 @@ extern void pci_iommu_alloc(void);*/ #define PCI_DMA_BUS_IS_PHYS (dma_ops->is_phys) -#if defined(CONFIG_GART_IOMMU ) || defined(CONFIG_CALGARY_IOMMU ) -#define DECLARE_PCI_UNMAP_ADDR (ADDR_NAME ) \ dma_addr_t ADDR_NAME;#define DECLARE_PCI_UNMAP_LEN (LEN_NAME ) \
@@ -49,18 +47,6 @@ extern void pci_iommu_alloc(void);#define pci_unmap_len_set (PTR ,LEN_NAME ,VAL ) \ (((PTR)->LEN_NAME) = (VAL)) -#else -/* No IOMMU */ - -#define DECLARE_PCI_UNMAP_ADDR (ADDR_NAME ) -#define DECLARE_PCI_UNMAP_LEN (LEN_NAME ) -#define pci_unmap_addr (PTR ,ADDR_NAME ) (0) -#define pci_unmap_addr_set (PTR ,ADDR_NAME ,VAL ) do { } while (0) -#define pci_unmap_len (PTR ,LEN_NAME ) (0) -#define pci_unmap_len_set (PTR ,LEN_NAME ,VAL ) do { } while (0) - -#endif -#endif /* __KERNEL__ */ #endif /* _ASM_X86_PCI_64_H */
arch/x86/kernel/Makefile +1 -1
@@ -41,7 +41,7 @@ obj-$(CONFIG_X86_TRAMPOLINE) += trampoline.o obj-y += process.o obj-y += i387.o xsave.o obj-y += ptrace.o -obj-y += ds.o +obj-$(CONFIG_X86_DS) += ds.o obj-$(CONFIG_X86_32) += tls.o obj-$(CONFIG_IA32_EMULATION) += tls.o obj-y += step.o
arch/x86/kernel/ds.c +48 -40
201 lines not on this page · raw message
arch/x86/kernel/i387.c +1 -1
@@ -58,7 +58,7 @@ void __cpuinit mxcsr_feature_mask_init(void)stts (); } -void __init init_thread_xstate (void ) +void __cpuinit init_thread_xstate (void ) {if (!HAVE_HWFP ) { xstate_size =sizeof (struct i387_soft_struct );
arch/x86/kernel/io_apic.c +1 -21
@@ -3608,27 +3608,7 @@ int __init io_apic_get_redir_entries (int ioapic)int __init probe_nr_irqs (void ) { -int idx; -int nr =0 ; -#ifndef CONFIG_XEN -int nr_min =32 ; -#else -int nr_min =NR_IRQS ; -#endif - -for (idx =0 ; idx < nr_ioapics; idx++) - nr +=io_apic_get_redir_entries (idx) +1 ; - -/* double it for hotplug and msi and nmi */ - nr <<=1 ; - -/* something wrong ? */ -if (nr < nr_min) - nr = nr_min; -if (WARN_ON (nr >NR_IRQS )) - nr =NR_IRQS ; - -return nr; +return NR_IRQS ; }/* --------------------------------------------------------------------------
arch/x86/kernel/pci-calgary_64.c +1 -1
@@ -1567,7 +1567,7 @@ static int __init calgary_parse_options(char *p) ++p;if (*p =='\0' )break ; - bridge =simple_strtol (p, &endp,0 ); + bridge =simple_strtoul (p, &endp,0 );if (p == endp)break ;
arch/x86/kernel/xsave.c +1 -1
@@ -310,7 +310,7 @@ static void __init setup_xstate_init(void)/* * Enable and initialize the xsave feature. */ -void __init xsave_cntxt_init (void ) +void __ref xsave_cntxt_init (void ) {unsigned int eax, ebx, ecx, edx;
arch/x86/oprofile/op_model_ppro.c +1 -1
@@ -69,7 +69,7 @@ static void ppro_setup_ctrs(struct op_msrs const * const msrs)int i;if (!reset_value) { - reset_value =kmalloc (sizeof (unsigned ) * num_counters, + reset_value =kmalloc (sizeof (reset_value[0 ]) * num_counters,GFP_ATOMIC );if (!reset_value)return ;
arch/x86/pci/fixup.c +14 -11
@@ -496,21 +496,24 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SIEMENS, 0x0015, pci_siemens_interrupt_controller);/* -* Regular PCI devices have 256 bytes, but AMD Family 10h Opteron ext config -* have 4096 bytes. Even if the device is capable, that doesn't mean we can -* access it. Maybe we don't have a way to generate extended config space -* accesses. So check it +* Regular PCI devices have 256 bytes, but AMD Family 10h/11h CPUs have +* 4096 bytes configuration space for each function of their processor +* configuration space. */ -static void fam10h_pci_cfg_space_size (struct pci_dev *dev) +static void amd_cpu_pci_cfg_space_size (struct pci_dev *dev) { dev->cfg_size =pci_cfg_space_size_ext (dev); } - -DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_AMD ,0x1200 , fam10h_pci_cfg_space_size); -DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_AMD ,0x1201 , fam10h_pci_cfg_space_size); -DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_AMD ,0x1202 , fam10h_pci_cfg_space_size); -DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_AMD ,0x1203 , fam10h_pci_cfg_space_size); -DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_AMD ,0x1204 , fam10h_pci_cfg_space_size); +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_AMD ,0x1200 , amd_cpu_pci_cfg_space_size); +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_AMD ,0x1201 , amd_cpu_pci_cfg_space_size); +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_AMD ,0x1202 , amd_cpu_pci_cfg_space_size); +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_AMD ,0x1203 , amd_cpu_pci_cfg_space_size); +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_AMD ,0x1204 , amd_cpu_pci_cfg_space_size); +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_AMD ,0x1300 , amd_cpu_pci_cfg_space_size); +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_AMD ,0x1301 , amd_cpu_pci_cfg_space_size); +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_AMD ,0x1302 , amd_cpu_pci_cfg_space_size); +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_AMD ,0x1303 , amd_cpu_pci_cfg_space_size); +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_AMD ,0x1304 , amd_cpu_pci_cfg_space_size);/* * SB600: Disable BAR1 on device 14.0 to avoid HPET resources from
arch/x86/xen/mmu.c +14 -7
@@ -661,12 +661,11 @@ void xen_set_pgd(pgd_t *ptr, pgd_t val)* For 64-bit, we must skip the Xen hole in the middle of the address * space, just after the big x86-64 virtual hole. */ -static int xen_pgd_walk (struct mm_struct *mm, -int (*func)(struct mm_struct *mm,struct page *, -enum pt_level ), -unsigned long limit) +static int __xen_pgd_walk (struct mm_struct *mm,pgd_t *pgd, +int (*func)(struct mm_struct *mm,struct page *, +enum pt_level ), +unsigned long limit) { -pgd_t *pgd = mm->pgd;int flush =0 ;unsigned hole_low, hole_high;unsigned pgdidx_limit, pudidx_limit, pmdidx_limit;
@@ -753,6 +752,14 @@ out:return flush; } +static int xen_pgd_walk (struct mm_struct *mm, +int (*func)(struct mm_struct *mm,struct page *, +enum pt_level ), +unsigned long limit) +{ +return __xen_pgd_walk (mm, mm->pgd, func, limit); +} +/* If we're using split pte locks, then take the page's lock and return a pointer to it. Otherwise return NULL. */ static spinlock_t *xen_pte_lock (struct page *page,struct mm_struct *mm)
@@ -854,7 +861,7 @@ static void __xen_pgd_pin(struct mm_struct *mm, pgd_t *pgd)xen_mc_batch (); -if (xen_pgd_walk (mm, xen_pin_page,USER_LIMIT )) { +if (__xen_pgd_walk (mm, pgd, xen_pin_page,USER_LIMIT )) {/* re-enable interrupts for flushing */ xen_mc_issue (0 );
@@ -998,7 +1005,7 @@ static void __xen_pgd_unpin(struct mm_struct *mm, pgd_t *pgd) PT_PMD);#endif -xen_pgd_walk (mm, xen_unpin_page,USER_LIMIT ); +__xen_pgd_walk (mm, pgd, xen_unpin_page,USER_LIMIT );xen_mc_issue (0 ); }