All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] CRIS: TLB handling - turn local_save_flags() + local_irq_disable() into local_irq_save()
@ 2007-02-09 16:39 Jiri Kosina
  2007-02-09 16:40 ` [PATCH] DS1302: local_irq_disable() is redundant after local_irq_save() Jiri Kosina
  0 siblings, 1 reply; 2+ messages in thread
From: Jiri Kosina @ 2007-02-09 16:39 UTC (permalink / raw)
  To: Andrew Morton, Mikael Starvik; +Cc: linux-kernel

Andrew,

some time ago I sent you a bunch of patches that fixed local_irq_save(), 
local_save_flags() and local_irq_disable() all over the tree. You merged 
most of them, but seems to me that two of them went unattended (can't see 
it in your patchset), so I resend.

CRIS: TLB handling - turn local_save_flags() + local_irq_disable() into local_irq_save()

TLB handling for CRIS contains local_irq_disable() after local_save_flags().
Turn this into local_irq_save().

Signed-off-by: Jiri Kosina <jkosina@suse.cz>

---

 arch/cris/arch-v10/mm/tlb.c |    9 +++------
 arch/cris/arch-v32/mm/tlb.c |    9 +++------
 2 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/arch/cris/arch-v10/mm/tlb.c b/arch/cris/arch-v10/mm/tlb.c
index 70a5523..7d9fec8 100644
--- a/arch/cris/arch-v10/mm/tlb.c
+++ b/arch/cris/arch-v10/mm/tlb.c
@@ -42,8 +42,7 @@ flush_tlb_all(void)
 	 * in the same 4-way entry group. details.. 
 	 */
 
-	local_save_flags(flags);
-	local_irq_disable();
+	local_irq_save(flags);
 	for(i = 0; i < NUM_TLB_ENTRIES; i++) {
 		*R_TLB_SELECT = ( IO_FIELD(R_TLB_SELECT, index, i) );
 		*R_TLB_HI = ( IO_FIELD(R_TLB_HI, page_id, INVALID_PAGEID ) |
@@ -78,8 +77,7 @@ flush_tlb_mm(struct mm_struct *mm)
 	 * global pages. is it worth the extra I/O ? 
 	 */
 
-	local_save_flags(flags);
-	local_irq_disable();
+	local_irq_save(flags);
 	for(i = 0; i < NUM_TLB_ENTRIES; i++) {
 		*R_TLB_SELECT = IO_FIELD(R_TLB_SELECT, index, i);
 		if (IO_EXTRACT(R_TLB_HI, page_id, *R_TLB_HI) == page_id) {
@@ -118,8 +116,7 @@ flush_tlb_page(struct vm_area_struct *vma,
 	 * and the virtual address requested 
 	 */
 
-	local_save_flags(flags);
-	local_irq_disable();
+	local_irq_save(flags);
 	for(i = 0; i < NUM_TLB_ENTRIES; i++) {
 		unsigned long tlb_hi;
 		*R_TLB_SELECT = IO_FIELD(R_TLB_SELECT, index, i);
diff --git a/arch/cris/arch-v32/mm/tlb.c b/arch/cris/arch-v32/mm/tlb.c
index 9d75d76..c2d12e9 100644
--- a/arch/cris/arch-v32/mm/tlb.c
+++ b/arch/cris/arch-v32/mm/tlb.c
@@ -54,8 +54,7 @@ __flush_tlb_all(void)
 	 * Mask with 0xf so similar TLB entries aren't written in the same 4-way
 	 * entry group.
 	 */
-	local_save_flags(flags);
-	local_irq_disable();
+	local_irq_save(flags);
 
 	for (mmu = 1; mmu <= 2; mmu++) {
 		SUPP_BANK_SEL(mmu); /* Select the MMU */
@@ -92,8 +91,7 @@ __flush_tlb_mm(struct mm_struct *mm)
 		return;
 
 	/* Mark the TLB entries that match the page_id as invalid. */
-	local_save_flags(flags);
-	local_irq_disable();
+	local_irq_save(flags);
 
 	for (mmu = 1; mmu <= 2; mmu++) {
 		SUPP_BANK_SEL(mmu);
@@ -140,8 +138,7 @@ __flush_tlb_page(struct vm_area_struct *vma, unsigned long addr)
 	 * Invalidate those TLB entries that match both the mm context and the
 	 * requested virtual address.
 	 */
-	local_save_flags(flags);
-	local_irq_disable();
+	local_irq_save(flags);
 
 	for (mmu = 1; mmu <= 2; mmu++) {
 		SUPP_BANK_SEL(mmu);


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] DS1302: local_irq_disable() is redundant after local_irq_save()
  2007-02-09 16:39 [PATCH] CRIS: TLB handling - turn local_save_flags() + local_irq_disable() into local_irq_save() Jiri Kosina
@ 2007-02-09 16:40 ` Jiri Kosina
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2007-02-09 16:40 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

DS1302: local_irq_disable() is redundant after local_irq_save()

drivers/char/ds1302.c::get_rtc_time() contains local_irq_disable() call 
after local_irq_save(). This looks redundant.

drivers/char/ds1302.c::rtc_ioctl() contains local_irq_disable() call after 
local_irq_save(). This looks redundant.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>

---

 drivers/char/ds1302.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/drivers/char/ds1302.c b/drivers/char/ds1302.c
index bcdb107..fada6dd 100644
--- a/drivers/char/ds1302.c
+++ b/drivers/char/ds1302.c
@@ -120,7 +120,6 @@ get_rtc_time(struct rtc_time *rtc_tm)
 	unsigned long flags;
 
 	local_irq_save(flags);
-	local_irq_disable();
 
 	rtc_tm->tm_sec = CMOS_READ(RTC_SECONDS);
 	rtc_tm->tm_min = CMOS_READ(RTC_MINUTES);
@@ -219,7 +218,6 @@ rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
 			BIN_TO_BCD(yrs);
 
 			local_irq_save(flags);
-			local_irq_disable();
 			CMOS_WRITE(yrs, RTC_YEAR);
 			CMOS_WRITE(mon, RTC_MONTH);
 			CMOS_WRITE(day, RTC_DAY_OF_MONTH);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-02-09 16:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-09 16:39 [PATCH] CRIS: TLB handling - turn local_save_flags() + local_irq_disable() into local_irq_save() Jiri Kosina
2007-02-09 16:40 ` [PATCH] DS1302: local_irq_disable() is redundant after local_irq_save() Jiri Kosina

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.