/* * Copyright (c) 2014 MediaTek Inc. * Author: Hongzhou.Yang * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * 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. */ #ifndef _DT_BINDINGS_PINCTRL_MT65XX_H #define _DT_BINDINGS_PINCTRL_MT65XX_H #define MTK_PIN_NO(x) ((x) << 8) #define MTK_GET_PIN_NO(x) ((x) >> 8) #define MTK_GET_PIN_FUNC(x) ((x) & 0xf) #define MTK_PUPD_SET_R1R0_00 100 #define MTK_PUPD_SET_R1R0_01 101 #define MTK_PUPD_SET_R1R0_10 102 #define MTK_PUPD_SET_R1R0_11 103 #define MTK_DRIVE_2mA 2 #define MTK_DRIVE_4mA 4 #define MTK_DRIVE_6mA 6 #define MTK_DRIVE_8mA 8 #define MTK_DRIVE_10mA 10 #define MTK_DRIVE_12mA 12 #define MTK_DRIVE_14mA 14 #define MTK_DRIVE_16mA 16 #define MTK_DRIVE_20mA 20 #define MTK_DRIVE_24mA 24 #define MTK_DRIVE_28mA 28 #define MTK_DRIVE_32mA 32 #endif /* _DT_BINDINGS_PINCTRL_MT65XX_H */ n> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzijun_hu <zijun_hu@htc.com>2016-12-12 16:45:02 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2016-12-12 18:55:09 -0800
commit8f6066049c54ef0f726869c27d610cef5d15e084 (patch)
treef51e74b3a7158fdffa0c9f37f82fffe8fe3d537b
parentc5caf21ab0cf884ef15b25af234f620e4a233139 (diff)
mm/percpu.c: fix panic triggered by BUG_ON() falsely
As shown by pcpu_build_alloc_info(), the number of units within a percpu group is deduced by rounding up the number of CPUs within the group to @upa boundary/ Therefore, the number of CPUs isn't equal to the units's if it isn't aligned to @upa normally. However, pcpu_page_first_chunk() uses BUG_ON() to assert that one number is equal to the other roughly, so a panic is maybe triggered by the BUG_ON() incorrectly. In order to fix this issue, the number of CPUs is rounded up then compared with units's and the BUG_ON() is replaced with a warning and return of an error code as well, to keep system alive as much as possible. Link: http://lkml.kernel.org/r/57FCF07C.2020103@zoho.com Signed-off-by: zijun_hu <zijun_hu@htc.com> Cc: Tejun Heo <tj@kernel.org> Cc: Christoph Lameter <cl@linux.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>