diff options
| -rw-r--r-- | CREDITS | 8 | ||||
| -rw-r--r-- | MAINTAINERS | 14 | ||||
| -rw-r--r-- | arch/alpha/kernel/signal.c | 2 | ||||
| -rw-r--r-- | arch/arm/plat-omap/Kconfig | 2 | ||||
| -rw-r--r-- | arch/arm/plat-omap/mcbsp.c | 2 | ||||
| -rw-r--r-- | arch/m68k/mac/macboing.c | 6 | ||||
| -rw-r--r-- | drivers/acpi/processor_driver.c | 2 | ||||
| -rw-r--r-- | drivers/cpuidle/governors/menu.c | 2 | ||||
| -rw-r--r-- | drivers/dma/shdma.c | 3 | ||||
| -rw-r--r-- | drivers/edac/i7core_edac.c | 1 | ||||
| -rw-r--r--[-rwxr-xr-x] | drivers/idle/intel_idle.c | 20 | ||||
| -rw-r--r-- | drivers/mfd/max8925-core.c | 13 | ||||
| -rw-r--r-- | drivers/mfd/wm831x-irq.c | 9 | ||||
| -rw-r--r-- | drivers/mtd/nand/omap2.c | 2 | ||||
| -rw-r--r-- | drivers/pci/quirks.c | 20 | ||||
| -rw-r--r-- | drivers/serial/mfd.c | 1 | ||||
| -rw-r--r-- | drivers/serial/mrst_max3110.c | 1 | ||||
| -rw-r--r-- | fs/ocfs2/symlink.c | 2 | ||||
| -rw-r--r-- | fs/proc/base.c | 4 | ||||
| -rw-r--r-- | fs/reiserfs/ioctl.c | 7 | ||||
| -rw-r--r-- | fs/xfs/xfs_log_cil.c | 12 | ||||
| -rw-r--r-- | fs/xfs/xfs_log_priv.h | 37 | ||||
| -rw-r--r-- | include/linux/cpuidle.h | 1 | ||||
| -rw-r--r-- | include/linux/dmaengine.h | 2 | ||||
| -rw-r--r-- | ipc/sem.c | 2 | ||||
| -rw-r--r-- | kernel/kfifo.c | 2 | ||||
| -rw-r--r-- | lib/list_sort.c | 2 | ||||
| -rw-r--r-- | samples/kfifo/dma-example.c | 17 |
28 files changed, 128 insertions, 68 deletions
| @@ -3554,12 +3554,12 @@ E: cvance@nai.com | |||
| 3554 | D: portions of the Linux Security Module (LSM) framework and security modules | 3554 | D: portions of the Linux Security Module (LSM) framework and security modules |
| 3555 | 3555 | ||
| 3556 | N: Petr Vandrovec | 3556 | N: Petr Vandrovec |
| 3557 | E: vandrove@vc.cvut.cz | 3557 | E: petr@vandrovec.name |
| 3558 | D: Small contributions to ncpfs | 3558 | D: Small contributions to ncpfs |
| 3559 | D: Matrox framebuffer driver | 3559 | D: Matrox framebuffer driver |
| 3560 | S: Chudenicka 8 | 3560 | S: 21513 Conradia Ct |
| 3561 | S: 10200 Prague 10, Hostivar | 3561 | S: Cupertino, CA 95014 |
| 3562 | S: Czech Republic | 3562 | S: USA |
| 3563 | 3563 | ||
| 3564 | N: Thibaut Varene | 3564 | N: Thibaut Varene |
| 3565 | E: T-Bone@parisc-linux.org | 3565 | E: T-Bone@parisc-linux.org |
diff --git a/MAINTAINERS b/MAINTAINERS index 668682d1f5fa..f46d8e66333f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -962,6 +962,13 @@ W: http://www.fluff.org/ben/linux/ | |||
| 962 | S: Maintained | 962 | S: Maintained |
| 963 | F: arch/arm/mach-s3c6410/ | 963 | F: arch/arm/mach-s3c6410/ |
| 964 | 964 | ||
| 965 | ARM/S5P ARM ARCHITECTURES | ||
| 966 | M: Kukjin Kim <kgene.kim@samsung.com> | ||
| 967 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
| 968 | L: linux-samsung-soc@vger.kernel.org (moderated for non-subscribers) | ||
| 969 | S: Maintained | ||
| 970 | F: arch/arm/mach-s5p*/ | ||
| 971 | |||
| 965 | ARM/SHMOBILE ARM ARCHITECTURE | 972 | ARM/SHMOBILE ARM ARCHITECTURE |
| 966 | M: Paul Mundt <lethal@linux-sh.org> | 973 | M: Paul Mundt <lethal@linux-sh.org> |
| 967 | M: Magnus Damm <magnus.damm@gmail.com> | 974 | M: Magnus Damm <magnus.damm@gmail.com> |
| @@ -3781,9 +3788,8 @@ W: http://www.syskonnect.com | |||
| 3781 | S: Supported | 3788 | S: Supported |
| 3782 | 3789 | ||
| 3783 | MATROX FRAMEBUFFER DRIVER | 3790 | MATROX FRAMEBUFFER DRIVER |
| 3784 | M: Petr Vandrovec <vandrove@vc.cvut.cz> | ||
| 3785 | L: linux-fbdev@vger.kernel.org | 3791 | L: linux-fbdev@vger.kernel.org |
| 3786 | S: Maintained | 3792 | S: Orphan |
| 3787 | F: drivers/video/matrox/matroxfb_* | 3793 | F: drivers/video/matrox/matroxfb_* |
| 3788 | F: include/linux/matroxfb.h | 3794 | F: include/linux/matroxfb.h |
| 3789 | 3795 | ||
| @@ -3970,8 +3976,8 @@ S: Maintained | |||
| 3970 | F: drivers/net/natsemi.c | 3976 | F: drivers/net/natsemi.c |
| 3971 | 3977 | ||
| 3972 | NCP FILESYSTEM | 3978 | NCP FILESYSTEM |
| 3973 | M: Petr Vandrovec <vandrove@vc.cvut.cz> | 3979 | M: Petr Vandrovec <petr@vandrovec.name> |
| 3974 | S: Maintained | 3980 | S: Odd Fixes |
| 3975 | F: fs/ncpfs/ | 3981 | F: fs/ncpfs/ |
| 3976 | 3982 | ||
| 3977 | NCR DUAL 700 SCSI DRIVER (MICROCHANNEL) | 3983 | NCR DUAL 700 SCSI DRIVER (MICROCHANNEL) |
diff --git a/arch/alpha/kernel/signal.c b/arch/alpha/kernel/signal.c index d290845aef59..6f7feb5db271 100644 --- a/arch/alpha/kernel/signal.c +++ b/arch/alpha/kernel/signal.c | |||
| @@ -48,7 +48,7 @@ SYSCALL_DEFINE2(osf_sigprocmask, int, how, unsigned long, newmask) | |||
| 48 | sigset_t mask; | 48 | sigset_t mask; |
| 49 | unsigned long res; | 49 | unsigned long res; |
| 50 | 50 | ||
| 51 | siginitset(&mask, newmask & ~_BLOCKABLE); | 51 | siginitset(&mask, newmask & _BLOCKABLE); |
| 52 | res = sigprocmask(how, &mask, &oldmask); | 52 | res = sigprocmask(how, &mask, &oldmask); |
| 53 | if (!res) { | 53 | if (!res) { |
| 54 | force_successful_syscall_return(); | 54 | force_successful_syscall_return(); |
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig index e39a417a368d..a92cb499313f 100644 --- a/arch/arm/plat-omap/Kconfig +++ b/arch/arm/plat-omap/Kconfig | |||
| @@ -33,7 +33,7 @@ config OMAP_DEBUG_DEVICES | |||
| 33 | config OMAP_DEBUG_LEDS | 33 | config OMAP_DEBUG_LEDS |
| 34 | bool | 34 | bool |
| 35 | depends on OMAP_DEBUG_DEVICES | 35 | depends on OMAP_DEBUG_DEVICES |
| 36 | default y if LEDS | 36 | default y if LEDS_CLASS |
| 37 | 37 | ||
| 38 | config OMAP_RESET_CLOCKS | 38 | config OMAP_RESET_CLOCKS |
| 39 | bool "Reset unused clocks during boot" | 39 | bool "Reset unused clocks during boot" |
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c index e31496e35b0f..0c8612fd8312 100644 --- a/arch/arm/plat-omap/mcbsp.c +++ b/arch/arm/plat-omap/mcbsp.c | |||
| @@ -156,7 +156,7 @@ static irqreturn_t omap_mcbsp_rx_irq_handler(int irq, void *dev_id) | |||
| 156 | /* Writing zero to RSYNC_ERR clears the IRQ */ | 156 | /* Writing zero to RSYNC_ERR clears the IRQ */ |
| 157 | MCBSP_WRITE(mcbsp_rx, SPCR1, MCBSP_READ_CACHE(mcbsp_rx, SPCR1)); | 157 | MCBSP_WRITE(mcbsp_rx, SPCR1, MCBSP_READ_CACHE(mcbsp_rx, SPCR1)); |
| 158 | } else { | 158 | } else { |
| 159 | complete(&mcbsp_rx->tx_irq_completion); | 159 | complete(&mcbsp_rx->rx_irq_completion); |
| 160 | } | 160 | } |
| 161 | 161 | ||
| 162 | return IRQ_HANDLED; | 162 | return IRQ_HANDLED; |
diff --git a/arch/m68k/mac/macboing.c b/arch/m68k/mac/macboing.c index 8f0640847ad2..05285d08e547 100644 --- a/arch/m68k/mac/macboing.c +++ b/arch/m68k/mac/macboing.c | |||
| @@ -162,7 +162,7 @@ static void mac_init_asc( void ) | |||
| 162 | void mac_mksound( unsigned int freq, unsigned int length ) | 162 | void mac_mksound( unsigned int freq, unsigned int length ) |
| 163 | { | 163 | { |
| 164 | __u32 cfreq = ( freq << 5 ) / 468; | 164 | __u32 cfreq = ( freq << 5 ) / 468; |
| 165 | __u32 flags; | 165 | unsigned long flags; |
| 166 | int i; | 166 | int i; |
| 167 | 167 | ||
| 168 | if ( mac_special_bell == NULL ) | 168 | if ( mac_special_bell == NULL ) |
| @@ -224,7 +224,7 @@ static void mac_nosound( unsigned long ignored ) | |||
| 224 | */ | 224 | */ |
| 225 | static void mac_quadra_start_bell( unsigned int freq, unsigned int length, unsigned int volume ) | 225 | static void mac_quadra_start_bell( unsigned int freq, unsigned int length, unsigned int volume ) |
| 226 | { | 226 | { |
| 227 | __u32 flags; | 227 | unsigned long flags; |
| 228 | 228 | ||
| 229 | /* if the bell is already ringing, ring longer */ | 229 | /* if the bell is already ringing, ring longer */ |
| 230 | if ( mac_bell_duration > 0 ) | 230 | if ( mac_bell_duration > 0 ) |
| @@ -271,7 +271,7 @@ static void mac_quadra_start_bell( unsigned int freq, unsigned int length, unsig | |||
| 271 | static void mac_quadra_ring_bell( unsigned long ignored ) | 271 | static void mac_quadra_ring_bell( unsigned long ignored ) |
| 272 | { | 272 | { |
| 273 | int i, count = mac_asc_samplespersec / HZ; | 273 | int i, count = mac_asc_samplespersec / HZ; |
| 274 | __u32 flags; | 274 | unsigned long flags; |
| 275 | 275 | ||
| 276 | /* | 276 | /* |
| 277 | * we neither want a sound buffer overflow nor underflow, so we need to match | 277 | * we neither want a sound buffer overflow nor underflow, so we need to match |
diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c index 156021892389..347eb21b2353 100644 --- a/drivers/acpi/processor_driver.c +++ b/drivers/acpi/processor_driver.c | |||
| @@ -850,7 +850,7 @@ static int __init acpi_processor_init(void) | |||
| 850 | printk(KERN_DEBUG "ACPI: %s registered with cpuidle\n", | 850 | printk(KERN_DEBUG "ACPI: %s registered with cpuidle\n", |
| 851 | acpi_idle_driver.name); | 851 | acpi_idle_driver.name); |
| 852 | } else { | 852 | } else { |
| 853 | printk(KERN_DEBUG "ACPI: acpi_idle yielding to %s", | 853 | printk(KERN_DEBUG "ACPI: acpi_idle yielding to %s\n", |
| 854 | cpuidle_get_driver()->name); | 854 | cpuidle_get_driver()->name); |
| 855 | } | 855 | } |
| 856 | 856 | ||
diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c index c2408bbe9c2e..f508690eb958 100644 --- a/drivers/cpuidle/governors/menu.c +++ b/drivers/cpuidle/governors/menu.c | |||
| @@ -80,7 +80,7 @@ | |||
| 80 | * Limiting Performance Impact | 80 | * Limiting Performance Impact |
| 81 | * --------------------------- | 81 | * --------------------------- |
| 82 | * C states, especially those with large exit latencies, can have a real | 82 | * C states, especially those with large exit latencies, can have a real |
| 83 | * noticable impact on workloads, which is not acceptable for most sysadmins, | 83 | * noticeable impact on workloads, which is not acceptable for most sysadmins, |
| 84 | * and in addition, less performance has a power price of its own. | 84 | * and in addition, less performance has a power price of its own. |
| 85 | * | 85 | * |
| 86 | * As a general rule of thumb, menu assumes that the following heuristic | 86 | * As a general rule of thumb, menu assumes that the following heuristic |
diff --git a/drivers/dma/shdma.c b/drivers/dma/shdma.c index fb64cf36ba61..eb6b54dbb806 100644 --- a/drivers/dma/shdma.c +++ b/drivers/dma/shdma.c | |||
| @@ -580,7 +580,6 @@ static struct dma_async_tx_descriptor *sh_dmae_prep_slave_sg( | |||
| 580 | 580 | ||
| 581 | sh_chan = to_sh_chan(chan); | 581 | sh_chan = to_sh_chan(chan); |
| 582 | param = chan->private; | 582 | param = chan->private; |
| 583 | slave_addr = param->config->addr; | ||
| 584 | 583 | ||
| 585 | /* Someone calling slave DMA on a public channel? */ | 584 | /* Someone calling slave DMA on a public channel? */ |
| 586 | if (!param || !sg_len) { | 585 | if (!param || !sg_len) { |
| @@ -589,6 +588,8 @@ static struct dma_async_tx_descriptor *sh_dmae_prep_slave_sg( | |||
| 589 | return NULL; | 588 | return NULL; |
| 590 | } | 589 | } |
| 591 | 590 | ||
| 591 | slave_addr = param->config->addr; | ||
| 592 | |||
| 592 | /* | 593 | /* |
| 593 | * if (param != NULL), this is a successfully requested slave channel, | 594 | * if (param != NULL), this is a successfully requested slave channel, |
| 594 | * therefore param->config != NULL too. | 595 | * therefore param->config != NULL too. |
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c index e0187d16dd7c..0fd5b85a0f75 100644 --- a/drivers/edac/i7core_edac.c +++ b/drivers/edac/i7core_edac.c | |||
| @@ -1140,6 +1140,7 @@ static struct mcidev_sysfs_attribute i7core_udimm_counters_attrs[] = { | |||
| 1140 | ATTR_COUNTER(0), | 1140 | ATTR_COUNTER(0), |
| 1141 | ATTR_COUNTER(1), | 1141 | ATTR_COUNTER(1), |
| 1142 | ATTR_COUNTER(2), | 1142 | ATTR_COUNTER(2), |
| 1143 | { .attr = { .name = NULL } } | ||
| 1143 | }; | 1144 | }; |
| 1144 | 1145 | ||
| 1145 | static struct mcidev_sysfs_group i7core_udimm_counters = { | 1146 | static struct mcidev_sysfs_group i7core_udimm_counters = { |
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c index a10152bb1427..0906fc5b69b9 100755..100644 --- a/drivers/idle/intel_idle.c +++ b/drivers/idle/intel_idle.c | |||
| @@ -83,7 +83,7 @@ static unsigned int mwait_substates; | |||
| 83 | /* Reliable LAPIC Timer States, bit 1 for C1 etc. */ | 83 | /* Reliable LAPIC Timer States, bit 1 for C1 etc. */ |
| 84 | static unsigned int lapic_timer_reliable_states; | 84 | static unsigned int lapic_timer_reliable_states; |
| 85 | 85 | ||
| 86 | static struct cpuidle_device *intel_idle_cpuidle_devices; | 86 | static struct cpuidle_device __percpu *intel_idle_cpuidle_devices; |
| 87 | static int intel_idle(struct cpuidle_device *dev, struct cpuidle_state *state); | 87 | static int intel_idle(struct cpuidle_device *dev, struct cpuidle_state *state); |
| 88 | 88 | ||
| 89 | static struct cpuidle_state *cpuidle_state_table; | 89 | static struct cpuidle_state *cpuidle_state_table; |
| @@ -108,7 +108,7 @@ static struct cpuidle_state nehalem_cstates[MWAIT_MAX_NUM_CSTATES] = { | |||
| 108 | .name = "NHM-C3", | 108 | .name = "NHM-C3", |
| 109 | .desc = "MWAIT 0x10", | 109 | .desc = "MWAIT 0x10", |
| 110 | .driver_data = (void *) 0x10, | 110 | .driver_data = (void *) 0x10, |
| 111 | .flags = CPUIDLE_FLAG_TIME_VALID, | 111 | .flags = CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_TLB_FLUSHED, |
| 112 | .exit_latency = 20, | 112 | .exit_latency = 20, |
| 113 | .power_usage = 500, | 113 | .power_usage = 500, |
| 114 | .target_residency = 80, | 114 | .target_residency = 80, |
| @@ -117,7 +117,7 @@ static struct cpuidle_state nehalem_cstates[MWAIT_MAX_NUM_CSTATES] = { | |||
| 117 | .name = "NHM-C6", | 117 | .name = "NHM-C6", |
| 118 | .desc = "MWAIT 0x20", | 118 | .desc = "MWAIT 0x20", |
| 119 | .driver_data = (void *) 0x20, | 119 | .driver_data = (void *) 0x20, |
| 120 | .flags = CPUIDLE_FLAG_TIME_VALID, | 120 | .flags = CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_TLB_FLUSHED, |
| 121 | .exit_latency = 200, | 121 | .exit_latency = 200, |
| 122 | .power_usage = 350, | 122 | .power_usage = 350, |
| 123 | .target_residency = 800, | 123 | .target_residency = 800, |
| @@ -149,7 +149,7 @@ static struct cpuidle_state atom_cstates[MWAIT_MAX_NUM_CSTATES] = { | |||
| 149 | .name = "ATM-C4", | 149 | .name = "ATM-C4", |
| 150 | .desc = "MWAIT 0x30", | 150 | .desc = "MWAIT 0x30", |
| 151 | .driver_data = (void *) 0x30, | 151 | .driver_data = (void *) 0x30, |
| 152 | .flags = CPUIDLE_FLAG_TIME_VALID, | 152 | .flags = CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_TLB_FLUSHED, |
| 153 | .exit_latency = 100, | 153 | .exit_latency = 100, |
| 154 | .power_usage = 250, | 154 | .power_usage = 250, |
| 155 | .target_residency = 400, | 155 | .target_residency = 400, |
| @@ -159,7 +159,7 @@ static struct cpuidle_state atom_cstates[MWAIT_MAX_NUM_CSTATES] = { | |||
| 159 | .name = "ATM-C6", | 159 | .name = "ATM-C6", |
| 160 | .desc = "MWAIT 0x40", | 160 | .desc = "MWAIT 0x40", |
| 161 | .driver_data = (void *) 0x40, | 161 | .driver_data = (void *) 0x40, |
| 162 | .flags = CPUIDLE_FLAG_TIME_VALID, | 162 | .flags = CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_TLB_FLUSHED, |
| 163 | .exit_latency = 200, | 163 | .exit_latency = 200, |
| 164 | .power_usage = 150, | 164 | .power_usage = 150, |
| 165 | .target_residency = 800, | 165 | .target_residency = 800, |
| @@ -185,6 +185,16 @@ static int intel_idle(struct cpuidle_device *dev, struct cpuidle_state *state) | |||
| 185 | 185 | ||
| 186 | local_irq_disable(); | 186 | local_irq_disable(); |
| 187 | 187 | ||
| 188 | /* | ||
| 189 | * If the state flag indicates that the TLB will be flushed or if this | ||
| 190 | * is the deepest c-state supported, do a voluntary leave mm to avoid | ||
| 191 | * costly and mostly unnecessary wakeups for flushing the user TLB's | ||
| 192 | * associated with the active mm. | ||
| 193 | */ | ||
| 194 | if (state->flags & CPUIDLE_FLAG_TLB_FLUSHED || | ||
| 195 | (&dev->states[dev->state_count - 1] == state)) | ||
| 196 | leave_mm(cpu); | ||
| 197 | |||
| 188 | if (!(lapic_timer_reliable_states & (1 << (cstate)))) | 198 | if (!(lapic_timer_reliable_states & (1 << (cstate)))) |
| 189 | clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu); | 199 | clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu); |
| 190 | 200 | ||
diff --git a/drivers/mfd/max8925-core.c b/drivers/mfd/max8925-core.c index 04028a9ee082..428377a5a6f5 100644 --- a/drivers/mfd/max8925-core.c +++ b/drivers/mfd/max8925-core.c | |||
| @@ -429,24 +429,25 @@ static void max8925_irq_sync_unlock(unsigned int irq) | |||
| 429 | irq_tsc = cache_tsc; | 429 | irq_tsc = cache_tsc; |
| 430 | for (i = 0; i < ARRAY_SIZE(max8925_irqs); i++) { | 430 | for (i = 0; i < ARRAY_SIZE(max8925_irqs); i++) { |
| 431 | irq_data = &max8925_irqs[i]; | 431 | irq_data = &max8925_irqs[i]; |
| 432 | /* 1 -- disable, 0 -- enable */ | ||
| 432 | switch (irq_data->mask_reg) { | 433 | switch (irq_data->mask_reg) { |
| 433 | case MAX8925_CHG_IRQ1_MASK: | 434 | case MAX8925_CHG_IRQ1_MASK: |
| 434 | irq_chg[0] &= irq_data->enable; | 435 | irq_chg[0] &= ~irq_data->enable; |
| 435 | break; | 436 | break; |
| 436 | case MAX8925_CHG_IRQ2_MASK: | 437 | case MAX8925_CHG_IRQ2_MASK: |
| 437 | irq_chg[1] &= irq_data->enable; | 438 | irq_chg[1] &= ~irq_data->enable; |
| 438 | break; | 439 | break; |
| 439 | case MAX8925_ON_OFF_IRQ1_MASK: | 440 | case MAX8925_ON_OFF_IRQ1_MASK: |
| 440 | irq_on[0] &= irq_data->enable; | 441 | irq_on[0] &= ~irq_data->enable; |
| 441 | break; | 442 | break; |
| 442 | case MAX8925_ON_OFF_IRQ2_MASK: | 443 | case MAX8925_ON_OFF_IRQ2_MASK: |
| 443 | irq_on[1] &= irq_data->enable; | 444 | irq_on[1] &= ~irq_data->enable; |
| 444 | break; | 445 | break; |
| 445 | case MAX8925_RTC_IRQ_MASK: | 446 | case MAX8925_RTC_IRQ_MASK: |
| 446 | irq_rtc &= irq_data->enable; | 447 | irq_rtc &= ~irq_data->enable; |
| 447 | break; | 448 | break; |
| 448 | case MAX8925_TSC_IRQ_MASK: | 449 | case MAX8925_TSC_IRQ_MASK: |
| 449 | irq_tsc &= irq_data->enable; | 450 | irq_tsc &= ~irq_data->enable; |
| 450 | break; | 451 | break; |
| 451 | default: | 452 | default: |
| 452 | dev_err(chip->dev, "wrong IRQ\n"); | 453 | dev_err(chip->dev, "wrong IRQ\n"); |
diff --git a/drivers/mfd/wm831x-irq.c b/drivers/mfd/wm831x-irq.c index 7dabe4dbd373..294183b6260b 100644 --- a/drivers/mfd/wm831x-irq.c +++ b/drivers/mfd/wm831x-irq.c | |||
| @@ -394,8 +394,13 @@ static int wm831x_irq_set_type(unsigned int irq, unsigned int type) | |||
| 394 | 394 | ||
| 395 | irq = irq - wm831x->irq_base; | 395 | irq = irq - wm831x->irq_base; |
| 396 | 396 | ||
| 397 | if (irq < WM831X_IRQ_GPIO_1 || irq > WM831X_IRQ_GPIO_11) | 397 | if (irq < WM831X_IRQ_GPIO_1 || irq > WM831X_IRQ_GPIO_11) { |
| 398 | return -EINVAL; | 398 | /* Ignore internal-only IRQs */ |
| 399 | if (irq >= 0 && irq < WM831X_NUM_IRQS) | ||
| 400 | return 0; | ||
| 401 | else | ||
| 402 | return -EINVAL; | ||
| 403 | } | ||
| 399 | 404 | ||
| 400 | switch (type) { | 405 | switch (type) { |
| 401 | case IRQ_TYPE_EDGE_BOTH: | 406 | case IRQ_TYPE_EDGE_BOTH: |
diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index 133d51528f8d..513e0a76a4a7 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c | |||
| @@ -413,7 +413,7 @@ static inline int omap_nand_dma_transfer(struct mtd_info *mtd, void *addr, | |||
| 413 | prefetch_status = gpmc_read_status(GPMC_PREFETCH_COUNT); | 413 | prefetch_status = gpmc_read_status(GPMC_PREFETCH_COUNT); |
| 414 | } while (prefetch_status); | 414 | } while (prefetch_status); |
| 415 | /* disable and stop the PFPW engine */ | 415 | /* disable and stop the PFPW engine */ |
| 416 | gpmc_prefetch_reset(); | 416 | gpmc_prefetch_reset(info->gpmc_cs); |
| 417 | 417 | ||
| 418 | dma_unmap_single(&info->pdev->dev, dma_addr, len, dir); | 418 | dma_unmap_single(&info->pdev->dev, dma_addr, len, dir); |
| 419 | return 0; | 419 | return 0; |
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 89ed181cd90c..857ae01734a6 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
| @@ -163,6 +163,26 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_CBUS_2, quirk_isa_d | |||
| 163 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_CBUS_3, quirk_isa_dma_hangs); | 163 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_CBUS_3, quirk_isa_dma_hangs); |
| 164 | 164 | ||
| 165 | /* | 165 | /* |
| 166 | * Intel NM10 "TigerPoint" LPC PM1a_STS.BM_STS must be clear | ||
| 167 | * for some HT machines to use C4 w/o hanging. | ||
| 168 | */ | ||
| 169 | static void __devinit quirk_tigerpoint_bm_sts(struct pci_dev *dev) | ||
| 170 | { | ||
| 171 | u32 pmbase; | ||
| 172 | u16 pm1a; | ||
| 173 | |||
| 174 | pci_read_config_dword(dev, 0x40, &pmbase); | ||
| 175 | pmbase = pmbase & 0xff80; | ||
| 176 | pm1a = inw(pmbase); | ||
| 177 | |||
| 178 | if (pm1a & 0x10) { | ||
| 179 | dev_info(&dev->dev, FW_BUG "TigerPoint LPC.BM_STS cleared\n"); | ||
| 180 | outw(0x10, pmbase); | ||
| 181 | } | ||
| 182 | } | ||
| 183 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TGP_LPC, quirk_tigerpoint_bm_sts); | ||
| 184 | |||
| 185 | /* | ||
| 166 | * Chipsets where PCI->PCI transfers vanish or hang | 186 | * Chipsets where PCI->PCI transfers vanish or hang |
| 167 | */ | 187 | */ |
| 168 | static void __devinit quirk_nopcipci(struct pci_dev *dev) | 188 | static void __devinit quirk_nopcipci(struct pci_dev *dev) |
diff --git a/drivers/serial/mfd.c b/drivers/serial/mfd.c index 324c385a653d..5dff45c76d32 100644 --- a/drivers/serial/mfd.c +++ b/drivers/serial/mfd.c | |||
| @@ -27,6 +27,7 @@ | |||
| 27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
| 28 | #include <linux/console.h> | 28 | #include <linux/console.h> |
| 29 | #include <linux/sysrq.h> | 29 | #include <linux/sysrq.h> |
| 30 | #include <linux/slab.h> | ||
| 30 | #include <linux/serial_reg.h> | 31 | #include <linux/serial_reg.h> |
| 31 | #include <linux/circ_buf.h> | 32 | #include <linux/circ_buf.h> |
| 32 | #include <linux/delay.h> | 33 | #include <linux/delay.h> |
diff --git a/drivers/serial/mrst_max3110.c b/drivers/serial/mrst_max3110.c index f6ad1ecbff79..51c15f58e01e 100644 --- a/drivers/serial/mrst_max3110.c +++ b/drivers/serial/mrst_max3110.c | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | 29 | ||
| 30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
| 31 | #include <linux/ioport.h> | 31 | #include <linux/ioport.h> |
| 32 | #include <linux/irq.h> | ||
| 32 | #include <linux/init.h> | 33 | #include <linux/init.h> |
| 33 | #include <linux/console.h> | 34 | #include <linux/console.h> |
| 34 | #include <linux/sysrq.h> | 35 | #include <linux/sysrq.h> |
diff --git a/fs/ocfs2/symlink.c b/fs/ocfs2/symlink.c index 32499d213fc4..9975457c981f 100644 --- a/fs/ocfs2/symlink.c +++ b/fs/ocfs2/symlink.c | |||
| @@ -128,7 +128,7 @@ static void *ocfs2_fast_follow_link(struct dentry *dentry, | |||
| 128 | } | 128 | } |
| 129 | 129 | ||
| 130 | /* Fast symlinks can't be large */ | 130 | /* Fast symlinks can't be large */ |
| 131 | len = strlen(target); | 131 | len = strnlen(target, ocfs2_fast_symlink_chars(inode->i_sb)); |
| 132 | link = kzalloc(len + 1, GFP_NOFS); | 132 | link = kzalloc(len + 1, GFP_NOFS); |
| 133 | if (!link) { | 133 | if (!link) { |
| 134 | status = -ENOMEM; | 134 | status = -ENOMEM; |
diff --git a/fs/proc/base.c b/fs/proc/base.c index a1c43e7c8a7b..8e4addaa5424 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
| @@ -2675,7 +2675,7 @@ static const struct pid_entry tgid_base_stuff[] = { | |||
| 2675 | INF("auxv", S_IRUSR, proc_pid_auxv), | 2675 | INF("auxv", S_IRUSR, proc_pid_auxv), |
| 2676 | ONE("status", S_IRUGO, proc_pid_status), | 2676 | ONE("status", S_IRUGO, proc_pid_status), |
| 2677 | ONE("personality", S_IRUSR, proc_pid_personality), | 2677 | ONE("personality", S_IRUSR, proc_pid_personality), |
| 2678 | INF("limits", S_IRUSR, proc_pid_limits), | 2678 | INF("limits", S_IRUGO, proc_pid_limits), |
| 2679 | #ifdef CONFIG_SCHED_DEBUG | 2679 | #ifdef CONFIG_SCHED_DEBUG |
| 2680 | REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations), | 2680 | REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations), |
| 2681 | #endif | 2681 | #endif |
| @@ -3011,7 +3011,7 @@ static const struct pid_entry tid_base_stuff[] = { | |||
| 3011 | INF("auxv", S_IRUSR, proc_pid_auxv), | 3011 | INF("auxv", S_IRUSR, proc_pid_auxv), |
| 3012 | ONE("status", S_IRUGO, proc_pid_status), | 3012 | ONE("status", S_IRUGO, proc_pid_status), |
| 3013 | ONE("personality", S_IRUSR, proc_pid_personality), | 3013 | ONE("personality", S_IRUSR, proc_pid_personality), |
| 3014 | INF("limits", S_IRUSR, proc_pid_limits), | 3014 | INF("limits", S_IRUGO, proc_pid_limits), |
| 3015 | #ifdef CONFIG_SCHED_DEBUG | 3015 | #ifdef CONFIG_SCHED_DEBUG |
| 3016 | REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations), | 3016 | REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations), |
| 3017 | #endif | 3017 | #endif |
diff --git a/fs/reiserfs/ioctl.c b/fs/reiserfs/ioctl.c index f53505de0712..5cbb81e134ac 100644 --- a/fs/reiserfs/ioctl.c +++ b/fs/reiserfs/ioctl.c | |||
| @@ -170,6 +170,7 @@ int reiserfs_prepare_write(struct file *f, struct page *page, | |||
| 170 | int reiserfs_unpack(struct inode *inode, struct file *filp) | 170 | int reiserfs_unpack(struct inode *inode, struct file *filp) |
| 171 | { | 171 | { |
| 172 | int retval = 0; | 172 | int retval = 0; |
| 173 | int depth; | ||
| 173 | int index; | 174 | int index; |
| 174 | struct page *page; | 175 | struct page *page; |
| 175 | struct address_space *mapping; | 176 | struct address_space *mapping; |
| @@ -188,8 +189,8 @@ int reiserfs_unpack(struct inode *inode, struct file *filp) | |||
| 188 | /* we need to make sure nobody is changing the file size beneath | 189 | /* we need to make sure nobody is changing the file size beneath |
| 189 | ** us | 190 | ** us |
| 190 | */ | 191 | */ |
| 191 | mutex_lock(&inode->i_mutex); | 192 | reiserfs_mutex_lock_safe(&inode->i_mutex, inode->i_sb); |
| 192 | reiserfs_write_lock(inode->i_sb); | 193 | depth = reiserfs_write_lock_once(inode->i_sb); |
| 193 | 194 | ||
| 194 | write_from = inode->i_size & (blocksize - 1); | 195 | write_from = inode->i_size & (blocksize - 1); |
| 195 | /* if we are on a block boundary, we are already unpacked. */ | 196 | /* if we are on a block boundary, we are already unpacked. */ |
| @@ -224,6 +225,6 @@ int reiserfs_unpack(struct inode *inode, struct file *filp) | |||
| 224 | 225 | ||
| 225 | out: | 226 | out: |
| 226 | mutex_unlock(&inode->i_mutex); | 227 | mutex_unlock(&inode->i_mutex); |
| 227 | reiserfs_write_unlock(inode->i_sb); | 228 | reiserfs_write_unlock_once(inode->i_sb, depth); |
| 228 | return retval; | 229 | return retval; |
| 229 | } | 230 | } |
diff --git a/fs/xfs/xfs_log_cil.c b/fs/xfs/xfs_log_cil.c index ed575fb4b495..7e206fc1fa36 100644 --- a/fs/xfs/xfs_log_cil.c +++ b/fs/xfs/xfs_log_cil.c | |||
| @@ -405,9 +405,15 @@ xlog_cil_push( | |||
| 405 | new_ctx = kmem_zalloc(sizeof(*new_ctx), KM_SLEEP|KM_NOFS); | 405 | new_ctx = kmem_zalloc(sizeof(*new_ctx), KM_SLEEP|KM_NOFS); |
| 406 | new_ctx->ticket = xlog_cil_ticket_alloc(log); | 406 | new_ctx->ticket = xlog_cil_ticket_alloc(log); |
| 407 | 407 | ||
| 408 | /* lock out transaction commit, but don't block on background push */ | 408 | /* |
| 409 | * Lock out transaction commit, but don't block for background pushes | ||
| 410 | * unless we are well over the CIL space limit. See the definition of | ||
| 411 | * XLOG_CIL_HARD_SPACE_LIMIT() for the full explanation of the logic | ||
| 412 | * used here. | ||
| 413 | */ | ||
| 409 | if (!down_write_trylock(&cil->xc_ctx_lock)) { | 414 | if (!down_write_trylock(&cil->xc_ctx_lock)) { |
| 410 | if (!push_seq) | 415 | if (!push_seq && |
| 416 | cil->xc_ctx->space_used < XLOG_CIL_HARD_SPACE_LIMIT(log)) | ||
| 411 | goto out_free_ticket; | 417 | goto out_free_ticket; |
| 412 | down_write(&cil->xc_ctx_lock); | 418 | down_write(&cil->xc_ctx_lock); |
| 413 | } | 419 | } |
| @@ -422,7 +428,7 @@ xlog_cil_push( | |||
| 422 | goto out_skip; | 428 | goto out_skip; |
| 423 | 429 | ||
| 424 | /* check for a previously pushed seqeunce */ | 430 | /* check for a previously pushed seqeunce */ |
| 425 | if (push_seq < cil->xc_ctx->sequence) | 431 | if (push_seq && push_seq < cil->xc_ctx->sequence) |
| 426 | goto out_skip; | 432 | goto out_skip; |
| 427 | 433 | ||
| 428 | /* | 434 | /* |
diff --git a/fs/xfs/xfs_log_priv.h b/fs/xfs/xfs_log_priv.h index ced52b98b322..edcdfe01617f 100644 --- a/fs/xfs/xfs_log_priv.h +++ b/fs/xfs/xfs_log_priv.h | |||
| @@ -426,13 +426,13 @@ struct xfs_cil { | |||
| 426 | }; | 426 | }; |
| 427 | 427 | ||
| 428 | /* | 428 | /* |
| 429 | * The amount of log space we should the CIL to aggregate is difficult to size. | 429 | * The amount of log space we allow the CIL to aggregate is difficult to size. |
| 430 | * Whatever we chose we have to make we can get a reservation for the log space | 430 | * Whatever we choose, we have to make sure we can get a reservation for the |
| 431 | * effectively, that it is large enough to capture sufficient relogging to | 431 | * log space effectively, that it is large enough to capture sufficient |
| 432 | * reduce log buffer IO significantly, but it is not too large for the log or | 432 | * relogging to reduce log buffer IO significantly, but it is not too large for |
| 433 | * induces too much latency when writing out through the iclogs. We track both | 433 | * the log or induces too much latency when writing out through the iclogs. We |
| 434 | * space consumed and the number of vectors in the checkpoint context, so we | 434 | * track both space consumed and the number of vectors in the checkpoint |
| 435 | * need to decide which to use for limiting. | 435 | * context, so we need to decide which to use for limiting. |
| 436 | * | 436 | * |
| 437 | * Every log buffer we write out during a push needs a header reserved, which | 437 | * Every log buffer we write out during a push needs a header reserved, which |
| 438 | * is at least one sector and more for v2 logs. Hence we need a reservation of | 438 | * is at least one sector and more for v2 logs. Hence we need a reservation of |
| @@ -459,16 +459,21 @@ struct xfs_cil { | |||
| 459 | * checkpoint transaction ticket is specific to the checkpoint context, rather | 459 | * checkpoint transaction ticket is specific to the checkpoint context, rather |
| 460 | * than the CIL itself. | 460 | * than the CIL itself. |
| 461 | * | 461 | * |
| 462 | * With dynamic reservations, we can basically make up arbitrary limits for the | 462 | * With dynamic reservations, we can effectively make up arbitrary limits for |
| 463 | * checkpoint size so long as they don't violate any other size rules. Hence | 463 | * the checkpoint size so long as they don't violate any other size rules. |
| 464 | * the initial maximum size for the checkpoint transaction will be set to a | 464 | * Recovery imposes a rule that no transaction exceed half the log, so we are |
| 465 | * quarter of the log or 8MB, which ever is smaller. 8MB is an arbitrary limit | 465 | * limited by that. Furthermore, the log transaction reservation subsystem |
| 466 | * right now based on the latency of writing out a large amount of data through | 466 | * tries to keep 25% of the log free, so we need to keep below that limit or we |
| 467 | * the circular iclog buffers. | 467 | * risk running out of free log space to start any new transactions. |
| 468 | * | ||
| 469 | * In order to keep background CIL push efficient, we will set a lower | ||
| 470 | * threshold at which background pushing is attempted without blocking current | ||
| 471 | * transaction commits. A separate, higher bound defines when CIL pushes are | ||
| 472 | * enforced to ensure we stay within our maximum checkpoint size bounds. | ||
| 473 | * threshold, yet give us plenty of space for aggregation on large logs. | ||
| 468 | */ | 474 | */ |
| 469 | 475 | #define XLOG_CIL_SPACE_LIMIT(log) (log->l_logsize >> 3) | |
| 470 | #define XLOG_CIL_SPACE_LIMIT(log) \ | 476 | #define XLOG_CIL_HARD_SPACE_LIMIT(log) (3 * (log->l_logsize >> 4)) |
| 471 | (min((log->l_logsize >> 2), (8 * 1024 * 1024))) | ||
| 472 | 477 | ||
| 473 | /* | 478 | /* |
| 474 | * The reservation head lsn is not made up of a cycle number and block number. | 479 | * The reservation head lsn is not made up of a cycle number and block number. |
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 36ca9721a0c2..1be416bbbb82 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h | |||
| @@ -53,6 +53,7 @@ struct cpuidle_state { | |||
| 53 | #define CPUIDLE_FLAG_BALANCED (0x40) /* medium latency, moderate savings */ | 53 | #define CPUIDLE_FLAG_BALANCED (0x40) /* medium latency, moderate savings */ |
| 54 | #define CPUIDLE_FLAG_DEEP (0x80) /* high latency, large savings */ | 54 | #define CPUIDLE_FLAG_DEEP (0x80) /* high latency, large savings */ |
| 55 | #define CPUIDLE_FLAG_IGNORE (0x100) /* ignore during this idle period */ | 55 | #define CPUIDLE_FLAG_IGNORE (0x100) /* ignore during this idle period */ |
| 56 | #define CPUIDLE_FLAG_TLB_FLUSHED (0x200) /* tlb will be flushed */ | ||
| 56 | 57 | ||
| 57 | #define CPUIDLE_DRIVER_FLAGS_MASK (0xFFFF0000) | 58 | #define CPUIDLE_DRIVER_FLAGS_MASK (0xFFFF0000) |
| 58 | 59 | ||
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index c61d4ca27bcc..e2106495cc11 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
| @@ -548,7 +548,7 @@ static inline bool dma_dev_has_pq_continue(struct dma_device *dma) | |||
| 548 | return (dma->max_pq & DMA_HAS_PQ_CONTINUE) == DMA_HAS_PQ_CONTINUE; | 548 | return (dma->max_pq & DMA_HAS_PQ_CONTINUE) == DMA_HAS_PQ_CONTINUE; |
| 549 | } | 549 | } |
| 550 | 550 | ||
| 551 | static unsigned short dma_dev_to_maxpq(struct dma_device *dma) | 551 | static inline unsigned short dma_dev_to_maxpq(struct dma_device *dma) |
| 552 | { | 552 | { |
| 553 | return dma->max_pq & ~DMA_HAS_PQ_CONTINUE; | 553 | return dma->max_pq & ~DMA_HAS_PQ_CONTINUE; |
| 554 | } | 554 | } |
| @@ -743,6 +743,8 @@ static unsigned long copy_semid_to_user(void __user *buf, struct semid64_ds *in, | |||
| 743 | { | 743 | { |
| 744 | struct semid_ds out; | 744 | struct semid_ds out; |
| 745 | 745 | ||
| 746 | memset(&out, 0, sizeof(out)); | ||
| 747 | |||
| 746 | ipc64_perm_to_ipc_perm(&in->sem_perm, &out.sem_perm); | 748 | ipc64_perm_to_ipc_perm(&in->sem_perm, &out.sem_perm); |
| 747 | 749 | ||
| 748 | out.sem_otime = in->sem_otime; | 750 | out.sem_otime = in->sem_otime; |
diff --git a/kernel/kfifo.c b/kernel/kfifo.c index 6b5580c57644..01a0700e873f 100644 --- a/kernel/kfifo.c +++ b/kernel/kfifo.c | |||
| @@ -365,8 +365,6 @@ static unsigned int setup_sgl(struct __kfifo *fifo, struct scatterlist *sgl, | |||
| 365 | n = setup_sgl_buf(sgl, fifo->data + off, nents, l); | 365 | n = setup_sgl_buf(sgl, fifo->data + off, nents, l); |
| 366 | n += setup_sgl_buf(sgl + n, fifo->data, nents - n, len - l); | 366 | n += setup_sgl_buf(sgl + n, fifo->data, nents - n, len - l); |
| 367 | 367 | ||
| 368 | if (n) | ||
| 369 | sg_mark_end(sgl + n - 1); | ||
| 370 | return n; | 368 | return n; |
| 371 | } | 369 | } |
| 372 | 370 | ||
diff --git a/lib/list_sort.c b/lib/list_sort.c index 4b5cb794c38b..a7616fa3162e 100644 --- a/lib/list_sort.c +++ b/lib/list_sort.c | |||
| @@ -70,7 +70,7 @@ static void merge_and_restore_back_links(void *priv, | |||
| 70 | * element comparison is needed, so the client's cmp() | 70 | * element comparison is needed, so the client's cmp() |
| 71 | * routine can invoke cond_resched() periodically. | 71 | * routine can invoke cond_resched() periodically. |
| 72 | */ | 72 | */ |
| 73 | (*cmp)(priv, tail, tail); | 73 | (*cmp)(priv, tail->next, tail->next); |
| 74 | 74 | ||
| 75 | tail->next->prev = tail; | 75 | tail->next->prev = tail; |
| 76 | tail = tail->next; | 76 | tail = tail->next; |
diff --git a/samples/kfifo/dma-example.c b/samples/kfifo/dma-example.c index ee03a4f0b64f..06473791c08a 100644 --- a/samples/kfifo/dma-example.c +++ b/samples/kfifo/dma-example.c | |||
| @@ -24,6 +24,7 @@ static int __init example_init(void) | |||
| 24 | { | 24 | { |
| 25 | int i; | 25 | int i; |
| 26 | unsigned int ret; | 26 | unsigned int ret; |
| 27 | unsigned int nents; | ||
| 27 | struct scatterlist sg[10]; | 28 | struct scatterlist sg[10]; |
| 28 | 29 | ||
| 29 | printk(KERN_INFO "DMA fifo test start\n"); | 30 | printk(KERN_INFO "DMA fifo test start\n"); |
| @@ -61,9 +62,9 @@ static int __init example_init(void) | |||
| 61 | * byte at the beginning, after the kfifo_skip(). | 62 | * byte at the beginning, after the kfifo_skip(). |
| 62 | */ | 63 | */ |
| 63 | sg_init_table(sg, ARRAY_SIZE(sg)); | 64 | sg_init_table(sg, ARRAY_SIZE(sg)); |
| 64 | ret = kfifo_dma_in_prepare(&fifo, sg, ARRAY_SIZE(sg), FIFO_SIZE); | 65 | nents = kfifo_dma_in_prepare(&fifo, sg, ARRAY_SIZE(sg), FIFO_SIZE); |
| 65 | printk(KERN_INFO "DMA sgl entries: %d\n", ret); | 66 | printk(KERN_INFO "DMA sgl entries: %d\n", nents); |
| 66 | if (!ret) { | 67 | if (!nents) { |
| 67 | /* fifo is full and no sgl was created */ | 68 | /* fifo is full and no sgl was created */ |
| 68 | printk(KERN_WARNING "error kfifo_dma_in_prepare\n"); | 69 | printk(KERN_WARNING "error kfifo_dma_in_prepare\n"); |
| 69 | return -EIO; | 70 | return -EIO; |
| @@ -71,7 +72,7 @@ static int __init example_init(void) | |||
| 71 | 72 | ||
| 72 | /* receive data */ | 73 | /* receive data */ |
| 73 | printk(KERN_INFO "scatterlist for receive:\n"); | 74 | printk(KERN_INFO "scatterlist for receive:\n"); |
| 74 | for (i = 0; i < ARRAY_SIZE(sg); i++) { | 75 | for (i = 0; i < nents; i++) { |
| 75 | printk(KERN_INFO | 76 | printk(KERN_INFO |
| 76 | "sg[%d] -> " | 77 | "sg[%d] -> " |
| 77 | "page_link 0x%.8lx offset 0x%.8x length 0x%.8x\n", | 78 | "page_link 0x%.8lx offset 0x%.8x length 0x%.8x\n", |
| @@ -91,16 +92,16 @@ static int __init example_init(void) | |||
| 91 | kfifo_dma_in_finish(&fifo, ret); | 92 | kfifo_dma_in_finish(&fifo, ret); |
| 92 | 93 | ||
| 93 | /* Prepare to transmit data, example: 8 bytes */ | 94 | /* Prepare to transmit data, example: 8 bytes */ |
| 94 | ret = kfifo_dma_out_prepare(&fifo, sg, ARRAY_SIZE(sg), 8); | 95 | nents = kfifo_dma_out_prepare(&fifo, sg, ARRAY_SIZE(sg), 8); |
| 95 | printk(KERN_INFO "DMA sgl entries: %d\n", ret); | 96 | printk(KERN_INFO "DMA sgl entries: %d\n", nents); |
| 96 | if (!ret) { | 97 | if (!nents) { |
| 97 | /* no data was available and no sgl was created */ | 98 | /* no data was available and no sgl was created */ |
| 98 | printk(KERN_WARNING "error kfifo_dma_out_prepare\n"); | 99 | printk(KERN_WARNING "error kfifo_dma_out_prepare\n"); |
| 99 | return -EIO; | 100 | return -EIO; |
| 100 | } | 101 | } |
| 101 | 102 | ||
| 102 | printk(KERN_INFO "scatterlist for transmit:\n"); | 103 | printk(KERN_INFO "scatterlist for transmit:\n"); |
| 103 | for (i = 0; i < ARRAY_SIZE(sg); i++) { | 104 | for (i = 0; i < nents; i++) { |
| 104 | printk(KERN_INFO | 105 | printk(KERN_INFO |
| 105 | "sg[%d] -> " | 106 | "sg[%d] -> " |
| 106 | "page_link 0x%.8lx offset 0x%.8x length 0x%.8x\n", | 107 | "page_link 0x%.8lx offset 0x%.8x length 0x%.8x\n", |
