public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] IA64: hpsim, fix SAL handling in fw-emu
@ 2012-02-24 11:10 Jiri Slaby
  2012-02-24 11:10 ` [PATCH 2/4] IA64: simserial, include some headers Jiri Slaby
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Jiri Slaby @ 2012-02-24 11:10 UTC (permalink / raw)
  To: tony.luck; +Cc: fenghua.yu, linux-ia64, linux-kernel, jirislaby

The switch-cases of SAL_FREQ_BASE generate non-relocatable code. The
same as for the ifs one level upper. This causes oopses early in boot
because the kernel jumps to the hell instead of the offset in sal
callback.

So use ifs here for SAL_FREQ_BASE decision too.

Isn't there any compiler directive or settings to solve that cleanly?

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 arch/ia64/hp/sim/boot/fw-emu.c |   17 ++++-------------
 1 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/arch/ia64/hp/sim/boot/fw-emu.c b/arch/ia64/hp/sim/boot/fw-emu.c
index bf6d9d8..0216e28 100644
--- a/arch/ia64/hp/sim/boot/fw-emu.c
+++ b/arch/ia64/hp/sim/boot/fw-emu.c
@@ -160,28 +160,19 @@ sal_emulator (long index, unsigned long in1, unsigned long in2,
 	 */
 	status = 0;
 	if (index == SAL_FREQ_BASE) {
-		switch (in1) {
-		      case SAL_FREQ_BASE_PLATFORM:
+		if (in1 == SAL_FREQ_BASE_PLATFORM)
 			r9 = 200000000;
-			break;
-
-		      case SAL_FREQ_BASE_INTERVAL_TIMER:
+		else if (in1 == SAL_FREQ_BASE_INTERVAL_TIMER) {
 			/*
 			 * Is this supposed to be the cr.itc frequency
 			 * or something platform specific?  The SAL
 			 * doc ain't exactly clear on this...
 			 */
 			r9 = 700000000;
-			break;
-
-		      case SAL_FREQ_BASE_REALTIME_CLOCK:
+		} else if (in1 == SAL_FREQ_BASE_REALTIME_CLOCK)
 			r9 = 1;
-			break;
-
-		      default:
+		else
 			status = -1;
-			break;
-		}
 	} else if (index == SAL_SET_VECTORS) {
 		;
 	} else if (index == SAL_GET_STATE_INFO) {
-- 
1.7.9



^ permalink raw reply related	[flat|nested] 8+ messages in thread
* Re: [PATCH 00/68] TTY buffer in tty_port -- prep no. 1
@ 2012-03-08 19:50 Greg KH
  2012-03-08 20:01 ` [PATCH 1/4] [IA64] hpsim, fix SAL handling in fw-emu Jiri Slaby
  0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2012-03-08 19:50 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: alan, linux-serial, linux-kernel, jirislaby

On Mon, Mar 05, 2012 at 02:51:47PM +0100, Jiri Slaby wrote:
> Hi,
> 								      
> this is the first series of patches which allow tty buffers to be
> moved from tty_struct (present from open to close/hangup) to tty_port
> (present as long as the device). This will allow us to get rid of the
> tty refcounting in the interrupt service routines and other hot paths
> after we are done. This is because we won't need to handle races among
> ISRs, timers, hangups and others, because tty_port lives as long as an
> interrupt/timer tick may occur. Unlike tty_struct.
> 
> In this series, only first few drivers are converted to use
> tty_port. The rest is to come later.
> 
> The first few patches are simple fixes/cleanups which emerged during
> the code investigation here and there. Further serialP header removal
> happens there. Finally, some drivers are forced to use tty_port, which
> will become a necessity in the future.
> 
> Simserial (ia64) and standard x86 stuff were runtime-tested. The rest
> is only checked to be compilation-errors free.
> 
> Final remark: simserial stuff depends on 4 patches sent to Tony Luck
> last week. They are in hist tree and -next already.

Where are those patches at specifically?  Can you send them to me so I
could include them in my tree?  Otherwise I can only apply the first 27
of these patches (which I have now done.)

thanks,

greg k-h

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

end of thread, other threads:[~2012-03-08 20:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-24 11:10 [PATCH 1/4] IA64: hpsim, fix SAL handling in fw-emu Jiri Slaby
2012-02-24 11:10 ` [PATCH 2/4] IA64: simserial, include some headers Jiri Slaby
2012-02-24 11:10 ` [PATCH 3/4] IA64: hpsim, initialize chip for assigned irqs Jiri Slaby
2012-02-24 11:10 ` [PATCH 4/4] IA64: simserial, bail out when request_irq fails Jiri Slaby
2012-02-24 22:32 ` [PATCH 1/4] IA64: hpsim, fix SAL handling in fw-emu Tony Luck
2012-02-24 22:44   ` Jiri Slaby
  -- strict thread matches above, loose matches on Subject: below --
2012-03-08 19:50 [PATCH 00/68] TTY buffer in tty_port -- prep no. 1 Greg KH
2012-03-08 20:01 ` [PATCH 1/4] [IA64] hpsim, fix SAL handling in fw-emu Jiri Slaby
2012-03-08 20:29   ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox