m32r updates for 2.6.32-rc7
Hi Linus,
Here is m32r updates for 2.6.32-rc7.
Please pull the following updates from:
git://www.linux-m32r.org/git/takata/linux-2.6_dev.git for-linus
Thanks,
-- Takata
The following changes since commit b419148e567728f6af0c3b01965c1cc141e3e13a:
Linus Torvalds (1):
Linux 2.6.32-rc6
are available in the git repository at:
git://www.linux-m32r.org/git/takata/linux-2.6_dev.git for-linus
Hirokazu Takata (2):
m32r: add NOTES to vmlinux.lds.S to remove .note.gnu.build-id section
m32r: bzip2/lzma kernel compression support
Julia Lawall (1):
arch/m32r: Use DIV_ROUND_CLOSEST
Roel Kluin (1):
m32r: Should index be positive?
arch/m32r/Kconfig | 3 + arch/m32r/boot/compressed/Makefile | 16 +++- arch/m32r/boot/compressed/misc.c | 143 +++++++----------------------------- arch/m32r/kernel/smp.c | 2 +- arch/m32r/kernel/time.c | 6 +- arch/m32r/kernel/vmlinux.lds.S | 2 + 6 files changed, 48 insertions(+), 124 deletions(-)
---
commit 45cdd473301aae36e1f10664b9fe7ef5aad3f182
Author: Roel Kluin <[email protected]> Date: Sun Nov 1 15:33:06 2009 +0100
m32r: Should index be positive?
Index `ipi_num' is signed, test whether it is negative to make sure we don't get a negative array element.
arch/m32r/kernel/smp.c +1 -1
@@ -806,7 +806,7 @@ unsigned long send_IPI_mask_phys(cpumask_t physid_mask, int ipi_num,if (mask & ~physids_coerce (phys_cpu_present_map))BUG (); -if (ipi_num >=NR_IPIS ) +if (ipi_num >=NR_IPIS || ipi_num <0 )BUG (); mask <<=IPI_SHIFT ;
commit 337214e8c6b0c777713b2483749f9c03102a416c
Author: Hirokazu Takata <[email protected]> Date: Thu Oct 15 09:21:56 2009 +0900
m32r: bzip2/lzma kernel compression support
- Support bzip2 and lzma kernel compression for m32r.
- Clean up arch/m32r/boot/compressed/misc.c.
arch/m32r/Kconfig +3 -0
@@ -11,6 +11,9 @@ config M32R select HAVE_IDE select HAVE_OPROFILE select INIT_ALL_POSSIBLE + select HAVE_KERNEL_GZIP + select HAVE_KERNEL_BZIP2 + select HAVE_KERNEL_LZMA config SBUS bool
arch/m32r/boot/compressed/Makefile +13 -3
@@ -4,8 +4,8 @@ # create a compressed vmlinux image from the original vmlinux # -targets := vmlinux vmlinux.bin vmlinux.bin.gz head.o misc.o \ - piggy.o vmlinux.lds +targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 \ + vmlinux.bin.lzma head.o misc.o piggy.o vmlinux.lds OBJECTS = $(obj)/head.o $(obj)/misc.o
@@ -27,6 +27,12 @@ $(obj)/vmlinux.bin: vmlinux FORCE $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE $(call if_changed,gzip) +$(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE + $(call if_changed,bzip2) + +$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE + $(call if_changed,lzma) + CFLAGS_misc.o += -fpic ifdef CONFIG_MMU
@@ -37,5 +43,9 @@ endif OBJCOPYFLAGS += -R .empty_zero_page -$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.gz FORCE +suffix_$(CONFIG_KERNEL_GZIP) = gz +suffix_$(CONFIG_KERNEL_BZIP2) = bz2 +suffix_$(CONFIG_KERNEL_LZMA) = lzma + +$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix_y) FORCE $(call if_changed,ld)
arch/m32r/boot/compressed/misc.c +26 -117
186 lines not on this page · raw message
commit e968b8d404ae8ab4ef218cd145f6dcb71e65154b
Author: Hirokazu Takata <[email protected]> Date: Mon Oct 5 00:10:55 2009 +0900
m32r: add NOTES to vmlinux.lds.S to remove .note.gnu.build-id section
Building with --build-id option, .note.gnu.build-id section is added to vmlinux.bin. But some old buggy binutils creates a huge vmlinux.bin, and a bootloader fails to boot its zImage as well.
This patch adds a NOTES macro to a linker script vmlinux.ld.S to put .note.gnu.build-id section into .note section.
Then, the .note section will be removed, because "-R .note" option is specified in OBJCOPYFLAGS to make a vmlinux.bin binary.
arch/m32r/kernel/vmlinux.lds.S +2 -0
@@ -42,6 +42,8 @@ SECTIONS _etext = .; /* End of text section */ EXCEPTION_TABLE(16) + NOTES + RODATA RW_DATA_SECTION(32, PAGE_SIZE, THREAD_SIZE) _edata = .; /* End of data section */
commit 560235857fb79da48d36e8f866a0ee3b10a232bf
Author: Julia Lawall <[email protected]> Date: Sun Aug 2 10:47:27 2009 +0200
arch/m32r: Use DIV_ROUND_CLOSEST
The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d but is perhaps more readable.
The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@haskernel@
@@
@depends on haskernel@
expression x,__divisor;
@@
- (((x) + ((__divisor) / 2)) / (__divisor))
+ DIV_ROUND_CLOSEST(x,__divisor)
// </smpl>
arch/m32r/kernel/time.c +3 -3
@@ -75,7 +75,7 @@ u32 arch_gettimeoffset(void) count =0 ; count = (latch - count) *TICK_SIZE ; - elapsed_time = (count + latch /2 ) / latch; + elapsed_time =DIV_ROUND_CLOSEST (count, latch);/* NOTE: LATCH is equal to the "interval" value (= reload count). */ #else /* CONFIG_SMP */
@@ -93,7 +93,7 @@ u32 arch_gettimeoffset(void) p_count = count; count = (latch - count) *TICK_SIZE ; - elapsed_time = (count + latch /2 ) / latch; + elapsed_time =DIV_ROUND_CLOSEST (count, latch);/* NOTE: LATCH is equal to the "interval" value (= reload count). */ #endif /* CONFIG_SMP */ #elif defined(CONFIG_CHIP_M32310)
@@ -211,7 +211,7 @@ void __init time_init(void) bus_clock = boot_cpu_data.bus_clock; divide = boot_cpu_data.timer_divide; - latch = (bus_clock/divide +HZ /2 ) /HZ ; + latch =DIV_ROUND_CLOSEST (bus_clock/divide,HZ );printk ("Timer start : latch = %ld\n" , latch);
--
Hirokazu Takata <[email protected]>
Linux/M32R Project: http://www.linux-m32r.org/
Hi Linus,
Just a small fix.
There was a typo in the previous patch:
m32r: bzip2/lzma kernel compression support
337214e8c6b0c777713b2483749f9c03102a416c
Please pull from
git://www.linux-m32r.org/git/takata/linux-2.6_dev.git for-linus
Thanks,
-- Takata
---
The following changes since commit 7c9abfb884b8737f0afdc8a88bcea77526f0da87:
Linus Torvalds (1):
Merge branch 'kvm-updates/2.6.32' of git://git.kernel.org/pub/scm/virt/kvm/kvm
are available in the git repository at:
git://www.linux-m32r.org/git/takata/linux-2.6_dev.git for-linus
Hirokazu Takata (1):
m32r: fix arch/m32r/boot/compressed/Makefile
arch/m32r/boot/compressed/Makefile | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
---
commit a556bec9955c8e47b40a87dbfeef6f24d3b2228f
Author: Hirokazu Takata <[email protected]> Date: Mon Nov 9 08:51:35 2009 +0900
m32r: fix arch/m32r/boot/compressed/Makefile
- Fix a comment string
- Fix a typo of $(suffix-y)
arch/m32r/boot/compressed/Makefile +2 -2
@@ -1,5 +1,5 @@ # -# linux/arch/sh/boot/compressed/Makefile +# linux/arch/m32r/boot/compressed/Makefile # # create a compressed vmlinux image from the original vmlinux #
@@ -47,5 +47,5 @@ suffix_$(CONFIG_KERNEL_GZIP) = gz suffix_$(CONFIG_KERNEL_BZIP2) = bz2 suffix_$(CONFIG_KERNEL_LZMA) = lzma -$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix_y) FORCE +$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix-y) FORCE $(call if_changed,ld)
--
Hirokazu Takata <[email protected]>
Linux/M32R Project: http://www.linux-m32r.org/