Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 221572
b: refs/heads/master
c: 38a6f42
h: refs/heads/master
v: v3
  • Loading branch information
Chris Metcalf committed Nov 1, 2010
1 parent 2834ddf commit adf16ec
Show file tree
Hide file tree
Showing 35 changed files with 115 additions and 128 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 65f75ace23863063aac374d1bdb302d103e89ec3
refs/heads/master: 38a6f4266989c4dae68eccb1a5cb4580a48003e4
2 changes: 0 additions & 2 deletions trunk/arch/m68k/include/asm/irqflags.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
#define _M68K_IRQFLAGS_H

#include <linux/types.h>
#ifdef CONFIG_MMU
#include <linux/hardirq.h>
#endif
#include <linux/preempt.h>
#include <asm/thread_info.h>
#include <asm/entry.h>
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/m68k/include/asm/machdep.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,5 @@ extern unsigned long hw_timer_offset(void);
extern irqreturn_t arch_timer_interrupt(int irq, void *dummy);

extern void config_BSP(char *command, int len);
extern void do_IRQ(int irq, struct pt_regs *fp);

#endif /* _M68K_MACHDEP_H */
1 change: 0 additions & 1 deletion trunk/arch/tile/include/asm/highmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

#include <linux/interrupt.h>
#include <linux/threads.h>
#include <asm/kmap_types.h>
#include <asm/tlbflush.h>
#include <asm/homecache.h>

Expand Down
34 changes: 24 additions & 10 deletions trunk/arch/tile/include/asm/kmap_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,42 @@
#define _ASM_TILE_KMAP_TYPES_H

/*
* In TILE Linux each set of four of these uses another 16MB chunk of
* address space, given 64 tiles and 64KB pages, so we only enable
* ones that are required by the kernel configuration.
* In 32-bit TILE Linux we have to balance the desire to have a lot of
* nested atomic mappings with the fact that large page sizes and many
* processors chew up address space quickly. In a typical
* 64-processor, 64KB-page layout build, making KM_TYPE_NR one larger
* adds 4MB of required address-space. For now we leave KM_TYPE_NR
* set to depth 8.
*/
enum km_type {
KM_TYPE_NR = 8
};

/*
* We provide dummy definitions of all the stray values that used to be
* required for kmap_atomic() and no longer are.
*/
enum {
KM_BOUNCE_READ,
KM_SKB_SUNRPC_DATA,
KM_SKB_DATA_SOFTIRQ,
KM_USER0,
KM_USER1,
KM_BIO_SRC_IRQ,
KM_BIO_DST_IRQ,
KM_PTE0,
KM_PTE1,
KM_IRQ0,
KM_IRQ1,
KM_SOFTIRQ0,
KM_SOFTIRQ1,
KM_MEMCPY0,
KM_MEMCPY1,
#if defined(CONFIG_HIGHPTE)
KM_PTE0,
KM_PTE1,
#endif
KM_TYPE_NR
KM_SYNC_ICACHE,
KM_SYNC_DCACHE,
KM_UML_USERCOPY,
KM_IRQ_PTE,
KM_NMI,
KM_NMI_PTE,
KM_KDB
};

#endif /* _ASM_TILE_KMAP_TYPES_H */
6 changes: 2 additions & 4 deletions trunk/arch/tile/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,8 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
#define pgd_offset_k(address) pgd_offset(&init_mm, address)

#if defined(CONFIG_HIGHPTE)
extern pte_t *_pte_offset_map(pmd_t *, unsigned long address, enum km_type);
#define pte_offset_map(dir, address) \
_pte_offset_map(dir, address, KM_PTE0)
#define pte_unmap(pte) kunmap_atomic(pte, KM_PTE0)
extern pte_t *pte_offset_map(pmd_t *, unsigned long address);
#define pte_unmap(pte) kunmap_atomic(pte)
#else
#define pte_offset_map(dir, address) pte_offset_kernel(dir, address)
#define pte_unmap(pte) do { } while (0)
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/tile/kernel/machine_kexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,13 @@ static void kexec_find_and_set_command_line(struct kimage *image)

if ((entry & IND_SOURCE)) {
void *va =
kmap_atomic_pfn(entry >> PAGE_SHIFT, KM_USER0);
kmap_atomic_pfn(entry >> PAGE_SHIFT);
r = kexec_bn2cl(va);
if (r) {
command_line = r;
break;
}
kunmap_atomic(va, KM_USER0);
kunmap_atomic(va);
}
}

Expand All @@ -198,7 +198,7 @@ static void kexec_find_and_set_command_line(struct kimage *image)

hverr = hv_set_command_line(
(HV_VirtAddr) command_line, strlen(command_line));
kunmap_atomic(command_line, KM_USER0);
kunmap_atomic(command_line);
} else {
pr_info("%s: no command line found; making empty\n",
__func__);
Expand Down
11 changes: 8 additions & 3 deletions trunk/arch/tile/lib/memcpy_tile64.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ typedef unsigned long (*memcpy_t)(void *, const void *, unsigned long);
* we must run with interrupts disabled to avoid the risk of some
* other code seeing the incoherent data in our cache. (Recall that
* our cache is indexed by PA, so even if the other code doesn't use
* our KM_MEMCPY virtual addresses, they'll still hit in cache using
* our kmap_atomic virtual addresses, they'll still hit in cache using
* the normal VAs that aren't supposed to hit in cache.)
*/
static void memcpy_multicache(void *dest, const void *source,
Expand All @@ -64,6 +64,7 @@ static void memcpy_multicache(void *dest, const void *source,
unsigned long flags, newsrc, newdst;
pmd_t *pmdp;
pte_t *ptep;
int type0, type1;
int cpu = get_cpu();

/*
Expand All @@ -77,7 +78,8 @@ static void memcpy_multicache(void *dest, const void *source,
sim_allow_multiple_caching(1);

/* Set up the new dest mapping */
idx = FIX_KMAP_BEGIN + (KM_TYPE_NR * cpu) + KM_MEMCPY0;
type0 = kmap_atomic_idx_push();
idx = FIX_KMAP_BEGIN + (KM_TYPE_NR * cpu) + type0;
newdst = __fix_to_virt(idx) + ((unsigned long)dest & (PAGE_SIZE-1));
pmdp = pmd_offset(pud_offset(pgd_offset_k(newdst), newdst), newdst);
ptep = pte_offset_kernel(pmdp, newdst);
Expand All @@ -87,7 +89,8 @@ static void memcpy_multicache(void *dest, const void *source,
}

/* Set up the new source mapping */
idx += (KM_MEMCPY0 - KM_MEMCPY1);
type1 = kmap_atomic_idx_push();
idx += (type0 - type1);
src_pte = hv_pte_set_nc(src_pte);
src_pte = hv_pte_clear_writable(src_pte); /* be paranoid */
newsrc = __fix_to_virt(idx) + ((unsigned long)source & (PAGE_SIZE-1));
Expand Down Expand Up @@ -119,6 +122,8 @@ static void memcpy_multicache(void *dest, const void *source,
* We're done: notify the simulator that all is back to normal,
* and re-enable interrupts and pre-emption.
*/
kmap_atomic_idx_pop();
kmap_atomic_idx_pop();
sim_allow_multiple_caching(0);
local_irq_restore(flags);
put_cpu();
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/tile/mm/highmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ EXPORT_SYMBOL(kmap_atomic_prot);
void *__kmap_atomic(struct page *page)
{
/* PAGE_NONE is a magic value that tells us to check immutability. */
return kmap_atomic_prot(page, type, PAGE_NONE);
return kmap_atomic_prot(page, PAGE_NONE);
}
EXPORT_SYMBOL(__kmap_atomic);

Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/tile/mm/pgtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ void __set_fixmap(enum fixed_addresses idx, unsigned long phys, pgprot_t flags)
}

#if defined(CONFIG_HIGHPTE)
pte_t *_pte_offset_map(pmd_t *dir, unsigned long address, enum km_type type)
pte_t *_pte_offset_map(pmd_t *dir, unsigned long address)
{
pte_t *pte = kmap_atomic(pmd_page(*dir), type) +
pte_t *pte = kmap_atomic(pmd_page(*dir)) +
(pmd_ptfn(*dir) << HV_LOG2_PAGE_TABLE_ALIGN) & ~PAGE_MASK;
return &pte[pte_index(address)];
}
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/leds/leds-net5501.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,3 @@ static int __init soekris_init(void)
}

arch_initcall(soekris_init);

MODULE_LICENSE("GPL");
2 changes: 2 additions & 0 deletions trunk/fs/ext4/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -5410,7 +5410,9 @@ int ext4_getattr(struct vfsmount *mnt, struct dentry *dentry,
* will return the blocks that include the delayed allocation
* blocks for this file.
*/
spin_lock(&EXT4_I(inode)->i_block_reservation_lock);
delalloc_blocks = EXT4_I(inode)->i_reserved_data_blocks;
spin_unlock(&EXT4_I(inode)->i_block_reservation_lock);

stat->blocks += (delalloc_blocks << inode->i_sb->s_blocksize_bits)>>9;
return 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/logfs/logfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ static inline int logfs_get_sb_bdev(struct logfs_super *s,

/* dev_mtd.c */
#ifdef CONFIG_MTD
int logfs_get_sb_mtd(struct logfs_super *s, int mtdnr);
int logfs_get_sb_mtd(struct logfs_super *s, int mtdnr)
#else
static inline int logfs_get_sb_mtd(struct logfs_super *s, int mtdnr)
{
Expand Down
8 changes: 2 additions & 6 deletions trunk/include/linux/hardirq.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,11 @@
*/
#define in_nmi() (preempt_count() & NMI_MASK)

#if defined(CONFIG_PREEMPT) && defined(CONFIG_BKL)
# define PREEMPT_INATOMIC_BASE kernel_locked()
#else
# define PREEMPT_INATOMIC_BASE 0
#endif

#if defined(CONFIG_PREEMPT)
# define PREEMPT_INATOMIC_BASE kernel_locked()
# define PREEMPT_CHECK_OFFSET 1
#else
# define PREEMPT_INATOMIC_BASE 0
# define PREEMPT_CHECK_OFFSET 0
#endif

Expand Down
15 changes: 11 additions & 4 deletions trunk/kernel/relay.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,17 @@ static const struct vm_operations_struct relay_file_mmap_ops = {
*/
static struct page **relay_alloc_page_array(unsigned int n_pages)
{
const size_t pa_size = n_pages * sizeof(struct page *);
if (pa_size > PAGE_SIZE)
return vzalloc(pa_size);
return kzalloc(pa_size, GFP_KERNEL);
struct page **array;
size_t pa_size = n_pages * sizeof(struct page *);

if (pa_size > PAGE_SIZE) {
array = vmalloc(pa_size);
if (array)
memset(array, 0, pa_size);
} else {
array = kzalloc(pa_size, GFP_KERNEL);
}
return array;
}

/*
Expand Down
4 changes: 1 addition & 3 deletions trunk/mm/filemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1563,10 +1563,8 @@ int filemap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
goto no_cached_page;
}

if (!lock_page_or_retry(page, vma->vm_mm, vmf->flags)) {
page_cache_release(page);
if (!lock_page_or_retry(page, vma->vm_mm, vmf->flags))
return ret | VM_FAULT_RETRY;
}

/* Did it get truncated? */
if (unlikely(page->mapping != mapping)) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/mm/vmstat.c
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,7 @@ static void *vmstat_start(struct seq_file *m, loff_t *pos)
v[PGPGIN] /= 2; /* sectors -> kbytes */
v[PGPGOUT] /= 2;
#endif
return (unsigned long *)m->private + *pos;
return m->private + *pos;
}

static void *vmstat_next(struct seq_file *m, void *arg, loff_t *pos)
Expand Down
2 changes: 1 addition & 1 deletion trunk/scripts/kconfig/symbol.c
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ const char *sym_expand_string_value(const char *in)
symval = sym_get_string_value(sym);
}

newlen = strlen(res) + strlen(symval) + strlen(src) + 1;
newlen = strlen(res) + strlen(symval) + strlen(src);
if (newlen > reslen) {
reslen = newlen;
res = realloc(res, reslen);
Expand Down
2 changes: 0 additions & 2 deletions trunk/sound/pci/asihpi/hpi6000.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,8 +625,6 @@ static short create_adapter_obj(struct hpi_adapter_obj *pao,
control_cache_size, (struct hpi_control_cache_info *)
&phw->control_cache[0]
);
if (!phw->p_cache)
pao->has_control_cache = 0;
} else
pao->has_control_cache = 0;

Expand Down
2 changes: 0 additions & 2 deletions trunk/sound/pci/asihpi/hpi6205.c
Original file line number Diff line number Diff line change
Expand Up @@ -644,8 +644,6 @@ static u16 create_adapter_obj(struct hpi_adapter_obj *pao,
interface->control_cache.size_in_bytes,
(struct hpi_control_cache_info *)
p_control_cache_virtual);
if (!phw->p_cache)
err = HPI_ERROR_MEMORY_ALLOC;
}
if (!err) {
err = hpios_locked_mem_get_phys_addr(&phw->
Expand Down
12 changes: 3 additions & 9 deletions trunk/sound/pci/asihpi/hpicmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -571,20 +571,14 @@ struct hpi_control_cache *hpi_alloc_control_cache(const u32
{
struct hpi_control_cache *p_cache =
kmalloc(sizeof(*p_cache), GFP_KERNEL);
if (!p_cache)
return NULL;
p_cache->p_info =
kmalloc(sizeof(*p_cache->p_info) * number_of_controls,
GFP_KERNEL);
if (!p_cache->p_info) {
kfree(p_cache);
return NULL;
}
p_cache->cache_size_in_bytes = size_in_bytes;
p_cache->control_count = number_of_controls;
p_cache->p_cache =
(struct hpi_control_cache_single *)pDSP_control_buffer;
p_cache->init = 0;
p_cache->p_info =
kmalloc(sizeof(*p_cache->p_info) * p_cache->control_count,
GFP_KERNEL);
return p_cache;
}

Expand Down
33 changes: 22 additions & 11 deletions trunk/sound/pci/cs46xx/dsp_spos.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,25 +225,39 @@ struct dsp_spos_instance *cs46xx_dsp_spos_create (struct snd_cs46xx * chip)
{
struct dsp_spos_instance * ins = kzalloc(sizeof(struct dsp_spos_instance), GFP_KERNEL);

if (ins == NULL)
if (ins == NULL)
return NULL;

/* better to use vmalloc for this big table */
ins->symbol_table.nsymbols = 0;
ins->symbol_table.symbols = vmalloc(sizeof(struct dsp_symbol_entry) *
DSP_MAX_SYMBOLS);
ins->code.data = kmalloc(DSP_CODE_BYTE_SIZE, GFP_KERNEL);
ins->modules = kmalloc(sizeof(struct dsp_module_desc) * DSP_MAX_MODULES, GFP_KERNEL);
if (!ins->symbol_table.symbols || !ins->code.data || !ins->modules) {
ins->symbol_table.highest_frag_index = 0;

if (ins->symbol_table.symbols == NULL) {
cs46xx_dsp_spos_destroy(chip);
goto error;
}
ins->symbol_table.nsymbols = 0;
ins->symbol_table.highest_frag_index = 0;

ins->code.offset = 0;
ins->code.size = 0;
ins->code.data = kmalloc(DSP_CODE_BYTE_SIZE, GFP_KERNEL);

if (ins->code.data == NULL) {
cs46xx_dsp_spos_destroy(chip);
goto error;
}

ins->nscb = 0;
ins->ntask = 0;

ins->nmodules = 0;
ins->modules = kmalloc(sizeof(struct dsp_module_desc) * DSP_MAX_MODULES, GFP_KERNEL);

if (ins->modules == NULL) {
cs46xx_dsp_spos_destroy(chip);
goto error;
}

/* default SPDIF input sample rate
to 48000 khz */
Expand All @@ -257,8 +271,8 @@ struct dsp_spos_instance *cs46xx_dsp_spos_create (struct snd_cs46xx * chip)

/* set left and right validity bits and
default channel status */
ins->spdif_csuv_default =
ins->spdif_csuv_stream =
ins->spdif_csuv_default =
ins->spdif_csuv_stream =
/* byte 0 */ ((unsigned int)_wrap_all_bits( (SNDRV_PCM_DEFAULT_CON_SPDIF & 0xff)) << 24) |
/* byte 1 */ ((unsigned int)_wrap_all_bits( ((SNDRV_PCM_DEFAULT_CON_SPDIF >> 8) & 0xff)) << 16) |
/* byte 3 */ (unsigned int)_wrap_all_bits( (SNDRV_PCM_DEFAULT_CON_SPDIF >> 24) & 0xff) |
Expand All @@ -267,9 +281,6 @@ struct dsp_spos_instance *cs46xx_dsp_spos_create (struct snd_cs46xx * chip)
return ins;

error:
kfree(ins->modules);
kfree(ins->code.data);
vfree(ins->symbol_table.symbols);
kfree(ins);
return NULL;
}
Expand Down
1 change: 0 additions & 1 deletion trunk/sound/pci/hda/patch_cirrus.c
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,6 @@ static const char *cs420x_models[CS420X_MODELS] = {

static struct snd_pci_quirk cs420x_cfg_tbl[] = {
SND_PCI_QUIRK(0x10de, 0x0ac0, "MacBookPro 5,3", CS420X_MBP53),
SND_PCI_QUIRK(0x10de, 0x0d94, "MacBookAir 3,1(2)", CS420X_MBP55),
SND_PCI_QUIRK(0x10de, 0xcb79, "MacBookPro 5,5", CS420X_MBP55),
SND_PCI_QUIRK(0x10de, 0xcb89, "MacBookPro 7,1", CS420X_MBP55),
SND_PCI_QUIRK(0x8086, 0x7270, "IMac 27 Inch", CS420X_IMAC27),
Expand Down
Loading

0 comments on commit adf16ec

Please sign in to comment.