Skip to content

Commit

Permalink
Automatic merge of 'master' into merge (2024-07-09 10:50)
Browse files Browse the repository at this point in the history
  • Loading branch information
mpe committed Jul 9, 2024
2 parents 76b9304 + 256abd8 commit 39f70c5
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 58 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
VERSION = 6
PATCHLEVEL = 10
SUBLEVEL = 0
EXTRAVERSION = -rc6
EXTRAVERSION = -rc7
NAME = Baby Opossum Posse

# *DOCUMENTATION*
Expand Down
1 change: 1 addition & 0 deletions drivers/clk/mediatek/clk-mt8183-mfgcfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ static const struct mtk_gate mfg_clks[] = {
static const struct mtk_clk_desc mfg_desc = {
.clks = mfg_clks,
.num_clks = ARRAY_SIZE(mfg_clks),
.need_runtime_pm = true,
};

static const struct of_device_id of_match_clk_mt8183_mfg[] = {
Expand Down
24 changes: 14 additions & 10 deletions drivers/clk/mediatek/clk-mtk.c
Original file line number Diff line number Diff line change
Expand Up @@ -496,14 +496,16 @@ static int __mtk_clk_simple_probe(struct platform_device *pdev,
}


devm_pm_runtime_enable(&pdev->dev);
/*
* Do a pm_runtime_resume_and_get() to workaround a possible
* deadlock between clk_register() and the genpd framework.
*/
r = pm_runtime_resume_and_get(&pdev->dev);
if (r)
return r;
if (mcd->need_runtime_pm) {
devm_pm_runtime_enable(&pdev->dev);
/*
* Do a pm_runtime_resume_and_get() to workaround a possible
* deadlock between clk_register() and the genpd framework.
*/
r = pm_runtime_resume_and_get(&pdev->dev);
if (r)
return r;
}

/* Calculate how many clk_hw_onecell_data entries to allocate */
num_clks = mcd->num_clks + mcd->num_composite_clks;
Expand Down Expand Up @@ -585,7 +587,8 @@ static int __mtk_clk_simple_probe(struct platform_device *pdev,
goto unregister_clks;
}

pm_runtime_put(&pdev->dev);
if (mcd->need_runtime_pm)
pm_runtime_put(&pdev->dev);

return r;

Expand Down Expand Up @@ -618,7 +621,8 @@ static int __mtk_clk_simple_probe(struct platform_device *pdev,
if (mcd->shared_io && base)
iounmap(base);

pm_runtime_put(&pdev->dev);
if (mcd->need_runtime_pm)
pm_runtime_put(&pdev->dev);
return r;
}

Expand Down
2 changes: 2 additions & 0 deletions drivers/clk/mediatek/clk-mtk.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ struct mtk_clk_desc {

int (*clk_notifier_func)(struct device *dev, struct clk *clk);
unsigned int mfg_clk_idx;

bool need_runtime_pm;
};

int mtk_clk_pdev_probe(struct platform_device *pdev);
Expand Down
2 changes: 0 additions & 2 deletions drivers/clk/qcom/apss-ipq-pll.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ static struct clk_alpha_pll ipq_pll_stromer_plus = {
static const struct alpha_pll_config ipq5018_pll_config = {
.l = 0x2a,
.config_ctl_val = 0x4001075b,
.config_ctl_hi_val = 0x304,
.main_output_mask = BIT(0),
.aux_output_mask = BIT(1),
.early_output_mask = BIT(3),
Expand All @@ -84,7 +83,6 @@ static const struct alpha_pll_config ipq5018_pll_config = {
static const struct alpha_pll_config ipq5332_pll_config = {
.l = 0x2d,
.config_ctl_val = 0x4001075b,
.config_ctl_hi_val = 0x304,
.main_output_mask = BIT(0),
.aux_output_mask = BIT(1),
.early_output_mask = BIT(3),
Expand Down
3 changes: 3 additions & 0 deletions drivers/clk/qcom/clk-alpha-pll.c
Original file line number Diff line number Diff line change
Expand Up @@ -2574,6 +2574,9 @@ static int clk_alpha_pll_stromer_plus_set_rate(struct clk_hw *hw,
regmap_write(pll->clkr.regmap, PLL_ALPHA_VAL_U(pll),
a >> ALPHA_BITWIDTH);

regmap_update_bits(pll->clkr.regmap, PLL_USER_CTL(pll),
PLL_ALPHA_EN, PLL_ALPHA_EN);

regmap_write(pll->clkr.regmap, PLL_MODE(pll), PLL_BYPASSNL);

/* Wait five micro seconds or more */
Expand Down
10 changes: 6 additions & 4 deletions drivers/clk/qcom/gcc-ipq9574.c
Original file line number Diff line number Diff line change
Expand Up @@ -2140,9 +2140,10 @@ static struct clk_rcg2 pcnoc_bfdcd_clk_src = {

static struct clk_branch gcc_crypto_axi_clk = {
.halt_reg = 0x16010,
.halt_check = BRANCH_HALT_VOTED,
.clkr = {
.enable_reg = 0x16010,
.enable_mask = BIT(0),
.enable_reg = 0xb004,
.enable_mask = BIT(15),
.hw.init = &(const struct clk_init_data) {
.name = "gcc_crypto_axi_clk",
.parent_hws = (const struct clk_hw *[]) {
Expand All @@ -2156,9 +2157,10 @@ static struct clk_branch gcc_crypto_axi_clk = {

static struct clk_branch gcc_crypto_ahb_clk = {
.halt_reg = 0x16014,
.halt_check = BRANCH_HALT_VOTED,
.clkr = {
.enable_reg = 0x16014,
.enable_mask = BIT(0),
.enable_reg = 0xb004,
.enable_mask = BIT(16),
.hw.init = &(const struct clk_init_data) {
.name = "gcc_crypto_ahb_clk",
.parent_hws = (const struct clk_hw *[]) {
Expand Down
10 changes: 5 additions & 5 deletions drivers/clk/qcom/gcc-sm6350.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ static struct clk_alpha_pll gpll6 = {
.enable_mask = BIT(6),
.hw.init = &(struct clk_init_data){
.name = "gpll6",
.parent_hws = (const struct clk_hw*[]){
&gpll0.clkr.hw,
.parent_data = &(const struct clk_parent_data){
.fw_name = "bi_tcxo",
},
.num_parents = 1,
.ops = &clk_alpha_pll_fixed_fabia_ops,
Expand All @@ -124,7 +124,7 @@ static struct clk_alpha_pll_postdiv gpll6_out_even = {
.clkr.hw.init = &(struct clk_init_data){
.name = "gpll6_out_even",
.parent_hws = (const struct clk_hw*[]){
&gpll0.clkr.hw,
&gpll6.clkr.hw,
},
.num_parents = 1,
.ops = &clk_alpha_pll_postdiv_fabia_ops,
Expand All @@ -139,8 +139,8 @@ static struct clk_alpha_pll gpll7 = {
.enable_mask = BIT(7),
.hw.init = &(struct clk_init_data){
.name = "gpll7",
.parent_hws = (const struct clk_hw*[]){
&gpll0.clkr.hw,
.parent_data = &(const struct clk_parent_data){
.fw_name = "bi_tcxo",
},
.num_parents = 1,
.ops = &clk_alpha_pll_fixed_fabia_ops,
Expand Down
18 changes: 12 additions & 6 deletions drivers/clk/sunxi-ng/ccu_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ static int sunxi_ccu_probe(struct sunxi_ccu *ccu, struct device *dev,

for (i = 0; i < desc->hw_clks->num ; i++) {
struct clk_hw *hw = desc->hw_clks->hws[i];
struct ccu_common *common = hw_to_ccu_common(hw);
const char *name;

if (!hw)
Expand All @@ -147,14 +146,21 @@ static int sunxi_ccu_probe(struct sunxi_ccu *ccu, struct device *dev,
pr_err("Couldn't register clock %d - %s\n", i, name);
goto err_clk_unreg;
}
}

for (i = 0; i < desc->num_ccu_clks; i++) {
struct ccu_common *cclk = desc->ccu_clks[i];

if (!cclk)
continue;

if (common->max_rate)
clk_hw_set_rate_range(hw, common->min_rate,
common->max_rate);
if (cclk->max_rate)
clk_hw_set_rate_range(&cclk->hw, cclk->min_rate,
cclk->max_rate);
else
WARN(common->min_rate,
WARN(cclk->min_rate,
"No max_rate, ignoring min_rate of clock %d - %s\n",
i, name);
i, clk_hw_get_name(&cclk->hw));
}

ret = of_clk_add_hw_provider(node, of_clk_hw_onecell_get,
Expand Down
30 changes: 0 additions & 30 deletions fs/smb/client/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,35 +245,6 @@ static int cifs_init_request(struct netfs_io_request *rreq, struct file *file)
return 0;
}

/*
* Expand the size of a readahead to the size of the rsize, if at least as
* large as a page, allowing for the possibility that rsize is not pow-2
* aligned.
*/
static void cifs_expand_readahead(struct netfs_io_request *rreq)
{
unsigned int rsize = rreq->rsize;
loff_t misalignment, i_size = i_size_read(rreq->inode);

if (rsize < PAGE_SIZE)
return;

if (rsize < INT_MAX)
rsize = roundup_pow_of_two(rsize);
else
rsize = ((unsigned int)INT_MAX + 1) / 2;

misalignment = rreq->start & (rsize - 1);
if (misalignment) {
rreq->start -= misalignment;
rreq->len += misalignment;
}

rreq->len = round_up(rreq->len, rsize);
if (rreq->start < i_size && rreq->len > i_size - rreq->start)
rreq->len = i_size - rreq->start;
}

/*
* Completion of a request operation.
*/
Expand Down Expand Up @@ -329,7 +300,6 @@ const struct netfs_request_ops cifs_req_ops = {
.init_request = cifs_init_request,
.free_request = cifs_free_request,
.free_subrequest = cifs_free_subrequest,
.expand_readahead = cifs_expand_readahead,
.clamp_length = cifs_clamp_length,
.issue_read = cifs_req_issue_read,
.done = cifs_rreq_done,
Expand Down

0 comments on commit 39f70c5

Please sign in to comment.