/* * udbg interface to hvc_console.c * * (C) Copyright David Gibson, IBM Corporation 2008. * * 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 #include #include #include #include #include "hvc_console.h" struct hvc_struct *hvc_udbg_dev; static int hvc_udbg_put(uint32_t vtermno, const char *buf, int count) { int i; for (i = 0; i < count && udbg_putc; i++) udbg_putc(buf[i]); return i; } static int hvc_udbg_get(uint32_t vtermno, char *buf, int count) { int i, c; if (!udbg_getc_poll) return 0; for (i = 0; i < count; i++) { if ((c = udbg_getc_poll()) == -1) break; buf[i] = c; } return i; } static const struct hv_ops hvc_udbg_ops = { .get_chars = hvc_udbg_get, .put_chars = hvc_udbg_put, }; static int __init hvc_udbg_init(void) { struct hvc_struct *hp; if (!udbg_putc) return -ENODEV; BUG_ON(hvc_udbg_dev); hp = hvc_alloc(0, 0, &hvc_udbg_ops, 16); if (IS_ERR(hp)) return PTR_ERR(hp); hvc_udbg_dev = hp; return 0; } device_initcall(hvc_udbg_init); static int __init hvc_udbg_console_init(void) { if (!udbg_putc) return -ENODEV; hvc_instantiate(0, 0, &hvc_udbg_ops); add_preferred_console("hvc", 0, NULL); return 0; } console_initcall(hvc_udbg_console_init); ld/feature/test-clang.cpp?h=nds-private-remove&id=eeeefd41843218c55a8782a6920f044d9bf6207a'>commitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tools/build/feature/test-clang.cpp')
linux/net-next.git/tree/sound/core/isadma.c?id=d7df2443cd5f67fc6ee7c05a88e4996e8177f91b'>sound/core/isadma.c
parenta0615a16f7d0ceb5804d295203c302d496d8ee91 (diff)
powerpc/mm: Fix spurrious segfaults on radix with autonuma
When autonuma (Automatic NUMA balancing) marks a PTE inaccessible it clears all the protection bits but leave the PTE valid. With the Radix MMU, an attempt at executing from such a PTE will take a fault with bit 35 of SRR1 set "SRR1_ISI_N_OR_G". It is thus incorrect to treat all such faults as errors. We should pass them to handle_mm_fault() for autonuma to deal with. The case of pages that are really not executable is handled by the existing test for VM_EXEC further down. That leaves us with catching the kernel attempts at executing user pages. We can catch that earlier, even before we do find_vma. It is never valid on powerpc for the kernel to take an exec fault to begin with. So fold that test with the existing test for the kernel faulting on kernel addresses to bail out early. Fixes: 1d18ad026844 ("powerpc/mm: Detect instruction fetch denied and report") Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Acked-by: Balbir Singh <bsingharora@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'sound/core/isadma.c')