1
0
Fork 0
alistair23-linux/arch/alpha/include/asm/core_wildfire.h

320 lines
8.5 KiB
C
Raw Normal View History

License cleanup: add SPDX GPL-2.0 license identifier to files with no license Many source files in the tree are missing licensing information, which makes it harder for compliance tools to determine the correct license. By default all files without license information are under the default license of the kernel, which is GPL version 2. Update the files which contain no license information with the 'GPL-2.0' SPDX license identifier. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This patch is based on work done by Thomas Gleixner and Kate Stewart and Philippe Ombredanne. How this work was done: Patches were generated and checked against linux-4.14-rc6 for a subset of the use cases: - file had no licensing information it it. - file was a */uapi/* one with no licensing information in it, - file was a */uapi/* one with existing licensing information, Further patches will be generated in subsequent months to fix up cases where non-standard license headers were used, and references to license had to be inferred by heuristics based on keywords. The analysis to determine which SPDX License Identifier to be applied to a file was done in a spreadsheet of side by side results from of the output of two independent scanners (ScanCode & Windriver) producing SPDX tag:value files created by Philippe Ombredanne. Philippe prepared the base worksheet, and did an initial spot review of a few 1000 files. The 4.13 kernel was the starting point of the analysis with 60,537 files assessed. Kate Stewart did a file by file comparison of the scanner results in the spreadsheet to determine which SPDX license identifier(s) to be applied to the file. She confirmed any determination that was not immediately clear with lawyers working with the Linux Foundation. Criteria used to select files for SPDX license identifier tagging was: - Files considered eligible had to be source code files. - Make and config files were included as candidates if they contained >5 lines of source - File already had some variant of a license header in it (even if <5 lines). All documentation files were explicitly excluded. The following heuristics were used to determine which SPDX license identifiers to apply. - when both scanners couldn't find any license traces, file was considered to have no license information in it, and the top level COPYING file license applied. For non */uapi/* files that summary was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 11139 and resulted in the first patch in this series. If that file was a */uapi/* path one, it was "GPL-2.0 WITH Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 WITH Linux-syscall-note 930 and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one of the */uapi/* ones, it was denoted with the Linux-syscall-note if any GPL family license was found in the file or had no licensing in it (per prior point). Results summary: SPDX license identifier # files ---------------------------------------------------|------ GPL-2.0 WITH Linux-syscall-note 270 GPL-2.0+ WITH Linux-syscall-note 169 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17 LGPL-2.1+ WITH Linux-syscall-note 15 GPL-1.0+ WITH Linux-syscall-note 14 ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5 LGPL-2.0+ WITH Linux-syscall-note 4 LGPL-2.1 WITH Linux-syscall-note 3 ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3 ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1 and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became the concluded license(s). - when there was disagreement between the two scanners (one detected a license but the other didn't, or they both detected different licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file resulted in a clear resolution of the license that should apply (and which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier, the file was flagged for further research and to be revisited later in time. In total, over 70 hours of logged manual review was done on the spreadsheet to determine the SPDX license identifiers to apply to the source files by Kate, Philippe, Thomas and, in some cases, confirmation by lawyers working with the Linux Foundation. Kate also obtained a third independent scan of the 4.13 code base from FOSSology, and compared selected files where the other two scanners disagreed against that SPDX file, to see if there was new insights. The Windriver scanner is based on an older version of FOSSology in part, so they are related. Thomas did random spot checks in about 500 files from the spreadsheets for the uapi headers and agreed with SPDX license identifier in the files he inspected. For the non-uapi files Thomas did random spot checks in about 15000 files. In initial set of patches against 4.14-rc6, 3 files were found to have copy/paste license identifier errors, and have been fixed to reflect the correct identifier. Additionally Philippe spent 10 hours this week doing a detailed manual inspection and review of the 12,461 patched files from the initial patch version early this week with: - a full scancode scan run, collecting the matched texts, detected license ids and scores - reviewing anything where there was a license detected (about 500+ files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied SPDX license was correct This produced a worksheet with 20 files needing minor correction. This worksheet was then exported into 3 different .csv files for the different types of files to be modified. These .csv files were then reviewed by Greg. Thomas wrote a script to parse the csv files and add the proper SPDX tag to the file, in the format that the file expected. This script was further refined by Greg based on the output to detect more types of files automatically and to distinguish between header and source .c files (which need different comment types.) Finally Greg ran the script using the .csv files to generate the patches. Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-01 08:07:57 -06:00
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __ALPHA_WILDFIRE__H__
#define __ALPHA_WILDFIRE__H__
#include <linux/types.h>
#include <asm/compiler.h>
#define WILDFIRE_MAX_QBB 8 /* more than 8 requires other mods */
#define WILDFIRE_PCA_PER_QBB 4
#define WILDFIRE_IRQ_PER_PCA 64
#define WILDFIRE_NR_IRQS \
(WILDFIRE_MAX_QBB * WILDFIRE_PCA_PER_QBB * WILDFIRE_IRQ_PER_PCA)
extern unsigned char wildfire_hard_qbb_map[WILDFIRE_MAX_QBB];
extern unsigned char wildfire_soft_qbb_map[WILDFIRE_MAX_QBB];
#define QBB_MAP_EMPTY 0xff
extern unsigned long wildfire_hard_qbb_mask;
extern unsigned long wildfire_soft_qbb_mask;
extern unsigned long wildfire_gp_mask;
extern unsigned long wildfire_hs_mask;
extern unsigned long wildfire_iop_mask;
extern unsigned long wildfire_ior_mask;
extern unsigned long wildfire_pca_mask;
extern unsigned long wildfire_cpu_mask;
extern unsigned long wildfire_mem_mask;
#define WILDFIRE_QBB_EXISTS(qbbno) (wildfire_soft_qbb_mask & (1 << (qbbno)))
#define WILDFIRE_MEM_EXISTS(qbbno) (wildfire_mem_mask & (0xf << ((qbbno) << 2)))
#define WILDFIRE_PCA_EXISTS(qbbno, pcano) \
(wildfire_pca_mask & (1 << (((qbbno) << 2) + (pcano))))
typedef struct {
volatile unsigned long csr __attribute__((aligned(64)));
} wildfire_64;
typedef struct {
volatile unsigned long csr __attribute__((aligned(256)));
} wildfire_256;
typedef struct {
volatile unsigned long csr __attribute__((aligned(2048)));
} wildfire_2k;
typedef struct {
wildfire_64 qsd_whami;
wildfire_64 qsd_rev;
wildfire_64 qsd_port_present;
wildfire_64 qsd_port_active;
wildfire_64 qsd_fault_ena;
wildfire_64 qsd_cpu_int_ena;
wildfire_64 qsd_mem_config;
wildfire_64 qsd_err_sum;
wildfire_64 ce_sum[4];
wildfire_64 dev_init[4];
wildfire_64 it_int[4];
wildfire_64 ip_int[4];
wildfire_64 uce_sum[4];
wildfire_64 se_sum__non_dev_int[4];
wildfire_64 scratch[4];
wildfire_64 qsd_timer;
wildfire_64 qsd_diag;
} wildfire_qsd;
typedef struct {
wildfire_256 qsd_whami;
wildfire_256 __pad1;
wildfire_256 ce_sum;
wildfire_256 dev_init;
wildfire_256 it_int;
wildfire_256 ip_int;
wildfire_256 uce_sum;
wildfire_256 se_sum;
} wildfire_fast_qsd;
typedef struct {
wildfire_2k qsa_qbb_id;
wildfire_2k __pad1;
wildfire_2k qsa_port_ena;
wildfire_2k qsa_scratch;
wildfire_2k qsa_config[5];
wildfire_2k qsa_ref_int;
wildfire_2k qsa_qbb_pop[2];
wildfire_2k qsa_dtag_fc;
wildfire_2k __pad2[3];
wildfire_2k qsa_diag;
wildfire_2k qsa_diag_lock[4];
wildfire_2k __pad3[11];
wildfire_2k qsa_cpu_err_sum;
wildfire_2k qsa_misc_err_sum;
wildfire_2k qsa_tmo_err_sum;
wildfire_2k qsa_err_ena;
wildfire_2k qsa_tmo_config;
wildfire_2k qsa_ill_cmd_err_sum;
wildfire_2k __pad4[26];
wildfire_2k qsa_busy_mask;
wildfire_2k qsa_arr_valid;
wildfire_2k __pad5[2];
wildfire_2k qsa_port_map[4];
wildfire_2k qsa_arr_addr[8];
wildfire_2k qsa_arr_mask[8];
} wildfire_qsa;
typedef struct {
wildfire_64 ioa_config;
wildfire_64 iod_config;
wildfire_64 iop_switch_credits;
wildfire_64 __pad1;
wildfire_64 iop_hose_credits;
wildfire_64 __pad2[11];
struct {
wildfire_64 __pad3;
wildfire_64 init;
} iop_hose[4];
wildfire_64 ioa_hose_0_ctrl;
wildfire_64 iod_hose_0_ctrl;
wildfire_64 ioa_hose_1_ctrl;
wildfire_64 iod_hose_1_ctrl;
wildfire_64 ioa_hose_2_ctrl;
wildfire_64 iod_hose_2_ctrl;
wildfire_64 ioa_hose_3_ctrl;
wildfire_64 iod_hose_3_ctrl;
struct {
wildfire_64 target;
wildfire_64 __pad4;
} iop_dev_int[4];
wildfire_64 iop_err_int_target;
wildfire_64 __pad5[7];
wildfire_64 iop_qbb_err_sum;
wildfire_64 __pad6;
wildfire_64 iop_qbb_se_sum;
wildfire_64 __pad7;
wildfire_64 ioa_err_sum;
wildfire_64 iod_err_sum;
wildfire_64 __pad8[4];
wildfire_64 ioa_diag_force_err;
wildfire_64 iod_diag_force_err;
wildfire_64 __pad9[4];
wildfire_64 iop_diag_send_err_int;
wildfire_64 __pad10[15];
wildfire_64 ioa_scratch;
wildfire_64 iod_scratch;
} wildfire_iop;
typedef struct {
wildfire_2k gpa_qbb_map[4];
wildfire_2k gpa_mem_pop_map;
wildfire_2k gpa_scratch;
wildfire_2k gpa_diag;
wildfire_2k gpa_config_0;
wildfire_2k __pad1;
wildfire_2k gpa_init_id;
wildfire_2k gpa_config_2;
/* not complete */
} wildfire_gp;
typedef struct {
wildfire_64 pca_what_am_i;
wildfire_64 pca_err_sum;
wildfire_64 pca_diag_force_err;
wildfire_64 pca_diag_send_err_int;
wildfire_64 pca_hose_credits;
wildfire_64 pca_scratch;
wildfire_64 pca_micro_addr;
wildfire_64 pca_micro_data;
wildfire_64 pca_pend_int;
wildfire_64 pca_sent_int;
wildfire_64 __pad1;
wildfire_64 pca_stdio_edge_level;
wildfire_64 __pad2[52];
struct {
wildfire_64 target;
wildfire_64 enable;
} pca_int[4];
wildfire_64 __pad3[56];
wildfire_64 pca_alt_sent_int[32];
} wildfire_pca;
typedef struct {
wildfire_64 ne_what_am_i;
/* not complete */
} wildfire_ne;
typedef struct {
wildfire_64 fe_what_am_i;
/* not complete */
} wildfire_fe;
typedef struct {
wildfire_64 pci_io_addr_ext;
wildfire_64 pci_ctrl;
wildfire_64 pci_err_sum;
wildfire_64 pci_err_addr;
wildfire_64 pci_stall_cnt;
wildfire_64 pci_iack_special;
wildfire_64 __pad1[2];
wildfire_64 pci_pend_int;
wildfire_64 pci_sent_int;
wildfire_64 __pad2[54];
struct {
wildfire_64 wbase;
wildfire_64 wmask;
wildfire_64 tbase;
} pci_window[4];
wildfire_64 pci_flush_tlb;
wildfire_64 pci_perf_mon;
} wildfire_pci;
#define WILDFIRE_ENTITY_SHIFT 18
#define WILDFIRE_GP_ENTITY (0x10UL << WILDFIRE_ENTITY_SHIFT)
#define WILDFIRE_IOP_ENTITY (0x08UL << WILDFIRE_ENTITY_SHIFT)
#define WILDFIRE_QSA_ENTITY (0x04UL << WILDFIRE_ENTITY_SHIFT)
#define WILDFIRE_QSD_ENTITY_SLOW (0x05UL << WILDFIRE_ENTITY_SHIFT)
#define WILDFIRE_QSD_ENTITY_FAST (0x01UL << WILDFIRE_ENTITY_SHIFT)
#define WILDFIRE_PCA_ENTITY(pca) ((0xc|(pca))<<WILDFIRE_ENTITY_SHIFT)
#define WILDFIRE_BASE (IDENT_ADDR | (1UL << 40))
#define WILDFIRE_QBB_MASK 0x0fUL /* for now, only 4 bits/16 QBBs */
#define WILDFIRE_QBB(q) ((~((long)(q)) & WILDFIRE_QBB_MASK) << 36)
#define WILDFIRE_HOSE(h) ((long)(h) << 33)
#define WILDFIRE_QBB_IO(q) (WILDFIRE_BASE | WILDFIRE_QBB(q))
#define WILDFIRE_QBB_HOSE(q,h) (WILDFIRE_QBB_IO(q) | WILDFIRE_HOSE(h))
#define WILDFIRE_MEM(q,h) (WILDFIRE_QBB_HOSE(q,h) | 0x000000000UL)
#define WILDFIRE_CONF(q,h) (WILDFIRE_QBB_HOSE(q,h) | 0x1FE000000UL)
#define WILDFIRE_IO(q,h) (WILDFIRE_QBB_HOSE(q,h) | 0x1FF000000UL)
#define WILDFIRE_qsd(q) \
((wildfire_qsd *)(WILDFIRE_QBB_IO(q)|WILDFIRE_QSD_ENTITY_SLOW|(((1UL<<13)-1)<<23)))
#define WILDFIRE_fast_qsd() \
((wildfire_fast_qsd *)(WILDFIRE_QBB_IO(0)|WILDFIRE_QSD_ENTITY_FAST|(((1UL<<13)-1)<<23)))
#define WILDFIRE_qsa(q) \
((wildfire_qsa *)(WILDFIRE_QBB_IO(q)|WILDFIRE_QSA_ENTITY|(((1UL<<13)-1)<<23)))
#define WILDFIRE_iop(q) \
((wildfire_iop *)(WILDFIRE_QBB_IO(q)|WILDFIRE_IOP_ENTITY|(((1UL<<13)-1)<<23)))
#define WILDFIRE_gp(q) \
((wildfire_gp *)(WILDFIRE_QBB_IO(q)|WILDFIRE_GP_ENTITY|(((1UL<<13)-1)<<23)))
#define WILDFIRE_pca(q,pca) \
((wildfire_pca *)(WILDFIRE_QBB_IO(q)|WILDFIRE_PCA_ENTITY(pca)|(((1UL<<13)-1)<<23)))
#define WILDFIRE_ne(q,pca) \
((wildfire_ne *)(WILDFIRE_QBB_IO(q)|WILDFIRE_PCA_ENTITY(pca)|(((1UL<<13)-1)<<23)|(1UL<<16)))
#define WILDFIRE_fe(q,pca) \
((wildfire_fe *)(WILDFIRE_QBB_IO(q)|WILDFIRE_PCA_ENTITY(pca)|(((1UL<<13)-1)<<23)|(3UL<<15)))
#define WILDFIRE_pci(q,h) \
((wildfire_pci *)(WILDFIRE_QBB_IO(q)|WILDFIRE_PCA_ENTITY(((h)&6)>>1)|((((h)&1)|2)<<16)|(((1UL<<13)-1)<<23)))
#define WILDFIRE_IO_BIAS WILDFIRE_IO(0,0)
#define WILDFIRE_MEM_BIAS WILDFIRE_MEM(0,0) /* ??? */
/* The IO address space is larger than 0xffff */
#define WILDFIRE_IO_SPACE (8UL*1024*1024)
#ifdef __KERNEL__
#ifndef __EXTERN_INLINE
#define __EXTERN_INLINE extern inline
#define __IO_EXTERN_INLINE
#endif
/*
* Memory functions. all accesses are done through linear space.
*/
__EXTERN_INLINE void __iomem *wildfire_ioportmap(unsigned long addr)
{
return (void __iomem *)(addr + WILDFIRE_IO_BIAS);
}
__EXTERN_INLINE void __iomem *wildfire_ioremap(unsigned long addr,
unsigned long size)
{
return (void __iomem *)(addr + WILDFIRE_MEM_BIAS);
}
__EXTERN_INLINE int wildfire_is_ioaddr(unsigned long addr)
{
return addr >= WILDFIRE_BASE;
}
__EXTERN_INLINE int wildfire_is_mmio(const volatile void __iomem *xaddr)
{
unsigned long addr = (unsigned long)xaddr;
return (addr & 0x100000000UL) == 0;
}
#undef __IO_PREFIX
#define __IO_PREFIX wildfire
#define wildfire_trivial_rw_bw 1
#define wildfire_trivial_rw_lq 1
#define wildfire_trivial_io_bw 1
#define wildfire_trivial_io_lq 1
#define wildfire_trivial_iounmap 1
#include <asm/io_trivial.h>
#ifdef __IO_EXTERN_INLINE
#undef __EXTERN_INLINE
#undef __IO_EXTERN_INLINE
#endif
#endif /* __KERNEL__ */
#endif /* __ALPHA_WILDFIRE__H__ */