Metag architecture changes for v3.13
- A change to remove the last dependence on bootloader exception handlers so that QEMU can more easily boot an SMP Linux/Meta kernel image directly. - A fix for a minor off by one error in a BUG_ON condition found by Dan Carpenter. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) iQIcBAABAgAGBQJSgMoOAAoJEKHZs+irPybfBykQAJTyboZx95WLtpbCRr6kWvg3 gTtx0wTuxyzPB8HuxFs/p3WLq4dGLxnZboMwSO0p0kus2epwQvi4lksEeb/xc69M vuaLaFBGx5n8LxKy5TudqSLjrM97w6WRKwniYp6qE/vM+imoquylEfWLb7txpxbv 0BruNK6+UhBXt1vOE5J2kETTzAtYK5GtO9vt5qhkRsUBWGNv/V/pjtQHk90PSBaT unE6+mRH4SFSUSYM3RcVjEzWf46Rot09qlLY+kQlt4ANriP44n9RMafEFag2oTZQ 8MdKh6ExNuzJUcvbBHP8y0drmEzzOuymjr18A1UMqR6qJZbwl+35+s7WxhBjceZG Nb2VgUIMAE/OIjb9heyaejxJ6FAyrQUWOGbZRweyA/pNOZfxqVwq2MPYP24nq3jm gY4bcCfHYqssehL/H4zWXkYiLF0Qb2GHNpKlsQlzkolpf2FVaEezgQWoh9ecaaOH w9V/1flbNvBLyGWp57LKpZ9F0S7fHhPSSqe9U3JEcvjuTOfNjprA7mwnyKsZe2rV /v0l7tAh53GbzbPJUecPzf/sgK1y6xeSh5mgirZ8lZlzV105/7WN2bKT4Ulz5oj3 I/+dDPw+U1d3MZKnvMWRWuBi3IPZYmymGzs/rSw2V0QtnklWeFdSwAcf+jQNBGpf +fteZgsKTdC1gG+qKRbx =9jJ8 -----END PGP SIGNATURE----- Merge tag 'metag-for-v3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag Pull metag architecture changes from James Hogan: - A change to remove the last dependence on bootloader exception handlers so that QEMU can more easily boot an SMP Linux/Meta kernel image directly. - A fix for a minor off by one error in a BUG_ON condition found by Dan Carpenter. * tag 'metag-for-v3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag: metag: off by one in setup_bootmem_node() metag: handle low level kicks directly
This commit is contained in:
commit
0993537bff
|
@ -150,11 +150,9 @@
|
|||
#else
|
||||
/* Reserved 0x04-0x09 */
|
||||
#endif
|
||||
#define TBID_SIGNUM_SWS 0x0A /* KICK received with SigMask != 0 */
|
||||
#define TBID_SIGNUM_SWK 0x0B /* KICK received with SigMask == 0 */
|
||||
/* Reserved 0x0C-0x0F */
|
||||
/* Reserved 0x0A-0x0F */
|
||||
#define TBID_SIGNUM_TRT 0x10 /* Timer trigger */
|
||||
#define TBID_SIGNUM_LWK 0x11 /* Low level kick (handler provided by TBI) */
|
||||
#define TBID_SIGNUM_LWK 0x11 /* Low level kick */
|
||||
#define TBID_SIGNUM_XXF 0x12 /* Fault handler - receives ALL _xxF sigs */
|
||||
#ifdef TBI_1_4
|
||||
#define TBID_SIGNUM_DFR 0x13 /* Deferred Exception handler */
|
||||
|
@ -183,8 +181,7 @@
|
|||
each hardware signal, sometimes this is a many-to-one relationship. */
|
||||
#define TBI_TRIG_BIT(SigNum) (\
|
||||
((SigNum) >= TBID_SIGNUM_TRT) ? 1<<((SigNum)-TBID_SIGNUM_TRT) :\
|
||||
( ((SigNum) == TBID_SIGNUM_SWS) || \
|
||||
((SigNum) == TBID_SIGNUM_SWK) ) ? \
|
||||
((SigNum) == TBID_SIGNUM_LWK) ? \
|
||||
TXSTAT_KICK_BIT : TXSTATI_BGNDHALT_BIT )
|
||||
|
||||
/* Return the hardware trigger vector number for entries in the
|
||||
|
@ -687,10 +684,8 @@ typedef union _tbires_tag_ {
|
|||
Triggers will indicate the status of TXSTAT or TXSTATI sampled by the
|
||||
code that called the handler.
|
||||
|
||||
InstOrSWSId is defined firstly as 'Inst' if the SigNum is TBID_SIGNUM_SWx
|
||||
and hold the actual SWITCH instruction detected, secondly if SigNum
|
||||
is TBID_SIGNUM_SWS the 'SWSId' is defined to hold the Id of the
|
||||
software signal detected, in other cases the value of this
|
||||
Inst is defined as 'Inst' if the SigNum is TBID_SIGNUM_SWx and holds the
|
||||
actual SWITCH instruction detected, in other cases the value of this
|
||||
parameter is undefined.
|
||||
|
||||
pTBI points at the PTBI structure related to the thread and processing
|
||||
|
@ -709,7 +704,7 @@ typedef union _tbires_tag_ {
|
|||
|
||||
*/
|
||||
typedef TBIRES (*PTBIAPIFN)( TBIRES State, int SigNum,
|
||||
int Triggers, int InstOrSWSId,
|
||||
int Triggers, int Inst,
|
||||
volatile struct _tbi_tag_ *pTBI );
|
||||
#endif /* ifndef __ASSEMBLY__ */
|
||||
|
||||
|
@ -757,7 +752,7 @@ typedef volatile struct _tbi_tag_ {
|
|||
#ifndef __ASSEMBLY__
|
||||
/* This handler should be used for TBID_SIGNUM_DFR */
|
||||
extern TBIRES __TBIHandleDFR ( TBIRES State, int SigNum,
|
||||
int Triggers, int InstOrSWSId,
|
||||
int Triggers, int Inst,
|
||||
volatile struct _tbi_tag_ *pTBI );
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -302,13 +302,9 @@ void __init setup_arch(char **cmdline_p)
|
|||
* rather than the version from the bootloader. This makes call
|
||||
* stacks easier to understand and may allow us to unmap the
|
||||
* bootloader at some point.
|
||||
*
|
||||
* We need to keep the LWK handler that TBI installed in order to
|
||||
* be able to do inter-thread comms.
|
||||
*/
|
||||
for (i = 0; i <= TBID_SIGNUM_MAX; i++)
|
||||
if (i != TBID_SIGNUM_LWK)
|
||||
_pTBI->fnSigs[i] = __TBIUnExpXXX;
|
||||
_pTBI->fnSigs[i] = __TBIUnExpXXX;
|
||||
|
||||
/* A Meta requirement is that the kernel is loaded (virtually)
|
||||
* at the PAGE_OFFSET.
|
||||
|
|
|
@ -819,8 +819,7 @@ void per_cpu_trap_init(unsigned long cpu)
|
|||
|
||||
set_trigger_mask(TBI_INTS_INIT(thread) | /* interrupts */
|
||||
TBI_TRIG_BIT(TBID_SIGNUM_LWK) | /* low level kick */
|
||||
TBI_TRIG_BIT(TBID_SIGNUM_SW1) |
|
||||
TBI_TRIG_BIT(TBID_SIGNUM_SWS));
|
||||
TBI_TRIG_BIT(TBID_SIGNUM_SW1));
|
||||
|
||||
/* non-priv - use current stack */
|
||||
int_context.Sig.pCtx = NULL;
|
||||
|
@ -842,7 +841,7 @@ void __init trap_init(void)
|
|||
_pTBI->fnSigs[TBID_SIGNUM_SW1] = switch1_handler;
|
||||
_pTBI->fnSigs[TBID_SIGNUM_SW2] = switchx_handler;
|
||||
_pTBI->fnSigs[TBID_SIGNUM_SW3] = switchx_handler;
|
||||
_pTBI->fnSigs[TBID_SIGNUM_SWK] = kick_handler;
|
||||
_pTBI->fnSigs[TBID_SIGNUM_LWK] = kick_handler;
|
||||
|
||||
#ifdef CONFIG_METAG_META21
|
||||
_pTBI->fnSigs[TBID_SIGNUM_DFR] = __TBIHandleDFR;
|
||||
|
|
|
@ -34,7 +34,7 @@ void __init setup_bootmem_node(int nid, unsigned long start, unsigned long end)
|
|||
unsigned long pgdat_paddr;
|
||||
|
||||
/* Don't allow bogus node assignment */
|
||||
BUG_ON(nid > MAX_NUMNODES || nid <= 0);
|
||||
BUG_ON(nid >= MAX_NUMNODES || nid <= 0);
|
||||
|
||||
start_pfn = start >> PAGE_SHIFT;
|
||||
end_pfn = end >> PAGE_SHIFT;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
/* D1Ar1:D0Ar2 -- State
|
||||
* D0Ar3 -- SigNum
|
||||
* D0Ar4 -- Triggers
|
||||
* D1Ar5 -- InstOrSWSId
|
||||
* D1Ar5 -- Inst
|
||||
* D0Ar6 -- pTBI (volatile)
|
||||
*/
|
||||
___TBIHandleDFR:
|
||||
|
|
Loading…
Reference in New Issue