diff options
39 files changed, 371 insertions, 203 deletions
diff --git a/Documentation/arm/Samsung-S3C24XX/Overview.txt b/Documentation/arm/Samsung-S3C24XX/Overview.txt index dda7ecdde87b..28d014714ab8 100644 --- a/Documentation/arm/Samsung-S3C24XX/Overview.txt +++ b/Documentation/arm/Samsung-S3C24XX/Overview.txt | |||
@@ -76,6 +76,15 @@ Machines | |||
76 | A S3C2410 based PDA from Acer. There is a Wiki page at | 76 | A S3C2410 based PDA from Acer. There is a Wiki page at |
77 | http://handhelds.org/moin/moin.cgi/AcerN30Documentation . | 77 | http://handhelds.org/moin/moin.cgi/AcerN30Documentation . |
78 | 78 | ||
79 | AML M5900 | ||
80 | |||
81 | American Microsystems' M5900 | ||
82 | |||
83 | Nex Vision Nexcoder | ||
84 | Nex Vision Otom | ||
85 | |||
86 | Two machines by Nex Vision | ||
87 | |||
79 | 88 | ||
80 | Adding New Machines | 89 | Adding New Machines |
81 | ------------------- | 90 | ------------------- |
@@ -115,6 +124,10 @@ RTC | |||
115 | 124 | ||
116 | Support for the onboard RTC unit, including alarm function. | 125 | Support for the onboard RTC unit, including alarm function. |
117 | 126 | ||
127 | This has recently been upgraded to use the new RTC core, | ||
128 | and the module has been renamed to rtc-s3c to fit in with | ||
129 | the new rtc naming scheme. | ||
130 | |||
118 | 131 | ||
119 | Watchdog | 132 | Watchdog |
120 | -------- | 133 | -------- |
@@ -128,7 +141,7 @@ NAND | |||
128 | 141 | ||
129 | The current kernels now have support for the s3c2410 NAND | 142 | The current kernels now have support for the s3c2410 NAND |
130 | controller. If there are any problems the latest linux-mtd | 143 | controller. If there are any problems the latest linux-mtd |
131 | CVS can be found from http://www.linux-mtd.infradead.org/ | 144 | code can be found from http://www.linux-mtd.infradead.org/ |
132 | 145 | ||
133 | 146 | ||
134 | Serial | 147 | Serial |
@@ -168,6 +181,21 @@ Suspend to RAM | |||
168 | See Suspend.txt for more information. | 181 | See Suspend.txt for more information. |
169 | 182 | ||
170 | 183 | ||
184 | SPI | ||
185 | --- | ||
186 | |||
187 | SPI drivers are available for both the in-built hardware | ||
188 | (although there is no DMA support yet) and a generic | ||
189 | GPIO based solution. | ||
190 | |||
191 | |||
192 | LEDs | ||
193 | ---- | ||
194 | |||
195 | There is support for GPIO based LEDs via a platform driver | ||
196 | in the LED subsystem. | ||
197 | |||
198 | |||
171 | Platform Data | 199 | Platform Data |
172 | ------------- | 200 | ------------- |
173 | 201 | ||
diff --git a/MAINTAINERS b/MAINTAINERS index bf9fa6d7af13..0f6d13bd4688 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -1564,10 +1564,9 @@ T: git kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6.git | |||
1564 | S: Maintained | 1564 | S: Maintained |
1565 | 1565 | ||
1566 | IDE/ATAPI CDROM DRIVER | 1566 | IDE/ATAPI CDROM DRIVER |
1567 | P: Jens Axboe | 1567 | P: Alan Cox |
1568 | M: axboe@kernel.dk | 1568 | M: alan@lxorguk.ukuu.org.uk |
1569 | L: linux-kernel@vger.kernel.org | 1569 | L: linux-ide@vger.kernel.org |
1570 | W: http://www.kernel.dk | ||
1571 | S: Maintained | 1570 | S: Maintained |
1572 | 1571 | ||
1573 | IDE/ATAPI FLOPPY DRIVERS | 1572 | IDE/ATAPI FLOPPY DRIVERS |
diff --git a/arch/arm/mach-iop13xx/io.c b/arch/arm/mach-iop13xx/io.c index fbf9f88e46ea..e79a1b62600f 100644 --- a/arch/arm/mach-iop13xx/io.c +++ b/arch/arm/mach-iop13xx/io.c | |||
@@ -21,6 +21,25 @@ | |||
21 | #include <asm/hardware.h> | 21 | #include <asm/hardware.h> |
22 | #include <asm/io.h> | 22 | #include <asm/io.h> |
23 | 23 | ||
24 | void * __iomem __iop13xx_io(unsigned long io_addr) | ||
25 | { | ||
26 | void __iomem * io_virt; | ||
27 | |||
28 | switch (io_addr) { | ||
29 | case IOP13XX_PCIE_LOWER_IO_PA ... IOP13XX_PCIE_UPPER_IO_PA: | ||
30 | io_virt = (void *) IOP13XX_PCIE_IO_PHYS_TO_VIRT(io_addr); | ||
31 | break; | ||
32 | case IOP13XX_PCIX_LOWER_IO_PA ... IOP13XX_PCIX_UPPER_IO_PA: | ||
33 | io_virt = (void *) IOP13XX_PCIX_IO_PHYS_TO_VIRT(io_addr); | ||
34 | break; | ||
35 | default: | ||
36 | BUG(); | ||
37 | } | ||
38 | |||
39 | return io_virt; | ||
40 | } | ||
41 | EXPORT_SYMBOL(__iop13xx_io); | ||
42 | |||
24 | void * __iomem __iop13xx_ioremap(unsigned long cookie, size_t size, | 43 | void * __iomem __iop13xx_ioremap(unsigned long cookie, size_t size, |
25 | unsigned long flags) | 44 | unsigned long flags) |
26 | { | 45 | { |
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c index 6ae605857ca9..9de1278d234f 100644 --- a/arch/arm/mach-pxa/generic.c +++ b/arch/arm/mach-pxa/generic.c | |||
@@ -76,7 +76,9 @@ unsigned long long sched_clock(void) | |||
76 | /* | 76 | /* |
77 | * 96-bit math to perform tick * NSEC_PER_SEC / CLOCK_TICK_RATE for | 77 | * 96-bit math to perform tick * NSEC_PER_SEC / CLOCK_TICK_RATE for |
78 | * any value of CLOCK_TICK_RATE. Max value is in the 80 thousand | 78 | * any value of CLOCK_TICK_RATE. Max value is in the 80 thousand |
79 | * years range which is nice, but with higher computation cost. | 79 | * years range and truncation to unsigned long long limits it to |
80 | * sched_clock's max range of ~584 years. This is nice but with | ||
81 | * higher computation cost. | ||
80 | */ | 82 | */ |
81 | { | 83 | { |
82 | union { | 84 | union { |
diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c index 3775b8f38429..ee2beb400414 100644 --- a/arch/arm/mach-pxa/time.c +++ b/arch/arm/mach-pxa/time.c | |||
@@ -101,7 +101,7 @@ static struct irqaction pxa_timer_irq = { | |||
101 | .handler = pxa_timer_interrupt, | 101 | .handler = pxa_timer_interrupt, |
102 | }; | 102 | }; |
103 | 103 | ||
104 | cycle_t pxa_get_cycles(void) | 104 | static cycle_t pxa_get_cycles(void) |
105 | { | 105 | { |
106 | return OSCR; | 106 | return OSCR; |
107 | } | 107 | } |
@@ -134,13 +134,13 @@ static void __init pxa_timer_init(void) | |||
134 | OSMR0 = OSCR + LATCH; /* set initial match */ | 134 | OSMR0 = OSCR + LATCH; /* set initial match */ |
135 | local_irq_restore(flags); | 135 | local_irq_restore(flags); |
136 | 136 | ||
137 | /* on PXA OSCR runs continiously and is not written to, so we can use it | 137 | /* |
138 | * as clock source directly. | 138 | * OSCR runs continuously on PXA and is not written to, |
139 | * so we can use it as clock source directly. | ||
139 | */ | 140 | */ |
140 | clocksource_pxa.mult = | 141 | clocksource_pxa.mult = |
141 | clocksource_hz2mult(CLOCK_TICK_RATE, clocksource_pxa.shift); | 142 | clocksource_hz2mult(CLOCK_TICK_RATE, clocksource_pxa.shift); |
142 | clocksource_register(&clocksource_pxa); | 143 | clocksource_register(&clocksource_pxa); |
143 | |||
144 | } | 144 | } |
145 | 145 | ||
146 | #ifdef CONFIG_NO_IDLE_HZ | 146 | #ifdef CONFIG_NO_IDLE_HZ |
diff --git a/arch/arm/mach-s3c2410/dma.c b/arch/arm/mach-s3c2410/dma.c index 717322a0916b..fa860e716b4f 100644 --- a/arch/arm/mach-s3c2410/dma.c +++ b/arch/arm/mach-s3c2410/dma.c | |||
@@ -1053,11 +1053,11 @@ int s3c2410_dma_config(dmach_t channel, | |||
1053 | if (chan == NULL) | 1053 | if (chan == NULL) |
1054 | return -EINVAL; | 1054 | return -EINVAL; |
1055 | 1055 | ||
1056 | printk("Initial dcon is %08x\n", dcon); | 1056 | pr_debug("%s: Initial dcon is %08x\n", __FUNCTION__, dcon); |
1057 | 1057 | ||
1058 | dcon |= chan->dcon & dma_sel.dcon_mask; | 1058 | dcon |= chan->dcon & dma_sel.dcon_mask; |
1059 | 1059 | ||
1060 | printk("New dcon is %08x\n", dcon); | 1060 | pr_debug("%s: New dcon is %08x\n", __FUNCTION__, dcon); |
1061 | 1061 | ||
1062 | switch (xferunit) { | 1062 | switch (xferunit) { |
1063 | case 1: | 1063 | case 1: |
diff --git a/arch/arm/mm/copypage-v4mc.c b/arch/arm/mm/copypage-v4mc.c index 408b05ae6b9b..ded0e96d069d 100644 --- a/arch/arm/mm/copypage-v4mc.c +++ b/arch/arm/mm/copypage-v4mc.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <asm/page.h> | 19 | #include <asm/page.h> |
20 | #include <asm/pgtable.h> | 20 | #include <asm/pgtable.h> |
21 | #include <asm/tlbflush.h> | 21 | #include <asm/tlbflush.h> |
22 | #include <asm/cacheflush.h> | ||
22 | 23 | ||
23 | #include "mm.h" | 24 | #include "mm.h" |
24 | 25 | ||
@@ -69,6 +70,11 @@ mc_copy_user_page(void *from, void *to) | |||
69 | 70 | ||
70 | void v4_mc_copy_user_page(void *kto, const void *kfrom, unsigned long vaddr) | 71 | void v4_mc_copy_user_page(void *kto, const void *kfrom, unsigned long vaddr) |
71 | { | 72 | { |
73 | struct page *page = virt_to_page(kfrom); | ||
74 | |||
75 | if (test_and_clear_bit(PG_dcache_dirty, &page->flags)) | ||
76 | __flush_dcache_page(page_mapping(page), page); | ||
77 | |||
72 | spin_lock(&minicache_lock); | 78 | spin_lock(&minicache_lock); |
73 | 79 | ||
74 | set_pte_ext(TOP_PTE(0xffff8000), pfn_pte(__pa(kfrom) >> PAGE_SHIFT, minicache_pgprot), 0); | 80 | set_pte_ext(TOP_PTE(0xffff8000), pfn_pte(__pa(kfrom) >> PAGE_SHIFT, minicache_pgprot), 0); |
diff --git a/arch/arm/mm/copypage-v6.c b/arch/arm/mm/copypage-v6.c index 865777dec161..3adb79257f43 100644 --- a/arch/arm/mm/copypage-v6.c +++ b/arch/arm/mm/copypage-v6.c | |||
@@ -53,6 +53,10 @@ static void v6_copy_user_page_aliasing(void *kto, const void *kfrom, unsigned lo | |||
53 | { | 53 | { |
54 | unsigned int offset = CACHE_COLOUR(vaddr); | 54 | unsigned int offset = CACHE_COLOUR(vaddr); |
55 | unsigned long from, to; | 55 | unsigned long from, to; |
56 | struct page *page = virt_to_page(kfrom); | ||
57 | |||
58 | if (test_and_clear_bit(PG_dcache_dirty, &page->flags)) | ||
59 | __flush_dcache_page(page_mapping(page), page); | ||
56 | 60 | ||
57 | /* | 61 | /* |
58 | * Discard data in the kernel mapping for the new page. | 62 | * Discard data in the kernel mapping for the new page. |
diff --git a/arch/arm/mm/copypage-xscale.c b/arch/arm/mm/copypage-xscale.c index aea5da723596..2e455f82a4d5 100644 --- a/arch/arm/mm/copypage-xscale.c +++ b/arch/arm/mm/copypage-xscale.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <asm/page.h> | 19 | #include <asm/page.h> |
20 | #include <asm/pgtable.h> | 20 | #include <asm/pgtable.h> |
21 | #include <asm/tlbflush.h> | 21 | #include <asm/tlbflush.h> |
22 | #include <asm/cacheflush.h> | ||
22 | 23 | ||
23 | #include "mm.h" | 24 | #include "mm.h" |
24 | 25 | ||
@@ -91,6 +92,11 @@ mc_copy_user_page(void *from, void *to) | |||
91 | 92 | ||
92 | void xscale_mc_copy_user_page(void *kto, const void *kfrom, unsigned long vaddr) | 93 | void xscale_mc_copy_user_page(void *kto, const void *kfrom, unsigned long vaddr) |
93 | { | 94 | { |
95 | struct page *page = virt_to_page(kfrom); | ||
96 | |||
97 | if (test_and_clear_bit(PG_dcache_dirty, &page->flags)) | ||
98 | __flush_dcache_page(page_mapping(page), page); | ||
99 | |||
94 | spin_lock(&minicache_lock); | 100 | spin_lock(&minicache_lock); |
95 | 101 | ||
96 | set_pte_ext(TOP_PTE(COPYPAGE_MINICACHE), pfn_pte(__pa(kfrom) >> PAGE_SHIFT, minicache_pgprot), 0); | 102 | set_pte_ext(TOP_PTE(COPYPAGE_MINICACHE), pfn_pte(__pa(kfrom) >> PAGE_SHIFT, minicache_pgprot), 0); |
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index e26cc1f59948..490d9d18a7d1 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c | |||
@@ -264,6 +264,18 @@ void VFP9_bounce(u32 trigger, u32 fpexc, struct pt_regs *regs) | |||
264 | vfp_raise_exceptions(exceptions, trigger, orig_fpscr, regs); | 264 | vfp_raise_exceptions(exceptions, trigger, orig_fpscr, regs); |
265 | } | 265 | } |
266 | 266 | ||
267 | static void vfp_enable(void *unused) | ||
268 | { | ||
269 | u32 access = get_copro_access(); | ||
270 | |||
271 | /* | ||
272 | * Enable full access to VFP (cp10 and cp11) | ||
273 | */ | ||
274 | set_copro_access(access | CPACC_FULL(10) | CPACC_FULL(11)); | ||
275 | } | ||
276 | |||
277 | #include <linux/smp.h> | ||
278 | |||
267 | /* | 279 | /* |
268 | * VFP support code initialisation. | 280 | * VFP support code initialisation. |
269 | */ | 281 | */ |
@@ -288,6 +300,7 @@ static int __init vfp_init(void) | |||
288 | * we just need to read the VFPSID register. | 300 | * we just need to read the VFPSID register. |
289 | */ | 301 | */ |
290 | vfpsid = fmrx(FPSID); | 302 | vfpsid = fmrx(FPSID); |
303 | barrier(); | ||
291 | 304 | ||
292 | printk(KERN_INFO "VFP support v0.3: "); | 305 | printk(KERN_INFO "VFP support v0.3: "); |
293 | if (VFP_arch) { | 306 | if (VFP_arch) { |
@@ -301,6 +314,8 @@ static int __init vfp_init(void) | |||
301 | } else if (vfpsid & FPSID_NODOUBLE) { | 314 | } else if (vfpsid & FPSID_NODOUBLE) { |
302 | printk("no double precision support\n"); | 315 | printk("no double precision support\n"); |
303 | } else { | 316 | } else { |
317 | smp_call_function(vfp_enable, NULL, 1, 1); | ||
318 | |||
304 | VFP_arch = (vfpsid & FPSID_ARCH_MASK) >> FPSID_ARCH_BIT; /* Extract the architecture version */ | 319 | VFP_arch = (vfpsid & FPSID_ARCH_MASK) >> FPSID_ARCH_BIT; /* Extract the architecture version */ |
305 | printk("implementor %02x architecture %d part %02x variant %x rev %x\n", | 320 | printk("implementor %02x architecture %d part %02x variant %x rev %x\n", |
306 | (vfpsid & FPSID_IMPLEMENTER_MASK) >> FPSID_IMPLEMENTER_BIT, | 321 | (vfpsid & FPSID_IMPLEMENTER_MASK) >> FPSID_IMPLEMENTER_BIT, |
diff --git a/arch/i386/boot/compressed/head.S b/arch/i386/boot/compressed/head.S index f395a4bb38bb..3517a32aaf41 100644 --- a/arch/i386/boot/compressed/head.S +++ b/arch/i386/boot/compressed/head.S | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <asm/page.h> | 28 | #include <asm/page.h> |
29 | #include <asm/boot.h> | 29 | #include <asm/boot.h> |
30 | 30 | ||
31 | .section ".text.head" | 31 | .section ".text.head","ax",@progbits |
32 | .globl startup_32 | 32 | .globl startup_32 |
33 | 33 | ||
34 | startup_32: | 34 | startup_32: |
diff --git a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c index b735458c6e3a..10baa3501ed3 100644 --- a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c +++ b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c | |||
@@ -373,8 +373,8 @@ static int acpi_cpufreq_target(struct cpufreq_policy *policy, | |||
373 | cpumask_t online_policy_cpus; | 373 | cpumask_t online_policy_cpus; |
374 | struct drv_cmd cmd; | 374 | struct drv_cmd cmd; |
375 | unsigned int msr; | 375 | unsigned int msr; |
376 | unsigned int next_state = 0; | 376 | unsigned int next_state = 0; /* Index into freq_table */ |
377 | unsigned int next_perf_state = 0; | 377 | unsigned int next_perf_state = 0; /* Index into perf table */ |
378 | unsigned int i; | 378 | unsigned int i; |
379 | int result = 0; | 379 | int result = 0; |
380 | 380 | ||
@@ -420,6 +420,7 @@ static int acpi_cpufreq_target(struct cpufreq_policy *policy, | |||
420 | msr = | 420 | msr = |
421 | (u32) perf->states[next_perf_state]. | 421 | (u32) perf->states[next_perf_state]. |
422 | control & INTEL_MSR_RANGE; | 422 | control & INTEL_MSR_RANGE; |
423 | cmd.val = get_cur_val(online_policy_cpus); | ||
423 | cmd.val = (cmd.val & ~INTEL_MSR_RANGE) | msr; | 424 | cmd.val = (cmd.val & ~INTEL_MSR_RANGE) | msr; |
424 | break; | 425 | break; |
425 | case SYSTEM_IO_CAPABLE: | 426 | case SYSTEM_IO_CAPABLE: |
@@ -439,8 +440,8 @@ static int acpi_cpufreq_target(struct cpufreq_policy *policy, | |||
439 | else | 440 | else |
440 | cpu_set(policy->cpu, cmd.mask); | 441 | cpu_set(policy->cpu, cmd.mask); |
441 | 442 | ||
442 | freqs.old = data->freq_table[perf->state].frequency; | 443 | freqs.old = perf->states[perf->state].core_frequency * 1000; |
443 | freqs.new = data->freq_table[next_perf_state].frequency; | 444 | freqs.new = data->freq_table[next_state].frequency; |
444 | for_each_cpu_mask(i, cmd.mask) { | 445 | for_each_cpu_mask(i, cmd.mask) { |
445 | freqs.cpu = i; | 446 | freqs.cpu = i; |
446 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); | 447 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); |
@@ -677,6 +678,7 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
677 | valid_states++; | 678 | valid_states++; |
678 | } | 679 | } |
679 | data->freq_table[valid_states].frequency = CPUFREQ_TABLE_END; | 680 | data->freq_table[valid_states].frequency = CPUFREQ_TABLE_END; |
681 | perf->state = 0; | ||
680 | 682 | ||
681 | result = cpufreq_frequency_table_cpuinfo(policy, data->freq_table); | 683 | result = cpufreq_frequency_table_cpuinfo(policy, data->freq_table); |
682 | if (result) | 684 | if (result) |
diff --git a/arch/i386/kernel/cpu/cpufreq/longhaul.c b/arch/i386/kernel/cpu/cpufreq/longhaul.c index 6d9c97a690fd..e940e00b96c9 100644 --- a/arch/i386/kernel/cpu/cpufreq/longhaul.c +++ b/arch/i386/kernel/cpu/cpufreq/longhaul.c | |||
@@ -52,6 +52,10 @@ | |||
52 | #define CPU_EZRA_T 4 | 52 | #define CPU_EZRA_T 4 |
53 | #define CPU_NEHEMIAH 5 | 53 | #define CPU_NEHEMIAH 5 |
54 | 54 | ||
55 | /* Flags */ | ||
56 | #define USE_ACPI_C3 (1 << 1) | ||
57 | #define USE_NORTHBRIDGE (1 << 2) | ||
58 | |||
55 | static int cpu_model; | 59 | static int cpu_model; |
56 | static unsigned int numscales=16; | 60 | static unsigned int numscales=16; |
57 | static unsigned int fsb; | 61 | static unsigned int fsb; |
@@ -68,7 +72,7 @@ static unsigned int minmult, maxmult; | |||
68 | static int can_scale_voltage; | 72 | static int can_scale_voltage; |
69 | static struct acpi_processor *pr = NULL; | 73 | static struct acpi_processor *pr = NULL; |
70 | static struct acpi_processor_cx *cx = NULL; | 74 | static struct acpi_processor_cx *cx = NULL; |
71 | static int port22_en; | 75 | static u8 longhaul_flags; |
72 | 76 | ||
73 | /* Module parameters */ | 77 | /* Module parameters */ |
74 | static int scale_voltage; | 78 | static int scale_voltage; |
@@ -80,7 +84,6 @@ static int ignore_latency; | |||
80 | /* Clock ratios multiplied by 10 */ | 84 | /* Clock ratios multiplied by 10 */ |
81 | static int clock_ratio[32]; | 85 | static int clock_ratio[32]; |
82 | static int eblcr_table[32]; | 86 | static int eblcr_table[32]; |
83 | static unsigned int highest_speed, lowest_speed; /* kHz */ | ||
84 | static int longhaul_version; | 87 | static int longhaul_version; |
85 | static struct cpufreq_frequency_table *longhaul_table; | 88 | static struct cpufreq_frequency_table *longhaul_table; |
86 | 89 | ||
@@ -178,7 +181,7 @@ static void do_powersaver(int cx_address, unsigned int clock_ratio_index) | |||
178 | safe_halt(); | 181 | safe_halt(); |
179 | /* Change frequency on next halt or sleep */ | 182 | /* Change frequency on next halt or sleep */ |
180 | wrmsrl(MSR_VIA_LONGHAUL, longhaul.val); | 183 | wrmsrl(MSR_VIA_LONGHAUL, longhaul.val); |
181 | if (port22_en) { | 184 | if (!cx_address) { |
182 | ACPI_FLUSH_CPU_CACHE(); | 185 | ACPI_FLUSH_CPU_CACHE(); |
183 | /* Invoke C1 */ | 186 | /* Invoke C1 */ |
184 | halt(); | 187 | halt(); |
@@ -189,7 +192,6 @@ static void do_powersaver(int cx_address, unsigned int clock_ratio_index) | |||
189 | /* Dummy op - must do something useless after P_LVL3 read */ | 192 | /* Dummy op - must do something useless after P_LVL3 read */ |
190 | t = inl(acpi_fadt.xpm_tmr_blk.address); | 193 | t = inl(acpi_fadt.xpm_tmr_blk.address); |
191 | } | 194 | } |
192 | |||
193 | /* Disable bus ratio bit */ | 195 | /* Disable bus ratio bit */ |
194 | local_irq_disable(); | 196 | local_irq_disable(); |
195 | longhaul.bits.RevisionKey = longhaul.bits.RevisionID; | 197 | longhaul.bits.RevisionKey = longhaul.bits.RevisionID; |
@@ -243,15 +245,14 @@ static void longhaul_setstate(unsigned int clock_ratio_index) | |||
243 | outb(0xFF,0xA1); /* Overkill */ | 245 | outb(0xFF,0xA1); /* Overkill */ |
244 | outb(0xFE,0x21); /* TMR0 only */ | 246 | outb(0xFE,0x21); /* TMR0 only */ |
245 | 247 | ||
246 | if (pr->flags.bm_control) { | 248 | if (longhaul_flags & USE_NORTHBRIDGE) { |
249 | /* Disable AGP and PCI arbiters */ | ||
250 | outb(3, 0x22); | ||
251 | } else if ((pr != NULL) && pr->flags.bm_control) { | ||
247 | /* Disable bus master arbitration */ | 252 | /* Disable bus master arbitration */ |
248 | acpi_set_register(ACPI_BITREG_ARB_DISABLE, 1, | 253 | acpi_set_register(ACPI_BITREG_ARB_DISABLE, 1, |
249 | ACPI_MTX_DO_NOT_LOCK); | 254 | ACPI_MTX_DO_NOT_LOCK); |
250 | } else if (port22_en) { | ||
251 | /* Disable AGP and PCI arbiters */ | ||
252 | outb(3, 0x22); | ||
253 | } | 255 | } |
254 | |||
255 | switch (longhaul_version) { | 256 | switch (longhaul_version) { |
256 | 257 | ||
257 | /* | 258 | /* |
@@ -278,22 +279,25 @@ static void longhaul_setstate(unsigned int clock_ratio_index) | |||
278 | * to work in practice. | 279 | * to work in practice. |
279 | */ | 280 | */ |
280 | case TYPE_POWERSAVER: | 281 | case TYPE_POWERSAVER: |
281 | /* Don't allow wakeup */ | 282 | if (longhaul_flags & USE_ACPI_C3) { |
282 | acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 0, | 283 | /* Don't allow wakeup */ |
283 | ACPI_MTX_DO_NOT_LOCK); | 284 | acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 0, |
284 | do_powersaver(cx->address, clock_ratio_index); | 285 | ACPI_MTX_DO_NOT_LOCK); |
286 | do_powersaver(cx->address, clock_ratio_index); | ||
287 | } else { | ||
288 | do_powersaver(0, clock_ratio_index); | ||
289 | } | ||
285 | break; | 290 | break; |
286 | } | 291 | } |
287 | 292 | ||
288 | if (pr->flags.bm_control) { | 293 | if (longhaul_flags & USE_NORTHBRIDGE) { |
294 | /* Enable arbiters */ | ||
295 | outb(0, 0x22); | ||
296 | } else if ((pr != NULL) && pr->flags.bm_control) { | ||
289 | /* Enable bus master arbitration */ | 297 | /* Enable bus master arbitration */ |
290 | acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0, | 298 | acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0, |
291 | ACPI_MTX_DO_NOT_LOCK); | 299 | ACPI_MTX_DO_NOT_LOCK); |
292 | } else if (port22_en) { | ||
293 | /* Enable arbiters */ | ||
294 | outb(0, 0x22); | ||
295 | } | 300 | } |
296 | |||
297 | outb(pic2_mask,0xA1); /* restore mask */ | 301 | outb(pic2_mask,0xA1); /* restore mask */ |
298 | outb(pic1_mask,0x21); | 302 | outb(pic1_mask,0x21); |
299 | 303 | ||
@@ -314,12 +318,12 @@ static void longhaul_setstate(unsigned int clock_ratio_index) | |||
314 | 318 | ||
315 | #define ROUNDING 0xf | 319 | #define ROUNDING 0xf |
316 | 320 | ||
317 | static int _guess(int guess) | 321 | static int _guess(int guess, int mult) |
318 | { | 322 | { |
319 | int target; | 323 | int target; |
320 | 324 | ||
321 | target = ((maxmult/10)*guess); | 325 | target = ((mult/10)*guess); |
322 | if (maxmult%10 != 0) | 326 | if (mult%10 != 0) |
323 | target += (guess/2); | 327 | target += (guess/2); |
324 | target += ROUNDING/2; | 328 | target += ROUNDING/2; |
325 | target &= ~ROUNDING; | 329 | target &= ~ROUNDING; |
@@ -327,17 +331,17 @@ static int _guess(int guess) | |||
327 | } | 331 | } |
328 | 332 | ||
329 | 333 | ||
330 | static int guess_fsb(void) | 334 | static int guess_fsb(int mult) |
331 | { | 335 | { |
332 | int speed = (cpu_khz/1000); | 336 | int speed = (cpu_khz/1000); |
333 | int i; | 337 | int i; |
334 | int speeds[3] = { 66, 100, 133 }; | 338 | int speeds[] = { 66, 100, 133, 200 }; |
335 | 339 | ||
336 | speed += ROUNDING/2; | 340 | speed += ROUNDING/2; |
337 | speed &= ~ROUNDING; | 341 | speed &= ~ROUNDING; |
338 | 342 | ||
339 | for (i=0; i<3; i++) { | 343 | for (i=0; i<4; i++) { |
340 | if (_guess(speeds[i]) == speed) | 344 | if (_guess(speeds[i], mult) == speed) |
341 | return speeds[i]; | 345 | return speeds[i]; |
342 | } | 346 | } |
343 | return 0; | 347 | return 0; |
@@ -354,9 +358,7 @@ static int __init longhaul_get_ranges(void) | |||
354 | 130, 150, 160, 140, -1, 155, -1, 145 }; | 358 | 130, 150, 160, 140, -1, 155, -1, 145 }; |
355 | unsigned int j, k = 0; | 359 | unsigned int j, k = 0; |
356 | union msr_longhaul longhaul; | 360 | union msr_longhaul longhaul; |
357 | unsigned long lo, hi; | 361 | int mult = 0; |
358 | unsigned int eblcr_fsb_table_v1[] = { 66, 133, 100, -1 }; | ||
359 | unsigned int eblcr_fsb_table_v2[] = { 133, 100, -1, 66 }; | ||
360 | 362 | ||
361 | switch (longhaul_version) { | 363 | switch (longhaul_version) { |
362 | case TYPE_LONGHAUL_V1: | 364 | case TYPE_LONGHAUL_V1: |
@@ -364,30 +366,18 @@ static int __init longhaul_get_ranges(void) | |||
364 | /* Ugh, Longhaul v1 didn't have the min/max MSRs. | 366 | /* Ugh, Longhaul v1 didn't have the min/max MSRs. |
365 | Assume min=3.0x & max = whatever we booted at. */ | 367 | Assume min=3.0x & max = whatever we booted at. */ |
366 | minmult = 30; | 368 | minmult = 30; |
367 | maxmult = longhaul_get_cpu_mult(); | 369 | maxmult = mult = longhaul_get_cpu_mult(); |
368 | rdmsr (MSR_IA32_EBL_CR_POWERON, lo, hi); | ||
369 | invalue = (lo & (1<<18|1<<19)) >>18; | ||
370 | if (cpu_model==CPU_SAMUEL || cpu_model==CPU_SAMUEL2) | ||
371 | fsb = eblcr_fsb_table_v1[invalue]; | ||
372 | else | ||
373 | fsb = guess_fsb(); | ||
374 | break; | 370 | break; |
375 | 371 | ||
376 | case TYPE_POWERSAVER: | 372 | case TYPE_POWERSAVER: |
377 | /* Ezra-T */ | 373 | /* Ezra-T */ |
378 | if (cpu_model==CPU_EZRA_T) { | 374 | if (cpu_model==CPU_EZRA_T) { |
375 | minmult = 30; | ||
379 | rdmsrl (MSR_VIA_LONGHAUL, longhaul.val); | 376 | rdmsrl (MSR_VIA_LONGHAUL, longhaul.val); |
380 | invalue = longhaul.bits.MaxMHzBR; | 377 | invalue = longhaul.bits.MaxMHzBR; |
381 | if (longhaul.bits.MaxMHzBR4) | 378 | if (longhaul.bits.MaxMHzBR4) |
382 | invalue += 16; | 379 | invalue += 16; |
383 | maxmult=ezra_t_multipliers[invalue]; | 380 | maxmult = mult = ezra_t_multipliers[invalue]; |
384 | |||
385 | invalue = longhaul.bits.MinMHzBR; | ||
386 | if (longhaul.bits.MinMHzBR4 == 1) | ||
387 | minmult = 30; | ||
388 | else | ||
389 | minmult = ezra_t_multipliers[invalue]; | ||
390 | fsb = eblcr_fsb_table_v2[longhaul.bits.MaxMHzFSB]; | ||
391 | break; | 381 | break; |
392 | } | 382 | } |
393 | 383 | ||
@@ -407,21 +397,16 @@ static int __init longhaul_get_ranges(void) | |||
407 | * But it works, so we don't grumble. | 397 | * But it works, so we don't grumble. |
408 | */ | 398 | */ |
409 | minmult=40; | 399 | minmult=40; |
410 | maxmult=longhaul_get_cpu_mult(); | 400 | maxmult = mult = longhaul_get_cpu_mult(); |
411 | |||
412 | /* Starting with the 1.2GHz parts, theres a 200MHz bus. */ | ||
413 | if ((cpu_khz/maxmult) > 13400) | ||
414 | fsb = 200; | ||
415 | else | ||
416 | fsb = eblcr_fsb_table_v2[longhaul.bits.MaxMHzFSB]; | ||
417 | break; | 401 | break; |
418 | } | 402 | } |
419 | } | 403 | } |
404 | fsb = guess_fsb(mult); | ||
420 | 405 | ||
421 | dprintk ("MinMult:%d.%dx MaxMult:%d.%dx\n", | 406 | dprintk ("MinMult:%d.%dx MaxMult:%d.%dx\n", |
422 | minmult/10, minmult%10, maxmult/10, maxmult%10); | 407 | minmult/10, minmult%10, maxmult/10, maxmult%10); |
423 | 408 | ||
424 | if (fsb == -1) { | 409 | if (fsb == 0) { |
425 | printk (KERN_INFO PFX "Invalid (reserved) FSB!\n"); | 410 | printk (KERN_INFO PFX "Invalid (reserved) FSB!\n"); |
426 | return -EINVAL; | 411 | return -EINVAL; |
427 | } | 412 | } |
@@ -691,27 +676,32 @@ static int __init longhaul_cpu_init(struct cpufreq_policy *policy) | |||
691 | /* Find ACPI data for processor */ | 676 | /* Find ACPI data for processor */ |
692 | acpi_walk_namespace(ACPI_TYPE_PROCESSOR, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX, | 677 | acpi_walk_namespace(ACPI_TYPE_PROCESSOR, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX, |
693 | &longhaul_walk_callback, NULL, (void *)&pr); | 678 | &longhaul_walk_callback, NULL, (void *)&pr); |
694 | if (pr == NULL) | ||
695 | goto err_acpi; | ||
696 | 679 | ||
697 | if (longhaul_version == TYPE_POWERSAVER) { | 680 | /* Check ACPI support for C3 state */ |
698 | /* Check ACPI support for C3 state */ | 681 | if ((pr != NULL) && (longhaul_version == TYPE_POWERSAVER)) { |
699 | cx = &pr->power.states[ACPI_STATE_C3]; | 682 | cx = &pr->power.states[ACPI_STATE_C3]; |
700 | if (cx->address > 0 && | 683 | if (cx->address > 0 && |
701 | (cx->latency <= 1000 || ignore_latency != 0) ) { | 684 | (cx->latency <= 1000 || ignore_latency != 0) ) { |
685 | longhaul_flags |= USE_ACPI_C3; | ||
702 | goto print_support_type; | 686 | goto print_support_type; |
703 | } | 687 | } |
704 | } | 688 | } |
689 | /* Check if northbridge is friendly */ | ||
690 | if (enable_arbiter_disable()) { | ||
691 | longhaul_flags |= USE_NORTHBRIDGE; | ||
692 | goto print_support_type; | ||
693 | } | ||
694 | |||
695 | /* No ACPI C3 or we can't use it */ | ||
705 | /* Check ACPI support for bus master arbiter disable */ | 696 | /* Check ACPI support for bus master arbiter disable */ |
706 | if (!pr->flags.bm_control) { | 697 | if ((pr == NULL) || !(pr->flags.bm_control)) { |
707 | if (enable_arbiter_disable()) { | 698 | printk(KERN_ERR PFX |
708 | port22_en = 1; | 699 | "No ACPI support. Unsupported northbridge.\n"); |
709 | } else { | 700 | return -ENODEV; |
710 | goto err_acpi; | ||
711 | } | ||
712 | } | 701 | } |
702 | |||
713 | print_support_type: | 703 | print_support_type: |
714 | if (!port22_en) { | 704 | if (!(longhaul_flags & USE_NORTHBRIDGE)) { |
715 | printk (KERN_INFO PFX "Using ACPI support.\n"); | 705 | printk (KERN_INFO PFX "Using ACPI support.\n"); |
716 | } else { | 706 | } else { |
717 | printk (KERN_INFO PFX "Using northbridge support.\n"); | 707 | printk (KERN_INFO PFX "Using northbridge support.\n"); |
@@ -736,10 +726,6 @@ print_support_type: | |||
736 | cpufreq_frequency_table_get_attr(longhaul_table, policy->cpu); | 726 | cpufreq_frequency_table_get_attr(longhaul_table, policy->cpu); |
737 | 727 | ||
738 | return 0; | 728 | return 0; |
739 | |||
740 | err_acpi: | ||
741 | printk(KERN_ERR PFX "No ACPI support. Unsupported northbridge. Aborting.\n"); | ||
742 | return -ENODEV; | ||
743 | } | 729 | } |
744 | 730 | ||
745 | static int __devexit longhaul_cpu_exit(struct cpufreq_policy *policy) | 731 | static int __devexit longhaul_cpu_exit(struct cpufreq_policy *policy) |
@@ -774,8 +760,8 @@ static int __init longhaul_init(void) | |||
774 | 760 | ||
775 | #ifdef CONFIG_SMP | 761 | #ifdef CONFIG_SMP |
776 | if (num_online_cpus() > 1) { | 762 | if (num_online_cpus() > 1) { |
777 | return -ENODEV; | ||
778 | printk(KERN_ERR PFX "More than 1 CPU detected, longhaul disabled.\n"); | 763 | printk(KERN_ERR PFX "More than 1 CPU detected, longhaul disabled.\n"); |
764 | return -ENODEV; | ||
779 | } | 765 | } |
780 | #endif | 766 | #endif |
781 | #ifdef CONFIG_X86_IO_APIC | 767 | #ifdef CONFIG_X86_IO_APIC |
diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c index 5113e9231634..f43b987f952b 100644 --- a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c +++ b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c | |||
@@ -533,9 +533,9 @@ static int centrino_cpu_init_acpi(struct cpufreq_policy *policy) | |||
533 | 533 | ||
534 | /* notify BIOS that we exist */ | 534 | /* notify BIOS that we exist */ |
535 | acpi_processor_notify_smm(THIS_MODULE); | 535 | acpi_processor_notify_smm(THIS_MODULE); |
536 | printk("speedstep-centrino with X86_SPEEDSTEP_CENTRINO_ACPI" | 536 | printk("speedstep-centrino with X86_SPEEDSTEP_CENTRINO_ACPI " |
537 | "config is deprecated.\n " | 537 | "config is deprecated.\n " |
538 | "Use X86_ACPI_CPUFREQ (acpi-cpufreq instead.\n" ); | 538 | "Use X86_ACPI_CPUFREQ (acpi-cpufreq) instead.\n" ); |
539 | 539 | ||
540 | return 0; | 540 | return 0; |
541 | 541 | ||
diff --git a/arch/x86_64/kernel/cpufreq/Kconfig b/arch/x86_64/kernel/cpufreq/Kconfig index 3abcfa3e1ed7..45a6a1fd14ac 100644 --- a/arch/x86_64/kernel/cpufreq/Kconfig +++ b/arch/x86_64/kernel/cpufreq/Kconfig | |||
@@ -49,6 +49,7 @@ config X86_SPEEDSTEP_CENTRINO_ACPI | |||
49 | 49 | ||
50 | config X86_ACPI_CPUFREQ | 50 | config X86_ACPI_CPUFREQ |
51 | tristate "ACPI Processor P-States driver" | 51 | tristate "ACPI Processor P-States driver" |
52 | select CPU_FREQ_TABLE | ||
52 | depends on ACPI_PROCESSOR | 53 | depends on ACPI_PROCESSOR |
53 | help | 54 | help |
54 | This driver adds a CPUFreq driver which utilizes the ACPI | 55 | This driver adds a CPUFreq driver which utilizes the ACPI |
diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c index 1d9eb6db732a..09d2e8a10a49 100644 --- a/arch/x86_64/kernel/traps.c +++ b/arch/x86_64/kernel/traps.c | |||
@@ -319,7 +319,7 @@ void dump_trace(struct task_struct *tsk, struct pt_regs *regs, | |||
319 | /* | 319 | /* |
320 | * This handles the process stack: | 320 | * This handles the process stack: |
321 | */ | 321 | */ |
322 | tinfo = current_thread_info(); | 322 | tinfo = task_thread_info(tsk); |
323 | HANDLE_STACK (valid_stack_ptr(tinfo, stack)); | 323 | HANDLE_STACK (valid_stack_ptr(tinfo, stack)); |
324 | #undef HANDLE_STACK | 324 | #undef HANDLE_STACK |
325 | put_cpu(); | 325 | put_cpu(); |
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 4b4217d9be78..07b706243772 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -577,9 +577,9 @@ static int cfq_allow_merge(request_queue_t *q, struct request *rq, | |||
577 | pid_t key; | 577 | pid_t key; |
578 | 578 | ||
579 | /* | 579 | /* |
580 | * Disallow merge, if bio and rq aren't both sync or async | 580 | * Disallow merge of a sync bio into an async request. |
581 | */ | 581 | */ |
582 | if (!!bio_sync(bio) != !!rq_is_sync(rq)) | 582 | if ((bio_data_dir(bio) == READ || bio_sync(bio)) && !rq_is_sync(rq)) |
583 | return 0; | 583 | return 0; |
584 | 584 | ||
585 | /* | 585 | /* |
@@ -592,7 +592,7 @@ static int cfq_allow_merge(request_queue_t *q, struct request *rq, | |||
592 | if (cfqq == RQ_CFQQ(rq)) | 592 | if (cfqq == RQ_CFQQ(rq)) |
593 | return 1; | 593 | return 1; |
594 | 594 | ||
595 | return 1; | 595 | return 0; |
596 | } | 596 | } |
597 | 597 | ||
598 | static inline void | 598 | static inline void |
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c index 10ee22ae5c15..623cec914c9b 100644 --- a/drivers/ata/libata-sff.c +++ b/drivers/ata/libata-sff.c | |||
@@ -1027,13 +1027,15 @@ int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info, | |||
1027 | #endif | 1027 | #endif |
1028 | } | 1028 | } |
1029 | 1029 | ||
1030 | rc = pci_request_regions(pdev, DRV_NAME); | 1030 | if (!legacy_mode) { |
1031 | if (rc) { | 1031 | rc = pci_request_regions(pdev, DRV_NAME); |
1032 | disable_dev_on_err = 0; | 1032 | if (rc) { |
1033 | goto err_out; | 1033 | disable_dev_on_err = 0; |
1034 | } | 1034 | goto err_out; |
1035 | 1035 | } | |
1036 | if (legacy_mode) { | 1036 | } else { |
1037 | /* Deal with combined mode hack. This side of the logic all | ||
1038 | goes away once the combined mode hack is killed in 2.6.21 */ | ||
1037 | if (!request_region(ATA_PRIMARY_CMD, 8, "libata")) { | 1039 | if (!request_region(ATA_PRIMARY_CMD, 8, "libata")) { |
1038 | struct resource *conflict, res; | 1040 | struct resource *conflict, res; |
1039 | res.start = ATA_PRIMARY_CMD; | 1041 | res.start = ATA_PRIMARY_CMD; |
@@ -1071,6 +1073,13 @@ int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info, | |||
1071 | } | 1073 | } |
1072 | } else | 1074 | } else |
1073 | legacy_mode |= ATA_PORT_SECONDARY; | 1075 | legacy_mode |= ATA_PORT_SECONDARY; |
1076 | |||
1077 | if (legacy_mode & ATA_PORT_PRIMARY) | ||
1078 | pci_request_region(pdev, 1, DRV_NAME); | ||
1079 | if (legacy_mode & ATA_PORT_SECONDARY) | ||
1080 | pci_request_region(pdev, 3, DRV_NAME); | ||
1081 | /* If there is a DMA resource, allocate it */ | ||
1082 | pci_request_region(pdev, 4, DRV_NAME); | ||
1074 | } | 1083 | } |
1075 | 1084 | ||
1076 | /* we have legacy mode, but all ports are unavailable */ | 1085 | /* we have legacy mode, but all ports are unavailable */ |
@@ -1114,11 +1123,20 @@ int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info, | |||
1114 | err_out_ent: | 1123 | err_out_ent: |
1115 | kfree(probe_ent); | 1124 | kfree(probe_ent); |
1116 | err_out_regions: | 1125 | err_out_regions: |
1117 | if (legacy_mode & ATA_PORT_PRIMARY) | 1126 | /* All this conditional stuff is needed for the combined mode hack |
1118 | release_region(ATA_PRIMARY_CMD, 8); | 1127 | until 2.6.21 when it can go */ |
1119 | if (legacy_mode & ATA_PORT_SECONDARY) | 1128 | if (legacy_mode) { |
1120 | release_region(ATA_SECONDARY_CMD, 8); | 1129 | pci_release_region(pdev, 4); |
1121 | pci_release_regions(pdev); | 1130 | if (legacy_mode & ATA_PORT_PRIMARY) { |
1131 | release_region(ATA_PRIMARY_CMD, 8); | ||
1132 | pci_release_region(pdev, 1); | ||
1133 | } | ||
1134 | if (legacy_mode & ATA_PORT_SECONDARY) { | ||
1135 | release_region(ATA_SECONDARY_CMD, 8); | ||
1136 | pci_release_region(pdev, 3); | ||
1137 | } | ||
1138 | } else | ||
1139 | pci_release_regions(pdev); | ||
1122 | err_out: | 1140 | err_out: |
1123 | if (disable_dev_on_err) | 1141 | if (disable_dev_on_err) |
1124 | pci_disable_device(pdev); | 1142 | pci_disable_device(pdev); |
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index 66d028d30439..3105dddf59f1 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c | |||
@@ -337,6 +337,12 @@ static const char *mrw_address_space[] = { "DMA", "GAA" }; | |||
337 | /* used in the audio ioctls */ | 337 | /* used in the audio ioctls */ |
338 | #define CHECKAUDIO if ((ret=check_for_audio_disc(cdi, cdo))) return ret | 338 | #define CHECKAUDIO if ((ret=check_for_audio_disc(cdi, cdo))) return ret |
339 | 339 | ||
340 | /* | ||
341 | * Another popular OS uses 7 seconds as the hard timeout for default | ||
342 | * commands, so it is a good choice for us as well. | ||
343 | */ | ||
344 | #define CDROM_DEF_TIMEOUT (7 * HZ) | ||
345 | |||
340 | /* Not-exported routines. */ | 346 | /* Not-exported routines. */ |
341 | static int open_for_data(struct cdrom_device_info * cdi); | 347 | static int open_for_data(struct cdrom_device_info * cdi); |
342 | static int check_for_audio_disc(struct cdrom_device_info * cdi, | 348 | static int check_for_audio_disc(struct cdrom_device_info * cdi, |
@@ -1528,7 +1534,7 @@ void init_cdrom_command(struct packet_command *cgc, void *buf, int len, | |||
1528 | cgc->buffer = (char *) buf; | 1534 | cgc->buffer = (char *) buf; |
1529 | cgc->buflen = len; | 1535 | cgc->buflen = len; |
1530 | cgc->data_direction = type; | 1536 | cgc->data_direction = type; |
1531 | cgc->timeout = 5*HZ; | 1537 | cgc->timeout = CDROM_DEF_TIMEOUT; |
1532 | } | 1538 | } |
1533 | 1539 | ||
1534 | /* DVD handling */ | 1540 | /* DVD handling */ |
diff --git a/drivers/char/agp/agp.h b/drivers/char/agp/agp.h index 8b3317fd46c9..1d59e2a5b9aa 100644 --- a/drivers/char/agp/agp.h +++ b/drivers/char/agp/agp.h | |||
@@ -225,6 +225,10 @@ struct agp_bridge_data { | |||
225 | #define I810_GMS_DISABLE 0x00000000 | 225 | #define I810_GMS_DISABLE 0x00000000 |
226 | #define I810_PGETBL_CTL 0x2020 | 226 | #define I810_PGETBL_CTL 0x2020 |
227 | #define I810_PGETBL_ENABLED 0x00000001 | 227 | #define I810_PGETBL_ENABLED 0x00000001 |
228 | #define I965_PGETBL_SIZE_MASK 0x0000000e | ||
229 | #define I965_PGETBL_SIZE_512KB (0 << 1) | ||
230 | #define I965_PGETBL_SIZE_256KB (1 << 1) | ||
231 | #define I965_PGETBL_SIZE_128KB (2 << 1) | ||
228 | #define I810_DRAM_CTL 0x3000 | 232 | #define I810_DRAM_CTL 0x3000 |
229 | #define I810_DRAM_ROW_0 0x00000001 | 233 | #define I810_DRAM_ROW_0 0x00000001 |
230 | #define I810_DRAM_ROW_0_SDRAM 0x00000001 | 234 | #define I810_DRAM_ROW_0_SDRAM 0x00000001 |
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c index 2f2c4efff8a3..979300405c0e 100644 --- a/drivers/char/agp/amd64-agp.c +++ b/drivers/char/agp/amd64-agp.c | |||
@@ -650,6 +650,15 @@ static struct pci_device_id agp_amd64_pci_table[] = { | |||
650 | .subvendor = PCI_ANY_ID, | 650 | .subvendor = PCI_ANY_ID, |
651 | .subdevice = PCI_ANY_ID, | 651 | .subdevice = PCI_ANY_ID, |
652 | }, | 652 | }, |
653 | /* VIA K8M890 / K8N890 */ | ||
654 | { | ||
655 | .class = (PCI_CLASS_BRIDGE_HOST << 8), | ||
656 | .class_mask = ~0, | ||
657 | .vendor = PCI_VENDOR_ID_VIA, | ||
658 | .device = PCI_DEVICE_ID_VIA_K8M890CE, | ||
659 | .subvendor = PCI_ANY_ID, | ||
660 | .subdevice = PCI_ANY_ID, | ||
661 | }, | ||
653 | /* VIA K8T890 */ | 662 | /* VIA K8T890 */ |
654 | { | 663 | { |
655 | .class = (PCI_CLASS_BRIDGE_HOST << 8), | 664 | .class = (PCI_CLASS_BRIDGE_HOST << 8), |
diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c index 883a36a27833..3491d6f84bc6 100644 --- a/drivers/char/agp/generic.c +++ b/drivers/char/agp/generic.c | |||
@@ -965,6 +965,9 @@ int agp_generic_insert_memory(struct agp_memory * mem, off_t pg_start, int type) | |||
965 | if (!bridge) | 965 | if (!bridge) |
966 | return -EINVAL; | 966 | return -EINVAL; |
967 | 967 | ||
968 | if (mem->page_count == 0) | ||
969 | return 0; | ||
970 | |||
968 | temp = bridge->current_size; | 971 | temp = bridge->current_size; |
969 | 972 | ||
970 | switch (bridge->driver->size_type) { | 973 | switch (bridge->driver->size_type) { |
@@ -1016,8 +1019,8 @@ int agp_generic_insert_memory(struct agp_memory * mem, off_t pg_start, int type) | |||
1016 | 1019 | ||
1017 | for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { | 1020 | for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { |
1018 | writel(bridge->driver->mask_memory(bridge, mem->memory[i], mem->type), bridge->gatt_table+j); | 1021 | writel(bridge->driver->mask_memory(bridge, mem->memory[i], mem->type), bridge->gatt_table+j); |
1019 | readl(bridge->gatt_table+j); /* PCI Posting. */ | ||
1020 | } | 1022 | } |
1023 | readl(bridge->gatt_table+j-1); /* PCI Posting. */ | ||
1021 | 1024 | ||
1022 | bridge->driver->tlb_flush(mem); | 1025 | bridge->driver->tlb_flush(mem); |
1023 | return 0; | 1026 | return 0; |
@@ -1034,6 +1037,9 @@ int agp_generic_remove_memory(struct agp_memory *mem, off_t pg_start, int type) | |||
1034 | if (!bridge) | 1037 | if (!bridge) |
1035 | return -EINVAL; | 1038 | return -EINVAL; |
1036 | 1039 | ||
1040 | if (mem->page_count == 0) | ||
1041 | return 0; | ||
1042 | |||
1037 | if (type != 0 || mem->type != 0) { | 1043 | if (type != 0 || mem->type != 0) { |
1038 | /* The generic routines know nothing of memory types */ | 1044 | /* The generic routines know nothing of memory types */ |
1039 | return -EINVAL; | 1045 | return -EINVAL; |
@@ -1042,10 +1048,9 @@ int agp_generic_remove_memory(struct agp_memory *mem, off_t pg_start, int type) | |||
1042 | /* AK: bogus, should encode addresses > 4GB */ | 1048 | /* AK: bogus, should encode addresses > 4GB */ |
1043 | for (i = pg_start; i < (mem->page_count + pg_start); i++) { | 1049 | for (i = pg_start; i < (mem->page_count + pg_start); i++) { |
1044 | writel(bridge->scratch_page, bridge->gatt_table+i); | 1050 | writel(bridge->scratch_page, bridge->gatt_table+i); |
1045 | readl(bridge->gatt_table+i); /* PCI Posting. */ | ||
1046 | } | 1051 | } |
1052 | readl(bridge->gatt_table+i-1); /* PCI Posting. */ | ||
1047 | 1053 | ||
1048 | global_cache_flush(); | ||
1049 | bridge->driver->tlb_flush(mem); | 1054 | bridge->driver->tlb_flush(mem); |
1050 | return 0; | 1055 | return 0; |
1051 | } | 1056 | } |
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c index 555b3a8ab49c..ab0a9c0ad7c0 100644 --- a/drivers/char/agp/intel-agp.c +++ b/drivers/char/agp/intel-agp.c | |||
@@ -207,6 +207,9 @@ static int intel_i810_insert_entries(struct agp_memory *mem, off_t pg_start, | |||
207 | int i, j, num_entries; | 207 | int i, j, num_entries; |
208 | void *temp; | 208 | void *temp; |
209 | 209 | ||
210 | if (mem->page_count == 0) | ||
211 | return 0; | ||
212 | |||
210 | temp = agp_bridge->current_size; | 213 | temp = agp_bridge->current_size; |
211 | num_entries = A_SIZE_FIX(temp)->num_entries; | 214 | num_entries = A_SIZE_FIX(temp)->num_entries; |
212 | 215 | ||
@@ -221,12 +224,16 @@ static int intel_i810_insert_entries(struct agp_memory *mem, off_t pg_start, | |||
221 | if (type != 0 || mem->type != 0) { | 224 | if (type != 0 || mem->type != 0) { |
222 | if ((type == AGP_DCACHE_MEMORY) && (mem->type == AGP_DCACHE_MEMORY)) { | 225 | if ((type == AGP_DCACHE_MEMORY) && (mem->type == AGP_DCACHE_MEMORY)) { |
223 | /* special insert */ | 226 | /* special insert */ |
224 | global_cache_flush(); | 227 | if (!mem->is_flushed) { |
228 | global_cache_flush(); | ||
229 | mem->is_flushed = TRUE; | ||
230 | } | ||
231 | |||
225 | for (i = pg_start; i < (pg_start + mem->page_count); i++) { | 232 | for (i = pg_start; i < (pg_start + mem->page_count); i++) { |
226 | writel((i*4096)|I810_PTE_LOCAL|I810_PTE_VALID, intel_i810_private.registers+I810_PTE_BASE+(i*4)); | 233 | writel((i*4096)|I810_PTE_LOCAL|I810_PTE_VALID, intel_i810_private.registers+I810_PTE_BASE+(i*4)); |
227 | readl(intel_i810_private.registers+I810_PTE_BASE+(i*4)); /* PCI Posting. */ | ||
228 | } | 234 | } |
229 | global_cache_flush(); | 235 | readl(intel_i810_private.registers+I810_PTE_BASE+((i-1)*4)); /* PCI Posting. */ |
236 | |||
230 | agp_bridge->driver->tlb_flush(mem); | 237 | agp_bridge->driver->tlb_flush(mem); |
231 | return 0; | 238 | return 0; |
232 | } | 239 | } |
@@ -236,14 +243,17 @@ static int intel_i810_insert_entries(struct agp_memory *mem, off_t pg_start, | |||
236 | } | 243 | } |
237 | 244 | ||
238 | insert: | 245 | insert: |
239 | global_cache_flush(); | 246 | if (!mem->is_flushed) { |
247 | global_cache_flush(); | ||
248 | mem->is_flushed = TRUE; | ||
249 | } | ||
250 | |||
240 | for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { | 251 | for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { |
241 | writel(agp_bridge->driver->mask_memory(agp_bridge, | 252 | writel(agp_bridge->driver->mask_memory(agp_bridge, |
242 | mem->memory[i], mem->type), | 253 | mem->memory[i], mem->type), |
243 | intel_i810_private.registers+I810_PTE_BASE+(j*4)); | 254 | intel_i810_private.registers+I810_PTE_BASE+(j*4)); |
244 | readl(intel_i810_private.registers+I810_PTE_BASE+(j*4)); /* PCI Posting. */ | ||
245 | } | 255 | } |
246 | global_cache_flush(); | 256 | readl(intel_i810_private.registers+I810_PTE_BASE+((j-1)*4)); /* PCI Posting. */ |
247 | 257 | ||
248 | agp_bridge->driver->tlb_flush(mem); | 258 | agp_bridge->driver->tlb_flush(mem); |
249 | return 0; | 259 | return 0; |
@@ -254,12 +264,14 @@ static int intel_i810_remove_entries(struct agp_memory *mem, off_t pg_start, | |||
254 | { | 264 | { |
255 | int i; | 265 | int i; |
256 | 266 | ||
267 | if (mem->page_count == 0) | ||
268 | return 0; | ||
269 | |||
257 | for (i = pg_start; i < (mem->page_count + pg_start); i++) { | 270 | for (i = pg_start; i < (mem->page_count + pg_start); i++) { |
258 | writel(agp_bridge->scratch_page, intel_i810_private.registers+I810_PTE_BASE+(i*4)); | 271 | writel(agp_bridge->scratch_page, intel_i810_private.registers+I810_PTE_BASE+(i*4)); |
259 | readl(intel_i810_private.registers+I810_PTE_BASE+(i*4)); /* PCI Posting. */ | ||
260 | } | 272 | } |
273 | readl(intel_i810_private.registers+I810_PTE_BASE+((i-1)*4)); | ||
261 | 274 | ||
262 | global_cache_flush(); | ||
263 | agp_bridge->driver->tlb_flush(mem); | 275 | agp_bridge->driver->tlb_flush(mem); |
264 | return 0; | 276 | return 0; |
265 | } | 277 | } |
@@ -370,6 +382,11 @@ static struct _intel_i830_private { | |||
370 | struct pci_dev *i830_dev; /* device one */ | 382 | struct pci_dev *i830_dev; /* device one */ |
371 | volatile u8 __iomem *registers; | 383 | volatile u8 __iomem *registers; |
372 | volatile u32 __iomem *gtt; /* I915G */ | 384 | volatile u32 __iomem *gtt; /* I915G */ |
385 | /* gtt_entries is the number of gtt entries that are already mapped | ||
386 | * to stolen memory. Stolen memory is larger than the memory mapped | ||
387 | * through gtt_entries, as it includes some reserved space for the BIOS | ||
388 | * popup and for the GTT. | ||
389 | */ | ||
373 | int gtt_entries; | 390 | int gtt_entries; |
374 | } intel_i830_private; | 391 | } intel_i830_private; |
375 | 392 | ||
@@ -380,14 +397,41 @@ static void intel_i830_init_gtt_entries(void) | |||
380 | u8 rdct; | 397 | u8 rdct; |
381 | int local = 0; | 398 | int local = 0; |
382 | static const int ddt[4] = { 0, 16, 32, 64 }; | 399 | static const int ddt[4] = { 0, 16, 32, 64 }; |
383 | int size; | 400 | int size; /* reserved space (in kb) at the top of stolen memory */ |
384 | 401 | ||
385 | pci_read_config_word(agp_bridge->dev,I830_GMCH_CTRL,&gmch_ctrl); | 402 | pci_read_config_word(agp_bridge->dev,I830_GMCH_CTRL,&gmch_ctrl); |
386 | 403 | ||
387 | /* We obtain the size of the GTT, which is also stored (for some | 404 | if (IS_I965) { |
388 | * reason) at the top of stolen memory. Then we add 4KB to that | 405 | u32 pgetbl_ctl; |
389 | * for the video BIOS popup, which is also stored in there. */ | 406 | |
390 | size = agp_bridge->driver->fetch_size() + 4; | 407 | pci_read_config_dword(agp_bridge->dev, I810_PGETBL_CTL, |
408 | &pgetbl_ctl); | ||
409 | /* The 965 has a field telling us the size of the GTT, | ||
410 | * which may be larger than what is necessary to map the | ||
411 | * aperture. | ||
412 | */ | ||
413 | switch (pgetbl_ctl & I965_PGETBL_SIZE_MASK) { | ||
414 | case I965_PGETBL_SIZE_128KB: | ||
415 | size = 128; | ||
416 | break; | ||
417 | case I965_PGETBL_SIZE_256KB: | ||
418 | size = 256; | ||
419 | break; | ||
420 | case I965_PGETBL_SIZE_512KB: | ||
421 | size = 512; | ||
422 | break; | ||
423 | default: | ||
424 | printk(KERN_INFO PFX "Unknown page table size, " | ||
425 | "assuming 512KB\n"); | ||
426 | size = 512; | ||
427 | } | ||
428 | size += 4; /* add in BIOS popup space */ | ||
429 | } else { | ||
430 | /* On previous hardware, the GTT size was just what was | ||
431 | * required to map the aperture. | ||
432 | */ | ||
433 | size = agp_bridge->driver->fetch_size() + 4; | ||
434 | } | ||
391 | 435 | ||
392 | if (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82830_HB || | 436 | if (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82830_HB || |
393 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82845G_HB) { | 437 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82845G_HB) { |
@@ -576,6 +620,9 @@ static int intel_i830_insert_entries(struct agp_memory *mem,off_t pg_start, int | |||
576 | int i,j,num_entries; | 620 | int i,j,num_entries; |
577 | void *temp; | 621 | void *temp; |
578 | 622 | ||
623 | if (mem->page_count == 0) | ||
624 | return 0; | ||
625 | |||
579 | temp = agp_bridge->current_size; | 626 | temp = agp_bridge->current_size; |
580 | num_entries = A_SIZE_FIX(temp)->num_entries; | 627 | num_entries = A_SIZE_FIX(temp)->num_entries; |
581 | 628 | ||
@@ -598,16 +645,18 @@ static int intel_i830_insert_entries(struct agp_memory *mem,off_t pg_start, int | |||
598 | (mem->type != 0 && mem->type != AGP_PHYS_MEMORY)) | 645 | (mem->type != 0 && mem->type != AGP_PHYS_MEMORY)) |
599 | return -EINVAL; | 646 | return -EINVAL; |
600 | 647 | ||
601 | global_cache_flush(); /* FIXME: Necessary ?*/ | 648 | if (!mem->is_flushed) { |
649 | global_cache_flush(); | ||
650 | mem->is_flushed = TRUE; | ||
651 | } | ||
602 | 652 | ||
603 | for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { | 653 | for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { |
604 | writel(agp_bridge->driver->mask_memory(agp_bridge, | 654 | writel(agp_bridge->driver->mask_memory(agp_bridge, |
605 | mem->memory[i], mem->type), | 655 | mem->memory[i], mem->type), |
606 | intel_i830_private.registers+I810_PTE_BASE+(j*4)); | 656 | intel_i830_private.registers+I810_PTE_BASE+(j*4)); |
607 | readl(intel_i830_private.registers+I810_PTE_BASE+(j*4)); /* PCI Posting. */ | ||
608 | } | 657 | } |
658 | readl(intel_i830_private.registers+I810_PTE_BASE+((j-1)*4)); | ||
609 | 659 | ||
610 | global_cache_flush(); | ||
611 | agp_bridge->driver->tlb_flush(mem); | 660 | agp_bridge->driver->tlb_flush(mem); |
612 | return 0; | 661 | return 0; |
613 | } | 662 | } |
@@ -617,7 +666,8 @@ static int intel_i830_remove_entries(struct agp_memory *mem,off_t pg_start, | |||
617 | { | 666 | { |
618 | int i; | 667 | int i; |
619 | 668 | ||
620 | global_cache_flush(); | 669 | if (mem->page_count == 0) |
670 | return 0; | ||
621 | 671 | ||
622 | if (pg_start < intel_i830_private.gtt_entries) { | 672 | if (pg_start < intel_i830_private.gtt_entries) { |
623 | printk (KERN_INFO PFX "Trying to disable local/stolen memory\n"); | 673 | printk (KERN_INFO PFX "Trying to disable local/stolen memory\n"); |
@@ -626,10 +676,9 @@ static int intel_i830_remove_entries(struct agp_memory *mem,off_t pg_start, | |||
626 | 676 | ||
627 | for (i = pg_start; i < (mem->page_count + pg_start); i++) { | 677 | for (i = pg_start; i < (mem->page_count + pg_start); i++) { |
628 | writel(agp_bridge->scratch_page, intel_i830_private.registers+I810_PTE_BASE+(i*4)); | 678 | writel(agp_bridge->scratch_page, intel_i830_private.registers+I810_PTE_BASE+(i*4)); |
629 | readl(intel_i830_private.registers+I810_PTE_BASE+(i*4)); /* PCI Posting. */ | ||
630 | } | 679 | } |
680 | readl(intel_i830_private.registers+I810_PTE_BASE+((i-1)*4)); | ||
631 | 681 | ||
632 | global_cache_flush(); | ||
633 | agp_bridge->driver->tlb_flush(mem); | 682 | agp_bridge->driver->tlb_flush(mem); |
634 | return 0; | 683 | return 0; |
635 | } | 684 | } |
@@ -686,6 +735,9 @@ static int intel_i915_insert_entries(struct agp_memory *mem,off_t pg_start, | |||
686 | int i,j,num_entries; | 735 | int i,j,num_entries; |
687 | void *temp; | 736 | void *temp; |
688 | 737 | ||
738 | if (mem->page_count == 0) | ||
739 | return 0; | ||
740 | |||
689 | temp = agp_bridge->current_size; | 741 | temp = agp_bridge->current_size; |
690 | num_entries = A_SIZE_FIX(temp)->num_entries; | 742 | num_entries = A_SIZE_FIX(temp)->num_entries; |
691 | 743 | ||
@@ -708,15 +760,17 @@ static int intel_i915_insert_entries(struct agp_memory *mem,off_t pg_start, | |||
708 | (mem->type != 0 && mem->type != AGP_PHYS_MEMORY)) | 760 | (mem->type != 0 && mem->type != AGP_PHYS_MEMORY)) |
709 | return -EINVAL; | 761 | return -EINVAL; |
710 | 762 | ||
711 | global_cache_flush(); | 763 | if (!mem->is_flushed) { |
764 | global_cache_flush(); | ||
765 | mem->is_flushed = TRUE; | ||
766 | } | ||
712 | 767 | ||
713 | for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { | 768 | for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { |
714 | writel(agp_bridge->driver->mask_memory(agp_bridge, | 769 | writel(agp_bridge->driver->mask_memory(agp_bridge, |
715 | mem->memory[i], mem->type), intel_i830_private.gtt+j); | 770 | mem->memory[i], mem->type), intel_i830_private.gtt+j); |
716 | readl(intel_i830_private.gtt+j); /* PCI Posting. */ | ||
717 | } | 771 | } |
772 | readl(intel_i830_private.gtt+j-1); | ||
718 | 773 | ||
719 | global_cache_flush(); | ||
720 | agp_bridge->driver->tlb_flush(mem); | 774 | agp_bridge->driver->tlb_flush(mem); |
721 | return 0; | 775 | return 0; |
722 | } | 776 | } |
@@ -726,7 +780,8 @@ static int intel_i915_remove_entries(struct agp_memory *mem,off_t pg_start, | |||
726 | { | 780 | { |
727 | int i; | 781 | int i; |
728 | 782 | ||
729 | global_cache_flush(); | 783 | if (mem->page_count == 0) |
784 | return 0; | ||
730 | 785 | ||
731 | if (pg_start < intel_i830_private.gtt_entries) { | 786 | if (pg_start < intel_i830_private.gtt_entries) { |
732 | printk (KERN_INFO PFX "Trying to disable local/stolen memory\n"); | 787 | printk (KERN_INFO PFX "Trying to disable local/stolen memory\n"); |
@@ -735,30 +790,34 @@ static int intel_i915_remove_entries(struct agp_memory *mem,off_t pg_start, | |||
735 | 790 | ||
736 | for (i = pg_start; i < (mem->page_count + pg_start); i++) { | 791 | for (i = pg_start; i < (mem->page_count + pg_start); i++) { |
737 | writel(agp_bridge->scratch_page, intel_i830_private.gtt+i); | 792 | writel(agp_bridge->scratch_page, intel_i830_private.gtt+i); |
738 | readl(intel_i830_private.gtt+i); | ||
739 | } | 793 | } |
794 | readl(intel_i830_private.gtt+i-1); | ||
740 | 795 | ||
741 | global_cache_flush(); | ||
742 | agp_bridge->driver->tlb_flush(mem); | 796 | agp_bridge->driver->tlb_flush(mem); |
743 | return 0; | 797 | return 0; |
744 | } | 798 | } |
745 | 799 | ||
746 | static int intel_i915_fetch_size(void) | 800 | /* Return the aperture size by just checking the resource length. The effect |
801 | * described in the spec of the MSAC registers is just changing of the | ||
802 | * resource size. | ||
803 | */ | ||
804 | static int intel_i9xx_fetch_size(void) | ||
747 | { | 805 | { |
748 | struct aper_size_info_fixed *values; | 806 | int num_sizes = sizeof(intel_i830_sizes) / sizeof(*intel_i830_sizes); |
749 | u32 temp, offset; | 807 | int aper_size; /* size in megabytes */ |
808 | int i; | ||
750 | 809 | ||
751 | #define I915_256MB_ADDRESS_MASK (1<<27) | 810 | aper_size = pci_resource_len(intel_i830_private.i830_dev, 2) / MB(1); |
752 | 811 | ||
753 | values = A_SIZE_FIX(agp_bridge->driver->aperture_sizes); | 812 | for (i = 0; i < num_sizes; i++) { |
813 | if (aper_size == intel_i830_sizes[i].size) { | ||
814 | agp_bridge->current_size = intel_i830_sizes + i; | ||
815 | agp_bridge->previous_size = agp_bridge->current_size; | ||
816 | return aper_size; | ||
817 | } | ||
818 | } | ||
754 | 819 | ||
755 | pci_read_config_dword(intel_i830_private.i830_dev, I915_GMADDR, &temp); | 820 | return 0; |
756 | if (temp & I915_256MB_ADDRESS_MASK) | ||
757 | offset = 0; /* 128MB aperture */ | ||
758 | else | ||
759 | offset = 2; /* 256MB aperture */ | ||
760 | agp_bridge->previous_size = agp_bridge->current_size = (void *)(values + offset); | ||
761 | return values[offset].size; | ||
762 | } | 821 | } |
763 | 822 | ||
764 | /* The intel i915 automatically initializes the agp aperture during POST. | 823 | /* The intel i915 automatically initializes the agp aperture during POST. |
@@ -821,40 +880,9 @@ static unsigned long intel_i965_mask_memory(struct agp_bridge_data *bridge, | |||
821 | return addr | bridge->driver->masks[type].mask; | 880 | return addr | bridge->driver->masks[type].mask; |
822 | } | 881 | } |
823 | 882 | ||
824 | static int intel_i965_fetch_size(void) | ||
825 | { | ||
826 | struct aper_size_info_fixed *values; | ||
827 | u32 offset = 0; | ||
828 | u8 temp; | ||
829 | |||
830 | #define I965_512MB_ADDRESS_MASK (3<<1) | ||
831 | |||
832 | values = A_SIZE_FIX(agp_bridge->driver->aperture_sizes); | ||
833 | |||
834 | pci_read_config_byte(intel_i830_private.i830_dev, I965_MSAC, &temp); | ||
835 | temp &= I965_512MB_ADDRESS_MASK; | ||
836 | switch (temp) { | ||
837 | case 0x00: | ||
838 | offset = 0; /* 128MB */ | ||
839 | break; | ||
840 | case 0x06: | ||
841 | offset = 3; /* 512MB */ | ||
842 | break; | ||
843 | default: | ||
844 | case 0x02: | ||
845 | offset = 2; /* 256MB */ | ||
846 | break; | ||
847 | } | ||
848 | |||
849 | agp_bridge->previous_size = agp_bridge->current_size = (void *)(values + offset); | ||
850 | |||
851 | /* The i965 GTT is always sized as if it had a 512kB aperture size */ | ||
852 | return 512; | ||
853 | } | ||
854 | |||
855 | /* The intel i965 automatically initializes the agp aperture during POST. | 883 | /* The intel i965 automatically initializes the agp aperture during POST. |
856 | + * Use the memory already set aside for in the GTT. | 884 | * Use the memory already set aside for in the GTT. |
857 | + */ | 885 | */ |
858 | static int intel_i965_create_gatt_table(struct agp_bridge_data *bridge) | 886 | static int intel_i965_create_gatt_table(struct agp_bridge_data *bridge) |
859 | { | 887 | { |
860 | int page_order; | 888 | int page_order; |
@@ -1574,7 +1602,7 @@ static struct agp_bridge_driver intel_915_driver = { | |||
1574 | .num_aperture_sizes = 4, | 1602 | .num_aperture_sizes = 4, |
1575 | .needs_scratch_page = TRUE, | 1603 | .needs_scratch_page = TRUE, |
1576 | .configure = intel_i915_configure, | 1604 | .configure = intel_i915_configure, |
1577 | .fetch_size = intel_i915_fetch_size, | 1605 | .fetch_size = intel_i9xx_fetch_size, |
1578 | .cleanup = intel_i915_cleanup, | 1606 | .cleanup = intel_i915_cleanup, |
1579 | .tlb_flush = intel_i810_tlbflush, | 1607 | .tlb_flush = intel_i810_tlbflush, |
1580 | .mask_memory = intel_i810_mask_memory, | 1608 | .mask_memory = intel_i810_mask_memory, |
@@ -1598,7 +1626,7 @@ static struct agp_bridge_driver intel_i965_driver = { | |||
1598 | .num_aperture_sizes = 4, | 1626 | .num_aperture_sizes = 4, |
1599 | .needs_scratch_page = TRUE, | 1627 | .needs_scratch_page = TRUE, |
1600 | .configure = intel_i915_configure, | 1628 | .configure = intel_i915_configure, |
1601 | .fetch_size = intel_i965_fetch_size, | 1629 | .fetch_size = intel_i9xx_fetch_size, |
1602 | .cleanup = intel_i915_cleanup, | 1630 | .cleanup = intel_i915_cleanup, |
1603 | .tlb_flush = intel_i810_tlbflush, | 1631 | .tlb_flush = intel_i810_tlbflush, |
1604 | .mask_memory = intel_i965_mask_memory, | 1632 | .mask_memory = intel_i965_mask_memory, |
diff --git a/drivers/char/agp/sgi-agp.c b/drivers/char/agp/sgi-agp.c index d73be4c2db8a..902648db7efa 100644 --- a/drivers/char/agp/sgi-agp.c +++ b/drivers/char/agp/sgi-agp.c | |||
@@ -281,10 +281,11 @@ static int __devinit agp_sgi_init(void) | |||
281 | else | 281 | else |
282 | return 0; | 282 | return 0; |
283 | 283 | ||
284 | sgi_tioca_agp_bridges = | 284 | sgi_tioca_agp_bridges = kmalloc(tioca_gart_found * |
285 | (struct agp_bridge_data **)kmalloc(tioca_gart_found * | 285 | sizeof(struct agp_bridge_data *), |
286 | sizeof(struct agp_bridge_data *), | 286 | GFP_KERNEL); |
287 | GFP_KERNEL); | 287 | if (!sgi_tioca_agp_bridges) |
288 | return -ENOMEM; | ||
288 | 289 | ||
289 | j = 0; | 290 | j = 0; |
290 | list_for_each_entry(info, &tioca_list, ca_list) { | 291 | list_for_each_entry(info, &tioca_list, ca_list) { |
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c index 6742b1adf2c8..91ad342a6051 100644 --- a/drivers/cpufreq/cpufreq_stats.c +++ b/drivers/cpufreq/cpufreq_stats.c | |||
@@ -285,6 +285,7 @@ cpufreq_stat_notifier_trans (struct notifier_block *nb, unsigned long val, | |||
285 | stat = cpufreq_stats_table[freq->cpu]; | 285 | stat = cpufreq_stats_table[freq->cpu]; |
286 | if (!stat) | 286 | if (!stat) |
287 | return 0; | 287 | return 0; |
288 | |||
288 | old_index = freq_table_get_index(stat, freq->old); | 289 | old_index = freq_table_get_index(stat, freq->old); |
289 | new_index = freq_table_get_index(stat, freq->new); | 290 | new_index = freq_table_get_index(stat, freq->new); |
290 | 291 | ||
@@ -292,6 +293,9 @@ cpufreq_stat_notifier_trans (struct notifier_block *nb, unsigned long val, | |||
292 | if (old_index == new_index) | 293 | if (old_index == new_index) |
293 | return 0; | 294 | return 0; |
294 | 295 | ||
296 | if (old_index == -1 || new_index == -1) | ||
297 | return 0; | ||
298 | |||
295 | spin_lock(&cpufreq_stats_lock); | 299 | spin_lock(&cpufreq_stats_lock); |
296 | stat->last_index = new_index; | 300 | stat->last_index = new_index; |
297 | #ifdef CONFIG_CPU_FREQ_STAT_DETAILS | 301 | #ifdef CONFIG_CPU_FREQ_STAT_DETAILS |
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig index 96d4a0bb2203..ec796ad087df 100644 --- a/drivers/hid/Kconfig +++ b/drivers/hid/Kconfig | |||
@@ -6,13 +6,21 @@ menu "HID Devices" | |||
6 | 6 | ||
7 | config HID | 7 | config HID |
8 | tristate "Generic HID support" | 8 | tristate "Generic HID support" |
9 | depends on INPUT | ||
9 | default y | 10 | default y |
10 | ---help--- | 11 | ---help--- |
11 | Say Y here if you want generic HID support to connect keyboards, | 12 | A human interface device (HID) is a type of computer device that |
12 | mice, joysticks, graphic tablets, or any other HID based devices | 13 | interacts directly with and takes input from humans. The term "HID" |
13 | to your computer. You also need to select particular types of | 14 | most commonly used to refer to the USB-HID specification, but other |
14 | HID devices you want to compile support for, in the particular | 15 | devices (such as, but not strictly limited to, Bluetooth) are |
15 | driver menu (USB, Bluetooth) | 16 | designed using HID specification (this involves certain keyboards, |
17 | mice, tablets, etc). This option compiles into kernel the generic | ||
18 | HID layer code (parser, usages, etc.), which can then be used by | ||
19 | transport-specific HID implementation (like USB or Bluetooth). | ||
20 | |||
21 | For docs and specs, see http://www.usb.org/developers/hidpage/ | ||
22 | |||
23 | If unsure, say Y | ||
16 | 24 | ||
17 | endmenu | 25 | endmenu |
18 | 26 | ||
diff --git a/drivers/usb/input/Kconfig b/drivers/usb/input/Kconfig index f877cd4f317a..258a5d09d3dc 100644 --- a/drivers/usb/input/Kconfig +++ b/drivers/usb/input/Kconfig | |||
@@ -12,10 +12,8 @@ config USB_HID | |||
12 | ---help--- | 12 | ---help--- |
13 | Say Y here if you want full HID support to connect USB keyboards, | 13 | Say Y here if you want full HID support to connect USB keyboards, |
14 | mice, joysticks, graphic tablets, or any other HID based devices | 14 | mice, joysticks, graphic tablets, or any other HID based devices |
15 | to your computer via USB. You also need to select HID Input layer | 15 | to your computer via USB, as well as Uninterruptible Power Supply |
16 | support (below) if you want to use keyboards, mice, joysticks and | 16 | (UPS) and monitor control devices. |
17 | the like ... as well as Uninterruptible Power Supply (UPS) and | ||
18 | monitor control devices. | ||
19 | 17 | ||
20 | You can't use this driver and the HIDBP (Boot Protocol) keyboard | 18 | You can't use this driver and the HIDBP (Boot Protocol) keyboard |
21 | and mouse drivers at the same time. More information is available: | 19 | and mouse drivers at the same time. More information is available: |
diff --git a/include/asm-arm/arch-ep93xx/irqs.h b/include/asm-arm/arch-ep93xx/irqs.h index 9a42f5de9e57..ae532e304bf1 100644 --- a/include/asm-arm/arch-ep93xx/irqs.h +++ b/include/asm-arm/arch-ep93xx/irqs.h | |||
@@ -22,9 +22,9 @@ | |||
22 | #define IRQ_EP93XX_DMAM2P9 16 | 22 | #define IRQ_EP93XX_DMAM2P9 16 |
23 | #define IRQ_EP93XX_DMAM2M0 17 | 23 | #define IRQ_EP93XX_DMAM2M0 17 |
24 | #define IRQ_EP93XX_DMAM2M1 18 | 24 | #define IRQ_EP93XX_DMAM2M1 18 |
25 | #define IRQ_EP93XX_GPIO0MUX 20 | 25 | #define IRQ_EP93XX_GPIO0MUX 19 |
26 | #define IRQ_EP93XX_GPIO1MUX 21 | 26 | #define IRQ_EP93XX_GPIO1MUX 20 |
27 | #define IRQ_EP93XX_GPIO2MUX 22 | 27 | #define IRQ_EP93XX_GPIO2MUX 21 |
28 | #define IRQ_EP93XX_GPIO3MUX 22 | 28 | #define IRQ_EP93XX_GPIO3MUX 22 |
29 | #define IRQ_EP93XX_UART1RX 23 | 29 | #define IRQ_EP93XX_UART1RX 23 |
30 | #define IRQ_EP93XX_UART1TX 24 | 30 | #define IRQ_EP93XX_UART1TX 24 |
diff --git a/include/asm-arm/arch-iop13xx/io.h b/include/asm-arm/arch-iop13xx/io.h index db6de2480a24..5a7bdb526606 100644 --- a/include/asm-arm/arch-iop13xx/io.h +++ b/include/asm-arm/arch-iop13xx/io.h | |||
@@ -21,10 +21,11 @@ | |||
21 | 21 | ||
22 | #define IO_SPACE_LIMIT 0xffffffff | 22 | #define IO_SPACE_LIMIT 0xffffffff |
23 | 23 | ||
24 | #define __io(a) (a) | 24 | #define __io(a) __iop13xx_io(a) |
25 | #define __mem_pci(a) (a) | 25 | #define __mem_pci(a) (a) |
26 | #define __mem_isa(a) (a) | 26 | #define __mem_isa(a) (a) |
27 | 27 | ||
28 | extern void __iomem * __iop13xx_io(unsigned long io_addr); | ||
28 | extern void __iomem * __ioremap(unsigned long, size_t, unsigned long); | 29 | extern void __iomem * __ioremap(unsigned long, size_t, unsigned long); |
29 | extern void __iomem *__iop13xx_ioremap(unsigned long cookie, size_t size, | 30 | extern void __iomem *__iop13xx_ioremap(unsigned long cookie, size_t size, |
30 | unsigned long flags); | 31 | unsigned long flags); |
diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h index 083e03c5639f..e24f6b6c79ae 100644 --- a/include/asm-arm/arch-pxa/pxa-regs.h +++ b/include/asm-arm/arch-pxa/pxa-regs.h | |||
@@ -1626,7 +1626,7 @@ | |||
1626 | #define SSCR0_RIM (1 << 22) /* Receive FIFO overrrun interrupt mask */ | 1626 | #define SSCR0_RIM (1 << 22) /* Receive FIFO overrrun interrupt mask */ |
1627 | #define SSCR0_TUM (1 << 23) /* Transmit FIFO underrun interrupt mask */ | 1627 | #define SSCR0_TUM (1 << 23) /* Transmit FIFO underrun interrupt mask */ |
1628 | #define SSCR0_FRDC (0x07000000) /* Frame rate divider control (mask) */ | 1628 | #define SSCR0_FRDC (0x07000000) /* Frame rate divider control (mask) */ |
1629 | #define SSCR0_SlotsPerFrm(x) ((x) - 1) /* Time slots per frame [1..8] */ | 1629 | #define SSCR0_SlotsPerFrm(x) (((x) - 1) << 24) /* Time slots per frame [1..8] */ |
1630 | #define SSCR0_ADC (1 << 30) /* Audio clock select */ | 1630 | #define SSCR0_ADC (1 << 30) /* Audio clock select */ |
1631 | #define SSCR0_MOD (1 << 31) /* Mode (normal or network) */ | 1631 | #define SSCR0_MOD (1 << 31) /* Mode (normal or network) */ |
1632 | #endif | 1632 | #endif |
@@ -1655,6 +1655,7 @@ | |||
1655 | #define SSCR0_EDSS (1 << 20) /* Extended Data Size Select */ | 1655 | #define SSCR0_EDSS (1 << 20) /* Extended Data Size Select */ |
1656 | 1656 | ||
1657 | /* extra bits in PXA255, PXA26x and PXA27x SSP ports */ | 1657 | /* extra bits in PXA255, PXA26x and PXA27x SSP ports */ |
1658 | #define SSCR0_TISSP (1 << 4) /* TI Sync Serial Protocol */ | ||
1658 | #define SSCR0_PSP (3 << 4) /* PSP - Programmable Serial Protocol */ | 1659 | #define SSCR0_PSP (3 << 4) /* PSP - Programmable Serial Protocol */ |
1659 | #define SSCR1_TTELP (1 << 31) /* TXD Tristate Enable Last Phase */ | 1660 | #define SSCR1_TTELP (1 << 31) /* TXD Tristate Enable Last Phase */ |
1660 | #define SSCR1_TTE (1 << 30) /* TXD Tristate Enable */ | 1661 | #define SSCR1_TTE (1 << 30) /* TXD Tristate Enable */ |
diff --git a/include/asm-arm/arch-s3c2410/dma.h b/include/asm-arm/arch-s3c2410/dma.h index 7ac224836971..58ffa7ba3c88 100644 --- a/include/asm-arm/arch-s3c2410/dma.h +++ b/include/asm-arm/arch-s3c2410/dma.h | |||
@@ -14,7 +14,7 @@ | |||
14 | #define __ASM_ARCH_DMA_H __FILE__ | 14 | #define __ASM_ARCH_DMA_H __FILE__ |
15 | 15 | ||
16 | #include <linux/sysdev.h> | 16 | #include <linux/sysdev.h> |
17 | #include "hardware.h" | 17 | #include <asm/hardware.h> |
18 | 18 | ||
19 | /* | 19 | /* |
20 | * This is the maximum DMA address(physical address) that can be DMAd to. | 20 | * This is the maximum DMA address(physical address) that can be DMAd to. |
diff --git a/include/asm-arm/arch-s3c2410/entry-macro.S b/include/asm-arm/arch-s3c2410/entry-macro.S index e09a6b8ec153..1eb4e6b8d249 100644 --- a/include/asm-arm/arch-s3c2410/entry-macro.S +++ b/include/asm-arm/arch-s3c2410/entry-macro.S | |||
@@ -20,7 +20,7 @@ | |||
20 | #define INTOFFSET (0x14) | 20 | #define INTOFFSET (0x14) |
21 | 21 | ||
22 | #include <asm/hardware.h> | 22 | #include <asm/hardware.h> |
23 | #include <asm/arch/irqs.h> | 23 | #include <asm/irq.h> |
24 | 24 | ||
25 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 25 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
26 | 26 | ||
diff --git a/include/asm-arm/arch-s3c2410/hardware.h b/include/asm-arm/arch-s3c2410/hardware.h index 729565e5cdf4..6dadf58ff984 100644 --- a/include/asm-arm/arch-s3c2410/hardware.h +++ b/include/asm-arm/arch-s3c2410/hardware.h | |||
@@ -13,6 +13,10 @@ | |||
13 | #ifndef __ASM_ARCH_HARDWARE_H | 13 | #ifndef __ASM_ARCH_HARDWARE_H |
14 | #define __ASM_ARCH_HARDWARE_H | 14 | #define __ASM_ARCH_HARDWARE_H |
15 | 15 | ||
16 | #ifndef __ASM_HARDWARE_H | ||
17 | #error "Do not include this directly, instead #include <asm/hardware.h>" | ||
18 | #endif | ||
19 | |||
16 | #ifndef __ASSEMBLY__ | 20 | #ifndef __ASSEMBLY__ |
17 | 21 | ||
18 | /* external functions for GPIO support | 22 | /* external functions for GPIO support |
diff --git a/include/asm-arm/arch-s3c2410/irqs.h b/include/asm-arm/arch-s3c2410/irqs.h index 39a69829d163..4b7cff456c4e 100644 --- a/include/asm-arm/arch-s3c2410/irqs.h +++ b/include/asm-arm/arch-s3c2410/irqs.h | |||
@@ -12,6 +12,9 @@ | |||
12 | #ifndef __ASM_ARCH_IRQS_H | 12 | #ifndef __ASM_ARCH_IRQS_H |
13 | #define __ASM_ARCH_IRQS_H __FILE__ | 13 | #define __ASM_ARCH_IRQS_H __FILE__ |
14 | 14 | ||
15 | #ifndef __ASM_ARM_IRQ_H | ||
16 | #error "Do not include this directly, instead #include <asm/irq.h>" | ||
17 | #endif | ||
15 | 18 | ||
16 | /* we keep the first set of CPU IRQs out of the range of | 19 | /* we keep the first set of CPU IRQs out of the range of |
17 | * the ISA space, so that the PC104 has them to itself | 20 | * the ISA space, so that the PC104 has them to itself |
diff --git a/include/asm-arm/cacheflush.h b/include/asm-arm/cacheflush.h index 378a3a2ce8d9..d51049522cd0 100644 --- a/include/asm-arm/cacheflush.h +++ b/include/asm-arm/cacheflush.h | |||
@@ -355,6 +355,8 @@ extern void flush_ptrace_access(struct vm_area_struct *vma, struct page *page, | |||
355 | */ | 355 | */ |
356 | extern void flush_dcache_page(struct page *); | 356 | extern void flush_dcache_page(struct page *); |
357 | 357 | ||
358 | extern void __flush_dcache_page(struct address_space *mapping, struct page *page); | ||
359 | |||
358 | #define flush_dcache_mmap_lock(mapping) \ | 360 | #define flush_dcache_mmap_lock(mapping) \ |
359 | write_lock_irq(&(mapping)->tree_lock) | 361 | write_lock_irq(&(mapping)->tree_lock) |
360 | #define flush_dcache_mmap_unlock(mapping) \ | 362 | #define flush_dcache_mmap_unlock(mapping) \ |
diff --git a/include/asm-arm/flat.h b/include/asm-arm/flat.h index 966946478589..16f5375e57b8 100644 --- a/include/asm-arm/flat.h +++ b/include/asm-arm/flat.h | |||
@@ -5,7 +5,9 @@ | |||
5 | #ifndef __ARM_FLAT_H__ | 5 | #ifndef __ARM_FLAT_H__ |
6 | #define __ARM_FLAT_H__ | 6 | #define __ARM_FLAT_H__ |
7 | 7 | ||
8 | #define flat_stack_align(sp) /* nothing needed */ | 8 | /* An odd number of words will be pushed after this alignment, so |
9 | deliberately misalign the value. */ | ||
10 | #define flat_stack_align(sp) sp = (void *)(((unsigned long)(sp) - 4) | 4) | ||
9 | #define flat_argvp_envp_on_stack() 1 | 11 | #define flat_argvp_envp_on_stack() 1 |
10 | #define flat_old_ram_flag(flags) (flags) | 12 | #define flat_old_ram_flag(flags) (flags) |
11 | #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) | 13 | #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) |
diff --git a/include/asm-arm/irq.h b/include/asm-arm/irq.h index 283af50a16cb..1b882a255e35 100644 --- a/include/asm-arm/irq.h +++ b/include/asm-arm/irq.h | |||
@@ -19,7 +19,6 @@ | |||
19 | #define NO_IRQ ((unsigned int)(-1)) | 19 | #define NO_IRQ ((unsigned int)(-1)) |
20 | #endif | 20 | #endif |
21 | 21 | ||
22 | struct irqaction; | ||
23 | 22 | ||
24 | /* | 23 | /* |
25 | * Migration helpers | 24 | * Migration helpers |
@@ -37,6 +36,10 @@ struct irqaction; | |||
37 | #define IRQT_HIGH (__IRQT_HIGHLVL) | 36 | #define IRQT_HIGH (__IRQT_HIGHLVL) |
38 | #define IRQT_PROBE IRQ_TYPE_PROBE | 37 | #define IRQT_PROBE IRQ_TYPE_PROBE |
39 | 38 | ||
39 | #ifndef __ASSEMBLY__ | ||
40 | struct irqaction; | ||
40 | extern void migrate_irqs(void); | 41 | extern void migrate_irqs(void); |
41 | #endif | 42 | #endif |
42 | 43 | ||
44 | #endif | ||
45 | |||
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 778e701eff30..f7a416c52edc 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1277,6 +1277,7 @@ | |||
1277 | #define PCI_DEVICE_ID_VIA_3296_0 0x0296 | 1277 | #define PCI_DEVICE_ID_VIA_3296_0 0x0296 |
1278 | #define PCI_DEVICE_ID_VIA_8363_0 0x0305 | 1278 | #define PCI_DEVICE_ID_VIA_8363_0 0x0305 |
1279 | #define PCI_DEVICE_ID_VIA_P4M800CE 0x0314 | 1279 | #define PCI_DEVICE_ID_VIA_P4M800CE 0x0314 |
1280 | #define PCI_DEVICE_ID_VIA_K8M890CE 0x0336 | ||
1280 | #define PCI_DEVICE_ID_VIA_8371_0 0x0391 | 1281 | #define PCI_DEVICE_ID_VIA_8371_0 0x0391 |
1281 | #define PCI_DEVICE_ID_VIA_8501_0 0x0501 | 1282 | #define PCI_DEVICE_ID_VIA_8501_0 0x0501 |
1282 | #define PCI_DEVICE_ID_VIA_82C561 0x0561 | 1283 | #define PCI_DEVICE_ID_VIA_82C561 0x0561 |
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index bdb7070dd3dc..ee0581557966 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c | |||
@@ -2660,9 +2660,11 @@ int selinux_netlbl_inode_permission(struct inode *inode, int mask) | |||
2660 | rcu_read_unlock(); | 2660 | rcu_read_unlock(); |
2661 | return 0; | 2661 | return 0; |
2662 | } | 2662 | } |
2663 | lock_sock(sock->sk); | 2663 | local_bh_disable(); |
2664 | bh_lock_sock_nested(sock->sk); | ||
2664 | rc = selinux_netlbl_socket_setsid(sock, sksec->sid); | 2665 | rc = selinux_netlbl_socket_setsid(sock, sksec->sid); |
2665 | release_sock(sock->sk); | 2666 | bh_unlock_sock(sock->sk); |
2667 | local_bh_enable(); | ||
2666 | rcu_read_unlock(); | 2668 | rcu_read_unlock(); |
2667 | 2669 | ||
2668 | return rc; | 2670 | return rc; |