Skip to content

Commit

Permalink
Merge branch 'akpm' (Andrew's patch-bomb)
Browse files Browse the repository at this point in the history
Merge random patches from Andrew Morton.

* Merge emailed patches from Andrew Morton <akpm@linux-foundation.org>: (32 commits)
  memblock: free allocated memblock_reserved_regions later
  mm: sparse: fix usemap allocation above node descriptor section
  mm: sparse: fix section usemap placement calculation
  xtensa: fix incorrect memset
  shmem: cleanup shmem_add_to_page_cache
  shmem: fix negative rss in memcg memory.stat
  tmpfs: revert SEEK_DATA and SEEK_HOLE
  drivers/rtc/rtc-twl.c: fix threaded IRQ to use IRQF_ONESHOT
  fat: fix non-atomic NFS i_pos read
  MAINTAINERS: add OMAP CPUfreq driver to OMAP Power Management section
  sgi-xp: nested calls to spin_lock_irqsave()
  fs: ramfs: file-nommu: add SetPageUptodate()
  drivers/rtc/rtc-mxc.c: fix irq enabled interrupts warning
  mm/memory_hotplug.c: release memory resources if hotadd_new_pgdat() fails
  h8300/uaccess: add mising __clear_user()
  h8300/uaccess: remove assignment to __gu_val in unhandled case of get_user()
  h8300/time: add missing #include <asm/irq_regs.h>
  h8300/signal: fix typo "statis"
  h8300/pgtable: add missing #include <asm-generic/pgtable.h>
  drivers/rtc/rtc-ab8500.c: ensure correct probing of the AB8500 RTC when Device Tree is enabled
  ...
  • Loading branch information
Linus Torvalds committed Jul 11, 2012
2 parents 605cd83 + 29f6738 commit 00c3e27
Show file tree
Hide file tree
Showing 38 changed files with 197 additions and 247 deletions.
1 change: 1 addition & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -4857,6 +4857,7 @@ M: Kevin Hilman <khilman@ti.com>
L: linux-omap@vger.kernel.org
S: Maintained
F: arch/arm/*omap*/*pm*
F: drivers/cpufreq/omap-cpufreq.c

OMAP POWERDOMAIN/CLOCKDOMAIN SOC ADAPTATION LAYER SUPPORT
M: Rajendra Nayak <rnayak@ti.com>
Expand Down
3 changes: 3 additions & 0 deletions arch/h8300/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,7 @@ extern int is_in_rom(unsigned long);
#define VMALLOC_END 0xffffffff

#define arch_enter_lazy_cpu_mode() do {} while (0)

#include <asm-generic/pgtable.h>

#endif /* _H8300_PGTABLE_H */
3 changes: 2 additions & 1 deletion arch/h8300/include/asm/uaccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ extern int __put_user_bad(void);
break; \
default: \
__gu_err = __get_user_bad(); \
__gu_val = 0; \
break; \
} \
(x) = __gu_val; \
Expand Down Expand Up @@ -159,4 +158,6 @@ clear_user(void *to, unsigned long n)
return 0;
}

#define __clear_user clear_user

#endif /* _H8300_UACCESS_H */
2 changes: 1 addition & 1 deletion arch/h8300/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
* want to handle. Thus you cannot kill init even with a SIGKILL even by
* mistake.
*/
statis void do_signal(struct pt_regs *regs)
static void do_signal(struct pt_regs *regs)
{
siginfo_t info;
int signr;
Expand Down
1 change: 1 addition & 0 deletions arch/h8300/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <linux/profile.h>

#include <asm/io.h>
#include <asm/irq_regs.h>
#include <asm/timer.h>

#define TICK_SIZE (tick_nsec / 1000)
Expand Down
3 changes: 0 additions & 3 deletions arch/mn10300/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@ struct pt_regs {
#define PTRACE_GETFPREGS 14
#define PTRACE_SETFPREGS 15

/* options set using PTRACE_SETOPTIONS */
#define PTRACE_O_TRACESYSGOOD 0x00000001

#ifdef __KERNEL__

#define user_mode(regs) (((regs)->epsw & EPSW_nSL) == EPSW_nSL)
Expand Down
11 changes: 0 additions & 11 deletions arch/mn10300/include/asm/timex.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#ifndef _ASM_TIMEX_H
#define _ASM_TIMEX_H

#include <asm/hardirq.h>
#include <unit/timex.h>

#define TICK_SIZE (tick_nsec / 1000)
Expand All @@ -30,16 +29,6 @@ static inline cycles_t get_cycles(void)
extern int init_clockevents(void);
extern int init_clocksource(void);

static inline void setup_jiffies_interrupt(int irq,
struct irqaction *action)
{
u16 tmp;
setup_irq(irq, action);
set_intr_level(irq, NUM2GxICR_LEVEL(CONFIG_TIMER_IRQ_LEVEL));
GxICR(irq) |= GxICR_ENABLE | GxICR_DETECT | GxICR_REQUEST;
tmp = GxICR(irq);
}

#endif /* __KERNEL__ */

#endif /* _ASM_TIMEX_H */
10 changes: 10 additions & 0 deletions arch/mn10300/kernel/cevt-mn10300.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,16 @@ static void event_handler(struct clock_event_device *dev)
{
}

static inline void setup_jiffies_interrupt(int irq,
struct irqaction *action)
{
u16 tmp;
setup_irq(irq, action);
set_intr_level(irq, NUM2GxICR_LEVEL(CONFIG_TIMER_IRQ_LEVEL));
GxICR(irq) |= GxICR_ENABLE | GxICR_DETECT | GxICR_REQUEST;
tmp = GxICR(irq);
}

int __init init_clockevents(void)
{
struct clock_event_device *cd;
Expand Down
2 changes: 2 additions & 0 deletions arch/mn10300/kernel/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
* 2 of the Licence, or (at your option) any later version.
*/

#include <linux/irqreturn.h>

struct clocksource;
struct clock_event_device;

Expand Down
4 changes: 2 additions & 2 deletions arch/mn10300/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ mn10300_cpupic_setaffinity(struct irq_data *d, const struct cpumask *mask,
case SC1TXIRQ:
#ifdef CONFIG_MN10300_TTYSM1_TIMER12
case TM12IRQ:
#elif CONFIG_MN10300_TTYSM1_TIMER9
#elif defined(CONFIG_MN10300_TTYSM1_TIMER9)
case TM9IRQ:
#elif CONFIG_MN10300_TTYSM1_TIMER3
#elif defined(CONFIG_MN10300_TTYSM1_TIMER3)
case TM3IRQ:
#endif /* CONFIG_MN10300_TTYSM1_TIMER12 */
#endif /* CONFIG_MN10300_TTYSM1 */
Expand Down
1 change: 1 addition & 0 deletions arch/mn10300/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <linux/kdebug.h>
#include <linux/bug.h>
#include <linux/irq.h>
#include <linux/export.h>
#include <asm/processor.h>
#include <linux/uaccess.h>
#include <asm/io.h>
Expand Down
1 change: 1 addition & 0 deletions arch/mn10300/mm/dma-alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <linux/string.h>
#include <linux/pci.h>
#include <linux/gfp.h>
#include <linux/export.h>
#include <asm/io.h>

static unsigned long pci_sram_allocated = 0xbc000000;
Expand Down
4 changes: 0 additions & 4 deletions arch/mn10300/unit-asb2303/include/unit/timex.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
#ifndef _ASM_UNIT_TIMEX_H
#define _ASM_UNIT_TIMEX_H

#ifndef __ASSEMBLY__
#include <linux/irq.h>
#endif /* __ASSEMBLY__ */

#include <asm/timer-regs.h>
#include <unit/clock.h>
#include <asm/param.h>
Expand Down
1 change: 1 addition & 0 deletions arch/mn10300/unit-asb2303/smc91111.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <linux/platform_device.h>

#include <asm/io.h>
#include <asm/irq.h>
#include <asm/timex.h>
#include <asm/processor.h>
#include <asm/intctl-regs.h>
Expand Down
4 changes: 0 additions & 4 deletions arch/mn10300/unit-asb2305/include/unit/timex.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
#ifndef _ASM_UNIT_TIMEX_H
#define _ASM_UNIT_TIMEX_H

#ifndef __ASSEMBLY__
#include <linux/irq.h>
#endif /* __ASSEMBLY__ */

#include <asm/timer-regs.h>
#include <unit/clock.h>
#include <asm/param.h>
Expand Down
1 change: 1 addition & 0 deletions arch/mn10300/unit-asb2305/unit-init.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <linux/init.h>
#include <linux/pci.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/setup.h>
#include <asm/processor.h>
#include <asm/intctl-regs.h>
Expand Down
4 changes: 0 additions & 4 deletions arch/mn10300/unit-asb2364/include/unit/timex.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
#ifndef _ASM_UNIT_TIMEX_H
#define _ASM_UNIT_TIMEX_H

#ifndef __ASSEMBLY__
#include <linux/irq.h>
#endif /* __ASSEMBLY__ */

#include <asm/timer-regs.h>
#include <unit/clock.h>
#include <asm/param.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ void xtensa_elf_core_copy_regs (xtensa_gregset_t *elfregs, struct pt_regs *regs)

/* Don't leak any random bits. */

memset(elfregs, 0, sizeof (elfregs));
memset(elfregs, 0, sizeof(*elfregs));

/* Note: PS.EXCM is not set while user task is running; its
* being set in regs->ps is for exception handling convenience.
Expand Down
4 changes: 2 additions & 2 deletions drivers/misc/sgi-xp/xpc_uv.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,9 +452,9 @@ xpc_handle_activate_mq_msg_uv(struct xpc_partition *part,

if (msg->activate_gru_mq_desc_gpa !=
part_uv->activate_gru_mq_desc_gpa) {
spin_lock_irqsave(&part_uv->flags_lock, irq_flags);
spin_lock(&part_uv->flags_lock);
part_uv->flags &= ~XPC_P_CACHED_ACTIVATE_GRU_MQ_DESC_UV;
spin_unlock_irqrestore(&part_uv->flags_lock, irq_flags);
spin_unlock(&part_uv->flags_lock);
part_uv->activate_gru_mq_desc_gpa =
msg->activate_gru_mq_desc_gpa;
}
Expand Down
10 changes: 8 additions & 2 deletions drivers/rtc/rtc-ab8500.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <linux/mfd/abx500.h>
#include <linux/mfd/abx500/ab8500.h>
#include <linux/delay.h>
#include <linux/of.h>

#define AB8500_RTC_SOFF_STAT_REG 0x00
#define AB8500_RTC_CC_CONF_REG 0x01
Expand Down Expand Up @@ -422,15 +423,14 @@ static int __devinit ab8500_rtc_probe(struct platform_device *pdev)
}

err = request_threaded_irq(irq, NULL, rtc_alarm_handler,
IRQF_NO_SUSPEND, "ab8500-rtc", rtc);
IRQF_NO_SUSPEND | IRQF_ONESHOT, "ab8500-rtc", rtc);
if (err < 0) {
rtc_device_unregister(rtc);
return err;
}

platform_set_drvdata(pdev, rtc);


err = ab8500_sysfs_rtc_register(&pdev->dev);
if (err) {
dev_err(&pdev->dev, "sysfs RTC failed to register\n");
Expand All @@ -454,10 +454,16 @@ static int __devexit ab8500_rtc_remove(struct platform_device *pdev)
return 0;
}

static const struct of_device_id ab8500_rtc_match[] = {
{ .compatible = "stericsson,ab8500-rtc", },
{}
};

static struct platform_driver ab8500_rtc_driver = {
.driver = {
.name = "ab8500-rtc",
.owner = THIS_MODULE,
.of_match_table = ab8500_rtc_match,
},
.probe = ab8500_rtc_probe,
.remove = __devexit_p(ab8500_rtc_remove),
Expand Down
5 changes: 3 additions & 2 deletions drivers/rtc/rtc-mxc.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,11 @@ static irqreturn_t mxc_rtc_interrupt(int irq, void *dev_id)
struct platform_device *pdev = dev_id;
struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
void __iomem *ioaddr = pdata->ioaddr;
unsigned long flags;
u32 status;
u32 events = 0;

spin_lock_irq(&pdata->rtc->irq_lock);
spin_lock_irqsave(&pdata->rtc->irq_lock, flags);
status = readw(ioaddr + RTC_RTCISR) & readw(ioaddr + RTC_RTCIENR);
/* clear interrupt sources */
writew(status, ioaddr + RTC_RTCISR);
Expand All @@ -224,7 +225,7 @@ static irqreturn_t mxc_rtc_interrupt(int irq, void *dev_id)
events |= (RTC_PF | RTC_IRQF);

rtc_update_irq(pdata->rtc, 1, events);
spin_unlock_irq(&pdata->rtc->irq_lock);
spin_unlock_irqrestore(&pdata->rtc->irq_lock, flags);

return IRQ_HANDLED;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/rtc/rtc-spear.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,12 +458,12 @@ static int __devexit spear_rtc_remove(struct platform_device *pdev)
clk_disable(config->clk);
clk_put(config->clk);
iounmap(config->ioaddr);
kfree(config);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (res)
release_mem_region(res->start, resource_size(res));
platform_set_drvdata(pdev, NULL);
rtc_device_unregister(config->rtc);
kfree(config);

return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/rtc/rtc-twl.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ static int __devinit twl_rtc_probe(struct platform_device *pdev)
}

ret = request_threaded_irq(irq, NULL, twl_rtc_interrupt,
IRQF_TRIGGER_RISING,
IRQF_TRIGGER_RISING | IRQF_ONESHOT,
dev_name(&rtc->dev), rtc);
if (ret < 0) {
dev_err(&pdev->dev, "IRQ is not free.\n");
Expand Down
13 changes: 6 additions & 7 deletions fs/fat/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -738,22 +738,21 @@ static int
fat_encode_fh(struct inode *inode, __u32 *fh, int *lenp, struct inode *parent)
{
int len = *lenp;
u32 ipos_h, ipos_m, ipos_l;
struct msdos_sb_info *sbi = MSDOS_SB(inode->i_sb);
loff_t i_pos;

if (len < 5) {
*lenp = 5;
return 255; /* no room */
}

ipos_h = MSDOS_I(inode)->i_pos >> 8;
ipos_m = (MSDOS_I(inode)->i_pos & 0xf0) << 24;
ipos_l = (MSDOS_I(inode)->i_pos & 0x0f) << 28;
i_pos = fat_i_pos_read(sbi, inode);
*lenp = 5;
fh[0] = inode->i_ino;
fh[1] = inode->i_generation;
fh[2] = ipos_h;
fh[3] = ipos_m | MSDOS_I(inode)->i_logstart;
fh[4] = ipos_l;
fh[2] = i_pos >> 8;
fh[3] = ((i_pos & 0xf0) << 24) | MSDOS_I(inode)->i_logstart;
fh[4] = (i_pos & 0x0f) << 28;
if (parent)
fh[4] |= MSDOS_I(parent)->i_logstart;
return 3;
Expand Down
2 changes: 1 addition & 1 deletion fs/ocfs2/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1950,7 +1950,7 @@ static int __ocfs2_change_file_space(struct file *file, struct inode *inode,
if (ret < 0)
mlog_errno(ret);

if (file->f_flags & O_SYNC)
if (file && (file->f_flags & O_SYNC))
handle->h_sync = 1;

ocfs2_commit_trans(osb, handle);
Expand Down
1 change: 1 addition & 0 deletions fs/ramfs/file-nommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize)

/* prevent the page from being discarded on memory pressure */
SetPageDirty(page);
SetPageUptodate(page);

unlock_page(page);
put_page(page);
Expand Down
5 changes: 5 additions & 0 deletions include/linux/bootmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ extern void *__alloc_bootmem_node_nopanic(pg_data_t *pgdat,
unsigned long size,
unsigned long align,
unsigned long goal);
void *___alloc_bootmem_node_nopanic(pg_data_t *pgdat,
unsigned long size,
unsigned long align,
unsigned long goal,
unsigned long limit);
extern void *__alloc_bootmem_low(unsigned long size,
unsigned long align,
unsigned long goal);
Expand Down
4 changes: 1 addition & 3 deletions include/linux/memblock.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ phys_addr_t memblock_find_in_range_node(phys_addr_t start, phys_addr_t end,
phys_addr_t size, phys_addr_t align, int nid);
phys_addr_t memblock_find_in_range(phys_addr_t start, phys_addr_t end,
phys_addr_t size, phys_addr_t align);
int memblock_free_reserved_regions(void);
int memblock_reserve_reserved_regions(void);

phys_addr_t get_allocated_memblock_reserved_regions_info(phys_addr_t *addr);
void memblock_allow_resize(void);
int memblock_add_node(phys_addr_t base, phys_addr_t size, int nid);
int memblock_add(phys_addr_t base, phys_addr_t size);
Expand Down
2 changes: 1 addition & 1 deletion include/linux/mmzone.h
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ typedef struct pglist_data {
range, including holes */
int node_id;
wait_queue_head_t kswapd_wait;
struct task_struct *kswapd;
struct task_struct *kswapd; /* Protected by lock_memory_hotplug() */
int kswapd_max_order;
enum zone_type classzone_idx;
} pg_data_t;
Expand Down
Loading

0 comments on commit 00c3e27

Please sign in to comment.