#ifndef __EMUX_VOICE_H #define __EMUX_VOICE_H /* * A structure to keep track of each hardware voice * * Copyright (C) 1999 Steve Ratcliffe * Copyright (c) 1999-2000 Takashi Iwai * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include /* Prototypes for emux_seq.c */ int snd_emux_init_seq(struct snd_emux *emu, struct snd_card *card, int index); void snd_emux_detach_seq(struct snd_emux *emu); struct snd_emux_port *snd_emux_create_port(struct snd_emux *emu, char *name, int max_channels, int type, struct snd_seq_port_callback *callback); void snd_emux_reset_port(struct snd_emux_port *port); int snd_emux_event_input(struct snd_seq_event *ev, int direct, void *private, int atomic, int hop); int snd_emux_inc_count(struct snd_emux *emu); void snd_emux_dec_count(struct snd_emux *emu); int snd_emux_init_virmidi(struct snd_emux *emu, struct snd_card *card); int snd_emux_delete_virmidi(struct snd_emux *emu); /* Prototypes for emux_synth.c */ void snd_emux_init_voices(struct snd_emux *emu); void snd_emux_note_on(void *p, int note, int vel, struct snd_midi_channel *chan); void snd_emux_note_off(void *p, int note, int vel, struct snd_midi_channel *chan); void snd_emux_key_press(void *p, int note, int vel, struct snd_midi_channel *chan); void snd_emux_terminate_note(void *p, int note, struct snd_midi_channel *chan); void snd_emux_control(void *p, int type, struct snd_midi_channel *chan); void snd_emux_sounds_off_all(struct snd_emux_port *port); void snd_emux_update_channel(struct snd_emux_port *port, struct snd_midi_channel *chan, int update); void snd_emux_update_port(struct snd_emux_port *port, int update); void snd_emux_timer_callback(unsigned long data); /* emux_effect.c */ #ifdef SNDRV_EMUX_USE_RAW_EFFECT void snd_emux_create_effect(struct snd_emux_port *p); void snd_emux_delete_effect(struct snd_emux_port *p); void snd_emux_clear_effect(struct snd_emux_port *p); void snd_emux_setup_effect(struct snd_emux_voice *vp); void snd_emux_send_effect_oss(struct snd_emux_port *port, struct snd_midi_channel *chan, int type, int val); void snd_emux_send_effect(struct snd_emux_port *port, struct snd_midi_channel *chan, int type, int val, int mode); #endif /* emux_nrpn.c */ void snd_emux_sysex(void *private_data, unsigned char *buf, int len, int parsed, struct snd_midi_channel_set *chset); int snd_emux_xg_control(struct snd_emux_port *port, struct snd_midi_channel *chan, int param); void snd_emux_nrpn(void *private_data, struct snd_midi_channel *chan, struct snd_midi_channel_set *chset); /* emux_oss.c */ void snd_emux_init_seq_oss(struct snd_emux *emu); void snd_emux_detach_seq_oss(struct snd_emux *emu); /* emux_proc.c */ #ifdef CONFIG_SND_PROC_FS void snd_emux_proc_init(struct snd_emux *emu, struct snd_card *card, int device); void snd_emux_proc_free(struct snd_emux *emu); #else static inline void snd_emux_proc_init(struct snd_emux *emu, struct snd_card *card, int device) {} static inline void snd_emux_proc_free(struct snd_emux *emu) {} #endif #define STATE_IS_PLAYING(s) ((s) & SNDRV_EMUX_ST_ON) /* emux_hwdep.c */ int snd_emux_init_hwdep(struct snd_emux *emu); void snd_emux_delete_hwdep(struct snd_emux *emu); #endif alue='0' selected='selected'>includemode:
authorHugh Dickins <hughd@google.com>2017-01-07 15:37:31 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-01-07 17:49:33 -0800
commitb0b9b3df27d100a975b4e8818f35382b64a5e35c (patch)
tree8d900d2be3801a7dd10c86c594b37e421167392c /include/dt-bindings/mfd
parent87bc610730a944b49f1c53ab9f4230d85f35df0c (diff)
mm: stop leaking PageTables
4.10-rc loadtest (even on x86, and even without THPCache) fails with "fork: Cannot allocate memory" or some such; and /proc/meminfo shows PageTables growing. Commit 953c66c2b22a ("mm: THP page cache support for ppc64") that got merged in rc1 removed the freeing of an unused preallocated pagetable after do_fault_around() has called map_pages(). This is usually a good optimization, so that the followup doesn't have to reallocate one; but it's not sufficient to shift the freeing into alloc_set_pte(), since there are failure cases (most commonly VM_FAULT_RETRY) which never reach finish_fault(). Check and free it at the outer level in do_fault(), then we don't need to worry in alloc_set_pte(), and can restore that to how it was (I cannot find any reason to pte_free() under lock as it was doing). And fix a separate pagetable leak, or crash, introduced by the same change, that could only show up on some ppc64: why does do_set_pmd()'s failure case attempt to withdraw a pagetable when it never deposited one, at the same time overwriting (so leaking) the vmf->prealloc_pte? Residue of an earlier implementation, perhaps? Delete it. Fixes: 953c66c2b22a ("mm: THP page cache support for ppc64") Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Michael Neuling <mikey@neuling.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Balbir Singh <bsingharora@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Hugh Dickins <hughd@google.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/dt-bindings/mfd')