Magellan Linux

Annotation of /trunk/kernel-alx/patches-3.4/0131-3.4.32-all-fixes.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2110 - (hide annotations) (download)
Tue Mar 12 12:15:23 2013 UTC (11 years, 2 months ago) by niro
File size: 6287 byte(s)
-sync with upstream
1 niro 2110 diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c
2     index c5531db..747ab28 100644
3     --- a/arch/s390/kernel/time.c
4     +++ b/arch/s390/kernel/time.c
5     @@ -121,6 +121,9 @@ static int s390_next_ktime(ktime_t expires,
6     nsecs = ktime_to_ns(ktime_add(timespec_to_ktime(ts), expires));
7     do_div(nsecs, 125);
8     S390_lowcore.clock_comparator = sched_clock_base_cc + (nsecs << 9);
9     + /* Program the maximum value if we have an overflow (== year 2042) */
10     + if (unlikely(S390_lowcore.clock_comparator < sched_clock_base_cc))
11     + S390_lowcore.clock_comparator = -1ULL;
12     set_clock_comparator(S390_lowcore.clock_comparator);
13     return 0;
14     }
15     diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
16     index c3520d7..3f3dd52 100644
17     --- a/arch/x86/include/asm/pgtable.h
18     +++ b/arch/x86/include/asm/pgtable.h
19     @@ -142,6 +142,11 @@ static inline unsigned long pmd_pfn(pmd_t pmd)
20     return (pmd_val(pmd) & PTE_PFN_MASK) >> PAGE_SHIFT;
21     }
22    
23     +static inline unsigned long pud_pfn(pud_t pud)
24     +{
25     + return (pud_val(pud) & PTE_PFN_MASK) >> PAGE_SHIFT;
26     +}
27     +
28     #define pte_page(pte) pfn_to_page(pte_pfn(pte))
29    
30     static inline int pmd_large(pmd_t pte)
31     diff --git a/arch/x86/kernel/apic/x2apic_phys.c b/arch/x86/kernel/apic/x2apic_phys.c
32     index 991e315..db31a2c 100644
33     --- a/arch/x86/kernel/apic/x2apic_phys.c
34     +++ b/arch/x86/kernel/apic/x2apic_phys.c
35     @@ -20,18 +20,19 @@ static int set_x2apic_phys_mode(char *arg)
36     }
37     early_param("x2apic_phys", set_x2apic_phys_mode);
38    
39     -static int x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
40     +static bool x2apic_fadt_phys(void)
41     {
42     - if (x2apic_phys)
43     - return x2apic_enabled();
44     - else if ((acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID) &&
45     - (acpi_gbl_FADT.flags & ACPI_FADT_APIC_PHYSICAL) &&
46     - x2apic_enabled()) {
47     + if ((acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID) &&
48     + (acpi_gbl_FADT.flags & ACPI_FADT_APIC_PHYSICAL)) {
49     printk(KERN_DEBUG "System requires x2apic physical mode\n");
50     - return 1;
51     + return true;
52     }
53     - else
54     - return 0;
55     + return false;
56     +}
57     +
58     +static int x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
59     +{
60     + return x2apic_enabled() && (x2apic_phys || x2apic_fadt_phys());
61     }
62    
63     static void
64     @@ -114,7 +115,7 @@ static void init_x2apic_ldr(void)
65    
66     static int x2apic_phys_probe(void)
67     {
68     - if (x2apic_mode && x2apic_phys)
69     + if (x2apic_mode && (x2apic_phys || x2apic_fadt_phys()))
70     return 1;
71    
72     return apic == &apic_x2apic_phys;
73     diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
74     index 3ecfd1a..e922e01 100644
75     --- a/arch/x86/mm/fault.c
76     +++ b/arch/x86/mm/fault.c
77     @@ -747,13 +747,15 @@ __bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code,
78     return;
79     }
80     #endif
81     + /* Kernel addresses are always protection faults: */
82     + if (address >= TASK_SIZE)
83     + error_code |= PF_PROT;
84    
85     - if (unlikely(show_unhandled_signals))
86     + if (likely(show_unhandled_signals))
87     show_signal_msg(regs, error_code, address, tsk);
88    
89     - /* Kernel addresses are always protection faults: */
90     tsk->thread.cr2 = address;
91     - tsk->thread.error_code = error_code | (address >= TASK_SIZE);
92     + tsk->thread.error_code = error_code;
93     tsk->thread.trap_nr = X86_TRAP_PF;
94    
95     force_sig_info_fault(SIGSEGV, si_code, address, tsk, 0);
96     diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
97     index fc18be0..faf7a68 100644
98     --- a/arch/x86/mm/init_64.c
99     +++ b/arch/x86/mm/init_64.c
100     @@ -821,6 +821,9 @@ int kern_addr_valid(unsigned long addr)
101     if (pud_none(*pud))
102     return 0;
103    
104     + if (pud_large(*pud))
105     + return pfn_valid(pud_pfn(*pud));
106     +
107     pmd = pmd_offset(pud, addr);
108     if (pmd_none(*pmd))
109     return 0;
110     diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
111     index 6fcd4ad..3705bb0 100644
112     --- a/arch/x86/platform/efi/efi.c
113     +++ b/arch/x86/platform/efi/efi.c
114     @@ -86,7 +86,7 @@ EXPORT_SYMBOL(efi_enabled);
115    
116     static int __init setup_noefi(char *arg)
117     {
118     - clear_bit(EFI_BOOT, &x86_efi_facility);
119     + clear_bit(EFI_RUNTIME_SERVICES, &x86_efi_facility);
120     return 0;
121     }
122     early_param("noefi", setup_noefi);
123     diff --git a/arch/x86/xen/xen-asm_32.S b/arch/x86/xen/xen-asm_32.S
124     index b040b0e..7328f71 100644
125     --- a/arch/x86/xen/xen-asm_32.S
126     +++ b/arch/x86/xen/xen-asm_32.S
127     @@ -88,11 +88,11 @@ ENTRY(xen_iret)
128     */
129     #ifdef CONFIG_SMP
130     GET_THREAD_INFO(%eax)
131     - movl TI_cpu(%eax), %eax
132     - movl __per_cpu_offset(,%eax,4), %eax
133     - mov xen_vcpu(%eax), %eax
134     + movl %ss:TI_cpu(%eax), %eax
135     + movl %ss:__per_cpu_offset(,%eax,4), %eax
136     + mov %ss:xen_vcpu(%eax), %eax
137     #else
138     - movl xen_vcpu, %eax
139     + movl %ss:xen_vcpu, %eax
140     #endif
141    
142     /* check IF state we're restoring */
143     @@ -105,11 +105,11 @@ ENTRY(xen_iret)
144     * resuming the code, so we don't have to be worried about
145     * being preempted to another CPU.
146     */
147     - setz XEN_vcpu_info_mask(%eax)
148     + setz %ss:XEN_vcpu_info_mask(%eax)
149     xen_iret_start_crit:
150    
151     /* check for unmasked and pending */
152     - cmpw $0x0001, XEN_vcpu_info_pending(%eax)
153     + cmpw $0x0001, %ss:XEN_vcpu_info_pending(%eax)
154    
155     /*
156     * If there's something pending, mask events again so we can
157     @@ -117,7 +117,7 @@ xen_iret_start_crit:
158     * touch XEN_vcpu_info_mask.
159     */
160     jne 1f
161     - movb $1, XEN_vcpu_info_mask(%eax)
162     + movb $1, %ss:XEN_vcpu_info_mask(%eax)
163    
164     1: popl %eax
165    
166     diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
167     index 6b4f014..1fb180d 100644
168     --- a/drivers/net/ethernet/intel/igb/igb_main.c
169     +++ b/drivers/net/ethernet/intel/igb/igb_main.c
170     @@ -4649,11 +4649,13 @@ void igb_update_stats(struct igb_adapter *adapter,
171     bytes = 0;
172     packets = 0;
173     for (i = 0; i < adapter->num_rx_queues; i++) {
174     - u32 rqdpc_tmp = rd32(E1000_RQDPC(i)) & 0x0FFF;
175     + u32 rqdpc = rd32(E1000_RQDPC(i));
176     struct igb_ring *ring = adapter->rx_ring[i];
177    
178     - ring->rx_stats.drops += rqdpc_tmp;
179     - net_stats->rx_fifo_errors += rqdpc_tmp;
180     + if (rqdpc) {
181     + ring->rx_stats.drops += rqdpc;
182     + net_stats->rx_fifo_errors += rqdpc;
183     + }
184    
185     do {
186     start = u64_stats_fetch_begin_bh(&ring->rx_syncp);
187     diff --git a/drivers/pci/remove.c b/drivers/pci/remove.c
188     index fd77e2b..eae55c7 100644
189     --- a/drivers/pci/remove.c
190     +++ b/drivers/pci/remove.c
191     @@ -19,6 +19,8 @@ static void pci_free_resources(struct pci_dev *dev)
192    
193     static void pci_stop_dev(struct pci_dev *dev)
194     {
195     + pci_pme_active(dev, false);
196     +
197     if (dev->is_added) {
198     pci_proc_detach_device(dev);
199     pci_remove_sysfs_dev_files(dev);