- 03 5月, 2013 6 次提交
-
-
由 Russell King 提交于
s5p_register_gpio_interrupt() returns 0 or positive for success, and -ve for errors, so just use the standard >= 0 test. Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
由 Russell King 提交于
device_register() returns -ve values for errors, and zero for success. There's no need to obfuscate the code with IS_ERR_VALUE(). Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
由 Russell King 提交于
Consistently check errors using the usual method used in the kernel for much of its history. For instance: int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t) { int div; div = gpmc_calc_divider(t->sync_clk); if (div < 0) return div; static int gpmc_set_async_mode(int cs, struct gpmc_timings *t) { ... return gpmc_cs_set_timings(cs, t); ..... ret = gpmc_set_async_mode(gpmc_onenand_data->cs, &t); if (IS_ERR_VALUE(ret)) return ret; So, gpmc_cs_set_timings() thinks any negative return value is an error, but where we check that in higher levels, only a limited range are errors... There is only _one_ use of IS_ERR_VALUE() in arch/arm which is really appropriate, and that is in arch/arm/include/asm/syscall.h: static inline long syscall_get_error(struct task_struct *task, struct pt_regs *regs) { unsigned long error = regs->ARM_r0; return IS_ERR_VALUE(error) ? error : 0; } because this function really does have to differentiate between error return values and addresses which look like negative numbers (eg, from mmap()). So, here's a patch to remove them from OMAP, except for the above. Acked-by: NTony Lindgren <tony@atomide.com> Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
由 Russell King 提交于
omap_hwmod_lookup() only returns NULL on error, never an error pointer. Checking the returned pointer using IS_ERR_OR_NULL() is needless overhead. Use a simple !ptr check instead. OMAP devices (oh->od) always have a valid platform device attached (see omap_device_alloc()) so there's no point validating the platform device pointer (we will have already oopsed long before if this is not the case here.) Lastly, oh->od is only ever NULL or a valid omap device pointer - 'oh' comes from the statically declared hwmod tables, and the pointer is only filled in by omap_device_alloc() at a point where the omap device pointer must be valid. Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
由 H. Peter Anvin 提交于
During early init, we would incorrectly set the NX bit even if the NX feature was not supported. Instead, only set this bit if NX is actually available and enabled. We already do very early detection of the NX bit to enable it in EFER, this simply extends this detection to the early page table mask. Reported-by: NFernando Luis Vázquez Cao <fernando@oss.ntt.co.jp> Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com> Link: http://lkml.kernel.org/r/1367476850.5660.2.camel@nexus Cc: <stable@vger.kernel.org> v3.9
-
由 Konrad Rzeszutek Wilk 提交于
The git commite7a5cd06 ("x86-64, gdt: Store/load GDT for ACPI S3 or hibernate/resume path is not needed.") assumes that for the hibernate path the booting kernel and the resuming kernel MUST be the same. That is certainly the case for a 32-bit kernel (see check_image_kernel and CONFIG_ARCH_HIBERNATION_HEADER config option). However for 64-bit kernels it is OK to have a different kernel version (and size of the image) of the booting and resuming kernels. Hence the above mentioned git commit introduces an regression. This patch fixes it by introducing a 'struct desc_ptr gdt_desc' back in the 'struct saved_context'. However instead of having in the 'save_processor_state' and 'restore_processor_state' the store/load_gdt calls, we are only saving the GDT in the save_processor_state. For the restore path the lgdt operation is done in hibernate_asm_[32|64].S in the 'restore_registers' path. The apt reader of this description will recognize that only 64-bit kernels need this treatment, not 32-bit. This patch adds the logic in the 32-bit path to be more similar to 64-bit so that in the future the unification process can take advantage of this. [ hpa: this also reverts an inadvertent on-disk format change ] Suggested-by: N"H. Peter Anvin" <hpa@zytor.com> Acked-by: N"Rafael J. Wysocki" <rjw@sisk.pl> Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com> Link: http://lkml.kernel.org/r/1367459610-9656-2-git-send-email-konrad.wilk@oracle.comSigned-off-by: NH. Peter Anvin <hpa@linux.intel.com>
-
- 02 5月, 2013 10 次提交
-
-
由 Dave Martin 提交于
The full mcpm layer is not likely to be relevant to v6 based platforms, so a multiplatform kernel won't use that code if booted on v6 hardware. This patch modifies the AFLAGS for affected mcpm .S files to specify armv7-a explicitly for that code. Signed-off-by: NDave Martin <dave.martin@linaro.org> Acked-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NNicolas Pitre <nico@linaro.org> Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
由 Aneesh Kumar K.V 提交于
We moved the definition of shift_to_mmu_psize and mmu_psize_to_shift out of hugetlbpage.c in patch "powerpc: New hugepage directory format". These functions are not related to hugetlbpage and we want to use them outside hugetlbpage.c We missed a definition for book3e when we moved these functions. Add similar functions to mmu-book3e.h Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
-
由 Michael Ellerman 提交于
This context switches the new Event Based Branching (EBB) SPRs. The three new SPRs are: - Event Based Branch Handler Register (EBBHR) - Event Based Branch Return Register (EBBRR) - Branch Event Status and Control Register (BESCR) Signed-off-by: NMichael Ellerman <michael@ellerman.id.au> Signed-off-by: NMatt Evans <matt@ozlabs.org> Signed-off-by: NMichael Neuling <mikey@neuling.org> Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
-
由 Michael Neuling 提交于
This turns Event Based Branching (EBB) on in the Hypervisor Facility Status and Control Register (HFSCR) and Facility Status and Control Register (FSCR). Signed-off-by: NMichael Neuling <mikey@neuling.org> Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
-
由 Michael Ellerman 提交于
We are getting low on cpu feature bits. So rather than add a separate bit for every new Power8 feature, add a bit for arch 2.07 server catagory and use that instead. Hijack the value we had for BCTAR, but swap the value with CFAR so that all the ARCH defines are together. Note we don't touch CPU_FTR_TM, because it is conditionally enabled if the kernel is built with TM support. Signed-off-by: NMichael Ellerman <michael@ellerman.id.au> Signed-off-by: NMichael Neuling <mikey@neuling.org> Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
-
由 Anshuman Khandual 提交于
Make BHRB instructions available in problem and privileged states. Signed-off-by: NAnshuman Khandual <khandual@linux.vnet.ibm.com> Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
-
由 Bharat Bhushan 提交于
We do not want to take single step and branch-taken debug exception in kernel exception code. But the address range check was not covering all kernel exception handlers address range. With this patch we defined the interrupt_end label which defines the end on kernel exception code. So now we check interrupt_base to interrupt_end range for not handling debug exception in kernel exception entry. Signed-off-by: NBharat Bhushan <bharat.bhushan@freescale.com> Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
-
由 David Howells 提交于
Clean up the pseries scanlog driver's use of procfs: (1) Don't need to save the proc_dir_entry pointer as we have the filename to remove with. (2) Save the scan log buffer pointer in a static variable (there is only one of it) and don't save it in the PDE (which doesn't have a destructor). Signed-off-by: NDavid Howells <dhowells@redhat.com> cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> cc: Paul Mackerras <paulus@samba.org> cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
由 David Howells 提交于
Clean up some of the problems with the rtas_flash driver: (1) It shouldn't fiddle with the internals of the procfs filesystem (altering pde->count). (2) If pid namespaces are in effect, then you can get multiple inodes connected to a single pde, thereby rendering the pde->count > 2 test useless. (3) The pde->count fudging doesn't work for forked, dup'd or cloned file descriptors, so add static mutexes and use them to wrap access to the driver through read, write and release methods. (4) The driver can only handle one device, so allocate most of the data previously attached to the pde->data as static variables instead (though allocate the validation data buffer with kmalloc). (5) We don't need to save the pde pointers as long as we have the filenames available for removal. (6) Don't try to multiplex what the update file read method does based on the filename. Instead provide separate file ops and split the function. Whilst we're at it, tabulate the procfile information and loop through it when creating or destroying them rather than manually coding each one. [Folded fixes from Vasant Hegde <hegdevasant@linux.vnet.ibm.com>] Signed-off-by: NDavid Howells <dhowells@redhat.com> cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> cc: Paul Mackerras <paulus@samba.org> cc: Anton Blanchard <anton@samba.org> cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
由 David Howells 提交于
Supply accessor functions to set attributes in proc_dir_entry structs. The following are supplied: proc_set_size() and proc_set_user(). Signed-off-by: NDavid Howells <dhowells@redhat.com> Acked-by: NMauro Carvalho Chehab <mchehab@redhat.com> cc: linuxppc-dev@lists.ozlabs.org cc: linux-media@vger.kernel.org cc: netdev@vger.kernel.org cc: linux-wireless@vger.kernel.org cc: linux-pci@vger.kernel.org cc: netfilter-devel@vger.kernel.org cc: alsa-devel@alsa-project.org Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
- 01 5月, 2013 24 次提交
-
-
由 Richard Kuo 提交于
Signed-off-by: NRichard Kuo <rkuo@codeaurora.org>
-
由 Richard Kuo 提交于
Signed-off-by: NRichard Kuo <rkuo@codeaurora.org>
-
由 Richard Kuo 提交于
With physical offsets, pa<->va translations aren't just based on PAGE_OFFSET anymore. Signed-off-by: NRichard Kuo <rkuo@codeaurora.org>
-
由 Richard Kuo 提交于
Signed-off-by: NRichard Kuo <rkuo@codeaurora.org>
-
由 Richard Kuo 提交于
Signed-off-by: NRichard Kuo <rkuo@codeaurora.org>
-
由 Paul Bolle 提交于
The Kconfig entries for HEXAGON_VM and HEXAGON_ANGEL_TRAPS were added, together with the configuration and makefiles for the Hexagon architecture, in v3.2. They have never been used. They can safely be removed. Signed-off-by: NPaul Bolle <pebolle@tiscali.nl> [rkuo@codeaurora.org: adjust for line changes in Kconfig] Signed-off-by: NRichard Kuo <rkuo@codeaurora.org>
-
由 Paul Bolle 提交于
CONFIG_GENERIC_FIND_NEXT_BIT was removed in v3.0, but reappeared in two architectures. Remove it again. Signed-off-by: NPaul Bolle <pebolle@tiscali.nl> Acked-by: NJonas Bonn <jonas@southpole.se> Signed-off-by: NRichard Kuo <rkuo@codeaurora.org>
-
由 Richard Kuo 提交于
Signed-off-by: NRichard Kuo <rkuo@codeaurora.org>
-
由 Richard Kuo 提交于
Signed-off-by: NRichard Kuo <rkuo@codeaurora.org>
-
由 Richard Kuo 提交于
Signed-off-by: NRichard Kuo <rkuo@codeaurora.org>
-
由 Richard Kuo 提交于
Signed-off-by: NRichard Kuo <rkuo@codeaurora.org>
-
由 Richard Kuo 提交于
Signed-off-by: NRichard Kuo <rkuo@codeaurora.org>
-
由 Richard Kuo 提交于
Based on feedback from Al Viro; previous-stack-pointer and user reg for same should always be kept consistent. Signed-off-by: NRichard Kuo <rkuo@codeaurora.org>
-
由 Richard Kuo 提交于
Check return coming out of check_work_pending, and if copy_thread passed us a function in r24, call it. Based on feedback from Al Viro. Signed-off-by: NRichard Kuo <rkuo@codeaurora.org>
-
由 Richard Kuo 提交于
Signed-off-by: NRichard Kuo <rkuo@codeaurora.org>
-
由 Richard Kuo 提交于
Uncached on our architecture can still have side effects such as canceled/replayed transactions; device type prevents this. Signed-off-by: NRichard Kuo <rkuo@codeaurora.org>
-
由 Richard Kuo 提交于
Signed-off-by: NRichard Kuo <rkuo@codeaurora.org>
-
由 Richard Kuo 提交于
Hardware single-step is only available on v4 and later architectures. Signed-off-by: NRichard Kuo <rkuo@codeaurora.org>
-
由 Richard Kuo 提交于
Signed-off-by: NRichard Kuo <rkuo@codeaurora.org>
-
由 Richard Kuo 提交于
Add multi-reg-write and unaligned-PC exceptions. Signed-off-by: NRichard Kuo <rkuo@codeaurora.org>
-
由 Richard Kuo 提交于
Use the exact number of pages needed to be mapped pre-VA-jump, then map 896MB afterwards, which the arch mem init will fix up. Signed-off-by: NRichard Kuo <rkuo@codeaurora.org>
-
由 Richard Kuo 提交于
Signed-off-by: NRichard Kuo <rkuo@codeaurora.org>
-
由 Richard Kuo 提交于
Signed-off-by: NRichard Kuo <rkuo@codeaurora.org>
-
由 Richard Kuo 提交于
This fixes the return value of sigreturn and moves the work pending check into a c routine for readability and fixes the loop for multiple pending signals. Based on feedback from Al Viro. Signed-off-by: NRichard Kuo <rkuo@codeaurora.org>
-