Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1228019

Re: [PATCH v2] arm64: Introduce IRQ stack

From Catalin Marinas <catalin.marinas@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2] arm64: Introduce IRQ stack
Date 2015-09-18 17:10 +0200
Message-ID <qa5sv-6aQ-69@gated-at.bofh.it> (permalink)
References (1 earlier) <q9Fol-1Tl-3@gated-at.bofh.it> <q9Hgt-4Dp-11@gated-at.bofh.it> <q9Hqa-4OV-9@gated-at.bofh.it> <q9Kel-yZ-1@gated-at.bofh.it> <qa3qG-33F-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Sep 18, 2015 at 09:57:56PM +0900, Jungseok Lee wrote:
> On Sep 18, 2015, at 1:21 AM, Catalin Marinas wrote:
> > So, without any better suggestion for current_thread_info(), I'm giving
> > up the idea of using SPSel == 0 in the kernel. I'll look at your patch
> > in more detail. BTW, I don't think we need the any count for the irq
> > stack as we don't re-enter the same IRQ stack.
> 
> Another interrupt could come in since IRQ is enabled when handling softirq
> according to the following information which are self-evident.
> 
> (Am I missing something?)

No. I had the wrong impression that we switch to the softirqd stack for
softirqs but you are right, if we run them on the same stack the IRQs
are enabled and they can be re-entered before we return from this
exception handler.

I've seen other architectures implementing a dedicated softirq stack but
for now we should just re-use the current IRQ stack.

> In my first approach using SPSel = 0, current_thread_info function was inefficient
> in order to handle this case correctly.

I agree. And we don't have any other scratch register left as we use
tpidr_el1 for per-cpu areas.

> BTW, in this context, it is only meaningful to decide whether a current interrupt
> is re-enterrant or not. Its actual value is not important, but I could not figure
> out a better implementation than this one yet. Any suggestions are welcome!

James' idea of checking the lower SP bits instead of a count may work.

-- 
Catalin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2] arm64: Introduce IRQ stack Jungseok Lee <jungseoklee85@gmail.com> - 2015-09-13 16:50 +0200
  Re: [PATCH v2] arm64: Introduce IRQ stack Will Deacon <will.deacon@arm.com> - 2015-09-16 13:30 +0200
    Re: [PATCH v2] arm64: Introduce IRQ stack James Morse <james.morse@arm.com> - 2015-09-17 12:40 +0200
      Re: [PATCH v2] arm64: Introduce IRQ stack Catalin Marinas <catalin.marinas@arm.com> - 2015-09-17 12:50 +0200
      Re: [PATCH v2] arm64: Introduce IRQ stack Jungseok Lee <jungseoklee85@gmail.com> - 2015-09-17 14:40 +0200
        Re: [PATCH v2] arm64: Introduce IRQ stack Catalin Marinas <catalin.marinas@arm.com> - 2015-09-17 19:10 +0200
          Re: [PATCH v2] arm64: Introduce IRQ stack Jungseok Lee <jungseoklee85@gmail.com> - 2015-09-18 15:10 +0200
  Re: [PATCH v2] arm64: Introduce IRQ stack Catalin Marinas <catalin.marinas@arm.com> - 2015-09-17 13:20 +0200
    Re: [PATCH v2] arm64: Introduce IRQ stack Jungseok Lee <jungseoklee85@gmail.com> - 2015-09-17 15:20 +0200
      Re: [PATCH v2] arm64: Introduce IRQ stack Jungseok Lee <jungseoklee85@gmail.com> - 2015-09-17 15:30 +0200
        Re: [PATCH v2] arm64: Introduce IRQ stack Catalin Marinas <catalin.marinas@arm.com> - 2015-09-17 18:30 +0200
          Re: [PATCH v2] arm64: Introduce IRQ stack Jungseok Lee <jungseoklee85@gmail.com> - 2015-09-18 15:00 +0200
            Re: [PATCH v2] arm64: Introduce IRQ stack James Morse <james.morse@arm.com> - 2015-09-18 15:50 +0200
            Re: [PATCH v2] arm64: Introduce IRQ stack Catalin Marinas <catalin.marinas@arm.com> - 2015-09-18 17:10 +0200
              Re: [PATCH v2] arm64: Introduce IRQ stack Catalin Marinas <catalin.marinas@arm.com> - 2015-09-18 17:40 +0200
                Re: [PATCH v2] arm64: Introduce IRQ stack Jungseok Lee <jungseoklee85@gmail.com> - 2015-09-19 10:50 +0200
                Re: [PATCH v2] arm64: Introduce IRQ stack Catalin Marinas <catalin.marinas@arm.com> - 2015-09-21 11:30 +0200
                Re: [PATCH v2] arm64: Introduce IRQ stack Jungseok Lee <jungseoklee85@gmail.com> - 2015-09-21 14:20 +0200
  Re: [PATCH v2] arm64: Introduce IRQ stack James Morse <james.morse@arm.com> - 2015-09-18 15:50 +0200
    Re: [PATCH v2] arm64: Introduce IRQ stack Jungseok Lee <jungseoklee85@gmail.com> - 2015-09-19 10:30 +0200

csiph-web