mirror of
https://github.com/armbian/linux.git
synced 2026-01-06 10:13:00 -08:00
Merge tag 'nfs-rdma-for-4.2' of git://git.linux-nfs.org/projects/anna/nfs-rdma
NFS: NFSoRDMA Client Changes These patches continue to build up for improving the rsize and wsize that the NFS client uses when talking over RDMA. In addition, these patches also add in scalability enhancements and other bugfixes. Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> * tag 'nfs-rdma-for-4.2' of git://git.linux-nfs.org/projects/anna/nfs-rdma: (142 commits) xprtrdma: Reduce per-transport MR allocation xprtrdma: Stack relief in fmr_op_map() xprtrdma: Split rb_lock xprtrdma: Remove rpcrdma_ia::ri_memreg_strategy xprtrdma: Remove ->ro_reset xprtrdma: Remove unused LOCAL_INV recovery logic xprtrdma: Acquire MRs in rpcrdma_register_external() xprtrdma: Introduce an FRMR recovery workqueue xprtrdma: Acquire FMRs in rpcrdma_fmr_register_external() xprtrdma: Introduce helpers for allocating MWs xprtrdma: Use ib_device pointer safely xprtrdma: Remove rr_func xprtrdma: Replace rpcrdma_rep::rr_buffer with rr_rxprt xprtrdma: Warn when there are orphaned IB objects ...
This commit is contained in:
@@ -15,10 +15,8 @@ Optional properties:
|
||||
- phys: phandle + phy specifier pair
|
||||
- phy-names: must be "usb"
|
||||
- dmas: Must contain a list of references to DMA specifiers.
|
||||
- dma-names : Must contain a list of DMA names:
|
||||
- tx0 ... tx<n>
|
||||
- rx0 ... rx<n>
|
||||
- This <n> means DnFIFO in USBHS module.
|
||||
- dma-names : named "ch%d", where %d is the channel number ranging from zero
|
||||
to the number of channels (DnFIFOs) minus one.
|
||||
|
||||
Example:
|
||||
usbhs: usb@e6590000 {
|
||||
|
||||
13
MAINTAINERS
13
MAINTAINERS
@@ -51,9 +51,9 @@ trivial patch so apply some common sense.
|
||||
or does something very odd once a month document it.
|
||||
|
||||
PLEASE remember that submissions must be made under the terms
|
||||
of the OSDL certificate of contribution and should include a
|
||||
Signed-off-by: line. The current version of this "Developer's
|
||||
Certificate of Origin" (DCO) is listed in the file
|
||||
of the Linux Foundation certificate of contribution and should
|
||||
include a Signed-off-by: line. The current version of this
|
||||
"Developer's Certificate of Origin" (DCO) is listed in the file
|
||||
Documentation/SubmittingPatches.
|
||||
|
||||
6. Make sure you have the right to send any changes you make. If you
|
||||
@@ -7575,6 +7575,7 @@ F: drivers/pci/host/pci-exynos.c
|
||||
|
||||
PCI DRIVER FOR SYNOPSIS DESIGNWARE
|
||||
M: Jingoo Han <jingoohan1@gmail.com>
|
||||
M: Pratyush Anand <pratyush.anand@gmail.com>
|
||||
L: linux-pci@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/pci/host/*designware*
|
||||
@@ -7588,8 +7589,9 @@ F: Documentation/devicetree/bindings/pci/host-generic-pci.txt
|
||||
F: drivers/pci/host/pci-host-generic.c
|
||||
|
||||
PCIE DRIVER FOR ST SPEAR13XX
|
||||
M: Pratyush Anand <pratyush.anand@gmail.com>
|
||||
L: linux-pci@vger.kernel.org
|
||||
S: Orphan
|
||||
S: Maintained
|
||||
F: drivers/pci/host/*spear*
|
||||
|
||||
PCMCIA SUBSYSTEM
|
||||
@@ -10587,8 +10589,7 @@ F: drivers/virtio/virtio_input.c
|
||||
F: include/uapi/linux/virtio_input.h
|
||||
|
||||
VIA RHINE NETWORK DRIVER
|
||||
M: Roger Luethi <rl@hellgate.ch>
|
||||
S: Maintained
|
||||
S: Orphan
|
||||
F: drivers/net/ethernet/via/via-rhine.c
|
||||
|
||||
VIA SD/MMC CARD CONTROLLER DRIVER
|
||||
|
||||
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 1
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc6
|
||||
EXTRAVERSION = -rc7
|
||||
NAME = Hurr durr I'ma sheep
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
||||
@@ -127,7 +127,7 @@ int smp_num_siblings = 1;
|
||||
volatile int ia64_cpu_to_sapicid[NR_CPUS];
|
||||
EXPORT_SYMBOL(ia64_cpu_to_sapicid);
|
||||
|
||||
static volatile cpumask_t cpu_callin_map;
|
||||
static cpumask_t cpu_callin_map;
|
||||
|
||||
struct smp_boot_data smp_boot_data __initdata;
|
||||
|
||||
@@ -477,6 +477,7 @@ do_boot_cpu (int sapicid, int cpu, struct task_struct *idle)
|
||||
for (timeout = 0; timeout < 100000; timeout++) {
|
||||
if (cpumask_test_cpu(cpu, &cpu_callin_map))
|
||||
break; /* It has booted */
|
||||
barrier(); /* Make sure we re-read cpu_callin_map */
|
||||
udelay(100);
|
||||
}
|
||||
Dprintk("\n");
|
||||
|
||||
@@ -225,7 +225,7 @@ void __init plat_time_init(void)
|
||||
ddr_clk_rate = ath79_get_sys_clk_rate("ddr");
|
||||
ref_clk_rate = ath79_get_sys_clk_rate("ref");
|
||||
|
||||
pr_info("Clocks: CPU:%lu.%03luMHz, DDR:%lu.%03luMHz, AHB:%lu.%03luMHz, Ref:%lu.%03luMHz",
|
||||
pr_info("Clocks: CPU:%lu.%03luMHz, DDR:%lu.%03luMHz, AHB:%lu.%03luMHz, Ref:%lu.%03luMHz\n",
|
||||
cpu_clk_rate / 1000000, (cpu_clk_rate / 1000) % 1000,
|
||||
ddr_clk_rate / 1000000, (ddr_clk_rate / 1000) % 1000,
|
||||
ahb_clk_rate / 1000000, (ahb_clk_rate / 1000) % 1000,
|
||||
|
||||
@@ -74,13 +74,12 @@ static inline void cpu_set_fpu_fcsr_mask(struct cpuinfo_mips *c)
|
||||
{
|
||||
unsigned long sr, mask, fcsr, fcsr0, fcsr1;
|
||||
|
||||
fcsr = c->fpu_csr31;
|
||||
mask = FPU_CSR_ALL_X | FPU_CSR_ALL_E | FPU_CSR_ALL_S | FPU_CSR_RM;
|
||||
|
||||
sr = read_c0_status();
|
||||
__enable_fpu(FPU_AS_IS);
|
||||
|
||||
fcsr = read_32bit_cp1_register(CP1_STATUS);
|
||||
|
||||
fcsr0 = fcsr & mask;
|
||||
write_32bit_cp1_register(CP1_STATUS, fcsr0);
|
||||
fcsr0 = read_32bit_cp1_register(CP1_STATUS);
|
||||
|
||||
@@ -109,7 +109,7 @@ void __init init_IRQ(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef DEBUG_STACKOVERFLOW
|
||||
#ifdef CONFIG_DEBUG_STACKOVERFLOW
|
||||
static inline void check_stack_overflow(void)
|
||||
{
|
||||
unsigned long sp;
|
||||
|
||||
@@ -2409,7 +2409,7 @@ enum emulation_result kvm_mips_complete_mmio_load(struct kvm_vcpu *vcpu,
|
||||
if (vcpu->mmio_needed == 2)
|
||||
*gpr = *(int16_t *) run->mmio.data;
|
||||
else
|
||||
*gpr = *(int16_t *) run->mmio.data;
|
||||
*gpr = *(uint16_t *)run->mmio.data;
|
||||
|
||||
break;
|
||||
case 1:
|
||||
|
||||
@@ -272,7 +272,7 @@ void loongson3_ipi_interrupt(struct pt_regs *regs)
|
||||
if (action & SMP_ASK_C0COUNT) {
|
||||
BUG_ON(cpu != 0);
|
||||
c0count = read_c0_count();
|
||||
for (i = 1; i < loongson_sysconf.nr_cpus; i++)
|
||||
for (i = 1; i < num_possible_cpus(); i++)
|
||||
per_cpu(core0_c0count, i) = c0count;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1372,7 +1372,7 @@ static int probe_scache(void)
|
||||
scache_size = addr;
|
||||
c->scache.linesz = 16 << ((config & R4K_CONF_SB) >> 22);
|
||||
c->scache.ways = 1;
|
||||
c->dcache.waybit = 0; /* does not matter */
|
||||
c->scache.waybit = 0; /* does not matter */
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -681,11 +681,7 @@ static unsigned int get_stack_depth(struct jit_ctx *ctx)
|
||||
sp_off += config_enabled(CONFIG_64BIT) ?
|
||||
(ARGS_USED_BY_JIT + 1) * RSIZE : RSIZE;
|
||||
|
||||
/*
|
||||
* Subtract the bytes for the last registers since we only care about
|
||||
* the location on the stack pointer.
|
||||
*/
|
||||
return sp_off - RSIZE;
|
||||
return sp_off;
|
||||
}
|
||||
|
||||
static void build_prologue(struct jit_ctx *ctx)
|
||||
|
||||
@@ -41,7 +41,7 @@ static irqreturn_t ill_acc_irq_handler(int irq, void *_priv)
|
||||
addr, (type >> ILL_ACC_OFF_S) & ILL_ACC_OFF_M,
|
||||
type & ILL_ACC_LEN_M);
|
||||
|
||||
rt_memc_w32(REG_ILL_ACC_TYPE, REG_ILL_ACC_TYPE);
|
||||
rt_memc_w32(ILL_INT_STATUS, REG_ILL_ACC_TYPE);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,8 @@ typedef struct {
|
||||
unsigned int icache_line_size;
|
||||
unsigned int ecache_size;
|
||||
unsigned int ecache_line_size;
|
||||
int core_id;
|
||||
unsigned short sock_id;
|
||||
unsigned short core_id;
|
||||
int proc_id;
|
||||
} cpuinfo_sparc;
|
||||
|
||||
|
||||
@@ -308,12 +308,26 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t prot)
|
||||
" sllx %1, 32, %1\n"
|
||||
" or %0, %1, %0\n"
|
||||
" .previous\n"
|
||||
" .section .sun_m7_2insn_patch, \"ax\"\n"
|
||||
" .word 661b\n"
|
||||
" sethi %%uhi(%4), %1\n"
|
||||
" sethi %%hi(%4), %0\n"
|
||||
" .word 662b\n"
|
||||
" or %1, %%ulo(%4), %1\n"
|
||||
" or %0, %%lo(%4), %0\n"
|
||||
" .word 663b\n"
|
||||
" sllx %1, 32, %1\n"
|
||||
" or %0, %1, %0\n"
|
||||
" .previous\n"
|
||||
: "=r" (mask), "=r" (tmp)
|
||||
: "i" (_PAGE_PADDR_4U | _PAGE_MODIFIED_4U | _PAGE_ACCESSED_4U |
|
||||
_PAGE_CP_4U | _PAGE_CV_4U | _PAGE_E_4U |
|
||||
_PAGE_SPECIAL | _PAGE_PMD_HUGE | _PAGE_SZALL_4U),
|
||||
"i" (_PAGE_PADDR_4V | _PAGE_MODIFIED_4V | _PAGE_ACCESSED_4V |
|
||||
_PAGE_CP_4V | _PAGE_CV_4V | _PAGE_E_4V |
|
||||
_PAGE_SPECIAL | _PAGE_PMD_HUGE | _PAGE_SZALL_4V),
|
||||
"i" (_PAGE_PADDR_4V | _PAGE_MODIFIED_4V | _PAGE_ACCESSED_4V |
|
||||
_PAGE_CP_4V | _PAGE_E_4V |
|
||||
_PAGE_SPECIAL | _PAGE_PMD_HUGE | _PAGE_SZALL_4V));
|
||||
|
||||
return __pte((pte_val(pte) & mask) | (pgprot_val(prot) & ~mask));
|
||||
@@ -342,9 +356,15 @@ static inline pgprot_t pgprot_noncached(pgprot_t prot)
|
||||
" andn %0, %4, %0\n"
|
||||
" or %0, %5, %0\n"
|
||||
" .previous\n"
|
||||
" .section .sun_m7_2insn_patch, \"ax\"\n"
|
||||
" .word 661b\n"
|
||||
" andn %0, %6, %0\n"
|
||||
" or %0, %5, %0\n"
|
||||
" .previous\n"
|
||||
: "=r" (val)
|
||||
: "0" (val), "i" (_PAGE_CP_4U | _PAGE_CV_4U), "i" (_PAGE_E_4U),
|
||||
"i" (_PAGE_CP_4V | _PAGE_CV_4V), "i" (_PAGE_E_4V));
|
||||
"i" (_PAGE_CP_4V | _PAGE_CV_4V), "i" (_PAGE_E_4V),
|
||||
"i" (_PAGE_CP_4V));
|
||||
|
||||
return __pgprot(val);
|
||||
}
|
||||
|
||||
@@ -40,11 +40,12 @@ static inline int pcibus_to_node(struct pci_bus *pbus)
|
||||
#ifdef CONFIG_SMP
|
||||
#define topology_physical_package_id(cpu) (cpu_data(cpu).proc_id)
|
||||
#define topology_core_id(cpu) (cpu_data(cpu).core_id)
|
||||
#define topology_core_cpumask(cpu) (&cpu_core_map[cpu])
|
||||
#define topology_core_cpumask(cpu) (&cpu_core_sib_map[cpu])
|
||||
#define topology_thread_cpumask(cpu) (&per_cpu(cpu_sibling_map, cpu))
|
||||
#endif /* CONFIG_SMP */
|
||||
|
||||
extern cpumask_t cpu_core_map[NR_CPUS];
|
||||
extern cpumask_t cpu_core_sib_map[NR_CPUS];
|
||||
static inline const struct cpumask *cpu_coregroup_mask(int cpu)
|
||||
{
|
||||
return &cpu_core_map[cpu];
|
||||
|
||||
@@ -79,6 +79,8 @@ struct sun4v_2insn_patch_entry {
|
||||
};
|
||||
extern struct sun4v_2insn_patch_entry __sun4v_2insn_patch,
|
||||
__sun4v_2insn_patch_end;
|
||||
extern struct sun4v_2insn_patch_entry __sun_m7_2insn_patch,
|
||||
__sun_m7_2insn_patch_end;
|
||||
|
||||
|
||||
#endif /* !(__ASSEMBLY__) */
|
||||
|
||||
@@ -69,6 +69,8 @@ void sun4v_patch_1insn_range(struct sun4v_1insn_patch_entry *,
|
||||
struct sun4v_1insn_patch_entry *);
|
||||
void sun4v_patch_2insn_range(struct sun4v_2insn_patch_entry *,
|
||||
struct sun4v_2insn_patch_entry *);
|
||||
void sun_m7_patch_2insn_range(struct sun4v_2insn_patch_entry *,
|
||||
struct sun4v_2insn_patch_entry *);
|
||||
extern unsigned int dcache_parity_tl1_occurred;
|
||||
extern unsigned int icache_parity_tl1_occurred;
|
||||
|
||||
|
||||
@@ -723,7 +723,6 @@ static int grpci2_of_probe(struct platform_device *ofdev)
|
||||
err = -ENOMEM;
|
||||
goto err1;
|
||||
}
|
||||
memset(grpci2priv, 0, sizeof(*grpci2priv));
|
||||
priv->regs = regs;
|
||||
priv->irq = ofdev->archdata.irqs[0]; /* BASE IRQ */
|
||||
priv->irq_mode = (capability & STS_IRQMODE) >> STS_IRQMODE_BIT;
|
||||
|
||||
@@ -614,45 +614,68 @@ static void fill_in_one_cache(cpuinfo_sparc *c, struct mdesc_handle *hp, u64 mp)
|
||||
}
|
||||
}
|
||||
|
||||
static void mark_core_ids(struct mdesc_handle *hp, u64 mp, int core_id)
|
||||
static void find_back_node_value(struct mdesc_handle *hp, u64 node,
|
||||
char *srch_val,
|
||||
void (*func)(struct mdesc_handle *, u64, int),
|
||||
u64 val, int depth)
|
||||
{
|
||||
u64 a;
|
||||
u64 arc;
|
||||
|
||||
mdesc_for_each_arc(a, hp, mp, MDESC_ARC_TYPE_BACK) {
|
||||
u64 t = mdesc_arc_target(hp, a);
|
||||
const char *name;
|
||||
const u64 *id;
|
||||
/* Since we have an estimate of recursion depth, do a sanity check. */
|
||||
if (depth == 0)
|
||||
return;
|
||||
|
||||
name = mdesc_node_name(hp, t);
|
||||
if (!strcmp(name, "cpu")) {
|
||||
id = mdesc_get_property(hp, t, "id", NULL);
|
||||
if (*id < NR_CPUS)
|
||||
cpu_data(*id).core_id = core_id;
|
||||
} else {
|
||||
u64 j;
|
||||
mdesc_for_each_arc(arc, hp, node, MDESC_ARC_TYPE_BACK) {
|
||||
u64 n = mdesc_arc_target(hp, arc);
|
||||
const char *name = mdesc_node_name(hp, n);
|
||||
|
||||
mdesc_for_each_arc(j, hp, t, MDESC_ARC_TYPE_BACK) {
|
||||
u64 n = mdesc_arc_target(hp, j);
|
||||
const char *n_name;
|
||||
if (!strcmp(srch_val, name))
|
||||
(*func)(hp, n, val);
|
||||
|
||||
n_name = mdesc_node_name(hp, n);
|
||||
if (strcmp(n_name, "cpu"))
|
||||
continue;
|
||||
|
||||
id = mdesc_get_property(hp, n, "id", NULL);
|
||||
if (*id < NR_CPUS)
|
||||
cpu_data(*id).core_id = core_id;
|
||||
}
|
||||
}
|
||||
find_back_node_value(hp, n, srch_val, func, val, depth-1);
|
||||
}
|
||||
}
|
||||
|
||||
static void __mark_core_id(struct mdesc_handle *hp, u64 node,
|
||||
int core_id)
|
||||
{
|
||||
const u64 *id = mdesc_get_property(hp, node, "id", NULL);
|
||||
|
||||
if (*id < num_possible_cpus())
|
||||
cpu_data(*id).core_id = core_id;
|
||||
}
|
||||
|
||||
static void __mark_sock_id(struct mdesc_handle *hp, u64 node,
|
||||
int sock_id)
|
||||
{
|
||||
const u64 *id = mdesc_get_property(hp, node, "id", NULL);
|
||||
|
||||
if (*id < num_possible_cpus())
|
||||
cpu_data(*id).sock_id = sock_id;
|
||||
}
|
||||
|
||||
static void mark_core_ids(struct mdesc_handle *hp, u64 mp,
|
||||
int core_id)
|
||||
{
|
||||
find_back_node_value(hp, mp, "cpu", __mark_core_id, core_id, 10);
|
||||
}
|
||||
|
||||
static void mark_sock_ids(struct mdesc_handle *hp, u64 mp,
|
||||
int sock_id)
|
||||
{
|
||||
find_back_node_value(hp, mp, "cpu", __mark_sock_id, sock_id, 10);
|
||||
}
|
||||
|
||||
static void set_core_ids(struct mdesc_handle *hp)
|
||||
{
|
||||
int idx;
|
||||
u64 mp;
|
||||
|
||||
idx = 1;
|
||||
|
||||
/* Identify unique cores by looking for cpus backpointed to by
|
||||
* level 1 instruction caches.
|
||||
*/
|
||||
mdesc_for_each_node_by_name(hp, mp, "cache") {
|
||||
const u64 *level;
|
||||
const char *type;
|
||||
@@ -667,11 +690,72 @@ static void set_core_ids(struct mdesc_handle *hp)
|
||||
continue;
|
||||
|
||||
mark_core_ids(hp, mp, idx);
|
||||
|
||||
idx++;
|
||||
}
|
||||
}
|
||||
|
||||
static int set_sock_ids_by_cache(struct mdesc_handle *hp, int level)
|
||||
{
|
||||
u64 mp;
|
||||
int idx = 1;
|
||||
int fnd = 0;
|
||||
|
||||
/* Identify unique sockets by looking for cpus backpointed to by
|
||||
* shared level n caches.
|
||||
*/
|
||||
mdesc_for_each_node_by_name(hp, mp, "cache") {
|
||||
const u64 *cur_lvl;
|
||||
|
||||
cur_lvl = mdesc_get_property(hp, mp, "level", NULL);
|
||||
if (*cur_lvl != level)
|
||||
continue;
|
||||
|
||||
mark_sock_ids(hp, mp, idx);
|
||||
idx++;
|
||||
fnd = 1;
|
||||
}
|
||||
return fnd;
|
||||
}
|
||||
|
||||
static void set_sock_ids_by_socket(struct mdesc_handle *hp, u64 mp)
|
||||
{
|
||||
int idx = 1;
|
||||
|
||||
mdesc_for_each_node_by_name(hp, mp, "socket") {
|
||||
u64 a;
|
||||
|
||||
mdesc_for_each_arc(a, hp, mp, MDESC_ARC_TYPE_FWD) {
|
||||
u64 t = mdesc_arc_target(hp, a);
|
||||
const char *name;
|
||||
const u64 *id;
|
||||
|
||||
name = mdesc_node_name(hp, t);
|
||||
if (strcmp(name, "cpu"))
|
||||
continue;
|
||||
|
||||
id = mdesc_get_property(hp, t, "id", NULL);
|
||||
if (*id < num_possible_cpus())
|
||||
cpu_data(*id).sock_id = idx;
|
||||
}
|
||||
idx++;
|
||||
}
|
||||
}
|
||||
|
||||
static void set_sock_ids(struct mdesc_handle *hp)
|
||||
{
|
||||
u64 mp;
|
||||
|
||||
/* If machine description exposes sockets data use it.
|
||||
* Otherwise fallback to use shared L3 or L2 caches.
|
||||
*/
|
||||
mp = mdesc_node_by_name(hp, MDESC_NODE_NULL, "sockets");
|
||||
if (mp != MDESC_NODE_NULL)
|
||||
return set_sock_ids_by_socket(hp, mp);
|
||||
|
||||
if (!set_sock_ids_by_cache(hp, 3))
|
||||
set_sock_ids_by_cache(hp, 2);
|
||||
}
|
||||
|
||||
static void mark_proc_ids(struct mdesc_handle *hp, u64 mp, int proc_id)
|
||||
{
|
||||
u64 a;
|
||||
@@ -707,7 +791,6 @@ static void __set_proc_ids(struct mdesc_handle *hp, const char *exec_unit_name)
|
||||
continue;
|
||||
|
||||
mark_proc_ids(hp, mp, idx);
|
||||
|
||||
idx++;
|
||||
}
|
||||
}
|
||||
@@ -900,6 +983,7 @@ void mdesc_fill_in_cpu_data(cpumask_t *mask)
|
||||
|
||||
set_core_ids(hp);
|
||||
set_proc_ids(hp);
|
||||
set_sock_ids(hp);
|
||||
|
||||
mdesc_release(hp);
|
||||
|
||||
|
||||
@@ -1002,6 +1002,38 @@ static int __init pcibios_init(void)
|
||||
subsys_initcall(pcibios_init);
|
||||
|
||||
#ifdef CONFIG_SYSFS
|
||||
|
||||
#define SLOT_NAME_SIZE 11 /* Max decimal digits + null in u32 */
|
||||
|
||||
static void pcie_bus_slot_names(struct pci_bus *pbus)
|
||||
{
|
||||
struct pci_dev *pdev;
|
||||
struct pci_bus *bus;
|
||||
|
||||
list_for_each_entry(pdev, &pbus->devices, bus_list) {
|
||||
char name[SLOT_NAME_SIZE];
|
||||
struct pci_slot *pci_slot;
|
||||
const u32 *slot_num;
|
||||
int len;
|
||||
|
||||
slot_num = of_get_property(pdev->dev.of_node,
|
||||
"physical-slot#", &len);
|
||||
|
||||
if (slot_num == NULL || len != 4)
|
||||
continue;
|
||||
|
||||
snprintf(name, sizeof(name), "%u", slot_num[0]);
|
||||
pci_slot = pci_create_slot(pbus, slot_num[0], name, NULL);
|
||||
|
||||
if (IS_ERR(pci_slot))
|
||||
pr_err("PCI: pci_create_slot returned %ld.\n",
|
||||
PTR_ERR(pci_slot));
|
||||
}
|
||||
|
||||
list_for_each_entry(bus, &pbus->children, node)
|
||||
pcie_bus_slot_names(bus);
|
||||
}
|
||||
|
||||
static void pci_bus_slot_names(struct device_node *node, struct pci_bus *bus)
|
||||
{
|
||||
const struct pci_slot_names {
|
||||
@@ -1053,18 +1085,29 @@ static int __init of_pci_slot_init(void)
|
||||
|
||||
while ((pbus = pci_find_next_bus(pbus)) != NULL) {
|
||||
struct device_node *node;
|
||||
struct pci_dev *pdev;
|
||||
|
||||
if (pbus->self) {
|
||||
/* PCI->PCI bridge */
|
||||
node = pbus->self->dev.of_node;
|
||||
pdev = list_first_entry(&pbus->devices, struct pci_dev,
|
||||
bus_list);
|
||||
|
||||
if (pdev && pci_is_pcie(pdev)) {
|
||||
pcie_bus_slot_names(pbus);
|
||||
} else {
|
||||
struct pci_pbm_info *pbm = pbus->sysdata;
|
||||
|
||||
/* Host PCI controller */
|
||||
node = pbm->op->dev.of_node;
|
||||
if (pbus->self) {
|
||||
|
||||
/* PCI->PCI bridge */
|
||||
node = pbus->self->dev.of_node;
|
||||
|
||||
} else {
|
||||
struct pci_pbm_info *pbm = pbus->sysdata;
|
||||
|
||||
/* Host PCI controller */
|
||||
node = pbm->op->dev.of_node;
|
||||
}
|
||||
|
||||
pci_bus_slot_names(node, pbus);
|
||||
}
|
||||
|
||||
pci_bus_slot_names(node, pbus);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user