diff --git a/[refs] b/[refs] index d80c635d6c4e..7ad69a2028cc 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 29cf519ee086686e5f0fc91cbb2d601dd1190f9c +refs/heads/master: 2809e80b8a73d556b2302e273966fb15db16c51e diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS index b5ea4d033730..bbe49d8c22af 100644 --- a/trunk/MAINTAINERS +++ b/trunk/MAINTAINERS @@ -4945,6 +4945,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/epip/linux-2.6-unicore32.gi F: drivers/input/serio/i8042-unicore32io.h F: drivers/i2c/busses/i2c-puv3.c F: drivers/video/fb-puv3.c +F: drivers/rtc/rtc-puv3.c PMC SIERRA MaxRAID DRIVER M: Anil Ravindranath diff --git a/trunk/arch/unicore32/Kconfig b/trunk/arch/unicore32/Kconfig index d3a303246c9f..e57dcce9bfda 100644 --- a/trunk/arch/unicore32/Kconfig +++ b/trunk/arch/unicore32/Kconfig @@ -231,10 +231,6 @@ config PUV3_PWM help Enable support for NB0916 PWM controllers -config PUV3_RTC - tristate "PKUnity v3 RTC Support" - depends on !ARCH_FPGA - if PUV3_NB0916 menu "PKUnity NetBook-0916 Features" diff --git a/trunk/arch/unicore32/configs/debug_defconfig b/trunk/arch/unicore32/configs/debug_defconfig index b5fbde9f1cb2..9b9c2519a38f 100644 --- a/trunk/arch/unicore32/configs/debug_defconfig +++ b/trunk/arch/unicore32/configs/debug_defconfig @@ -64,7 +64,6 @@ CONFIG_I2C_BATTERY_BQ27200=n CONFIG_I2C_EEPROM_AT24=n CONFIG_LCD_BACKLIGHT=n -CONFIG_PUV3_RTC=y CONFIG_PUV3_UMAL=y CONFIG_PUV3_MUSB=n CONFIG_PUV3_AC97=n @@ -167,8 +166,9 @@ CONFIG_LEDS_TRIGGER_IDE_DISK=y CONFIG_LEDS_TRIGGER_HEARTBEAT=y # Real Time Clock -CONFIG_RTC_LIB=m -CONFIG_RTC_CLASS=m +CONFIG_RTC_LIB=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_PUV3=y ### File systems CONFIG_EXT2_FS=m diff --git a/trunk/arch/unicore32/kernel/Makefile b/trunk/arch/unicore32/kernel/Makefile index ec23a2fb2f50..aeb0f181568e 100644 --- a/trunk/arch/unicore32/kernel/Makefile +++ b/trunk/arch/unicore32/kernel/Makefile @@ -16,7 +16,6 @@ obj-$(CONFIG_UNICORE_FPU_F64) += fpu-ucf64.o obj-$(CONFIG_ARCH_PUV3) += clock.o irq.o time.o obj-$(CONFIG_PUV3_GPIO) += gpio.o -obj-$(CONFIG_PUV3_RTC) += rtc.o obj-$(CONFIG_PUV3_PWM) += pwm.o obj-$(CONFIG_PUV3_PM) += pm.o sleep.o obj-$(CONFIG_HIBERNATION) += hibernate.o hibernate_asm.o diff --git a/trunk/arch/x86/kernel/process_32.c b/trunk/arch/x86/kernel/process_32.c index a3d0dc59067b..8d128783af47 100644 --- a/trunk/arch/x86/kernel/process_32.c +++ b/trunk/arch/x86/kernel/process_32.c @@ -245,6 +245,7 @@ start_thread(struct pt_regs *regs, unsigned long new_ip, unsigned long new_sp) { set_user_gs(regs, 0); regs->fs = 0; + set_fs(USER_DS); regs->ds = __USER_DS; regs->es = __USER_DS; regs->ss = __USER_DS; diff --git a/trunk/arch/x86/kernel/process_64.c b/trunk/arch/x86/kernel/process_64.c index ca6f7ab8df33..6c9dd922ac0d 100644 --- a/trunk/arch/x86/kernel/process_64.c +++ b/trunk/arch/x86/kernel/process_64.c @@ -338,6 +338,7 @@ start_thread_common(struct pt_regs *regs, unsigned long new_ip, regs->cs = _cs; regs->ss = _ss; regs->flags = X86_EFLAGS_IF; + set_fs(USER_DS); /* * Free the old FP and other extended state */ diff --git a/trunk/drivers/rtc/Kconfig b/trunk/drivers/rtc/Kconfig index f822e13dc04b..ce2aabf5c550 100644 --- a/trunk/drivers/rtc/Kconfig +++ b/trunk/drivers/rtc/Kconfig @@ -1051,4 +1051,13 @@ config RTC_DRV_TILE Enable support for the Linux driver side of the Tilera hypervisor's real-time clock interface. +config RTC_DRV_PUV3 + tristate "PKUnity v3 RTC support" + depends on ARCH_PUV3 + help + This enables support for the RTC in the PKUnity-v3 SoCs. + + This drive can also be built as a module. If so, the module + will be called rtc-puv3. + endif # RTC_CLASS diff --git a/trunk/drivers/rtc/Makefile b/trunk/drivers/rtc/Makefile index 213d725f16d4..0ffefe877bfa 100644 --- a/trunk/drivers/rtc/Makefile +++ b/trunk/drivers/rtc/Makefile @@ -78,6 +78,7 @@ obj-$(CONFIG_RTC_DRV_PCF50633) += rtc-pcf50633.o obj-$(CONFIG_RTC_DRV_PL030) += rtc-pl030.o obj-$(CONFIG_RTC_DRV_PL031) += rtc-pl031.o obj-$(CONFIG_RTC_DRV_PS3) += rtc-ps3.o +obj-$(CONFIG_RTC_DRV_PUV3) += rtc-puv3.o obj-$(CONFIG_RTC_DRV_PXA) += rtc-pxa.o obj-$(CONFIG_RTC_DRV_R9701) += rtc-r9701.o obj-$(CONFIG_RTC_DRV_RP5C01) += rtc-rp5c01.o diff --git a/trunk/arch/unicore32/kernel/rtc.c b/trunk/drivers/rtc/rtc-puv3.c similarity index 98% rename from trunk/arch/unicore32/kernel/rtc.c rename to trunk/drivers/rtc/rtc-puv3.c index 8cad70b3302c..46f14b82f3ab 100644 --- a/trunk/arch/unicore32/kernel/rtc.c +++ b/trunk/drivers/rtc/rtc-puv3.c @@ -1,7 +1,5 @@ /* - * linux/arch/unicore32/kernel/rtc.c - * - * Code specific to PKUnity SoC and UniCore ISA + * RTC driver code specific to PKUnity SoC and UniCore ISA * * Maintained by GUAN Xue-tao * Copyright (C) 2001-2010 Guan Xuetao @@ -36,7 +34,6 @@ static int puv3_rtc_tickno = IRQ_RTC; static DEFINE_SPINLOCK(puv3_rtc_pie_lock); /* IRQ Handlers */ - static irqreturn_t puv3_rtc_alarmirq(int irq, void *id) { struct rtc_device *rdev = id; @@ -89,7 +86,6 @@ static int puv3_rtc_setpie(struct device *dev, int enabled) } /* Time read/write */ - static int puv3_rtc_gettime(struct device *dev, struct rtc_time *rtc_tm) { rtc_time_to_tm(readl(RTC_RCNR), rtc_tm); @@ -196,7 +192,6 @@ static void puv3_rtc_release(struct device *dev) struct rtc_device *rtc_dev = platform_get_drvdata(pdev); /* do not clear AIE here, it may be needed for wake */ - puv3_rtc_setpie(dev, 0); free_irq(puv3_rtc_alarmno, rtc_dev); free_irq(puv3_rtc_tickno, rtc_dev); @@ -218,7 +213,6 @@ static void puv3_rtc_enable(struct platform_device *pdev, int en) writel(readl(RTC_RTSR) & ~RTC_RTSR_HZE, RTC_RTSR); } else { /* re-enable the device, and check it is ok */ - if ((readl(RTC_RTSR) & RTC_RTSR_HZE) == 0) { dev_info(&pdev->dev, "rtc disabled, re-enabling\n"); writel(readl(RTC_RTSR) | RTC_RTSR_HZE, RTC_RTSR); @@ -251,7 +245,6 @@ static int puv3_rtc_probe(struct platform_device *pdev) pr_debug("%s: probe=%p\n", __func__, pdev); /* find the IRQs */ - puv3_rtc_tickno = platform_get_irq(pdev, 1); if (puv3_rtc_tickno < 0) { dev_err(&pdev->dev, "no irq for rtc tick\n"); @@ -268,7 +261,6 @@ static int puv3_rtc_probe(struct platform_device *pdev) puv3_rtc_tickno, puv3_rtc_alarmno); /* get the memory region */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (res == NULL) { dev_err(&pdev->dev, "failed to get memory region resource\n"); @@ -288,7 +280,6 @@ static int puv3_rtc_probe(struct platform_device *pdev) puv3_rtc_enable(pdev, 1); /* register RTC and exit */ - rtc = rtc_device_register("pkunity", &pdev->dev, &puv3_rtcops, THIS_MODULE); @@ -315,8 +306,6 @@ static int puv3_rtc_probe(struct platform_device *pdev) #ifdef CONFIG_PM -/* RTC Power management control */ - static int ticnt_save; static int puv3_rtc_suspend(struct platform_device *pdev, pm_message_t state) @@ -368,4 +357,3 @@ module_exit(puv3_rtc_exit); MODULE_DESCRIPTION("RTC Driver for the PKUnity v3 chip"); MODULE_AUTHOR("Hu Dongliang"); MODULE_LICENSE("GPL v2"); - diff --git a/trunk/fs/exec.c b/trunk/fs/exec.c index 97e0d52d72fd..ea5f748906a8 100644 --- a/trunk/fs/exec.c +++ b/trunk/fs/exec.c @@ -1093,7 +1093,6 @@ int flush_old_exec(struct linux_binprm * bprm) bprm->mm = NULL; /* We're using it now */ - set_fs(USER_DS); current->flags &= ~(PF_RANDOMIZE | PF_KTHREAD); flush_thread(); current->personality &= ~bprm->per_clear; @@ -1358,6 +1357,10 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs) if (retval) return retval; + /* kernel module loader fixup */ + /* so we don't try to load run modprobe in kernel space. */ + set_fs(USER_DS); + retval = audit_bprm(bprm); if (retval) return retval; diff --git a/trunk/lib/vsprintf.c b/trunk/lib/vsprintf.c index 4365df31a1d5..c11205688fb4 100644 --- a/trunk/lib/vsprintf.c +++ b/trunk/lib/vsprintf.c @@ -666,8 +666,6 @@ char *ip6_compressed_string(char *p, const char *addr) colonpos = i; } } - if (longest == 1) /* don't compress a single 0 */ - colonpos = -1; /* emit address */ for (i = 0; i < range; i++) { @@ -828,7 +826,7 @@ int kptr_restrict __read_mostly; * IPv4 uses dot-separated decimal with leading 0's (010.123.045.006) * - '[Ii]4[hnbl]' IPv4 addresses in host, network, big or little endian order * - 'I6c' for IPv6 addresses printed as specified by - * http://tools.ietf.org/html/rfc5952 + * http://tools.ietf.org/html/draft-ietf-6man-text-addr-representation-00 * - 'U' For a 16 byte UUID/GUID, it prints the UUID/GUID in the form * "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" * Options for %pU are: